/* Home only, loaded after site.css. Light stage with the 3D flow scene, then full-width chapter bands.
   Visual reasoning and limits: docs/IMMERSIVE-REA-20261113.md (구현 결과). */

/* ---------- header over the light stage ---------- */
.site-header { background: rgba(233, 236, 242, 0.78); border-bottom-color: transparent; }
.site-header.is-scrolled { background: rgba(255, 255, 255, 0.88); border-bottom-color: rgba(225, 230, 239, 0.8); }

/* ---------- hero stage ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "stage" "entry";
  padding-block: clamp(28px, 5vw, 64px) 32px;
  background: radial-gradient(120% 90% at 72% 42%, #F5F7FA 0%, var(--fog) 52%, var(--fog-deep) 100%);
  color: var(--ink);
}
.hero :focus-visible { outline-color: var(--focus); }
/* Auto margins would shrink grid items to their content; keep the wrap at full width so edges line up. */
.hero > .wrap { width: 100%; }
.hero__stage { grid-area: stage; position: relative; z-index: 0; height: clamp(210px, 58vw, 380px); margin-block: 4px 8px; pointer-events: none; }
.hero__fallback, .hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero__canvas { opacity: 0; transition: opacity 1.1s var(--ease); }
.hero__stage.is-live .hero__canvas { opacity: 1; }
.hero__fallback { transition: opacity 0.5s var(--ease); }
.hero__stage.is-live .hero__fallback { opacity: 0; }
.hero__inner { grid-area: copy; position: relative; z-index: 1; display: grid; gap: 16px; }
.hero__copy { min-width: 0; }
.hero__brand { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--ink); font-size: var(--text-sm); font-weight: 800; letter-spacing: -0.01em; }
.hero__brand::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--brand); }
.hero__brand span { color: var(--ink-muted); font-weight: 600; }
.hero__brand .wordmark { color: var(--ink); font-size: 1.5rem; font-weight: 900; }
.hero h1 { margin-top: 18px; font-size: var(--text-display); font-weight: 800; line-height: 1.04; letter-spacing: -0.05em; text-wrap: initial; }
.hero .phrase { display: block; text-wrap: balance; }
.hero .phrase + .phrase { color: var(--brand-deep); }
.hero .lede { margin-top: 22px; max-width: 30em; color: var(--ink-muted); font-size: clamp(1.0625rem, 0.98rem + 0.45vw, 1.375rem); line-height: 1.6; }
.hero .actions { margin-top: 28px; }
.hero__tools { display: flex; justify-content: flex-end; }
.hero .motion-toggle { position: static; background: rgba(255, 255, 255, 0.72); color: var(--ink); border-color: rgba(18, 24, 38, 0.2); }
.hero .motion-toggle:hover { background: #FFFFFF; }

/* Fallback drawing palette (also the reduced-motion / no-WebGL picture). */
.fa-track { fill: none; stroke: var(--ink); stroke-opacity: 0.28; stroke-width: 1.5; }
.fa-blue { fill: url(#fa-blue); }
.fa-blue-edge { fill: #86A6FF; opacity: 0.75; }
.fa-white, .fa-paper { fill: #FFFFFF; stroke: #C9D1DE; }
.fa-white-edge { fill: #E3E8F1; }
.fa-ink { fill: var(--ink); }
.fa-ink-edge { fill: #3A4458; }
.fa-mist { fill: #D3DAE6; }
.fa-line { fill: none; stroke: #AEB8C9; stroke-width: 2; stroke-linecap: round; }
.fa-gate { fill: none; stroke-width: 7; stroke-linecap: round; }
.fa-gate--ink { stroke: var(--ink); }
.fa-gate--blue { stroke: var(--brand); }
.fa-gate--far { stroke-opacity: 0.45; }

/* Visitor entries: an index row of whole-row links. */
.entry { grid-area: entry; position: relative; z-index: 1; margin-top: 8px; }
.entry__title { color: var(--ink-muted); font-size: var(--text-s); font-weight: 700; letter-spacing: 0; }
.entry__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; margin-top: 10px; padding: 0; list-style: none; }
.entry__grid li { min-width: 0; }
.entry__grid a { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; height: 100%; min-height: 64px; padding: 14px 0 16px; border-top: 1px solid rgba(18, 24, 38, 0.22); color: var(--ink); text-decoration: none; transition: border-color 0.25s, color 0.25s; }
.entry__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.entry__grid strong { font-size: var(--text-s); font-weight: 800; }
.entry__grid small { display: none; margin-top: 4px; color: var(--ink-muted); font-size: var(--text-sm); }
.arrow-icon { flex: none; width: 22px; height: 22px; margin-top: 1px; color: var(--brand); transition: translate 0.3s var(--ease); }
.entry__grid a:hover { border-top-color: var(--brand); color: var(--brand-deep); }
.entry__grid a:hover .arrow-icon { translate: 3px -3px; }

@media (min-width: 560px) {
  .entry__grid small { display: block; }
}

/* Wide screens: the stage fills the hero behind the copy; the scene sits right of the lede, under the heading. */
@media (min-width: 900px) {
  .hero {
    grid-template-areas: "copy" "entry"; grid-template-rows: 1fr auto;
    min-height: clamp(660px, calc(100svh - var(--header-h)), 940px);
    padding-block: clamp(48px, 6vw, 84px) 36px;
  }
  .hero__stage { grid-area: 1 / 1 / -1 / -1; height: auto; margin: 0; }
  .hero__fallback { inset: 22% 2% auto auto; width: 58%; height: 60%; }
  .hero__inner { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .hero .lede, .hero .actions { max-width: min(30em, 40vw); }
  .entry__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 24px; }
  .entry__grid a { min-height: 92px; padding-block: 18px 20px; }
  .entry__grid strong { font-size: var(--text-m); }
}

/* ---------- chapter bands ---------- */
.band { position: relative; padding-block: clamp(72px, 9vw, 144px); }
.band--vision, .band--main-businesses, .band--commitments, .band--local-pilot { background: var(--surface); }
.band--local-pilot + .band--labs-preview { background: var(--surface); }
.band__section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px 64px; }
.band__head { min-width: 0; }
.band__head h2 { font-size: clamp(1.875rem, 1rem + 2.9vw, 3.5rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.045em; }
.band__lead { margin-top: 18px; max-width: 34em; color: var(--ink-muted); font-size: var(--text-m); }
.band__body { min-width: 0; }
.band__head .home-jumps { margin-top: 28px; }

@media (min-width: 1024px) {
  .band__section { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  .band__head { position: sticky; top: calc(var(--header-h) + 40px); }
  .band--vision .band__section, .band--main-businesses .band__section, .band--voting-and-equipment .band__section, .band--delivery-process .band__section, .band--data-sovereignty .band__section { grid-template-columns: minmax(0, 1fr); }
  .band--vision .band__head, .band--main-businesses .band__head, .band--voting-and-equipment .band__head, .band--delivery-process .band__head, .band--data-sovereignty .band__head { position: static; }
}

/* A blue rule that draws itself when a row enters the screen. */
.benefit, .pillars li { position: relative; }
.benefit::before, .pillars li::before { content: ""; position: absolute; left: 0; top: -1px; width: 100%; height: 2px; background: var(--brand); transform-origin: left; }
.motion-ok .benefit:not(.is-in)::before, .motion-ok .pillars li:not(.is-in)::before { transform: scaleX(0); }
.motion-ok .benefit::before, .motion-ok .pillars li::before { transition: transform 1.1s var(--ease) 0.15s; }

/* Benefits */
.home-jumps { display: flex; flex-wrap: wrap; gap: 8px; }
.home-jumps a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: var(--text-sm); font-weight: 700; text-decoration: none; transition: border-color 0.2s, background-color 0.2s; }
.home-jumps a:hover { border-color: var(--brand); background: var(--brand-tint); }
.benefits { display: grid; gap: 0; }
.benefit { display: grid; gap: 10px; padding-block: 28px 32px; border-top: 1px solid var(--line-strong); }
.benefit__label { color: var(--brand-deep); font-size: var(--text-sm); font-weight: 800; }
.benefit h3 { max-width: 18em; font-size: clamp(1.375rem, 1rem + 1.2vw, 2.125rem); font-weight: 800; line-height: 1.25; letter-spacing: -0.035em; }
.benefit .muted { max-width: 36em; }
.benefit > a { display: inline-flex; align-items: center; justify-self: start; min-height: 44px; font-size: var(--text-s); font-weight: 700; }

/* Main business cards and the product example in the vision section. */
.business-grid--showcase { gap: 20px; align-items: stretch; }
.business-grid--showcase .svc { padding: clamp(26px, 3.4vw, 44px); border-radius: 28px; }
.business-grid--showcase .svc__emoji { display: none; }
.business-grid--showcase .svc__top { min-height: 0; }
.business-grid--showcase .svc h3 { margin-top: 10px; font-weight: 800; letter-spacing: -0.045em; }
.business-grid--showcase .svc__tagline { font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.3125rem); }
.business-grid--showcase .svc--main {
  overflow: hidden; color: var(--on-brand); border-color: transparent;
  background:
    repeating-radial-gradient(ellipse 70% 55% at 92% 105%, rgba(255, 255, 255, 0.07) 0 1px, transparent 1.5px 30px),
    radial-gradient(70% 60% at 85% 100%, rgba(61, 115, 255, 0.45), transparent 70%),
    linear-gradient(160deg, var(--night) 0%, var(--night-2) 100%);
  box-shadow: var(--shadow-lg);
}
.business-grid--showcase .svc--main .svc__link { color: var(--on-brand); }
.business-grid--showcase .svc--main .svc__link:focus-visible::after { outline-color: var(--on-brand); }
.business-grid--showcase .svc--main .svc__sub, .business-grid--showcase .svc--main .svc__status { color: var(--on-brand-muted); }
.business-grid--showcase .svc--main .svc__status { border-top-color: rgba(255, 255, 255, 0.28); }
.business-grid--showcase .svc--main .svc__status span { color: var(--on-brand); }
.business-grid--showcase .svc--main .svc__chips li { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.28); color: var(--on-brand); }
.business-grid--showcase .svc--main .category-label { background: var(--on-brand); border-color: var(--on-brand); color: var(--night); }
.business-grid--showcase .svc--secondary {
  overflow: hidden; border-color: var(--line);
  background:
    repeating-radial-gradient(ellipse 80% 50% at 70% 118%, rgba(31, 181, 168, 0.16) 0 1px, transparent 1.5px 24px),
    linear-gradient(165deg, var(--fiber-tint), var(--surface) 70%);
}
.svc__media { margin-top: 18px; perspective: 1400px; pointer-events: none; }
.mock--feature {
  width: min(100%, 520px); margin-inline: auto; border-color: rgba(255, 255, 255, 0.5);
  transform: rotateX(var(--tilt-y, 10deg)) rotateY(var(--tilt-x, -14deg)) rotateZ(1.5deg);
  transition: transform 0.7s var(--ease);
  box-shadow: 0 60px 90px -40px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.business-grid--showcase .svc:hover { translate: 0 -4px; }
.business-grid--showcase .svc--main:hover { border-color: transparent; }

/* Data sovereignty: a night band with a large statement and the ASCII-rendered box. */
.band--data-sovereignty {
  overflow: hidden; color: var(--on-brand);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px) 0 0 / 72px 100%,
    radial-gradient(60% 80% at 82% 50%, rgba(46, 155, 255, 0.18), transparent 70%),
    var(--night);
}
.band--data-sovereignty .band__section { position: static; }
.band--data-sovereignty .band__head { position: static; }
.band--data-sovereignty h2 { color: var(--on-brand-muted); font-size: var(--text-m); font-weight: 700; letter-spacing: 0; }
.band--data-sovereignty .band__lead { max-width: 13em; margin-top: 14px; color: var(--on-brand); font-size: clamp(2rem, 0.9rem + 3.6vw, 4.25rem); font-weight: 800; line-height: 1.14; letter-spacing: -0.045em; }
.band__status { display: block; margin-top: 18px; color: var(--on-brand-muted); font-size: var(--text-s); font-weight: 700; letter-spacing: 0; line-height: 1.5; }
.band--data-sovereignty :focus-visible { outline-color: var(--on-brand); }
.vault { position: relative; height: 240px; margin-top: 28px; pointer-events: none; }
.vault canvas { display: block; width: 100%; height: 100%; }
.vault__note { position: relative; z-index: 1; max-width: 36em; padding: 22px 24px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: var(--radius-l); background: rgba(255, 255, 255, 0.06); backdrop-filter: blur(8px); }
.vault__note h3 { font-size: var(--text-l); font-weight: 800; }
.vault__note p { margin-top: 10px; }
.vault__note a { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-brand); font-weight: 700; }
@media (min-width: 900px) {
  .vault { position: absolute; top: 0; right: 0; bottom: 0; width: min(54%, 760px); height: auto; margin: 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 28%); mask-image: linear-gradient(90deg, transparent, #000 28%); }
  .band--data-sovereignty .band__head, .vault__note { max-width: 52%; }
}

/* Voting and equipment briefs */
.band--voting-and-equipment .business-grid { gap: 20px; }
.band--voting-and-equipment .svc { padding: clamp(24px, 3vw, 36px); border-radius: 24px; }
.band--voting-and-equipment .svc h3 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.125rem); font-weight: 800; letter-spacing: -0.04em; }

/* Commitments */
.pillars { display: grid; padding: 0; list-style: none; }
.pillars li { display: grid; gap: 8px; padding-block: 26px 30px; border-top: 1px solid var(--line-strong); }
.pillars h3 { font-size: clamp(1.375rem, 1rem + 1.2vw, 2rem); font-weight: 800; letter-spacing: -0.035em; }
.pillars p { color: var(--ink-muted); max-width: 34em; }

/* Delivery process: stations on one line, with a small tile riding it (paused with the motion toggle). */
.band--delivery-process { background: radial-gradient(90% 120% at 20% 0%, #F4F6FA, var(--fog) 60%); }
.flow-steps { position: relative; isolation: isolate; display: grid; gap: 28px; padding: 0 0 0 4px; list-style: none; }
.flow-steps::before { content: ""; position: absolute; z-index: -1; left: 31px; top: 28px; bottom: 28px; width: 2px; background: linear-gradient(var(--brand), var(--glow-teal)); transform-origin: top; }
.flow-steps li { display: flex; align-items: center; gap: 20px; }
.flow-steps__node { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: var(--text-m); font-weight: 800; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 8px rgba(34, 83, 214, 0.12), 0 14px 26px -12px rgba(34, 83, 214, 0.8); }
.flow-steps h3 { font-size: clamp(1.25rem, 1rem + 0.9vw, 1.75rem); font-weight: 800; letter-spacing: -0.035em; }
.motion-ok .flow-steps:not(.is-in)::before { transform: scaleY(0); }
.motion-ok .flow-steps::before { transition: transform 1.4s var(--ease) 0.2s; }
@media (min-width: 900px) {
  .flow-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 0; }
  .flow-steps::before { left: 28px; right: 12%; top: 27px; bottom: auto; width: auto; height: 2px; background: linear-gradient(90deg, var(--brand), var(--glow-teal)); transform-origin: left; }
  .motion-ok .flow-steps:not(.is-in)::before { transform: scaleX(0); }
  .flow-steps li { flex-direction: column; align-items: flex-start; gap: 22px; }
  .flow-steps::after { content: ""; position: absolute; z-index: -1; top: 20px; left: 28px; width: 10px; height: 16px; border-radius: 3px; background: var(--ink); animation: ride 7s linear infinite; }
}
@keyframes ride { from { translate: 0 0; opacity: 0; } 8% { opacity: 1; } 88% { opacity: 1; } to { translate: min(60vw, 820px) 0; opacity: 0; } }

/* FAQ, pilot and labs stay quiet so the business chapters lead. */
.band--local-pilot, .band--labs-preview { padding-block: clamp(48px, 6vw, 88px); }
.band--labs-preview { padding-top: 0; }
.band--local-pilot .band__head h2, .band--labs-preview .band__head h2, .band--home-faq .band__head h2 { font-size: clamp(1.625rem, 1rem + 1.9vw, 2.5rem); }
.band--local-pilot .pilot-strip { max-width: none; }

/* Closing call to action: a blue band over orbit lines. */
.band--cta {
  overflow: hidden; color: var(--on-brand); padding-block: clamp(88px, 11vw, 168px);
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-deep) 100%);
}
.band__lines { position: absolute; inset: 0; z-index: 0; background: repeating-radial-gradient(ellipse 58% 44% at 84% 64%, rgba(255, 255, 255, 0.13) 0 1px, transparent 1.5px 34px); }
.band__cta { position: relative; z-index: 1; display: grid; gap: 32px; }
.band__cta h2 { max-width: 13em; font-size: clamp(2.25rem, 1rem + 4.2vw, 5rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.05em; }
.band__cta-body > * + * { margin-top: 12px; }
.band__cta-body .button { margin-top: 8px; }
.band--cta .cta__notice { color: var(--on-brand); font-size: var(--text-m); font-weight: 700; }
.band--cta :focus-visible { outline-color: var(--on-brand); }
.cta__prep { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-brand); font-weight: 700; }
@media (min-width: 1024px) {
  .band__cta { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: end; }
}

/* 재개발착착 target service on home: label beside the core sentence, the five-step line, three readers. */
.band--vision .band__head h2 { font-size: var(--text-l); color: var(--ink-muted); font-weight: 700; letter-spacing: 0; }
.vision--home .vision__headline { font-size: clamp(2rem, 1rem + 3.4vw, 3.75rem); }
.vision--home .section__more { margin-top: 28px; }
.vision--home .section__more a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; }

/* Target data zones on the night band: stacked in the left column beside the ASCII box. */
.band--data-sovereignty .zones { grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0 0 20px; }
.band--data-sovereignty .zone { border-color: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.06); }
.band--data-sovereignty .zone__mark { background: transparent; box-shadow: inset 0 0 0 2px #8FB0FF; }
.band--data-sovereignty .zone--sensitive { border-color: #8FB0FF; }
.band--data-sovereignty .zone--sensitive .zone__mark { background: #8FB0FF; }
.band--data-sovereignty .zone__where { color: var(--on-brand-muted); }
@media (min-width: 900px) {
  .band--data-sovereignty .zones { max-width: 52%; }
}

/* ---------- motion ---------- */
@keyframes phraseIn { from { opacity: 0; transform: translateY(0.4em); clip-path: inset(0 0 100% 0); } to { opacity: 1; transform: none; clip-path: inset(0 0 -20% 0); } }
@keyframes softRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.motion-ok .hero .phrase { animation: phraseIn 1s var(--ease) both; }
.motion-ok .hero .phrase + .phrase { animation-delay: 0.14s; }
.motion-ok .hero__brand, .motion-ok .hero .lede, .motion-ok .hero .actions, .motion-ok .entry { animation: softRise 0.9s var(--ease) both; }
.motion-ok .hero .lede { animation-delay: 0.3s; }
.motion-ok .hero .actions { animation-delay: 0.4s; }
.motion-ok .entry { animation-delay: 0.55s; }
.motion-paused .flow-steps::after { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .mock--feature { transform: none; }
  .flow-steps::after { display: none; }
}

@media print {
  .hero__stage, .vault, .band__lines, .hero__tools { display: none; }
  .band, .band--cta, .band--data-sovereignty { background: none; color: var(--ink); padding-block: 24px; }
  .band--cta *, .band--data-sovereignty * { color: var(--ink) !important; }
}
