/* namjaemin.kr — design system
   One visual language, reused everywhere: five "risk layers".
   Mobile first. Interaction only where it changes what the visitor understands. */

:root {
  --ink: #171917;
  --muted: #686c68;
  --paper: #f0efe9;
  --paper-2: #e8e7e0;
  --line: rgba(23, 25, 23, 0.14);
  --line-strong: rgba(23, 25, 23, 0.28);
  --glass: rgba(255, 255, 255, 0.52);
  --accent: #395548;
  --accent-soft: rgba(57, 85, 72, 0.12);
  --warm: #9a8060;
  --danger: #7a4d45;
  --dark: #171917;
  --dark-text: #f0efe9;
  --dark-muted: rgba(240, 239, 233, 0.6);
  --dark-line: rgba(240, 239, 233, 0.16);
  --dark-line-strong: rgba(240, 239, 233, 0.4);
  --radius-lg: 32px;
  --radius-md: 22px;
  --max: 1180px;
  --gutter: 22px;
  --ease: cubic-bezier(.18, .82, .22, 1);
  color-scheme: light;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 680px at 84% -10%, rgba(57, 85, 72, 0.08), transparent 62%),
    var(--paper);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-height: 1.5;
}
button, a, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 520; }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.site-shell { overflow: clip; }
.section-pad {
  padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2));
  padding-right: max(var(--gutter), calc((100vw - var(--max)) / 2));
}
.eyebrow { font-size: 11px; letter-spacing: .15em; font-weight: 650; text-transform: uppercase; }
.eyebrow.muted { color: var(--muted); }
.section-no { display: inline-flex; margin-right: 12px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar ---------- */
.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .15em; font-weight: 650; }
.brand i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.topnav { display: flex; gap: 18px; font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.topnav a { padding: 12px 4px; margin: -12px -4px; transition: color 200ms ease; }
.topnav a:hover, .topnav a[aria-current="page"] { color: var(--ink); }

/* ---------- hero (landing) ---------- */
.hero {
  min-height: calc(100svh - 58px);
  display: flex;
  flex-direction: column;
  position: relative;
  padding-top: 10px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.hero-meta { display: flex; align-items: center; gap: 10px; }
.meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink); opacity: .42; }
.hero-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .78fr);
  align-items: center;
  gap: 7vw;
  padding: 8vh 0 10vh;
}
.hero-copy h1, .page-title {
  margin: 0;
  max-width: 780px;
  font-size: clamp(50px, 7.1vw, 112px);
  line-height: .94;
  letter-spacing: -.065em;
  font-weight: 530;
}
.hero-sub, .lead {
  max-width: 540px;
  margin: 34px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 21px);
  line-height: 1.62;
  letter-spacing: -.02em;
}
.hero-sub strong, .lead strong { color: var(--ink); font-weight: 590; }
.hero-index { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 28px; color: var(--muted); font-size: 12px; letter-spacing: .02em; }
.hero-index i { width: 18px; height: 1px; background: var(--line-strong); }
.hero-index a { transition: color 200ms ease; }
.hero-index a:hover { color: var(--ink); }
.hero-object-wrap { position: relative; min-height: 460px; display: flex; align-items: center; justify-content: center; perspective: 1200px; }
.object-caption { position: absolute; bottom: 20px; margin: 0; color: var(--muted); font-size: 11px; letter-spacing: .02em; }
.scroll-cue { display: inline-flex; align-self: flex-start; align-items: center; gap: 10px; color: var(--muted); font-size: 9px; letter-spacing: .18em; }
.scroll-cue i { width: 52px; height: 1px; background: var(--line-strong); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform: translateX(-100%); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 0%,15% { transform: translateX(-100%); } 55%,100% { transform: translateX(100%); } }

.hero.entrance { min-height: 0; border-bottom: 0; }
.hero.entrance .hero-grid { padding: 6vh 0 2vh; }
.entrance-index { padding-top: 24px; }
.cta-row.quiet { margin-top: 30px; gap: 12px 28px; }

