/* ==========================================================================
   site.css: Keke Software (kekesoftware.app) architectural design system
   --------------------------------------------------------------------------
   Direction: Archive index (+ Playable toy layer via UI Moments controls)
   Anchors:   Neutral anodized dark #0F0F11 & neutral aluminum light #F6F6F7
   Accent:    Keke Vermilion #FF5A4E (from Brand/kekeapps-avatar-ring.svg)
              with same-hue dark ink #140908 on #FF5A4E (>= 6.3:1 WCAG AA)
   Faces:     Self-hosted Collletttivo Apfel Grotezk (OFL) + Necto Mono (OFL)
              + native system CJK ("PingFang SC", "Hiragino Sans GB", ...)
   ========================================================================== */

/* ---- Self-hosted WOFF2 fonts (zero Google Fonts shelf) ---- */
@font-face {
  font-family: "Apfel Grotezk";
  src: url("../fonts/ApfelGrotezk-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Apfel Grotezk";
  src: url("../fonts/ApfelGrotezk-Mittel.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Apfel Grotezk";
  src: url("../fonts/ApfelGrotezk-Fett.woff2") format("woff2");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Apfel Fallback";
  src: local("Helvetica Neue"), local("Arial");
  size-adjust: 102%;
  ascent-override: 93%;
  descent-override: 22%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Necto Mono";
  src: url("../fonts/NectoMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---- Palette, typography & grid tokens ---- */
:root {
  --font-display: "Apfel Grotezk", "Apfel Fallback", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-text:    "Apfel Grotezk", "Apfel Fallback", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-mono:    "Necto Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Raw anchors: neutral anodized dark & clean milled aluminum (never cream, never blue-charcoal) */
  --c-dark:  #0F0F11;
  --c-light: #F6F6F7;
  --brand:   #FF5A4E;           /* Keke mark vermilion ring */
  --on-brand:#140908;           /* Same-hue dark ink: 6.3:1 on #FF5A4E */
  --brand-on-light: #C62B20;    /* Accessible vermilion ink on #F6F6F7: 5.5:1 */

  /* Layout grid tokens (Awwwards layout.md R1) */
  --cols: 12;
  --margin: clamp(1.25rem, 0.786rem + 1.905vw, 2.5rem);      /* 20 -> 40 */
  --gutter: clamp(0.75rem, 0.564rem + 0.762vw, 1.25rem);     /* 12 -> 20 */
  --space-s:  clamp(1rem, 0.814rem + 0.762vw, 1.5rem);       /* 16 -> 24 */
  --space-m:  clamp(1.5rem, 1.129rem + 1.524vw, 2.5rem);     /* 24 -> 40 */
  --space-l:  clamp(2.5rem, 1.757rem + 3.048vw, 4.5rem);     /* 40 -> 72 */
  --space-xl: clamp(4rem, 2.7rem + 5.333vw, 7.5rem);         /* 64 -> 120 */
  --space-2xl: clamp(5.5rem, 3.8rem + 7vw, 10rem);           /* 88 -> 160 */
  --header-h: 72px;

  /* Display type tuning: rem-anchored clamp, max <= 2.5x min */
  --step-hero-keke: clamp(2.875rem, 1.85rem + 4.1vw, 6.25rem); /* 46@390 -> 100@1440 */
  --step-h2-keke:   clamp(2.125rem, 1.45rem + 2.7vw, 4.25rem); /* 34@390 -> 68@1440 */
  --step-h3-keke:   clamp(1.375rem, 1.15rem + 0.9vw, 2rem);    /* 22@390 -> 32@1440 */

  /* Default scope: dark */
  --bg: var(--c-dark);
  --fg: var(--c-light);
  --brand-ink: var(--brand);
  --uim-shadow: 0 1px 2px rgb(0 0 0 / .45), 0 8px 24px rgb(0 0 0 / .32);
}

/* Theme scopes re-declare derived mixes so color-mix resolves on every floor */
:root,
[data-theme="dark"] {
  --bg: var(--c-dark);
  --fg: var(--c-light);
  --brand-ink: var(--brand);
  --fg-2: color-mix(in oklab, var(--fg) 70%, var(--bg));       /* >= 8.2:1 */
  --fg-3: color-mix(in oklab, var(--fg) 54%, var(--bg));       /* >= 4.8:1 */
  --surface: #161619;
  --raised:  #1F1F24;
  --raised-hover: #28282F;
  --raise:   color-mix(in oklab, var(--fg) 6%, var(--bg));
  --rail:    color-mix(in oklab, var(--fg) 11%, transparent);
  --rail-strong: color-mix(in oklab, var(--fg) 24%, transparent);
  --line:    color-mix(in oklab, var(--fg) 12%, transparent);
  --line-strong: color-mix(in oklab, var(--fg) 20%, transparent);
  --uim-shadow: 0 1px 2px rgb(0 0 0 / .45), 0 8px 24px rgb(0 0 0 / .32);
  background-color: var(--bg);
  color: var(--fg);
}

[data-theme="light"] {
  --bg: var(--c-light);
  --fg: #141416;
  --brand-ink: var(--brand-on-light);
  --fg-2: color-mix(in oklab, var(--fg) 68%, var(--bg));       /* >= 7.2:1 */
  --fg-3: color-mix(in oklab, var(--fg) 56%, var(--bg));       /* >= 4.9:1 */
  --surface: #ECECEF;
  --raised:  #FFFFFF;
  --raised-hover: #F2F2F5;
  --raise:   color-mix(in oklab, var(--fg) 5%, var(--bg));
  --rail:    color-mix(in oklab, var(--fg) 9%, transparent);
  --rail-strong: color-mix(in oklab, var(--fg) 24%, transparent);
  --line:    color-mix(in oklab, var(--fg) 11%, transparent);
  --line-strong: color-mix(in oklab, var(--fg) 18%, transparent);
  --uim-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 6px 18px rgb(0 0 0 / .06);
  background-color: var(--bg);
  color: var(--fg);
}

@media (width < 48em) {
  :root {
    --cols: 6;
    --header-h: 64px;
  }
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 20px);
  background: var(--c-dark);
  color: var(--c-light);
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: var(--lh-body);
  background: var(--c-dark);
  color: var(--c-light);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* body's overflow-x propagates to the viewport, so it cannot stop wide children (the tilted
   brand band) from widening the layout viewport on phones. main clips them itself; clip,
   unlike hidden, keeps sticky positioning working. */
main { overflow-x: clip; }

img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: .22em; }

::selection { background: var(--brand); color: var(--on-brand); }

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Skip link: first focusable element */
.skip-link {
  position: fixed;
  top: 12px;
  left: var(--margin);
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  translate: 0 -160%;
  transition: translate var(--dur-2) var(--ease-micro);
}

.skip-link:focus-visible {
  translate: 0 0;
  outline: 2px solid var(--c-light);
}

/* Mono data token utility (STRICTLY for numbers, versions, sizes, shortcuts, clocks) */
.data-token {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums slashed-zero;
}

/* 12-col architectural grid */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--gutter);
  padding-inline: var(--margin);
  max-width: 1680px;
  margin-inline: auto;
}

