/* ============================================================================
   CBI Ventures: shared design system
   Dark-first, quiet-premium corporate fintech.
   One interactive accent: warm gold #F5A524. Structural brand: deep blue-black.
   Self-contained: system fonts, no CDN, no build step.
   ----------------------------------------------------------------------------
   TABLE OF CONTENTS
     1.  Design tokens (dark, default)
     2.  Light theme overrides
     3.  Reset & base
     4.  Typography primitives
     5.  Layout: container / section / grid utilities
     6.  Glass navbar + CSS-only mobile menu
     7.  Buttons
     8.  Cards
     9.  Hero
     10. Badges, pills, misc components
     11. Decorative motifs (grid, glow, sparkline stroke)
     12. Footer (legal block)
     13. Scroll-reveal utility (.reveal)
     14. Accessibility, focus, selection, reduced motion
   ========================================================================== */

/* ------------------------------------------------------------------ *
   1. DESIGN TOKENS (dark, default)
 * ------------------------------------------------------------------ */
:root {
  /* --- Brand / accent --- */
  --gold:        #F5A524;   /* the single interactive accent */
  --gold-bright: #FFB94A;   /* hover */
  --gold-deep:   #D98A12;   /* pressed */
  --gold-soft:   rgba(245, 165, 36, 0.12); /* tints, wash */
  --accent-ink:  #F5A524;   /* accent-coloured TEXT (theme-adaptive; see light mode) */

  /* --- Surfaces (deep blue-black -> lifted) --- */
  --bg:        #0A0C12;
  --bg-2:      #0E1017;
  --surface:   #13161F;
  --surface-2: #191D28;
  --surface-3: #212633;

  /* --- Hairlines / borders --- */
  --hairline:        rgba(230, 236, 255, 0.09);
  --hairline-strong: rgba(230, 236, 255, 0.17);
  --hairline-gold:   rgba(245, 165, 36, 0.35);

  /* --- Text --- */
  --ink:      #F3F5FA;   /* primary        ~17:1 on --bg */
  --ink-soft: #C7CCD8;   /* secondary      ~11:1 */
  --muted:    #969CAC;   /* tertiary/muted ~6.9:1  (AA) */
  --on-gold:  #0A0C12;   /* text on gold fills */

  /* --- Shadows (tinted to the background hue, never pure black) --- */
  --shadow-sm: 0 1px 2px rgba(3, 5, 12, 0.40);
  --shadow-md: 0 10px 30px -12px rgba(3, 5, 12, 0.65);
  --shadow-lg: 0 30px 70px -24px rgba(2, 4, 10, 0.75);
  --shadow-gold: 0 14px 40px -14px rgba(245, 165, 36, 0.35);

  /* --- Radii --- */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 12px;   /* buttons, inputs */
  --radius-lg: 16px;   /* cards */
  --radius-xl: 24px;   /* large panels */
  --radius-pill: 999px;

  /* --- Spacing scale (4 / 8 rhythm) --- */
  --space-1: 0.25rem;   /* 4  */
  --space-2: 0.5rem;    /* 8  */
  --space-3: 0.75rem;   /* 12 */
  --space-4: 1rem;      /* 16 */
  --space-5: 1.5rem;    /* 24 */
  --space-6: 2rem;      /* 32 */
  --space-7: 3rem;      /* 48 */
  --space-8: 4rem;      /* 64 */
  --space-9: 6rem;      /* 96 */
  --space-10: 8rem;     /* 128 */

  /* --- Type scale (fluid, ceiling < 6rem) --- */
  --fs-eyebrow: 0.78rem;
  --fs-sm:      0.9375rem;   /* 15 */
  --fs-body:    1.0625rem;   /* 17 */
  --fs-lead:    clamp(1.15rem, 1.02rem + 0.55vw, 1.4rem);
  --fs-h4:      clamp(1.1rem, 1.02rem + 0.4vw, 1.3rem);
  --fs-h3:      clamp(1.35rem, 1.12rem + 1.05vw, 1.85rem);
  --fs-h2:      clamp(1.95rem, 1.45rem + 2.3vw, 3.1rem);
  --fs-h1:      clamp(2.5rem, 1.75rem + 3.4vw, 4.4rem);
  --fs-display: clamp(2.85rem, 1.9rem + 4.4vw, 5rem);

  /* --- Fonts --- */
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono",
               Menlo, Consolas, monospace;

  /* --- Layout metrics --- */
  --container:        1180px;
  --container-narrow: 720px;
  --container-wide:   1320px;
  --header-h:         68px;

  /* --- Motion --- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-1: 140ms;
  --dur-2: 240ms;
  --dur-3: 420ms;

  /* --- Z-index scale (semantic) --- */
  --z-base: 1;
  --z-motif: 0;
  --z-content: 2;
  --z-dropdown: 100;
  --z-header: 300;
  --z-menu: 320;
  --z-modal: 500;
  --z-toast: 600;

  color-scheme: dark;
}

