/* =========================================================================
   Regentis™ Funnel — Shared Foundation Stylesheet
   Fonts · Tokens · Reset · Typography · Layout · Components · Utilities · A11y
   ========================================================================= */

/* ---------- 0. SELF-HOSTED FONTS ----------------------------------------- */
/* DSGVO-compliant: no requests to fonts.googleapis.com / fonts.gstatic.com
   (LG München I, 3 O 17493/20). Files in assets/fonts/, downloaded from
   Google Fonts (Bebas Neue, Space Grotesk, Playfair Display: OFL-1.1;
   Inter, JetBrains Mono: OFL-1.1). Subsets: latin + latin-ext only.
   Per-weight blocks mirror the original Google CSS2 output exactly so
   rendering is unchanged. font-display: swap on every face. */

@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/bebas-neue-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: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/bebas-neue-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: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  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;
  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: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  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: 500;
  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: 'Space Grotesk';
  font-style: normal;
  font-weight: 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: 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;
  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;
  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: 'Inter';
  font-style: normal;
  font-weight: 500;
  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: 500;
  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: 'Inter';
  font-style: normal;
  font-weight: 600;
  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: 600;
  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: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/playfair-display-italic-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: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/playfair-display-italic-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;
  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;
  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;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  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: 500;
  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;
}

/* ---------- 1. TOKENS ---------------------------------------------------- */

:root {
  /* Palette */
  --color-bg:             #0D0D0D;
  --color-surface:        #141414;
  --color-surface-alt:    #1A1A1A;
  --color-border:         #1F1F1F;
  --color-border-bright:  #2A2A2A;
  --color-accent:         #00FF41;
  --color-accent-dim:     #00CC33;
  --color-accent-glow:    rgba(0, 255, 65, 0.15);
  --color-text-primary:   #F0F0F0;
  --color-text-secondary: #8A8A8A;
  --color-text-muted:     #3A3A3A;
  --color-white:          #FFFFFF;
  --color-danger:         #FF4141;

  /* Typography */
  --font-display: "Bebas Neue", "Arial Narrow", sans-serif;
  --font-ui:      "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-accent:  "Playfair Display", Georgia, serif;
  --font-mono:    "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  /* Type scale (fluid via clamp where appropriate) */
  --fs-display-xl: clamp(3.5rem, 7vw, 6.5rem);   /* 56–104 */
  --fs-display-lg: clamp(2.75rem, 5vw, 4.5rem);  /* 44–72 */
  --fs-display-md: clamp(2rem, 3.5vw, 3rem);     /* 32–48 */
  --fs-display-sm: 1.75rem;                      /* 28 */
  --fs-lead:       clamp(1.125rem, 1.4vw, 1.375rem); /* 18–22 */
  --fs-body:       1rem;                         /* 16 */
  --fs-small:      0.875rem;                     /* 14 */
  --fs-caption:    0.75rem;                      /* 12 */

  /* Line heights */
  --lh-display: 0.95;
  --lh-heading: 1.15;
  --lh-body:    1.6;

  /* Letter spacing */
  --ls-display: 0.01em;
  --ls-caps:    0.08em;
  --ls-ui:      0.02em;

  /* Spacing scale (4-based) */
  --sp-0:   0;
  --sp-1:   0.25rem;
  --sp-2:   0.5rem;
  --sp-3:   0.75rem;
  --sp-4:   1rem;
  --sp-5:   1.5rem;
  --sp-6:   2rem;
  --sp-7:   3rem;
  --sp-8:   4rem;
  --sp-9:   6rem;
  --sp-10:  7.5rem;
  --sp-11:  10rem;

  /* Section padding (responsive) */
  --section-pad-y: 64px;

  /* Layout */
  --container-max: 1280px;
  --container-wide: 1440px;
  --container-pad: 24px;
  --grid-gutter:   24px;

  /* Radius — sharp = premium */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;

  /* Borders */
  --border-hairline: 1px solid var(--color-border);
  --border-bright:   1px solid var(--color-border-bright);

  /* Motion */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:    150ms;
  --dur-base:    240ms;
  --dur-reveal:  400ms;

  /* Elevation (used sparingly — green glow does the heavy lifting) */
  --glow-accent: 0 0 0 1px var(--color-accent-dim), 0 0 24px var(--color-accent-glow);

  /* Z-layers */
  --z-content: 1;
  --z-nav:     50;
  --z-banner:  80;
  --z-modal:   100;
}

