/* ==========================================================================
   Brain Hours — design system
   Dark-first, violet-accented, self-hosted type. Light theme via [data-theme].
   ========================================================================== */

/* Fonts ------------------------------------------------------------------ */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

  --bg:            #08070c;
  --bg-1:          #0c0b12;
  --bg-2:          #100e18;
  --surface:       rgba(255, 255, 255, .028);
  --surface-hi:    rgba(255, 255, 255, .055);
  --border:        rgba(255, 255, 255, .085);
  --border-hi:     rgba(255, 255, 255, .17);

  --ink:           #f6f5f9;
  --ink-2:         #cbc7d6;
  --muted:         #928da3;

  --accent:        #8b5cf6;
  --accent-hi:     #a78bfa;
  --accent-deep:   #6d28d9;
  --accent-2:      #22d3ee;
  --accent-ink:    #ffffff;
  --accent-wash:   rgba(139, 92, 246, .14);

  --ok:            #34d399;

  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, Menlo, monospace;

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --container: 1200px;
  --gutter: clamp(20px, 4vw, 32px);

  --ease:      cubic-bezier(.22, .68, .18, 1);
  --ease-out:  cubic-bezier(.16, 1, .3, 1);

  --shadow:    0 1px 2px rgba(0, 0, 0, .3), 0 12px 40px rgba(0, 0, 0, .35);
  --shadow-lg: 0 40px 90px -20px rgba(0, 0, 0, .7);
  --glow:      0 0 0 1px rgba(139, 92, 246, .25), 0 18px 60px -12px rgba(139, 92, 246, .45);
}

[data-theme="light"] {
  color-scheme: light;

  --bg:            #ffffff;
  --bg-1:          #f7f6fb;
  --bg-2:          #f1eff8;
  --surface:       rgba(15, 10, 35, .022);
  --surface-hi:    rgba(15, 10, 35, .045);
  --border:        rgba(15, 10, 35, .105);
  --border-hi:     rgba(15, 10, 35, .26);

  --ink:           #0b0913;
  --ink-2:         #322c40;
  --muted:         #6a6379;

  --accent:        #7c3aed;
  --accent-hi:     #6d28d9;
  --accent-deep:   #5b21b6;
  --accent-2:      #0891b2;
  --accent-wash:   rgba(124, 58, 237, .09);

  --shadow:    0 1px 2px rgba(15, 10, 35, .05), 0 12px 32px rgba(15, 10, 35, .08);
  --shadow-lg: 0 40px 80px -24px rgba(15, 10, 35, .22);
  --glow:      0 0 0 1px rgba(124, 58, 237, .2), 0 18px 50px -14px rgba(124, 58, 237, .3);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.62;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 200;
  padding: 12px 20px; border-radius: var(--r-sm);
  background: var(--accent); color: #fff; font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Typography ------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.04;
  color: var(--ink);
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.4vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.35rem); }
h3 { font-size: clamp(1.2rem, 1.9vw, 1.45rem); letter-spacing: -0.025em; }
h4 { font-size: 1rem; letter-spacing: -0.015em; }
p  { margin: 0 0 1.1em; }
strong { color: var(--ink); font-weight: 600; }

.lead {
  font-size: clamp(1.06rem, 1.35vw, 1.2rem);
  line-height: 1.62;
  color: var(--muted);
  max-width: 60ch;
}
.grad {
  background: linear-gradient(100deg, var(--accent-hi) 0%, var(--accent) 42%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* Eyebrow pill */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 14px 6px 11px; margin-bottom: 24px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono); font-size: .715rem; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase; color: var(--muted);
  backdrop-filter: blur(10px);
}
.eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash);
  flex: 0 0 auto;
}

/* Layout ----------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
section { position: relative; padding: clamp(72px, 10vw, 140px) 0; }
.section-alt { background: var(--bg-1); border-block: 1px solid var(--border); }

.section-head { max-width: 760px; margin-bottom: clamp(44px, 5vw, 68px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lead { margin-inline: auto; }

/* Ambient background art ------------------------------------------------- */
.aura {
  position: absolute; inset: 0; overflow: hidden;
  pointer-events: none; z-index: 0;
}
.aura::before,
.aura::after {
  content: ''; position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .55;
}
.aura::before {
  width: 60vw; height: 60vw; max-width: 780px; max-height: 780px;
  top: -22%; right: -12%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 68%);
}
.aura::after {
  width: 48vw; height: 48vw; max-width: 620px; max-height: 620px;
  bottom: -26%; left: -14%;
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 68%);
  opacity: .3;
}
[data-theme="light"] .aura::before { opacity: .3; }
[data-theme="light"] .aura::after  { opacity: .22; }

