/* ==========================================================================
   NCLR — base layout / legacy components
   The visible 2026 editorial design lives in editorial.css.
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-2: #0a0a0a;
  --bg-3: #101010;
  --ink: #f5f5f5;
  --ink-2: #c9c9c9;
  --ink-soft: var(--ink-2);
  --muted: #9c9c9c;
  --muted-2: #7a7a7a;
  --faint: #565656;
  --accent: #ffffff;
  --accent-rgb: 255, 255, 255;
  --accent-strong: #ffffff;
  --accent-deep: #c7c7c7;
  --accent-pale: #e8e8e8;
  --accent-ink: #080808;
  --mint: var(--accent);
  --mint-2: var(--accent);
  --mint-3: var(--accent-deep);
  --violet: var(--accent);
  --blue: var(--accent);
  --amber: var(--warn);
  --warn: #c0c0c0;
  --warn-soft: #d8d8d8;
  --warn-text: #a8a8a8;
  --warn-rgb: 192, 192, 192;
  --danger: #8f8f8f;
  --danger-rgb: 143, 143, 143;
  --surface-rgb: 22, 22, 22;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --glass: rgba(255, 255, 255, 0.05);
  --radius: 24px;
  --shadow-card: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 26px 70px -40px rgba(0, 0, 0, 0.95);
  --shadow-soft: 0 20px 50px -30px rgba(0, 0, 0, 0.8);
  --grid-line: rgba(255, 255, 255, 0.05);
  --topbar-bg: rgba(5, 5, 5, 0.9);
  --pager-bg: rgba(9, 9, 9, 0.88);
  --nav-bg: rgba(255, 255, 255, 0.035);
  --nav-border: rgba(255, 255, 255, 0.09);
  --btn-primary-bg: linear-gradient(135deg, #ffffff 0%, #ededed 45%, #cfcfcf 100%);
  --btn-primary-ink: #080808;
  --btn-primary-shadow: 0 12px 34px -12px rgba(255, 255, 255, 0.22);
  --nav-active-bg: linear-gradient(135deg, #ffffff, #dedede);
  --nav-active-ink: #080808;
  --grad-text: linear-gradient(102deg, #ffffff 0%, #e8e8e8 40%, #a8a8a8 100%);
  --selection-ink: #080808;
  --scrollbar-thumb: rgba(255, 255, 255, 0.18);
  --footer-bg: linear-gradient(to bottom, rgba(5, 5, 5, 0.3), rgba(3, 3, 3, 0.94));
  --terminal-bg: #080808;
  --font-sans: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #fbfbf9;
  --bg-2: #f4f4f1;
  --bg-3: #ecece9;
  --ink: #0a0a0a;
  --ink-2: #2a2a2a;
  --muted: #5f5f5f;
  --muted-2: #7a7a7a;
  --faint: #9a9a9a;
  --accent: #111111;
  --accent-rgb: 17, 17, 17;
  --accent-strong: #111111;
  --accent-deep: #3a3a3a;
  --accent-pale: #ececec;
  --accent-ink: #ffffff;
  --warn: #5c5c5c;
  --warn-soft: #4a4a4a;
  --warn-text: #5c5c5c;
  --warn-rgb: 92, 92, 92;
  --danger: #7a7a7a;
  --danger-rgb: 122, 122, 122;
  --surface-rgb: 255, 255, 255;
  --line: rgba(0, 0, 0, 0.12);
  --line-strong: rgba(0, 0, 0, 0.22);
  --glass: rgba(255, 255, 255, 0.72);
  --shadow-card: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 24px 60px -38px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 18px 44px -30px rgba(0, 0, 0, 0.32);
  --grid-line: rgba(0, 0, 0, 0.055);
  --topbar-bg: rgba(250, 250, 248, 0.9);
  --pager-bg: rgba(255, 255, 255, 0.92);
  --nav-bg: rgba(0, 0, 0, 0.035);
  --nav-border: rgba(0, 0, 0, 0.1);
  --btn-primary-bg: linear-gradient(135deg, #1c1c1c, #000000);
  --btn-primary-ink: #ffffff;
  --btn-primary-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.45);
  --nav-active-bg: linear-gradient(135deg, #1c1c1c, #000000);
  --nav-active-ink: #ffffff;
  --grad-text: linear-gradient(102deg, #000000 0%, #2a2a2a 45%, #5a5a5a 100%);
  --selection-ink: #ffffff;
  --scrollbar-thumb: rgba(0, 0, 0, 0.28);
  --footer-bg: linear-gradient(to bottom, rgba(247, 247, 245, 0.3), #ecece9);
  --terminal-bg: #fafafa;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: auto;
  overflow-y: scroll;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: 108px;
}

body[data-route="home"] { --route-accent: var(--mint); }
body[data-route="engine"] { --route-accent: var(--violet); }
body[data-route="resources"] { --route-accent: var(--blue); }
body[data-route="security"] { --route-accent: var(--mint); }
body[data-route="ios"] { --route-accent: var(--amber); }
body[data-route="about"] { --route-accent: var(--violet); }

main { padding-top: 74px; }
main:focus { outline: none; }

::selection { background: var(--accent); color: var(--accent-ink); }

img { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, figure, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
svg { display: block; }

:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.8);
  outline-offset: 3px;
  border-radius: 6px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: var(--accent-strong);
  background: rgba(var(--accent-rgb), 0.07);
  border: 1px solid rgba(var(--accent-rgb), 0.13);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  overflow-wrap: anywhere;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--mint);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrap {
  width: min(1180px, calc(100% - 56px));
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Ambient background
   -------------------------------------------------------------------------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1100px 760px at 10% -12%, rgba(var(--accent-rgb), 0.16), transparent 62%),
    radial-gradient(940px 720px at 96% 4%, rgba(var(--accent-rgb), 0.1), transparent 64%),
    radial-gradient(1000px 900px at 58% 118%, rgba(var(--accent-rgb), 0.13), transparent 62%),
    linear-gradient(180deg, #0a0a0a 0%, #030303 100%);
}

.bg-aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.aurora-a {
  width: 48vw; height: 42vw; min-width: 420px; min-height: 380px;
  left: -10%; top: -12%;
  background: radial-gradient(circle at 50% 50%, rgba(var(--accent-rgb), 0.4), transparent 65%);
  animation: drift-a 24s ease-in-out infinite alternate;
}
.aurora-b {
  width: 42vw; height: 38vw; min-width: 380px; min-height: 340px;
  right: -12%; top: 6%;
  background: radial-gradient(circle at 50% 50%, rgba(var(--accent-rgb), 0.3), transparent 65%);
  animation: drift-b 30s ease-in-out infinite alternate;
}
.aurora-c {
  width: 52vw; height: 44vw; min-width: 420px; min-height: 380px;
  left: 26%; bottom: -24%;
  background: radial-gradient(circle at 50% 50%, rgba(var(--accent-rgb), 0.26), transparent 66%);
  animation: drift-c 27s ease-in-out infinite alternate;
}

@keyframes drift-a { to { transform: translate3d(6%, 5%, 0) scale(1.12); } }
@keyframes drift-b { to { transform: translate3d(-5%, 8%, 0) scale(1.08); } }
@keyframes drift-c { to { transform: translate3d(4%, -6%, 0) scale(1.14); } }

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(var(--accent-rgb), 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.045) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: radial-gradient(circle at 50% 24%, #000 0%, rgba(0, 0, 0, 0.55) 42%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 24%, #000 0%, rgba(0, 0, 0, 0.55) 42%, transparent 78%);
  opacity: 0.65;
}

.bg-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.4px 1.4px at 14% 22%, rgba(var(--accent-rgb), 0.55) 50%, transparent 51%),
    radial-gradient(1px 1px at 62% 12%, rgba(255, 255, 255, 0.4) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 82% 34%, rgba(var(--accent-rgb), 0.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 36% 48%, rgba(var(--accent-rgb), 0.4) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 74% 68%, rgba(var(--accent-rgb), 0.3) 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 76%, rgba(255, 255, 255, 0.3) 50%, transparent 51%);
  background-size: 520px 520px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 82%);
  opacity: 0.55;
}

.bg-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  opacity: 0.035;
  mix-blend-mode: overlay;
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 30%, transparent 45%, rgba(var(--surface-rgb), 0.55) 100%),
    linear-gradient(to bottom, transparent 70%, rgba(var(--surface-rgb), 0.7));
}

.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 560px;
  height: 560px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.09), rgba(var(--accent-rgb), 0.03) 38%, transparent 68%);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0);
  transition: opacity 0.5s ease;
  will-change: transform;
}
.cursor-glow.is-on { opacity: 1; }

.scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 90;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong) 55%, var(--accent));
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.6);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  height: 74px;
  background: linear-gradient(to bottom, rgba(var(--surface-rgb), 0.94), rgba(var(--surface-rgb), 0.7));
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.08);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.topbar-inner {
  width: min(1280px, calc(100% - 40px));
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex: none;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 26px rgba(var(--accent-rgb), 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.brand-glyph {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 4.6;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
.brand-mark-sm { width: 38px; height: 38px; border-radius: 11px; }
.brand-mark-sm .brand-glyph { width: 20px; height: 20px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong {
  font-size: 19px;
  font-weight: 780;
  letter-spacing: 0.11em;
  color: var(--ink);
}
.brand-text small {
  margin-top: 6px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--muted-2);
}
.brand-dot { margin: 0 4px; color: var(--mint); }

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline: auto;
  padding: 4px;
  border-radius: 999px;
  background: var(--nav-bg);
  border: 1px solid var(--nav-border);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 560;
  letter-spacing: 0.02em;
  color: var(--muted);
  border: 1px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
}
.nav-link .ico { width: 15px; height: 15px; opacity: 0.75; }
.nav-link:hover { color: var(--ink); background: rgba(var(--accent-rgb), 0.06); transform: translateY(-1px); }
.nav-link[aria-current="page"] {
  color: var(--nav-active-ink);
  background: var(--nav-active-bg);
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.22);
}
.nav-link[aria-current="page"] .ico { opacity: 1; }

.topbar-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.menu-btn {
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--nav-bg);
  border: 1px solid var(--nav-border);
  cursor: pointer;
}
.menu-btn .ico { width: 20px; height: 20px; }
.menu-btn .menu-close { display: none; }
.menu-btn[aria-expanded="true"] .menu-open { display: none; }
.menu-btn[aria-expanded="true"] .menu-close { display: block; }

/* --------------------------------------------------------------------------
   Buttons, chips, badges
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 640;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.22s var(--ease), box-shadow 0.22s, background 0.22s, border-color 0.22s, color 0.22s;
}
.btn .ico { width: 17px; height: 17px; }
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  color: var(--btn-primary-ink);
  background: var(--btn-primary-bg);
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: var(--btn-primary-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px -12px rgba(var(--accent-rgb), 0.7), inset 0 1px 0 #fff;
}

.btn-glass {
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(var(--accent-rgb), 0.16);
  backdrop-filter: blur(10px);
}
.btn-glass:hover {
  transform: translateY(-2px);
  background: rgba(var(--accent-rgb), 0.08);
  border-color: rgba(var(--accent-rgb), 0.34);
  box-shadow: 0 12px 30px -18px rgba(var(--accent-rgb), 0.6);
}

.btn-ghost {
  color: var(--ink-2);
  background: transparent;
  border-color: rgba(var(--accent-rgb), 0.14);
}
.btn-ghost:hover { color: var(--ink); border-color: rgba(var(--accent-rgb), 0.32); background: rgba(255, 255, 255, 0.03); }

.btn-lg { padding: 15px 24px; font-size: 14.5px; }
.btn-lg .ico { width: 18px; height: 18px; }
.btn-sm { padding: 8px 14px; font-size: 12.5px; }
.btn-sm .ico { width: 15px; height: 15px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
}
.chip-violet { color: var(--accent-strong); border-color: rgba(var(--accent-rgb), 0.28); background: rgba(var(--accent-rgb), 0.09); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted-2);
  background: rgba(var(--accent-rgb), 0.05);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
}
.tag-mint { color: var(--accent-strong); border-color: rgba(var(--accent-rgb), 0.3); }
.tag-blue { color: var(--accent-strong); border-color: rgba(var(--accent-rgb), 0.3); }
.tag-violet { color: var(--accent-strong); border-color: rgba(var(--accent-rgb), 0.3); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge-mint { color: var(--accent-strong); background: rgba(var(--accent-rgb), 0.12); border-color: rgba(var(--accent-rgb), 0.3); }
.badge-blue { color: var(--accent-strong); background: rgba(var(--accent-rgb), 0.1); border-color: rgba(var(--accent-rgb), 0.26); }
.badge-amber { color: var(--warn-soft); background: rgba(var(--warn-rgb), 0.1); border-color: rgba(var(--warn-rgb), 0.28); }
.badge-violet { color: var(--accent-strong); background: rgba(var(--accent-rgb), 0.1); border-color: rgba(var(--accent-rgb), 0.28); }
.badge-muted { color: var(--muted-2); background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.1); }

/* --------------------------------------------------------------------------
   Route switching + page-turn view transitions
   -------------------------------------------------------------------------- */