@media (min-width: 768px) {
  :root { --section-pad-y: 80px; --container-pad: 32px; }
}
@media (min-width: 1024px) {
  :root { --section-pad-y: 120px; --container-pad: 48px; }
}

/* ---------- 2. RESET ----------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

html, body { margin: 0; padding: 0; }

body {
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

img, picture, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-base) var(--ease-out);
}
a:hover { color: var(--color-accent); }

button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  margin: 0;
}

button { cursor: pointer; }

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

::selection {
  background: var(--color-accent);
  color: var(--color-bg);
}

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

/* ---------- 3. TYPOGRAPHY ------------------------------------------------ */

.display-xl,
.display-lg,
.display-md,
.display-sm {
  font-family: var(--font-display);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--color-text-primary);
}

.display-xl { font-size: var(--fs-display-xl); }
.display-lg { font-size: var(--fs-display-lg); }
.display-md { font-size: var(--fs-display-md); }
.display-sm { font-size: var(--fs-display-sm); }

.heading {
  font-family: var(--font-ui);
  font-weight: 500;
  line-height: var(--lh-heading);
  color: var(--color-text-primary);
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--color-text-secondary);
  max-width: 60ch;
}

.body { font-size: var(--fs-body); line-height: var(--lh-body); color: var(--color-text-primary); }
.body--secondary { color: var(--color-text-secondary); }