/* ------------------------------------------------------------------ *
   2. LIGHT THEME  (auto via system preference + optional [data-theme])
   Neutrals remap; gold identity stays. Accent TEXT switches to a deep
   gold so it keeps AA contrast on light surfaces.
 * ------------------------------------------------------------------ */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:        #FAFBFD;
    --bg-2:      #F1F4F8;
    --surface:   #FFFFFF;
    --surface-2: #F4F6FA;
    --surface-3: #ECEFF5;

    --hairline:        rgba(12, 18, 32, 0.10);
    --hairline-strong: rgba(12, 18, 32, 0.18);
    --hairline-gold:   rgba(180, 120, 10, 0.40);

    --ink:      #12151C;
    --ink-soft: #414A5A;
    --muted:    #596074;        /* ~5.4:1 on --bg (AA) */
    --on-gold:  #1A1204;
    --accent-ink: #8A5600;      /* deep gold text ~4.9:1 on light bg */

    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 12px 30px -14px rgba(16, 24, 40, 0.18);
    --shadow-lg: 0 30px 70px -28px rgba(16, 24, 40, 0.22);
    --shadow-gold: 0 14px 40px -16px rgba(245, 165, 36, 0.30);

    color-scheme: light;
  }
}

/* Explicit opt-in light theme (data-theme="light") mirrors the above. */
:root[data-theme="light"] {
  --bg:        #FAFBFD;
  --bg-2:      #F1F4F8;
  --surface:   #FFFFFF;
  --surface-2: #F4F6FA;
  --surface-3: #ECEFF5;
  --hairline:        rgba(12, 18, 32, 0.10);
  --hairline-strong: rgba(12, 18, 32, 0.18);
  --hairline-gold:   rgba(180, 120, 10, 0.40);
  --ink:      #12151C;
  --ink-soft: #414A5A;
  --muted:    #596074;
  --on-gold:  #1A1204;
  --accent-ink: #8A5600;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 12px 30px -14px rgba(16, 24, 40, 0.18);
  --shadow-lg: 0 30px 70px -28px rgba(16, 24, 40, 0.22);
  --shadow-gold: 0 14px 40px -16px rgba(245, 165, 36, 0.30);
  color-scheme: light;
}

/* ------------------------------------------------------------------ *
   3. RESET & BASE
 * ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100dvh;
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "cv11" 1;
  overflow-x: clip;
}

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

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }

ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

:where(h1, h2, h3, h4) { text-wrap: balance; }
:where(p) { text-wrap: pretty; }

hr { border: none; border-top: 1px solid var(--hairline); margin: var(--space-6) 0; }

/* Thin, on-theme scrollbar (progressive enhancement). */
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: var(--radius-pill); border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--hairline-strong); }

/* ------------------------------------------------------------------ *
   4. TYPOGRAPHY PRIMITIVES
 * ------------------------------------------------------------------ */
.h-display, .h1, .h2, .h3, .h4 {
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.h-display { font-size: var(--fs-display); letter-spacing: -0.032em; line-height: 1.02; }
.h1 { font-size: var(--fs-h1); letter-spacing: -0.028em; }
.h2 { font-size: var(--fs-h2); letter-spacing: -0.022em; }
.h3 { font-size: var(--fs-h3); letter-spacing: -0.015em; line-height: 1.18; }
.h4 { font-size: var(--fs-h4); letter-spacing: -0.01em; line-height: 1.28; font-weight: 650; }

.lede {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 60ch;
  font-weight: 400;
  letter-spacing: -0.005em;
}

.prose { max-width: 68ch; color: var(--ink-soft); }
.prose p { margin-top: var(--space-4); line-height: 1.7; }
.prose p:first-child { margin-top: 0; }
.prose a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--hairline-gold); transition: text-decoration-color var(--dur-1) ease; }
.prose a:hover { text-decoration-color: var(--gold); }