.route { display: none; }
.route:not([hidden]) { display: block; }

/* Persistent chrome; only the page sheet turns. */
.topbar { view-transition-name: site-header; }
.pager { view-transition-name: site-pager; }
.rail { view-transition-name: site-rail; }

html.is-turning .cursor-glow { opacity: 0; transition: opacity 0.15s; }

::view-transition-group(root) {
  animation-duration: 0.86s;
  animation-timing-function: cubic-bezier(0.68, 0.02, 0.24, 1);
}
::view-transition-image-pair(root) {
  perspective: 2600px;
  perspective-origin: 50% 50%;
  isolation: auto;
}
::view-transition-old(root) {
  transform-origin: left center;
  animation: page-turn-out 0.86s cubic-bezier(0.7, 0.02, 0.26, 1) both;
  backface-visibility: hidden;
  z-index: 2;
  box-shadow: 40px 0 90px rgba(0, 0, 0, 0.65);
}
::view-transition-new(root) {
  transform-origin: left center;
  animation: page-turn-in 0.86s cubic-bezier(0.3, 0.1, 0.2, 1) both;
  z-index: 1;
}

@keyframes page-turn-out {
  0% { transform: perspective(3200px) rotateY(0deg); filter: brightness(1) saturate(1); }
  18% { filter: brightness(0.94) saturate(0.95); }
  100% { transform: perspective(3200px) rotateY(-100deg); filter: brightness(0.38) saturate(0.7); }
}
@keyframes page-turn-in {
  0% { transform: scale(0.955); opacity: 0.28; filter: brightness(0.55); }
  55% { opacity: 1; }
  100% { transform: scale(1); opacity: 1; filter: brightness(1); }
}