.grid > * { grid-column: 1 / -1; }

/* ---- Fixed Architectural Header (adapts cleanly to dark & light floors) ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in oklab, var(--nav-bg, #0F0F11) 92%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nav-line, rgb(246 246 247 / .1));
  color: var(--nav-fg, #F6F6F7);
  transition: background-color var(--dur-3) var(--ease-micro), color var(--dur-3) var(--ease-micro), border-color var(--dur-3) var(--ease-micro);
}

/* Scroll progress: a vermilion hairline under the header (scroll-driven, full motion only).
   It animates scale on the pseudo-element itself, so scrolling never restyles the blurred header. */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--brand);
  transform-origin: 0 50%;
  scale: 0 1;
  pointer-events: none;
}

.site-header[data-nav-theme="light"] {
  --nav-bg: #F6F6F7;
  --nav-fg: #141416;
  --nav-fg-2: #4B4B53;
  --nav-line: rgb(20 20 22 / .11);
  --bg: #F6F6F7;
  --fg: #141416;
  --fg-2: #4B4B53;
  --raised: #FFFFFF;
  --rail: rgb(20 20 22 / .09);
  --line-strong: rgb(20 20 22 / .18);
}

.site-header[data-nav-theme="dark"] {
  --nav-bg: #0F0F11;
  --nav-fg: #F6F6F7;
  --nav-fg-2: #A9A9B2;
  --nav-line: rgb(246 246 247 / .11);
  --bg: #0F0F11;
  --fg: #F6F6F7;
  --fg-2: #A9A9B2;
  --raised: #1F1F24;
  --rail: rgb(246 246 247 / .12);
  --line-strong: rgb(246 246 247 / .2);
}

.nav-inner {
  width: 100%;
  max-width: 1680px;
  margin-inline: auto;
  padding-inline: var(--margin);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  overflow: hidden;
  flex: none;
  transition: rotate .45s var(--uim-spring);
}

.brand-lockup:hover .brand-mark {
  rotate: -8deg;
}

.nav-location {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 14px;
  margin-left: 4px;
  border-left: 1px solid var(--nav-line, rgb(246 246 247 / .14));
  font-size: 0.8125rem;
  color: var(--nav-fg-2, #A9A9B2);
  transition: color var(--dur-3) var(--ease-micro), border-color var(--dur-3) var(--ease-micro);
}

/* Section cue: main.mjs rolls the label in when the section changes */
#nav-location-text {
  display: inline-block;
  white-space: nowrap;
}

/* Header controls follow the header's theme flip at the header's own pace
   (without this the background faded while the switch and menu button snapped). */
.site-header :is(.uim-ink, .uim-ink-fill, .nav-menu-btn) {
  transition: background-color var(--dur-3) var(--ease-micro), border-color var(--dur-3) var(--ease-micro), color var(--dur-3) var(--ease-micro);
}
.site-header .uim-ink-knob {
  transition: translate .52s var(--uim-spring), background-color var(--dur-3) var(--ease-micro), box-shadow var(--dur-3) var(--ease-micro);
}
.site-header .uim-ink-knob::after {
  transition: scale .42s var(--uim-spring) .22s, background-color var(--dur-3) var(--ease-micro);
}
.site-header .uim-ink[aria-checked="true"] .uim-ink-knob::after {
  transition: scale .2s var(--uim-spring), background-color var(--dur-3) var(--ease-micro);
}

.nav-location__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--nav-fg-2, #A9A9B2);
  transition: color var(--dur-2) var(--ease-micro), background-color var(--dur-2) var(--ease-micro);
}

@media (hover: hover) and (pointer: fine) {
  .nav-link:hover {
    color: var(--nav-fg, #F6F6F7);
    background: var(--rail);
  }
}

.nav-link[aria-current="true"],
.nav-link[aria-current="page"] {
  color: var(--nav-fg, #F6F6F7);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Mobile expandable capsule menu (grows out of its own trigger) */
.nav-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--raised);
  color: var(--fg);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  flex: none;
  cursor: pointer;
}

.mobile-drawer {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 190;
  display: grid;
  grid-template-rows: 0fr;
  background: var(--c-dark);
  color: var(--c-light);
  border-bottom: 1px solid transparent;
  transition: grid-template-rows var(--dur-4) var(--ease-move), border-color var(--dur-3) var(--ease-micro);
}

.mobile-drawer[data-open="true"] {
  grid-template-rows: 1fr;
  border-bottom-color: rgb(246 246 247 / .14);
}

.mobile-drawer__inner {
  overflow: hidden;
}

.mobile-drawer__body {
  padding: 20px var(--margin) 28px;
  display: grid;
  gap: 8px;
}

.mobile-drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 8px 4px;
  border-bottom: 1px solid rgb(246 246 247 / .1);
  font-size: 1.25rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--c-light);
}

.mobile-drawer__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  font-size: 0.875rem;
  color: #A9A9B2;
}

@media (max-width: 58em) {
  .nav-links,
  .nav-location { display: none; }
  .nav-menu-btn { display: inline-flex; }
}

/* The drawer only exists on narrow screens: never leave it covering the desktop nav
   (main.mjs also closes it, and restarts Lenis, when the viewport widens). */
@media (min-width: 58.0625em) {
  .mobile-drawer { display: none; }
}

/* 375-414px phones: brand, 中/EN switch and the menu button must share one row */
@media (max-width: 26em) {
  .nav-inner { gap: 10px; }
  .brand-lockup { gap: 8px; font-size: 0.9375rem; }
  .nav-actions { gap: 8px; }
  .nav-actions .uim-ink-wrap { gap: 6px; }
  .nav-menu-btn { padding: 0 12px; }
}

/* At 360px and below the wordmark no longer fits next to "EN" + "Menu"; the ring mark
   stays (the link keeps its aria-label) */
@media (max-width: 22.5em) {
  .brand-lockup[aria-label] > span:last-child { display: none; }
}

/* ---- BEAT 1: HERO. Screen one is a type poster carved by one cut (刻); screen two
   is the workbench in its own stage. Every moving part rests in its final, readable
   state: the motion only plays toward that state. ---- */
@property --cut-draw  { syntax: '<number>'; inherits: true; initial-value: 1; }
@property --cut-split { syntax: '<number>'; inherits: true; initial-value: 1; }
@property --cut-drift { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --ring-draw { syntax: '<number>'; inherits: true; initial-value: 1; }
@property --bench-rise { syntax: '<number>'; inherits: true; initial-value: 0; }

.hero {
  position: relative;
  background: var(--bg);
  color: var(--fg);
  overflow: clip;
}

.hero__poster {
  min-height: 100svh;
  padding-top: calc(var(--header-h) + clamp(1.25rem, 3.2vh, 2.5rem));
  padding-bottom: clamp(1.25rem, 3vh, 2.25rem);
  grid-template-rows: auto 1fr auto auto;
  row-gap: clamp(1.25rem, 3.4vh, 2.5rem);
}

.hero__topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}

.hero__datum {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--fg-2);
}

.hero__ring-pulse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: none;
}