.overline {
  font-family: var(--font-ui);
  font-size: var(--fs-caption);
  font-weight: 500;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.pull-quote {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
  line-height: 1.3;
  color: var(--color-text-primary);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.caption {
  font-family: var(--font-ui);
  font-size: var(--fs-caption);
  color: var(--color-text-secondary);
  letter-spacing: var(--ls-ui);
}

.text-accent    { color: var(--color-accent); }
.text-primary   { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted     { color: var(--color-text-muted); }

/* ---------- 4. LAYOUT ---------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.container--wide { max-width: var(--container-wide); }
.container--narrow { max-width: 760px; }

.section {
  padding-top: var(--section-pad-y);
  padding-bottom: var(--section-pad-y);
}

.section--alt { background: var(--color-surface-alt); }
.section--surface { background: var(--color-surface); }

.section-sep {
  height: 1px;
  background: var(--color-border);
  border: 0;
  margin: 0;
}

.grid {
  display: grid;
  gap: var(--grid-gutter);
}

.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.stack > * + * { margin-top: var(--sp-5); }
.stack--sm > * + * { margin-top: var(--sp-3); }
.stack--lg > * + * { margin-top: var(--sp-7); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
}

/* ---------- 5. BUTTONS / CTAs -------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  min-height: 48px;
  min-width: 200px;
  padding: 0 var(--sp-6);
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    background-color var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out);
  user-select: none;
  white-space: nowrap;
}

.btn:focus-visible { outline-offset: 4px; }

.btn--primary {
  background: var(--color-accent);
  color: var(--color-bg);
  animation: btnPulse 2.4s var(--ease-in-out) infinite;
}
.btn--primary:hover {
  background: var(--color-accent-dim);
  transform: scale(1.02);
  box-shadow: 0 0 32px var(--color-accent-glow);
  animation: none;
}
.btn--primary:active { transform: scale(0.99); }

.btn--secondary {
  background: transparent;
  color: var(--color-text-primary);
  border-color: var(--color-border-bright);
}
.btn--secondary:hover {
  border-color: var(--color-text-primary);
  color: var(--color-text-primary);
  transform: scale(1.02);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-secondary);
  min-width: 0;
  padding: 0 var(--sp-4);
}
.btn--ghost:hover { color: var(--color-text-primary); }

.btn--block { width: 100%; min-width: 0; }

@media (max-width: 767px) {
  .btn { width: 100%; min-width: 0; }
  .btn--auto { width: auto; }
}

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--color-accent-glow); }
  50%      { box-shadow: 0 0 0 8px rgba(0, 255, 65, 0); }
}

/* ---------- 6. CARDS ----------------------------------------------------- */

.card {
  background: var(--color-surface);
  border: var(--border-hairline);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  transition: border-color var(--dur-base) var(--ease-out);
}
@media (min-width: 1024px) { .card { padding: var(--sp-6); } }

.card:hover { border-color: var(--color-border-bright); }

.card--feature { display: flex; flex-direction: column; gap: var(--sp-4); }

.card__title {
  font-family: var(--font-ui);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-text-primary);
  letter-spacing: var(--ls-ui);
}

.card__body {
  font-size: var(--fs-body);
  color: var(--color-text-secondary);
  line-height: var(--lh-body);
}

.card__meta {
  font-family: var(--font-ui);
  font-size: var(--fs-caption);
  color: var(--color-text-secondary);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
}

/* ---------- 7. STATS ----------------------------------------------------- */

.stat { display: flex; flex-direction: column; gap: var(--sp-2); }

.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 500;
  line-height: 1;
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
}

.stat__value--accent { color: var(--color-accent); }

.stat__label {
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  color: var(--color-text-secondary);
  letter-spacing: var(--ls-ui);
}

.stat__source {
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  color: var(--color-text-muted);
}

/* ---------- 8. FORMS ----------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: var(--sp-2); }

.field__label {
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--color-text-primary);
  letter-spacing: var(--ls-ui);
}

.field__hint {
  font-size: var(--fs-caption);
  color: var(--color-text-secondary);
}

.field__error {
  font-size: var(--fs-caption);
  color: var(--color-danger);
  min-height: 1em;
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 48px;
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--color-text-primary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}

.input::placeholder,
.textarea::placeholder { color: var(--color-text-muted); }

.input:hover,
.textarea:hover,
.select:hover { border-color: var(--color-border-bright); }

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--color-accent);
  background: var(--color-bg);
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"],
.select[aria-invalid="true"] { border-color: var(--color-danger); }

.textarea { min-height: 140px; resize: vertical; line-height: var(--lh-body); }

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--fs-small);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.checkbox-group input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border: 1px solid var(--color-border-bright);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  cursor: pointer;
  position: relative;
  transition: border-color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}

.checkbox-group input[type="checkbox"]:hover { border-color: var(--color-text-secondary); }

.checkbox-group input[type="checkbox"]:checked {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.checkbox-group input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 7px;
  height: 12px;
  border: solid var(--color-bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-group a { color: var(--color-text-primary); text-decoration: underline; text-underline-offset: 3px; }

/* Honeypot — never visible, never focusable */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  tab-index: -1;
}

/* Progress */
.progress {
  width: 100%;
  height: 2px;
  background: var(--color-border);
  overflow: hidden;
  border-radius: 999px;
}
.progress__bar {
  height: 100%;
  background: var(--color-accent);
  width: 0%;
  transition: width var(--dur-reveal) var(--ease-out);
}

/* ---------- 9. NAV / HEADER / FOOTER ------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgba(13, 13, 13, 0.65);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition:
    background-color var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}
/* Past-hero solid state — JS toggles when window.scrollY > 80px */
.site-header--scrolled {
  background: rgba(13, 13, 13, 0.92);
  border-bottom-color: var(--color-border-bright);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: var(--sp-3);
  color: var(--color-text-primary);
}

.brand__mark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: var(--ls-caps);
  line-height: 1;
}