:root[data-turn="back"] ::view-transition-old(root) {
  transform-origin: right center;
  animation-name: page-turn-out-back;
  box-shadow: -40px 0 90px rgba(0, 0, 0, 0.65);
}
:root[data-turn="back"] ::view-transition-new(root) {
  transform-origin: right center;
  animation-name: page-turn-in-back;
}

@keyframes page-turn-out-back {
  0% { transform: perspective(3200px) rotateY(0deg); filter: brightness(1); }
  18% { filter: brightness(0.94); }
  100% { transform: perspective(3200px) rotateY(100deg); filter: brightness(0.38) saturate(0.7); }
}
@keyframes page-turn-in-back {
  0% { transform: scale(0.955); opacity: 0.28; filter: brightness(0.55); }
  55% { opacity: 1; }
  100% { transform: scale(1); opacity: 1; filter: brightness(1); }
}

::view-transition-group(site-header),
::view-transition-group(site-pager),
::view-transition-group(site-rail) {
  z-index: 6;
}

/* Fallback for browsers without the View Transitions API */
.route.is-leaving { animation: fallback-leave 0.28s ease both; }
.route.is-entering { animation: fallback-enter 0.45s var(--ease) both; }
@keyframes fallback-leave { to { opacity: 0; transform: translateY(-10px); } }
@keyframes fallback-enter { from { opacity: 0; transform: translateY(14px); } }

/* --------------------------------------------------------------------------
   Hero animations, reveal
   -------------------------------------------------------------------------- */

body.is-intro .route.is-active .hero-anim { animation: rise-in 0.9s var(--ease) both; }
.hero-anim:nth-child(1) { animation-delay: 0.02s; }
.hero-anim:nth-child(2) { animation-delay: 0.09s; }
.hero-anim:nth-child(3) { animation-delay: 0.16s; }
.hero-anim:nth-child(4) { animation-delay: 0.24s; }
.hero-anim:nth-child(5) { animation-delay: 0.32s; }

@keyframes rise-in {
  from { opacity: 0; transform: translate3d(0, 22px, 0); }
  to { opacity: 1; transform: none; }
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Typography helpers
   -------------------------------------------------------------------------- */

.eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow-sep { color: rgba(var(--accent-rgb), 0.3); letter-spacing: 0; }
.eyebrow .chip { margin-left: 2px; }

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.5);
  animation: pulse 2.6s ease-out infinite;
  flex: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}

.kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

h1 {
  font-size: clamp(2.9rem, 6vw, 5.35rem);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--ink);
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.85rem);
  line-height: 1.08;
  font-weight: 760;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
}

h3 { font-size: 16px; font-weight: 660; letter-spacing: -0.01em; color: var(--ink); }

.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 10px 38px rgba(var(--accent-rgb), 0.18));
}

.lede {
  margin-top: 22px;
  max-width: 55ch;
  font-size: clamp(0.98rem, 1.15vw, 1.1rem);
  line-height: 1.8;
  color: var(--muted);
}

.lede-sm { font-size: 13.5px; line-height: 1.8; color: var(--muted); max-width: 46ch; }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.24);
  transition: color 0.2s, border-color 0.2s, gap 0.25s;
  white-space: nowrap;
}
.link-more .ico { width: 15px; height: 15px; transition: transform 0.25s; }
.link-more:hover { color: var(--ink); border-color: rgba(var(--accent-rgb), 0.6); gap: 12px; }
.link-more:hover .ico { transform: translateX(2px); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  align-items: center;
  gap: 20px;
  min-height: min(680px, calc(100vh - 250px));
  padding: clamp(36px, 5vw, 66px) 0 42px;
}

.hero-copy h1 { margin-top: 22px; }
.hero-copy .cta-row { margin-top: 30px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 26px;
  font-size: 11.5px;
  color: var(--muted);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta .ico { width: 14px; height: 14px; color: var(--accent); opacity: 0.9; }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 500px; }

.orb-wrap {
  position: relative;
  width: min(100%, 540px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.orb-halo {
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 46%, rgba(var(--accent-rgb), 0.24), rgba(var(--accent-rgb), 0.08) 48%, transparent 68%);
  filter: blur(8px);
}

.orb-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(var(--accent-rgb), 0.14);
  pointer-events: none;
}
.orb-ring.r1 { inset: 3%; animation: spin 90s linear infinite; }
.orb-ring.r2 { inset: 15%; border-style: solid; border-color: rgba(var(--accent-rgb), 0.08); animation: spin 64s linear infinite reverse; }
.orb-ring.r3 { inset: 27%; border-color: rgba(var(--accent-rgb), 0.16); animation: spin 46s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.cube-art {
  position: relative;
  z-index: 2;
  width: 66%;
  height: auto;
  filter: drop-shadow(0 34px 70px rgba(var(--accent-rgb), 0.16));
  animation: cube-float 7.5s ease-in-out infinite;
}
@keyframes cube-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(-0.6deg); }
}
.mini-cube { transform-box: fill-box; transform-origin: center; }
.mini-1 { animation: mini-float 5.5s ease-in-out infinite; }
.mini-2 { animation: mini-float 6.5s ease-in-out -1.8s infinite; }
@keyframes mini-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.icon-tile {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--accent-strong);
  background:
    radial-gradient(120% 120% at 28% 0%, rgba(255, 255, 255, 0.16), transparent 55%),
    linear-gradient(150deg, rgba(var(--accent-rgb), 0.22), rgba(var(--accent-rgb), 0.03));
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 14px 34px -18px rgba(var(--accent-rgb), 0.6);
  transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s;
}
.icon-tile::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.5), transparent);
  opacity: 0.5;
}
.icon-tile .ico { width: 28px; height: 28px; }
.feature-card:hover .icon-tile,
.info-card:hover .icon-tile,
.principle-card:hover .icon-tile,
.pipeline-card:hover .icon-tile {
  transform: translateY(-3px) rotate(-3deg);
  box-shadow: 0 18px 40px -16px rgba(var(--accent-rgb), 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.icon-tile.accent-violet {
  color: var(--accent-strong);
  border-color: rgba(var(--accent-rgb), 0.3);
  background:
    radial-gradient(120% 120% at 28% 0%, rgba(255, 255, 255, 0.16), transparent 55%),
    linear-gradient(150deg, rgba(var(--accent-rgb), 0.25), rgba(var(--accent-rgb), 0.035));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 14px 34px -18px rgba(var(--accent-rgb), 0.6);
}
.icon-tile.accent-blue {
  color: var(--accent-strong);
  border-color: rgba(var(--accent-rgb), 0.3);
  background:
    radial-gradient(120% 120% at 28% 0%, rgba(255, 255, 255, 0.16), transparent 55%),
    linear-gradient(150deg, rgba(var(--accent-rgb), 0.24), rgba(var(--accent-rgb), 0.035));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 14px 34px -18px rgba(var(--accent-rgb), 0.6);
}
.icon-tile.accent-amber {
  color: var(--warn-soft);
  border-color: rgba(var(--warn-rgb), 0.3);
  background:
    radial-gradient(120% 120% at 28% 0%, rgba(255, 255, 255, 0.16), transparent 55%),
    linear-gradient(150deg, rgba(var(--warn-rgb), 0.22), rgba(var(--warn-rgb), 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 14px 34px -18px rgba(var(--warn-rgb), 0.5);
}

.icon-tile-sm { width: 46px; height: 46px; border-radius: 14px; }
.icon-tile-sm .ico { width: 22px; height: 22px; }
.icon-tile-sm::after { left: 12px; right: 12px; bottom: 7px; }

.orbit-tile {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  animation: orbit-float 6.5s ease-in-out infinite;
}
.orbit-tile .icon-tile { width: 54px; height: 54px; border-radius: 16px; backdrop-filter: blur(8px); background-color: rgba(var(--surface-rgb), 0.6); }
.orbit-tile .ico { width: 25px; height: 25px; }
.orbit-tile em {
  font-style: normal;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--muted-2);
}
.ot-1 { top: 3%; left: 8%; animation-delay: -1.2s; }
.ot-2 { top: 13%; right: 1%; animation-delay: -2.6s; }
.ot-3 { bottom: 11%; left: 0%; animation-delay: -3.7s; }
.ot-4 { bottom: 1%; right: 9%; animation-delay: -0.6s; }
@keyframes orbit-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.orb-chip {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  background: rgba(var(--surface-rgb), 0.72);
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.orb-chip b { color: var(--ink); font-weight: 600; }
.orb-chip i { font-style: normal; font-size: 8px; color: var(--accent); opacity: 0.8; }
.chip-engine { top: 45%; left: -1%; }
.chip-hzr { right: -1%; bottom: 32%; }

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 4px 0 0;
  border-radius: var(--radius);
  overflow: hidden;
}
.glass {
  background: linear-gradient(155deg, rgba(var(--surface-rgb), 0.62), rgba(var(--surface-rgb), 0.66));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  position: relative;
}
.stat + .stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(var(--accent-rgb), 0.16), transparent);
}
.stat-icon {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.16);
}
.stat-icon .ico { width: 20px; height: 20px; }
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-body strong {
  font-size: 23px;
  font-weight: 760;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-body small { margin-top: 3px; font-size: 10.5px; color: var(--muted-2); letter-spacing: 0.01em; }

/* --------------------------------------------------------------------------
   Blocks / cards
   -------------------------------------------------------------------------- */

.block { margin-top: 104px; }
.block:first-of-type { margin-top: 92px; }

.block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 34px;
}
.block-head h2 { margin-top: 0; }
.block-aside {
  max-width: 330px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
  padding-bottom: 4px;
}