.hero__aside-note {
  font-size: 0.875rem;
  color: var(--fg-2);
}

/* The cut. Two copies of the headline share one box: the h1 keeps the part above
   the line, the aria-hidden copy keeps the part below it. Shifting the two pieces
   apart along x opens an even band around the line, like a carved stamp.
   Line: from (0%, 78%) to (100%, 22%) of the headline box, extended past both ends. */
.cut {
  /* Fit the longest row (5 full-width glyphs = 4.9em) to the content width, cap by height */
  --cut-size: min(calc((min(100vw, 1680px) - 2 * var(--margin)) / 5.1), 25svh);
  --cut-shear: 0.065em;  /* resting offset of each piece */
  --cut-pull: 0.4em;     /* extra offset once the poster scrolls away */
  --cut-offset: calc(var(--cut-split) * var(--cut-shear) + var(--cut-drift) * var(--cut-pull));
  position: relative;
  align-self: center;
  justify-self: start;
  width: max-content;
  font-family: var(--font-display);
  font-size: var(--cut-size);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  isolation: isolate;
}

:lang(en) .cut {
  --cut-size: min(calc((min(100vw, 1680px) - 2 * var(--margin)) / 5.15), 25svh); /* "Done locally." = 4.96em */
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.cut__text {
  display: block;
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  clip-path: polygon(-60% -100%, 220% -100%, 220% -45.2%, -60% 111.6%);
  translate: calc(var(--cut-offset) * -1) 0;
}

.cut__text--low {
  position: absolute;
  inset: 0;
  clip-path: polygon(-60% 111.6%, 220% -45.2%, 220% 200%, -60% 200%);
  translate: var(--cut-offset) 0;
  user-select: none;
  pointer-events: none;
}

/* The line runs from x = -60% to x = 220% of the box. It is drawn by a clip that
   uncovers it left to right (a dash pattern breaks under non-scaling-stroke). */
.cut__line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  z-index: 1;
  pointer-events: none;
  clip-path: inset(-100% calc(160% - var(--cut-draw) * 281%) -100% -61%);
}

.cut__line line {
  stroke: var(--brand);
  stroke-width: max(2px, 0.018em);
}

.hero__foot {
  display: grid;
  grid-template-columns: subgrid;
  align-items: end;
  row-gap: var(--space-s);
}

.hero__lead {
  grid-column: 1 / span 6;
  margin: 0;
  max-width: 44ch;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.55;
  color: var(--fg-2);
}

.hero__cta-row {
  grid-column: 8 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 24px;
}

.hero__bench-cue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 0.9375rem;
  color: var(--fg-2);
  text-decoration: none;
  background: linear-gradient(currentColor 0 0) no-repeat 0 calc(100% - 10px) / 0 1px;
  transition: color var(--dur-2) var(--ease-micro), background-size var(--dur-3) var(--ease-enter);
}

.hero__bench-cue svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: translate var(--dur-3) var(--ease-enter);
}

@media (hover: hover) and (pointer: fine) {
  .hero__bench-cue:hover { color: var(--fg); background-size: calc(100% - 26px) 1px; }
  .hero__bench-cue:hover svg { translate: 0 3px; }
}

/* Screen two: the workbench rises into a stage framed by a giant, cropped brand ring */
.hero__bench {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: var(--space-xl) var(--space-2xl);
  border-top: 1px solid var(--line);
  view-timeline: --bench block;
}

.hero__bench-grid { position: relative; }

.bench-ring {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: max(118vw, 980px);
  height: auto;
  max-width: none;
  translate: -50% -50%;
  rotate: -90deg;
  overflow: visible;
  pointer-events: none;
}

.bench-ring circle {
  fill: none;
  stroke: var(--brand);
  stroke-width: 9;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--ring-draw));
}

/* Hero motion. Full motion only; every keyframe ends on the resting value above, so
   reduced motion, no-JS and engines without scroll timelines all see the finished cut.
   Load: the line slices left to right, then the two pieces snap apart.
   Scroll (scroll-driven, no JS): leaving the poster pulls the pieces further apart; the
   ring draws and the workbench rises as the bench stage enters. */
@media (prefers-reduced-motion: no-preference) {
  :root[data-motion="full"] .cut {
    animation: cut-draw 560ms var(--ease-move) 140ms both,
               cut-split 760ms var(--ease-reveal) 620ms both;
  }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    :root[data-motion="full"] .cut {
      animation: cut-draw 560ms var(--ease-move) 140ms both,
                 cut-split 760ms var(--ease-reveal) 620ms both,
                 cut-drift linear both;
      animation-timeline: auto, auto, scroll(root block);
      animation-range: normal, normal, 0 85vh;
    }
    :root[data-motion="full"] .bench-ring {
      animation: ring-draw linear both;
      animation-timeline: --bench;
      animation-range: entry 0% entry 100%;
    }
    :root[data-motion="full"] .hero__stage {
      animation: bench-rise linear both;
      animation-timeline: --bench;
      animation-range: entry 0% entry 75%;
    }
    :root[data-motion="full"] .spread__media {
      animation: spread-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 45%;
    }
    :root[data-motion="full"] .plan-detail {
      animation: price-cut linear both;
      animation-timeline: view();
      animation-range: entry 60% cover 40%;
    }
    :root[data-motion="full"] .weight {
      animation: weight-draw linear both;
      animation-timeline: view();
      animation-range: entry 40% cover 50%;
    }
    :root[data-motion="full"] .footer-mail {
      animation: mail-draw linear both;
      animation-timeline: view();
      animation-range: entry 10% entry 100%;
    }
    :root[data-motion="full"] .footer-monument {
      animation: mono-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 100%;
    }
    :root[data-motion="full"] .site-header::after {
      animation: page-progress linear both;
      animation-timeline: scroll(root block);
    }
  }
}

@keyframes cut-draw   { from { --cut-draw: 0; } }
@keyframes cut-split  { from { --cut-split: 0; } }
@keyframes cut-drift  { to   { --cut-drift: 1; } }
@keyframes ring-draw  { from { --ring-draw: 0; } }
@keyframes bench-rise { from { --bench-rise: 1; } }
@keyframes weight-draw { from { --weight-draw: 0; } }
@keyframes spread-rise { from { --spread-rise: 1; } }
@keyframes price-cut  { from { --price-cut: 0; } }
@keyframes mail-draw  { from { --mail-draw: 0; } }
@keyframes mono-rise  { from { --mono-rise: 1; } }
@keyframes page-progress { from { scale: 0 1; } to { scale: 1 1; } }

/* Interactive Keke Snap Workbench (Hero Right Stage) */
.hero__stage {
  grid-column: 3 / span 8;
  position: relative;
  translate: 0 calc(var(--bench-rise) * 14svh);
  scale: calc(1 - var(--bench-rise) * 0.06);
  isolation: isolate;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--surface);
  padding: clamp(1rem, 1.8vw, 1.5rem);
  display: grid;
  gap: 16px;
  overflow: clip;
}

.hero__stage-magnet {
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 16px;
  opacity: 0.72;
}