/* Dotted grid + fade mask */
.grid-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, var(--border-hi) 1px, transparent 0);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 20%, transparent 78%);
  opacity: .7;
}

section > .container { position: relative; z-index: 1; }

/* Fine film grain — keeps the large flat areas from banding */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 999; pointer-events: none;
  opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="light"] body::after { opacity: .022; }

/* Brand mark ------------------------------------------------------------- */
/* mark.svg is a single-colour silhouette, so we paint it through a mask and it
   follows currentColor across both themes from one cached file. */
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.brand-mark {
  width: 34px; height: 30px; flex: 0 0 auto;
  background: transparent;
}
@supports (mask-image: url(x)) or (-webkit-mask-image: url(x)) {
  .brand-mark {
    background: currentColor;
    -webkit-mask: url('img/mark.svg') center / contain no-repeat;
    mask: url('img/mark.svg') center / contain no-repeat;
  }
}
.brand-name {
  font-family: var(--font-display); font-weight: 600; font-size: 1.06rem;
  letter-spacing: -0.03em; white-space: nowrap;
}

/* Nav -------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s var(--ease);
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: var(--container); margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 9px 15px; border-radius: 999px;
  font-size: .93rem; color: var(--muted);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-links a:hover { color: var(--ink); background: var(--surface-hi); }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--surface-hi); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* Language switcher ------------------------------------------------------ */
.lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 9px 0 8px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--muted);
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.lang-btn:hover { color: var(--ink); border-color: var(--border-hi); }
.lang-code { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .04em; }
.lang-caret { width: 11px; height: 11px; transition: transform .25s var(--ease); }
.lang-btn[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }

.flag {
  width: 20px; height: 14px; flex: 0 0 auto; display: block;
  border-radius: 2.5px; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16);
}

.lang-menu {
  position: absolute; top: calc(100% + 9px); right: 0; z-index: 60;
  min-width: 178px; margin: 0; padding: 6px; list-style: none;
  border: 1px solid var(--border); border-radius: 15px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
}
.lang-menu.open { opacity: 1; visibility: visible; transform: none; }
.lang-option {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 9px;
  font-size: .9rem; color: var(--ink-2);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.lang-option:hover { background: var(--surface-hi); color: var(--ink); }
.lang-option.is-current { color: var(--ink); font-weight: 500; }
.lang-option.is-current::after {
  content: ''; margin-left: auto; flex: 0 0 auto;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

/* Without JS the [hidden] menu still has to be reachable, so open it on
   hover/focus instead. With JS the class toggle takes over. */
html:not(.js) .lang-menu[hidden] { display: block; }
html:not(.js) .lang:hover .lang-menu,
html:not(.js) .lang:focus-within .lang-menu { opacity: 1; visibility: visible; transform: none; }

.theme-toggle {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--muted);
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--border-hi); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-sun  { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav-toggle {
  display: none; width: 38px; height: 38px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  place-items: center;
}
.nav-toggle span {
  display: block; width: 15px; height: 1.5px; border-radius: 2px;
  background: currentColor; transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle span + span { margin-top: 4px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: 999px;
  border: 1px solid transparent;
  font-size: .94rem; font-weight: 500; letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform .25s var(--ease), background .25s var(--ease),
              border-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-hi), var(--accent) 55%, var(--accent-deep));
  color: #fff; box-shadow: var(--glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(139,92,246,.4), 0 24px 70px -14px rgba(139,92,246,.6); }

.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--border-hi); background: var(--surface-hi); transform: translateY(-2px); }

.btn-sm { padding: 9px 18px; font-size: .88rem; }
.btn-block { width: 100%; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent-hi); font-weight: 500; font-size: .95rem;
  transition: gap .25s var(--ease);
}
.link-arrow:hover { gap: 13px; }

