/* 시험 훈련 타이머 — 회사 주소 하위 경로 앱 웹(WEB-SUBPATH §9).
   색의 뜻은 페이지 전체에서 하나: 주황 = 화면 시계(빨리 감) · 하늘 = 실제 시간. */
:root {
  --ink: #0B1220;          /* 앱 배경(다크) */
  --paper: #F6F8FB;        /* 답안지 흰색(라이트) */
  --screen: #FF6B4A;       /* 화면 시계 — 앱 시작 버튼 색 */
  --real: #00A2E8;         /* 실제 시간 — 앱 아이콘 하늘색 */
  --muted: #5B6678;
  --bg: var(--paper);
  --surface: #FFFFFF;
  --surface-2: #EEF2F7;
  --text: #121826;
  --sub: #4C5668;
  --line: #DCE3EC;
  --shadow: 0 1px 2px rgba(11, 18, 32, .06), 0 12px 32px -16px rgba(11, 18, 32, .22);
  --screen-text: #C2410C; /* 흰 바탕 위 주황 글자(대비 4.5:1 이상) */
  --real-text: #0369A1;
  --ease-out: cubic-bezier(.16, 1, .3, 1);   /* 등장 */
  --ease-soft: cubic-bezier(.65, 0, .35, 1); /* 회전·모핑 */
  --shadow-2: 0 2px 4px rgba(11, 18, 32, .08), 0 22px 44px -18px rgba(11, 18, 32, .30);
  --radius-lg: 22px;
  --radius-sm: 10px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", Pretendard, "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--ink); --surface: #121B2C; --surface-2: #17223A; --text: #EEF2F8; --sub: #9AA6B9;
    --line: #24324A; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 18px 40px -20px rgba(0,0,0,.6); --shadow-2: 0 2px 6px rgba(0,0,0,.5), 0 26px 52px -20px rgba(0,0,0,.7);
    --screen-text: #FF8A6E; --real-text: #4CC3F5; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: var(--ink); --surface: #121B2C; --surface-2: #17223A; --text: #EEF2F8; --sub: #9AA6B9;
  --line: #24324A; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 18px 40px -20px rgba(0,0,0,.6); --shadow-2: 0 2px 6px rgba(0,0,0,.5), 0 26px 52px -20px rgba(0,0,0,.7);
  --screen-text: #FF8A6E; --real-text: #4CC3F5; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: clamp(15px, 1vw + 11px, 17px); line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere;
}
a { color: var(--real-text); text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--real); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip-link:focus { left: 12px; }
.num { font-variant-numeric: tabular-nums; }