/* ---------- page hero (sub pages) ---------- */
.page-hero {
  position: relative;
  padding-top: clamp(48px, 9vh, 110px);
  padding-bottom: clamp(44px, 8vh, 96px);
  border-bottom: 1px solid var(--line);
}
.page-hero .hero-grid { padding: 0; align-items: center; }
.page-hero .eyebrow { display: inline-flex; margin-bottom: 22px; }
.page-hero .page-title { font-size: clamp(42px, 6.2vw, 96px); }
.page-hero .hero-grid .page-title { font-size: clamp(38px, 4.8vw, 76px); }
.page-hero .hero-object-wrap { min-height: 420px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 40px; margin-top: 38px; }

/* ---------- the risk layers ---------- */
.stack { width: min(78vw, 420px); height: 340px; position: relative; transform-style: preserve-3d; perspective: 1100px; }
.risk-layer {
  position: absolute;
  left: 7%; right: 7%; top: 50%; height: 126px;
  border: 1px solid rgba(23,25,23,.24);
  border-radius: 22px;
  background: linear-gradient(120deg, rgba(255,255,255,.7), rgba(255,255,255,.28));
  box-shadow: 0 22px 54px rgba(23,25,23,.05), inset 0 1px 0 rgba(255,255,255,.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translate3d(0, var(--base-y), var(--base-z)) rotateX(64deg) rotateZ(-7deg);
  transform-origin: center;
  transition: transform 900ms var(--ease), opacity 650ms ease, border-color 600ms ease, background 600ms ease;
  overflow: hidden;
}
.risk-layer::before { content: ""; position: absolute; inset: 0; opacity: .55; background: linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent); transform: translateX(-100%); transition: transform 1200ms cubic-bezier(.2,.8,.2,1); }
.hero-object-wrap:hover .risk-layer::before { transform: translateX(100%); }
.layer-glow { position: absolute; width: 50%; height: 150%; left: 52%; top: -20%; background: radial-gradient(circle, rgba(57,85,72,.11), transparent 64%); }
.layer-label { position: absolute; inset: 16px 18px auto 18px; display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 14px; opacity: 0; transition: opacity 500ms ease, transform 500ms ease; transform: translateY(6px); }
.layer-name { font-size: 16px; font-weight: 610; letter-spacing: -.025em; }
.layer-short { justify-self: end; font-size: 11px; color: var(--muted); }
.layer-state { grid-column: 1 / -1; display: none; font-size: 11px; color: var(--accent); }

/* static, spread-out variant used on sub pages (no scroll needed) */
.stack.spread .layer-0 { transform: translate3d(-80px, -170px, 0) rotateX(58deg) rotateZ(-9deg); }
.stack.spread .layer-1 { transform: translate3d(-42px, -88px, 16px) rotateX(58deg) rotateZ(-8deg); }
.stack.spread .layer-2 { transform: translate3d(0, -2px, 32px) rotateX(58deg) rotateZ(-7deg); }
.stack.spread .layer-3 { transform: translate3d(42px, 86px, 48px) rotateX(58deg) rotateZ(-6deg); }
.stack.spread .layer-4 { transform: translate3d(80px, 168px, 64px) rotateX(58deg) rotateZ(-5deg); }
.stack.spread .layer-label { opacity: 1; transform: translateY(0); }

