/* Lordubs Labs + FridgeSpin site styles.
   Company pages use palette B ("cool slate, electric blue"); pages with
   <body class="fs"> switch to the FridgeSpin brand (cream / carrot / sage,
   and the app's dark theme in dark mode). Colours are tokens on :root. */

@font-face { font-family: "Space Grotesk"; font-weight: 400; font-display: swap; src: url("/assets/fonts/SpaceGrotesk_400Regular.ttf") format("truetype"); }
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url("/assets/fonts/SpaceGrotesk_500Medium.ttf") format("truetype"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url("/assets/fonts/SpaceGrotesk_700Bold.ttf") format("truetype"); }
@font-face { font-family: "Azeret Mono"; font-weight: 500; font-display: swap; src: url("/assets/fonts/AzeretMono_500Medium.ttf") format("truetype"); }

/* ---- Tokens: Lordubs Labs (palette B) ---- */
:root {
  color-scheme: light dark;
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --ink: #0E1726;
  --mute: #546070;
  --line: #D9DEE7;
  --accent: #1A66E0;      /* links, eyebrows, small accent text */
  --btn: #1A66E0;         /* primary button fill */
  --on-btn: #FFFFFF;
  --accent-wash: rgba(26, 102, 224, 0.08);
  --review-bg: #FFF1B8;
  --review-ink: #4A3800;
  --review-line: #C9A400;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Azeret Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --radius: 10px;
  --radius-lg: 16px;
}
/* Dark: follows the system unless the header toggle (assets/theme.js) set
   data-theme on <html>. The dark blocks appear twice: once for the system
   preference, once for an explicit choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0B0F17;
    --surface: #131927;
    --ink: #F4F6FA;
    --mute: #C3CCDA;
    --line: #2C3647;
    --accent: #2E86FF;
    --btn: #1F6FEB;
    --on-btn: #FFFFFF;
    --accent-wash: rgba(46, 134, 255, 0.12);
    --review-bg: #3A2F00;
    --review-ink: #FFE58A;
    --review-line: #8A7400;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B0F17;
  --surface: #131927;
  --ink: #F4F6FA;
  --mute: #C3CCDA;
  --line: #2C3647;
  --accent: #2E86FF;
  --btn: #1F6FEB;
  --on-btn: #FFFFFF;
  --accent-wash: rgba(46, 134, 255, 0.12);
  --review-bg: #3A2F00;
  --review-ink: #FFE58A;
  --review-line: #8A7400;
}
:root[data-theme="light"] { color-scheme: light; }

/* ---- Tokens: FridgeSpin pages ---- */
body.fs {
  --bg: #F7F1E1;
  --surface: #FFFBEF;
  --ink: #2B2A1C;
  --mute: #5E5A48;
  --line: #E3D9BF;
  --accent: #A0431F;      /* dark carrot: passes 4.5:1 on cream for text */
  --btn: #E8823A;         /* carrot orange, with ink text (white fails on it) */
  --on-btn: #2B2A1C;
  --accent-wash: rgba(232, 130, 58, 0.14);
  --sage: #6DA54A;
  --track: #EAD9B0;
  --spin: #B84F30;        /* the app's spin colour, a touch darker so white text passes 4.5:1 */
  --on-spin: #FFFFFF;
  --badge: var(--spin);   /* step number badges */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.fs {
    --bg: #0E0B14;
    --surface: #17131F;
    --ink: #F2ECDF;
    --mute: #BDB5A8;
    --line: #2C2538;
    --accent: #E5FF3A;
    --btn: #E5FF3A;
    --on-btn: #0E0B14;
    --accent-wash: rgba(229, 255, 58, 0.10);
    --sage: #4DE0FF;
    --track: #1C1627;
    --spin: #FF3EA5;
    --on-spin: #0E0B14;
    --badge: var(--accent);
  }
}
:root[data-theme="dark"] body.fs {
  --bg: #0E0B14;
  --surface: #17131F;
  --ink: #F2ECDF;
  --mute: #BDB5A8;
  --line: #2C2538;
  --accent: #E5FF3A;
  --btn: #E5FF3A;
  --on-btn: #0E0B14;
  --accent-wash: rgba(229, 255, 58, 0.10);
  --sage: #4DE0FF;
  --track: #1C1627;
  --spin: #FF3EA5;
  --on-spin: #0E0B14;
  --badge: var(--accent);
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.45rem, 3.4vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: 0.88em; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--btn); color: var(--on-btn); padding: 10px 14px; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 28px; } }