/* Hero ------------------------------------------------------------------- */
.hero { padding: clamp(64px, 9vw, 116px) 0 clamp(56px, 7vw, 96px); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(40px, 5vw, 72px); align-items: center;
}
.hero h1 { margin-bottom: .34em; }
.hero .lead { font-size: clamp(1.08rem, 1.45vw, 1.28rem); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-note {
  display: flex; align-items: center; gap: 9px; margin-top: 22px;
  font-size: .85rem; color: var(--muted);
}
.hero-note .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent);
  animation: breathe 2.6s var(--ease) infinite;
}
@keyframes breathe { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }

/* Page hero (inner pages) */
.hero-inner { max-width: 820px; }
.hero-inner h1 { font-size: clamp(2.4rem, 5.2vw, 4.2rem); }

/* Orbit visual ----------------------------------------------------------- */
.orbit { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; }
.orbit-ring {
  position: absolute; inset: 0; margin: auto; border-radius: 50%;
  border: 1px solid var(--border);
}
.orbit-ring.r1 { width: 46%; height: 46%; }
.orbit-ring.r2 { width: 70%; height: 70%; }
.orbit-ring.r3 { width: 94%; height: 94%; border-style: dashed; opacity: .6; }

.orbit-core {
  position: relative; z-index: 2;
  width: 27%; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 32% 28%, var(--accent-hi), var(--accent-deep) 78%);
  box-shadow: 0 0 90px -6px var(--accent), inset 0 0 40px rgba(255, 255, 255, .18);
}
.orbit-core .brand-mark { width: 54%; height: 48%; color: #fff; }

/* Nodes sit on the outer ring. top/left are percentages of the orbit box, then
   translate(-50%,-50%) centres each label on its point. */
.orbit-node {
  position: absolute; z-index: 3;
  transform: translate(-50%, -50%);
}
.orbit-node span {
  display: block; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--border-hi);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .06em;
  color: var(--ink); white-space: nowrap;
  box-shadow: var(--shadow);
}
.orbit-node.n1 { left: 50%; top: 3%; }
.orbit-node.n2 { left: 87%; top: 25%; }
.orbit-node.n3 { left: 81%; top: 79%; }
.orbit-node.n4 { left: 21%; top: 84%; }
.orbit-node.n5 { left: 12%; top: 29%; }

/* Stats ------------------------------------------------------------------ */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; margin-top: clamp(56px, 7vw, 92px);
  background: var(--border);
  border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden;
}
.stat { padding: 28px 26px; background: var(--bg); }
.section-alt .stat { background: var(--bg-1); }
.stat .n {
  font-family: var(--font-display); font-size: clamp(1.75rem, 2.7vw, 2.35rem);
  font-weight: 500; letter-spacing: -0.04em; color: var(--ink); line-height: 1.1;
}
.stat .l { font-size: .855rem; color: var(--muted); margin-top: 6px; }

/* Cards + bento ---------------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }

.card {
  position: relative; isolation: isolate;
  padding: 30px; border-radius: var(--r-lg);
  border: 1px solid var(--border); background: var(--surface);
  transition: transform .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
}
/* Gradient hairline that lights up on hover */
.card::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, var(--accent) 0%, transparent 45%, var(--accent-2) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s var(--ease);
}
.card:hover { transform: translateY(-4px); background: var(--surface-hi); }
.card:hover::before { opacity: .75; }

.card h3 { margin-bottom: 10px; }
.card p  { color: var(--muted); font-size: .94rem; margin: 0; }

.card-icon {
  width: 42px; height: 42px; margin-bottom: 22px;
  display: grid; place-items: center; border-radius: 12px;
  background: var(--accent-wash); color: var(--accent-hi);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
}
.card-icon svg { width: 19px; height: 19px; }

/* Bento — first tile spans two columns on wide screens */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bento .card.wide { grid-column: span 2; }
.bento .card.tall { grid-row: span 2; }

/* Product feature rows --------------------------------------------------- */
.feature {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 84px); align-items: center;
}
.feature.reverse .feature-media { order: -1; }