/* ---------- scroll narrative (dark) ---------- */
.narrative { min-height: 300vh; position: relative; background: var(--dark); color: var(--dark-text); }
.narrative-sticky { position: sticky; top: 0; height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; padding: 28px max(var(--gutter), calc((100vw - var(--max)) / 2)); overflow: hidden; }
.narrative-head { color: rgba(240,239,233,.62); }
.narrative .section-no { color: rgba(240,239,233,.44); }
.narrative-stage { position: relative; display: flex; justify-content: flex-start; align-items: center; min-height: 0; padding-left: 2vw; perspective: 1200px; }
.narrative-stack { width: min(70vw, 560px); height: 440px; }
.narrative .risk-layer { background: linear-gradient(120deg, rgba(240,239,233,.11), rgba(240,239,233,.035)); border-color: rgba(240,239,233,.25); box-shadow: 0 24px 80px rgba(0,0,0,.16); }
.narrative .layer-name { color: var(--dark-text); }
.narrative .layer-short { color: rgba(240,239,233,.52); }
.narrative[data-active="0"] .risk-layer { transform: translate3d(0, var(--base-y), var(--base-z)) rotateX(64deg) rotateZ(-7deg); }
.narrative[data-active="1"] .layer-0 { transform: translate3d(-80px, -170px, 0) rotateX(58deg) rotateZ(-9deg); }
.narrative[data-active="1"] .layer-1 { transform: translate3d(-42px, -88px, 16px) rotateX(58deg) rotateZ(-8deg); }
.narrative[data-active="1"] .layer-2 { transform: translate3d(0, -2px, 32px) rotateX(58deg) rotateZ(-7deg); }
.narrative[data-active="1"] .layer-3 { transform: translate3d(42px, 86px, 48px) rotateX(58deg) rotateZ(-6deg); }
.narrative[data-active="1"] .layer-4 { transform: translate3d(80px, 168px, 64px) rotateX(58deg) rotateZ(-5deg); }
.narrative[data-active="1"] .layer-label,
.narrative[data-active="2"] .layer-label { opacity: 1; transform: translateY(0); }
.narrative[data-active="2"] .layer-0,
.narrative[data-active="2"] .layer-1 { transform: translate3d(-108px, -76px, 0) rotateX(56deg) rotateZ(-8deg); border-color: rgba(240,239,233,.17); opacity: .48; }
.narrative[data-active="2"] .layer-2 { transform: translate3d(-44px, 4px, 25px) rotateX(56deg) rotateZ(-7deg); }
.narrative[data-active="2"] .layer-3,
.narrative[data-active="2"] .layer-4 { transform: translate3d(92px, 72px, 54px) rotateX(56deg) rotateZ(-5deg); border-color: rgba(207,224,214,.52); background: linear-gradient(120deg, rgba(101,137,119,.18), rgba(240,239,233,.04)); }
.axis-label { position: absolute; font-size: 10px; letter-spacing: .12em; color: rgba(240,239,233,0); transition: color 600ms ease, transform 800ms var(--ease); }
.axis-a { left: 22%; bottom: 23%; transform: translateX(25px); }
.axis-b { right: 20%; top: 25%; transform: translateX(-25px); }
.narrative[data-active="2"] .axis-label { color: rgba(240,239,233,.55); transform: translateX(0); }
.story-steps { position: relative; z-index: 4; margin-top: -100svh; padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2)); padding-right: max(var(--gutter), calc((100vw - var(--max)) / 2)); pointer-events: none; }
.story-step { min-height: 100vh; display: flex; justify-content: flex-end; flex-direction: column; padding: 0 0 10vh; max-width: 580px; margin-left: auto; opacity: .18; transform: translateY(20px); transition: opacity 500ms ease, transform 500ms ease; }
.story-step.active { opacity: 1; transform: translateY(0); }
.narrative[data-active="-1"] .story-step { opacity: 0; }
.step-inner { position: sticky; bottom: 10vh; }
.story-step h2 { margin: 8px 0 16px; font-size: clamp(36px, 5vw, 70px); line-height: 1.04; letter-spacing: -.055em; font-weight: 510; }
.story-step p:not(.kicker) { max-width: 470px; margin: 0; font-size: 15px; line-height: 1.75; color: rgba(240,239,233,.62); }
.kicker, .reading-kicker { margin: 0; font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: rgba(240,239,233,.48); }
.micro-mark { display: inline-flex; margin-top: 24px; padding: 9px 12px; border: 1px solid rgba(240,239,233,.2); border-radius: 99px; font-size: 10px; letter-spacing: .06em; color: rgba(240,239,233,.64); }

/* ---------- generic blocks ---------- */
.block { padding-top: 120px; padding-bottom: 136px; }
.block.tight { padding-top: 110px; padding-bottom: 120px; }
.block.tinted { background: var(--paper-2); }
.section-heading { display: grid; grid-template-columns: .8fr 1.2fr; gap: 32px; align-items: end; margin-bottom: 52px; }
.section-heading > div { align-self: start; }
.section-heading h2 { margin: 0; font-size: clamp(38px, 5vw, 72px); line-height: 1; letter-spacing: -.055em; font-weight: 520; }
.section-heading p { grid-column: 2; margin: -12px 0 0; color: var(--muted); font-size: 14px; max-width: 640px; line-height: 1.7; }