/* ---- Header ---- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px; padding-top: 16px; padding-bottom: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  background: var(--ink); color: var(--bg);
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center;
}
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand small { display: block; font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--mute); letter-spacing: 0.04em; }
.brand { margin-right: auto; }
.site-nav { order: 1; }
.theme-toggle { order: 2; }
@media (max-width: 719px) {
  .theme-toggle { order: 1; }
  .site-nav { order: 2; flex-basis: 100%; }
}
.theme-toggle {
  width: 44px; height: 44px; flex-shrink: 0; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { background: var(--accent-wash); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun, .theme-toggle[aria-pressed="true"] .icon-moon { display: none; }
.theme-toggle[aria-pressed="true"] .icon-sun { display: block; }
.site-nav .back-link { color: var(--ink); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-nav a { color: var(--mute); text-decoration: none; font-size: 0.95rem; padding: 6px 0; display: inline-block; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 0.35em; }

/* ---- Sections ---- */
main { display: block; }
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--line); }
@media (min-width: 900px) { .section { padding: 80px 0; } }
.eyebrow {
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 12px;
}
.lead { font-size: 1.15rem; color: var(--mute); max-width: 40rem; }
.muted { color: var(--mute); }

.hero { padding: 56px 0 64px; }
@media (min-width: 900px) { .hero { padding: 96px 0 96px; } }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 20px; border-radius: var(--radius);
  font-weight: 500; font-size: 1rem; text-decoration: none; border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--btn); color: var(--on-btn); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: transparent; }
.btn-ghost:hover { background: var(--accent-wash); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); border: 1px solid currentColor; border-radius: 999px; padding: 4px 10px;
}

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.card h3 { margin-bottom: 0.35em; }
.card p:last-child { margin-bottom: 0; }

.app-card { display: flex; flex-wrap: wrap; gap: 18px 22px; align-items: center; }
.app-card img { width: 72px; height: 72px; border-radius: 18px; flex-shrink: 0; }
.app-card .body { flex: 1 1 260px; min-width: 0; }
.app-card .body h3 { font-size: 1.35rem; margin-bottom: 0.2em; }
.card-title { color: var(--ink); text-decoration: none; }
.card-title:hover { color: var(--accent); text-decoration: underline; }
.app-card .links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.95rem; margin-top: 10px; }

.after-grid { margin-top: 20px; }

.contact-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.contact-strip p { margin: 0; }

.facts { display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); gap: 0; margin: 0; border-top: 1px solid var(--line); }
.facts dt, .facts dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--mute); padding-right: 16px; }
@media (max-width: 520px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts dt { border-bottom: 0; padding-bottom: 0; }
  .facts dd { padding-top: 2px; }
}