.card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(var(--surface-rgb), 0.66), rgba(var(--surface-rgb), 0.72));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  transition: transform 0.32s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

[data-spot]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--accent-rgb), 0.13), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
[data-spot]:hover::before { opacity: 1; }
[data-spot] > * { position: relative; z-index: 1; }
.card-index { position: absolute !important; z-index: 2 !important; }

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb), 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 34px 80px -46px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(var(--accent-rgb), 0.04);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature-card { display: flex; flex-direction: column; min-height: 288px; }
.feature-card .icon-tile { margin-bottom: 22px; }
.feature-card h3 { font-size: 16.5px; }
.feature-card p { margin-top: 9px; font-size: 12.8px; line-height: 1.75; color: var(--muted); }
.feature-card .tag-row { margin-top: auto; padding-top: 18px; }
.card-index {
  position: absolute;
  top: 24px;
  right: 25px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: rgba(var(--accent-rgb), 0.34);
}

.tri-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.info-card { min-height: 230px; }
.info-card .icon-tile { margin-bottom: 20px; }
.info-card h3 { font-size: 15.5px; }
.info-card p { margin-top: 8px; font-size: 12.6px; line-height: 1.78; color: var(--muted); }

/* --------------------------------------------------------------------------
   Showcase / screenshots
   -------------------------------------------------------------------------- */

.showcase {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: clamp(30px, 5vw, 62px);
  align-items: center;
  margin-top: 112px;
}
.showcase-copy h2 { margin-bottom: 20px; }
.showcase-copy > p { font-size: 13.5px; line-height: 1.85; color: var(--muted); max-width: 46ch; }
.showcase-copy .btn { margin-top: 26px; }

.check-list { margin-top: 22px; display: grid; gap: 11px; }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.8px;
  line-height: 1.65;
  color: var(--muted);
}
.check-list .ico { width: 15px; height: 15px; color: var(--accent); margin-top: 3px; }

.shot { position: relative; margin: 0; transform-style: preserve-3d; }
.shot-frame {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  background: #0a0a0a;
  box-shadow: 0 44px 100px -38px rgba(0, 0, 0, 0.95), inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.shot-frame img { display: block; width: 100%; height: auto; }
.shot-glow {
  position: absolute;
  inset: -16% -4%;
  z-index: -1;
  background: radial-gradient(58% 58% at 50% 50%, rgba(var(--accent-rgb), 0.18), transparent 70%);
  filter: blur(26px);
}
.shot figcaption {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--muted-2);
}
.shot-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.9);
  flex: none;
}
.shot[data-tilt] {
  transition: transform 0.45s var(--ease);
  will-change: transform;
}

.fig-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 12px;
  font-size: 10.5px;
  line-height: 1.65;
  color: var(--muted-2);
}
.fig-note .ico { width: 13px; height: 13px; margin-top: 2px; flex: none; opacity: 0.8; }

/* --------------------------------------------------------------------------
   CTA panel
   -------------------------------------------------------------------------- */

.cta-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 34px;
  padding: clamp(30px, 5vw, 54px);
  border-radius: 32px;
  background:
    radial-gradient(90% 150% at 6% 0%, rgba(var(--accent-rgb), 0.2), transparent 58%),
    radial-gradient(70% 120% at 100% 100%, rgba(var(--accent-rgb), 0.14), transparent 60%),
    linear-gradient(140deg, rgba(var(--surface-rgb), 0.9), rgba(var(--surface-rgb), 0.94));
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  box-shadow: 0 40px 100px -50px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.cta-watermark {
  position: absolute;
  right: -30px;
  top: -70px;
  width: 340px;
  height: 340px;
  fill: none;
  stroke: rgba(var(--accent-rgb), 0.5);
  stroke-width: 0.6;
  opacity: 0.07;
  transform: rotate(-8deg);
  pointer-events: none;
}
.cta-copy { position: relative; z-index: 1; max-width: 560px; }
.cta-copy h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
.cta-copy p { margin-top: 12px; font-size: 13.5px; line-height: 1.8; color: var(--muted); max-width: 48ch; }
.cta-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; flex: none; }

/* --------------------------------------------------------------------------
   Page head (subpages)
   -------------------------------------------------------------------------- */