/* statement: one big claim + short explanation */
.statement { max-width: 920px; }
.statement .eyebrow { display: inline-flex; margin-bottom: 26px; }
.statement h2 { margin: 0 0 22px; font-size: clamp(34px, 4.8vw, 68px); line-height: 1.02; letter-spacing: -.055em; font-weight: 520; }
.statement p { margin: 0; max-width: 560px; color: var(--muted); font-size: 15px; line-height: 1.75; }

/* collapsible principle rows */
.principle-list { border-top: 1px solid var(--line-strong); }
.principle-row { border-bottom: 1px solid var(--line); }
.principle-row > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 70px 1fr 24px; gap: 16px; align-items: start; padding: 34px 0; }
.principle-row > summary::-webkit-details-marker { display: none; }
.principle-no { color: var(--muted); font-size: 11px; padding-top: 5px; font-variant-numeric: tabular-nums; }
.principle-copy h3 { margin: 0 0 10px; font-size: clamp(24px, 3.1vw, 44px); font-weight: 520; letter-spacing: -.045em; line-height: 1.1; }
.principle-copy p { margin: 0; max-width: 720px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.principle-copy h3:last-child, .index-row h3:last-child { margin-bottom: 0; }
.principle-copy .eyebrow, .index-row .eyebrow { display: block; margin-bottom: 10px; }
.principle-list.compact > .principle-row > summary { padding: 26px 0; align-items: center; }
.principle-list.compact .principle-copy h3 { font-size: clamp(20px, 2.4vw, 34px); }
.principle-list.compact .plus { margin-top: 0; }
.plus { width: 18px; height: 18px; position: relative; margin-top: 6px; flex: none; }
.plus::before, .plus::after { content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 1px; background: currentColor; transform: translate(-50%,-50%); transition: transform 240ms ease; }
.plus::after { transform: translate(-50%,-50%) rotate(90deg); }
details[open] .plus::after { transform: translate(-50%,-50%) rotate(0); }
.principle-detail { display: grid; grid-template-columns: 70px 1fr 24px; gap: 16px; padding: 0 0 34px; }
.detail-line { grid-column: 2; width: 100%; height: 1px; background: var(--line); margin-bottom: 16px; }
.principle-detail p { grid-column: 2; margin: 0; max-width: 760px; line-height: 1.7; font-size: 14px; color: var(--muted); }

/* non-collapsible index rows (navigation lists, numbered steps) */
.index-list { border-top: 1px solid var(--line-strong); }
.index-row { display: grid; grid-template-columns: 70px 1fr 24px; gap: 16px; align-items: start; padding: 30px 0; border-bottom: 1px solid var(--line); }
.index-row .principle-no { padding-top: 6px; }
.index-row h3 { margin: 0 0 8px; font-size: clamp(22px, 2.8vw, 40px); font-weight: 520; letter-spacing: -.045em; line-height: 1.1; }
.index-row p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; max-width: 680px; }
.index-row .arrow { justify-self: end; margin-top: 8px; font-size: 14px; color: var(--muted); transition: transform 250ms var(--ease), color 250ms ease; }
a.index-row:hover .arrow { transform: translate(3px, -3px); color: var(--ink); }
a.index-row:hover h3 { color: var(--accent); }
.index-row h3 { transition: color 250ms ease; }

/* three short statements side by side */
.triad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; border-top: 1px solid var(--line-strong); padding-top: 34px; }
.triad .eyebrow { color: var(--muted); }
.triad h3 { margin: 16px 0 10px; font-size: clamp(22px, 2.2vw, 30px); font-weight: 530; letter-spacing: -.04em; line-height: 1.15; }
.triad p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