.workbench__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.workbench__id {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--fg-2);
}

.workbench__reticle {
  width: 24px;
  height: 24px;
  flex: none;
  transition: rotate .45s var(--uim-spring);
}

.hero__stage[data-snapped="true"] .workbench__reticle {
  rotate: 45deg;
}

.workbench__screen {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #121215;
  overflow: clip;
  min-height: 280px;
  display: grid;
  grid-template-rows: 34px 1fr;
}

.mac-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 0 12px;
  background: #1B1B20;
  border-bottom: 1px solid rgb(255 255 255 / .08);
  font-size: 0.8125rem;
  color: #B4B4BE;
}

/* On narrow frames the title gives way (ellipsis) instead of running into its neighbours */
.mac-titlebar > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mac-titlebar > span:last-child { flex: none; }

.mac-dots {
  display: flex;
  flex: none;
  gap: 6px;
}

.mac-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgb(255 255 255 / .2);
}

.mac-dots i:first-child { background: #FF5F56; }
.mac-dots i:nth-child(2) { background: #FFBD2E; }
.mac-dots i:nth-child(3) { background: #27C93F; }

.workbench__canvas {
  position: relative;
  padding: 18px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  min-height: 246px;
}

/* Workbench individual live app scenes.
   All four share one grid cell, so the stage is always as tall as the tallest scene
   (switching tabs no longer moves the page) and scenes crossfade instead of popping.
   Inactive scenes are visibility:hidden, so they stay out of the a11y tree and tab order. */
.wb-scene {
  grid-area: 1 / 1;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  opacity: 0;
  visibility: hidden;
  translate: 0 6px;
  transition:
    opacity .2s var(--ease-exit),
    translate .2s var(--ease-exit),
    visibility 0s linear .2s;
}

.wb-scene[data-active="true"] {
  opacity: 1;
  visibility: visible;
  translate: none;
  transition:
    opacity .32s var(--ease-micro) .08s,
    translate .5s var(--ease-enter) .08s,
    visibility 0s linear 0s;
}

.workbench__foot { grid-row: 2; }

.wb-app-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wb-app-bar img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  flex: none;
}

.wb-app-bar h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.2;
  color: #F6F6F7;
}

.wb-app-bar p {
  margin: 2px 0 0;
  font-size: 0.875rem;
  color: #B4B4BE;
}

/* Interactive live preview boxes inside the Hero Snap Workbench */
.wb-demo {
  position: relative;
  border: 1px solid rgb(255 255 255 / .1);
  border-radius: 12px;
  background: #18181D;
  padding: 14px;
  min-height: 126px;
  display: grid;
  align-content: center;
  gap: 10px;
  overflow: clip;
}

/* StepSnap live demo: click to stamp step & redact secret */
.wb-step-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #222229;
  font-size: 0.875rem;
}

.wb-secret {
  padding: 2px 8px;
  border-radius: 5px;
  background: rgb(255 90 78 / .16);
  color: #FF8C84;
  transition: filter var(--dur-3) var(--ease-micro), background-color var(--dur-3) var(--ease-micro), color var(--dur-3) var(--ease-micro);
}

.wb-demo[data-snapped="true"] .wb-secret {
  background: #F6F6F7;
  color: #F6F6F7;
  user-select: none;
}

.wb-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: #B4B4BE;
}

.wb-step-ring {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid var(--brand);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #F6F6F7;
}

/* ReelSnap live demo: landscape to 9:16 zoom toggle */
.wb-reel-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.wb-reel-frame {
  position: relative;
  width: 100%;
  max-width: 240px;
  height: 98px;
  border-radius: 10px;
  background: linear-gradient(135deg, #272235, #18181D);
  border: 1px solid rgb(255 255 255 / .12);
  overflow: clip;
  transition: max-width .5s var(--uim-spring), border-color .3s;
}

.wb-demo[data-snapped="true"] .wb-reel-frame {
  max-width: 96px;
  border-color: var(--brand);
}

.wb-reel-cursor {
  position: absolute;
  left: 58%;
  top: 42%;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--brand);
  translate: -50% -50%;
  transition: scale .45s var(--uim-spring);
}

.wb-demo[data-snapped="true"] .wb-reel-cursor {
  scale: 1.35;
}

.wb-reel-sub {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 3px 6px;
  border-radius: 5px;
  background: rgb(15 15 17 / .88);
  color: #F6F6F7;
  font-size: 12px;
  text-align: center;
}

/* CloakSnap live demo: curtain wipes over Slack + .env */
.wb-cloak-stage {
  position: relative;
  display: grid;
  gap: 8px;
}

.wb-cloak-leak {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: #23232A;
  font-size: 0.8125rem;
  color: #E2E2E8;
}

.wb-cloak-curtain {
  position: absolute;
  inset: -4px;
  border-radius: 10px;
  background: #112A22;
  border: 1px solid #35C48E;
  color: #E4FFF3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 0.875rem;
  font-weight: 500;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .48s var(--uim-ease);
}

.wb-demo[data-snapped="true"] .wb-cloak-curtain {
  clip-path: inset(0 0 0 0);
}

/* DropSnap live demo: raw -> framed & compressed */
.wb-drop-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wb-drop-thumb {
  width: 112px;
  height: 70px;
  border-radius: 8px;
  overflow: clip;
  border: 1px solid rgb(255 255 255 / .12);
  flex: none;
  transition: padding .45s var(--uim-spring), background .35s;
}

.wb-demo[data-snapped="true"] .wb-drop-thumb {
  padding: 6px;
  background: linear-gradient(135deg, #1E6AF0, #2CC896);
}

.wb-drop-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.wb-drop-metrics {
  display: grid;
  gap: 4px;
  font-size: 0.8125rem;
  color: #B4B4BE;
}

.wb-drop-metrics strong {
  color: #F6F6F7;
  font-size: 0.9375rem;
}

.workbench__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.workbench__specs {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--fg-2);
}

/* Hero bottom rail */
.hero__rail {
  padding-top: clamp(1rem, 2.4vh, 1.5rem);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--fg-2);
}

.hero__rail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

/* ---- BEAT 2: ARCHIVE INDEX & 4 APP SPREADS (Light Sheet rising over Hero) ---- */
.sheet-light {
  position: relative;
  z-index: 2;
  border-radius: 28px 28px 0 0;
  padding-block: var(--space-xl);
}

.section-head {
  display: grid;
  grid-template-columns: subgrid;
  align-items: end;
  row-gap: var(--space-s);
  margin-bottom: var(--space-l);
}

.section-head__num {
  grid-column: 1 / span 2;
  font-family: var(--font-display);
  font-size: clamp(3rem, 2rem + 4vw, 5.5rem);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.04em;
  color: var(--brand-ink);
}

.section-head__title {
  grid-column: 3 / span 7;
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-h2-keke);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.section-head__desc {
  grid-column: 10 / -1;
  margin: 0;
  font-size: 0.9375rem;
  color: var(--fg-2);
}