.eyebrow {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
/* NOTE: use the eyebrow sparingly, at most one per ~3 sections across a page. */

.muted { color: var(--muted); }
.ink-soft { color: var(--ink-soft); }
.text-gold { color: var(--accent-ink); }
.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; letter-spacing: 0.01em; }
.tnum { font-variant-numeric: tabular-nums; }
.balance { text-wrap: balance; }
.measure { max-width: 65ch; }

/* Inline text link inside body copy */
.link {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--hairline-gold);
  transition: text-decoration-color var(--dur-1) ease, color var(--dur-1) ease;
}
.link:hover { text-decoration-color: var(--gold); }

/* ------------------------------------------------------------------ *
   5. LAYOUT
 * ------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}
.container--narrow { max-width: var(--container-narrow); }
.container--wide   { max-width: var(--container-wide); }

.section { padding-block: clamp(4rem, 8vw, 8rem); position: relative; }
.section--tight { padding-block: clamp(3rem, 5vw, 5rem); }
.section--flush-top { padding-top: 0; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--hairline); }
.section--panel { background: var(--surface); border-block: 1px solid var(--hairline); }

/* Section headers */
.section-head { max-width: 60ch; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head .h2 { margin-top: var(--space-3); }
.section-head .lede { margin-top: var(--space-4); }

/* Vertical rhythm helper */
.flow > * + * { margin-top: var(--flow, var(--space-4)); }

/* Simple grids */
.grid { display: grid; gap: clamp(var(--space-4), 2.5vw, var(--space-6)); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* Split layout (content + asset) */
.split {
  display: grid;
  gap: clamp(var(--space-6), 5vw, var(--space-9));
  align-items: center;
  grid-template-columns: 1fr;
}
.split--balanced { grid-template-columns: 1fr 1fr; }
.split--content-led { grid-template-columns: 1.1fr 0.9fr; }

.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.stack-center { display: flex; flex-direction: column; align-items: center; text-align: center; }

@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .split--balanced, .split--content-led { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ *
   6. GLASS NAVBAR + CSS-ONLY MOBILE MENU
 * ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--hairline);
}
/* Solid fallback where backdrop-filter is unsupported or transparency reduced */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: var(--bg); }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: var(--header-h);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  color: var(--ink);
  border-radius: var(--radius-sm);
}
.nav__brand .cbi-mark { height: 26px; width: auto; }
.nav__brand:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

/* Inline brand SVG theming: gold glyph, wordmark follows text colour */
.cbi-mark .ring { fill: none; stroke: var(--gold); }
.cbi-mark .node { fill: var(--gold); }
.cbi-mark .word { fill: currentColor; }
.cbi-mark .word-sub { fill: currentColor; opacity: 0.58; }

/* The hidden checkbox drives the mobile menu (no JS). */
.nav__toggle { position: absolute; opacity: 0; pointer-events: none; }

.nav__menu {
  display: flex;
  align-items: center;
  gap: clamp(var(--space-3), 1.4vw, var(--space-5));
}

.nav__link {
  position: relative;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 6px 2px;
  transition: color var(--dur-1) ease;
}
.nav__link:hover { color: var(--ink); }
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-2) var(--ease-out);
}
.nav__link:hover::after { transform: scaleX(0.4); }
/* Active page marker (page sets .is-active + aria-current="page") */
.nav__link.is-active,
.nav__link[aria-current="page"] { color: var(--ink); }
.nav__link.is-active::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

/* CTA inside the nav uses the button primitives; small size */
.nav__cta { margin-left: var(--space-2); }

/* Hamburger button (label for the checkbox) */
.nav__burger {
  display: none;
  width: 44px; height: 44px;
  margin-right: -8px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.nav__burger span {
  display: block;
  width: 22px; height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-1) ease;
}
.nav__burger:hover { background: var(--surface-2); }