/* ---- FridgeSpin hero illustration (the reels) ---- */
/* Mirrors the slot machine on the app's Spin screen (RouletteScreen.js). */
.reels {
  --reel-head: 28px; --reel-row: 76px;
  background: var(--bg); border-radius: 20px; padding: 14px; border: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 460px;
}
.reel {
  position: relative; overflow: hidden; min-width: 0;
  background: var(--track); border-radius: 12px; border: 1px solid var(--line);
}
/* The two lines that frame the winning row. */
.reel::before, .reel::after {
  content: ""; position: absolute; z-index: 2; left: 0; right: 0; height: 1.5px;
  background: var(--btn); opacity: 0.65; box-shadow: 0 0 4px var(--btn);
}
.reel::before { top: calc(var(--reel-head) + var(--reel-row)); }
.reel::after { top: calc(var(--reel-head) + var(--reel-row) * 2); }
.reel-label {
  display: block; height: var(--reel-head); line-height: var(--reel-head); text-align: center;
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--mute);
}
.reel-window { position: relative; height: calc(var(--reel-row) * 3); overflow: hidden; }
/* Fades the rows above and below the result. */
.reel-window::before, .reel-window::after {
  content: ""; position: absolute; z-index: 1; left: 0; right: 0; height: var(--reel-row);
  background: var(--track); opacity: 0.65; pointer-events: none;
}
.reel-window::before { top: 0; }
.reel-window::after { bottom: 0; }
.reel-strip { display: flex; flex-direction: column; }
.reel-item {
  flex: none; height: var(--reel-row); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 13px; font-weight: 500; color: var(--ink);
}
.reel-emoji { font-size: 30px; line-height: 1.2; }
.reel-lock {
  margin: 4px auto 8px; padding: 0; border: 0; cursor: pointer;
  width: 28px; height: 28px; border-radius: 50%; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.reel-lock[hidden] { display: none; }
.reel-lock[aria-pressed="true"] { background: var(--btn); box-shadow: 0 0 8px var(--btn); }
.reel.is-locked { border-color: var(--btn); }
.reel.is-spinning .reel-strip { filter: blur(0.6px); }
.spin-btn {
  display: block; width: 100%; max-width: 460px; margin-top: 12px; padding: 16px; border: 1px solid transparent;
  border-radius: 14px; cursor: pointer; font: 700 14px var(--sans); letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--spin); color: var(--on-spin);
  box-shadow: 0 8px 22px -8px var(--spin);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.spin-btn[hidden] { display: none; }
.spin-btn:active:not(:disabled) { transform: translateY(1px) scale(0.99); }
.spin-btn:disabled { background: transparent; border-color: var(--line); color: var(--mute); cursor: default; box-shadow: none; }
.reels-caption { margin-top: 12px; font-size: 0.95rem; }
.hero-icon { width: 88px; height: 88px; border-radius: 22px; margin-bottom: 24px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.steps li::before {
  content: counter(step, decimal-leading-zero); display: block; margin-bottom: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--accent);
}

/* ---- FridgeSpin site: motion and depth ---- */
/* Page-to-page crossfade, in browsers that support it. */
@view-transition { navigation: auto; }

body.fs { --band: color-mix(in srgb, var(--track) 45%, var(--bg)); }

@media (min-width: 720px) {
  body.fs .site-header {
    position: sticky; top: 0; z-index: 5;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
}
body.fs .brand img { transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
body.fs .theme-toggle { transition: background-color 0.15s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* Nav links: an underline that grows from the left. */
body.fs .site-nav a { position: relative; transition: color 0.15s ease; }
body.fs .site-nav a:hover, body.fs .site-nav a[aria-current="page"] { text-decoration: none; }
body.fs .site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; border-radius: 2px;
  background: var(--btn); transform: scaleX(0); transform-origin: left; transition: transform 0.22s ease;
}
body.fs .site-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* Hero: a soft glow behind it, and its parts arriving one after another. */
body.fs .hero { position: relative; overflow: hidden; isolation: isolate; }
body.fs .hero::before {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background:
    radial-gradient(38rem 24rem at 82% 30%, var(--accent-wash), transparent 70%),
    radial-gradient(30rem 22rem at 6% 90%, color-mix(in srgb, var(--sage) 16%, transparent), transparent 70%);
  -webkit-mask-image: linear-gradient(#000 65%, transparent);
  mask-image: linear-gradient(#000 65%, transparent);
}
.hero-accent { color: var(--accent); }
.hero-plain .word, .hero-accent .word { display: inline-block; white-space: nowrap; }
.hero-plain .ch, .hero-accent .ch { display: inline-block; transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.hero-plain.is-letters, .hero-accent.is-letters { cursor: pointer; }
body.fs .hero-icon {
  width: 128px; height: 128px; border-radius: 30px; margin-bottom: 28px; cursor: pointer;
  box-shadow: 0 0 0 6px var(--accent-wash), 0 18px 40px -12px color-mix(in srgb, var(--btn) 70%, transparent);
  transition: scale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), rotate 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
body.fs .brand img { width: 44px; height: 44px; border-radius: 11px; box-shadow: 0 0 0 3px var(--accent-wash); }
@media (hover: hover) {
  body.fs .hero-icon:hover { scale: 1.1; rotate: -6deg; }
}
body.fs .reels { box-shadow: 0 24px 50px -28px color-mix(in srgb, var(--ink) 55%, transparent); }
body.fs .pill::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
}

/* Sections: alternate bands that melt into the page instead of hard lines. */
body.fs .section + .section { border-top: 0; }
body.fs .section-band {
  background: linear-gradient(var(--bg), var(--band) 72px, var(--band) calc(100% - 72px), var(--bg));
}

/* Cards and steps */
body.fs .card, body.fs .steps li {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.card-icon { display: block; width: fit-content; font-size: 30px; line-height: 1; margin-bottom: 14px; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
body.fs .steps li::before {
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 14px;
  border-radius: 50%; background: var(--badge); color: var(--on-spin); font-size: 13px; font-weight: 600; letter-spacing: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Hover effects only where there's a real pointer, so they don't stick after a tap. */
@media (hover: hover) {
  body.fs .site-nav a:hover::after { transform: scaleX(1); }
  body.fs .brand:hover img { transform: rotate(-6deg) scale(1.08); }
  body.fs .theme-toggle:hover { transform: rotate(14deg); }
  body.fs .card:hover, body.fs .steps li:hover {
    transform: translateY(-5px); border-color: var(--btn);
    box-shadow: 0 18px 34px -20px color-mix(in srgb, var(--ink) 55%, transparent);
  }
  body.fs .card:hover .card-icon { transform: scale(1.2) rotate(-8deg); }
  body.fs .steps li:hover::before { transform: scale(1.12) rotate(-6deg); }
  .reel-lock:hover { transform: scale(1.14); }
  .spin-btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 14px 28px -10px var(--spin); }
}

/* Scroll reveal: reveal.js adds these on the home page only. */
/* Only the arrival animates, so elements don't visibly fade out when the script hides them. */
body:is(.fs, .co) .reveal { opacity: 0; transform: translateY(22px); transition: none; }
body:is(.fs, .co) .reveal.is-in { opacity: 1; transform: none; transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1); }

@keyframes fs-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fs-pop { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes fs-float { 50% { transform: translateY(-6px) rotate(-1.5deg); } }
@keyframes fs-pulse { 50% { opacity: 0.35; } }
@keyframes fs-roll-in {
  0% { opacity: 0; transform: perspective(420px) translateY(80%) rotateX(-1080deg) scale(0.55); }
  35% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes fs-roll {
  0% { transform: none; }
  45% { transform: perspective(420px) translateY(-30%) rotateX(-380deg) scale(1.25); }
  100% { transform: perspective(420px) rotateX(-720deg); }
}
@keyframes fs-drop {
  0% { opacity: 0; transform: translateY(-1.2em) scale(1.35, 0.6) rotate(-14deg); }
  55% { opacity: 1; transform: translateY(0.14em) scale(0.88, 1.14) rotate(3deg); }
  78% { transform: translateY(-0.06em) scale(1.04, 0.97); }
  100% { opacity: 1; transform: none; }
}
@keyframes fs-wave {
  0%, 100% { transform: none; }
  40% { transform: translateY(-0.28em) rotate(-7deg) scale(1.12); }
}
@keyframes fs-icon-glow {
  50% { box-shadow: 0 0 0 14px var(--accent-wash), 0 26px 60px -10px color-mix(in srgb, var(--btn) 85%, transparent); }
}
@keyframes fs-hit { 0% { transform: scale(1); } 40% { transform: scale(1.32) rotate(-6deg); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  body.fs .hero-grid > div:first-child > * { animation: fs-rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  body.fs .hero-grid > div:first-child > :nth-child(2) { animation-delay: 0.08s; }
  body.fs .hero-grid > div:first-child > :nth-child(3) { animation-delay: 0.16s; }
  body.fs .hero-grid > div:first-child > :nth-child(4) { animation-delay: 0.24s; }
  body.fs .hero-grid > div:first-child > :nth-child(5) { animation-delay: 0.32s; }
  body.fs .hero-grid > div:first-child > .hero-icon { animation: fs-rise 0.6s both, fs-float 6s ease-in-out 0.8s infinite, fs-icon-glow 3.2s ease-in-out infinite; }
  body.fs .hero-grid > div:last-child { animation: fs-pop 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both; }
  body.fs .pill::before { animation: fs-pulse 1.8s ease-in-out infinite; }
  .reel-item.is-hit .reel-emoji { animation: fs-hit 0.45s ease; }
  /* "backwards" only: letters rest with no animation applied, so hover can still move them.
     --i counts letters across both lines, so the second line lands after the first. */
  .hero-plain .ch { animation: fs-drop 0.75s cubic-bezier(0.3, 0.7, 0.4, 1) backwards; animation-delay: calc(0.15s + var(--i) * 38ms); }
  .hero-accent .ch { animation: fs-roll-in 1.3s cubic-bezier(0.2, 0.9, 0.25, 1.1) backwards; animation-delay: calc(0.15s + var(--i) * 55ms); }
  .hero-title.is-rolling .hero-plain .ch { animation: fs-wave 0.55s ease backwards; animation-delay: calc(var(--i) * 28ms); }
  .hero-title.is-rolling .hero-accent .ch { animation: fs-roll 1s ease-in-out backwards; animation-delay: calc((var(--i) - var(--first)) * 70ms); }
  @media (hover: hover) {
    .hero-accent .ch:hover { transform: translateY(-10px) rotate(-5deg) scale(1.14); }
    .hero-plain .ch:hover { transform: translateY(-12px) rotate(6deg) scale(1.15, 0.92); }
    .hero-plain .ch:nth-child(even):hover { transform: translateY(-12px) rotate(-6deg) scale(1.15, 0.92); }
  }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  body.fs .card, body.fs .steps li, .card-icon, .spin-btn, .reel-lock { transition: none; }
}

/* ---- Long-form pages (policies, terms, support) ---- */
.page-head { padding: 48px 0 8px; }
@media (min-width: 900px) { .page-head { padding: 72px 0 8px; } }
.prose { max-width: 46rem; padding-bottom: 72px; }
.prose h2 { margin-top: 2.2em; padding-top: 0.2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: 0.3em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 500; color: var(--mute); }
.table-scroll { overflow-x: auto; margin: 0 0 1.2em; }
.table-scroll table { margin: 0; min-width: 34rem; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 22px; margin: 24px 0 8px; }
.toc ol { margin: 8px 0 0; padding-left: 1.3em; columns: 2 14rem; column-gap: 32px; }
.toc li { margin: 0.2em 0; break-inside: avoid; }
.updated { font-family: var(--mono); font-size: 13px; color: var(--mute); }
.callout { background: var(--accent-wash); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 22px; margin: 0 0 1.4em; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.option { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; }

/* Draft / review markers. scripts/check.mjs refuses to deploy while any remain. */
.review {
  background: var(--review-bg); color: var(--review-ink);
  border: 1px dashed var(--review-line); border-radius: 6px; padding: 1px 6px;
  font-size: 0.92em;
}
p.review, div.review { display: block; padding: 12px 16px; margin: 0 0 1.2em; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 0.92rem; color: var(--mute); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.site-footer h2 { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--mute); }
.site-footer a:hover { color: var(--ink); }
.site-footer .legal { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.site-footer .legal p { margin: 0.2em 0; }

/* ---- Lordubs Labs site (body.co): sleek, a hint of futuristic ---- */
/* Glow colours are decoration only; text keeps the base tokens' contrast. */
body.co {
  --glow-a: #0E4FD8;
  --glow-b: #3C8BFF;
  --glow-c: #9CC8FF;
  --live: #1FA463;
  --grid: color-mix(in srgb, var(--line) 70%, transparent);
  --edge: linear-gradient(135deg, #0E4FD8, #2F6FE8);   /* buttons, rules, the scroll line */
  --on-edge: #FFFFFF;
  --g1: #0E4FD8;                                      /* headline gradient */
  --g2: #4C93FF;
  --accent: #1650C8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.co {
    --live: #3DDC84; --grid: color-mix(in srgb, var(--line) 55%, transparent);
    --edge: linear-gradient(135deg, #1B63DA, #3A7FF0); --g1: #4C93FF; --g2: #9CC8FF; --accent: #6BA4FF;
  }
}
:root[data-theme="dark"] body.co {
  --live: #3DDC84; --grid: color-mix(in srgb, var(--line) 55%, transparent);
  --edge: linear-gradient(135deg, #1B63DA, #3A7FF0); --g1: #4C93FF; --g2: #9CC8FF; --accent: #6BA4FF;
}

/* Header: frosted, sticky, with a progress hairline. */
body.co .site-header {
  position: sticky; top: 0; z-index: 5; border-bottom-color: transparent;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
}
body.co .site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line);
}
body.co .site-header::before {
  content: ""; position: absolute; left: 0; bottom: 0; z-index: 1; height: 2px; width: 100%;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0));
}
body.co .brand .mark {
  background: var(--ink); color: var(--bg); border-radius: 9px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--bg) 20%, transparent) inset, 0 6px 18px -8px var(--glow-a);
}
body.co .site-nav a { border-radius: 999px; padding: 6px 14px; transition: background-color 0.2s ease, color 0.2s ease; }
body.co .site-nav a:hover, body.co .site-nav a[aria-current="page"] { background: var(--accent-wash); text-decoration: none; color: var(--ink); }
body.co .site-nav ul { gap: 2px; }

/* Buttons and headings. */
body.co .btn { border-radius: 999px; padding-left: 24px; padding-right: 24px; transition: transform 0.2s ease, box-shadow 0.25s ease, background-color 0.2s ease, filter 0.2s ease; }
body.co .btn-primary { background: var(--btn); color: var(--on-btn); border-color: transparent; box-shadow: 0 10px 26px -12px var(--glow-a); }
body.co .btn-primary:hover { filter: brightness(1.1); box-shadow: 0 16px 32px -12px var(--glow-a); }
body.co .btn-ghost:hover { border-color: var(--accent); }
body.co h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); letter-spacing: -0.025em; }
body.co .eyebrow::before { content: "// "; opacity: 0.55; }
body.co .co-status::before { content: none; }

/* Hero. */
.co-hero { position: relative; overflow: hidden; isolation: isolate; padding: 56px 0 72px; --mx: 70%; --my: 30%; }
@media (min-width: 900px) { .co-hero { padding: 92px 0 112px; } }
.co-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 35%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 60% 35%, #000 25%, transparent 75%);
}
.co-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(520px circle at var(--mx) var(--my), color-mix(in srgb, var(--glow-a) 16%, transparent), transparent 70%);
}
.co-aurora { position: absolute; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.co-aurora span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.45; }
.co-aurora span:first-child { width: 460px; height: 460px; right: -80px; top: -160px; background: var(--glow-a); opacity: 0.26; }
.co-aurora span:last-child { width: 380px; height: 380px; right: 24%; bottom: -220px; background: var(--glow-b); opacity: 0.16; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .co-aurora span:first-child { opacity: 0.2; } :root:not([data-theme="light"]) .co-aurora span:last-child { opacity: 0.12; } }
:root[data-theme="dark"] .co-aurora span:first-child { opacity: 0.2; }
:root[data-theme="dark"] .co-aurora span:last-child { opacity: 0.12; }

.co-hero .hero-grid { gap: 48px; }
@media (min-width: 900px) { .co-hero .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); } }
.co-hero h1 { font-size: clamp(2.6rem, 8vw, 5rem); line-height: 1.02; letter-spacing: -0.04em; margin-bottom: 0.4em; }
.co-title .line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.co-title .line > span { display: block; }
.co-title .grad {
  color: var(--accent);
}
.co-hero .lead { font-size: 1.2rem; }

.co-status { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--mute); }
.co-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 60%, transparent); }