/* ---- Brand band: one tilted vermilion strip across the hero/apps seam ---- */
.brand-band {
  position: relative;
  z-index: 3;
  width: 112vw;
  margin-inline: -6vw;
  margin-block: calc(var(--space-l) * -0.9);
  rotate: -2.4deg;
  background: var(--brand);
  color: var(--on-brand);
  overflow: clip;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1.55rem + 4.6vw, 6.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  --marquee-gap: 0.5em;
}

/* At rest (no JS, reduced motion) the strip is one still, clipped row, not a wrapped wall. */
.brand-band [data-marquee-track],
.brand-band [data-marquee-group] { flex-wrap: nowrap; }

.brand-band [data-marquee-group] {
  align-items: center;
  padding-block: 0.2em 0.24em;
  white-space: nowrap;
}

/* Still row: start the first name at the page's content edge (the band bleeds 6vw past it).
   Not when live: the loop needs group + gap to be exactly half the track. */
.brand-band:not(.is-live) [data-marquee-group] { padding-inline-start: calc(6vw + var(--margin)); }

.brand-band [data-marquee-group] li {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

/* The Keke ring as the separator, drawn in CSS so it never reaches assistive tech */
.brand-band [data-marquee-group] li::after {
  content: "";
  width: 0.42em;
  height: 0.42em;
  border: 0.11em solid currentColor;
  border-radius: 50%;
  flex: none;
}

.brand-band__next {
  color: transparent;
  -webkit-text-stroke: max(1.5px, 0.018em) var(--on-brand);
}

.brand-band__toggle {
  position: absolute;
  right: calc(6vw + var(--margin));
  bottom: 0.16em;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--on-brand);
  color: var(--brand);
  cursor: pointer;
  font-size: 1rem;
  rotate: 2.4deg;
}

.brand-band__toggle svg {
  grid-area: 1 / 1;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-band__toggle .i-play { fill: currentColor; stroke-width: 1.4; }
.brand-band__toggle .i-play,
.brand-band__toggle[aria-pressed="true"] .i-pause { visibility: hidden; }
.brand-band__toggle[aria-pressed="true"] .i-play { visibility: visible; }
.brand-band__toggle:focus-visible { outline: 2px solid var(--on-brand); outline-offset: 3px; }

/* ---- App index: giant names on ruled rows. Numbers come from a CSS counter, so a new
   app is one more <li>; the "next" slot stays last. Hover or focus floods the row with
   vermilion edge to edge. ---- */
.archive-wrap {
  container: archive / inline-size;
  margin-bottom: var(--space-xl);
}

.archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: app;
}

.archive-row {
  --name-size: clamp(2.25rem, 1.2rem + 5vw, 7rem);
  position: relative;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) minmax(15rem, 22rem) auto;
  grid-template-areas:
    "idx  brand brand act"
    ".    verb  spec  act";
  column-gap: var(--gutter);
  row-gap: 10px;
  align-items: center;
  margin-inline: calc(var(--margin) * -1);
  padding: clamp(1.1rem, 2vw, 1.75rem) var(--margin);
  counter-increment: app;
  background: linear-gradient(var(--brand) 0 0) no-repeat 0 100% / 100% 0;
  transition: background-size var(--dur-4) var(--ease-enter), color var(--dur-2) var(--ease-micro);
}

/* 2px round-capped rules, kept inside the content edges */
.archive-row::before,
.archive-row:last-child::after {
  content: "";
  position: absolute;
  inset: 0 var(--margin) auto;
  height: 2px;
  border-radius: 1px;
  background: var(--line);
}

.archive-row:last-child::after { inset: auto var(--margin) 0; }

.archive-idx { grid-area: idx; align-self: start; padding-top: 0.5em; font-size: 0.875rem; color: var(--fg-2); }
.archive-idx::before { content: counter(app, decimal-leading-zero); }

.archive-brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 0.28em;
  min-width: 0;
  font-size: var(--name-size);
}

.archive-brand img {
  width: 0.62em;
  height: 0.62em;
  border-radius: 22%;
  flex: none;
  transition: rotate var(--dur-4) var(--ease-enter), scale var(--dur-4) var(--ease-enter);
}

.archive-brand h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1em;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.035em;
  white-space: nowrap;
  transition: translate var(--dur-4) var(--ease-enter);
}

.archive-brand > div > span {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--fg-2);
}

.archive-verb {
  grid-area: verb;
  margin: 0;
  max-width: 52ch;
  font-size: 0.9375rem;
  color: var(--fg-2);
}

.archive-spec {
  grid-area: spec;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.875rem;
}

.archive-spec small {
  font-size: 0.8125rem;
  color: var(--fg-2);
}

.archive-actions {
  grid-area: act;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.archive-visit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: inherit;
  transition: background-color var(--dur-2) var(--ease-micro);
}

/* The flood: keyboard focus inside a shipped app's row, or pointer hover (fine pointers
   only, so a tap on a phone does not leave a row stuck in vermilion). */
.archive-row[data-app]:has(:focus-visible) {
  background-size: 100% 100%;
  color: var(--on-brand);
  --fg-2: var(--on-brand);
  --line: transparent;
}
.archive-row[data-app]:has(:focus-visible) + .archive-row::before { background: transparent; }
.archive-row[data-app]:has(:focus-visible) .archive-brand img { rotate: -8deg; scale: 1.08; }
.archive-row[data-app]:has(:focus-visible) .archive-brand h3 { translate: 0.08em 0; }
.archive-row[data-app]:has(:focus-visible) :focus-visible { outline-color: var(--on-brand); }

@media (hover: hover) and (pointer: fine) {
  .archive-row[data-app]:hover {
    background-size: 100% 100%;
    color: var(--on-brand);
    --fg-2: var(--on-brand);
    --line: transparent;
  }
  .archive-row[data-app]:hover + .archive-row::before { background: transparent; }
  .archive-row[data-app]:hover .archive-brand img { rotate: -8deg; scale: 1.08; }
  .archive-row[data-app]:hover .archive-brand h3 { translate: 0.08em 0; }
  .archive-visit:hover { background: var(--rail); }
  .archive-row[data-app]:hover .archive-visit:hover { background: color-mix(in oklab, var(--on-brand) 12%, transparent); }
}

/* The next slot: outlined, not yet filled */
.archive-row--next .archive-brand h3 {
  white-space: normal;   /* a phrase, not a name: let it wrap, at spaces only */
  word-break: keep-all;
  color: transparent;
  -webkit-text-stroke: max(1.5px, 0.02em) var(--fg);
}

.archive-next-mark {
  display: grid;
  place-items: center;
  width: 0.62em;
  height: 0.62em;
  flex: none;
}

.archive-next-mark svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--brand-ink);
  stroke-width: 2.6;
  stroke-dasharray: 3.2 2.3;
}

@container archive (width < 60rem) {
  .archive-row {
    --name-size: clamp(1.75rem, 0.7rem + 7vw, 3.75rem);
    grid-template-columns: 2.75rem minmax(0, 1fr);
    grid-template-areas:
      "idx brand"
      ".   verb"
      ".   spec"
      ".   act";
    row-gap: 12px;
  }
  .archive-idx { padding-top: 0.35em; }
  .archive-actions { justify-content: flex-start; flex-wrap: wrap; }
}