/* ── 내비 ── */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.nav__inner { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-width: 0; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.brand strong { font-size: 16px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a { color: var(--sub); text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 10px; border-radius: 8px; }
.nav__links a:hover { color: var(--text); background: var(--surface-2); }
.nav__tools { display: flex; gap: 6px; align-items: center; }
.nav__tools--end { margin-left: auto; }
.icon-btn { white-space: nowrap; appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--text); height: 36px; min-width: 36px;
  padding: 0 10px; border-radius: 10px; font: 600 13px/1 var(--font); cursor: pointer; }
.icon-btn:hover { border-color: var(--sub); }
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 14px;
  font: 800 15px/1.2 var(--font); text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.btn--primary { background: var(--screen); color: var(--ink); box-shadow: 0 10px 24px -12px rgba(255, 107, 74, .8); }
.btn--primary:hover { filter: brightness(1.05); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--sub); }
.nav .btn { min-height: 36px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
@media (max-width: 860px) { .nav__links { display: none; } .nav__tools { margin-left: auto; } }
@media (max-width: 420px) { .brand strong { font-size: 15px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; } .nav .btn { padding: 0 10px; } }

/* ── 히어로 ── */
.hero { padding: clamp(36px, 7vw, 96px) 0 clamp(36px, 6vw, 72px); position: relative; overflow: hidden; isolation: isolate; }
/* 배경: 두 시계를 뜻하는 두 빛(주황 = 화면, 하늘 = 실제) + 옅은 답안지 표기 칸 */
.hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: min(760px, 80vw); aspect-ratio: 1; z-index: -1;
  background: radial-gradient(closest-side at 38% 42%, color-mix(in srgb, var(--screen) 22%, transparent), transparent 70%),
              radial-gradient(closest-side at 64% 62%, color-mix(in srgb, var(--real) 22%, transparent), transparent 72%); filter: blur(8px); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -2; opacity: .5; pointer-events: none;
  background-image: radial-gradient(circle at 50% 50%, transparent 4.2px, color-mix(in srgb, var(--real) 22%, transparent) 4.6px, transparent 5.6px);
  background-size: 22px 30px; -webkit-mask-image: linear-gradient(105deg, transparent 38%, #000 75%); mask-image: linear-gradient(105deg, transparent 38%, #000 75%); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(38px, 5.6vw, 64px); line-height: 1.08; letter-spacing: -.035em; margin: 0 0 18px; font-weight: 850; }
.hero h1 .l2 { display: block; color: var(--real-text); }
.hero__lead { font-size: clamp(16px, 1.2vw + 12px, 19px); color: var(--sub); max-width: 34em; margin: 0 0 26px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chips li { font-size: 13px; font-weight: 700; color: var(--sub); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } }

/* 두 시계 — 이 페이지의 시그니처 */
.duel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 28px); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(16px, 2.6vw, 26px); align-items: center; }
.dial { width: clamp(190px, 20vw, 240px); aspect-ratio: 1; }
.dial .face { fill: var(--surface-2); stroke: var(--line); stroke-width: 2; }
.dial .tick { stroke: var(--sub); stroke-width: 2; stroke-linecap: round; opacity: .55; }
.dial .tick--major { stroke-width: 3.5; opacity: .9; }
.dial .hand-real { stroke: var(--real); stroke-width: 4; stroke-linecap: round; }
.dial .hand-screen { stroke: var(--screen); stroke-width: 6; stroke-linecap: round; }
.dial .gap-arc { fill: none; stroke: var(--screen); stroke-width: 14; opacity: .32; stroke-linecap: round; }
.dial .hub { fill: var(--text); }
.readouts { display: grid; gap: 14px; min-width: 0; }
.readout { display: grid; gap: 2px; }
.readout__label { font-size: 13px; font-weight: 700; color: var(--sub); display: flex; align-items: center; gap: 8px; }
.readout__label::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.readout--screen .readout__label { color: var(--screen-text); }
.readout--real .readout__label { color: var(--real-text); }
.readout__value { font-size: clamp(32px, 3.5vw, 46px); font-weight: 850; letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
.readout--real .readout__value { font-size: clamp(24px, 2.8vw, 34px); color: var(--sub); }
.duel__note { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--sub); border-top: 1px dashed var(--line); padding-top: 12px; }
@media (max-width: 460px) { .duel { grid-template-columns: 1fr; justify-items: center; text-align: center; } .readout__label { justify-content: center; } }

/* ── 사실 띠 ── */
.facts { border-block: 1px solid var(--line); background: var(--surface-2); }
.facts__list { display: grid; grid-template-columns: repeat(4, 1fr); margin-block: 0; padding-block: 0; list-style: none; }
.facts__list li { padding: clamp(20px, 3.4vw, 34px) clamp(10px, 2vw, 22px); border-left: 1px solid var(--line); text-align: center; }
.facts__list li:first-child { border-left: 0; }
.facts__n { display: block; font-size: clamp(32px, 4.4vw, 52px); font-weight: 850; letter-spacing: -.03em; line-height: 1.05; margin-bottom: 4px; }
.facts__list li:nth-child(1) .facts__n { color: var(--screen-text); }
.facts__list li:nth-child(2) .facts__n { color: var(--real-text); }
.facts__t { font-size: 14px; color: var(--sub); }
@media (max-width: 720px) { .facts__list { grid-template-columns: repeat(2, 1fr); } .facts__list li:nth-child(3) { border-left: 0; } .facts__list li:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* ── 섹션 공통 ── */
.section { padding: clamp(56px, 9vw, 112px) 0; }
.section--alt { background: var(--surface-2); }
.section h2 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.2; letter-spacing: -.025em; margin: 0 0 14px; font-weight: 850; max-width: 22em; }
.section__lead { color: var(--sub); max-width: 40em; margin: 0 0 clamp(26px, 4vw, 44px); }