/* Orbit illustration. */
.co-orbit { position: relative; width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 1; transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1); }
.co-orbit svg { width: 100%; height: 100%; overflow: visible; }
.co-orbit .ring { fill: none; stroke: var(--line); stroke-width: 1; }
.co-orbit .r2, .co-orbit .r4 { stroke-dasharray: 2 7; stroke: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.co-orbit .r4 { stroke-dasharray: 1 9; }
.co-orbit .spin { transform-origin: 200px 200px; }
.co-orbit .node { fill: var(--glow-a); filter: drop-shadow(0 0 6px var(--glow-a)); }
.co-orbit .n-b { fill: var(--glow-b); filter: drop-shadow(0 0 6px var(--glow-b)); }
.co-orbit .n-c { fill: var(--ink); filter: none; }
.co-orbit .n-dim { fill: var(--mute); filter: none; opacity: 0.6; }
.co-orbit .core { stroke: color-mix(in srgb, #fff 30%, transparent); stroke-width: 1; }
.co-orbit .halo { fill: var(--glow-a); opacity: 0.32; }
.co-orbit .core-text { fill: #fff; font: 500 15px var(--mono); letter-spacing: 0.06em; }
.co-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px;
  font: 500 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink);
  background: color-mix(in srgb, var(--surface) 78%, transparent); border: 1px solid var(--line); border-radius: 999px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px -14px color-mix(in srgb, var(--glow-a) 60%, transparent);
}
.co-chip b { color: var(--accent); font-weight: 500; }
.chip-a { left: -2%; top: 14%; }
.chip-b { right: -2%; bottom: 16%; }

/* Ticker. */
.co-ticker { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 55%, var(--bg)); padding: 16px 0; white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.co-ticker .track { display: inline-flex; }
.co-ticker span { font: 500 13px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); padding: 0 28px; position: relative; }
.co-ticker span::after { content: "✦"; position: absolute; right: -6px; color: var(--accent); opacity: 0.7; font-size: 11px; }

/* Cards. */
.co-two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 20px; }
.spot { position: relative; isolation: isolate; overflow: hidden; --x: 50%; --y: 50%; }
body.co .card { border-radius: 20px; padding: 28px; background: color-mix(in srgb, var(--surface) 88%, transparent); }
.spot::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.35s ease;
  background: radial-gradient(360px circle at var(--x) var(--y), color-mix(in srgb, var(--glow-a) 14%, transparent), transparent 65%);
}
.spot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity 0.35s ease;
  background: radial-gradient(260px circle at var(--x) var(--y), var(--glow-a), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.spot:hover::before, .spot:hover::after { opacity: 1; }
.co-card h3 { font-size: 1.4rem; letter-spacing: -0.02em; }
.co-index { display: block; margin-bottom: 18px; font: 500 12px var(--mono); letter-spacing: 0.12em; color: var(--accent); }
.co-index::after { content: ""; display: inline-block; vertical-align: middle; width: 36px; height: 1px; margin-left: 10px; background: var(--edge); }
.co-feature { padding: 32px; }
.co-feature img { border-radius: 20px; box-shadow: 0 16px 40px -14px var(--glow-a); }
.co-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.co-cta { display: flex; border-radius: 24px; padding: 36px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); }
.co-cta p { font-size: 1.25rem; }

