/* ==========================================================================
   SolutionTee TechHub — design tokens
   Brand: primary #0B1F44 · secondary #2563B3 · accent #F2B233
   Light is the default canvas; [data-theme="dark"] flips the surface roles.
   Everything below the surface tokens - brand ramps, status colours, type,
   spacing, motion - is shared, so a theme is only ever the small block of
   overrides at the foot of this file.
   ========================================================================== */

:root {
  /* ── Brand ramps ──────────────────────────────────────────────────── */
  --brand-900: #050f22;
  --brand-800: #081733;
  --brand-700: #0b1f44;   /* PRIMARY */
  --brand-600: #123061;
  --brand-500: #1a4383;
  --brand-400: #2563b3;   /* SECONDARY */
  --brand-300: #4b86d4;

  --accent-700: #8a5f0c;
  --accent-600: #b8830f;
  --accent-500: #f2b233;   /* ACCENT */
  --accent-400: #f7c65f;
  /* Amber as *text*. #f2b233 on a near-white page is about 1.8:1 - fine as a
     fill, unreadable as a label - so the light theme uses the deep step and
     the dark theme keeps the bright one. Fills and borders still reference
     --accent-500 directly; only text points here. */
  /* ── The mark, and the surface the loader paints ──────────────────────
     One set of tokens for every place the logo appears, so a mark in a new
     context is themed without touching it. On a dark sheet the navy runs
     would disappear into the background, so they lift to the light ink; the
     amber node is the one thing that does not move - it reads on both. */
  --mark-navy: #0b1f44;
  --mark-blue: #2563b3;
  --mark-amber: #f2b233;
  --mark-pulse: #d68f16;      /* amber is too pale to read on a light sheet */
  --loader-bg: #f4f7fc;

  --accent-ink: #8a5f0c;

  /* Only the steps the design actually reaches for are declared. A full
     ten-stop ramp per hue looks like a design system and behaves like dead
     weight: --violet-500, --rose-500, --sky-500, --accent-300/-100 and
     --brand-050/-100 were all defined and never once referenced. The status
     colours below carry the semantic names, which is how they are used. */
  --mint-500: #22c58b;

  /* ── Semantic surfaces (dark default) ─────────────────────────────── */
  color-scheme: light;

  --bg: #f6f8fc;
  --bg-alt: #ffffff;
  --bg-elevated: #ffffff;
  --surface: rgba(11, 31, 68, 0.035);
  --surface-strong: rgba(11, 31, 68, 0.06);
  --surface-solid: #ffffff;
  --overlay: rgba(246, 248, 252, 0.8);

  --line: rgba(11, 31, 68, 0.12);
  --line-strong: rgba(11, 31, 68, 0.2);
  --line-accent: rgba(184, 131, 15, 0.4);

  --text: #0b1f44;
  --text-muted: #4a5f83;
  --text-dim: #5b6d8a;
  --text-inverse: #ffffff;

  --focus: var(--accent-500);
  --success: #22c58b;
  --warning: #f2b233;
  --danger: #ff5d73;
  --info: #38bdf8;

  --success-bg: rgba(34, 197, 139, 0.13);
  --warning-bg: rgba(242, 178, 51, 0.14);
  --danger-bg: rgba(255, 93, 115, 0.13);
  --info-bg: rgba(56, 189, 248, 0.13);

  /* ── Gradients ────────────────────────────────────────────────────── */
  --grad-brand: linear-gradient(135deg, #2563b3 0%, #4b86d4 55%, #86b0e6 100%);
  --grad-accent: linear-gradient(135deg, #f2b233 0%, #f7c65f 100%);
  --grad-hero: radial-gradient(120% 90% at 12% 0%, #dfeaf9 0%, rgba(246, 248, 252, 0) 60%),
               radial-gradient(90% 80% at 92% 6%, rgba(242, 178, 51, 0.2) 0%, rgba(246, 248, 252, 0) 58%),
               linear-gradient(180deg, #f6f8fc 0%, #ffffff 60%, #f6f8fc 100%);
  --grad-line: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  --grad-glass: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.66));

  /* ── Typography ───────────────────────────────────────────────────── */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --fs-2xs: 0.6875rem;
  --fs-xs: 0.78rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.0625rem;
  --fs-lg: clamp(1.125rem, 0.4vw + 1.05rem, 1.3rem);
  --fs-xl: clamp(1.35rem, 0.9vw + 1.15rem, 1.75rem);
  --fs-2xl: clamp(1.7rem, 1.7vw + 1.25rem, 2.4rem);
  /* The display steps are sized against the column they live in, not the
     viewport. The hero headline sits in a little over half of a 1240px
     container, so the old 96px step wrapped a 44-character line four ways.
     These land it on two lines from tablet up.

     The three slopes are ordered as well as the three caps, so a heading never
     outgrows its parent at an in-between width. --fs-3xl reached its cap at
     about 1150px, which left the section h2 within a hair of the hero h1 on a
     laptop; it now keeps climbing to a slightly lower ceiling.

     The caps matter as much as the slopes: --container stops at 1240px, so on
     a 1080p monitor the hero column stops widening while the type would carry
     on growing and wrap the headline a third time. Each cap lands before its
     step outruns the column, and each is reached before the step below it
     catches up. */
  --fs-3xl: clamp(1.95rem, 2.5vw + 0.7rem, 3.1rem);
  --fs-4xl: clamp(2.05rem, 3.2vw + 0.5rem, 3.4rem);
  --fs-hero: clamp(2.3rem, 3.8vw + 0.55rem, 3.9rem);

  --lh-tight: 1.06;
  --lh-snug: 1.22;
  --lh-body: 1.65;
  --tracking-wide: 0.16em;
  --tracking-tight: -0.025em;

  /* ── Space & shape ────────────────────────────────────────────────── */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 2.75rem;
  --sp-8: 3.5rem;
  --sp-9: 5rem;
  --sp-10: 7rem;
  --section-y: clamp(4rem, 8vw, 7.5rem);

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-2xl: 36px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(11, 31, 68, 0.09);
  --shadow-md: 0 10px 28px -14px rgba(11, 31, 68, 0.28);
  --shadow-lg: 0 30px 60px -28px rgba(11, 31, 68, 0.35);
  --shadow-glow: 0 0 0 1px var(--line-accent), 0 18px 44px -22px rgba(184, 131, 15, 0.4);
  --shadow-brand: 0 20px 46px -20px rgba(37, 99, 179, 0.7);

  --ring: 0 0 0 3px rgba(242, 178, 51, 0.42);
  --blur-glass: saturate(160%) blur(18px);

  /* ── Motion ───────────────────────────────────────────────────────── */
  /* Entrances and exits take --ease-out; movement across the screen takes
     --ease-in-out; the drawer gets the iOS curve. Nothing uses ease-in: it
     starts slow, which delays the exact moment the user is watching. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  /* Overshoot. Reserved for the rare/playful tier - never on a hover or any
     other surface the user sees dozens of times a day. */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Durations by role, not by size. UI motion stays under 300ms: a 200ms
     dropdown genuinely feels more responsive than a 400ms one. */
  --dur-press: 120ms;   /* button press feedback      100-160 */
  --dur-fast: 160ms;    /* hover, colour, small state 125-200 */
  --dur: 220ms;         /* dropdowns, popovers        150-250 */
  --dur-slow: 420ms;    /* drawers, overlays          200-500 */
  --dur-theme: 300ms;   /* light<->dark crossfade   state change */
  --dur-reveal: 460ms;  /* scroll reveal - once per element, off-screen start */

  /* ── Layout ───────────────────────────────────────────────────────── */
  --container: 1240px;
  --container-narrow: 860px;
  --container-wide: 1480px;
  --nav-h: 74px;

  /* Layout margins. One fluid gutter drives every page: 20px on a small
     phone, 40px from tablet up. `--gutter-safe` never lets content sit under
     a notch or rounded corner - the page uses viewport-fit=cover, so without
     this the inline edges genuinely clip in landscape.
     Both insets are folded into one symmetric value so the result is
     direction-agnostic and stays correct when the layout is mirrored. */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --gutter-safe: max(
    var(--gutter), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)
  );
  --safe-block-end: env(safe-area-inset-bottom, 0px);

  /* Breakpoints, named for the content that stops fitting rather than for a
     device. CSS cannot use a custom property in a media query, so these are
     documentation for the values written inline:
       1020px  nav links + actions no longer fit beside the logo
        980px  two-column hero / detail sidebar loses its minimum width
        900px  four-column footer and the FAQ split collapse
        620px  card grids reach a single column; gutters tighten */
  --z-loader: 9000;
  --z-nav: 800;
  --z-drawer: 900;
  --z-toast: 950;
  --z-modal: 940;
}

/* ── Dark theme ─────────────────────────────────────────────────────── */
/* Opt-in, via the toggle in the header. Only the surface roles change. */
[data-theme="dark"] {
  color-scheme: dark;

  --accent-ink: var(--accent-500);   /* readable on navy, unlike on white */

  --bg: #050d1d;
  --bg-alt: #07142b;
  --bg-elevated: #0a1c39;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --surface-solid: #0d2245;
  --overlay: rgba(3, 8, 18, 0.72);

  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --line-accent: rgba(242, 178, 51, 0.35);

  --text: #eef4ff;
  --text-muted: #a3b4d0;
  --text-dim: #6f83a4;

  --mark-navy: #eef4ff;
  --mark-blue: #4b86d4;
  --mark-pulse: #f6c661;
  --loader-bg: #050f22;
  --text-inverse: #050d1d;

  --grad-hero: radial-gradient(120% 90% at 15% 0%, #123061 0%, rgba(5, 13, 29, 0) 62%),
               radial-gradient(90% 80% at 92% 8%, rgba(242, 178, 51, 0.16) 0%, rgba(5, 13, 29, 0) 60%),
               linear-gradient(180deg, #050d1d 0%, #071b38 55%, #050d1d 100%);
  --grad-glass: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));

  --shadow-sm: 0 1px 2px rgba(2, 6, 16, 0.4);
  --shadow-md: 0 10px 30px -12px rgba(2, 6, 16, 0.7);
  --shadow-lg: 0 28px 60px -24px rgba(2, 6, 16, 0.85);
  --shadow-glow: 0 0 0 1px var(--line-accent), 0 20px 50px -22px rgba(242, 178, 51, 0.5);
}