/* underline-style call to action */
.line-cta { display: inline-flex; align-items: center; justify-content: space-between; gap: 40px; min-width: 280px; padding: 14px 0; border-bottom: 1px solid var(--line-strong); font-size: 14px; transition: border-color 220ms ease; }
.line-cta:hover { border-color: var(--ink); }
.line-cta span { transition: transform 250ms var(--ease); }
.line-cta:hover span { transform: translate(3px, -3px); }
.text-link { color: var(--muted); font-size: 13px; transition: color 200ms ease; }
.text-link:hover { color: var(--ink); }
.back { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; margin-top: 40px; transition: color 200ms ease; }
.back:hover { color: var(--ink); }
.disclaimer { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.7; max-width: 760px; }

/* dark variant for any block */
.dark { background: var(--dark); color: var(--dark-text); }
.dark .eyebrow, .dark .muted, .dark .section-no, .dark .principle-no, .dark .statement p, .dark .section-heading p, .dark .index-row p, .dark .principle-copy p, .dark .principle-detail p, .dark .disclaimer, .dark .text-link, .dark .back { color: var(--dark-muted); }
.dark .index-list, .dark .principle-list, .dark .triad { border-top-color: var(--dark-line-strong); }
.dark .index-row, .dark .principle-row { border-bottom-color: var(--dark-line); }
.dark .detail-line { background: var(--dark-line); }
.dark .index-row .arrow { color: var(--dark-muted); }
.dark a.index-row:hover .arrow, .dark a.index-row:hover h3, .dark .text-link:hover, .dark .back:hover { color: var(--dark-text); }
.dark .line-cta { border-color: var(--dark-line-strong); }
.dark .line-cta:hover { border-color: var(--dark-text); }
.dark :focus-visible { outline-color: var(--dark-text); }