/* --- Mobile behaviour --- */
@media (max-width: 880px) {
  .nav__burger { display: inline-flex; }

  .nav__menu {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: var(--space-3) clamp(20px, 5vw, 40px) var(--space-5);
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(20px);
    backdrop-filter: saturate(160%) blur(20px);
    border-bottom: 1px solid var(--hairline);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-menu);

    /* hidden by default */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--dur-2) var(--ease-out),
                transform var(--dur-2) var(--ease-out),
                visibility 0s linear var(--dur-2);
  }
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .nav__menu { background: var(--bg); }
  }

  .nav__link {
    font-size: 1.05rem;
    padding: 14px 4px;
    border-bottom: 1px solid var(--hairline);
  }
  .nav__link::after { display: none; }
  .nav__link.is-active,
  .nav__link[aria-current="page"] { color: var(--gold); }

  .nav__cta { margin: var(--space-4) 0 0; width: 100%; justify-content: center; }

  /* Open state */
  .nav__toggle:checked ~ .nav__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity var(--dur-2) var(--ease-out),
                transform var(--dur-2) var(--ease-out),
                visibility 0s;
  }
  /* Burger -> X */
  .nav__toggle:checked ~ .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle:checked ~ .nav__burger span:nth-child(2) { opacity: 0; }
  .nav__toggle:checked ~ .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ------------------------------------------------------------------ *
   7. BUTTONS
 * ------------------------------------------------------------------ */
.btn {
  --btn-py: 0.72rem;
  --btn-px: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: var(--btn-py) var(--btn-px);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--dur-1) var(--ease-out),
              background-color var(--dur-2) ease,
              border-color var(--dur-2) ease,
              color var(--dur-2) ease,
              box-shadow var(--dur-2) ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--gold);
  color: var(--on-gold);
  box-shadow: var(--shadow-gold);
}
.btn--primary:hover { background: var(--gold-bright); }
.btn--primary:active { background: var(--gold-deep); }

.btn--secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--hairline-strong);
}
.btn--secondary:hover { border-color: var(--ink-soft); background: color-mix(in srgb, var(--ink) 6%, transparent); }

.btn--ghost {
  background: transparent;
  color: var(--accent-ink);
  padding-inline: 0.4rem;
  min-height: auto;
  border-radius: var(--radius-sm);
}
.btn--ghost:hover { color: var(--gold); }

.btn--sm { --btn-py: 0.5rem; --btn-px: 0.9rem; min-height: 38px; font-size: 0.875rem; }
.btn--lg { --btn-py: 0.95rem; --btn-px: 1.6rem; font-size: 1.02rem; }
.btn--block { display: flex; width: 100%; }

/* Arrow affordance that nudges on hover */
.btn .btn__arrow { transition: transform var(--dur-2) var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ------------------------------------------------------------------ *
   8. CARDS
 * ------------------------------------------------------------------ */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: clamp(var(--space-5), 3vw, var(--space-6));
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  transition: transform var(--dur-2) var(--ease-out),
              border-color var(--dur-2) ease,
              box-shadow var(--dur-2) ease,
              background-color var(--dur-2) ease;
}
.card--interactive:hover {
  transform: translateY(-3px);
  border-color: var(--hairline-strong);
  box-shadow: var(--shadow-md);
}
.card--feature { background: var(--surface); }
.card--bare { background: transparent; border-color: transparent; padding-inline: 0; }

.card__eyebrow { font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.card__title { font-size: var(--fs-h4); font-weight: 650; letter-spacing: -0.01em; color: var(--ink); }
.card__text { color: var(--ink-soft); font-size: var(--fs-sm); line-height: 1.6; }
.card__foot { margin-top: auto; padding-top: var(--space-3); }

/* Icon chip that sits at the top of a card */
.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid var(--hairline-gold);
}
.card__icon svg { width: 22px; height: 22px; }

/* Stretched-link pattern: make an entire card clickable while keeping
   inner links accessible. Put .u-stretch on the primary anchor. */
.u-stretch::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 1;
}

/* ------------------------------------------------------------------ *
   9. HERO
 * ------------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: clip;
  padding-block: clamp(4.5rem, 9vw, 8.5rem);
}
.hero__inner { position: relative; z-index: var(--z-content); }
.hero__eyebrow { margin-bottom: var(--space-4); }
.hero__title { max-width: 16ch; }
.hero__lede { margin-top: var(--space-5); }
.hero__actions { margin-top: var(--space-7); }

/* Ambient light: two very low-alpha radials (gold + structural blue).
   Decorative only, pointer-events off, sits behind content. */
.hero__glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 80%;
  z-index: var(--z-motif);
  pointer-events: none;
  background:
    radial-gradient(52% 60% at 72% 12%, rgba(245, 165, 36, 0.13), transparent 68%),
    radial-gradient(46% 55% at 14% 6%, rgba(72, 110, 200, 0.12), transparent 70%);
  filter: saturate(115%);
}