.checklist { list-style: none; padding: 0; margin: 26px 0 0; }
.checklist li {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 13px 0; border-top: 1px solid var(--border);
  font-size: .94rem; color: var(--muted);
}
.checklist li:last-child { border-bottom: 1px solid var(--border); }
.checklist svg {
  width: 17px; height: 17px; flex: 0 0 auto; margin-top: 3px; color: var(--accent-hi);
}
.checklist strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 1px; }

/* Media frames ----------------------------------------------------------- */
.media {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-2);
  box-shadow: var(--shadow-lg);
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media.tall { aspect-ratio: 4 / 5; }
.media.wide { aspect-ratio: 16 / 10; }
.media::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 20%, transparent), transparent 55%);
}

/* Abstract diagrams — unframed, so they read like the hero orbit rather than
   a screenshot in a box. */
.art { position: relative; display: block; }
.art svg { width: 100%; height: auto; display: block; overflow: visible; }

/* Marquee ---------------------------------------------------------------- */
.marquee {
  position: relative; overflow: hidden; padding: 6px 0;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex; gap: 14px; width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 20px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-family: var(--font-mono); font-size: .78rem; color: var(--ink-2);
  white-space: nowrap;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Numbered values -------------------------------------------------------- */
.values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.value {
  position: relative; padding: 30px 30px 30px 34px;
  border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface);
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.value::before {
  content: ''; position: absolute; left: 0; top: 30px; bottom: 30px; width: 2px;
  border-radius: 2px; background: linear-gradient(var(--accent), var(--accent-2));
  opacity: .55; transition: opacity .3s var(--ease);
}
.value:hover { border-color: var(--border-hi); background: var(--surface-hi); }
.value:hover::before { opacity: 1; }
.value .num {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em;
  color: var(--accent-hi); display: block; margin-bottom: 12px;
}
.value h3 { font-size: 1.2rem; margin-bottom: 9px; }
.value p { color: var(--muted); font-size: .94rem; margin: 0; }

/* Steps ------------------------------------------------------------------ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding-top: 26px; border-top: 1px solid var(--border); }
.step::before {
  counter-increment: step; content: '0' counter(step);
  position: absolute; top: -1px; left: 0; padding-top: 26px;
  font-family: var(--font-mono); font-size: .72rem; color: var(--accent-hi);
}
.step h3 { font-size: 1.08rem; margin: 30px 0 8px; }
.step p { color: var(--muted); font-size: .91rem; margin: 0; }

/* Contact ---------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5vw, 72px); align-items: start; }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-size: .85rem; font-weight: 500; color: var(--ink); }
.field input,
.field select,
.field textarea {
  width: 100%; padding: 13px 16px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink);
  font-size: .95rem; font-family: inherit;
  transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .7; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  background: var(--bg-2); box-shadow: 0 0 0 4px var(--accent-wash);
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23928da3' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px;
  padding-right: 40px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-note { font-size: .82rem; color: var(--muted); margin: 0; }

.info-list { display: grid; gap: 2px; margin-top: 30px; }
.info-item {
  display: grid; gap: 4px; padding: 20px 0; border-top: 1px solid var(--border);
}
.info-item:last-child { border-bottom: 1px solid var(--border); }
.info-item dt {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.info-item dd { margin: 0; color: var(--ink); font-size: 1rem; }
.info-item dd a { transition: color .2s var(--ease); }
.info-item dd a:hover { color: var(--accent-hi); }
.info-item dd.lg {
  font-family: var(--font-display); font-size: 1.32rem;
  letter-spacing: -0.025em; font-weight: 500;
}

/* CTA -------------------------------------------------------------------- */
.cta {
  position: relative; overflow: hidden;
  padding: clamp(52px, 8vw, 92px) clamp(28px, 5vw, 72px);
  border-radius: var(--r-xl); border: 1px solid var(--border);
  background: var(--bg-2);
  text-align: center;
}
.cta::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(70% 130% at 50% -20%, color-mix(in srgb, var(--accent) 40%, transparent), transparent 62%),
    radial-gradient(50% 100% at 12% 110%, color-mix(in srgb, var(--accent-2) 26%, transparent), transparent 60%);
}
.cta > * { position: relative; z-index: 1; }
.cta h2 { margin-bottom: .4em; }
.cta .lead { margin: 0 auto 32px; }
.cta .hero-ctas { justify-content: center; margin-top: 0; }

