/* ============================================================
   아이오코딩 — scenes
   ============================================================ */

/* ---------- scroll progress rail ---------- */
.scroll-rail { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; background: transparent; }
.scroll-rail__fill { display: block; height: 100%; width: 0%; background: var(--orange); }

/* ---------- NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 120;
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
  color: var(--navy);
}
.nav__inner { display: flex; align-items: center; gap: 2rem; height: 76px; }
.nav.is-stuck { background: rgba(252,250,245,.82); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.nav.on-dark { color: #fff; }
.nav.on-dark.is-stuck { background: rgba(14,33,67,.7); box-shadow: 0 1px 0 var(--line-navy); }

.brand { display: flex; align-items: center; gap: .7rem; }
.brand__mark { width: 44px; height: 44px; flex: none; }
.brand__txt strong { display: block; font-size: 1.06rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.brand__dot { color: var(--orange); }
.brand__txt small { display: block; font-size: .58rem; letter-spacing: .14em; opacity: .6; margin-top: 3px; }

.nav__links { display: flex; gap: 1.7rem; margin-left: auto; font-size: .92rem; font-weight: 600; }
.nav__links a { position: relative; padding: 4px 0; opacity: .82; transition: opacity .3s; }
.nav__links a:hover { opacity: 1; }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--orange); transition: width .3s var(--ease); }
.nav__links a:hover::after { width: 100%; }
.nav__cta { padding: .62em 1.25em; font-size: .9rem; }

/* ============================================================
   THE I.O LOGO MARK (real brand logo, recolored)
   ============================================================ */
.stage { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }

.io-mark { width: clamp(240px, 32vw, 480px); height: auto; aspect-ratio: 1; overflow: visible; }
.io-mark__g { transform-box: fill-box; transform-origin: center; }
.io-mark .f { transition: transform .9s var(--ease-io), opacity .8s var(--ease); transform-box: fill-box; }