body.co .section + .section { border-top-color: transparent; }
body.co .section { padding: 36px 0; }
@media (min-width: 900px) { body.co .section { padding: 52px 0; } }
body.co .site-footer { border-top-color: var(--line); background: color-mix(in srgb, var(--surface) 40%, var(--bg)); }
body.co .site-footer h2 { font-family: var(--mono); }
body.co .site-footer h2::before { content: none; }

@keyframes co-rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes co-fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes co-orbit { to { transform: rotate(360deg); } }
@keyframes co-ping { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes co-bob { 50% { transform: translateY(-8px); } }
@keyframes co-drift { 50% { transform: translate(-30px, 24px); } }
@keyframes co-marquee { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: no-preference) {
  .co-title .line > span { animation: co-rise 0.95s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
  .co-title .line:nth-child(1) > span { animation-delay: 0.1s; }
  .co-title .line:nth-child(2) > span { animation-delay: 0.26s; }
  .co-title .grad { animation: co-rise 0.95s cubic-bezier(0.2, 0.8, 0.2, 1) 0.26s backwards; }
  .co-hero-copy > :not(h1) { animation: co-fade 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
  .co-hero-copy > .lead { animation-delay: 0.5s; }
  .co-hero-copy > .actions { animation-delay: 0.62s; }
  .co-orbit svg { animation: co-fade 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s backwards; }
  .co-orbit .spin { animation: co-orbit 40s linear infinite; }
  .co-orbit .s2 { animation-duration: 64s; animation-direction: reverse; }
  .co-orbit .s3 { animation-duration: 96s; }
  .co-orbit .s4 { animation-duration: 140s; animation-direction: reverse; }
  .co-chip { animation: co-bob 7s ease-in-out infinite; }
  .chip-b { animation-delay: -3.5s; }
  .co-aurora span:first-child { animation: co-drift 18s ease-in-out infinite; }
  .co-aurora span:last-child { animation: co-drift 24s ease-in-out -8s infinite reverse; }
  .co-dot { animation: co-ping 2.2s ease-out infinite; }
  .co-live::before { animation: co-ping 2.2s ease-out infinite; box-shadow: 0 0 0 0 currentColor; }
  .co-ticker .track { animation: co-marquee 42s linear infinite; }
  .co-ticker:hover .track { animation-play-state: paused; }
  @media (hover: hover) {
    body.co .card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -24px color-mix(in srgb, var(--glow-a) 55%, transparent); }
    body.co .btn:hover { transform: translateY(-2px); }
  }
  body.co .card { transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease, border-color 0.3s ease; }
}
@media (prefers-reduced-motion: reduce) { .co-orbit { transition: none; } .co-ticker .track { transform: none; } }
@media (max-width: 719px) { body.co .site-header { position: static; } .chip-a { left: 0; } .chip-b { right: 0; } }

/* Cobalt gradient on the button, the scroll line and the headline. */
body.co .btn-primary { background: var(--edge); color: var(--on-edge); }
body.co .site-header::before { background: var(--edge); }
body.co .co-title .grad {
  background: linear-gradient(100deg, var(--g1), var(--g2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
body.co .co-orbit .n-c { fill: var(--glow-c); filter: drop-shadow(0 0 6px var(--glow-c)); }

/* About and Contact: a smaller hero, and the company details as one panel. */
.co-subhero { padding: 40px 0 28px; }
@media (min-width: 900px) { .co-subhero { padding: 68px 0 44px; } }
.co-subhero h1 { font-size: clamp(2.4rem, 6.5vw, 4rem); }
.co-subhero .lead { max-width: 36rem; }
.co-subhero .co-aurora span:first-child { width: 360px; height: 360px; top: -190px; }
.co-subhero .co-aurora span:last-child { display: none; }
.co-details { padding: 8px 28px; }
.co-details .facts { border-top: 0; }
.co-details .facts > :last-child, .co-details .facts > :nth-last-child(2) { border-bottom: 0; }
