/* ==========================================================================
   Cornelius marketing site
   Design language: designer art-toy / vinyl collector photography.
   Palette: coral, cobalt, bone white. Type: Geist (self-hosted).
   Radius system: panels 32px, cards 20px, interactive = pill.
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  /* brand */
  --coral: #fa5944;
  /* backdrop tones sampled from the mascot renders, so panels continue the photo seamlessly */
  --coral-hero-still: #ff644a;   /* hero render backdrop at the seam column */
  --coral-hero-video: #ff6c48;   /* hero loop backdrop (the encoder shifts it slightly warmer) */
  --coral-morning: #fe6049;      /* morning render backdrop (404 page) */
  --coral-laptop: #fe604a;       /* laptop render backdrop (CTA panel) */
  --coral-box: #fd634d;          /* box render backdrop */
  --coral-deep: #e2452f;
  --coral-ink: #7a1f12;
  --cobalt: #2c57ba;
  --cobalt-deep: #234a9f;
  --cobalt-ink: #1a3675;
  --gold: #d9a441;

  /* neutrals (light) */
  --bg: #f6f4f0;
  --paper: #fffdf9;
  --bone-2: #ecE9e2;
  --ink: #17171a;
  --ink-2: #4b4b53;
  --ink-3: #7c7c85;
  --line: rgba(23, 23, 26, 0.1);
  --line-strong: rgba(23, 23, 26, 0.18);
  --coral-tint: #fde3de;
  --cobalt-tint: #dee6f8;
  --on-brand: #fffdf9;

  /* shape */
  --r-panel: 32px;
  --r-card: 20px;
  --r-code: 14px;
  --r-pill: 999px;

  /* type */
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* layout */
  --wrap: 1240px;
  --wrap-wide: 1440px;
  --gutter: clamp(16px, 2.2vw, 28px);
  --section: clamp(72px, 9vw, 128px);
  --nav-h: 72px;

  /* motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-soft: 0 24px 60px -24px rgba(23, 23, 26, 0.18);
  --shadow-card: 0 1px 0 rgba(23, 23, 26, 0.04), 0 12px 32px -18px rgba(23, 23, 26, 0.16);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121215;
    --paper: #1a1a1f;
    --bone-2: #202026;
    --ink: #f1efea;
    --ink-2: #c9c7c1;
    --ink-3: #8f8d88;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.2);
    --coral-tint: rgba(250, 89, 68, 0.16);
    --cobalt-tint: rgba(64, 108, 210, 0.22);
    --shadow-soft: 0 24px 60px -24px rgba(0, 0, 0, 0.6);
    --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.03), 0 12px 32px -18px rgba(0, 0, 0, 0.6);
  }
}

/* ---------- Reset-ish ---------- */
*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01" 0, "cv11" 1;
}
html, body { overflow-x: clip; }
img, video, svg { display: block; max-width: 100%; }
a, button { -webkit-tap-highlight-color: transparent; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
code, pre, kbd { font-family: var(--mono); }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--coral); color: #fff; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--cobalt); color: #fff; padding: 10px 16px; border-radius: var(--r-pill);
}
.skip-link:focus { top: 12px; }

