/* ============================================================
   eye-tracker — 공식 웹사이트 스타일
   토큰 원천: web_page/docs/initial_plan/00_웹사이트_아키텍처_및_구성_계획.md §7
   타이포: MaruBuri(제목·브랜드) + Pretendard(본문) — 디자인 시스템과 동일
   ============================================================ */

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css");

@font-face {
  font-family: "MaruBuri";
  src: url("../assets/fonts/MaruBuri-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "MaruBuri";
  src: url("../assets/fonts/MaruBuri-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "MaruBuri";
  src: url("../assets/fonts/MaruBuri-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --bg-warm: #F3EFE9;
  --bg-paper: #FDFBF8;
  --ink: #3A362F;
  --ink-soft: #7A756C;
  --cream: #F5F1EA;
  --accent: #E8956B;
  --accent-deep: #D97E52;
  --green: #7BAE7F;
  --green-deep: #4C7A50;
  --amber: #EBB86B;
  --muted: #D8D2C8;
  --dark: #332F29;
  --glow: #FFE9C4;
  --hairline: #E7E1D7;
  --radius-card: 20px;
  --radius-img: 24px;
  --shadow-card: 0 8px 30px rgba(58, 54, 47, 0.08);
  --font-display: "MaruBuri", "Pretendard Variable", Pretendard, serif;
  --font-body: "Pretendard Variable", Pretendard, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
  --nav-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* 가로 넘침 방지는 반드시 루트(html)에만 둔다 — body 에 overflow-x:hidden 을 주면
   브라우저가 body 를 별도 스크롤 컨테이너로 만들어(overflow-y:auto 자동 부여),
   앵커 링크(#preorder)·scroll-behavior:smooth·scrollIntoView 가 전부 무력화된다.
   (실제로 "사전예약" 버튼이 스크롤되지 않아 폼이 안 보이던 버그의 원인) */
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-warm);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
section { scroll-margin-top: calc(var(--nav-h) + 16px); }

h1, h2, h3, .brand-word { font-family: var(--font-display); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .25s ease, box-shadow .25s ease;
}
.nav.scrolled {
  background: rgba(250, 247, 242, 0.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav__inner {
  width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav__logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-word { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.nav__links { display: flex; gap: 26px; }
.nav__links a {
  font-size: .94rem; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.nav__links a:hover { color: var(--accent-deep); }
.nav__right { display: flex; align-items: center; gap: 14px; }
.nav__lang { font-size: .85rem; color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.nav__lang b { color: var(--ink); }
.nav__lang a { color: inherit; text-decoration: none; }
.nav__lang a:hover { color: var(--ink); }
.nav__burger {
  display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer;
  color: var(--ink); padding: 6px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; text-decoration: none; white-space: nowrap;
  border-radius: 999px; font-weight: 700; font-family: var(--font-body);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn--primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 6px 18px rgba(232, 149, 107, .35);
}
.btn--primary:hover {
  background: var(--accent-deep); transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(217, 126, 82, .45);
}
.btn--primary:disabled { background: var(--muted); box-shadow: none; transform: none; cursor: default; }
.btn--md { padding: 15px 30px; font-size: 1.02rem; }
.btn--sm { padding: 9px 20px; font-size: .9rem; }
.btn--ghost {
  background: none; border-radius: 0; padding: 0 0 3px; font-weight: 600;
  border-bottom: 2px solid var(--accent); box-shadow: none;
}
.btn--ghost .arrow { color: var(--accent); font-style: normal; }

/* ---------- Badges ---------- */
.badges { display: flex; gap: 10px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(123, 174, 127, .14); color: var(--green-deep);
  font-weight: 600; font-size: .84rem; border-radius: 999px; padding: 7px 14px;
  white-space: nowrap;
}

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100svh - var(--nav-h));
  display: grid; grid-template-columns: 55fr 45fr; align-items: center; gap: 32px;
  max-width: 1200px; margin: 0 auto; padding: 24px 24px 64px;
}
.hero__eyebrow {
  font-size: .92rem; font-weight: 700; color: var(--accent-deep);
  letter-spacing: .06em; margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.3rem); font-weight: 700;
  line-height: 1.28; letter-spacing: -0.02em; margin-bottom: 20px;
  word-break: keep-all; overflow-wrap: normal;
}
.hero__line { display: block; }
.text-nowrap { white-space: nowrap; }
.hero__sub { font-size: 1.15rem; line-height: 1.65; color: var(--ink-soft); margin-bottom: 30px; }
.hero__sub b { color: var(--ink); }
.hero__ctas { display: flex; align-items: center; gap: 26px; margin-bottom: 28px; flex-wrap: wrap; }
.hero__img img { width: 100%; border-radius: var(--radius-img); }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section--paper { background: var(--bg-paper); }
.section--dark { background: var(--dark); color: var(--cream); }
.section__eyebrow {
  font-size: .9rem; font-weight: 700; color: var(--accent-deep);
  letter-spacing: .06em; margin-bottom: 12px;
}
.section h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 700;
  letter-spacing: -0.01em; line-height: 1.35; margin-bottom: 14px;
}
.section__sub { font-size: 1.12rem; color: var(--ink-soft); max-width: 720px; margin-bottom: 40px; }
.section--dark .section__sub { color: #B7B0A4; }
.center { text-align: center; }
.center .section__sub { margin-left: auto; margin-right: auto; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--5 { grid-template-columns: repeat(5, 1fr); }
.card {
  background: #fff; border-radius: var(--radius-card); padding: 24px;
  box-shadow: var(--shadow-card);
}
.card__icon { font-size: 1.6rem; margin-bottom: 12px; }
.card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.card p { font-size: .9rem; color: var(--ink-soft); line-height: 1.6; }
.card--step .num {
  display: inline-flex; width: 32px; height: 32px; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 800;
  align-items: center; justify-content: center; margin-bottom: 12px;
}

/* ---------- How it works ---------- */
.how__photo img { width: 100%; border-radius: var(--radius-img); box-shadow: 0 10px 36px rgba(58,54,47,.12); }

/* ---------- Product design gallery ----------
   img 의 width/height 속성은 레이아웃 확보용일 뿐 — height:auto 로
   고유 비율을 항상 유지한다 (비율 변형 금지 원칙). */
#design figure img { width: 100%; height: auto; }

/* ---------- Chinese (zh-CN) font stack ----------
   MaruBuri 는 한글 전용이라 한자 글리프가 없다 — zh 페이지는 같은
   "명조 제목 + 고딕 본문" 감성을 중국어 시스템 폰트로 재현한다. */
html[lang="zh-CN"] {
  --font-display: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, "Segoe UI", sans-serif;
}
.how__caption { font-size: .88rem; color: var(--ink-soft); margin: 14px 0 36px; }

/* ---------- Report (phone mockup) ---------- */
.report { display: grid; grid-template-columns: auto 1fr; gap: 56px; align-items: center; }
.phone {
  width: 330px; background: #fff; border-radius: 34px; border: 8px solid var(--dark);
  padding: 20px 18px; box-shadow: 0 20px 50px rgba(58, 54, 47, .2);
  font-family: var(--font-body);
}
.phone__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.phone__head b { font-size: .95rem; }
.phone__head span { font-size: .72rem; color: var(--ink-soft); }
.sfi { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sfi__num { font-size: 3rem; font-weight: 800; color: var(--accent-deep); line-height: 1; }
.sfi__num small { font-size: 1rem; color: var(--ink-soft); font-weight: 600; }
.sfi__conf {
  background: rgba(123,174,127,.15); color: var(--green-deep);
  font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 5px 10px;
}
.phone__blk { background: var(--bg-paper); border-radius: 16px; padding: 12px; margin-bottom: 10px; }
.phone__blk b { font-size: .78rem; display: block; margin-bottom: 8px; }
.tl { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 2px; }
.tl i { display: block; }
.tl .f { background: var(--green); } .tl .o { background: var(--accent); }
.tl .b { background: var(--amber); } .tl .x { background: var(--muted); }
.tl-legend { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.tl-legend span { font-size: .66rem; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.tl-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.stats div { background: var(--bg-paper); border-radius: 14px; padding: 10px; text-align: center; }
.stats b { display: block; font-size: 1.05rem; }
.stats span { font-size: .68rem; color: var(--ink-soft); }
.coach { background: var(--glow); border-radius: 14px; padding: 12px; font-size: .8rem; line-height: 1.55; }
.report__list { list-style: none; }
.report__list li { padding: 14px 0; border-bottom: 1px solid var(--hairline); font-size: 1rem; color: var(--ink-soft); }
.report__list li b { color: var(--ink); }

/* ---------- Privacy (dark) ---------- */
.privacy-flow { width: 100%; max-width: 860px; margin: 8px auto 36px; display: block; }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; text-align: left; max-width: 860px; margin: 0 auto; }
.cmp > div { border: 1px solid #57524A; border-radius: 16px; padding: 18px 22px; }
.cmp span { font-size: .8rem; color: #B7B0A4; font-weight: 700; display: block; margin-bottom: 6px; }
.cmp p { font-size: .95rem; }
.cmp .ok { border-color: #5B7A62; background: rgba(123, 174, 127, .08); }
.cmp .ok span { color: #8FB596; }

/* ---------- Enhance loop ---------- */
.enhance { display: flex; gap: 44px; align-items: center; flex-wrap: wrap; }
.enhance__loop { flex: none; }
.enhance__cards { flex: 1; min-width: 300px; }
.enhance__close { margin-top: 36px; font-size: 1.08rem; text-align: center; color: var(--ink-soft); }
.enhance__close b { color: var(--accent-deep); }

/* ---------- Trust ---------- */
.trust__cards { margin-top: 8px; }

/* ---------- Preorder ---------- */
.section--preorder { background: linear-gradient(160deg, #F3EFE9 0%, #F8E9DC 100%); }
.preorder { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; text-align: left; max-width: 940px; margin: 0 auto; }
.prices { display: flex; flex-direction: column; gap: 16px; }
.price { background: #fff; border-radius: var(--radius-card); padding: 26px; box-shadow: var(--shadow-card); }
.price span { font-size: .85rem; font-weight: 700; color: var(--ink-soft); }
.price .amount { font-size: 2.3rem; font-weight: 800; color: var(--accent-deep); margin: 6px 0 4px; font-family: var(--font-body); }
.price .amount small { font-size: 1rem; color: var(--ink-soft); font-weight: 600; }
.price em { font-style: normal; font-size: .85rem; color: var(--ink-soft); }
.form {
  background: #fff; border-radius: var(--radius-card); padding: 28px;
  box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 12px;
}
.form input[type="email"], .form input[type="text"], .form select {
  font-family: var(--font-body); font-size: .95rem;
  border: 1.5px solid #E2DBCF; border-radius: 12px; padding: 13px 14px;
  background: var(--bg-paper); color: var(--ink); width: 100%;
}
.form input:focus, .form select:focus { outline: 2px solid var(--accent); border-color: transparent; }
.form__consent { font-size: .82rem; color: var(--ink-soft); display: flex; gap: 8px; align-items: flex-start; }
.form__consent a { color: var(--accent-deep); }
.form__note { font-size: .78rem; color: var(--ink-soft); text-align: center; }
.form__hp { position: absolute; left: -9999px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq {
  background: #fff; border-radius: 16px; padding: 4px 22px; margin-bottom: 10px;
  box-shadow: 0 4px 16px rgba(58, 54, 47, .05);
}
.faq summary {
  font-weight: 700; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 15px 0; font-size: .98rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-weight: 800; font-size: 1.15rem; flex: none; }
.faq[open] summary::after { content: '\2212'; }
.faq div { padding: 0 0 18px; font-size: .93rem; line-height: 1.7; color: var(--ink-soft); }

/* ---------- Closing banner ---------- */
.closing { text-align: center; padding: 96px 24px; }
.closing h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; margin-bottom: 28px; line-height: 1.4; }

/* ---------- Footer ---------- */
.footer { background: var(--dark); color: #B7B0A4; padding: 48px 0 40px; font-size: .85rem; }
.footer__inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer a { color: #D8D2C8; text-decoration: none; }
.footer a:hover { color: #fff; }
.footer__brand { color: var(--cream); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.footer__notice { margin-top: 18px; font-size: .78rem; line-height: 1.7; }
.footer__links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- Reveal animation ----------
   콘텐츠는 기본적으로 "보이게" 두고, JS 가 켜졌을 때만(.js) 숨겼다가 스크롤 시
   드러낸다. 이렇게 하면 JS 로드 실패·오류가 나도 폼 등 콘텐츠가 영영 투명하게
   남는 사고를 막는다(progressive enhancement). .js 클래스는 <head> 인라인
   스크립트가 첫 페인트 전에 붙여 깜빡임을 없앤다. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}

/* ---------- Spec table (tech page) ---------- */
.table-wrap { border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-card); }
.spec-table { width: 100%; border-collapse: collapse; background: #fff; font-size: .95rem; }
.spec-table th, .spec-table td { text-align: left; padding: 16px 22px; border-bottom: 1px solid var(--hairline); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }
.spec-table th { color: var(--ink); font-weight: 700; white-space: nowrap; width: 190px; background: var(--bg-paper); }
.spec-table td { color: var(--ink-soft); line-height: 1.6; }
.note-line { font-size: .85rem; color: var(--ink-soft); margin-top: 16px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .spec-table th { width: 130px; } }

/* ---------- Sub pages ---------- */
.page { max-width: 860px; margin: 0 auto; padding: 64px 24px 96px; }
.page h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; margin-bottom: 12px; letter-spacing: -0.01em; }
.page .lead { color: var(--ink-soft); font-size: 1.1rem; margin-bottom: 40px; }
.page h2 { font-size: 1.35rem; font-weight: 700; margin: 44px 0 14px; }
.page p, .page li { font-size: .97rem; line-height: 1.8; color: var(--ink-soft); }
.page p b, .page li b { color: var(--ink); }
.page ul { padding-left: 20px; margin: 10px 0; }
.page table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .92rem; }
.page th, .page td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--hairline); }
.page th { color: var(--ink); font-weight: 700; white-space: nowrap; }
.page td { color: var(--ink-soft); }
.callout {
  background: #fff; border-left: 4px solid var(--green); border-radius: 12px;
  padding: 18px 22px; margin: 20px 0; box-shadow: var(--shadow-card);
}

/* ---------- Explainer video (9:16 세로) ----------
   프레임을 9:16 로 고정하고 max-width 로 폭을 제한한다. preload=none + poster 라서
   10MB 영상은 재생을 누를 때만 로드된다(초기 로딩·대역폭 절약). */
.video-frame {
  max-width: 328px; margin: 34px auto 0;
  aspect-ratio: 9 / 16;
  border-radius: 26px; overflow: hidden; background: #000;
  box-shadow: 0 26px 60px rgba(0, 0, 0, .45);
}
.video-frame video { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }
.video-note { font-size: .82rem; color: #B7B0A4; margin-top: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 8px; }
  .hero__img { order: -1; max-width: 560px; margin: 0 auto; }
  .grid--4, .grid--5 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .report { grid-template-columns: 1fr; justify-items: center; gap: 36px; }
  .enhance { flex-direction: column; }
}
@media (max-width: 768px) {
  :root { --nav-h: 60px; }                 /* 모바일 헤더 슬림 — 콘텐츠 공간 확보 */
  .nav__inner { gap: 10px; }
  .brand-word { font-size: 1rem; }
  .nav__links {
    display: none; position: fixed; inset: var(--nav-h) 0 0 0;
    background: var(--bg-paper); flex-direction: column; align-items: center;
    justify-content: center; gap: 28px; font-size: 1.25rem; z-index: 99;
    overflow-y: auto;                        /* 항목이 많아도 스크롤 가능 */
  }
  .nav__links.open { display: flex; }
  .nav__burger { display: block; font-size: 1.5rem; padding: 8px; }
  .nav__right { gap: 8px; }
  /* 언어 스위처는 모바일에서도 항상 보이게 유지 — 햄버거 안에 숨기면
     3개 언어 전환이 불가능해지던 버그를 방지 (KO · EN · 中文 은 충분히 짧다). */
  .nav__lang { display: inline; font-size: .8rem; }
  .nav__links a.nav__lang--m { display: none; }
  .section { padding: 56px 0; }
  .container { padding: 0 20px; }
  .preorder, .cmp, .grid--2 { grid-template-columns: 1fr; }
  /* 모바일에선 "사전예약" 클릭 시 이메일 폼이 바로 보이도록 폼을 가격표 위로 */
  .preorder .form { order: -1; }
  .grid--3, .grid--4, .grid--5 { grid-template-columns: 1fr 1fr; }
  .phone { width: 300px; }
  /* 히어로 CTA: 세로 적층 + 주 버튼 풀폭(엄지로 누르기 쉽게) */
  .hero__ctas { flex-direction: column; align-items: stretch; gap: 14px; }
  .hero__ctas .btn--primary { width: 100%; }
  .hero__ctas .btn--ghost { align-self: flex-start; }
  .btn--md { padding: 16px 26px; }           /* 터치 타깃 ≥48px */
  /* iOS 는 16px 미만 입력창을 포커스하면 화면을 자동 확대한다 — 방지 */
  .form input[type="email"], .form input[type="text"], .form select { font-size: 16px; padding: 14px; }
}
@media (max-width: 480px) {
  .brand-word { display: none; }             /* 초소형 화면: 로고 아이콘만 남겨 nav 여유 확보 */
  .grid--3, .grid--4, .grid--5 { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(1.9rem, 8vw, 2.4rem); }
  .hero__sub { font-size: 1.05rem; }
  .section { padding: 44px 0; }
  .section__sub { font-size: 1.02rem; }
  .btn--md { width: 100%; }
  .phone { width: 100%; max-width: 320px; }
  .prices .price { padding: 20px; }
  .price .amount { font-size: 2rem; }
  .form { padding: 22px; }
}