/* Very narrow: a long name may wrap, but only at the space ("CloakSnap / 幕盾"), never inside a CJK word */
@container archive (width < 30rem) {
  .archive-brand h3 { white-space: normal; word-break: keep-all; }
}

/* ---- App spreads: one chapter per app. The index above already owns the giant names, so
   here the scale comes from the product: the frame takes two thirds of the row and crops a
   solid vermilion chapter numeral (a CSS counter, so a new app needs no number). ---- */
@property --spread-rise { syntax: '<number>'; inherits: true; initial-value: 0; }

.spreads {
  display: grid;
  gap: var(--space-2xl);
  padding-top: var(--space-l);
  counter-reset: spread;
}

.spread {
  position: relative;
  counter-increment: spread;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: var(--space-m);
  align-items: end;
}

.spread__info {
  grid-column: 1 / span 4;
  display: grid;
  gap: var(--space-s);
}

.spread__media {
  position: relative;
  isolation: isolate;
  grid-column: 5 / -1;
  padding-top: calc(var(--numeral-size) * 0.56);
  --numeral-size: clamp(6rem, 2.5rem + 12vw, 15rem);
}

.spread--flip .spread__media { grid-column: 1 / span 8; grid-row: 1; }
.spread--flip .spread__info  { grid-column: 9 / -1;   grid-row: 1; }

/* The numeral sits behind the frame's top edge, so the frame cuts off its lower part. It
   always takes the frame's outer corner (away from the copy), whatever the copy's height. */
.spread__media::before {
  content: counter(spread, decimal-leading-zero) / ""; /* decorative: kept out of the accessibility tree */
  position: absolute;
  z-index: -1;
  top: 0;
  right: -0.03em;
  font-family: var(--font-display);
  font-size: var(--numeral-size);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.07em;
  color: var(--brand);
  translate: 0 calc(var(--spread-rise) * 0.42em);
  pointer-events: none;
  user-select: none;
}

.spread--flip .spread__media::before { right: auto; left: -0.05em; }

.spread__head {
  display: grid;
  justify-items: start;
  gap: 14px;
}

.spread__head img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  flex: none;
}

.spread__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.1rem + 2.6vw, 3.75rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  word-break: keep-all;
}

.spread__domain {
  display: block;
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--fg-2);
}

.spread__summary {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--fg-2);
  max-width: 44ch;
}

/* Facts: numbered, ruled rows instead of bullets */
.spread__facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  counter-reset: fact;
  border-bottom: 1px solid var(--line);
}

.spread__facts li {
  counter-increment: fact;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  align-items: baseline;
  padding-block: 11px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--fg);
}

.spread__facts li::before {
  content: counter(fact, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--brand-ink);
}

.spread__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

@media (max-width: 80em) {
  .spread__info { grid-column: 1 / span 5; }
  .spread__media { grid-column: 6 / -1; }
  .spread--flip .spread__media { grid-column: 1 / span 7; }
  .spread--flip .spread__info  { grid-column: 8 / -1; }
}

/* Editorial Media Frames */
.media-frame {
  position: relative;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  padding: clamp(1rem, 2vw, 1.5rem);
  overflow: clip;
}

.media-frame--dark {
  background: #131317;
  color: #F6F6F7;
  border-color: rgb(20 20 22 / .14);
}

.media-frame img.shot {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgb(0 0 0 / .22);
  transition: scale var(--dur-5) var(--ease-reveal);
}

@media (hover: hover) and (pointer: fine) {
  .media-frame:hover img.shot {
    scale: 1.03;
  }
}

.media-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  font-size: 0.8125rem;
  color: var(--fg-2);
}

.media-caption .data-token { flex: none; white-space: nowrap; }

.media-frame--dark .media-caption {
  color: #A9A9B2;
}

/* Authored Retina DOM Previews for ReelSnap & CloakSnap inside their spreads */
.ui-mock {
  border-radius: 14px;
  background: #18181D;
  border: 1px solid rgb(255 255 255 / .1);
  overflow: clip;
  color: #F6F6F7;
}

.ui-mock__body {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.reel-mock {
  display: grid;
  grid-template-columns: 1fr 164px;
  gap: 18px;
  align-items: center;
}

.reel-mock__timeline {
  display: grid;
  gap: 10px;
}

.reel-track {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-radius: 10px;
  background: #222229;
}

.reel-clip {
  flex: 1;
  height: 30px;
  border-radius: 6px;
  background: #33333D;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  color: #D2D2DC;
}

.reel-clip--zoom {
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
}

.reel-clip--cut {
  flex: 0.35;
  background: repeating-linear-gradient(-45deg, #27272E, #27272E 4px, #1D1D23 4px, #1D1D23 8px);
  color: #8A8A96;
}

.reel-phone {
  aspect-ratio: 9 / 14;
  border-radius: 20px;
  border: 3px solid #2F2F38;
  background: linear-gradient(160deg, #292136, #141418);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.reel-phone__pill {
  align-self: center;
  width: 44px;
  height: 6px;
  border-radius: 3px;
  background: #0B0B0D;
}

.reel-phone__card {
  background: #F6F6F7;
  color: #141416;
  border-radius: 10px;
  padding: 10px;
  font-size: 0.75rem;
  display: grid;
  gap: 6px;
}

.reel-phone__cap {
  padding: 5px 8px;
  border-radius: 6px;
  background: rgb(15 15 17 / .9);
  color: #F6F6F7;
  font-size: 0.75rem;
  text-align: center;
}

/* CloakSnap spread interactive preview */
.cloak-mock {
  display: grid;
  gap: 12px;
}

.cloak-mock__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  background: #102B22;
  border: 1px solid #2EB884;
  color: #E4FFF3;
  font-size: 0.875rem;
}

.cloak-mock__rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cloak-tile {
  padding: 12px;
  border-radius: 10px;
  background: #222229;
  display: grid;
  gap: 4px;
  font-size: 0.8125rem;
}

.cloak-tile strong {
  color: #F6F6F7;
  font-size: 0.875rem;
}

.cloak-tile span {
  color: #A9A9B2;
}

/* ---- BEAT 3: NATIVE CRAFT. A statement, four figures at poster size, then the weight bar
   across the full width: 300 MB of browser against a vermilion sliver. ---- */
.craft-band {
  padding-block: var(--space-xl) var(--space-2xl);
}

.craft {
  grid-column: 1 / -1;
  display: grid;
  gap: var(--space-l);
}

.craft-title {
  margin: 0;
  text-wrap: balance;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1rem + 5.4vw, 6.75rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

:root:lang(en) .craft-title { font-size: clamp(2.25rem, 0.9rem + 4.6vw, 5.75rem); }

.craft-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-m) var(--gutter);
}

.metric-cell {
  container-type: inline-size;
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  padding-top: var(--space-s);
  border-top: 1px solid var(--line-strong);
}

/* A short vermilion tick on each rule, like a measuring mark */
.metric-cell::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 28px;
  height: 3px;
  background: var(--brand);
}

