@font-face { font-family: Newsreader; src: url('/fonts/newsreader-440.woff2') format('woff2'); font-weight: 440; font-display: swap; }
@font-face { font-family: Manrope; src: url('/fonts/manrope-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Manrope; src: url('/fonts/manrope-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/ibmplexmono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Noto Serif JP'; src: url('/fonts/notoserifjp-400-niten.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+4E8C, U+5584, U+5929, U+6539; }

:root {
  --navy: #092643; --navy-shadow: #19334e; --cream: #f1e6db; --amber: #fead29;
  --ink-muted: #354b60; --muted: #c6bdb6; --rule: #2c4560;
  --display: "Newsreader", Georgia, serif; --body: "Manrope", Arial, sans-serif;
  --label: "IBM Plex Mono", ui-monospace, monospace; --japanese: "Noto Serif JP", serif;
  --gutter: clamp(20px, 4.5vw, 88px);
  --enter: cubic-bezier(.16, 1, .3, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--navy); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--navy); color: var(--cream); font-family: var(--body); font-size: 18px; line-height: 1.6; font-synthesis: none; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, p, ol, blockquote { margin: 0; }
h1, h2, .t-head, .pull, .positioning, .lead { font-family: var(--display); font-weight: 440; letter-spacing: -.022em; line-height: 1.04; text-wrap: balance; }
h3 { font-family: var(--display); font-weight: 440; font-size: 28px; line-height: 1.2; }
p { text-wrap: pretty; }
a { color: inherit; }
.label { font-family: var(--label); font-size: 11px; line-height: 1.5; letter-spacing: .08em; text-transform: uppercase; }
.microcopy { font-size: 14px; line-height: 1.5; }
.muted { color: var(--muted); }
.emph { color: var(--amber); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 16px; top: 8px; z-index: 100; padding: 12px 20px; background: var(--cream); color: var(--navy); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }

.button { display: inline-flex; align-items: center; gap: 14px; min-height: 52px; padding: 14px 22px 14px 24px; font: 500 16px/1.2 var(--body); text-decoration: none; border: 1px solid currentColor; transition: background-color .2s, color .2s; }
.button svg { width: 20px; height: 20px; flex: none; transition: transform .25s var(--enter); }
.button:hover svg { transform: translateX(4px); }
.button-amber { color: var(--navy); background: var(--amber); border-color: var(--amber); }
.button-amber:hover { background: #ffc15c; border-color: #ffc15c; }
.button-line { color: var(--cream); border-color: #5b7088; }
.button-line:hover { border-color: var(--cream); }

/* ---------------------------------------------------------------- hero (night, looping garden) */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: var(--navy); isolation: isolate; }
.hero-poster, .hero-poster img, .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero-poster { z-index: 0; }
.hero-video { z-index: 1; opacity: 0; transition: opacity .4s; }
.hero[data-playing] .hero-video { opacity: 1; }
.bar { position: absolute; z-index: 3; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 28px var(--gutter); }
.wordmark { font-family: var(--display); font-size: 20px; letter-spacing: .14em; line-height: 1; }
.wordmark .ni { font-family: var(--japanese); font-size: 15px; letter-spacing: .1em; margin-left: 8px; color: #b9c3cf; }
.bar-link { font: 500 15px/1 var(--body); text-decoration: none; padding: 10px 0; border-bottom: 1px solid currentColor; }
.hero-copy { position: absolute; z-index: 2; left: var(--gutter); top: clamp(104px, 17vh, 170px); width: min(40vw, 600px); }
/* scrim: a soft pool of night only behind the copy, never a panel over the art */
.scrimmed::before { content: ""; position: absolute; z-index: -1; inset: -22% -40% -26% -30%; background: radial-gradient(closest-side, rgba(7, 22, 40, .62), rgba(7, 22, 40, .34) 55%, rgba(7, 22, 40, 0)); pointer-events: none; }
.hero-mark { display: block; width: 72px; height: 72px; border-radius: 50%; margin-bottom: 26px; box-shadow: 0 0 0 1px rgba(241, 230, 219, .35); }
.hero h1 { font-size: clamp(44px, 5.8vw, 88px); max-width: 12ch; }
.hero-body { margin-top: 20px; font-size: 20px; max-width: 30ch; }
.actions { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.actions .microcopy { color: #cdd4dc; flex-basis: 100%; }

.motion-control { position: absolute; z-index: 4; right: var(--gutter); bottom: 28px; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; color: var(--cream); background: rgba(7, 22, 40, .55); border: 1px solid rgba(241, 230, 219, .35); border-radius: 50%; cursor: pointer; }
.motion-control[hidden] { display: none; }
.motion-control svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; fill: none; }
.motion-control .play-icon { display: none; }
.motion-control[aria-pressed="true"] .play-icon { display: block; }
.motion-control[aria-pressed="true"] .pause-icon { display: none; }
@media (orientation: portrait), (max-width: 760px) { .motion-control { bottom: auto; top: 76px; right: 20px; } }

/* ---------------------------------------------------------------- scroll stages
   Native (no JS, reduced motion, no WebGL): one screen with the end state and its title.
   Enhanced: a tall scroll track over a sticky canvas; the clip's 4K first frame waits
   underneath until the video is live, so a stage is never a bare field. */
.stage { position: relative; background: var(--cream); }
.stage-sticky { position: relative; height: 100svh; min-height: 480px; overflow: hidden; }
.stage-end, .stage-first, .stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage-end img, .stage-first img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stage-end { z-index: 0; background: var(--navy); }
.stage-end img { transform-origin: 50% 50%; }
.stage-end::after { content: ""; position: absolute; inset: auto 0 0; height: 18%; background: linear-gradient(transparent, var(--navy)); }
.stage-walk .stage-end::after, .stage-close .stage-end::after { display: none; }
.stage-first { z-index: 1; display: none; }
.stage-canvas { z-index: 2; display: block; }
.stage-decoder { position: fixed; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }
.stage-title { position: absolute; z-index: 3; top: clamp(72px, 13vh, 140px); width: min(46vw, 680px); color: var(--cream); transition: opacity .5s, transform .8s var(--enter); }
.stage-title.pos-left { left: var(--gutter); }
.stage-title.pos-right { right: var(--gutter); }
.stage-title.pos-under-mark { left: 0; right: 0; width: auto; top: auto; bottom: clamp(56px, 12vh, 128px); text-align: center; }
.stage-title::before { content: ""; position: absolute; z-index: -1; inset: -30% -24% -40% -24%; background: radial-gradient(closest-side, rgba(7, 22, 40, .55), rgba(7, 22, 40, .28) 60%, rgba(7, 22, 40, 0)); }
.pos-under-mark::before { display: none; }
.kicker { color: var(--amber); margin-bottom: 18px; }
.t-head { font-size: clamp(36px, 4.4vw, 66px); }
.stage-close .kaizen { display: none; }
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) and (min-width: 360px) {
  :root:not([data-motion="static"]) .stage { height: 420svh; }
  :root:not([data-motion="static"]) .stage-walk { height: 460svh; }
  :root:not([data-motion="static"]) .stage-close { height: 380svh; background: #05070d; }
  :root:not([data-motion="static"]) .stage-sticky { position: sticky; top: 0; }
  :root:not([data-motion="static"]) .stage-first { display: block; }
  :root:not([data-motion="static"]) .stage[data-live] .stage-first { display: none; }
  :root:not([data-motion="static"]) .stage-title { opacity: 0; transform: translateY(14px); }
  :root:not([data-motion="static"]) .stage-title.on { opacity: 1; transform: none; }
  :root:not([data-motion="static"]) .stage-close .kaizen { display: grid; }
  :root:not([data-motion="static"]) .stage[data-state="failed"] .stage-first { display: none; }
  :root:not([data-motion="static"]) .stage[data-state="failed"] .stage-title { opacity: 1; transform: none; }
}

/* kaizen caption: appears when the carve completes, leaves as the mark lands */
.kaizen { position: absolute; z-index: 2; right: var(--gutter); top: clamp(64px, 11vh, 112px); display: grid; gap: 10px; justify-items: end; text-align: right; color: var(--cream); opacity: 0; transform: translateY(8px); transition: opacity .3s ease, transform .4s ease; pointer-events: none; text-shadow: 0 1px 14px rgba(5, 14, 28, .7); }
.kaizen::before { content: ""; position: absolute; z-index: -1; inset: -40px -48px -44px -80px; background: radial-gradient(closest-side, rgba(7, 22, 40, .58), rgba(7, 22, 40, .26) 62%, rgba(7, 22, 40, 0)); }
.kaizen.on { opacity: 1; transform: none; transition: opacity .7s ease, transform .9s var(--enter); }
.kaizen-word { display: inline-flex; align-items: baseline; gap: 12px; }
.kaizen-kanji { font-family: var(--japanese); font-size: 30px; line-height: 1; letter-spacing: .08em; }
.kaizen-sep { color: var(--amber); }
.kaizen-romaji { font-family: var(--label); font-size: 13px; letter-spacing: .1em; }
.kaizen-meaning { font-family: var(--body); font-size: 16px; line-height: 1.4; color: #e9dfd4; }

/* ---------------------------------------------------------------- chapters (navy) */
.chapter { position: relative; background: var(--navy); color: var(--cream); }
.chapter-inner { padding: clamp(56px, 8vw, 120px) var(--gutter) clamp(72px, 10vw, 140px); max-width: 1440px; margin: 0 auto; }
.chapter-inner.narrow { max-width: 980px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px clamp(32px, 6vw, 104px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px clamp(28px, 4vw, 64px); }
.prose p + p { margin-top: 18px; }
.grid-2.prose p + p, .grid-3.prose p + p { margin-top: 0; }
.prose .button { margin-top: 30px; }
.proof { border-left: 1px solid var(--amber); padding-left: 28px; }
.proof h3 { margin-bottom: 16px; }
.proof p + p { margin-top: 14px; }
.proof strong { font-weight: 500; }
.figure { font-family: var(--display); font-size: 26px; line-height: 1.2; color: var(--cream); }
.date { color: #9fb0c2; }
.proof .date { margin-top: 20px; }
.pull { font-size: clamp(30px, 3.4vw, 50px); max-width: 26ch; margin-bottom: clamp(36px, 5vw, 64px); color: var(--cream); }
.steps { list-style: none; padding: 0; counter-reset: s; display: grid; gap: 18px; }
.steps li { counter-increment: s; padding-left: 52px; position: relative; }
.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 4px; font: 400 12px/1 var(--label); color: var(--amber); letter-spacing: .08em; }
.steps strong { font-weight: 500; }
.positioning { margin-top: clamp(48px, 6vw, 80px); font-size: clamp(30px, 3.4vw, 50px); color: var(--amber); }
.lead { font-size: clamp(30px, 3.4vw, 50px); }
.close-row { margin-top: clamp(40px, 5vw, 64px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--rule); padding-top: 28px; }

/* ---------------------------------------------------------------- contact */
.contact { background: var(--navy); color: var(--cream); }
.contact-inner { padding: 8px var(--gutter) clamp(72px, 10vw, 140px); max-width: 760px; margin: 0 auto; text-align: center; display: grid; justify-items: center; gap: 22px; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px var(--gutter) 40px; border-top: 1px solid #1c3754; font-size: 14px; }
.foot-mark { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; font-family: var(--display); letter-spacing: .14em; text-transform: uppercase; }
.foot-mark img { width: 40px; height: 40px; border-radius: 50%; }

/* ---------------------------------------------------------------- portrait / phones */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) and (min-width: 360px) and (orientation: portrait), (scripting: enabled) and (prefers-reduced-motion: no-preference) and (min-width: 360px) and (max-width: 760px) {
  :root:not([data-motion="static"]) .stage { height: 360svh; }
  :root:not([data-motion="static"]) .stage-walk { height: 400svh; }
}
@media (orientation: portrait), (max-width: 760px) {
  body { font-size: 16px; }
  .bar { padding: 18px 20px; }
  .bar-link { display: none; }
  .hero-copy { left: 20px; right: 20px; width: auto; top: 72px; }
  .hero-copy.scrimmed::before { inset: -40px -20px auto -20px; height: 300px; background: linear-gradient(rgba(7, 22, 40, .55), rgba(7, 22, 40, 0)); }
  .hero-lower { position: absolute; left: 0; right: 0; top: calc(100svh - 72px - 262px); padding-top: 64px; }
  .hero-lower::before { content: ""; position: absolute; z-index: -1; inset: 0 -20px -40px -20px; background: linear-gradient(rgba(7, 22, 40, 0), rgba(7, 22, 40, .8) 32%, rgba(7, 22, 40, .86)); }
  .hero-mark { width: 48px; height: 48px; margin-bottom: 14px; }
  .hero h1 { font-size: clamp(36px, 10.2vw, 56px); }
  .hero-body { margin-top: 12px; font-size: 17px; }
  .actions { margin-top: 20px; }
  .stage-end img, .stage-first img { object-position: 50% 100%; }
  .stage-title.pos-left, .stage-title.pos-right { left: 20px; right: 20px; width: auto; top: 72px; }
  .t-head { font-size: clamp(32px, 9vw, 46px); }
  .kaizen { left: 20px; right: 20px; top: auto; bottom: max(40px, env(safe-area-inset-bottom)); justify-items: center; text-align: center; }
  .kaizen::before { inset: -36px -20px -40px -20px; background: linear-gradient(rgba(7, 22, 40, 0), rgba(7, 22, 40, .6) 40%, rgba(7, 22, 40, .7)); }
  .kaizen-kanji { font-size: 26px; }
  .kaizen-meaning { font-size: 15px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-2.prose p + p, .grid-3.prose p + p { margin-top: 0; }
  .proof { padding-left: 20px; }
}

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .stage-title, .kaizen { transition: none; }
}