.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 36px;
  padding: clamp(40px, 5vw, 66px) 0 38px;
}
.page-head-copy h1 { margin-top: 20px; font-size: clamp(2.5rem, 4.9vw, 4.15rem); }
.page-head-copy .lede { max-width: 60ch; }
.page-head-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-right: 6px;
}
.icon-orb {
  position: relative;
  width: 154px;
  height: 154px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent-strong);
  background:
    radial-gradient(circle at 50% 34%, rgba(var(--accent-rgb), 0.26), rgba(var(--surface-rgb), 0.7) 70%);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  box-shadow: 0 30px 80px -30px rgba(var(--accent-rgb), 0.5), inset 0 0 60px rgba(var(--accent-rgb), 0.12);
}
.icon-orb::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px dashed rgba(var(--accent-rgb), 0.16);
  animation: spin 42s linear infinite;
}
.icon-orb::after {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.08);
}
.icon-orb .ico { width: 54px; height: 54px; position: relative; z-index: 1; }
.icon-orb.accent-violet { color: var(--accent-strong); background: radial-gradient(circle at 50% 34%, rgba(var(--accent-rgb), 0.26), rgba(var(--surface-rgb), 0.7) 70%); border-color: rgba(var(--accent-rgb), 0.24); box-shadow: 0 30px 80px -30px rgba(var(--accent-rgb), 0.45), inset 0 0 60px rgba(var(--accent-rgb), 0.12); }
.icon-orb.accent-blue { color: var(--accent-strong); background: radial-gradient(circle at 50% 34%, rgba(var(--accent-rgb), 0.26), rgba(var(--surface-rgb), 0.7) 70%); border-color: rgba(var(--accent-rgb), 0.24); box-shadow: 0 30px 80px -30px rgba(var(--accent-rgb), 0.45), inset 0 0 60px rgba(var(--accent-rgb), 0.12); }
.icon-orb.accent-amber { color: var(--warn-soft); background: radial-gradient(circle at 50% 34%, rgba(var(--warn-rgb), 0.24), rgba(var(--surface-rgb), 0.7) 70%); border-color: rgba(var(--warn-rgb), 0.24); box-shadow: 0 30px 80px -30px rgba(var(--warn-rgb), 0.4), inset 0 0 60px rgba(var(--warn-rgb), 0.1); }
.icon-orb.accent-violet::before,
.icon-orb.accent-blue::before,
.icon-orb.accent-amber::before { border-color: rgba(255, 255, 255, 0.1); }

.page-head-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--muted-2);
  text-align: center;
}
.page-head-caption em { font-style: normal; font-size: 9px; letter-spacing: 0.18em; color: var(--faint); }

/* --------------------------------------------------------------------------
   Split block + terminal
   -------------------------------------------------------------------------- */

.split-block {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: start;
  padding-top: 52px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.08);
}
.split-copy h2 { margin-bottom: 16px; }

.step-list { margin-top: 28px; display: grid; }
.step-list li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid rgba(var(--accent-rgb), 0.08);
}
.step-list li:last-child { border-bottom: 1px solid rgba(var(--accent-rgb), 0.08); }
.step-num {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--accent);
  padding-top: 5px;
}
.step-list h3 { font-size: 14px; }
.step-list p { margin-top: 4px; font-size: 12px; line-height: 1.7; color: var(--muted); }

.terminal {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(var(--accent-rgb), 0.15);
  background: #080808;
  box-shadow: 0 46px 100px -40px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.08);
  background: rgba(255, 255, 255, 0.02);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--muted-2);
}
.term-dots { display: flex; gap: 6px; flex: none; }
.term-dots i { width: 8px; height: 8px; border-radius: 50%; background: #d8d8d8; opacity: 0.75; }
.term-dots i:nth-child(2) { background: #9a9a9a; }
.term-dots i:nth-child(3) { background: #5a5a5a; }
.term-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term-badge {
  flex: none;
  padding: 3px 7px;
  border-radius: 5px;
  color: var(--accent-strong);
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.26);
  font-size: 8.5px;
  letter-spacing: 0.16em;
}
.term-body { padding: 20px 18px; display: grid; gap: 12px; font-size: 12px; }
.term-line { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; overflow: hidden; }
.term-line > span:nth-child(2) { flex: none; min-width: 92px; color: var(--ink-2); }
.term-line .t-dim { color: var(--faint); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; }
.t-prompt { color: var(--accent); }
.t-cmd { color: var(--ink); font-weight: 600; }
.t-ok { color: var(--accent); }
.t-warn { color: var(--warn); }
.t-go { color: var(--accent); }
.caret {
  width: 7px;
  height: 14px;
  background: var(--accent);
  display: inline-block;
  vertical-align: -2px;
  animation: blink 1.1s step-end infinite;
  opacity: 0.8;
}
@keyframes blink { 50% { opacity: 0; } }
.term-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.08);
  background: rgba(255, 255, 255, 0.015);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: var(--faint);
}
.term-foot span {
  padding: 3px 7px;
  border-radius: 5px;
  border: 1px solid rgba(var(--accent-rgb), 0.1);
}

/* --------------------------------------------------------------------------
   Flow / token flow
   -------------------------------------------------------------------------- */

.flow {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.flow-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px 14px;
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(var(--surface-rgb), 0.55), rgba(var(--surface-rgb), 0.6));
  border: 1px solid rgba(var(--accent-rgb), 0.09);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.flow-step:hover { transform: translateY(-3px); border-color: rgba(var(--accent-rgb), 0.22); background: rgba(var(--surface-rgb), 0.6); }
.flow-step strong { font-size: 12.5px; font-weight: 640; color: var(--ink-2); }
.flow-step small { font-size: 10px; color: var(--muted-2); letter-spacing: 0.02em; }
.flow-step::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.35);
  border-right: 1px solid rgba(var(--accent-rgb), 0.35);
  transform: translateY(-50%) rotate(45deg);
}
.flow-step:last-child::after { display: none; }

/* --------------------------------------------------------------------------
   Media block
   -------------------------------------------------------------------------- */

.media-block {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(30px, 5vw, 60px);
  align-items: center;
  margin-top: 100px;
  padding-top: 52px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.08);
}
.media-copy h2 { margin-bottom: 16px; }
.media-copy > p { font-size: 13.3px; line-height: 1.85; color: var(--muted); max-width: 42ch; }
.metric-row { display: flex; gap: 30px; margin-top: 28px; }
.metric-row > div { display: flex; flex-direction: column; gap: 3px; }
.metric-row strong { font-size: 25px; font-weight: 760; letter-spacing: -0.03em; color: var(--ink); }
.metric-row span { font-size: 9.5px; letter-spacing: 0.14em; color: var(--muted-2); text-transform: uppercase; }

/* --------------------------------------------------------------------------
   Resources
   -------------------------------------------------------------------------- */

.ledger-hero {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 16px;
  padding-top: 10px;
}
.mega-card {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 3.4vw, 40px);
  border-radius: 28px;
  background:
    radial-gradient(90% 120% at 8% 0%, rgba(var(--accent-rgb), 0.15), transparent 55%),
    linear-gradient(155deg, rgba(var(--surface-rgb), 0.72), rgba(var(--surface-rgb), 0.8));
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  box-shadow: var(--shadow-card);
}
.mega {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 16px;
  font-size: clamp(3.4rem, 7.4vw, 5.6rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.mega em { font-style: normal; font-size: 0.26em; font-weight: 650; letter-spacing: 0.02em; color: var(--accent-strong); }
.mega-sub { margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.mega .tag-row { margin-top: 20px; }
.mega-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.1);
  font-size: 10.5px;
  color: var(--muted-2);
}
.mega-foot span { display: inline-flex; align-items: center; gap: 7px; }
.mega-foot .ico { width: 14px; height: 14px; color: var(--accent); }

.bars-card {
  padding: clamp(26px, 3.4vw, 36px);
  border-radius: 28px;
  background: linear-gradient(155deg, rgba(var(--surface-rgb), 0.66), rgba(var(--surface-rgb), 0.78));
  border: 1px solid rgba(var(--accent-rgb), 0.1);
  box-shadow: var(--shadow-card);
}
.bars-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.bars-head .kicker { margin: 0; }
.ledger-row { margin-bottom: 17px; }
.ledger-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.ledger-top span { font-size: 11.5px; color: var(--muted); }
.ledger-top strong { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; color: var(--ink-2); }
.bar {
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.055);
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-strong));
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.4);
  transition: width 1.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.in .bar span { width: var(--w); }