.metric-cell__val {
  font-family: var(--font-display);
  font-size: clamp(2rem, 24cqi, 6rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.045em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}

.metric-cell--zero .metric-cell__val { color: var(--brand-ink); }

.metric-cell__label {
  font-size: 0.875rem;
  color: var(--fg-2);
}

/* Weight bar: two bars to one scale (data-web-mb = full width). The sliver is the point. */
@property --weight-draw { syntax: '<number>'; inherits: true; initial-value: 1; }

.weight {
  display: grid;
  gap: var(--space-m);
}

.weight__row { display: grid; gap: 12px; }

.weight__label {
  font-size: 0.9375rem;
  color: var(--fg-2);
}

.weight__label b {
  margin-left: 4px;
  font-weight: 600;
  color: var(--fg);
}

.weight__track {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  min-height: clamp(2.25rem, 1.5rem + 3vw, 4.5rem);
}

.weight__bar {
  display: block;
  flex: none;
  align-self: stretch;
  width: max(6px, calc(var(--w, 1) * 100%));
  border-radius: 4px;
  background: var(--rail-strong);
  transform-origin: 0 50%;
  scale: var(--weight-draw) 1;
}

.weight__row--keke .weight__bar { background: var(--brand); }
.weight__row--keke .weight__label b { color: var(--brand-ink); }

.weight__ratio {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.5rem + 3vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--brand-ink);
  white-space: nowrap;
}

/* Craft notes: ruled rows, two up, no boxes */
.craft-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-l) var(--space-l);
  padding-top: var(--space-m);
}

.craft-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding-top: var(--space-s);
  border-top: 2px solid var(--line-strong);
}

.craft-card__idx {
  font-size: 0.8125rem;
  color: var(--brand-ink);
}

.craft-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 1rem + 1.2vw, 2.125rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 22ch;
}

.craft-card p {
  margin: 0;
  color: var(--fg-2);
  max-width: 56ch;
}

.craft-checklist-box {
  grid-column: 1 / -1;
  padding: clamp(1.5rem, 2.4vw, 2rem);
  border-radius: 20px;
  background: var(--raised);
  border: 1px solid var(--line-strong);
  display: grid;
  gap: 12px;
}

.craft-checklist-box h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}

@media (min-width: 64em) {
  .craft-checklist-box .uim-todo { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-m); }
}

@media (max-width: 64em) {
  .craft-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 48em) {
  .craft-grid { grid-template-columns: 1fr; }
}

/* ---- BEAT 4: SUITE PRICING & PLAN PICKER (Light Floor, Dense Island) ---- */
.pricing-band {
  padding-block: var(--space-xl);
  border-radius: 28px 28px 0 0;
}

/* Pricing header: the statement at the same poster scale as the craft band, then one ruled
   row with the note and a big ¥ / $ toggle (the active symbol solid, the other outlined). */
.pricing-top {
  display: grid;
  gap: var(--space-m);
  margin-bottom: var(--space-l);
}

.pricing-title {
  margin: 0;
  text-wrap: balance;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1rem + 5.4vw, 6.75rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

:root:lang(en) .pricing-title { font-size: clamp(2.25rem, 0.9rem + 4.6vw, 5.75rem); }

.pricing-top__row {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-s) var(--space-m);
  padding-top: var(--space-s);
  border-top: 1px solid var(--line-strong);
}

/* Same measuring tick as the craft figures */
.pricing-top__row::before,
.suite-bundle-bar::before,
.footer-base::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 28px;
  height: 3px;
  background: var(--brand);
}

.pricing-top__row p {
  margin: 0;
  color: var(--fg-2);
  max-width: 54ch;
}

/* The page's one currency, set large. It follows the page language (i18n.mjs). */
.pricing-currency {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.1em;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 1.6rem + 3.4vw, 5.25rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--fg);
}

.pricing-currency small {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--fg-2);
}

.uim-plan-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.uim-plan-head img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.uim-plan-head b {
  font-size: 1rem;
  font-weight: 600;
}

.uim-plan-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.uim-plan-price strong {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
}

.uim-plan-price s {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--fg-2);
}

.uim-plan-sub {
  font-size: 0.8125rem;
  color: var(--fg-2);
}

/* The price stage: a dark island on the light floor. The current price is set at poster
   size; the list price above it is cut through by one vermilion stroke (刻). The stroke
   draws in on scroll and again on every plan or currency change (main.mjs). */
@property --price-cut { syntax: '<number>'; inherits: true; initial-value: 1; }

.plan-detail {
  margin-top: var(--space-m);
  padding: clamp(1.5rem, 3.6vw, 3.5rem);
  border-radius: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--space-l);
  align-items: end;
  overflow: clip;
}

.plan-stage {
  display: grid;
  align-content: end;
  gap: var(--space-s);
  min-width: 0;
}

.plan-stage__name {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--fg-2);
}

.plan-stage__price {
  margin: 0;
  display: grid;
  justify-items: start;
  gap: 6px;
}

.plan-stage__was {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1rem + 3.2vw, 4.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  text-decoration: none;
  color: transparent;
  -webkit-text-stroke: max(1.5px, 0.022em) var(--fg-3);
}

.plan-stage__was::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  top: 50%;
  height: max(3px, 0.08em);
  border-radius: 2px;
  background: var(--brand);
  transform-origin: 0 50%;
  rotate: -16deg;
  scale: var(--price-cut) 1;
}

.plan-stage__now {
  margin-left: -0.05em;
  font-family: var(--font-display);
  font-size: clamp(5rem, 1.5rem + 10.5vw, 12.5rem);
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}

.plan-detail__body {
  display: grid;
  gap: var(--space-s);
  min-width: 0;
}

.plan-detail__desc {
  margin: 0;
  color: var(--fg-2);
  max-width: 48ch;
}

.plan-detail__tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tier-box {
  padding: 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  gap: 4px;
}

.tier-box span {
  font-size: 0.8125rem;
  color: var(--fg-2);
}

.tier-box strong {
  font-family: var(--font-mono);
  font-size: 1.25rem;
}

.plan-detail__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
}

/* Bundle row: ruled like the pricing header, the question set as a heading-size line */
.suite-bundle-bar {
  position: relative;
  margin-top: var(--space-l);
  padding-top: var(--space-s);
  border-top: 1px solid var(--line-strong);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-s) var(--space-m);
  flex-wrap: wrap;
}

.suite-bundle-bar > div:first-child {
  display: grid;
  gap: 8px;
}

.suite-bundle-bar p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--fg-2);
}

.suite-bundle-bar p:first-child { text-wrap: balance; }
.suite-bundle-bar p + p { max-width: 52ch; }

.suite-bundle-bar strong {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 1rem + 1.3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--fg);
}

/* ---- BEAT 5: STUDIO CONTACT & FLUSH MONUMENTAL FOOTER (Dark Bookend) ---- */
.site-footer {
  padding-top: var(--space-xl);
  background: var(--bg);
  color: var(--fg);
  overflow: clip;
}

.footer-top {
  display: grid;
  grid-template-columns: subgrid;
  row-gap: var(--space-l);
  padding-bottom: var(--space-m);
}