.brand__sub {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: var(--ls-caps);
  color: var(--color-text-secondary);
  text-transform: uppercase;
}

.nav { display: none; }
@media (min-width: 768px) {
  .nav {
    display: flex;
    gap: var(--sp-6);
    align-items: center;
  }
}

.nav__link {
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: var(--ls-ui);
  color: var(--color-text-secondary);
  position: relative;
}
.nav__link:hover { color: var(--color-text-primary); }
.nav__link--active { color: var(--color-text-primary); }

.site-footer {
  padding: var(--sp-8) 0 var(--sp-7);
  border-top: var(--border-hairline);
  background: var(--color-bg);
  color: var(--color-text-secondary);
  font-size: var(--fs-small);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}
@media (min-width: 768px) {
  .site-footer__inner { flex-direction: row; justify-content: space-between; align-items: center; }
}

.site-footer__links { display: flex; flex-wrap: wrap; gap: var(--sp-5); }
.site-footer__links a { color: var(--color-text-secondary); }
.site-footer__links a:hover { color: var(--color-text-primary); }

/* Minimal footer for single-path pages */
.footer--minimal { padding: var(--sp-6) 0; }

/* ---------- 10. COOKIE CONSENT BANNER ------------------------------------ */

.consent {
  position: fixed;
  left: var(--sp-4);
  right: var(--sp-4);
  bottom: var(--sp-4);
  z-index: var(--z-banner);
  background: var(--color-surface);
  border: var(--border-bright);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  display: none;
  flex-direction: column;
  gap: var(--sp-4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.consent[data-open="true"] { display: flex; }

@media (min-width: 768px) {
  .consent {
    left: auto;
    right: var(--sp-6);
    bottom: var(--sp-6);
    max-width: 420px;
  }
}

.consent__title {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: var(--fs-small);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--color-text-primary);
}

.consent__body {
  font-size: var(--fs-small);
  color: var(--color-text-secondary);
  line-height: 1.55;
}

.consent__body a {
  color: var(--color-text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.consent .btn { min-width: 0; min-height: 44px; font-size: 1.15rem; padding: 0 var(--sp-5); flex: 1; }

/* ---------- 11. BADGES / TAGS -------------------------------------------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  font-family: var(--font-ui);
  font-size: var(--fs-caption);
  font-weight: 500;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--color-text-secondary);
  border: var(--border-hairline);
  border-radius: 999px;
}

.tag--accent {
  color: var(--color-accent);
  border-color: rgba(0, 255, 65, 0.3);
}

.tag__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- 12. REVEAL ANIMATIONS ---------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--dur-reveal) var(--ease-out),
    transform var(--dur-reveal) var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 13. UTILITIES ------------------------------------------------ */

.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: var(--sp-4);
  top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: var(--color-accent);
  color: var(--color-bg);
  font-family: var(--font-ui);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform var(--dur-base) var(--ease-out);
  z-index: var(--z-modal);
}
.skip-link:focus { transform: translateY(0); }

.flow-v { display: flex; flex-direction: column; }
.flow-h { display: flex; flex-direction: row; }

.gap-1 { gap: var(--sp-1); } .gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); } .gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); } .gap-6 { gap: var(--sp-6); }

.mt-1 { margin-top: var(--sp-1); } .mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); } .mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); } .mt-6 { margin-top: var(--sp-6); }
.mt-7 { margin-top: var(--sp-7); } .mt-8 { margin-top: var(--sp-8); }

.text-center { text-align: center; }
.text-left   { text-align: left; }

.hide-mobile { display: none; }
@media (min-width: 768px) {
  .hide-mobile { display: initial; }
  .hide-desktop { display: none; }
}

/* ---------- 14. REDUCED MOTION ------------------------------------------- */

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

/* ---------- 15. 3D STAGES (poster fallback + scene injection) ----------- */
/* Used by assets/three-d.js. The stage element reserves layout via
   aspect-ratio (no CLS), paints the poster as background-image, and the
   loader injects a .three-d-scene slot that fades in once the scene loads.
   Page-scoped CSS may override aspect-ratio + max-width per placement.    */