/* 왜 — 한 덩어리 이야기 */
.why { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.why blockquote { margin: 0; font-size: clamp(24px, 3.2vw, 38px); font-weight: 800; line-height: 1.3; letter-spacing: -.02em; }
.why blockquote p { margin: 0; }
.why blockquote cite { display: block; font-style: normal; font-size: 15px; font-weight: 600; color: var(--sub); margin-top: 12px; }
.why__body p { margin: 0 0 14px; color: var(--sub); }
.why__body strong { color: var(--text); }
.timeline { margin-top: 18px; display: grid; gap: 10px; }
.timeline__row { display: grid; grid-template-columns: 7.5em 1fr; gap: 10px; align-items: center; font-size: 13px; font-weight: 700; color: var(--sub); }
.bar { height: 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); position: relative; overflow: hidden; }
.bar span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; }
.bar--screen span { background: var(--screen); width: 100%; }
.bar--real span { background: var(--real); width: 95%; }
.bar--real::after { content: ""; position: absolute; inset: 0 0 0 95%; background: repeating-linear-gradient(135deg, transparent 0 4px, color-mix(in srgb, var(--real) 35%, transparent) 4px 7px); }
@media (max-width: 820px) { .why { grid-template-columns: 1fr; } }

/* 사용법 — 실제 순서라 번호를 쓴다 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 22px); margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; counter-increment: step; position: relative; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--text); color: var(--bg); font-weight: 850; margin-bottom: 14px; }
.steps h3 { margin: 0 0 6px; font-size: 18px; }
.steps p { margin: 0; color: var(--sub); font-size: 15px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* 체험 */
.demo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(18px, 3.5vw, 36px); }
.demo__controls { display: grid; grid-template-columns: repeat(2, minmax(0, 12em)) 1fr; gap: 14px; align-items: end; }
.field label { display: block; font-size: 13px; font-weight: 800; margin-bottom: 6px; }
.field--screen label { color: var(--screen-text); }
.field--real label { color: var(--real-text); }
.field input { width: 100%; height: 52px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text);
  font: 850 24px/1 var(--font); padding: 0 14px; font-variant-numeric: tabular-nums; }
.field--screen input:focus { border-color: var(--screen); outline: none; }
.field--real input:focus { border-color: var(--real); outline: none; }
.demo__presets { display: flex; flex-wrap: wrap; gap: 6px; }
.preset { appearance: none; border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 999px; padding: 8px 12px;
  font: 700 14px/1 var(--font); cursor: pointer; font-variant-numeric: tabular-nums; }