/* Contact: the statement and the controls on one row, then the address itself at poster
   size, sized to the content width: one line on wide screens, user / domain on two below 40rem. */
@property --mail-draw { syntax: '<number>'; inherits: true; initial-value: 1; }

/* The footer grid is the size container for the address (cqi = content width). It sits on
   the outer grid, not on a subgrid: containment would switch a subgrid off. */
.site-footer > .grid { container: footer / inline-size; }

.footer-top > * { grid-column: 1 / -1; }

.footer-contact {
  display: grid;
  grid-template-columns: subgrid;
  row-gap: var(--space-l);
  align-items: end;
}

.footer-contact h2 {
  grid-column: 1 / span 7;
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-h2-keke);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.footer-contact__side {
  grid-column: 8 / -1;
  display: grid;
  gap: var(--space-s);
  align-content: end;
}

.footer-contact__side p {
  margin: 0;
  color: var(--fg-2);
  max-width: 44ch;
}

.footer-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.uim-bell-copy {
  display: grid;
  gap: 2px;
}

.uim-bell-state {
  font-size: 0.875rem;
  color: var(--fg-2);
}

.uim-bell-note {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--fg-3);
  max-width: 44ch;
  text-wrap: pretty;
}

.footer-mail {
  grid-column: 1 / -1;
  justify-self: start;
  margin-inline: -0.05em;
  padding: 0.02em 0.05em 0.08em;
  border-radius: 0.05em;
  font-family: var(--font-display);
  font-size: 8.85cqi; /* the address is ~11em wide: fills ~98% of the row */
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
  white-space: nowrap;
  color: var(--fg);
  text-decoration: none;
  background: linear-gradient(var(--brand) 0 0) no-repeat 0 100% / calc(var(--mail-draw) * 100%) max(3px, 0.06em);
  transition: background-size var(--dur-4) var(--ease-enter), color var(--dur-2) var(--ease-micro);
}

.footer-mail:focus-visible {
  background-size: 100% 100%;
  color: var(--on-brand);
  outline-color: var(--brand);
  outline-offset: 6px;
}

@media (hover: hover) and (pointer: fine) {
  .footer-mail:hover {
    background-size: 100% 100%;
    color: var(--on-brand);
  }
}

/* Base: four ruled columns, the studio clock set large */
.footer-base {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-m) var(--gutter);
  padding-top: var(--space-s);
  border-top: 1px solid var(--line-strong);
}

.footer-group h3 {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fg-2);
}

.footer-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.footer-group a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 0.9375rem;
  color: var(--fg);
  text-decoration: none;
  background: linear-gradient(var(--brand) 0 0) no-repeat 0 85% / 0 1px;
  transition: background-size var(--dur-3) var(--ease-enter), color var(--dur-2) var(--ease-micro);
}

.footer-group a:hover,
.footer-group a:focus-visible {
  background-size: 100% 1px;
}

.studio-clock {
  margin: 0;
  display: flex;
  align-items: baseline;
  font-size: clamp(2.25rem, 1.4rem + 2.4vw, 3.75rem);
  font-weight: 600;
  line-height: 1;
  color: var(--fg);
}

.studio-clock small {
  margin-left: 0.6rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg-2);
}

.footer-credits {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--fg-2);
}

.footer-mail span { display: inline; }

@container footer (width < 40rem) {
  .footer-mail { font-size: 12.4cqi; line-height: 0.98; }
  .footer-mail span { display: block; }
}

@media (max-width: 64em) {
  .footer-contact h2,
  .footer-contact__side { grid-column: 1 / -1; }
  .footer-base { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 36em) {
  .footer-base .footer-group:nth-child(-n + 2) { grid-column: 1 / -1; }
}

.clock-colon {
  animation: clock-blink 1s steps(1) infinite;
}

@keyframes clock-blink {
  50% { opacity: 0.25; }
}

/* Flush-to-bottom monumental KEKE wordmark (Awwwards typography.md §5.1 & layout.md §11)
   Whole caps, centered on grid width, flush to bottom, bleeding slightly into empty descender space only */
.footer-monument {
  margin-top: var(--space-m);
  padding-inline: var(--margin);
  max-width: 1680px;
  margin-inline: auto;
  overflow: clip;
}

@property --mono-rise { syntax: '<number>'; inherits: true; initial-value: 0; }

.footer-monument svg {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: -0.6%;
  translate: 0 calc(var(--mono-rise) * 62%);
}

/* ---- Inner Pages (About / Privacy / 404) ---- */
.subpage-main {
  min-height: 100svh;
  padding-top: calc(var(--header-h) + var(--space-l));
  padding-bottom: var(--space-xl);
}

.prose-block {
  grid-column: 1 / span 8;
  display: grid;
  gap: var(--space-m);
}

.prose-block h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-hero-keke);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.prose-block h2 {
  margin: var(--space-s) 0 0;
  font-size: var(--step-h3-keke);
  font-weight: 700;
}

.prose-block p {
  margin: 0;
  color: var(--fg-2);
  max-width: var(--measure);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.spec-table th,
.spec-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.spec-table th {
  font-weight: 600;
  color: var(--fg);
}

.spec-table td {
  color: var(--fg-2);
}

.spec-table a,
.notfound-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding-inline: 2px;
}

/* 404 stage */
.notfound-wrap {
  min-height: calc(100svh - var(--header-h));
  display: grid;
  place-items: center;
  padding: var(--space-l) var(--margin);
}

.notfound-card {
  width: min(100%, 760px);
  padding: clamp(2rem, 4vw, 3.5rem);
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  display: grid;
  gap: var(--space-m);
  justify-items: start;
}

.notfound-code {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
}

/* ---- Responsive Recomposition (390px and 720px) ---- */
@media (max-width: 64em) {
  .hero__lead,
  .hero__cta-row { grid-column: 1 / -1; justify-content: flex-start; }
  .hero__stage { grid-column: 1 / -1; }
  .section-head__num { grid-column: 1 / -1; }
  .section-head__title { grid-column: 1 / -1; }
  .section-head__desc { grid-column: 1 / -1; }
  .plan-detail { grid-template-columns: 1fr; align-items: start; }
  .prose-block { grid-column: 1 / -1; }
}

/* Spreads stay two-up on landscape tablets; they stack below 56em */
@media (max-width: 56em) {
  .spread__info,
  .spread__media,
  .spread--flip .spread__info,
  .spread--flip .spread__media {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  /* Media first so the product speaks before copy (layout.md R5) */
  .spread__media { order: -1; }
}

@media (max-width: 36em) {
  .hero__datum { font-size: 0.8125rem; gap: 8px; }
  .bench-ring { width: 165vw; }
  .reel-mock { grid-template-columns: 1fr; }
  .reel-phone { max-width: 190px; margin-inline: auto; }
  .cloak-mock__rows { grid-template-columns: 1fr; }
  .plan-detail__tiers { grid-template-columns: 1fr; }
  .uim-tabs [role="tab"] { font-size: 0.8125rem; padding: 0 4px; }
  .uim-tab-dot { display: none; }
}
