/* AHA — 토큰
   새벽 안개 #ECEAF3 · 먹보라 #221C3A · 심야 보라 #110E1C
   BLRI 홍조 #D9434B · SCI 호박 #C98012 · HCEI 새싹 #23875E · SSI 보라 #5B49C9 */
:root,
:root[data-theme="light"] {
  --bg: #ECEAF3;
  --ink: #221C3A;
  --muted: #565071;
  --rule: rgba(34, 28, 58, 0.16);
  --veil: rgba(236, 234, 243, 0.88);
  --veil-0: rgba(236, 234, 243, 0);
  --blri: #C13740;
  --sci: #A5680C;
  --hcei: #1E7752;
  --ssi: #5444BD;
  --focus: #5444BD;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #110E1C; --ink: #EEEAF7; --muted: #ADA6C4; --rule: rgba(238, 234, 247, 0.18);
    --veil: rgba(17, 14, 28, 0.86); --veil-0: rgba(17, 14, 28, 0);
    --blri: #FF7A7C; --sci: #FFBC5C; --hcei: #5ED8A0; --ssi: #A595FF; --focus: #FFBC5C;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #110E1C;
  --ink: #EEEAF7;
  --muted: #ADA6C4;
  --rule: rgba(238, 234, 247, 0.18);
  --veil: rgba(17, 14, 28, 0.86);
  --veil-0: rgba(17, 14, 28, 0);
  --blri: #FF7A7C;
  --sci: #FFBC5C;
  --hcei: #5ED8A0;
  --ssi: #A595FF;
  --focus: #FFBC5C;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-anchor: none; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.72;
  letter-spacing: -0.005em;
  word-break: keep-all;
  overflow-wrap: break-word;
  transition: background-color 0.4s ease, color 0.4s ease;
}
h1, h2, .acr, .tagline, .mark, .question { font-weight: 250; letter-spacing: -0.025em; }
h3 { font-weight: 450; letter-spacing: -0.015em; }
h2, h3 { text-wrap: balance; }
p { margin: 0 0 1em; }

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  display: block;
  z-index: 0;
  background: var(--bg);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 30;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