/* ---------- case card ---------- */
.case-heading { margin-bottom: 50px; }
.case-card { border: 1px solid var(--line-strong); border-radius: var(--radius-lg); overflow: hidden; background: rgba(255,255,255,.3); box-shadow: 0 30px 80px rgba(23,25,23,.045); }
.case-topline { display: flex; justify-content: space-between; align-items: center; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.case-person { font-size: 14px; font-weight: 620; }
.case-note { margin-left: 10px; color: var(--muted); font-size: 11px; }
.case-premium { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
.case-stage-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .78fr); min-height: 520px; }
.case-visual { position: relative; display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--line); overflow: hidden; perspective: 1200px; }
.case-stack { width: min(72vw, 460px); height: 360px; }
.case-stack .layer-label { opacity: 0; }
.case-stage-shell.stage-0 .case-stack { opacity: .28; filter: blur(.2px); }
.case-stage-shell.stage-1 .case-stack .risk-layer { transform: translate3d(0, var(--base-y), var(--base-z)) rotateX(59deg) rotateZ(-6deg); }
.case-stage-shell.stage-1 .case-stack .layer-label,
.case-stage-shell.stage-2 .case-stack .layer-label { opacity: 1; transform: translateY(0); }
.case-stage-shell.stage-2 .case-stack .layer-state { display: inline-block; }
.case-stage-shell.stage-2 .case-stack .layer-short { display: none; }
.case-stage-shell.stage-2 .case-stack .risk-layer { transform: translate3d(0, var(--base-y), var(--base-z)) rotateX(52deg) rotateZ(-4deg); }
.case-stage-shell.stage-2 .case-stack .layer-0 { border-color: rgba(57,85,72,.28); }
.case-stage-shell.stage-2 .case-stack .layer-1 { border-color: rgba(154,128,96,.52); background: rgba(154,128,96,.08); }
.case-stage-shell.stage-2 .case-stack .layer-2 { border-color: rgba(122,77,69,.58); background: rgba(122,77,69,.08); }
.policy-cloud { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 500ms ease; }
.case-stage-shell.stage-0 .policy-cloud { opacity: 1; }
.policy-chip { position: absolute; display: inline-flex; align-items: center; justify-content: center; min-width: 72px; padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: 99px; background: rgba(240,239,233,.8); backdrop-filter: blur(10px); font-size: 11px; box-shadow: 0 18px 46px rgba(23,25,23,.07); animation: float 5s ease-in-out infinite alternate; }
.p1 { left: 14%; top: 24%; }
.p2 { right: 15%; top: 19%; animation-delay: -1.2s; }
.p3 { left: 22%; bottom: 22%; animation-delay: -2.5s; }
.p4 { right: 19%; bottom: 28%; animation-delay: -3.2s; }
.p5 { left: 44%; top: 45%; animation-delay: -4.1s; }
@keyframes float { to { transform: translateY(-8px); } }
.case-reading { display: flex; align-items: center; padding: 48px; }
.case-reading > div { display: none; max-width: 390px; animation: rise .6s var(--ease) both; }
.case-stage-shell.stage-0 .case-reading > [data-stage="0"],
.case-stage-shell.stage-1 .case-reading > [data-stage="1"],
.case-stage-shell.stage-2 .case-reading > [data-stage="2"] { display: block; }
.reading-kicker { color: var(--muted); }
.case-reading h3 { margin: 10px 0 0; font-size: clamp(28px, 3.6vw, 52px); line-height: 1.05; letter-spacing: -.05em; font-weight: 520; }
.case-reading p:last-child { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.stage-control { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.stage-button { appearance: none; border: 0; border-right: 1px solid var(--line); background: transparent; padding: 18px 22px; display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--muted); font: inherit; transition: background 220ms ease, color 220ms ease; }
.stage-button:last-child { border-right: 0; }
.stage-button.active { background: rgba(255,255,255,.52); color: var(--ink); }
.stage-index { font-size: 9px; opacity: .62; }
.swipe-hint { display: none; }

/* ---------- method / faq ---------- */
.method-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 8vw; }
.method-intro .eyebrow { margin-left: 8px; }
.method-intro h2 { margin: 36px 0 20px; font-size: clamp(38px, 5vw, 72px); letter-spacing: -.055em; line-height: 1; font-weight: 520; }
.method-intro p { max-width: 430px; color: var(--muted); line-height: 1.7; font-size: 14px; }
.method-details { border-top: 1px solid var(--line-strong); }
.method-details details { border-bottom: 1px solid var(--line); }
.method-details summary { list-style: none; display: grid; grid-template-columns: 1fr 24px; gap: 20px; cursor: pointer; padding: 26px 0; font-size: 17px; letter-spacing: -.02em; }
.method-details summary::-webkit-details-marker { display: none; }
.method-details p { margin: 0; padding: 0 44px 28px 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.method-more { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 28px; }

/* ---------- method flow (Risk → Decision) ---------- */
.flow { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line-strong); }
.flow-step { padding: 28px 22px 34px 0; border-right: 1px solid var(--line); margin-right: 22px; }
.flow-step:last-child { border-right: 0; margin-right: 0; }
.flow-step .principle-no { display: block; margin-bottom: 22px; }
.flow-step h3 { margin: 0 0 10px; font-size: clamp(20px, 1.9vw, 28px); font-weight: 530; letter-spacing: -.03em; }
.flow-step p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.flow-hint { margin: 10px 0 0; }

/* ---------- contact page (light) ---------- */
.contact-page { min-height: calc(100svh - 58px); display: flex; align-items: center; border-bottom: 0; }
.contact-signature.light { margin: 18px 0 26px; color: var(--muted); }
.contact-signature.light strong { color: var(--ink); }
.contact-page .disclaimer { margin-top: 48px; }