.bar-blue span { background: linear-gradient(90deg, var(--accent-deep), var(--accent-strong)); box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.35); }
.bar-violet span { background: linear-gradient(90deg, var(--accent-deep), var(--accent-strong)); box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.35); }
.bar-mint span { background: linear-gradient(90deg, var(--accent), var(--accent-pale)); }

.two-col {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
}
.ring-card {
  padding: 32px;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.ring {
  position: relative;
  width: 196px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(from -90deg, var(--accent) calc(var(--p, 0) * 1%), rgba(255, 255, 255, 0.07) 0);
  box-shadow: 0 0 60px rgba(var(--accent-rgb), 0.14);
}
.ring::before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: linear-gradient(160deg, #161616, #080808);
  border: 1px solid rgba(var(--accent-rgb), 0.07);
}
.ring-core { position: relative; z-index: 1; }
.ring-core strong {
  display: block;
  font-size: 33px;
  font-weight: 760;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ring-core strong small { font-size: 14px; color: var(--accent); margin-left: 1px; }
.ring-core span { display: block; margin-top: 3px; font-size: 9px; letter-spacing: 0.22em; color: var(--muted-2); text-transform: uppercase; }
.ring-card h3 { margin-top: 24px; font-size: 18px; }
.ring-card p { margin-top: 8px; font-size: 12.5px; line-height: 1.8; color: var(--muted); max-width: 34ch; }

.why-copy h2 { margin-bottom: 18px; }
.numbered-list { display: grid; gap: 4px; margin-top: 22px; }
.numbered-list li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 14px;
  padding: 15px 0;
  border-top: 1px solid rgba(var(--accent-rgb), 0.08);
}
.numbered-list li:last-child { border-bottom: 1px solid rgba(var(--accent-rgb), 0.08); }
.numbered-list > li > span { font-family: var(--font-mono); font-size: 10px; color: var(--accent); padding-top: 3px; letter-spacing: 0.12em; }
.numbered-list strong { font-size: 13.5px; font-weight: 640; color: var(--ink); }
.numbered-list p { margin-top: 4px; font-size: 12.2px; line-height: 1.75; color: var(--muted); }

.note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 24px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(var(--warn-rgb), 0.045);
  border: 1px solid rgba(var(--warn-rgb), 0.16);
}
.note strong { display: block; font-size: 12.7px; color: var(--warn-soft); }
.note p { margin-top: 3px; font-size: 11.8px; line-height: 1.7; color: var(--warn-text); }
.note-mint { background: rgba(var(--accent-rgb), 0.04); border-color: rgba(var(--accent-rgb), 0.16); }
.note-mint strong { color: var(--accent-strong); }
.note-mint p { color: var(--muted); }

.pipeline-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pipeline-card { display: flex; flex-direction: column; gap: 12px; min-height: 250px; }
.pipeline-card .step-num { position: absolute; top: 28px; right: 26px; padding: 0; }
.pipeline-card h3 { font-size: 17px; margin-top: 4px; }
.pipeline-card p { font-size: 12.5px; line-height: 1.75; color: var(--muted); }
.code-chip {
  display: block;
  margin-top: auto;
  padding: 9px 11px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.05);
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   Security
   -------------------------------------------------------------------------- */

.principles-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.principle-card { min-height: 218px; }
.principle-card .icon-tile { margin-bottom: 20px; }
.principle-card h3 { font-size: 17px; }
.principle-card p { margin-top: 9px; font-size: 12.8px; line-height: 1.8; color: var(--muted); max-width: 52ch; }

.token-panel { margin-top: 8px; padding: 30px; border-radius: 28px; }
.token-flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.token-flow li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid rgba(var(--accent-rgb), 0.08);
  text-align: center;
}
.token-flow li::after {
  content: "";
  position: absolute;
  right: -9px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.35);
  border-right: 1px solid rgba(var(--accent-rgb), 0.35);
  transform: translateY(-50%) rotate(45deg);
}
.token-flow li:last-child::after { display: none; }
.token-flow strong { font-size: 12px; font-weight: 640; color: var(--ink-2); }
.token-flow small { font-size: 9.5px; color: var(--muted-2); }
.never-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.08);
}
.never-label { font-size: 9.5px; letter-spacing: 0.2em; color: var(--muted-2); text-transform: uppercase; margin-right: 6px; }
.never-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  color: var(--danger);
  background: rgba(var(--danger-rgb), 0.06);
  border: 1px solid rgba(var(--danger-rgb), 0.18);
}
.never-chip .ico { width: 11px; height: 11px; }

.status-list { display: grid; gap: 9px; }
.status-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid rgba(var(--accent-rgb), 0.08);
  transition: background 0.25s, border-color 0.25s;
}
.status-row:hover { background: rgba(255, 255, 255, 0.035); border-color: rgba(var(--accent-rgb), 0.16); }
.status-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
}
.status-icon .ico { width: 19px; height: 19px; }
.status-warn { color: var(--warn-soft); background: rgba(var(--warn-rgb), 0.09); border: 1px solid rgba(var(--warn-rgb), 0.2); }
.status-info { color: var(--accent-strong); background: rgba(var(--accent-rgb), 0.08); border: 1px solid rgba(var(--accent-rgb), 0.2); }
.status-row strong { display: block; font-size: 13.2px; font-weight: 620; color: var(--ink); }
.status-row div > span { display: block; margin-top: 3px; font-size: 11.8px; line-height: 1.65; color: var(--muted-2); }
.legal-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 22px;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--muted-2);
}
.legal-line .ico { width: 13px; height: 13px; margin-top: 2px; flex: none; }

/* --------------------------------------------------------------------------
   iOS
   -------------------------------------------------------------------------- */

.device-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 4px;
}
.device-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  position: relative;
}
.device-stat + .device-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(var(--accent-rgb), 0.16), transparent);
}
.device-stat strong { display: block; font-size: 23px; font-weight: 760; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.device-stat strong em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--accent-strong); margin-left: 2px; }
.device-stat small { display: block; margin-top: 2px; font-size: 10.5px; color: var(--muted-2); }

.timeline { position: relative; max-width: 880px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 16px;
  bottom: 16px;
  width: 1px;
  background: linear-gradient(to bottom, rgba(var(--accent-rgb), 0.45), rgba(var(--accent-rgb), 0.22) 55%, rgba(255, 255, 255, 0.05));
}
.t-item {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 20px;
  padding-bottom: 16px;
}
.t-node {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #0e0e0e;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  color: var(--accent);
  box-shadow: 0 0 0 6px #0a0a0a;
}
.t-node .ico { width: 17px; height: 17px; }
.t-item.is-done .t-node { background: linear-gradient(150deg, var(--accent-strong), var(--accent)); color: var(--accent-ink); border-color: rgba(var(--accent-rgb), 0.6); box-shadow: 0 0 0 6px #0a0a0a, 0 0 24px rgba(var(--accent-rgb), 0.35); }
.t-item.is-built .t-node { color: var(--accent-strong); border-color: rgba(var(--accent-rgb), 0.35); }
.t-body {
  padding: 17px 22px;
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(var(--surface-rgb), 0.55), rgba(var(--surface-rgb), 0.62));
  border: 1px solid rgba(var(--accent-rgb), 0.08);
}
.t-top { display: flex; align-items: center; gap: 10px; }
.t-top strong { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; color: var(--accent); }
.t-body h3 { margin-top: 7px; font-size: 14.5px; }
.t-body p { margin-top: 4px; font-size: 12px; line-height: 1.7; color: var(--muted); }