/* ---------- Layout helpers ---------- */
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap-wide { width: min(var(--wrap-wide), 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: var(--section); }
.section-head { max-width: 40ch; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2 { font-size: clamp(2rem, 2.4vw + 0.9rem, 3rem); line-height: 1.08; letter-spacing: -0.03em; }
.section-head p { margin-top: 16px; font-size: 1.125rem; color: var(--ink-2); max-width: 56ch; }
.lead { font-size: 1.1875rem; line-height: 1.55; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.eyebrow { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cobalt); }

/* ---------- Icons ---------- */
.ic { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }
.ic-lg { width: 24px; height: 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border-radius: var(--r-pill);
  font-weight: 500; font-size: 1.0625rem; letter-spacing: -0.005em;
  white-space: nowrap; line-height: 1;
  transition: transform 0.25s var(--ease-out), background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  will-change: transform;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary { background: var(--cobalt); color: #fff; box-shadow: 0 10px 24px -14px rgba(44, 87, 186, 0.7); }
.btn-primary:hover { background: var(--cobalt-deep); }
.btn-secondary { background: rgba(255, 253, 249, 0.94); color: #17171a; box-shadow: 0 10px 24px -16px rgba(122, 31, 18, 0.5); }
.btn-secondary:hover { background: #fffdf9; }
.btn-ghost { color: var(--ink); border: 1.5px solid var(--line-strong); background: var(--paper); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 0.9375rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  transition: box-shadow 0.3s var(--ease-out);
}
.nav.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.nav-inner {
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.5rem; letter-spacing: -0.03em; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; overflow: hidden; flex: none; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 0.9375rem; font-weight: 500; color: var(--ink-2); transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-login { font-size: 0.9375rem; font-weight: 500; color: var(--ink-2); padding: 8px 14px; border-radius: var(--r-pill); }
.nav-login:hover { color: var(--ink); background: var(--bone-2); }
.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px; align-items: center; justify-content: center;
  color: var(--ink);
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform 0.3s var(--ease-out), opacity 0.2s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.3s var(--ease-out); }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
.nav-drawer { display: none; }

@media (max-width: 1023px) {
  .nav-links, .nav-login { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-drawer {
    display: block; position: absolute; left: 0; right: 0; top: var(--nav-h);
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform 0.3s var(--ease-out), opacity 0.2s;
  }
  .nav-drawer.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-drawer a { display: block; padding: 14px 4px; font-size: 1.125rem; font-weight: 500; border-bottom: 1px solid var(--line); }
  .nav-drawer a:last-child { border-bottom: 0; }
  .nav-actions .btn { min-height: 44px; padding: 0 18px; font-size: 0.9375rem; }
}

/* ---------- Hero ---------- */
.hero { padding: 8px var(--gutter) 0; }
.hero-panel {
  position: relative; overflow: hidden;
  background: var(--coral-hero-still);
  transition: background-color 0.9s var(--ease-out); /* follows the video's fade-in so the seam never shows */
  color: var(--on-brand);
  border-radius: var(--r-panel);
  min-height: min(calc(100dvh - var(--nav-h) - 24px), 880px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  isolation: isolate;
}
.hero-copy {
  padding: clamp(40px, 6vw, 96px) clamp(16px, 3vw, 40px) clamp(40px, 6vw, 96px) clamp(24px, 5.5vw, 88px);
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
  position: relative; z-index: 2;
  container-type: inline-size;
}
.hero h1 {
  font-size: clamp(2.5rem, 3.6vw + 0.3rem, 4rem);
  font-size: clamp(2.5rem, 9.6cqi, 4rem);
  line-height: 1.04; letter-spacing: -0.036em; font-weight: 600;
}
.hero-sub { font-size: clamp(1.125rem, 0.6vw + 0.95rem, 1.375rem); font-weight: 500; line-height: 1.45; max-width: 46ch; color: rgba(255, 253, 249, 0.96); text-wrap: pretty; }
.hero-sub strong, .cta-copy p strong { font-weight: 700; color: #fff; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

.hero-media { position: relative; min-height: 420px; }
.hero-media img,
.hero-media video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 38% 100%;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 100%);
}
.hero-media video { opacity: 0; transition: opacity 0.9s var(--ease-out); }
.hero-media.is-playing video { opacity: 1; }
.hero-panel.is-playing { background: var(--coral-hero-video); }

/* platform word swap in the headline */
.swap { position: relative; display: inline-grid; white-space: nowrap; }
.swap > span { grid-area: 1 / 1; transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out); }
.swap > span[aria-hidden="true"] { opacity: 0; transform: translateY(0.35em); pointer-events: none; }
.swap > span.is-active { opacity: 1; transform: none; }
.swap-static { display: none; }

@media (max-width: 1023px) {
  .hero-panel { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: clamp(36px, 8vw, 64px) clamp(22px, 6vw, 48px) 8px; }
  .hero-media { min-height: 0; aspect-ratio: 1 / 1; max-height: 640px; }
  .hero-media img, .hero-media video { object-position: 50% 100%; -webkit-mask-image: none; mask-image: none; }
  .hero h1 { max-width: 14ch; }
}
@media (max-width: 480px) {
  .hero-media { aspect-ratio: 4 / 5; }
}

/* ---------- Platform strip ---------- */
.platforms { padding-block: clamp(36px, 5vw, 56px); }
.platforms-inner { display: flex; align-items: center; justify-content: center; gap: clamp(20px, 4vw, 48px); flex-wrap: wrap; }
.platforms-label { color: var(--ink-3); font-size: 0.9375rem; font-weight: 500; }
.platform { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--ink); }
.platform svg { width: 30px; height: 30px; fill: currentColor; }
.platform-note { font-size: 0.875rem; color: var(--ink-3); font-weight: 400; margin-left: 2px; }
.platform-sep { width: 1px; height: 28px; background: var(--line-strong); }
@media (max-width: 640px) { .platforms-inner { flex-direction: column; gap: 14px; } .platform-sep { display: none; } .platform { font-size: 1.125rem; } }

/* ---------- Architecture: blueprint ---------- */
.bp {
  --bp-blue: #1f3d8f;          /* deeper than the brand cobalt on purpose: reads as blueprint paper, does not twin the memory panel */
  --bp-line: rgba(255, 255, 255, 0.86);
  --bp-mono: rgba(255, 255, 255, 0.78);
  position: relative; overflow: hidden; color: #fff;
  background-color: var(--bp-blue);
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1.3px);
  background-size: 22px 22px; background-position: 11px 11px;
  border-radius: var(--r-panel);
  padding: clamp(28px, 4vw, 56px) clamp(20px, 3.6vw, 56px) clamp(22px, 3vw, 40px);
}
.bp-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 210px) minmax(0, 1fr) minmax(160px, 190px) minmax(0, 1fr); align-items: stretch; }
.bp-node {
  position: relative; border: 1.5px solid var(--bp-line); border-radius: 16px;
  padding: 22px 22px 20px; min-height: 250px;
  background: rgba(31, 61, 143, 0.6);
  display: flex; flex-direction: column; gap: 10px;
}
.bp-id { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bp-mono); }
.bp-node h3 { font-size: 1.125rem; letter-spacing: -0.015em; line-height: 1.3; color: inherit; }
.bp-node p { font-size: 0.9375rem; color: rgba(255, 255, 255, 0.88); }
.bp-facts { margin-top: auto; padding-top: 6px; font-family: var(--mono); font-size: 0.75rem; line-height: 1.75; color: rgba(255, 255, 255, 0.92); }
.bp-facts li::before { content: "\25B8\00a0"; color: #ffb2a6; }
.bp-us { background: var(--paper); color: var(--ink); border-color: var(--paper); box-shadow: 0 30px 50px -30px rgba(0, 0, 0, 0.55); }
.bp-us .bp-id { color: var(--ink-3); }
.bp-us p { color: var(--ink-2); }
.bp-us .bp-facts { color: var(--ink); }
.bp-us .bp-facts li::before { color: var(--coral-deep); }
.bp-mark { position: absolute; top: -18px; right: 18px; width: 40px; height: 40px; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.5); }
/* links: two wires per gap, one each way, labelled with the real tool names */
.bp-link { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 46px; padding: 0 6px; }
.bp-wire { position: relative; height: 0; border-top: 1.5px solid var(--bp-line); }
.bp-wire::after { content: ""; position: absolute; top: -5px; border: 5px solid transparent; }
.bp-fwd::after { right: -1px; border-left: 7px solid #fff; }
.bp-rev::after { left: -1px; border-right: 7px solid #fff; }
.bp-wire span { position: absolute; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 4px); text-align: center; line-height: 1.3; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.02em; color: #fff; background: var(--bp-blue); padding: 0 5px; bottom: 6px; }
.bp-rev span { bottom: auto; top: 8px; }
.bp-boundary { position: absolute; left: 50%; top: -34px; bottom: -22px; border-left: 2px dashed rgba(255, 178, 166, 0.9); }
.bp-badge { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); background: var(--coral-hero-still); color: #fff; font-size: 0.72rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.5); }
.bp-legend { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--mono); font-size: 0.72rem; color: rgba(255, 255, 255, 0.8); }
.bp-legend i { display: inline-block; width: 22px; vertical-align: middle; margin-right: 6px; border-top: 1.5px solid #fff; }
.bp-legend .bp-l-dash { border-top-style: dashed; border-color: #ffb2a6; }
.bp-legend .bp-l-tri { border: 0; width: auto; margin-right: 2px; }
.bp-legend .bp-l-tri::before { content: "\25B8"; color: #ffb2a6; }
/* draw-on when the panel scrolls into view */
@media (prefers-reduced-motion: no-preference) {
  .js .bp .bp-node { opacity: 0; transform: translateY(12px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
  .js .bp.in .bp-node { opacity: 1; transform: none; }
  .js .bp.in .bp-node:nth-child(3) { transition-delay: 0.12s; }
  .js .bp.in .bp-node:nth-child(5) { transition-delay: 0.24s; }
  .js .bp .bp-fwd { clip-path: inset(-48px 100% -48px 0); transition: clip-path 0.8s var(--ease-out) 0.35s; }
  .js .bp .bp-rev { clip-path: inset(-48px 0 -48px 100%); transition: clip-path 0.8s var(--ease-out) 0.55s; }
  .js .bp.in .bp-wire { clip-path: inset(-48px 0 -48px 0); }
  .js .bp .bp-boundary { opacity: 0; transition: opacity 0.6s var(--ease-out) 0.9s; }
  .js .bp .bp-badge { opacity: 0; transform: translate(-50%, 6px); transition: opacity 0.5s var(--ease-out) 1.15s, transform 0.5s var(--ease-out) 1.15s; }
  .js .bp.in .bp-boundary { opacity: 1; }
  .js .bp.in .bp-badge { opacity: 1; transform: translate(-50%, 0); }
}
@media (max-width: 1100px) {
  .bp-grid { grid-template-columns: minmax(0, 1fr) minmax(140px, 170px) minmax(0, 1fr) minmax(130px, 160px) minmax(0, 1fr); }
  .bp-wire span { font-size: 0.62rem; }
}
@media (max-width: 900px) {
  /* stacked: nodes full width, wires turn vertical with labels beside them */
  .bp-grid { grid-template-columns: 1fr; }
  .bp-node { min-height: 0; }
  .bp-link { flex-direction: row; justify-content: center; gap: clamp(28px, 10vw, 80px); padding: 22px 0; }
  .bp-wire { height: 56px; width: 0; border-top: 0; border-left: 1.5px solid var(--bp-line); }
  .bp-wire::after { top: auto; left: -6px; }
  .bp-fwd::after { bottom: -1px; right: auto; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid #fff; border-bottom: 0; }
  .bp-rev::after { top: -1px; left: -6px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 7px solid #fff; border-top: 0; }
  .bp-wire span { top: 50%; bottom: auto; left: 12px; transform: translateY(-50%); padding: 0 4px; background: var(--bp-blue); font-size: 0.66rem; text-align: left; max-width: none; }
  .bp-rev span { top: 50%; }
  .bp-boundary { left: 0; right: 0; top: 50%; bottom: auto; border-left: 0; border-top: 2px dashed rgba(255, 178, 166, 0.9); }
  .bp-badge { top: -13px; left: 50%; }
  .js .bp .bp-fwd { clip-path: inset(0 -300px 100% -12px); }
  .js .bp .bp-rev { clip-path: inset(100% -300px 0 -12px); }
  .js .bp.in .bp-wire { clip-path: inset(0 -300px 0 -12px); }
}
@media (max-width: 480px) {
  .bp-link { flex-direction: column; gap: 14px; align-items: flex-start; padding: 26px 0 22px 18px; }
  .bp-wire { height: 40px; }
  .bp-boundary { top: 0; }
  .bp-badge { top: -13px; left: 50%; }
  .bp-wire span { white-space: normal; max-width: 60vw; }
}

/* ---------- Split: What's in the box ---------- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.split-media { border-radius: var(--r-panel); overflow: hidden; background: var(--coral-box); box-shadow: var(--shadow-soft); }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-list { display: grid; gap: 8px; }
.feature-list li { display: grid; grid-template-columns: 44px 1fr; gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.feature-list li:first-child { border-top: 0; padding-top: 0; }
.feature-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--cobalt-tint); color: var(--cobalt); display: grid; place-items: center; }
.feature-list h3 { font-size: 1.1875rem; letter-spacing: -0.015em; }
.feature-list p { margin-top: 6px; color: var(--ink-2); max-width: 46ch; }
@media (max-width: 1023px) {
  .split { grid-template-columns: 1fr; }
  .split-media { max-width: 520px; }
}

/* ---------- Ledger: kept / removed ---------- */
.ledger {
  background: var(--paper); border-radius: var(--r-panel); box-shadow: var(--shadow-card);
  padding: clamp(28px, 4.5vw, 64px);
}
.ledger-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); position: relative; }
.ledger-cols::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--line); }
.ledger h3 { font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-3); margin-bottom: 20px; }
.ledger ul { display: grid; gap: 14px; }
.ledger li { display: flex; gap: 14px; align-items: flex-start; font-size: 1.125rem; line-height: 1.45; letter-spacing: -0.01em; }
.ledger .mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; }
.ledger .mark svg { width: 16px; height: 16px; }
.mark-keep { background: var(--cobalt-tint); color: var(--cobalt); }
.mark-drop { background: var(--coral-tint); color: var(--coral-deep); }
.ledger-note { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 1.0625rem; max-width: 70ch; }
@media (max-width: 767px) {
  .ledger-cols { grid-template-columns: 1fr; }
  .ledger-cols::before { display: none; }
}

/* ---------- Morning: text + brief card ---------- */
.morning { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.morning-points { display: grid; gap: 14px; margin-top: 28px; }
.morning-points li { display: flex; gap: 14px; align-items: flex-start; font-size: 1.0625rem; color: var(--ink-2); }
.morning-points .ic { color: var(--cobalt); margin-top: 3px; }
.brief {
  background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow-card);
  padding: clamp(22px, 3vw, 36px); position: relative;
}
.brief-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.brief-avatar { width: 36px; height: 36px; border-radius: 12px; overflow: hidden; flex: none; }
.brief-head strong { display: block; font-size: 0.9375rem; }
.brief-head span { display: block; font-size: 0.8125rem; color: var(--ink-3); }
.brief-body { font-size: 1rem; line-height: 1.6; color: var(--ink); }
.brief-body p + p, .brief-body ol, .brief-body ol + p { margin-top: 12px; }
.brief-body ol { list-style: decimal; padding-left: 22px; display: grid; gap: 10px; }
.brief-body ol li::marker { color: var(--cobalt); font-weight: 600; }
.brief-skip { margin-top: 16px; padding: 10px 14px; border-radius: 12px; background: var(--bone-2); color: var(--ink-3); font-size: 0.875rem; }
.brief-rate { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 0.875rem; color: var(--ink-3); }
.brief-rate span.pill { border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 4px 12px; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
@media (max-width: 1023px) { .morning { grid-template-columns: 1fr; } }

/* ---------- Memory panel (cobalt) ---------- */
.memory-panel {
  background: var(--cobalt); color: #fff; border-radius: var(--r-panel);
  padding: clamp(32px, 5vw, 80px);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: center;
  overflow: hidden; position: relative;
}
.memory-panel h2 { font-size: clamp(2rem, 2.4vw + 0.9rem, 3rem); line-height: 1.08; letter-spacing: -0.03em; }
.memory-panel .lead { color: rgba(255, 255, 255, 0.86); margin-top: 18px; }
.memory-facts { margin-top: 28px; display: grid; gap: 12px; }
.memory-facts li { display: flex; gap: 12px; align-items: flex-start; color: rgba(255, 255, 255, 0.92); }
.memory-facts .ic { color: #fff; margin-top: 3px; }
.file {
  background: #10193a; color: #e8ecf8; border-radius: var(--r-code); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
  font-family: var(--mono); font-size: 0.8125rem; line-height: 1.6; overflow: hidden;
}
.file-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: rgba(255, 255, 255, 0.06); border-bottom: 1px solid rgba(255, 255, 255, 0.08); font-size: 0.75rem; color: rgba(232, 236, 248, 0.7); }
.file-bar .ic { width: 16px; height: 16px; }
.file pre { margin: 0; padding: 18px 20px 20px; overflow-x: auto; white-space: pre; tab-size: 2; }
.file .fm { color: #9fb4ff; }
.file .h { color: #ffd166; font-weight: 600; }
.file .lk { color: #8be9fd; }
.file .ev { color: #b8c4e6; opacity: 0.85; }
.file .del { text-decoration: line-through; opacity: 0.6; }
.file .since { color: #c3f7c9; }
@media (max-width: 1023px) { .memory-panel { grid-template-columns: 1fr; } }

/* ---------- Security bento ---------- */
.bento {
  display: grid; gap: 16px;
  grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 4fr);
  grid-template-areas:
    "img a b"
    "img c d";
}
.cell { border-radius: var(--r-card); padding: clamp(22px, 2.6vw, 34px); display: flex; flex-direction: column; gap: 12px; min-height: 240px; }
.cell-img { grid-area: img; padding: 0; overflow: hidden; background: var(--coral); box-shadow: var(--shadow-soft); min-height: 320px; }
.cell-img picture { display: block; height: 100%; }
.cell-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.cell-a { grid-area: a; background: var(--coral-tint); }
.cell-b { grid-area: b; background: var(--cobalt-tint); }
.cell-c { grid-area: c; background: var(--paper); box-shadow: var(--shadow-card); }
.cell-d { grid-area: d; background: var(--bone-2); }
.cell .cell-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.55); color: var(--ink); position: relative; transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out); }
.cell .cell-ic > svg { grid-area: 1 / 1; transition: opacity 0.3s var(--ease-out), transform 0.35s var(--ease-out); }
.cell .cell-ic .ic-hover { opacity: 0; transform: scale(0.8); }
.cell-a .cell-ic { color: var(--coral-deep); }
.cell-b .cell-ic { color: var(--cobalt); }
/* Hover: lift, deeper tinted shadow, and the outline icon swaps to its filled twin. Motion off under reduced-motion. */
.cell { transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .cell:not(.cell-img):hover { transform: translateY(-4px); box-shadow: 0 22px 44px -24px rgba(23, 23, 26, 0.28); }
  .cell:hover .cell-ic { background: var(--ink); color: var(--paper); }
  .cell-a:hover .cell-ic { background: var(--coral-deep); color: #fff; }
  .cell-b:hover .cell-ic { background: var(--cobalt); color: #fff; }
  .cell:hover .cell-ic .ic-rest { opacity: 0; transform: scale(1.15); }
  .cell:hover .cell-ic .ic-hover { opacity: 1; transform: scale(1); }
  .cell-img { transition: transform 0.35s var(--ease-out); }
  .cell-img:hover img { transform: scale(1.03); }
  .cell-img img { transition: transform 0.6s var(--ease-out); }
}
.cell h3 { font-size: 1.1875rem; letter-spacing: -0.015em; margin-top: 4px; }
.cell p { color: var(--ink-2); font-size: 1rem; }
.bento-note { margin-top: 20px; color: var(--ink-3); font-size: 0.9375rem; display: flex; gap: 8px; align-items: center; }
@media (prefers-color-scheme: dark) { .cell .cell-ic { background: rgba(255, 255, 255, 0.08); } .cell-a .cell-ic { color: #ff8b78; } .cell-b .cell-ic { color: #8fb0ff; } }
@media (max-width: 1023px) {
  .bento { grid-template-columns: 1fr 1fr; grid-template-areas: "img img" "a b" "c d"; }
  .cell-img { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; grid-template-areas: "img" "a" "b" "c" "d"; }
  .cell { min-height: 0; }
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); position: relative; }
.step { position: relative; padding-top: 24px; }
.step::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line-strong); }
.step-n { width: 36px; height: 36px; border-radius: 50%; background: var(--cobalt); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 0.9375rem; margin-bottom: 18px; }
.step h3 { font-size: 1.25rem; letter-spacing: -0.02em; }
.step p { margin-top: 8px; color: var(--ink-2); }
.step .btn-sm { margin-top: 14px; }
.oneline { margin-top: clamp(28px, 4vw, 48px); max-width: 860px; }
.oneline-label { font-size: 0.875rem; font-weight: 600; color: var(--ink-3); margin-bottom: 10px; }
.codeline {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-code);
  padding: 14px 14px 14px 18px; font-family: var(--mono); font-size: 0.9375rem; line-height: 1.5; color: var(--ink);
}
.codeline code { flex: 1; word-break: break-word; }
.copy-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 8px; background: var(--bone-2); color: var(--ink-2); font-family: var(--font); font-size: 0.8125rem; font-weight: 500; transition: background 0.2s, color 0.2s; }
.copy-btn:hover { background: var(--cobalt-tint); color: var(--cobalt); }
.copy-btn.is-done { background: var(--cobalt); color: #fff; }
.steps-after { margin-top: 20px; padding: 22px 26px; border-radius: var(--r-card); background: var(--cobalt-tint); color: var(--ink); display: flex; gap: 14px; align-items: flex-start; max-width: 860px; }
.steps-after .ic { color: var(--cobalt); margin-top: 3px; }
@media (max-width: 1023px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Compare table ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-card); background: var(--paper); box-shadow: var(--shadow-card); }
table.compare { width: 100%; min-width: 860px; border-collapse: separate; border-spacing: 0; font-size: 0.9875rem; }
.compare th, .compare td { text-align: left; padding: 16px 18px; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare thead th { font-weight: 600; font-size: 0.875rem; color: var(--ink-3); letter-spacing: 0.01em; padding-top: 20px; }
.compare tbody tr:last-child td, .compare tbody tr:last-child th { border-bottom: 0; }
.compare tbody th { font-weight: 600; color: var(--ink); width: 22%; }
.compare td { color: var(--ink-2); }
.compare .us { background: var(--coral-tint); color: var(--ink); font-weight: 500; }
.compare thead th.us { color: var(--coral-deep); }
.compare .yes { display: inline-flex; align-items: center; gap: 6px; color: var(--cobalt); font-weight: 600; }
.compare .no { color: var(--ink-3); }
@media (prefers-color-scheme: dark) { .compare thead th.us { color: #ff8b78; } .compare .yes { color: #8fb0ff; } }
.compare-note { margin-top: 16px; font-size: 0.875rem; color: var(--ink-3); }
/* Narrow screens: every criterion becomes a card, Cornelius first, no sideways scrolling. */
@media (max-width: 760px) {
  .table-wrap { overflow: visible; background: none; box-shadow: none; border-radius: 0; }
  table.compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; min-width: 0; width: auto; }
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare tr { background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 6px 18px 12px; margin-bottom: 14px; }
  .compare tbody th { width: auto; padding: 14px 0 10px; font-size: 1.0625rem; border-bottom: 1px solid var(--line); }
  .compare td { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .compare td:last-child { border-bottom: 0; }
  .compare td::before { content: attr(data-label); display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-3); margin-bottom: 2px; }
  .compare td.us { background: var(--coral-tint); margin: 8px -18px 0; padding: 12px 18px; border-bottom: 0; }
  .compare td.us::before { color: var(--coral-deep); }
  .compare tbody tr:last-child td { border-bottom: 1px solid var(--line); }
  .compare tbody tr:last-child td:last-child { border-bottom: 0; }
}

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 4px; font-weight: 600; font-size: 1.125rem; letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: none; transition: transform 0.35s var(--ease-out), background 0.2s, border-color 0.2s; }
.faq summary .plus::before, .faq summary .plus::after { content: ""; position: absolute; width: 12px; height: 1.5px; background: currentColor; }
.faq summary .plus::after { transform: rotate(90deg); transition: transform 0.35s var(--ease-out); }
.faq summary .plus { position: relative; }
.faq details[open] summary .plus { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.faq details[open] summary .plus::after { transform: rotate(0deg); }
.faq .answer { padding: 0 4px 24px; color: var(--ink-2); max-width: 66ch; }
.faq .answer p + p { margin-top: 10px; }

/* ---------- Final CTA ---------- */
.cta-panel {
  background: var(--coral-laptop); color: var(--on-brand); border-radius: var(--r-panel); overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: stretch; min-height: 480px;
}
.cta-copy { padding: clamp(36px, 5.5vw, 80px) clamp(24px, 5vw, 80px); display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.cta-copy h2 { font-size: clamp(2.2rem, 3.2vw + 0.8rem, 3.6rem); line-height: 1.04; letter-spacing: -0.035em; max-width: 14ch; }
.cta-copy p { font-size: 1.1875rem; font-weight: 500; max-width: 44ch; color: rgba(255, 253, 249, 0.96); }
.cta-media { position: relative; min-height: 300px; }
.cta-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 60% 100%; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%); mask-image: linear-gradient(to right, transparent 0, #000 12%); }
@media (max-width: 900px) {
  .cta-panel { grid-template-columns: 1fr; }
  /* The morning render is square; show all of it so the head is never cropped. */
  .cta-media { aspect-ratio: 4 / 3; min-height: 0; max-height: 560px; }
  /* contain, not cover: the panel colour equals the render's backdrop, so any letterboxing is invisible */
  .cta-media img { object-fit: contain; object-position: 50% 100%; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 7%); mask-image: linear-gradient(to bottom, transparent 0, #000 7%); }
}

/* ---------- Footer ---------- */
.footer { padding: clamp(40px, 6vw, 72px) 0 40px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; align-items: start; }
.footer p { color: var(--ink-2); max-width: 36ch; margin-top: 12px; }
.footer h3 { font-size: 0.875rem; color: var(--ink-3); font-weight: 600; letter-spacing: 0.02em; margin-bottom: 14px; }
.footer ul { display: grid; gap: 10px; }
.footer ul a { color: var(--ink-2); font-size: 0.9875rem; }
.footer ul a:hover { color: var(--ink); }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--ink-3); font-size: 0.875rem; }
@media (max-width: 767px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-inner > :first-child { grid-column: 1 / -1; } }

/* ---------- Legal pages (privacy, terms) ---------- */
.legal-head { padding: clamp(40px, 6vw, 72px) 0 clamp(20px, 3vw, 36px); max-width: 72ch; }
.legal-head h1 { font-size: clamp(2.2rem, 2.6vw + 0.9rem, 3.4rem); line-height: 1.06; letter-spacing: -0.03em; }
.legal-meta { margin-top: 14px; color: var(--ink-3); font-size: 0.9375rem; }
.legal-summary { margin-top: 28px; background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 22px 26px; }
.legal-summary h2 { font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-3); margin-bottom: 12px; }
.legal-summary ul { list-style: disc; padding-left: 20px; display: grid; gap: 8px; color: var(--ink); }
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); padding-bottom: var(--section); align-items: start; }
.legal-toc { position: sticky; top: calc(var(--nav-h) + 24px); font-size: 0.9375rem; }
.legal-toc h2 { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-3); margin-bottom: 10px; }
.legal-toc a { display: block; padding: 6px 0; color: var(--ink-2); border-left: 2px solid transparent; padding-left: 12px; margin-left: -14px; }
.legal-toc a:hover { color: var(--ink); border-left-color: var(--line-strong); }
.legal-body { max-width: 72ch; font-size: 1.0625rem; color: var(--ink); }
.legal-body h2 { font-size: 1.375rem; letter-spacing: -0.02em; margin: 44px 0 14px; scroll-margin-top: calc(var(--nav-h) + 16px); }
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-size: 1.0625rem; margin: 22px 0 8px; }
.legal-body p + p { margin-top: 12px; }
.legal-body ul { list-style: disc; padding-left: 22px; display: grid; gap: 8px; margin: 12px 0; }
.legal-body li::marker { color: var(--cobalt); }
.legal-body a { color: var(--cobalt); text-decoration: underline; text-underline-offset: 3px; }
.legal-body strong { font-weight: 600; }
.legal-flag { background: var(--coral-tint); color: var(--coral-ink); padding: 0 6px; border-radius: 6px; font-weight: 500; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .legal-flag { color: #ffb2a6; } }
.legal-note { margin-top: 36px; padding: 18px 22px; border-radius: var(--r-card); background: var(--cobalt-tint); color: var(--ink); font-size: 0.9875rem; }
@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
  .legal-toc a { display: inline-block; margin: 0 14px 0 0; padding-left: 0; border-left: 0; }
}

/* ---------- Small-screen refinements ---------- */
@media (max-width: 767px) {
  :root { --nav-h: 60px; --section: 56px; }
  .brand { font-size: 1.3125rem; }
  .brand-mark { width: 26px; height: 26px; border-radius: 8px; }
  .hero { padding-top: 6px; }
  .hero-copy { gap: 20px; }
  .section-head { margin-bottom: 28px; }
  .file { font-size: 0.75rem; }
  .file pre { padding: 14px 16px 16px; }
  .brief { padding: 20px 18px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}
@media (max-width: 560px) {
  .codeline { flex-direction: column; align-items: stretch; gap: 10px; }
  .copy-btn { justify-content: center; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; }
  .steps-after { padding: 18px 18px; }
}
@media (max-width: 420px) {
  .nav-actions .btn { min-height: 40px; padding: 0 14px; font-size: 0.875rem; }
  .nav-toggle { width: 40px; height: 40px; }
  .hero h1 { font-size: clamp(2.1rem, 11vw, 2.6rem); }
  .cell { padding: 20px 18px; }
  .arch-node { padding: 20px 18px; }
}

/* ---------- Motion: entrances & reveals ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { opacity: 0; transform: translateY(18px); animation: rise 0.9s var(--ease-out) forwards; }
  .hero-copy > :nth-child(1) { animation-delay: 0.05s; }
  .hero-copy > :nth-child(2) { animation-delay: 0.16s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.27s; }
  .hero-media { opacity: 0; transform: translateY(24px) scale(0.985); animation: rise 1.1s var(--ease-out) 0.15s forwards; }
  @keyframes rise { to { opacity: 1; transform: none; } }

  /* Reveal states only apply when JS is running (html.js); without JS everything is simply visible. */
  .js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .reveal-stagger > * { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
  .js .reveal-stagger.in > * { opacity: 1; transform: none; }
  .reveal-stagger.in > :nth-child(1) { transition-delay: 0.02s; }
  .reveal-stagger.in > :nth-child(2) { transition-delay: 0.09s; }
  .reveal-stagger.in > :nth-child(3) { transition-delay: 0.16s; }
  .reveal-stagger.in > :nth-child(4) { transition-delay: 0.23s; }
  .reveal-stagger.in > :nth-child(5) { transition-delay: 0.30s; }
}
@media (prefers-reduced-motion: reduce) {
  .swap > span[aria-hidden="true"] { display: none; }
  .swap > span.is-active { display: none; }
  .swap-static { display: inline; }
  .hero-media video { display: none; }
  .btn, .btn:hover, .btn:active { transform: none; }
}