.preset[aria-pressed="true"] { border-color: var(--screen); color: var(--screen-text); background: color-mix(in srgb, var(--screen) 10%, var(--bg)); }
.demo__stage { margin-top: clamp(18px, 3vw, 28px); display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.panel { border-radius: 16px; padding: 18px; background: var(--bg); border: 1px solid var(--line); }
.panel__label { font-size: 13px; font-weight: 800; }
.panel--screen .panel__label { color: var(--screen-text); }
.panel--real .panel__label { color: var(--real-text); }
.panel__value { font-size: clamp(40px, 7vw, 72px); font-weight: 850; letter-spacing: -.035em; line-height: 1.05; margin-top: 4px; }
.panel__sub { font-size: 13px; color: var(--sub); }
.demo__run { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.demo__result { margin: 0; font-weight: 800; min-height: 1.6em; }
.demo__result.is-on { color: var(--screen-text); }
.demo__warn { color: var(--screen-text); font-size: 14px; font-weight: 700; margin: 8px 0 0; min-height: 1.4em; }
@media (max-width: 760px) { .demo__controls { grid-template-columns: 1fr 1fr; } .demo__presets { grid-column: 1 / -1; } }
@media (max-width: 420px) { .demo__stage { grid-template-columns: 1fr; } }

/* 기능 — 정의 목록(카드 반복 대신) */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(24px, 5vw, 64px); margin: 0; }
.features div { padding: 18px 0; border-top: 1px solid var(--line); }
.features dt { font-weight: 800; font-size: 17px; margin-bottom: 4px; }
.features dd { margin: 0; color: var(--sub); }
@media (max-width: 720px) { .features { grid-template-columns: 1fr; } }

/* 개인정보 */
.privacy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.privacy section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.privacy h3 { margin: 0 0 10px; font-size: 17px; }
.privacy ul { margin: 0; padding-left: 1.1em; color: var(--sub); }
.privacy li + li { margin-top: 6px; }
.privacy__more { margin-top: 18px; }
@media (max-width: 860px) { .privacy { grid-template-columns: 1fr; } }

/* FAQ */
.faq > * { max-width: 52em; }
.faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 800; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 13px; font-size: 22px; font-weight: 600; color: var(--sub); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--sub); }

/* 받기 띠 */
.get { background: var(--ink); color: #EEF2F8; border-radius: var(--radius-lg); padding: clamp(28px, 5vw, 56px); display: grid;
  grid-template-columns: 1.2fr auto; gap: 24px; align-items: center; }
.get h2 { color: #fff; margin: 0 0 8px; }
.get p { margin: 0; color: #B7C1D1; }
.get__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.get .btn--ghost { background: transparent; color: #fff; border-color: #3A4A66; }
@media (max-width: 760px) { .get { grid-template-columns: 1fr; } }

/* 꼬리말 */
.footer { padding: 36px 0 48px; color: var(--sub); font-size: 14px; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer a { color: var(--sub); }

/* 글 문서(방침·약관) */
.doc { max-width: 760px; margin: 0 auto; padding: clamp(32px, 6vw, 72px) var(--gutter) 24px; }
.doc h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.025em; line-height: 1.2; margin: 0 0 8px; }
.doc .meta { color: var(--sub); margin: 0 0 28px; }
.doc h2 { font-size: 20px; margin: 36px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.doc ul, .doc ol { padding-left: 1.2em; }
.doc li + li { margin-top: 8px; }
.doc p, .doc li { color: var(--text); }
.doc code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .92em; }

/* ── 모션·디테일(WEB-CRAFT §4-2 — jfeel-ai 기준, 의존성 0) ── */
body { overflow-x: clip; }
h1, h2 { text-wrap: balance; }
.btn { transition: transform .3s var(--ease-out), filter .3s, border-color .3s, box-shadow .3s; }
.btn:active { transform: scale(1.01, .97); }
.btn--primary:hover { transform: translateY(-1px); }
.duel { transition: transform .4s var(--ease-out), box-shadow .4s; }
@media (hover: hover) { .duel:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); } }
.js .rv { opacity: 0; transform: translateY(12px); }
.js .rv.in { opacity: 1; transform: none; transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
.hero h1 .ln { display: block; overflow: hidden; padding-block: .12em .22em; margin-block: -.12em -.22em; }
.hero h1 .ln > span { display: block; }
.js .hero h1 .ln > span { transform: translateY(110%); }
.js.ready .hero h1 .ln > span { transform: none; transition: transform 1.05s var(--ease-out); }
.js.ready .hero h1 .ln + .ln > span { transition-delay: .1s; }
@media (prefers-reduced-motion: reduce) {
  .js .rv, .js .hero h1 .ln > span { opacity: 1; transform: none; transition: none; }
  .duel, .btn { transition: none; }
}