/* ------------------------------------------------------------------ *
   10. BADGES / PILLS / MISC
 * ------------------------------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline-strong);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
}
.badge--gold { border-color: var(--hairline-gold); color: var(--accent-ink); background: var(--gold-soft); }
/* Status dot. Use only for REAL status (e.g. "Live on iOS"), never decoration */
.badge__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.badge--live .badge__dot { background: #35D07F; box-shadow: 0 0 0 3px rgba(53, 208, 127, 0.18); }

.divider { height: 1px; background: var(--hairline); border: 0; }
.divider--gold { background: linear-gradient(90deg, transparent, var(--hairline-gold), transparent); }

/* Small labelled stat (used sparingly, not as a hero-metric wall) */
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat__value { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); font-weight: 700; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat__label { font-size: var(--fs-sm); color: var(--muted); }

/* Definition-style key/value row (good for the legal / spec facts) */
.kv { display: grid; grid-template-columns: minmax(140px, 30%) 1fr; gap: var(--space-3) var(--space-5); }
.kv dt { color: var(--muted); font-size: var(--fs-sm); }
.kv dd { color: var(--ink-soft); }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; gap: 2px var(--space-3); } .kv dd { margin-bottom: var(--space-3); } }

/* ------------------------------------------------------------------ *
   11. DECORATIVE MOTIFS (SVG/CSS, on-brand, subtle)
 * ------------------------------------------------------------------ */
/* Faint technical grid; fades at the edges. Apply to a positioned parent
   via a child <div class="bg-grid"></div> or directly as a section bg. */
.bg-grid {
  position: absolute;
  inset: 0;
  z-index: var(--z-motif);
  pointer-events: none;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 78%);
  opacity: 0.7;
}

/* Gold hairline stroke for inline sparkline / gauge SVGs authored per page */
.motif-stroke { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.motif-stroke--soft { stroke: var(--hairline-strong); }
.motif-fill-soft { fill: var(--gold-soft); }

/* Panel that frames a figure/mockup with a soft inner top highlight */
.figure-frame {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--ink) 4%, transparent), transparent 40%),
    var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* ------------------------------------------------------------------ *
   12. FOOTER (legal block)
 * ------------------------------------------------------------------ */
.site-footer {
  margin-top: var(--space-8);
  border-top: 1px solid var(--hairline);
  background: var(--bg-2);
}
.footer__grid {
  display: grid;
  gap: clamp(var(--space-6), 5vw, var(--space-8));
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1.3fr;
  padding-block: clamp(var(--space-8), 7vw, var(--space-9));
}
.footer__brand { display: flex; flex-direction: column; gap: var(--space-4); }
.footer__mark .cbi-mark { height: 26px; width: auto; color: var(--ink); }
.footer__tagline { color: var(--muted); font-size: var(--fs-sm); max-width: 34ch; line-height: 1.6; }

.footer__col { display: flex; flex-direction: column; gap: var(--space-3); }
.footer__heading {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-1);
}
.footer__col a, .footer__legal a {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  width: fit-content;
  transition: color var(--dur-1) ease;
}
.footer__col a:hover, .footer__legal a:hover { color: var(--accent-ink); }

.footer__legal { display: flex; flex-direction: column; gap: var(--space-2); }
.footer__legal p { color: var(--ink-soft); font-size: var(--fs-sm); line-height: 1.55; }
.footer__legal .footer__entity { color: var(--ink); font-weight: 600; }
.footer__legal .mono { color: var(--muted); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-5);
  border-top: 1px solid var(--hairline);
}
.footer__bottom p { color: var(--muted); font-size: 0.82rem; }

@media (max-width: 880px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { justify-content: flex-start; }
}

/* ------------------------------------------------------------------ *
   13. SCROLL-REVEAL UTILITY
   Content is visible by DEFAULT. The reveal script adds `.has-reveal`
   to <html> only when JS runs AND motion is allowed, so the hidden
   state never traps content on no-JS / reduced-motion / headless renders.
 * ------------------------------------------------------------------ */
.has-reveal .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-3) var(--ease-out),
              transform var(--dur-3) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.has-reveal .reveal.is-visible { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ *
   14. ACCESSIBILITY / FOCUS / SELECTION / REDUCED MOTION
 * ------------------------------------------------------------------ */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

::selection { background: var(--gold); color: #0A0C12; }

/* Skip link (place as the first element inside <body>) */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -60px;
  z-index: var(--z-toast);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 600;
  transition: top var(--dur-2) var(--ease-out);
}
.skip-link:focus { top: var(--space-4); }

/* Visually hidden but available to assistive tech */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

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