.three-d-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  background-color: var(--color-surface);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.three-d-stage > .three-d-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out);
}

.three-d-stage[data-scene-ready="true"] > .three-d-scene {
  opacity: 1;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .three-d-stage > .three-d-scene { display: none; }
}

/* ---------- 16. UNIFIED MULTI-COLUMN FOOTER (marketing pages) ---------- */
/* Applied via .site-footer--full alongside .site-footer. Replaces the
   single-row legal footer on /, /regentis, /lifeos, /results. Flow pages
   keep .site-footer + .footer--minimal. Imperium-style: dark, dense, four
   columns at desktop, stacked on mobile. No social bar by default. */

.site-footer--full {
  padding: var(--sp-9) 0 var(--sp-7);
  border-top: var(--border-hairline);
  background: var(--color-bg);
  color: var(--color-text-secondary);
}
.site-footer--full .site-footer__inner {
  display: grid;
  gap: var(--sp-7);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 768px) {
  .site-footer--full .site-footer__inner {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr);
    gap: var(--sp-8);
  }
}
.site-footer--full .footer__col-title {
  font-family: var(--font-ui);
  font-size: var(--fs-caption);
  font-weight: 500;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--color-text-primary);
  margin-bottom: var(--sp-4);
}
.site-footer--full .footer__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.site-footer--full .footer__list a {
  color: var(--color-text-secondary);
  font-size: var(--fs-small);
  letter-spacing: var(--ls-ui);
  transition: color var(--dur-base) var(--ease-out);
}
.site-footer--full .footer__list a:hover { color: var(--color-text-primary); }
.site-footer--full .footer__brand .brand { margin-bottom: var(--sp-4); }
.site-footer--full .footer__tagline {
  font-size: var(--fs-small);
  color: var(--color-text-secondary);
  line-height: 1.55;
  max-width: 36ch;
  margin-bottom: var(--sp-4);
}
.site-footer--full .footer__brand-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  color: var(--color-text-muted);
  letter-spacing: var(--ls-ui);
}
.site-footer--full .footer__contact-line {
  font-size: var(--fs-small);
  color: var(--color-text-secondary);
  line-height: 1.6;
}
.site-footer--full .footer__contact-line + .footer__contact-line { margin-top: var(--sp-2); }
.site-footer--full .footer__contact-line a { color: var(--color-text-primary); text-decoration: underline; text-underline-offset: 3px; }

.site-footer--full .footer__bottom {
  margin-top: var(--sp-8);
  padding-top: var(--sp-5);
  border-top: var(--border-hairline);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  color: var(--color-text-muted);
  letter-spacing: var(--ls-ui);
}

/* ---------- 17. PAGE-LOAD SHIMMER --------------------------------------- */
/* Auto-injected by main.js as the first body child. Removed on
   DOMContentLoaded. Reduced-motion: skip injection entirely (handled in JS). */

.page-shimmer {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 255, 65, 0.6) 30%,
    var(--color-accent) 50%,
    rgba(0, 255, 65, 0.6) 70%,
    transparent 100%
  );
  background-size: 200% 100%;
  z-index: calc(var(--z-modal) + 1);
  pointer-events: none;
  animation: pageShimmer 1.1s var(--ease-in-out) infinite;
  transition: opacity var(--dur-base) var(--ease-out);
}
.page-shimmer[data-fading="true"] { opacity: 0; }
@keyframes pageShimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ---------- 18. PAGE TRANSITIONS (marketing pages only) ----------------- */
/* JS adds .is-leaving on <body data-page-transition> when an internal
   marketing-page link is clicked. Reduced-motion + flow pages skip this. */

body[data-page-transition] {
  transition: opacity 250ms var(--ease-out);
}
body[data-page-transition].is-leaving {
  opacity: 0;
}