/* ---------- contact (dark finale) ---------- */
.contact { min-height: 0; display: flex; align-items: center; background: var(--dark); color: var(--dark-text); }
.contact-inner { width: 100%; padding: 18vh 0 48px; }
.contact .eyebrow { color: rgba(240,239,233,.48); }
.contact h2 { margin: 26px 0 0; max-width: 900px; font-size: clamp(46px, 7.4vw, 108px); line-height: .95; letter-spacing: -.065em; font-weight: 500; }
.contact p { max-width: 530px; color: rgba(240,239,233,.58); font-size: 14px; line-height: 1.72; }
.contact-cta { margin-top: 40px; display: inline-flex; align-items: center; justify-content: space-between; gap: 40px; min-width: 280px; border-bottom: 1px solid rgba(240,239,233,.42); padding: 14px 0; font-size: 14px; transition: border-color 220ms ease; }
.contact-cta:hover { border-color: var(--dark-text); }
.contact-signature { display: flex; align-items: baseline; gap: 12px; margin-top: clamp(56px, 10vh, 110px); color: rgba(240,239,233,.55); }
.contact-signature strong { color: var(--dark-text); font-size: 13px; font-weight: 600; }
.contact-signature span { font-size: 11px; }
.contact-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 24px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--dark-line); color: rgba(240,239,233,.45); font-size: 11px; letter-spacing: .04em; }
.contact-foot nav { display: flex; gap: 18px; }
.contact-foot a:hover { color: var(--dark-text); }
.contact .disclaimer { margin-top: 36px; color: rgba(240,239,233,.42); font-size: 11px; }

/* ---------- site footer ---------- */
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 28px; padding-bottom: 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.site-footer nav { display: flex; gap: 18px; }
.site-footer a:hover { color: var(--ink); }