/* ── 머리 ── */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; gap: 20px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: linear-gradient(var(--veil) 0%, var(--veil-0) 100%);
}
.mark {
  font-size: 24px; font-weight: 300; letter-spacing: 0.04em; color: var(--ink); text-decoration: none;
  line-height: 1; padding: 6px 2px;
}
.chapters { margin-left: auto; }
.chapters ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.chapters a {
  display: block; padding: 7px 12px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-size: 15px; line-height: 1.3;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.chapters a:hover { color: var(--ink); }
.chapters a[aria-current="true"] {
  color: var(--ink);
  background: color-mix(in srgb, var(--lab, var(--ink)) 16%, transparent);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--lab, var(--ink)) 55%, transparent);
}
.theme-btn {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--rule); background: var(--veil); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.theme-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-btn .i-moon { fill: currentColor; stroke: none; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
/* 언어 전환 한국어 / English (msg 7136) — 테마 단추 옆 작은 알약 */
.lang-switch {
  flex: none; display: flex; align-items: center; gap: 2px; height: 44px; padding: 3px;
  border-radius: 999px; border: 1.5px solid var(--rule); background: var(--veil);
}
.lang-switch[hidden] { display: none; }
.lang-switch button {
  font: inherit; font-size: 13px; font-weight: 400; letter-spacing: 0; line-height: 1;
  height: 100%; min-width: 44px; padding: 0 11px; border: 0; border-radius: 999px; cursor: pointer;
  color: var(--muted); background: transparent;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { color: var(--ink); background: color-mix(in srgb, var(--ink) 13%, transparent); font-weight: 500; cursor: default; }
.lang-switch button:focus-visible { outline-offset: 1px; }

/* ── 장면 공통 ── */
main { position: relative; z-index: 1; }
.scene {
  position: relative;
  min-height: 135vh;
  display: flex; align-items: center;
  padding: 16vh clamp(20px, 7vw, 120px);
}
.copy { max-width: 31rem; position: relative; }
.scene.right .copy { margin-left: auto; }
.copy p, .copy li { text-shadow: 0 0 14px var(--bg), 0 0 3px var(--bg); }

h2 { font-size: clamp(32px, 3.5vw, 48px); line-height: 1.3; margin: 0 0 0.75em; }
h3 { font-size: 21px; line-height: 1.45; margin: 0 0 0.35em; }

/* ── 첫 화면 ── */
.hero { min-height: 100vh; min-height: 100svh; align-items: flex-end; padding-bottom: 14vh; }
.hero .copy { max-width: 40rem; }
.metaphor { font-size: 14px; font-weight: 300; color: var(--muted); margin-bottom: 18px; }
.wordmark {
  font-size: clamp(120px, 22vw, 320px);
  font-weight: 150; line-height: 0.86; margin: 0 0 0.14em -0.05em;
  letter-spacing: -0.04em; display: flex;
}
.wordmark span { display: inline-block; }
/* msg 7126: AHA 오른쪽에 같은 글꼴로 아주 작게 «project1.0» · 바로 아래 작은 영문 설명 · 한글 이름은 크게 */
.wordmark .ver { align-self: flex-end; font-size: clamp(18px, 2.5vw, 38px); font-weight: 200; letter-spacing: -0.01em; text-transform: uppercase; line-height: 1; margin: 0 0 calc(clamp(120px, 22vw, 320px) * 0.07) 0.5em; color: var(--muted); white-space: nowrap; }
.hero .wordmark { margin-bottom: 0.03em; }
@media (max-width: 360px) { .wordmark .ver { font-size: 14px; margin-left: 0.35em; } }
/* msg 7127: 시대 제목은 사장님이 정한 세 줄 그대로(줄 안에서 끊기지 않게) */
#era .copy { max-width: 38rem; }
.era-title { font-size: clamp(19px, 6vw, 44px); text-wrap: wrap; }
.era-title span { white-space: nowrap; }
.hero .hero-en { margin: 0 0 0.9em 0.1em; }
.hero .hero-ko { font-size: clamp(34px, 4.4vw, 60px); font-weight: 300; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 0.45em; }
.tagline { font-size: clamp(26px, 2.6vw, 36px); font-weight: 300; line-height: 1.3; margin-bottom: 0.2em; }
.en-name { font-size: 15px; font-weight: 300; color: var(--muted); letter-spacing: 0.04em; margin-bottom: 1.1em; }
.lead { font-size: 20px; font-weight: 300; margin-bottom: 1.4em; }
.hint {
  font-size: 15px; font-weight: 300; color: var(--muted); max-width: 26rem;
  padding-left: 14px; border-left: 2px solid var(--rule);
}

/* ── 존재 이유 ── */
.reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.reasons li { position: relative; padding-left: 26px; }
.reasons li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--lab);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--lab) 18%, transparent);
}
.reasons p { margin: 0; color: var(--ink); }
/* 교육의 혁신 — 둘로 나눈 하위 항목 (2026-10-07 msg 7121) */
.reasons .sub { margin-top: 6px; padding-left: 14px; border-left: 1px solid color-mix(in srgb, var(--lab) 45%, transparent); display: grid; gap: 4px; }
.reasons .sub h4 { margin: 8px 0 0; font-size: 0.95em; font-weight: 500; color: var(--lab); }
.reasons .sub h4:first-child { margin-top: 2px; }

.lab-links { list-style: none; margin: 1.2em 0 0; padding: 0; display: grid; gap: 10px; }
.lab-links a {
  display: inline-flex; align-items: baseline; gap: 12px;
  color: var(--ink); text-decoration: none; padding: 4px 0;
  border-bottom: 1.5px solid color-mix(in srgb, var(--lab) 45%, transparent);
}
.lab-links a:hover { border-bottom-color: var(--lab); }
.lab-links b { font-weight: 300; letter-spacing: 0.02em; color: var(--lab); font-size: 20px; min-width: 3.4em; }