/* gentle idle float handled in JS for hero; CSS float for mini marks */
#hero-mark { will-change: transform; }
@keyframes ioFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-14px) rotate(-1deg); }
}
.io-mark > svg, .brand__mark > svg { width: 100%; height: 100%; display: block; overflow: visible; }
/* nav brand mark on dark scenes — lighten navy faces (orange stays) */
.nav.on-dark .brand__mark .f-top  { fill: #5B82B8; }
.nav.on-dark .brand__mark .f-left { fill: #2A4A78; }
.nav.on-dark .brand__mark .f-stem { fill: #6E93C4; }

/* entrance: faces assemble */
.io-mark .f { opacity: 0; }
.io-mark.in .f { opacity: 1; }
.io-mark.in .f-top   { transition-delay: .05s; }
.io-mark.in .f-left  { transition-delay: .14s; }
.io-mark.in .f-right { transition-delay: .22s; }
.io-mark.in .f-stem  { transition-delay: .32s; }
.io-mark.in .f-itop  { transition-delay: .40s; }
.io-mark:not(.in) .f-top   { transform: translateY(-60px); }
.io-mark:not(.in) .f-left  { transform: translate(-50px, 26px); }
.io-mark:not(.in) .f-right { transform: translate(50px, 26px); }
.io-mark:not(.in) .f-stem  { transform: translateY(70px); }
.io-mark:not(.in) .f-itop  { transform: translateY(40px); }

/* mini mark (contact / nav use injected SVG with same classes) */
.io-mark--mini { width: clamp(130px, 17vw, 210px); animation: ioFloat 7s ease-in-out infinite; }
.io-mark--mini .f { opacity: 1; }

/* ============================================================
   SCENE base
   ============================================================ */
.scene { position: relative; min-height: 100vh; display: flex; align-items: center; padding-block: clamp(90px, 12vh, 160px); }
.scene.dark { background: var(--navy); color: #fff; }
.scene.dark .section-num { color: rgba(255,255,255,.5); }
.scene em { color: var(--orange); font-style: normal; }

/* ---------- HERO (navy by default — premium first impression) ---------- */
.hero { min-height: 100svh; overflow: hidden; padding-block: clamp(96px, 12vh, 150px) clamp(60px, 9vh, 110px); background: var(--navy); color: #fff; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.grid-floor {
  position: absolute; inset: 50% -20% -20% -20%;
  background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 72px 72px;
  transform: perspective(680px) rotateX(66deg); transform-origin: top;
  -webkit-mask-image: linear-gradient(transparent, #000 36%, transparent); mask-image: linear-gradient(transparent, #000 36%, transparent);
  opacity: .12;
}
.hero__glow { position: absolute; top: 40%; left: 66%; width: 56vw; height: 56vw; transform: translate(-50%,-50%); background: radial-gradient(circle, rgba(255,90,31,.16), transparent 62%); filter: blur(8px); }

.hero__inner {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center; width: 100%;
}
.hero__copy { position: relative; z-index: 3; min-width: 0; }
.hero__title {
  font-size: clamp(2.5rem, 4.8vw, 4.6rem); margin: 1.2rem 0 1.5rem;
  letter-spacing: -0.035em; line-height: 1.05;
}
.hero__title .ln { display: block; }
.hero__sub { font-size: var(--fs-lead); max-width: 42ch; color: rgba(255,255,255,.72); line-height: 1.6; }
.hero__sub b { color: #fff; font-weight: 700; }
.hero__sub-lite { display: none; }   /* concise variant shown on phones only */
.hero__cta { display: flex; gap: .9rem; margin-top: 2.2rem; flex-wrap: wrap; }
.hero__levels {
  display: flex; flex-wrap: wrap; gap: .5rem .65rem; margin-top: 2.2rem; list-style: none;
}
.hero__levels li {
  font-size: .82rem; font-weight: 600; color: rgba(255,255,255,.8);
  padding: .42em .9em; border: 1px solid rgba(255,255,255,.16); border-radius: 999px;
  background: rgba(255,255,255,.06);
}
.hero__levels li:last-child { color: var(--navy); background: var(--orange-soft); border-color: var(--orange-soft); }

/* ---- live "thinking order" demo ---- */
.hero__demo { position: relative; z-index: 3; min-width: 0; display: flex; flex-direction: column; align-items: stretch; }
.demo {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 40px 90px -50px rgba(14,33,67,.55), 0 4px 14px -8px rgba(14,33,67,.18);
  overflow: hidden; width: 100%;
}
.demo__bar { display: flex; align-items: center; gap: 7px; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); background: var(--ivory); }
.demo__dot { width: 11px; height: 11px; border-radius: 50%; background: #D9D1C0; }
.demo__dot:nth-child(2){ background: #E7C98C; } .demo__dot:nth-child(3){ background: #E8B89C; }
.demo__file { margin-left: auto; font-size: .78rem; font-weight: 700; color: var(--navy-soft); letter-spacing: -.01em; white-space: nowrap; }
.demo__file span { color: var(--orange); }

.demo__row { display: flex; align-items: flex-start; gap: .7rem; padding: 1.1rem 1.2rem; }
.demo__row--in { border-bottom: 1px dashed var(--line); }
.demo__tag {
  flex: none; font-size: .68rem; font-weight: 800; letter-spacing: .05em;
  padding: .3em .6em; border-radius: 7px; background: var(--navy); color: #fff; margin-top: .15em;
}
.demo__tag--out { background: var(--orange); }
.demo__prompt { font-size: clamp(.98rem, 1.3vw, 1.12rem); font-weight: 600; color: var(--navy); line-height: 1.5; }
.demo__result { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1.05rem; color: var(--navy); display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; min-height: 1.5em; }
.demo__result b { font-family: var(--sans); font-size: .82rem; padding: .25em .6em; border-radius: 7px; background: rgba(31,157,99,.12); color: #1f9d63; opacity: 0; transform: scale(.8); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.demo__result b.in { opacity: 1; transform: none; }

/* think steps (plain-language reasoning, for non-coders) */
.think { list-style: none; padding: .9rem 1.2rem .3rem; display: flex; flex-direction: column; gap: .55rem; }
.think__step { display: flex; align-items: flex-start; gap: .7rem; opacity: .35; transform: translateX(-6px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.think__step.lit { opacity: 1; transform: none; }
.think__n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ivory); color: var(--navy-soft); font-size: .74rem; font-weight: 800; display: grid; place-items: center; margin-top: 1px; transition: background .4s var(--ease), color .4s var(--ease); }
.think__step.lit .think__n { background: var(--orange); color: #fff; }
.think__t b { font-size: .92rem; font-weight: 800; color: var(--navy); }
.think__t p { font-size: .8rem; color: var(--navy-soft); line-height: 1.45; margin-top: 1px; }
.think__code { margin: .3rem 1.2rem 0; }
.think__codetag { display: block; font-size: .68rem; font-weight: 700; color: var(--navy-soft); margin-bottom: .35rem; letter-spacing: -.01em; }
/* Code box: NO wrap → always exactly 5 lines at every viewport width, so the
   height is deterministic and the empty state already reserves the final
   height. This is what stops the hero-demo carousel from changing height
   mid-animation — the root cause of the mobile "scroll keeps jumping" bug. */
.think__code .demo__code { min-height: 12em; border-radius: 12px; white-space: pre; overflow: hidden; }
.think__take { padding: .9rem 1.2rem 1.1rem; font-size: .82rem; font-weight: 700; color: var(--navy); text-align: center; }
.think__take em { color: var(--orange); font-style: normal; }

.demo__steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; padding: 1rem 1.2rem; list-style: none; background: var(--ivory); }
.demo__steps li {
  display: flex; flex-direction: column; gap: .25rem;
  font-size: .78rem; font-weight: 700; color: var(--navy-soft);
  padding: .55rem .65rem; border-radius: 10px; background: rgba(255,255,255,.55);
  border: 1px solid transparent; transition: all .35s var(--ease);
}
.demo__steps li i { font-style: normal; font-size: .64rem; font-weight: 800; color: #B7AE9A; opacity: .8; }
.demo__steps li.on { background: #fff; color: var(--navy); border-color: var(--orange); box-shadow: 0 6px 16px -10px rgba(255,106,43,.7); }
.demo__steps li.on i { color: var(--orange); opacity: 1; }

.demo__code {
  margin: 0; padding: 1.2rem 1.3rem; min-height: 9.5em;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: clamp(.82rem, 1.05vw, .95rem);
  line-height: 1.75; color: #44516a; white-space: pre-wrap; word-break: break-word;
  background:
    linear-gradient(var(--paper-2), var(--paper-2)) padding-box;
  tab-size: 2;
}
.demo__code .kw { color: var(--orange-deep); font-weight: 700; }
.demo__code .fn { color: #2563c9; font-weight: 700; }
.demo__code .nu { color: #1f9d63; }
.demo__code .cm { color: #9aa3b2; font-style: italic; }
.demo__code .cur { display: inline-block; width: .55em; height: 1.05em; background: var(--orange); vertical-align: -2px; animation: caret .9s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.demo__slogan { margin-top: 1.3rem; text-align: center; font-size: clamp(1rem, 1.5vw, 1.2rem); font-weight: 700; color: #fff; letter-spacing: -.02em; }
.demo__slogan em { color: var(--orange-soft); font-style: normal; }

/* hero demo carousel */
/* 배경 투명 유지(히어로 네이비가 그대로 비침). 인접 패널(흰 카드)이 양옆에
   비집고 나와 "흰 선"처럼 보이던 문제는:
   ① 비활성 패널을 opacity:0 으로 숨겨 흰 가장자리 자체를 없애고,
   ② 전환 중에는 들어오는 패널만 잠깐 보이도록 .is-anim 동안 모두 표시,
   ③ 트랙 이동은 정수 px(translate3d) 스냅(scroll.js)으로 경계 어긋남 제거. */
.demo-vp { position: relative; overflow: hidden; border-radius: 20px; }
.demo-track { display: flex; will-change: transform; transition: transform .7s var(--ease-io); }
.demo-track > .demo { flex: 0 0 100%; width: 100%; display: block; align-self: flex-start; opacity: 0; transition: opacity .25s var(--ease); }
.demo-track > .demo.is-active { opacity: 1; }
.demo-track.is-anim > .demo { opacity: 1; }   /* 전환 중에는 모두 보여 자연스럽게 슬라이드 */
.demo-dots { display: flex; justify-content: center; gap: 8px; margin-top: 1rem; }
.demo-dot { width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.3); transition: all .35s var(--ease); padding: 0; }
.demo-dot.on { width: 22px; background: var(--orange); }

/* ---- MAP demo: growth roadmap ---- */
.rmap { padding: 1.5rem 1.5rem 1.6rem; }
.rmap__track { list-style: none; position: relative; display: flex; flex-direction: column; gap: 1.05rem; padding-left: 0; }
.rmap__rail, .rmap__fill { position: absolute; left: 15px; top: 13px; bottom: 13px; width: 2px; transform: translateX(-50%); border-radius: 3px; z-index: 0; }
.rmap__rail { background: var(--line); }
.rmap__fill { bottom: auto; height: 0; background: linear-gradient(180deg, var(--orange), var(--orange-deep)); transition: height .5s var(--ease); z-index: 0; }
.rmap__stop { position: relative; display: flex; align-items: center; gap: .95rem; padding-left: 0; opacity: .4; transition: opacity .4s var(--ease); z-index: 1; }
.rmap__stop.lit, .rmap__stop.done { opacity: 1; }
.rmap__info { transform: translateX(-5px); transition: transform .4s var(--ease); }
.rmap__stop.lit .rmap__info, .rmap__stop.done .rmap__info { transform: none; }
.rmap__node { position: relative; z-index: 2; flex: none; width: 26px; height: 26px; margin-left: 2px; border-radius: 50%; background: #fff; border: 3px solid var(--line); transition: border-color .4s var(--ease), background .4s var(--ease), box-shadow .4s var(--ease); }
.rmap__stop.lit .rmap__node, .rmap__stop.done .rmap__node { border-color: var(--orange); }
.rmap__stop.lit .rmap__node { box-shadow: 0 0 0 5px rgba(255,90,31,.16); }
.rmap__stop.done .rmap__node { background: var(--orange); }
.rmap__info b { display: block; font-size: 1.12rem; font-weight: 800; color: var(--navy); letter-spacing: -.01em; }
.rmap__info small { font-size: .82rem; color: var(--navy-soft); }
.rmap__stop--goal .rmap__node { width: 30px; height: 30px; margin-left: 0; }
.rmap__stop--goal.done .rmap__node { background: var(--orange); box-shadow: 0 8px 20px -8px rgba(255,90,31,.8); }
.rmap__stop--goal .rmap__info b { color: var(--orange-deep); }
.rmap__cap { margin-top: 1.3rem; padding-top: 1.1rem; border-top: 1px solid var(--line); font-size: 1rem; font-weight: 600; color: var(--navy-soft); }
.rmap__cap em { color: var(--orange); font-style: normal; font-weight: 800; }

/* ---- REPORT demo: diagnostic report ---- */
.drep { padding: 1.4rem 1.5rem 1.6rem; }
.drep__head { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.2rem; }
.drep__head p { font-size: .98rem; font-weight: 600; color: var(--navy-soft); }
.drep__head b { color: var(--navy); font-weight: 800; }
.drep__metrics { list-style: none; display: flex; flex-direction: column; gap: .9rem; }
.drep__metrics li { display: grid; grid-template-columns: 84px 1fr 34px; align-items: center; gap: .8rem; opacity: .35; transition: opacity .4s var(--ease); }
.drep__metrics li.lit { opacity: 1; }
.drep__k { font-size: .85rem; font-weight: 600; color: var(--navy-soft); }
.drep__bar { height: 9px; border-radius: 999px; background: var(--ivory); overflow: hidden; }
.drep__bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--orange), var(--orange-deep)); transition: width .9s var(--ease); }
.drep__metrics li.lit .drep__bar i { width: var(--w); }
.drep__v { font-size: 1.05rem; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; text-align: right; }
.drep__out { display: flex; align-items: center; gap: .7rem; margin-top: 1.3rem; padding: .9rem 1rem; border-radius: 12px; background: rgba(255,90,31,.08); border: 1px solid rgba(255,90,31,.2); opacity: .35; transform: translateY(4px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.drep__out.lit { opacity: 1; transform: none; }
.drep__out b { font-size: 1rem; font-weight: 800; color: var(--navy); }
/* hero CTA ghost button reads on the navy hero */
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.hero .btn-ghost:hover { background: #fff; color: var(--navy); }

/* entrance — SAFE: opacity is ALWAYS 1 (never strand content if a timeline is
   throttled). Only a subtle transform rise transitions in. */
.hero.js-anim .hero__copy > *, .hero.js-anim .hero__demo { transform: translateY(20px); }
.hero.js-anim.kick .hero__copy > *, .hero.js-anim.kick .hero__demo {
  transform: none;
  transition: transform .8s var(--ease);
}
.hero.js-anim.kick .hero__copy .hero__title { transition-delay: .1s; }
.hero.js-anim.kick .hero__copy .hero__sub   { transition-delay: .2s; }
.hero.js-anim.kick .hero__copy .hero__cta   { transition-delay: .3s; }
.hero.js-anim.kick .hero__copy .hero__levels { transition-delay: .4s; }
.hero.js-anim.kick .hero__demo { transition-delay: .25s; }

/* desktop: two columns */
@media (min-width: 1024px) {
  .hero__inner { grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); gap: clamp(3rem, 5vw, 6rem); }
}

.hero__scroll { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: .64rem; letter-spacing: .3em; color: rgba(255,255,255,.55); }
.hero__scroll i { width: 1px; height: 40px; background: rgba(255,255,255,.25); position: relative; overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; inset: 0; background: var(--orange); animation: scrolldot 1.8s var(--ease) infinite; }
@keyframes scrolldot { 0% { transform: translateY(-100%); } 60%,100% { transform: translateY(100%); } }

/* ---------- PROBLEM ---------- */
.problem { background: var(--paper); overflow: hidden; }
.problem__inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem) clamp(2rem, 5vw, 4.5rem); align-items: center; grid-template-areas: "head worries" "answer answer"; }
.problem__head { grid-area: head; max-width: 52ch; position: relative; z-index: 3; }
.problem .worries { grid-area: worries; }
/* 진단 시스템 답변 — 걱정의 벽 아래 전체 폭, 가운데 정렬로 메시지 집중 */
.problem__answer { grid-area: answer; max-width: 760px; margin: clamp(1rem, 3vw, 2.4rem) auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.problem__answer-lead { font-size: var(--fs-lead); color: var(--muted); line-height: 1.65; max-width: 52ch; }
.problem__answer-lead b { color: var(--navy); font-weight: 700; }
.problem__answer-key { font-size: clamp(1.5rem, 3.4vw, 2.4rem); font-weight: 800; color: var(--navy); letter-spacing: -.025em; line-height: 1.3; }
.problem__answer-key em { color: var(--orange); font-style: normal; }
.problem__answer-sub { font-size: 1.02rem; color: var(--muted); line-height: 1.7; max-width: 50ch; }
.problem__answer-sub b { color: var(--navy); font-weight: 700; }
.problem__cta { margin-top: .8rem; }
.problem__cta-note { font-size: .88rem; color: var(--navy-soft); }
@media (max-width: 880px) {
  .problem__answer-sub { max-width: 100%; }
}
.problem__title { font-size: var(--fs-h1); margin: 1rem 0 1.3rem; }
.problem__lead { font-size: var(--fs-lead); color: var(--muted); max-width: 44ch; }
.problem__lead b { color: var(--navy); }
/* scatter field is its OWN column on the right — never overlaps the heading */
.scatter { position: relative; height: clamp(300px, 42vh, 460px); pointer-events: none; }
.frag {
  position: absolute; left: var(--x); top: var(--y);
  font-family: ui-monospace, monospace; font-weight: 600; font-size: clamp(.85rem, 1.3vw, 1.2rem);
  padding: .45em .85em; border-radius: 12px; white-space: nowrap;
  background: #fff; color: var(--navy); border: 1px solid var(--line);
  box-shadow: 0 18px 40px -22px rgba(14,33,67,.5);
  transform: rotate(var(--r));
  will-change: transform, opacity;
}
.frag--muted { color: var(--navy-soft); background: var(--ivory); box-shadow: none; opacity: .7; }
.frag--err { color: var(--orange-deep); border-color: rgba(232,71,15,.35); background: rgba(255,90,31,.06); }
.frag { transition: opacity .6s ease, transform .6s ease; }
.frag-hidden { opacity: 0 !important; transform: rotate(var(--r)) translateY(14px) scale(.9) !important; }
.frag-in { /* revealed */ }

/* worry wall — auto-scrolling parent/student concerns */
.worries { position: relative; height: clamp(360px, 52vh, 540px); overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent); }
/* gap 대신 각 항목 margin-bottom 으로 간격을 줘야 트랙 높이가 정확히 2배가 되어
   translateY(-50%) 가 딱 한 카피만큼 이동 → 이음새 없이 무한 루프 (gap 은 카피
   사이에 반-칸 어긋남을 만들어 "뚝" 끊겨 보였음) */
.worries__track { display: flex; flex-direction: column; gap: 0; will-change: transform; animation: worriesUp 40s linear infinite; }
@keyframes worriesUp { to { transform: translateY(-50%); } }
.worries:hover .worries__track { animation-play-state: paused; }
.worries .worry {
  font-family: var(--sans); font-weight: 600; font-size: clamp(.86rem, 1.1vw, 1rem); line-height: 1.45;
  color: var(--navy); background: #fff; border: 1px solid var(--line);
  padding: .9em 1.1em; border-radius: 16px 16px 16px 4px;
  box-shadow: 0 18px 40px -28px rgba(14,33,67,.45); align-self: flex-start; max-width: 94%;
  margin-bottom: .9rem;   /* 간격을 항목에 내장 → 무한 루프 이음새 정확히 맞춤 */
}
.worries .worry:nth-child(even) { align-self: flex-end; border-radius: 16px 16px 4px 16px; }
.worries .worry--accent { color: #fff; background: linear-gradient(150deg, #FF7A3D, var(--orange-deep)); border-color: transparent; box-shadow: 0 22px 46px -26px rgba(232,71,15,.6); }
.worries__fade { display: none; }
body[data-bg="white"] .worries .worry { background: #fff; border-color: #E7EAF0; }
body[data-bg="white"] .worries .worry--accent { background: linear-gradient(150deg, #FF7A3D, var(--orange-deep)); border-color: transparent; }
@media (prefers-reduced-motion: reduce) { .worries__track { animation: none !important; } }

/* ---------- DIAGNOSIS ---------- */
.diagnosis__head { max-width: 60ch; margin-bottom: clamp(3rem, 6vw, 5rem); }
.diagnosis__title { font-size: var(--fs-h1); margin: 1rem 0 1.2rem; }
.diagnosis__lead { font-size: var(--fs-lead); color: rgba(255,255,255,.66); max-width: 46ch; }
.gauges { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(1rem, 2.4vw, 2.2rem); }
.gauge { text-align: center; }
.gauge__ring {
  display: block; width: 100%; aspect-ratio: 1; max-width: 160px; margin: 0 auto .9rem; border-radius: 50%;
  background:
    radial-gradient(closest-side, var(--navy) 70%, transparent 71%),
    conic-gradient(var(--orange) calc(var(--v) * 1turn), rgba(255,255,255,.12) 0);
  position: relative;
}
.gauge__ring--warn { background:
    radial-gradient(closest-side, var(--navy) 70%, transparent 71%),
    conic-gradient(var(--sand) calc(var(--v) * 1turn), rgba(255,255,255,.12) 0); }
.gauge__num { display: block; font-size: clamp(1.6rem, 3.6vw, 2.6rem); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.gauge__num::after { content: "%"; font-size: .5em; margin-left: 2px; color: var(--orange); }
.gauge p { font-size: .9rem; color: rgba(255,255,255,.7); margin-top: .5rem; }

/* diagnosis 하단 메타 — 등급·기록·AI채점 (LMS 실제 측정 항목과 정합) */
.diagnosis__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .8rem 1.6rem; margin-top: clamp(2.4rem, 5vw, 3.6rem); padding-top: clamp(1.6rem, 3vw, 2.4rem); border-top: 1px solid var(--line-navy); }
.diagnosis__grade { display: inline-flex; align-items: baseline; gap: .5rem; font-size: 1.05rem; font-weight: 700; color: rgba(255,255,255,.82); }
.diagnosis__grade b { font-size: 2rem; font-weight: 800; color: var(--orange-soft); line-height: 1; }
.diagnosis__grade small { font-size: .72rem; color: rgba(255,255,255,.5); font-weight: 600; }
.diagnosis__metaitem { font-size: .92rem; color: rgba(255,255,255,.66); position: relative; padding-left: 1.1rem; }
.diagnosis__metaitem::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.diagnosis__metaitem b { color: #fff; font-weight: 700; }
body:is([data-bg="light"],[data-bg="white"]) .diagnosis__grade { color: var(--navy); }
body:is([data-bg="light"],[data-bg="white"]) .diagnosis__grade b { color: var(--orange); }
body:is([data-bg="light"],[data-bg="white"]) .diagnosis__grade small,
body:is([data-bg="light"],[data-bg="white"]) .diagnosis__metaitem { color: var(--muted); }
body:is([data-bg="light"],[data-bg="white"]) .diagnosis__metaitem b { color: var(--navy); }

/* ---------- ROADMAP ---------- */
.roadmap { background: var(--ivory); }
.roadmap__head { max-width: 60ch; margin-bottom: clamp(2rem, 5vw, 4rem); }
.roadmap__title { font-size: var(--fs-h1); margin: 1rem 0 1.2rem; }
.roadmap__lead { font-size: var(--fs-lead); color: var(--muted); max-width: 56ch; }
.roadmap__lead b { color: var(--navy); font-weight: 700; }

/* ---- 출발 시점별 레인 다이어그램: 같은 결승선, 다른 출발점/속도 ---- */
/* 출발 시점별 레인 — 각 레인이 그 시점에 맞는 도착점(맨 오른쪽 오렌지 구간)을 가짐.
   공통 결승선 대신 레인마다 다른 목표 라벨로 "현실적 목표가 다르다"를 표현. */
.rlanes { display: flex; flex-direction: column; gap: 1rem; }
.rlane { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 1rem; }
.rlane__tag { text-align: right; }
.rlane__tag b { display: block; font-size: 1.02rem; font-weight: 800; color: var(--navy); }
.rlane__tag small { font-size: .78rem; color: var(--navy-soft); }
.rlane__bar { display: flex; gap: 4px; height: 46px; }
.rseg { flex: var(--f, 1); min-width: 0; display: flex; align-items: center; justify-content: center; font-size: .74rem; font-weight: 700; color: #fff; border-radius: 8px; padding-inline: .5em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 8px 20px -14px rgba(14,33,67,.5); }
.rseg--a { background: #6E8FC4; }
.rseg--b { background: var(--navy-3); }
.rseg--c { background: var(--navy-2); }
.rseg--d { background: linear-gradient(120deg, var(--orange), var(--orange-deep)); }   /* 그 레인의 도착(목표) */
.rseg--gift { background: linear-gradient(120deg, #5E7CA8, #2C4A78); font-weight: 800; }
.rseg--fast { position: relative; }
.rseg--fast::after { content: "압축"; position: absolute; top: 3px; right: 5px; font-size: .54rem; font-weight: 800; opacity: .75; letter-spacing: .02em; }
/* 영재고 재학 레인 — 구분선 위 별도 강조 */
.rlane--gift { margin-top: .4rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.rlane--gift .rlane__tag b { color: var(--navy-2); }
.rlanes__note { margin-top: 1.4rem; font-size: .86rem; color: var(--navy-soft); line-height: 1.6; }
.rlanes__note b { color: var(--navy); font-weight: 700; }
@media (max-width: 680px) {
  .rlane { grid-template-columns: 1fr; gap: .5rem; margin-bottom: .4rem; }
  .rlane__tag { text-align: left; display: flex; align-items: baseline; gap: .5rem; }
  .rlane__tag small { font-size: .74rem; }
  .rlane__bar { height: 40px; }
  .rseg { font-size: .66rem; }
}
/* 초협소(폴드 커버 등): 막대 라벨이 끝에서 잘리지 않게 폰트 더 축소 +
   도착(목표) 세그먼트는 줄여도 두 줄까지 허용해 핵심 라벨이 보이게 */
@media (max-width: 380px) {
  .rseg { font-size: .58rem; padding-inline: .3em; letter-spacing: -.02em; }
  .rlane__bar { gap: 3px; height: 44px; }
  .rseg--d, .rseg--gift { white-space: normal; line-height: 1.1; text-align: center; }
}

/* ---------- GROWTH JOURNEY (horizontal pinned scroll) ---------- */
.journey { background: var(--navy); color: #fff; padding: 0; min-height: 0; display: block; }
.journey .eyebrow { color: var(--orange-soft); }
.journey .eyebrow::before { background: var(--orange-soft); }
.journey__title { font-size: clamp(2.2rem, 5vw, 4.4rem); margin: 1rem 0 1.2rem; }
.journey__lead { font-size: var(--fs-lead); color: rgba(255,255,255,.66); }

/* default (mobile / no-JS): swipeable carousel — content always accessible */
.hscroll { position: relative; }
.hscroll__pin { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hscroll__track {
  display: flex; gap: clamp(1.2rem, 3vw, 2.2rem);
  padding: clamp(5rem, 12vh, 8rem) var(--gut);
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; width: 100%;
  scrollbar-width: none;
}
.hscroll__track::-webkit-scrollbar { display: none; }

/* JS-upgraded desktop: pinned, JS drives translateX */
.journey.is-pinned .hscroll__pin { position: sticky; top: 0; height: 100svh; }
.journey.is-pinned .hscroll__track { overflow: visible; scroll-snap-type: none; will-change: transform; padding-block: 0; align-items: center; }

/* giant background watermark */
.hscroll__deco {
  position: absolute; top: clamp(1.5rem, 5vh, 4rem); left: clamp(1.5rem, 4vw, 4rem); z-index: 0;
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(5rem, 16vw, 14rem); line-height: .8; letter-spacing: -.04em;
  color: #fff; opacity: .05; pointer-events: none; white-space: nowrap;
}
/* horizontal progress within the pinned act */
.hscroll__prog { position: absolute; left: var(--gut); right: var(--gut); bottom: clamp(2rem, 5vh, 3.5rem); height: 2px; background: rgba(255,255,255,.12); z-index: 5; }
.hscroll__prog span { display: block; height: 100%; width: 0%; background: var(--grad); transition: width .15s linear; }
.journey:not(.is-pinned) .hscroll__prog { display: none; }

/* panels */
.hpanel { position: relative; z-index: 2; flex: none; scroll-snap-align: center; }
.hpanel--intro {
  width: min(86vw, 560px); display: flex; flex-direction: column; justify-content: center; gap: .4rem;
  padding-right: clamp(1rem, 4vw, 3rem);
}
.hpanel__hint { display: inline-flex; align-items: center; gap: .6em; margin-top: 1.6rem; font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: var(--orange-soft); }
.hpanel__hint svg { width: 1.3em; height: 1.3em; animation: hintNudge 1.6s var(--ease) infinite; }
@keyframes hintNudge { 0%,100% { transform: translateX(0); } 50% { transform: translateX(6px); } }

/* course cards */
.hcard {
  width: min(86vw, 880px); height: min(72vh, 620px);
  border-radius: clamp(20px, 3vw, 40px); padding: clamp(1.8rem, 4vw, 3.4rem);
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden; box-shadow: 0 40px 90px -50px rgba(0,0,0,.7);
}
.hcard__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: clamp(1.2rem, 2.5vw, 2rem); border-bottom: 1px solid currentColor; }
.hcard__top { border-color: rgba(255,255,255,.18); }
.hcard__num { font-family: var(--serif); font-style: italic; font-size: clamp(3.2rem, 8vw, 7rem); line-height: .8; letter-spacing: -.02em; }
.hcard__en { font-size: clamp(.9rem, 1.6vw, 1.4rem); font-weight: 800; letter-spacing: .16em; text-transform: uppercase; opacity: .5; text-align: right; padding-top: .5em; }
.hcard__body { margin-top: auto; }
.hcard__title { font-size: clamp(1.8rem, 4vw, 3.2rem); margin-bottom: clamp(.8rem, 1.6vw, 1.2rem); }
.hcard__title em { font-style: normal; }
.hcard__desc { font-size: clamp(1rem, 1.5vw, 1.35rem); line-height: 1.6; max-width: 46ch; opacity: .82; }
.hcard__glow { position: absolute; bottom: -20%; right: -10%; width: 60%; aspect-ratio: 1; border-radius: 50%; background: currentColor; opacity: .06; filter: blur(40px); pointer-events: none; }
.hcard .chips { margin-top: clamp(1.2rem, 2.5vw, 1.8rem); }

.hcard--navy   { background: #16294a; color: #fff; }
.hcard--navy .hcard__title em { color: var(--orange-soft); }
.hcard--navy .chips li { background: rgba(255,255,255,.1); color: #fff; }
.hcard--light  { background: var(--paper-2); color: var(--navy); }
.hcard--light .hcard__top { border-color: var(--line); }
.hcard--light .hcard__title em { color: var(--orange); }
.hcard--light .hcard__desc { opacity: .66; }
.hcard--light .chips li { background: var(--ivory); color: var(--navy); }
.hcard--orange { background: linear-gradient(150deg, #FF8A3D, var(--orange-deep)); color: #fff; }
.hcard--orange .hcard__top { border-color: rgba(255,255,255,.3); }
.hcard--orange .hcard__title em { color: #fff; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.hcard--orange .chips li { background: rgba(255,255,255,.18); color: #fff; }
.hcard--orange .hcard__desc b { color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; }
.chips li { font-size: .78rem; font-weight: 700; padding: .4em .8em; border-radius: 999px; background: var(--ivory); color: var(--navy); }
.chips--code li, .chips--algo li { font-family: ui-monospace, monospace; }

/* ---------- TEXTBOOK ---------- */
.textbook { background: var(--paper-2); }
.textbook__head { max-width: 60ch; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.textbook__title { font-size: var(--fs-h1); margin: 1rem 0 1.2rem; }
.textbook__lead { font-size: var(--fs-lead); color: var(--muted); max-width: 52ch; }

/* ---- textbook SERIES posters (vertical book covers, A4 ratio) ---- */
.covers { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 1.6vw, 1.6rem); }

.bk {
  position: relative; display: flex; flex-direction: column;
  aspect-ratio: 210 / 297;
  border-radius: 14px; overflow: hidden; background: #fff;
  border: 1px solid var(--line); box-shadow: 0 24px 50px -34px rgba(14,33,67,.5);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
  isolation: isolate; color: var(--navy);
  --bk: var(--orange); --bk-soft: #FFE9DC; --bk-deep: var(--orange-deep);
}
.bk:hover { transform: translateY(-8px); box-shadow: 0 44px 70px -34px rgba(14,33,67,.55); }

.bk__head { display: flex; align-items: center; gap: .5rem; padding: .9rem 1rem .2rem; z-index: 3; }
.bk__mark { width: 26px; height: 26px; flex: none; }
.bk__brand { display: flex; flex-direction: column; line-height: 1; }
.bk__brand b { font-size: .78rem; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.bk__brand i { font-size: .42rem; font-style: normal; letter-spacing: .14em; color: var(--navy-soft); margin-top: 2px; }

.bk__tag { padding: .7rem 1.1rem 0; font-size: .82rem; font-weight: 800; line-height: 1.35; color: var(--bk-deep); letter-spacing: -.01em; }
.bk__title { padding: .25rem 1.1rem 0; font-size: clamp(1.5rem, 2vw, 2rem); font-weight: 900; line-height: 1.04; color: var(--bk); letter-spacing: -.03em; }
.bk__title em { font-style: normal; font-size: .46em; font-weight: 700; color: var(--navy-soft); margin-left: .3em; letter-spacing: 0; }
.bk__topic { padding: .55rem 1.1rem 0; font-size: .78rem; line-height: 1.45; color: var(--navy-soft); font-weight: 600; }
.bk__grades { display: flex; flex-wrap: wrap; gap: .35rem; padding: .7rem 1.1rem .3rem; }
.bk__grade { font-size: .64rem; font-weight: 800; letter-spacing: .01em; padding: .35em .7em; border-radius: 999px; background: var(--bk); color: #fff; line-height: 1.2; }

.bk__art {
  position: relative; flex: 1; min-height: 130px; margin-top: .7rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bk-soft) 55%, #fff) 0%, var(--bk-soft) 100%);
  display: flex; align-items: flex-end; justify-content: center; overflow: hidden;
}
.bk__charwrap { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 100%; padding: 10px 0 0; }
.bk__mascot { width: auto; height: 96%; max-width: 86%; filter: drop-shadow(0 8px 14px rgba(14,33,67,.18)); }

/* code card overlapping the art */
.bk__code {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  width: calc(100% - 22px); margin: 0; z-index: 2;
  background: #0E1B30; color: #cdd6e6; border-radius: 9px; padding: .7rem .8rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .56rem; line-height: 1.55;
  white-space: pre; overflow: hidden; box-shadow: 0 10px 26px -12px rgba(0,0,0,.6);
}
/* block-coding labels (엔트리 기초) */
.bk__blocks { position: absolute; left: 14px; top: 14px; z-index: 2; display: flex; flex-direction: column; gap: 5px; }
.bk__blocks span { font-size: .58rem; font-weight: 800; color: #fff; padding: .32em .6em; border-radius: 6px; box-shadow: 0 4px 10px -4px rgba(0,0,0,.3); }
.bk__blocks span:nth-child(1){ background:#3FA66B; } .bk__blocks span:nth-child(2){ background:#3A86C8; }
.bk__blocks span:nth-child(3){ background:#7E5BD0; } .bk__blocks span:nth-child(4){ background:#E08A2B; }
.bk__blocks span:nth-child(5){ background:#D9534F; }

.bk__chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: .2rem; padding: .7rem .5rem .8rem; background: #fff; z-index: 3; }
.bk__chip { display: flex; flex-direction: column; align-items: center; gap: .25rem; text-align: center; }
.bk__chip svg { width: 19px; height: 19px; color: var(--bk); }
.bk__chip span { font-size: .56rem; font-weight: 700; color: var(--navy-soft); line-height: 1.1; word-break: keep-all; }

/* ---- per-theme colors ---- */
.bk--green  { --bk:#3FA66B; --bk-deep:#2E8A55; --bk-soft:#E3F3E9; }
.bk--amber  { --bk:#E8923A; --bk-deep:#CC7620; --bk-soft:#FCEEDD; }
.bk--violet { --bk:#7E5BD0; --bk-deep:#6442B5; --bk-soft:#EEE8FA; }
.bk--navy   { --bk:#2C5AA0; --bk-deep:#1F4480; --bk-soft:#E5ECF7; }
.bk--blue   { --bk:#2F7FB5; --bk-deep:#216592; --bk-soft:#E2EFF8; }
.bk--teal   { --bk:#1F6F8B; --bk-deep:#155467; --bk-soft:#E0EEF2; }
.bk--mint   { --bk:#2BA39B; --bk-deep:#1E847D; --bk-soft:#E0F2F0; }
.bk--orange { --bk:#E8762B; --bk-deep:#CC5E18; --bk-soft:#FCE9DC; }
.bk--coral  { --bk:#E5604B; --bk-deep:#C7472F; --bk-soft:#FBE6E1; }
.bk--gold   { --bk:#C79234; --bk-deep:#A6751F; --bk-soft:#F7EDD7; }
.bk--red    { --bk:#D34B3C; --bk-deep:#B23829; --bk-soft:#FAE3E0; }
.bk--sky    { --bk:#2E73C8; --bk-deep:#1F58A0; --bk-soft:#E2EDFA; }
.bk--gift   { --bk:#5E7CA8; --bk-deep:#46618C; --bk-soft:#1A2C4A; background:#0C1A30; border-color:transparent; color:#fff; }
.bk--gift .bk__head { background: rgba(255,255,255,.03); }
.bk--gift .bk__brand b { color:#fff; } .bk--gift .bk__brand i { color: rgba(255,255,255,.5); }
.bk--gift .bk__tag { color: var(--sand-soft); }
.bk--gift .bk__title { color:#fff; } .bk--gift .bk__title em { color: rgba(255,255,255,.5); }
.bk--gift .bk__topic { color: rgba(255,255,255,.6); }
.bk--gift .bk__grade { background: rgba(255,255,255,.14); color:#fff; }
.bk--gift .bk__art { background: linear-gradient(180deg, #16294a, #0C1A30); }
.bk--gift .bk__chips { background:#0C1A30; }
.bk--gift .bk__chip span { color: rgba(255,255,255,.66); }
.bk--gift .bk__chip svg { color: var(--orange-soft); }

/* ---------- REPORT ---------- */
.report { background: var(--ivory); }
.report__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.report__title { font-size: var(--fs-h1); margin: 1rem 0 1.2rem; }
.report__lead { font-size: var(--fs-lead); color: var(--muted); max-width: 42ch; }
.report__list { list-style: none; margin-top: 1.8rem; display: grid; gap: .8rem; }
.report__list li { display: flex; align-items: center; gap: .7rem; font-weight: 600; }
.report__list i { width: 22px; height: 22px; flex: none; border-radius: 6px; background: var(--orange); position: relative; }
.report__list i::after { content: ""; position: absolute; left: 6px; top: 5px; width: 6px; height: 10px; border: 2px solid #fff; border-top: 0; border-left: 0; transform: rotate(40deg); }

.dash { background: #fff; border-radius: 22px; padding: 1.4rem; box-shadow: 0 40px 80px -40px rgba(14,33,67,.5); border: 1px solid var(--line); }
.dash__top { display: flex; align-items: center; gap: .5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.1rem; }
.dash__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.dash__top b { margin-left: auto; font-size: .82rem; color: var(--muted); }
.dash__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.dash__card { background: var(--ivory); border-radius: 14px; padding: 1rem 1.1rem; }
.dash__card small { font-size: .72rem; color: var(--muted); display: block; }
.dash__card strong { display: block; margin-top: .4rem; font-weight: 800; }
.dash__card .big { font-size: 2rem; font-variant-numeric: tabular-nums; }
.dash__card .big i { font-size: .5em; color: var(--orange); font-style: normal; }
.dash__card--wide { grid-column: span 2; }
.dash__card--wide strong { display: inline-block; color: var(--orange); }
.bar { height: 10px; border-radius: 999px; background: #fff; margin: .7rem 0 .5rem; overflow: hidden; }
.bar span { display: block; height: 100%; width: var(--w); background: var(--orange); border-radius: 999px; transition: width 1.2s var(--ease); }
.dash__card--spark .spark { display: flex; align-items: flex-end; gap: 5px; height: 42px; margin-top: .5rem; }
.dash__card--spark .spark span { flex: 1; background: var(--navy-3); border-radius: 4px 4px 0 0; height: var(--h); }
.dash__card--spark em { font-size: .72rem; color: #1f9d63; font-style: normal; font-weight: 700; }
.dash__card--next { grid-column: span 2; background: var(--navy); color: #fff; }
.dash__card--next small { color: rgba(255,255,255,.6); }
.dash__card--next b { color: #fff; font-size: .92rem; line-height: 1.4; }
/* 5단계 학습 사이클 — LMS 실제 Read·Try·Note·Grade·Review 진행도 */
.dash__card--cycle .cycle { list-style: none; display: flex; gap: 5px; margin-top: .6rem; }
.cycle__step { flex: 1; text-align: center; font-size: .66rem; font-weight: 700; color: var(--navy-soft); padding: .5em .2em; border-radius: 7px; background: #fff; border: 1px solid var(--line); position: relative; }
.cycle__step.is-done { background: rgba(255,90,31,.12); color: var(--orange-deep); border-color: rgba(255,90,31,.3); }
.cycle__step.is-done::after { content: "✓"; position: absolute; top: -6px; right: -3px; font-size: .7em; width: 14px; height: 14px; line-height: 14px; background: var(--orange); color: #fff; border-radius: 50%; }
.cycle__step.is-now { background: var(--navy); color: #fff; border-color: var(--navy); }
.dash__grade { color: var(--orange); }

/* ---------- FRANCHISE ---------- */
.franchise__head { max-width: 60ch; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.franchise__title { font-size: var(--fs-h1); margin: 1rem 0 1.2rem; }
.franchise__lead { font-size: var(--fs-lead); color: rgba(255,255,255,.66); max-width: 52ch; }
.franchise__hero { display: grid; grid-template-columns: 320px 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; margin-bottom: clamp(2rem,4vw,3rem); }
.freebie { background: linear-gradient(160deg, var(--orange), var(--orange-deep)); border-radius: 22px; padding: 2.2rem; }
.freebie__big { font-size: clamp(3.4rem, 7vw, 5.4rem); font-weight: 900; line-height: .9; letter-spacing: -.04em; }
.freebie__big small { font-size: .28em; font-weight: 700; margin-left: .2em; }
.freebie p { font-size: 1.15rem; margin-top: .6rem; }
.freebie b { font-weight: 800; }
.sys { list-style: none; display: grid; grid-template-columns: repeat(2,1fr); gap: 1.4rem 2.2rem; }
.sys li { border-top: 1px solid rgba(255,255,255,.16); padding-top: 1rem; }
.sys b { display: block; font-size: 1.15rem; }
.sys span { color: rgba(255,255,255,.6); font-size: .92rem; }
.models { border-top: 1px solid rgba(255,255,255,.14); padding-top: 1.6rem; display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.models__label { font-size: .76rem; letter-spacing: .18em; color: rgba(255,255,255,.5); font-weight: 700; }
.models__row { display: flex; gap: .8rem; flex-wrap: wrap; }
.models__row span { padding: .55em 1.2em; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; font-weight: 600; }

/* ---------- CONTACT ---------- */
.contact { background: var(--navy); color: #fff; flex-direction: column; justify-content: center; overflow: hidden; min-height: 100svh; }
.contact__cube { position: absolute; top: 8%; right: 6%; opacity: .9; z-index: 1; }
.contact__inner { position: relative; z-index: 2; }
.contact__title { font-size: var(--fs-h1); margin: 1.1rem 0 2.4rem; }
.contact .eyebrow { color: var(--orange-soft); } .contact .eyebrow::before { background: var(--orange-soft); }
.contact__cta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 3rem; }
.cta-card {
  position: relative; border-radius: 18px; padding: 1.5rem; min-height: 130px;
  display: flex; flex-direction: column; gap: .3rem; justify-content: flex-end;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  transition: transform .4s var(--ease), background .4s var(--ease);
}
.cta-card:hover { transform: translateY(-5px); background: rgba(255,255,255,.1); }
.cta-card b { font-size: 1.18rem; }
.cta-card span { font-size: .84rem; color: rgba(255,255,255,.6); }
.cta-card svg { position: absolute; top: 1.4rem; right: 1.4rem; width: 22px; height: 22px; }
.cta-card--primary { background: var(--orange); border-color: transparent; }
.cta-card--primary span { color: rgba(255,255,255,.85); }
.cta-card--primary:hover { background: var(--orange-deep); }

.contact__info { display: flex; gap: 2.5rem; flex-wrap: wrap; border-top: 1px solid var(--line-navy); padding-top: 2rem; }
.info { display: flex; flex-direction: column; gap: .3rem; }
.info__k { font-size: .78rem; letter-spacing: .1em; color: var(--orange-soft); font-weight: 700; }
.info__v { color: rgba(255,255,255,.82); }
.info--link:hover .info__v { color: #fff; text-decoration: underline; }

.foot { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.4rem 0; border-top: 1px solid var(--line-navy); }
.foot__inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: rgba(255,255,255,.55); }
.foot__slogan { color: var(--orange-soft); font-weight: 600; }

/* ============================================================
   TWEAKS
   ============================================================ */
.tweaks { position: fixed; right: 18px; bottom: 18px; width: 268px; z-index: 300; background: #fff; color: var(--navy); border-radius: 16px; box-shadow: 0 30px 70px -20px rgba(14,33,67,.5); border: 1px solid var(--line); overflow: hidden; font-size: .9rem; }
.tweaks__top { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.tweaks__top b { font-weight: 800; }
.tweaks__top button { font-size: .9rem; color: var(--muted); }
.tweaks__body { padding: 1rem; display: grid; gap: 1.1rem; max-height: 70vh; overflow: auto; }
.tw-group > label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: .5rem; }
.tw-seg { display: flex; gap: 4px; background: var(--ivory); border-radius: 10px; padding: 4px; }
.tw-seg button { flex: 1; padding: .5em; border-radius: 7px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.tw-seg button.on { background: #fff; color: var(--navy); box-shadow: 0 2px 6px -2px rgba(0,0,0,.2); }
.tw-swatches { display: flex; gap: 8px; }
.tw-swatches button { width: 34px; height: 34px; border-radius: 9px; border: 2px solid transparent; }
.tw-swatches button.on { border-color: var(--navy); }

/* ============================================================
   BRIDGE / REBRAND
   ============================================================ */
.bridge { background: var(--ivory); text-align: center; }
.bridge__inner { max-width: 880px; margin-inline: auto; display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }
.bridge .eyebrow::before { display: none; }
.bridge__swap { display: flex; align-items: center; justify-content: center; gap: clamp(1rem, 3vw, 2.4rem); flex-wrap: wrap; margin-top: .5rem; }
.bridge__old { font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 700; color: var(--navy-soft); opacity: .7; }
.bridge__old i { font-style: normal; font-weight: 500; display: block; font-size: .58em; letter-spacing: .02em; opacity: .8; }
.bridge__old-name { position: relative; display: inline-block; }
.bridge__old-name::after { content: ""; position: absolute; left: -3px; right: -3px; top: 50%; height: 2px; background: var(--orange); transform: rotate(-7deg); transform-origin: center; }
.bridge__arrow { color: var(--orange); }
.bridge__arrow svg { width: clamp(40px, 6vw, 58px); height: auto; }
.bridge__new { font-size: clamp(1.7rem, 4vw, 3rem); font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.bridge__new i { font-style: normal; font-weight: 600; display: block; font-size: .5em; color: var(--orange); letter-spacing: .01em; }
.bridge__headline { font-size: clamp(1.5rem, 3.2vw, 2.3rem); font-weight: 800; color: var(--navy); letter-spacing: -.025em; line-height: 1.3; margin-top: .4rem; }
.bridge__headline em { color: var(--orange); font-style: normal; }
.bridge__lead { font-size: var(--fs-lead); color: var(--navy-soft); max-width: 56ch; line-height: 1.7; }
.bridge__lead b { color: var(--navy); font-weight: 700; }
.bridge__pillars { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; width: 100%; margin-top: .6rem; text-align: left; }
.bridge__pillars li { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; box-shadow: 0 18px 40px -32px rgba(14,33,67,.4); }
.bridge__pillar-k { font-size: .72rem; font-weight: 800; letter-spacing: .14em; color: var(--orange); text-transform: uppercase; }
.bridge__pillar-v { font-size: .94rem; color: var(--navy-soft); line-height: 1.6; }
.bridge__pillar-v b { color: var(--navy); font-weight: 700; }
.bridge__why { font-size: 1.02rem; font-weight: 600; color: var(--navy-soft); margin-top: .4rem; }
.bridge__why em { color: var(--orange); font-style: normal; font-weight: 700; }
@media (max-width: 680px) {
  .bridge__pillars { grid-template-columns: 1fr; gap: .7rem; }
  .bridge__pillars li { flex-direction: row; align-items: baseline; gap: .8rem; padding: 1rem 1.1rem; }
  .bridge__pillar-k { flex: none; width: 2.8em; }
}

/* ============================================================
   WHY / STAKES
   ============================================================ */
.why { background: var(--paper-2); }
.why__inner { width: 100%; }
.why__head { max-width: 62ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.why__title { font-size: var(--fs-h1); margin: 1rem 0 1.2rem; }
.why__lead { font-size: var(--fs-lead); color: var(--muted); max-width: 50ch; }
.why__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.6rem); }
.why__card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: clamp(1.6rem, 2.6vw, 2.2rem); display: flex; flex-direction: column; gap: .7rem; }
.why__card .why__step { font-size: .72rem; font-weight: 800; letter-spacing: .12em; color: var(--orange); }
.why__card h3 { font-size: var(--fs-h3); }
.why__card p { color: var(--muted); line-height: 1.65; }
.why__card--hot { background: var(--navy); border-color: transparent; box-shadow: 0 30px 60px -36px rgba(14,33,67,.6); }
.why__card--hot .why__step { color: var(--orange-soft); }
.why__card--hot h3 { color: #fff; }
.why__card--hot p { color: rgba(255,255,255,.74); }
.why__card--hot h3 em { color: var(--orange-soft); }
.why__punch { margin-top: clamp(2rem, 4vw, 3rem); display: flex; flex-direction: column; gap: .3rem; max-width: none; }
.why__punch-sm { font-size: clamp(1rem, 1.7vw, 1.4rem); font-weight: 600; color: var(--navy-soft); letter-spacing: -.01em; }
.why__punch-lg { font-size: clamp(1.5rem, 3.4vw, 2.6rem); font-weight: 800; color: var(--orange); letter-spacing: -.02em; line-height: 1.2; }

/* ============================================================
   DIRECT / 광주과학고
   ============================================================ */
.direct__head { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: end; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.direct__headL { min-width: 0; }
.direct__title { font-size: var(--fs-h1); margin: 1rem 0 0; }
.direct__lead { font-size: var(--fs-lead); color: rgba(255,255,255,.7); padding-bottom: .4rem; }
.direct__lead b { color: #fff; }
.direct__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.direct__stat { background: rgba(255,255,255,.04); border: 1px solid var(--line-navy); border-radius: 20px; padding: clamp(1.6rem, 3vw, 2.4rem); }
.surge { display: flex; align-items: flex-end; justify-content: center; gap: clamp(1.4rem, 4vw, 3rem); }
.surge__col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .55rem; min-width: 86px; }
.surge__track { height: clamp(120px, 22vh, 168px); display: flex; align-items: flex-end; }
/* 막대 높이를 track 대비 % 로 — track 안에 항상 들어가 모바일에서 박스를 넘던 문제 해결 */
.surge__bar { width: clamp(52px, 8vw, 84px); height: var(--bar, 60%); border-radius: 10px 10px 0 0; background: rgba(255,255,255,.16); transform: scaleY(0); transform-origin: bottom; transition: transform 1.1s var(--ease-io); }
.surge.in .surge__bar { transform: scaleY(1); }
.surge.in .surge__col--hi .surge__bar { transition-delay: .16s; }
.surge__col b { font-size: 1.5rem; font-weight: 800; white-space: nowrap; line-height: 1; font-variant-numeric: tabular-nums; }
.surge__col small { font-size: .78rem; color: rgba(255,255,255,.55); white-space: nowrap; }
.surge__col--hi .surge__bar { background: linear-gradient(180deg, var(--orange), var(--orange-deep)); }
.surge__col--hi b { color: var(--orange-soft); }
.surge__arrow { width: clamp(34px, 4vw, 46px); height: auto; color: var(--orange-soft); align-self: center; margin-bottom: 58px; overflow: visible; }
.surge.in .surge__arrow { animation: surgeFloat 1.6s var(--ease-io) infinite; }
@keyframes surgeFloat { 0%,100% { transform: translateY(4px); } 50% { transform: translateY(-8px); } }
.surge__arrow path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.surge.in .surge__arrow-shaft { animation: drawLine .5s var(--ease) .5s forwards; }
.surge.in .surge__arrow-head  { animation: drawLine .35s var(--ease) .9s forwards; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .surge__arrow path { stroke-dashoffset: 0; }
  .surge.in .surge__arrow { animation: none; }
}
.direct__cap { margin-top: 1.6rem; text-align: center; font-size: .95rem; color: rgba(255,255,255,.7); line-height: 1.6; }
.direct__cap em { color: #fff; font-style: normal; font-weight: 700; }
.direct__list { list-style: none; display: grid; gap: 1.1rem; }
.direct__list li { border-left: 2px solid var(--orange); padding-left: 1rem; }
.direct__list b { display: block; font-size: 1.12rem; }
.direct__list span { color: rgba(255,255,255,.62); font-size: .92rem; }
.direct__cta { margin: clamp(2.2rem, 4vw, 3rem) auto 0; display: flex; width: fit-content; }

/* ============================================================
   RESPONSIVE — PC(≥1024) · 태블릿/폴드(681–1023) · 모바일(≤680)
   + 가로 단축높이 · 초협소(폴드 커버) 대응
   ============================================================ */

/* ---- 태블릿 & 폴드 펼침 (≤1023): 단일 컬럼, PC보다 큰 터치 레이아웃 ---- */
@media (max-width: 1023px) {
  .hero { min-height: auto; }
  .hero__inner { grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 3.2rem); max-width: 720px; margin-inline: auto; }
  .hero__sub { max-width: 56ch; }
  .hero__demo { max-width: 560px; width: 100%; }

  /* nav: 681~1023 구간(태블릿 세로·폴드 펼침·폰 가로)에서 풀메뉴 라벨이
     한 글자씩 깨지던 문제 → 라벨 nowrap + 간격/폰트 축소로 한 줄 유지.
     (≤680 에서는 아래 블록이 메뉴를 숨김) */
  .nav__inner { gap: 1.1rem; }
  .nav__links { gap: 1.05rem; font-size: .85rem; }
  .nav__links a { white-space: nowrap; }
  .brand__txt small { display: none; }   /* 보조 카피는 데스크탑에서만 */

  .gauges { grid-template-columns: repeat(3, 1fr); row-gap: 2.4rem; }
  .tracks { grid-template-columns: repeat(3, 1fr); }
  .report__inner { grid-template-columns: 1fr; }
  .franchise__hero { grid-template-columns: 1fr; }
  .contact__cta { grid-template-columns: repeat(2, 1fr); }
  .contact__cube { opacity: .35; right: -4%; top: 4%; }
}

/* ---- 폴드7 펼침·near-square·와이드 태블릿(820~1023): 히어로 2단 복귀 ----
   1단으로 떨어지면 near-square 화면(882×938 등)에서 카피+데모가 세로로 쌓여
   좌우가 텅 비고 폰을 늘린 듯 어색함 → 가로 공간을 살려 2단으로. */
@media (min-width: 820px) and (max-width: 1023px) {
  .hero { min-height: 100svh; }
  .hero__inner { grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr); gap: clamp(2rem, 4vw, 3.4rem); max-width: none; align-items: center; }
  .hero__sub { max-width: 42ch; }
  .hero__demo { max-width: 100%; margin-inline: 0; }
}

/* ---- 가로 모드 단축 높이 (모바일/플립 가로): 히어로 압축, 2컬럼 유지 ---- */
@media (max-height: 600px) and (orientation: landscape) and (min-width: 681px) {
  .hero { min-height: auto; padding-block: 92px 40px; }
  .hero__inner { grid-template-columns: 1fr 1fr; gap: 2rem; max-width: none; }
  .hero__scroll { display: none; }
  .demo__code { min-height: 7em; }
}

/* ---- 중간 태블릿 세로 (681–820): 교재 2열 ---- */
@media (max-width: 880px) {
  .tracks { grid-template-columns: repeat(2, 1fr); }
}

/* ---- 모바일 (≤680) ---- */
@media (max-width: 680px) {
  :root { --gut: 20px; }
  .nav__links { display: none; }
  .nav__inner { height: 64px; }
  .nav__cta { margin-left: auto; padding: .55em 1.05em; font-size: .82rem; }
  .brand__txt small { display: none; }

  /* ----- 모바일 히어로: 과감히 비운다 — 한 화면에 헤드라인+한 줄+버튼 하나 -----
     꾸역꾸역 쌓이던 요소(칩 4개·2차 버튼·SCROLL 힌트·슬로건)를 모바일에선 제거.
     같은 정보는 아래 journey/contact 섹션이 이미 담고 있어 중복 해소. */
  .hero__sub-full { display: none; }   /* 긴 문장 숨기고 */
  .hero__sub-lite { display: block; }  /* 한 줄 핵심만 */
  .hero__levels { display: none; }     /* 과정 칩: 로드맵 데모·journey와 중복 → 제거 */
  .hero__cta .btn-ghost { display: none; }  /* 2차 버튼 제거 → 행동 하나만 또렷이 */
  .hero__scroll { display: none; }     /* SCROLL 힌트 제거 → 슬로건 겹침 해소 */
  .demo__slogan { display: none; }     /* 브랜드 슬로건은 로더·마퀴·푸터에 이미 존재 */

  .hero { padding-block: clamp(96px, 14vh, 124px) clamp(40px, 7vh, 64px); }
  .hero__inner { gap: 2rem; }
  .hero .eyebrow { font-size: .66rem; letter-spacing: .2em; }
  .hero__title { font-size: clamp(2.2rem, 8.2vw, 2.85rem); line-height: 1.18; letter-spacing: -.03em; margin: 1.25rem 0 1.1rem; }
  .hero__sub { font-size: 1.04rem; line-height: 1.65; color: rgba(255,255,255,.62); max-width: 28ch; }
  .hero__cta { flex-direction: column; align-items: stretch; margin-top: 2rem; gap: .7rem; }
  .hero__cta .btn { justify-content: center; padding: 1.1em 1.6em; }
  .hero__demo { margin-top: 2.2rem; }
  /* 섹션 헤드 타이포 위계 — 모바일에서 답답하지 않게 */
  .why__title, .problem__title, .diagnosis__title, .roadmap__title,
  .textbook__title, .report__title, .franchise__title, .direct__title, .contact__title { line-height: 1.2; }
  .why__lead, .problem__lead, .diagnosis__lead, .roadmap__lead,
  .textbook__lead, .report__lead, .franchise__lead, .direct__lead { font-size: 1.02rem; line-height: 1.72; max-width: 40ch; }
  .why__head, .problem__head, .diagnosis__head, .roadmap__head,
  .textbook__head, .franchise__head, .direct__head { margin-bottom: clamp(2rem, 7vw, 3rem); }
  .worries { height: clamp(320px, 54vh, 430px); }
  .demo__steps { grid-template-columns: repeat(2, 1fr); }
  .demo__row, .demo__steps, .demo__code { padding-inline: 1rem; }

  .gauges { grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
  .tracks { grid-template-columns: 1fr; }
  .contact__cta { grid-template-columns: 1fr; }
  .sys { grid-template-columns: 1fr; }
  .freebie { padding: 1.6rem; }
  .models { gap: 1rem; }
  .foot__inner { flex-direction: column; gap: .4rem; }
  .contact__cube { display: none; }
}

/* ---- 작은 폰 / 폴드 커버 (≤420) ---- */
@media (max-width: 420px) {
  :root { --gut: 16px; }
  .hero__title { font-size: clamp(2.1rem, 11vw, 2.8rem); }
  .gauges { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .gauge p { font-size: .78rem; }
  .demo__steps li { font-size: .72rem; padding: .5rem .5rem; }
  .freebie__big { font-size: clamp(3rem, 18vw, 4rem); }
  .cta-card { min-height: 108px; padding: 1.25rem; }
  /* 과학고 surge 막대: min-width 86px×2 가 좁은 폭(≤340/폴드커버)에서 카드를
     넘쳐 6px 가로 넘침을 만들던 것 → 최소폭/간격 완화로 카드 안에 수납 */
  .direct__stat { padding: 1.4rem 1.1rem; }
  .surge { gap: 1rem; }
  .surge__col { min-width: 0; }
  .surge__bar { width: clamp(42px, 15vw, 72px); }
}

/* ---- 초협소 (≤340): 갤럭시 폴드 커버 등 ---- */
@media (max-width: 340px) {
  .hero__title { font-size: 1.95rem; }
  .hero__levels li { font-size: .72rem; }
  .demo__steps { grid-template-columns: 1fr 1fr; gap: .35rem; }
  .demo__file { font-size: .68rem; }
  /* 폴드 커버(≤340·280px): nav(fixed)가 줄어든 폭보다 넓어져 가로 넘침 →
     로고/간격/CTA 축소로 nav 내용을 뷰포트 안에 수납.
     .nav__cta 는 .btn 과 specificity 동일이라 뒤에 오는 .btn 에 지지 않도록
     .nav .nav__cta 로 한 단계 높여 강제. */
  :root { --gut: 12px; }
  .nav__inner { gap: .4rem; }
  .brand { gap: .4rem; }
  .brand__mark { width: 30px; height: 30px; }
  .brand__txt strong { font-size: .88rem; }
  .btn { font-size: .92rem; padding: .85em 1.3em; }
  .nav .nav__cta { font-size: .68rem; padding: .5em .7em; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__scroll i::after { animation: none; }
  .demo__code .cur { animation: none; }
  .hero.js-anim .hero__copy > *, .hero.js-anim .hero__demo { transform: none; }
}

/* ============================================================
   RESPONSIVE — new sections (bridge / why / direct / covers)
   ============================================================ */
@media (max-width: 1023px) {
  .direct__grid { grid-template-columns: 1fr; gap: 2rem; }
  /* 제목과 리드가 2단으로 끼던 것 → 1단 스택 (모바일에서 제목이 한 단어씩 끊기던 문제) */
  .direct__head { grid-template-columns: 1fr; gap: 1rem; align-items: start; }
  .covers { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 880px) {
  .why__cards { grid-template-columns: 1fr; }
  /* PROBLEM: 제목 | 걱정의 벽 2단 → 1단 (좁은 폭에서 제목이 한 단어씩 깨지던 문제) */
  .problem__inner { grid-template-columns: 1fr; gap: 2.2rem; grid-template-areas: "head" "worries" "answer"; }
}
@media (max-width: 680px) {
  .covers { grid-template-columns: repeat(2, 1fr); gap: .9rem; }
  /* 모바일: 잼코딩 → 아이오코딩 을 깔끔한 세로 흐름으로.
     부분 줄바꿈으로 화살표가 잼코딩 옆에 어정쩡하게 붙던 것 → column 강제,
     화살표는 아래(↓)를 명확히 가리키게. */
  .bridge__swap { flex-direction: column; gap: .55rem; }
  .bridge__arrow { line-height: 0; }
  .bridge__arrow svg { transform: rotate(90deg); width: 34px; }
  .why__punch { font-size: 1.35rem; }
}
@media (max-width: 420px) {
  .covers { grid-template-columns: 1fr 1fr; gap: .7rem; }
}
@media (max-width: 340px) {
  .covers { grid-template-columns: 1fr; }
}

/* ============================================================
   LANDSCAPE-SHORT — 모바일·Z플립·폴드 가로 (낮은 높이)
   ============================================================ */
@media (orientation: landscape) and (max-height: 540px) {
  .scene { min-height: auto; padding-block: clamp(72px, 14vh, 110px); }
  .hero { min-height: auto; }
  .hero__inner { grid-template-columns: 1fr 1fr; gap: 1.8rem; max-width: none; align-items: center; }
  .hero__scroll { display: none; }
  .hero__title { font-size: clamp(1.7rem, 5.4vw, 2.6rem); }
  .demo__code { min-height: 6.5em; }
  .demo__steps { grid-template-columns: repeat(4, 1fr); }
  .why__cards { grid-template-columns: repeat(3, 1fr); }
  .gauges { grid-template-columns: repeat(5, 1fr); }
}
/* very short (flip 가로 ~370x?) keep nav usable */
@media (orientation: landscape) and (max-height: 430px) {
  .hero__inner { gap: 1.2rem; }
  .hero__levels { display: none; }
}

/* ============================================================
   TWEAK · 밝은 배경 버전 (data-bg="light")
   히어로/다크 섹션을 화이트 기반으로 미리보기
   ============================================================ */
body:is([data-bg="light"],[data-bg="white"]) .hero { background: var(--paper-2); color: var(--navy); }
body:is([data-bg="light"],[data-bg="white"]) .hero .grid-floor {
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  opacity: .5;
}
body:is([data-bg="light"],[data-bg="white"]) .hero__glow { background: radial-gradient(circle, rgba(255,90,31,.10), transparent 64%); }
body:is([data-bg="light"],[data-bg="white"]) .hero__sub { color: var(--muted); }
body:is([data-bg="light"],[data-bg="white"]) .hero__sub b { color: var(--navy); }
body:is([data-bg="light"],[data-bg="white"]) .hero__levels li { color: var(--navy-soft); background: #fff; border-color: var(--line); }
body:is([data-bg="light"],[data-bg="white"]) .hero__levels li:last-child { color: #fff; background: var(--navy); border-color: var(--navy); }
body:is([data-bg="light"],[data-bg="white"]) .demo__slogan { color: var(--navy); }
body:is([data-bg="light"],[data-bg="white"]) .demo__slogan em { color: var(--orange); }
body:is([data-bg="light"],[data-bg="white"]) .hero .btn-ghost { color: var(--navy); border-color: var(--navy); }
body:is([data-bg="light"],[data-bg="white"]) .hero .btn-ghost:hover { background: var(--navy); color: #fff; }
body:is([data-bg="light"],[data-bg="white"]) .hero__scroll { color: var(--muted); }
body:is([data-bg="light"],[data-bg="white"]) .hero__scroll i { background: var(--line); }

/* dark scenes → light */
body:is([data-bg="light"],[data-bg="white"]) .scene.dark { background: var(--ivory); color: var(--navy); }
body:is([data-bg="light"],[data-bg="white"]) .scene.dark .eyebrow.is-light { color: var(--orange); }
body:is([data-bg="light"],[data-bg="white"]) .scene.dark .eyebrow.is-light::before { background: var(--orange); }
body:is([data-bg="light"],[data-bg="white"]) .diagnosis__lead,
body:is([data-bg="light"],[data-bg="white"]) .textbook__lead,
body:is([data-bg="light"],[data-bg="white"]) .direct__lead { color: var(--muted); }
body:is([data-bg="light"],[data-bg="white"]) .direct__lead b { color: var(--navy); }
/* diagnosis gauges on light */
body:is([data-bg="light"],[data-bg="white"]) .gauge__ring { background:
  radial-gradient(closest-side, var(--ivory) 70%, transparent 71%),
  conic-gradient(var(--orange) calc(var(--v,0) * 1turn), rgba(14,33,67,.12) 0); }
body:is([data-bg="light"],[data-bg="white"]) .gauge__ring--warn { background:
  radial-gradient(closest-side, var(--ivory) 70%, transparent 71%),
  conic-gradient(var(--sand) calc(var(--v,0) * 1turn), rgba(14,33,67,.12) 0); }
body:is([data-bg="light"],[data-bg="white"]) .gauge p { color: var(--muted); }
/* direct on light */
body:is([data-bg="light"],[data-bg="white"]) .direct__stat { background: #fff; border-color: var(--line); }
body:is([data-bg="light"],[data-bg="white"]) .surge__bar { background: rgba(14,33,67,.1); }
body:is([data-bg="light"],[data-bg="white"]) .surge__col--hi .surge__bar { background: linear-gradient(180deg, var(--orange), var(--orange-deep)); }
body:is([data-bg="light"],[data-bg="white"]) .direct__cap { color: var(--muted); }
body:is([data-bg="light"],[data-bg="white"]) .direct__cap em { color: var(--navy); }
body:is([data-bg="light"],[data-bg="white"]) .direct__list span { color: var(--muted); }
/* franchise on light */
body:is([data-bg="light"],[data-bg="white"]) .franchise__lead { color: var(--muted); }
body:is([data-bg="light"],[data-bg="white"]) .sys li { border-top-color: var(--line); }
body:is([data-bg="light"],[data-bg="white"]) .sys span { color: var(--muted); }
body:is([data-bg="light"],[data-bg="white"]) .models { border-top-color: var(--line); }
body:is([data-bg="light"],[data-bg="white"]) .models__label { color: var(--navy-soft); }
body:is([data-bg="light"],[data-bg="white"]) .models__row span { border-color: var(--line); }
/* covers high/gift stay dark for premium hierarchy — intentional */
/* contact stays navy (final CTA anchor) — intentional */

/* ============================================================
   TWEAK · 화이트톤 (data-bg="white")
   진짜 순백(#fff) · 쿨 그레이 인셋 · 크리스프 헤어라인 · 모던 미니멀
   (베이지/웜 캐스트 일절 없음)
   ============================================================ */
body[data-bg="white"] {
  --paper-2: #FFFFFF; --paper: #FFFFFF; --ivory: #FFFFFF;
  --line: #E7EAF0;            /* crisp cool hairline */
  --navy-soft: #5A6478;       /* cool slate secondary */
}
/* pure-white sections separated only by hairlines */
body[data-bg="white"] .scene + .scene { border-top: 1px solid var(--line); }
body[data-bg="white"] .hero { border-bottom: 1px solid var(--line); background: #FFFFFF; }
/* cool, restrained hero wash — no warm orange flood */
body[data-bg="white"] .hero__glow { background: none; }
body[data-bg="white"] .hero .grid-floor { display: none; }
/* faint COOL inset surfaces (chips, demo chrome, bars, gauge centers) */
body[data-bg="white"] :is(.demo__bar, .demo__steps, .demo__steps li, .chips li,
  .hero__levels li, .dash__card, .drep__bar, .rmap__node) { background: #F6F8FB; }
body[data-bg="white"] .demo__steps li.on,
body[data-bg="white"] .rmap__stop.done .rmap__node { background: #fff; }
body[data-bg="white"] .rmap__stop.done .rmap__node,
body[data-bg="white"] .rmap__stop--goal.done .rmap__node { background: var(--orange); }
body[data-bg="white"] .dash { background: #fff; }
body[data-bg="white"] .rmap__rail { background: #E7EAF0; }
/* gauge ring center stays pure white on white sections */
body[data-bg="white"] .gauge__ring { background:
  radial-gradient(closest-side, #fff 70%, transparent 71%),
  conic-gradient(var(--orange) calc(var(--v,0) * 1turn), #E7EAF0 0); }
body[data-bg="white"] .gauge__ring--warn { background:
  radial-gradient(closest-side, #fff 70%, transparent 71%),
  conic-gradient(var(--sand) calc(var(--v,0) * 1turn), #E7EAF0 0); }
/* crisp hairline + soft gallery shadow on cards */
body[data-bg="white"] :is(.demo, .why__card, .world, .bk, .direct__stat, .dash) {
  box-shadow: 0 1px 2px rgba(14,33,67,.03), 0 24px 48px -44px rgba(14,33,67,.4);
}
/* navy anchors stay navy (intentional contrast) */
body[data-bg="white"] .why__card--hot { background: var(--navy); }
body[data-bg="white"] .surge__bar { background: #EBEEF3; }
body[data-bg="white"] .surge__col--hi .surge__bar { background: linear-gradient(180deg, var(--orange), var(--orange-deep)); }
/* covers high/gift stay dark · contact stays navy — premium anchors */