/* Footer ----------------------------------------------------------------- */
footer {
  border-top: 1px solid var(--border);
  padding: clamp(52px, 6vw, 76px) 0 32px;
  background: var(--bg-1);
}
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr .9fr; gap: 36px; }
.foot-about p { color: var(--muted); font-size: .9rem; max-width: 34ch; margin: 18px 0 0; }
.foot-grid h4 {
  font-family: var(--font-mono); font-size: .7rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 16px;
}
.foot-grid a { display: block; padding: 5px 0; font-size: .92rem; color: var(--ink-2); transition: color .2s var(--ease); }
.foot-grid a:hover { color: var(--accent-hi); }
.foot-bottom {
  margin-top: clamp(40px, 5vw, 60px); padding-top: 26px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px;
  font-size: .83rem; color: var(--muted);
}

/* Legal pages ------------------------------------------------------------ */
.legal-hero { padding-bottom: clamp(32px, 4vw, 48px); }
.legal-head { max-width: 760px; }
.legal-head h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); margin-bottom: .3em; }
.legal-updated { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); margin: 0 0 26px; }

.legal-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.legal-tabs a {
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: .88rem; color: var(--muted);
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.legal-tabs a:hover { color: var(--ink); border-color: var(--border-hi); }
.legal-tabs a[aria-current="page"] {
  color: var(--ink); border-color: transparent; background: var(--accent-wash);
}

.legal-body { padding-top: clamp(24px, 3vw, 40px); }

/* Long-form prose. Sized for reading, not for scanning like the marketing
   sections — narrower measure, looser leading, quieter headings. */
.prose { max-width: 74ch; }
.prose h2 {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  letter-spacing: -0.02em;
  margin: 2.4em 0 .7em;
  padding-top: 1.6em;
  border-top: 1px solid var(--border);
}
.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { font-size: 1.05rem; margin: 1.9em 0 .5em; color: var(--ink); }
.prose p { margin: 0 0 1.15em; line-height: 1.72; }
.prose ul, .prose ol { margin: 0 0 1.3em; padding-left: 1.35em; }
.prose li { margin-bottom: .6em; line-height: 1.7; }
.prose li::marker { color: var(--accent-hi); }
.prose a { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--ink); }
.prose strong { color: var(--ink); }

/* Small utilities used by the templates --------------------------------- */
.card-link { margin: 20px 0 0; }
.after-list { margin-top: 28px; }
.band { padding-block: clamp(36px, 4vw, 52px); }
.cta .hero-ctas, .error-page .hero-ctas { justify-content: center; }

/* 404 -------------------------------------------------------------------- */
.error-page {
  min-height: 72vh; display: grid; place-items: center; text-align: center;
}
.error-inner { max-width: 620px; margin-inline: auto; }
.error-page h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.error-page .lead { margin-inline: auto; }
.error-code {
  font-family: var(--font-display); font-size: clamp(5rem, 18vw, 11rem);
  font-weight: 600; letter-spacing: -0.06em; line-height: 1; margin-bottom: 12px;
}

/* Motion ----------------------------------------------------------------- */
/* Only hide content when JS is present to reveal it again — no-JS keeps it visible. */
.js .reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .75s var(--ease-out), transform .75s var(--ease-out);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; }
.js .reveal.d2 { transition-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1080px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento .card.wide { grid-column: span 2; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 14px var(--gutter) 22px;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 1rem; }
  .nav-toggle { display: grid; }
  .nav-cta { display: none; }

  .hero-grid { grid-template-columns: 1fr; gap: 52px; }
  .orbit { max-width: 440px; margin-inline: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid, .grid.two, .bento, .values { grid-template-columns: 1fr; }
  .bento .card.wide { grid-column: auto; }
  .feature, .contact-grid { grid-template-columns: 1fr; }
  .feature.reverse .feature-media { order: 0; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-about { grid-column: 1 / -1; }
  .media.tall { aspect-ratio: 4 / 3; }
}

@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; gap: 30px; }
  .brand-name { font-size: 1rem; }
  .hero-ctas .btn { width: 100%; }
  .cta { border-radius: var(--r-lg); }
}