.ios-lower { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 16px; margin-top: 26px; }
.import-card { padding: 30px; }
.import-card h3 { margin-top: 4px; font-size: 19px; }
.path-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #080808;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.path-root { color: var(--warn); }
.path-sep { color: var(--faint); }
.path-box strong { color: var(--accent); }
.mini-list { display: grid; gap: 8px; margin-top: 18px; }
.mini-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.mini-list .ico { width: 13px; height: 13px; color: var(--accent); margin-top: 3px; }
.import-card .fig-note { border-top: 1px solid rgba(var(--accent-rgb), 0.08); padding-top: 14px; margin-top: 18px; }

.quote-card { position: relative; padding: 34px; overflow: hidden; }
.quote-mark { position: absolute; top: 20px; right: 22px; width: 44px; height: 44px; color: var(--accent); opacity: 0.16; stroke-width: 1.2; }
.quote-card > p:first-of-type { position: relative; font-size: clamp(1.45rem, 2.5vw, 2rem); font-weight: 650; line-height: 1.4; letter-spacing: -0.02em; color: var(--ink); }
.quote-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; }
.quote-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(var(--accent-rgb), 0.09); font-size: 11.5px; line-height: 1.7; color: var(--muted-2); }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.author-grid { display: grid; grid-template-columns: 1fr 1fr 0.9fr; gap: 14px; }
.author-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  border-radius: 20px;
}
.avatar {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 21px;
  font-weight: 760;
  color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 10px 24px -12px rgba(0, 0, 0, 0.6);
}
.avatar-violet { background: linear-gradient(150deg, var(--accent-pale), var(--accent-deep)); }
.avatar-mint { background: linear-gradient(150deg, var(--accent-pale), var(--accent)); }
.author-card h3 { font-size: 15px; }
.author-card p { margin-top: 3px; font-size: 10.8px; color: var(--muted-2); line-height: 1.5; }
.author-card .badge { margin-left: auto; }
.version-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 20px;
  border-radius: 20px;
}
.version-card strong { display: block; font-size: 13.5px; }
.version-card div > span { display: block; margin-top: 2px; font-size: 10.3px; color: var(--muted-2); }
.version-card .tag { margin-left: auto; white-space: nowrap; }

.origin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.origin-card { padding: 28px; border-radius: var(--radius); }
.origin-card .icon-tile { margin-bottom: 22px; }
.origin-card .kicker { margin-bottom: 6px; }
.origin-card h3 { font-size: 24px; letter-spacing: -0.02em; }
.origin-card p { margin-top: 8px; font-size: 12.6px; line-height: 1.78; color: var(--muted); }
.origin-card .tag-row { margin-top: 18px; }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.gallery .shot figcaption { font-size: 10.5px; }

.roadmap h2 { margin-bottom: 18px; }
.roadmap-list { display: grid; }
.roadmap-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(var(--accent-rgb), 0.08);
}
.roadmap-list li:last-child { border-bottom: 1px solid rgba(var(--accent-rgb), 0.08); }
.roadmap-list span { font-family: var(--font-mono); font-size: 10px; color: var(--accent); padding-top: 3px; letter-spacing: 0.12em; }
.roadmap-list p { font-size: 12.5px; line-height: 1.7; color: var(--muted); }

.links-card { padding: 30px; border-radius: 28px; }
.links-card h3 { font-size: 19px; margin-bottom: 8px; }
.link-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(var(--accent-rgb), 0.08);
  text-decoration: none;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.link-row:hover { transform: translateX(4px); }
.link-row strong { display: block; font-size: 12.8px; color: var(--ink); }
.link-row small { display: block; margin-top: 2px; font-size: 10.5px; color: var(--muted-2); }
.link-arrow { margin-left: auto; width: 15px; height: 15px; color: var(--muted-2); transition: color 0.2s, transform 0.2s; }
.link-row:hover .link-arrow { color: var(--accent); transform: translate(2px, -2px); }
.links-card .legal-line { border-top: 1px solid rgba(var(--accent-rgb), 0.08); padding-top: 16px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: 120px;
  padding: 46px 0 34px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.08);
  background: linear-gradient(to bottom, rgba(var(--surface-rgb), 0.35), rgba(var(--surface-rgb), 0.9));
}
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 22px 40px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 11px; }
.footer-brand strong { display: block; font-size: 15px; letter-spacing: 0.14em; }
.footer-brand div span { display: block; margin-top: 2px; font-size: 7.5px; letter-spacing: 0.18em; color: var(--muted-2); }
.footer-tagline { grid-column: 1; font-size: 12.5px; color: var(--muted-2); }
.footer-links { grid-column: 2; grid-row: 1 / 3; display: flex; flex-wrap: wrap; gap: 20px; justify-content: flex-end; }
.footer-links a { font-size: 11.5px; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.07);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted-2);
}
.footer-note { grid-column: 1 / -1; max-width: 92ch; font-size: 10.2px; line-height: 1.75; color: var(--muted-2); }

/* --------------------------------------------------------------------------
   Rail
   -------------------------------------------------------------------------- */

.rail {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  pointer-events: none;
}
.rail-index { font-size: 11px; letter-spacing: 0.08em; color: var(--accent); }
.rail-line { width: 1px; height: 108px; background: rgba(var(--accent-rgb), 0.12); position: relative; overflow: hidden; }
.rail-line i { position: absolute; inset: 0 auto 0 0; width: 100%; height: 0; background: linear-gradient(to bottom, var(--accent), var(--accent)); transition: height 0.5s var(--ease); }
.rail-total { font-size: 8.5px; letter-spacing: 0.1em; color: var(--faint); }

/* --------------------------------------------------------------------------
   Pager
   -------------------------------------------------------------------------- */

.pager {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 75;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(var(--surface-rgb), 0.82);
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}
.pager-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 6px 11px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.22s, border-color 0.22s, transform 0.22s, color 0.22s;
}
.pager-btn:hover { background: rgba(var(--accent-rgb), 0.09); border-color: rgba(var(--accent-rgb), 0.22); color: var(--ink); transform: translateY(-1px); }
.pager-btn:disabled { opacity: 0.32; cursor: default; transform: none; background: transparent; border-color: transparent; }
.pager-btn:disabled:hover { transform: none; background: transparent; border-color: transparent; }
.pager-btn .ico { width: 15px; height: 15px; color: var(--accent); }
.pager-copy { display: flex; flex-direction: column; line-height: 1.18; text-align: left; min-width: 54px; }
.pager-next .pager-copy { text-align: right; }
.pager-copy small { font-size: 8px; letter-spacing: 0.16em; color: var(--muted-2); text-transform: uppercase; }
.pager-copy strong { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.pager-mid { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0 10px; min-width: 112px; }
.pager-dots { display: flex; align-items: center; gap: 5px; }
.pager-dots button {
  width: 14px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: width 0.28s var(--ease), background 0.28s, box-shadow 0.28s;
}
.pager-dots button:hover { background: rgba(var(--accent-rgb), 0.4); }
.pager-dots button.is-active {
  width: 26px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.6);
}
.pager-count { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.22em; color: var(--muted-2); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .rail { display: none; }
  .nav-ios { display: none; }
  .hero { grid-template-columns: 1.08fr 0.92fr; }
  .hero-visual { min-height: 440px; }
}