/* ── 연구소 ── */
.acr {
  font-size: clamp(76px, 10vw, 148px);
  font-weight: 150; line-height: 0.9; margin: 0 0 0.16em -0.04em; letter-spacing: -0.03em;
  color: color-mix(in srgb, var(--lab) calc(30% + var(--on, 1) * 70%), transparent);
}
.lab .en-name { margin-top: -0.6em; }
.touch { margin-top: 1.6em; }
.touch.center { text-align: center; }
.act {
  font: inherit; font-size: 17px; cursor: pointer;
  min-height: 48px; padding: 10px 24px; border-radius: 999px;
  color: var(--ink);
  background: color-mix(in srgb, var(--lab) 12%, var(--bg));
  border: 2px solid var(--lab);
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.act:hover { background: color-mix(in srgb, var(--lab) 24%, var(--bg)); }
.act:active { transform: scale(0.97); }
.act:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.act:focus-visible { outline-color: var(--lab); }
.touch-note { font-size: 15px; font-weight: 300; color: var(--muted); margin-top: 0.8em; min-height: 3.4em; }

/* ── 하나의 방향 ── */
.one { flex-direction: column; justify-content: flex-start; text-align: center; align-items: center; padding-top: 16vh; padding-bottom: 12vh; min-height: 200vh; }
.one .copy.answer { margin-top: 62vh; }
.one .copy { max-width: 42rem; margin: 0 auto; }
.one .copy::before {
  content: ""; position: absolute; inset: -8% -14%; z-index: -1;
  background: radial-gradient(closest-side, var(--veil) 55%, var(--veil-0));
}
.pre { color: var(--muted); font-weight: 300; }
.question { font-size: clamp(34px, 4.6vw, 64px); line-height: 1.32; margin: 0.3em 0 0.8em; }
.gifts { list-style: none; padding: 0; margin: 0.4em 0 1.4em; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; }
.gifts li {
  padding: 6px 16px; border-radius: 999px; font-size: 16px;
  background: color-mix(in srgb, var(--lab) 12%, var(--bg));
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--lab) 50%, transparent);
}
.closing { font-size: 20px; font-weight: 300; line-height: 1.75; }

.foot {
  position: relative; z-index: 1; text-align: center;
  padding: 40px 20px 56px; font-size: 14px; color: var(--muted);
}
.foot p { margin: 0; }
.nojs { position: relative; z-index: 2; text-align: center; padding: 16px; }

/* 캔버스가 아예 없을 때(장 생성 실패) 바탕에 은은한 색 */
:root[data-field="none"] body {
  background-image: radial-gradient(60% 50% at 75% 30%, color-mix(in srgb, var(--ssi) 18%, transparent), transparent),
    radial-gradient(50% 45% at 20% 80%, color-mix(in srgb, var(--blri) 14%, transparent), transparent);
  background-attachment: fixed;
}
:root[data-field="none"] #field { display: none; }

/* ── 좁은 화면 ── */
@media (max-width: 1100px) {
  .chapters { display: none; }
  .lang-switch { margin-left: auto; }
  .lang-switch[hidden] + .theme-btn { margin-left: auto; }
}
@media (max-width: 360px) {
  .top { gap: 10px; }
  .lang-switch button { padding: 0 8px; font-size: 12.5px; }
}
/* 영어판: 라틴 글자는 한글보다 자간을 덜 좁힌다 */
:root[lang="en"] body { letter-spacing: 0; }
:root[lang="en"] h2, :root[lang="en"] .tagline, :root[lang="en"] .question { letter-spacing: -0.015em; }
@media (max-width: 760px) {
  body { font-size: 17px; }
  .scene { min-height: 150vh; align-items: flex-end; padding: 0 16px 16vh; }
  .scene .copy, .scene.right .copy {
    margin: 0; max-width: none; width: 100%;
    background: var(--veil); border-radius: 22px; padding: 24px 20px 14px;
  }
  .copy p, .copy li { text-shadow: none; }
  .hero { min-height: 100svh; padding-bottom: 8vh; }
  .hero .copy { background: none; padding: 0; }
  .hero .copy p { text-shadow: 0 0 12px var(--bg), 0 0 3px var(--bg); }
  .one { padding-top: 12vh; min-height: 200vh; align-items: stretch; }
  .one .copy.answer { margin-top: 70vh; }
  .one .copy::before { display: none; }
  .acr { font-size: 72px; }
  .question { font-size: 30px; }
  .closing { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
:root[lang="en"] .lead, :root[lang="en"] .hint, :root[lang="en"] .gifts li { text-wrap: balance; }
