/* ============================================================
   VICHIUM — vichium.kr  (interactive / motion pass)
   Palette & type: VICHIUM Design System (css/vichium-tokens.css).
   Motion has a job here:
   - hero: the city is marked up like a plan (ring + leader draw once)
   - about: the schedule bars grow in stage order when seen
   - tour: scroll drives a pinned stage through the city and its 7 divisions
   ============================================================ */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface-page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px; line-height: 24px;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all; overflow-wrap: break-word;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--teal-signal); outline-offset: 3px; }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 8px 16px; background: var(--teal-600); color: var(--on-brand); font-weight: 600; }
.skip-link:focus { top: 16px; }

:root { --gutter: clamp(16px, 4vw, 64px); --ease: cubic-bezier(.2,.7,.1,1); }

/* ---------- Header ---------- */
.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px var(--gutter);
}
.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo-mark { height: 30px; width: auto; }
.logo-word { height: 14px; width: auto; }
.site-nav { display: flex; gap: clamp(16px, 3vw, 40px); }
.site-nav a { font-size: 14px; color: rgba(255,255,255,.78); padding: 8px 0; }
.site-nav a:hover { color: #fff; }
@media (max-width: 520px) {
  .logo-word { display: none; }
  .site-nav { gap: 16px; }
  .site-nav a { font-size: 13px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  background: var(--teal-900); color: #fff;
  display: flex; align-items: flex-end;
  padding: 120px var(--gutter) clamp(48px, 9vh, 104px);
}
.hero-media { position: absolute; inset: -3%; z-index: -1; will-change: transform; }
.hero-plan { width: 100%; height: 100%; display: block; }
.hero-shade { fill: rgba(6, 53, 64, 0.28); }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(0deg, rgba(6,53,64,.92) 0%, rgba(6,53,64,.25) 48%, rgba(6,53,64,0) 70%),
    linear-gradient(90deg, rgba(6,53,64,.55) 0%, rgba(6,53,64,0) 55%);
}

.plan-ring, .plan-leader { fill: none; stroke: var(--teal-signal); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.plan-ring-2 { stroke-width: 1; stroke-dasharray: 0.006 0.01; opacity: .7; }
.plan-dot { fill: var(--teal-signal); }
.plan-label { fill: #fff; font: 600 34px var(--font-sans); letter-spacing: -0.5px; paint-order: stroke; stroke: rgba(6,53,64,.6); stroke-width: 6px; stroke-linejoin: round; }
.plan-label-sub { fill: rgba(255,255,255,.9); font-weight: 400; font-size: 26px; }

.hero-title {
  font-weight: 300;
  font-size: clamp(44px, 8vw, 128px);
  line-height: 1.06;
  letter-spacing: -0.045em;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.hero-title .line > span { display: inline-block; white-space: nowrap; }
.hero-title .line:nth-child(3) > span { font-weight: 600; }
.hero-sub { margin-top: clamp(20px, 3.5vh, 36px); max-width: 30em; font-size: 16px; line-height: 26px; color: rgba(255,255,255,.8); }
.scroll-hint {
  position: absolute; right: var(--gutter); bottom: clamp(48px, 9vh, 104px);
  writing-mode: vertical-rl; font-size: 12px; letter-spacing: .2em; color: rgba(255,255,255,.7);
  padding-bottom: 64px;
}
.scroll-hint::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 1px; height: 52px; background: rgba(255,255,255,.5); transform-origin: top; }

@media (prefers-reduced-motion: no-preference) {
  .hero-plan image { animation: settle 2600ms var(--ease) both; transform-origin: 54% 42%; }
  .plan-ring, .plan-leader { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1400ms 700ms var(--ease) forwards; }
  .plan-ring-2 { stroke-dasharray: 0.006 0.01; stroke-dashoffset: 0; opacity: 0; animation: fade 900ms 1500ms ease forwards; }
  .plan-leader { animation-delay: 1700ms; animation-duration: 700ms; }
  .plan-dot, .plan-label { opacity: 0; animation: fade 500ms 2200ms ease forwards; }
  .hero-title .line > span { transform: translateY(105%); animation: rise 900ms var(--ease) forwards; }
  .hero-title .line:nth-child(2) > span { animation-delay: 110ms; }
  .hero-title .line:nth-child(3) > span { animation-delay: 220ms; }
  .hero-sub { opacity: 0; animation: fade 700ms 700ms ease forwards; }
  .scroll-hint::after { animation: hint 1800ms 2400ms ease-in-out infinite; }
}
@keyframes settle { from { transform: scale(1.14); } to { transform: scale(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes rise { to { transform: none; } }
@keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* callout placement follows what the slice crop leaves visible */
.plan-callout-tall { display: none; }
@media (max-aspect-ratio: 5/4) {
  .plan-callout-wide { display: none; }
  .plan-callout-tall { display: inline; }
  .plan-label { font-size: 44px; } .plan-label-sub { font-size: 34px; }
}
@media (max-width: 760px) { .scroll-hint { display: none; } }

/* ---------- Shared type ---------- */
.display-2 { font-weight: 300; font-size: clamp(32px, 5vw, 68px); line-height: 1.1; letter-spacing: -0.035em; }
.lead { font-size: 16px; line-height: 28px; color: var(--ink-muted); max-width: 36em; }

/* ---------- About: schedule ---------- */
.about { padding: clamp(80px, 12vw, 160px) var(--gutter); }
.about-head { display: grid; gap: 32px; align-items: end; }
@media (min-width: 960px) { .about-head { grid-template-columns: 1.15fr 1fr; } }

.schedule {
  margin-top: clamp(56px, 8vw, 104px);
  display: grid; row-gap: 10px;
  background-image: repeating-linear-gradient(90deg, var(--border) 0 1px, transparent 1px 25%);
  border-right: 1px solid var(--border);
  padding-bottom: 10px;
}
.schedule-axis { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); margin-bottom: 14px; }
.schedule-axis span { padding: 12px 12px 0; font-size: 13px; line-height: 20px; font-weight: 600; }
.schedule-row { display: grid; grid-template-columns: repeat(4, 1fr); }
.bar {
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  min-height: 76px; padding: 12px 16px;
  background: var(--teal-600); color: var(--on-brand);
  transform-origin: left center;
}
.bar strong { font-size: 17px; line-height: 24px; font-weight: 600; }
.bar span { font-size: 13px; line-height: 20px; opacity: .88; }
.step-1 .bar { grid-column: 1; } .step-2 .bar { grid-column: 2; }
.step-3 .bar { grid-column: 3; } .step-4 .bar { grid-column: 4; }
.step-pmo { margin-top: 10px; }
.bar-pmo { grid-column: 1 / -1; background: var(--teal-900); min-height: 88px; }
.bar-pmo strong { color: var(--teal-signal); }

/* grow in stage order once the schedule is seen (class added by JS) */
.js .schedule .bar { transform: scaleX(0); }
.js .schedule .bar > * { opacity: 0; transition: opacity 400ms ease; }
.js .schedule.is-drawn .bar { transform: scaleX(1); transition: transform 700ms var(--ease); }
.js .schedule.is-drawn .bar > * { opacity: 1; }
.js .schedule.is-drawn .step-1 .bar, .js .schedule.is-drawn .step-1 .bar > * { transition-delay: 0ms; }
.js .schedule.is-drawn .step-2 .bar, .js .schedule.is-drawn .step-2 .bar > * { transition-delay: 220ms; }
.js .schedule.is-drawn .step-3 .bar, .js .schedule.is-drawn .step-3 .bar > * { transition-delay: 440ms; }
.js .schedule.is-drawn .step-4 .bar, .js .schedule.is-drawn .step-4 .bar > * { transition-delay: 660ms; }
.js .schedule.is-drawn .bar-pmo { transition-duration: 1300ms; transition-delay: 900ms; }
.js .schedule.is-drawn .bar-pmo > * { transition-delay: 1700ms; }

@media (max-width: 759px) {
  .schedule { background: none; border-right: 0; }
  .schedule-axis { display: none; }
  .schedule-row { display: block; }
  .step-2 { padding-left: 10%; } .step-3 { padding-left: 20%; } .step-4 { padding-left: 30%; }
  .bar::before { content: attr(data-stage); font-size: 12px; line-height: 16px; opacity: .75; }
}

/* ---------- Tour: pinned stage ---------- */
.tour { position: relative; height: calc(8 * 90vh + 100vh); background: var(--teal-900); color: #fff; }
.tour-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.tour-media, .tour-shade { position: absolute; inset: 0; }
.tour-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.12);
  transition: opacity 900ms ease, transform 7000ms linear;
}
.tour-media img.is-active { opacity: 1; transform: scale(1); }
.tour-shade {
  background:
    linear-gradient(90deg, rgba(6,53,64,.9) 0%, rgba(6,53,64,.55) 45%, rgba(6,53,64,.1) 75%),
    linear-gradient(0deg, rgba(6,53,64,.6) 0%, rgba(6,53,64,0) 40%);
}

.tour-scenes { position: absolute; inset: 0; padding: 0 var(--gutter); display: grid; align-items: center; }
.scene {
  grid-area: 1 / 1; max-width: min(760px, 78vw);
  opacity: 0; visibility: hidden;
  transition: opacity 500ms ease, visibility 500ms;
}
.scene.is-active { opacity: 1; visibility: visible; }
.scene > * { transform: translateY(28px); transition: transform 800ms var(--ease); }
.scene.is-active > * { transform: none; }
.scene.is-active > *:nth-child(2) { transition-delay: 80ms; }
.scene.is-active > *:nth-child(3) { transition-delay: 160ms; }

.scene-no { font-size: 15px; font-weight: 600; color: var(--teal-signal); margin-bottom: 16px; }
.scene-title { font-weight: 300; font-size: clamp(40px, 7vw, 112px); line-height: 1.04; letter-spacing: -0.045em; }
.scene-text { margin-top: 24px; max-width: 30em; font-size: 17px; line-height: 28px; color: rgba(255,255,255,.84); }
.scene-intro .scene-title { font-weight: 600; }

.pillars { margin-top: clamp(32px, 6vh, 64px); display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 clamp(24px, 4vw, 56px); }
.pillars dt { font-weight: 300; font-size: clamp(30px, 4.4vw, 64px); line-height: 1; letter-spacing: -0.04em; color: var(--teal-signal); }
.pillars dd { margin-top: 10px; font-size: 13px; line-height: 20px; color: rgba(255,255,255,.72); }

.tour-rail {
  position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 4px; align-items: flex-end;
}
.tour-rail button {
  background: none; border: 0; cursor: pointer;
  color: rgba(255,255,255,.5); font-size: 13px; line-height: 20px; padding: 6px 0 6px 24px;
  position: relative; transition: color 200ms ease;
}
.tour-rail button::after {
  content: ""; position: absolute; right: -14px; top: 50%; width: 6px; height: 1px; background: currentColor;
  transition: width 200ms ease;
}
.tour-rail button:hover { color: #fff; }
.tour-rail button.is-active { color: var(--teal-signal); font-weight: 600; }
.tour-rail button.is-active::after { width: 14px; right: -22px; }
.rail-progress { display: none; }

@media (max-width: 760px) {
  .tour-shade { background: linear-gradient(0deg, rgba(6,53,64,.95) 0%, rgba(6,53,64,.6) 55%, rgba(6,53,64,.2) 100%); }
  .tour-scenes { align-items: end; padding-bottom: 72px; }
  .scene { max-width: 100%; }
  .scene-text { font-size: 15px; line-height: 24px; }
  .pillars { grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
  .pillars dt { font-size: 26px; white-space: nowrap; }
  .tour-rail {
    top: auto; bottom: 24px; left: var(--gutter); right: var(--gutter); transform: none;
    flex-direction: row; justify-content: space-between; align-items: center;
  }
  .tour-rail button { padding: 8px 4px; }
  .tour-rail button::after { display: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900); color: var(--nav-ink-muted);
  padding: 56px var(--gutter);
  display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 24px;
}
.footer-lockup { width: 80px; height: auto; }
.footer-tagline { font-size: 13px; line-height: 20px; }
.footer-copy { font-size: 12px; line-height: 16px; }
@media (max-width: 640px) { .site-footer { grid-template-columns: 1fr; } }

/* ---------- Reduced motion: no pinning theatre, content stays readable ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .schedule .bar { transform: none; }
  .js .schedule .bar > * { opacity: 1; }
}

/* ---------- Division scenes: committee-level copy ---------- */
.scene-div .scene-title { font-size: clamp(30px, 4.2vw, 64px); line-height: 1.12; letter-spacing: -0.035em; }
.scene-lead { margin-top: 24px; font-size: 18px; line-height: 28px; font-weight: 600; color: var(--teal-signal); }
.scene-div .scene-text { margin-top: 12px; max-width: 36em; }
.scene.is-active > *:nth-child(4) { transition-delay: 240ms; }
@media (max-width: 760px) {
  .scene-div .scene-title { font-size: 26px; }
  .scene-div .scene-title br { display: none; }
  .scene-lead { margin-top: 14px; font-size: 15px; line-height: 22px; }
  .scene-div .scene-text { font-size: 14px; line-height: 22px; }
}
