/* 선택연구소 홈페이지 */

/* 첫 화면 제목 둘째 줄. Gotham 사용권을 받으면 파일을 넣고 이 자리를 바꾼다. */
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/Montserrat-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* 상단 메뉴 */
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/Montserrat-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
/* 첫 화면 제목 첫 줄 */
@font-face {
  font-family: "Playfair Display";
  src: url("../assets/fonts/PlayfairDisplay-Italic.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --magenta: #B40053;
  --magenta-dark: #8E0042;
  --magenta-soft: #FCEEF4;
  --teal: #00809E;
  --teal-dark: #00657D;
  --teal-soft: #E9F5F8;
  --ink: #17191E;
  --ink-2: #4B505B;
  --ink-3: #7A808C;
  --line: #E4E6EB;
  --bg: #FFFFFF;
  --bg-soft: #F6F7F9;
  --gray-soft: #F0F0F0;   /* 6% 검정. 첫 화면 아래 구간과 카드의 옅은 바탕 */

  --font-title-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-title-sans: "Gotham", "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

  --header-h: 68px;
  --radius: 20px;
  --shadow: 0 18px 40px -18px rgba(23, 25, 30, 0.28);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: -0.04em;
  color: var(--ink);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure { margin: 0; }

h1, h2, h3, .statement {
  font-weight: 800;
  line-height: 1.28;
  text-wrap: balance;
}
h3 { font-weight: 700; }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.icon { width: 1.2em; height: 1.2em; flex: none; }
.c-magenta { color: var(--magenta); }
.c-teal { color: var(--teal); }

/* ---------- 헤더 ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 20px -16px rgba(23, 25, 30, 0.35);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; margin-left: -8px; }
.brand img { height: 40px; width: auto; }
.brand-negative { display: none; }

/* 검은 첫 화면 위에 떠 있는 동안의 헤더 (main.js가 is-dark를 붙였다 뗀다) */
.site-header.is-dark:not(.is-open) {
  background: rgba(10, 10, 12, 0.55);
}
.site-header.is-dark:not(.is-open) .brand-positive { display: none; }
.site-header.is-dark:not(.is-open) .brand-negative { display: block; }
.site-header.is-dark:not(.is-open) .site-nav a { color: rgba(255, 255, 255, 0.82); }
.site-header.is-dark:not(.is-open) .site-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.site-header.is-dark:not(.is-open) .site-nav a.is-active { color: #fff; background: rgba(255, 255, 255, 0.18); }
.site-header.is-dark:not(.is-open) .nav-toggle-bars,
.site-header.is-dark:not(.is-open) .nav-toggle-bars::before,
.site-header.is-dark:not(.is-open) .nav-toggle-bars::after { background: #fff; }

.site-nav { display: flex; gap: 6px; }
.site-nav a {
  position: relative;
  padding: 8px 14px;
  font-family: var(--font-title-sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 999px;
  transition: color 0.15s, background-color 0.15s;
}
.site-nav a:hover { color: var(--ink); background: var(--bg-soft); }
.site-nav a.is-active { color: var(--magenta); background: var(--magenta-soft); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 22px; height: 2px;
  margin: 0 auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s, background-color 0.2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.is-open .nav-toggle-bars { background: transparent; }
.is-open .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.is-open .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 버튼, 꼬리표 ---------- */

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  transition: transform 0.15s, background-color 0.15s, border-color 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-magenta { background: var(--magenta); color: #fff; }
.btn-magenta:hover { background: var(--magenta-dark); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-dark); }
.btn-ghost { color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.35); font-weight: 600; }
.btn-ghost span { font-weight: 400; opacity: 0.75; }
.btn-ghost:hover { border-color: #fff; }

.label {
  display: inline-block;
  margin-bottom: 20px;
  padding: 5px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--bg-soft);
  border-radius: 999px;
}
.label-magenta { color: #fff; background: var(--magenta); }
.label-teal { color: #fff; background: var(--teal); }
.label-light { color: #fff; background: rgba(255, 255, 255, 0.14); }

.text-link { font-weight: 700; text-decoration: none; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }

/* ---------- 첫 화면 ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(100svh, 1200px);
  padding: calc(var(--header-h) + 56px) 0 80px;
  overflow: hidden;
  background: var(--bg);
  isolation: isolate;
}

/* 비단 리본. 제목의 CHOICE보다 위, 나머지 글자와 단추보다 아래에 놓여 CHOICE를 살짝 가린다.
   그릴 수 없는 환경에서는 정지 이미지로 바꾸고 맨 아래로 내린다(이미지 바탕이 흰색이라 글자를 덮기 때문). */
.hero-ribbon {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero-ribbon canvas { display: block; width: 100%; height: 100%; }
.hero-ribbon.is-fallback {
  z-index: -1;
  background: url("../assets/img/hero-ribbon.jpg") right center / cover no-repeat;
}
.hero-ribbon.is-fallback canvas { display: none; }

.hero-before, .hero-lead { position: relative; z-index: 2; }

/* 검은 바탕의 첫 화면: 96% 검정(#0A0A0A)과 85% 검정(#262626) 사이의 그라데이션이 바탕에서 옆으로 계속 흘러간다.
   두 색이 선처럼 좁아지지 않게 각각 넓은 면으로 머물고 그 사이만 서서히 바뀐다.
   바뀌는 구간은 천천히 시작해 천천히 끝나는 곡선으로 나눠 넣었다(직선으로 이으면 시작과 끝에 줄이 보인다).
   화면 두 배 너비의 띠를 절반만큼 밀어 끊김 없이 되풀이한다. */
.hero-dark { background: #0A0A0A; color: #fff; }
.hero-dark::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -1;
  width: 200%;
  background: linear-gradient(90deg,
      rgb(10.2 10.2 10.2) 0%,
      rgb(10.2 10.2 10.2) 7.50%,
      rgb(11.4 11.4 11.4) 10.94%,
      rgb(14.6 14.6 14.6) 14.38%,
      rgb(19.1 19.1 19.1) 17.81%,
      rgb(24.2 24.2 24.2) 21.25%,
      rgb(29.4 29.4 29.4) 24.69%,
      rgb(33.9 33.9 33.9) 28.12%,
      rgb(37.0 37.0 37.0) 31.56%,
      rgb(38.2 38.2 38.2) 35.00%,
      rgb(38.2 38.2 38.2) 65.00%,
      rgb(37.0 37.0 37.0) 68.44%,
      rgb(33.9 33.9 33.9) 71.88%,
      rgb(29.4 29.4 29.4) 75.31%,
      rgb(24.2 24.2 24.2) 78.75%,
      rgb(19.1 19.1 19.1) 82.19%,
      rgb(14.6 14.6 14.6) 85.62%,
      rgb(11.4 11.4 11.4) 89.06%,
      rgb(10.2 10.2 10.2) 92.50%,
      rgb(10.2 10.2 10.2) 100%) 0 0 / 50% 100% repeat-x;
  animation: hero-bg-flow 16s linear infinite;
}
@keyframes hero-bg-flow {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}
.hero-dark .hero-lead { color: rgba(255, 255, 255, 0.78); }
.hero-dark .hero-before .ch {
  background-image: linear-gradient(90deg, #FF5FA2, #FFA37A, #B08CFF, #FF5FA2);
}

.hero h1 {
  font-size: clamp(92px, 15.4vw, 176px);
  line-height: 1;
  letter-spacing: 0;
}
.hero-before, .hero-choice { display: block; }
.hero-before {
  font-family: var(--font-title-serif);
  margin-left: 11px;
  font-size: 0.418em;
  font-style: italic;
  font-weight: 500;
  white-space: nowrap;
}
.hero-choice {
  font-family: var(--font-title-sans);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

/* 첫 줄의 낱말이 한 글자씩 사라지고 한 글자씩 새로 나온다 (main.js).
   글자색은 리본 색의 그라데이션이 옆으로 계속 흘러간다. --x는 글자의 왼쪽 위치라서 글자들이 한 장의 그라데이션을 나눠 쓴다. */
.hero-before .ch {
  display: inline-block;
  white-space: pre;           /* 낱말 사이 빈칸도 한 글자로 자리를 차지한다 */
  padding: 0.25em 0.3em;      /* 기울임체의 삐져나온 획까지 색이 닿게 한다 */
  margin: -0.25em -0.3em;
  color: transparent;
  background: linear-gradient(90deg, #B40053, #FF3D8B, #FF8A5C, #8A3DF2, #B40053) repeat-x;
  background-size: 6em 100%;
  background-position-x: calc(var(--x, 0px) * -1);
  -webkit-background-clip: text;
  background-clip: text;
  animation: hero-before-flow 9s linear infinite;
  transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;
  transition-delay: calc(var(--i) * 40ms);
}
@keyframes hero-before-flow {
  from { background-position-x: calc(var(--x, 0px) * -1); }
  to { background-position-x: calc(var(--x, 0px) * -1 + 6em); }
}
.hero-before .ch.is-out { opacity: 0; transform: translateY(-0.16em); filter: blur(6px); }
.hero-before .ch.is-pre { opacity: 0; transform: translateY(0.2em); filter: blur(6px); transition: none; }

.hero-lead {
  margin: 28px 0 0 6px;
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: 500;
  text-wrap: balance;
  color: var(--ink-2);
}

/* ---------- 구간 공통 ---------- */

.section { padding: 120px 0; }
.section h2 { font-size: clamp(30px, 4.2vw, 46px); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.split-copy > p:not([class]) { color: var(--ink-2); }
.split-copy h2 { margin-bottom: 24px; }
.split-copy .note {
  margin-top: 16px;
  padding-left: 14px;
  font-size: 15px;
  color: var(--ink-3);
  border-left: 3px solid currentColor;
}

/* ---------- 사진 정리 앱 ---------- */

.app { background: var(--bg); }
.app-split .app-phone { order: -1; }   /* 넓은 화면에서는 영상이 왼쪽, 좁은 화면에서는 글 아래 */

.app-name {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.app-name img { width: 44px; height: 44px; border-radius: 11px; }
.app-name span {
  font-family: var(--font-title-sans);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.app-name em { font-style: normal; font-size: 15px; font-weight: 600; color: var(--ink-3); }

.app-points { display: grid; gap: 10px; margin-top: 28px; counter-reset: point; }
.app-points li {
  counter-increment: point;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  padding: 16px 20px;
  background: var(--gray-soft);
  border-radius: 16px;
}
.app-points li::before {
  content: "0" counter(point);
  grid-row: span 2;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.9;
  color: var(--magenta);
}
.app-points strong { font-size: 17px; line-height: 1.4; }
.app-points span { font-size: 15px; color: var(--ink-3); line-height: 1.5; }

.app-status {
  display: inline-block;
  margin-top: 24px;
  padding: 9px 18px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
}

/* 휴대폰 모양 틀 안에서 사용 장면 영상이 되풀이된다 */
.app-phone {
  justify-self: center;
  width: min(300px, 72vw);
  padding: 8px;
  background: #0A0A0A;
  border-radius: 46px;
  box-shadow: 0 30px 60px -28px rgba(23, 25, 30, 0.55);
}
.app-phone video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 38px;
  background: #000;
  cursor: pointer;
}

/* ---------- 소개 ---------- */

.about { text-align: center; background: var(--gray-soft); }
.about .label { background: #fff; }
.statement { font-size: clamp(26px, 3.8vw, 44px); }
.about-lead {
  max-width: 34em;
  margin: 24px auto 56px;
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--ink-2);
}

.duo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: left;
}
.duo-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 36px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.duo-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.duo-app, .duo-stay, .duo-things { background: #fff; }
.duo-kicker { font-size: 15px; font-weight: 700; }
.duo-stay .duo-kicker, .duo-stay .duo-more { color: var(--magenta); }
.duo-things .duo-kicker, .duo-things .duo-more { color: var(--teal-dark); }
.duo-card strong {
  font-weight: 800;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.3;
}
.duo-desc { color: var(--ink-2); }
.duo-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 15px;
  font-weight: 700;
}

/* ---------- 숙소 연구 ---------- */

.stay { background: var(--gray-soft); }
.stay .split { align-items: start; }

.list-title { margin-bottom: 14px; font-size: 15px; font-weight: 700; color: var(--magenta); }
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  counter-reset: fact;
}
.facts li {
  counter-increment: fact;
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  background: #fff;
  border-radius: 16px;
}
.facts li::before {
  content: "0" counter(fact);
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--magenta);
}
.facts strong { font-size: 17px; line-height: 1.4; }
.facts span { font-size: 15px; color: var(--ink-3); line-height: 1.5; }

.gallery-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 80px 0 20px;
}
.gallery-head h3 { font-size: 22px; }
.gallery-head h3 span {
  margin-left: 8px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-3);
}

.gallery { display: grid; gap: 20px; }
.gallery-stay { grid-template-columns: repeat(3, 1fr); }
.gallery-things { grid-template-columns: repeat(3, 1fr); gap: 14px; }

.gallery a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.gallery img {
  width: 100%;
  object-fit: cover;
  border-radius: 16px;
  background: var(--line);
  box-shadow: 0 10px 24px -16px rgba(23, 25, 30, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-stay img { aspect-ratio: 4 / 5; }
.gallery-things img { aspect-ratio: 9 / 16; }
.gallery a:hover img { transform: translateY(-4px); box-shadow: var(--shadow); }
.gallery strong { margin-top: 14px; font-size: 17px; line-height: 1.45; }
.gallery span { font-size: 15px; color: var(--ink-3); }
.gallery-things strong { font-size: 15px; font-weight: 600; }

/* ---------- 물건 연구 ---------- */

.things { background: var(--bg); }
.split-reverse .split-copy { order: 2; }
.split-reverse .split-side { order: 1; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 32px; }
.chips li {
  padding: 7px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--teal-dark);
  background: var(--gray-soft);
  border-radius: 999px;
}

/* ---------- 문의, 푸터 ---------- */

.contact { background: var(--ink); color: #fff; text-align: center; }
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.contact h2 { font-size: clamp(26px, 3.4vw, 38px); }
.mail {
  margin: 36px 0 40px;
  font-family: var(--font-title-sans);
  font-weight: 700;
  letter-spacing: 0;
  font-size: clamp(22px, 4.4vw, 46px);
  color: #FFE27A;
  text-decoration: none;
  overflow-wrap: anywhere;
  border-bottom: 3px solid transparent;
  transition: border-color 0.15s;
}
.mail:hover { border-bottom-color: currentColor; }
.contact .btn-row { justify-content: center; }

.site-footer {
  padding: 28px 0 36px;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-inner { display: flex; align-items: center; gap: 24px; }
.footer-inner img { height: 34px; width: auto; margin-left: -6px; }
.footer-operator { margin-left: auto; }

/* ---------- 좁은 화면 ---------- */

@media (max-width: 900px) {
  .hero { padding: calc(var(--header-h) + 40px) 0 64px; }

  .section { padding: 80px 0; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .app-split .app-phone { order: 0; }
  .duo { grid-template-columns: 1fr; }
  .split-reverse .split-copy { order: 1; }
  .split-reverse .split-side { order: 2; }
  .gallery-head { margin-top: 56px; }
}

@media (max-width: 720px) {
  :root { --header-h: 60px; }
  body { font-size: 16px; }
  .container { padding: 0 20px; }
  .brand img { height: 34px; }

  .hero { align-items: flex-start; }
  .hero h1 { font-size: min(21vw, 92px); }
  .hero-before { margin-left: 6px; }
  .hero-lead { margin-left: 3px; }

  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    left: 0; right: 0; top: var(--header-h);
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -22px rgba(23, 25, 30, 0.5);
  }
  .is-open .site-nav { display: flex; }
  .site-nav a { padding: 13px 14px; font-size: 17px; border-radius: 12px; }
  .site-header.is-open { background: #fff; }

  .btn { min-height: 50px; padding: 0 20px; font-size: 16px; }
  .duo { grid-template-columns: 1fr; }
  .duo-card { padding: 28px 24px; }

  /* 갤러리는 옆으로 넘겨 본다 */
  .gallery-stay, .gallery-things {
    display: flex;
    gap: 14px;
    margin: 0 -20px;
    padding: 4px 20px 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery li { flex: none; scroll-snap-align: center; }
  .gallery-stay li { width: 72%; }
  .gallery-things li { width: 54%; }

  .gallery-head { flex-direction: column; gap: 4px; }
  .gallery-head h3 span { display: block; margin: 2px 0 0; }

  .footer-inner { flex-wrap: wrap; gap: 12px 20px; }
  .footer-operator { margin-left: 0; width: 100%; order: 3; }
  .copyright { margin-left: auto; }
}

@media (max-width: 340px) {
  .facts { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .hero-before .ch, .hero-dark::before { animation: none; }
}