/* ---------- motion ---------- */
.reveal-in { animation: rise .9s var(--ease) both; }
.hero-object-wrap.reveal-in { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- mobile ---------- */
@media (max-width: 820px) {
  :root { --gutter: 20px; }
  .topbar { padding-top: 18px; padding-bottom: 18px; }
  .topnav { gap: 14px; }
  .hero { min-height: calc(100svh - 50px); padding-top: 6px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 4vh; padding-top: 7vh; align-content: center; }
  .hero-copy h1 { font-size: clamp(44px, 13vw, 72px); }
  .hero-sub, .lead { margin-top: 22px; font-size: 15px; max-width: 360px; }
  .hero-object-wrap { min-height: 290px; margin-top: -18px; }
  .hero .stack { width: min(92vw, 380px); height: 270px; }
  .risk-layer { height: 104px; border-radius: 18px; }
  .object-caption { bottom: 0; }
  .scroll-cue { margin-top: 10px; }

  .page-hero .page-title { font-size: clamp(34px, 10.2vw, 56px); }
  .page-hero .hero-object-wrap { min-height: 330px; margin-top: 0; }
  .page-hero .stack { width: min(92vw, 380px); height: 300px; }
  .stack.spread .layer-0 { transform: translate3d(-30px, -124px, 0) rotateX(58deg) rotateZ(-9deg); }
  .stack.spread .layer-1 { transform: translate3d(-15px, -64px, 14px) rotateX(58deg) rotateZ(-8deg); }
  .stack.spread .layer-2 { transform: translate3d(0, 0, 28px) rotateX(58deg) rotateZ(-7deg); }
  .stack.spread .layer-3 { transform: translate3d(15px, 64px, 42px) rotateX(58deg) rotateZ(-6deg); }
  .stack.spread .layer-4 { transform: translate3d(30px, 124px, 56px) rotateX(58deg) rotateZ(-5deg); }

  .narrative { min-height: 0; }
  .narrative-stage { justify-content: center; align-items: flex-start; padding-top: 8vh; padding-left: 0; }
  .narrative-stack { width: min(92vw, 430px); height: 340px; }
  .story-step { min-height: 100vh; max-width: 100%; padding-bottom: 7vh; justify-content: flex-end; }
  .step-inner { bottom: 7vh; }
  .story-step h2 { font-size: clamp(34px, 10.5vw, 58px); max-width: 520px; }
  .story-step p:not(.kicker) { max-width: 390px; }
  .narrative[data-active="1"] .layer-0 { transform: translate3d(-30px, -124px, 0) rotateX(58deg) rotateZ(-9deg); }
  .narrative[data-active="1"] .layer-1 { transform: translate3d(-15px, -64px, 14px) rotateX(58deg) rotateZ(-8deg); }
  .narrative[data-active="1"] .layer-2 { transform: translate3d(0, 0, 28px) rotateX(58deg) rotateZ(-7deg); }
  .narrative[data-active="1"] .layer-3 { transform: translate3d(15px, 64px, 42px) rotateX(58deg) rotateZ(-6deg); }
  .narrative[data-active="1"] .layer-4 { transform: translate3d(30px, 124px, 56px) rotateX(58deg) rotateZ(-5deg); }
  .narrative[data-active="2"] .layer-0,
  .narrative[data-active="2"] .layer-1 { transform: translate3d(-44px, -52px, 0) rotateX(56deg) rotateZ(-8deg); }
  .narrative[data-active="2"] .layer-2 { transform: translate3d(-16px, 2px, 22px) rotateX(56deg) rotateZ(-7deg); }
  .narrative[data-active="2"] .layer-3,
  .narrative[data-active="2"] .layer-4 { transform: translate3d(40px, 48px, 45px) rotateX(56deg) rotateZ(-5deg); }
  .axis-a { left: 8%; bottom: 26%; }
  .axis-b { right: 7%; top: 24%; }

  .block { padding-top: 80px; padding-bottom: 92px; }
  .block.tight { padding-top: 80px; padding-bottom: 90px; }
  .section-heading { grid-template-columns: 1fr; gap: 22px; margin-bottom: 34px; }
  .section-heading h2 { font-size: clamp(34px, 10vw, 44px); }
  .section-heading p { grid-column: 1; margin: -10px 0 0; }
  .principle-row > summary, .principle-detail, .index-row { grid-template-columns: 42px 1fr 20px; gap: 10px; }
  .principle-row > summary { padding: 28px 0; }
  .principle-copy h3, .index-row h3 { font-size: 26px; }
  .principle-copy p, .index-row p { font-size: 13px; }
  .triad { grid-template-columns: 1fr; gap: 30px; }
  .triad > div + div { border-top: 1px solid var(--line); padding-top: 26px; }
  .dark .triad > div + div { border-top-color: var(--dark-line); }

  .case-heading { margin-bottom: 36px; }
  .case-card { border-radius: 24px; }
  .case-topline { padding: 18px; }
  .case-note { display: none; }
  .case-stage-shell { grid-template-columns: 1fr; min-height: 0; touch-action: pan-y; }
  .case-visual { min-height: 360px; border-right: 0; border-bottom: 1px solid var(--line); }
  .case-stack { width: min(94vw, 430px); height: 310px; }
  .case-reading { min-height: 150px; padding: 26px 22px; align-items: flex-start; }
  .case-reading h3 { font-size: 32px; }
  .stage-button { padding: 16px 12px; justify-content: center; }
  .swipe-hint { display: block; margin: 12px 0 14px; text-align: center; color: var(--muted); font-size: 10px; }
  .p1 { left: 9%; top: 23%; }
  .p2 { right: 8%; top: 18%; }
  .p3 { left: 13%; bottom: 22%; }
  .p4 { right: 10%; bottom: 25%; }

  .method-grid { grid-template-columns: 1fr; gap: 54px; }
  .flow { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); }
  .flow::-webkit-scrollbar { display: none; }
  .flow-step { flex: 0 0 70vw; max-width: 300px; scroll-snap-align: start; padding: 24px 16px 28px 0; margin-right: 16px; }
  .flow-step .principle-no { margin-bottom: 16px; }
  .principle-list.compact > .principle-row > summary { padding: 20px 0; }
  .principle-list.compact .principle-copy h3 { font-size: 20px; }
  .hero.entrance .hero-grid { padding-top: 4vh; }
  .entrance-index { padding-top: 8px; }
  .contact-page { min-height: calc(100svh - 50px); }
  .contact-inner { padding: 14vh 0 32px; }
  .contact h2 { font-size: clamp(44px, 14vw, 74px); }
  .contact-signature { margin-top: 56px; }
  .line-cta, .contact-cta { min-width: min(280px, 100%); }
}

/* short phones: keep the narrative stage and the step text apart */
@media (max-width: 820px) and (max-height: 760px) {
  .narrative-stage { padding-top: 4vh; }
  .narrative-stack { transform: scale(.72); transform-origin: 50% 10%; }
  .story-step h2 { font-size: clamp(30px, 8.6vw, 44px); }
  .story-step { padding-bottom: 5vh; }
  .step-inner { bottom: 5vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
}