@media (max-width: 1080px) {
  .nav {
    position: fixed;
    left: 14px;
    right: 14px;
    top: 84px;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    padding: 10px;
    border-radius: 20px;
    background: rgba(var(--surface-rgb), 0.96);
    border: 1px solid rgba(var(--accent-rgb), 0.14);
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(26px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.99);
    transform-origin: top center;
    transition: opacity 0.24s, visibility 0.24s, transform 0.24s var(--ease);
    z-index: 79;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav-link { padding: 12px 14px; font-size: 14px; border-radius: 12px; }
  .nav-link .ico { width: 18px; height: 18px; }
  .nav-link[aria-current="page"] { border-radius: 12px; }
  .menu-btn { display: grid; }
  .hero { min-height: auto; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .principle-card { min-height: auto; }
  .author-grid { grid-template-columns: 1fr 1fr; }
  .version-card { grid-column: 1 / -1; }
  .flow { grid-template-columns: repeat(3, 1fr); row-gap: 18px; }
  .flow-step:nth-child(3n)::after { display: none; }
  .flow-step:nth-child(3)::after { display: none; }
}

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 10px; padding-top: 40px; }
  .hero-copy { max-width: 640px; }
  .hero-visual { min-height: 460px; margin-top: 6px; }
  .orb-wrap { width: min(100%, 480px); }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3)::before { display: none; }
  .stat:nth-child(3), .stat:nth-child(4) { border-top: 1px solid rgba(var(--accent-rgb), 0.08); }
  .showcase { grid-template-columns: 1fr; gap: 34px; }
  .showcase-copy { max-width: 620px; }
  .page-head { grid-template-columns: 1fr; gap: 26px; padding-bottom: 30px; }
  .page-head-visual { flex-direction: row; align-items: center; gap: 16px; padding: 0; }
  .icon-orb { width: 92px; height: 92px; }
  .icon-orb .ico { width: 34px; height: 34px; }
  .icon-orb::before { inset: -8px; }
  .icon-orb::after { inset: 15px; }
  .page-head-caption { align-items: flex-start; text-align: left; }
  .split-block { grid-template-columns: 1fr; gap: 30px; }
  .split-copy { max-width: 640px; }
  .media-block { grid-template-columns: 1fr; gap: 30px; }
  .ledger-hero { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .ring-card { max-width: 420px; width: 100%; margin-inline: auto; }
  .device-strip { grid-template-columns: repeat(2, 1fr); }
  .device-stat:nth-child(3)::before { display: none; }
  .device-stat:nth-child(3), .device-stat:nth-child(4) { border-top: 1px solid rgba(var(--accent-rgb), 0.08); }
  .ios-lower { grid-template-columns: 1fr; }
  .origin-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { grid-column: 1; grid-row: auto; justify-content: flex-start; }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 36px); }
  .topbar-inner { width: calc(100% - 28px); gap: 12px; }
  .brand-text small { display: none; }
  .brand-text strong { font-size: 17px; }
  .topbar-actions .btn-primary span { display: none; }
  .topbar-actions .btn-primary { padding: 10px 12px; }
  .topbar-actions .btn-primary .ico { width: 17px; height: 17px; }
  h1 { font-size: clamp(2.55rem, 10.5vw, 3.5rem); }
  .page-head-copy h1 { font-size: clamp(2.25rem, 9vw, 3.1rem); }
  .lede { font-size: 13.8px; line-height: 1.75; }
  .hero { padding-top: 32px; }
  .hero-visual { min-height: 390px; }
  .orb-wrap { width: min(100%, 390px); }
  .orbit-tile .icon-tile { width: 46px; height: 46px; border-radius: 14px; }
  .orbit-tile .ico { width: 21px; height: 21px; }
  .ot-1 { left: 2%; }
  .ot-3 { left: -2%; }
  .chip-engine { left: -2%; }
  .chip-hzr { right: -2%; }
  .stat { padding: 16px 15px; gap: 10px; }
  .stat-icon { width: 36px; height: 36px; }
  .stat-icon .ico { width: 17px; height: 17px; }
  .stat-body strong { font-size: 19px; }
  .stat-body small { font-size: 9.5px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 0; }
  .feature-card .tag-row { padding-top: 16px; }
  .block { margin-top: 72px; }
  .block-head { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 26px; }
  .block-aside { max-width: none; }
  .cta-panel { flex-direction: column; align-items: flex-start; gap: 24px; }
  .cta-actions { width: 100%; }
  .tri-grid, .pipeline-grid, .principles-grid, .gallery { grid-template-columns: 1fr; }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow-step::after { display: none; }
  .token-flow { grid-template-columns: repeat(2, 1fr); }
  .token-flow li::after { display: none; }
  .status-row { grid-template-columns: auto 1fr; }
  .status-row .badge { grid-column: 2; justify-self: start; }
  .author-grid { grid-template-columns: 1fr; }
  .version-card { grid-column: auto; }
  .step-list li { grid-template-columns: 22px 1fr; }
  .step-list .icon-tile { display: none; }
  .terminal { font-size: 11px; }
  .term-body { padding: 16px 14px; gap: 10px; font-size: 10.5px; }
  .term-line { white-space: normal; flex-wrap: wrap; gap: 6px 8px; }
  .term-line .t-dim { width: 100%; padding-left: 20px; font-size: 9.5px; }
  .term-line > span:nth-child(2) { min-width: 0; }
  .metric-row { gap: 20px; }
  .mega { font-size: clamp(3rem, 15vw, 4.4rem); }
  .device-stat { padding: 16px 14px; }
  .footer-links { gap: 16px; }
  .pager { bottom: 12px; padding: 5px; gap: 2px; }
  .pager-copy { display: none; }
  .pager-btn { padding: 8px 9px; min-height: 40px; }
  .pager-mid { min-width: 86px; padding: 0 6px; }
  body { padding-bottom: 92px; }
}

@media (max-width: 480px) {
  .hero-visual { min-height: 340px; }
  .orb-wrap { width: 100%; }
  .orbit-tile em { display: none; }
  .orb-chip { font-size: 8px; padding: 6px 8px; }
  .stat-strip, .device-strip { grid-template-columns: 1fr; }
  .stat + .stat::before, .device-stat + .device-stat::before { display: none; }
  .stat + .stat, .device-stat + .device-stat { border-top: 1px solid rgba(var(--accent-rgb), 0.08); }
  .chip-row .chip { font-size: 9px; }
  .eyebrow { font-size: 9px; letter-spacing: 0.14em; }
  .hero-meta { gap: 8px 14px; font-size: 10.5px; }
  .cta-row .btn { flex: 1 1 100%; }
}

/* Short desktop viewports: keep the stat strip clear of the floating pager */
@media (min-width: 981px) and (max-height: 820px) {
  .hero {
    min-height: auto;
    padding-top: 26px;
    padding-bottom: 26px;
  }
  .hero-visual { min-height: 430px; }
  .orb-wrap { width: min(100%, 480px); }
  .stat { padding-top: 17px; padding-bottom: 17px; }
}

@media (min-width: 981px) and (max-height: 680px) {
  .hero-visual { min-height: 350px; }
  .orb-wrap { width: min(100%, 400px); }
  .hero-copy .lede { margin-top: 16px; }
  .hero-copy .cta-row { margin-top: 20px; }
  .hero-meta { margin-top: 16px; }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .cursor-glow { display: none; }
  .cube-art, .mini-cube, .orbit-tile, .orb-ring { animation: none !important; }
  body.is-intro .route.is-active .hero-anim { animation: none !important; }
}
