/* =====================================================================
   AXON FIT — SETTINGS FILE (design tokens)  ·  v2 premium redesign
   ---------------------------------------------------------------------
   The ONLY place where colours, fonts, sizes, spacing, corner roundness,
   shadows and motion are defined. Every Tailwind utility in the HTML points
   back to these variables (see assets/css/src/site.css).

   Re-theme the whole site by editing this one file:
     • main colour ............ --primary / --on-primary
     • second colour .......... --highlight / --on-highlight
     • headline font .......... --font-display
     • body font .............. --font-body
     • section sizes .......... --space-section / --space-section-sm

   Source of truth: AXON FIT Brand Identity Kit v1.0
     Pure Black #000000 · Iron #0A0A0A · Graphite #222324
     Chrome #E2E4E3 · Axon Silver #B5B5B5 · Steel #989A99 · Gunmetal #6D6F6E
     Ignite Orange #F46F05 (statement + CTA) · Pulse Red #CE1F22 (highlight)
   ===================================================================== */

/* ---------- Brand fonts (self-hosted, extracted from the brand kit) ---------- */
@font-face { font-family: "Big Shoulders Display"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/big-shoulders-display-800.woff2") format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-weight: 900; font-style: normal; font-display: swap; src: url("../fonts/big-shoulders-display-900.woff2") format("woff2"); }
@font-face { font-family: "Michroma"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/michroma-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/barlow-condensed-700.woff2") format("woff2"); }

/* ---------- Theme-independent settings ---------- */
:root {
  /* Fonts */
  --font-display: "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  --font-tech: "Michroma", "Eurostile", Arial, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-cond: "Barlow Condensed", "Arial Narrow", sans-serif;

  /* Fluid type scale — every max is ≥ 2× its min (200% zoom rule);
     each preferred value mixes rem + vw so browser zoom keeps working. */
  --fs-display: clamp(2.75rem, 1.4rem + 4.5vw, 6rem);
  --fs-h1: clamp(2.5rem, 1.5rem + 4.2vw, 5.5rem);
  --fs-h2: clamp(2.125rem, 1.35rem + 3.1vw, 4.375rem);
  --fs-h3: clamp(1.375rem, 1.1rem + 0.9vw, 2.75rem);
  --fs-card: clamp(1.25rem, 1rem + 0.75vw, 2.5rem);
  --fs-stat: clamp(2.5rem, 1.7rem + 3vw, 5rem);
  --fs-lead: 1.1875rem;
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-label: 0.75rem;
  --fs-button: 1rem;

  /* Line heights & tracking */
  --lh-tight: 0.9;
  --lh-snug: 1.1;
  --lh-body: 1.65;
  --tracking-label: 0.26em;
  --tracking-button: 0.1em;

  /* Spacing — one rhythm for the whole site */
  --space-gutter: clamp(1.25rem, 0.6rem + 2.6vw, 3rem);
  --space-section: clamp(4.5rem, 3rem + 5vw, 7.5rem);
  --space-section-sm: clamp(3.25rem, 2.4rem + 3vw, 5rem);
  --space-stack: clamp(1.25rem, 1rem + 0.8vw, 2rem);
  --size-content: 80rem;
  --size-prose: 38rem;
  --size-tap: 2.75rem;
  --size-btn: 3.25rem;
  --size-header: 4.75rem;
  --size-logo-header: 3.25rem;
  --size-logo-footer: 8.5rem;
  --size-accent-bar: 0.1875rem;
  --size-energy-bar: 0.25rem;
  --size-card-min: 17rem;
  --size-tile-min: 14rem;
  --size-hero-min: 40rem;

  /* Corners — brand: sharp, with one clipped corner on buttons & cards */
  --radius-none: 0;
  --radius-sm: 0.125rem;
  --clip-corner: 0.875rem;
  --skew: -10deg;

  /* Motion */
  --duration-fast: 160ms;
  --duration-base: 320ms;
  --duration-slow: 750ms;
  --duration-slide: 1400ms;
  --duration-kenburns: 11s;
  --duration-float: 9s;
  --duration-glow: 7s;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Fixed brand pair — the logo always sits on black, in every theme */
  --ink: #000000;
  --on-ink: #E2E4E3;
  --on-ink-muted: #A9ACAF;
  --ink-raised: #121315;
  --ink-border: #2B2C2F;
  --metal: linear-gradient(135deg, #6D6F6E 0%, #E2E4E3 22%, #989A99 45%, #FCFCFC 62%, #848484 82%, #B5B5B5 100%);
  --energy: linear-gradient(90deg, #CE1F22 0%, #F46F05 55%, transparent 100%);
  --glow-red: radial-gradient(closest-side, rgb(206 31 34 / 0.55), rgb(206 31 34 / 0.18) 55%, transparent);
  --glow-orange: radial-gradient(closest-side, rgb(244 111 5 / 0.32), transparent);
  --fade-ink-end: linear-gradient(90deg, #000000 0%, rgb(0 0 0 / 0.86) 22%, rgb(0 0 0 / 0.35) 55%, rgb(0 0 0 / 0.15) 100%);
  --fade-ink-up: linear-gradient(0deg, #000000 0%, rgb(0 0 0 / 0.65) 40%, rgb(0 0 0 / 0.1) 100%);
  --speed-line: rgb(226 228 227 / 0.05);

  /* Primary CTA pair (Ignite Orange) — text on orange is always black */
  --primary: #F46F05;
  --on-primary: #0A0A0A;
  --primary-hover: #FF8424;
  --primary-press: #C85A02;

  /* Highlight pair (Pulse Red) — white text on red */
  --highlight: #CE1F22;
  --on-highlight: #FFFFFF;

  /* Text-on-photo scrim — brand: dark photo with a 70%+ black overlay */
  --scrim: rgb(0 0 0 / 0.72);
  --scrim-strong: rgb(0 0 0 / 0.9);
  --on-scrim: #FFFFFF;
  --on-scrim-muted: #D9DBDA;
  --accent-on-ink: #F46F05;
  /* Official WhatsApp logo colours (used only by the #whatsapp icon in the sprite) */
  --whatsapp-green: #25D366;
  --whatsapp-white: #FFFFFF;
  --silver: #B5B5B5;

  --shadow-lift: 0 1.25rem 2.5rem -1rem rgb(0 0 0 / 0.6);
  --shadow-header: 0 0.5rem 1.5rem -0.75rem rgb(0 0 0 / 0.7);
  --shadow-glow: 0 0 0 1px rgb(244 111 5 / 0.6), 0 1rem 2.5rem -1rem rgb(244 111 5 / 0.45);
  --header-bg: rgb(0 0 0 / 0.82);
  --header-bg-scrolled: rgb(0 0 0 / 0.96);

  color-scheme: dark light;
}

/* ---------- DARK theme (brand default) ---------- */
:root,
:root[data-theme="dark"] {
  --bg: #0A0A0A;
  --on-bg: #E6E8E7;
  --on-bg-muted: #A9ACAF;
  --surface: #1E1F22;
  --on-surface: #ECEEED;
  --on-surface-muted: #ADB0B3;
  --raised: #222326;
  --on-raised: #F0F1F0;
  --on-raised-muted: #B2B5B8;
  --accent: #F46F05;
  --border: #2E3033;
  --border-strong: #6D6F6E;
  --focus: #FFFFFF;
  --warning: #FF6B6E;
  --placeholder: #8E9196;
}

/* ---------- LIGHT theme ---------- */
:root[data-theme="light"] {
  --bg: #F6F6F4;
  --on-bg: #111214;
  --on-bg-muted: #44474C;
  --surface: #E4E5E1;
  --on-surface: #101113;
  --on-surface-muted: #3F4247;
  --raised: #FFFFFF;
  --on-raised: #111214;
  --on-raised-muted: #46494E;
  --accent: #A13F00;
  --border: #C9CAC6;
  --border-strong: #6D6F6E;
  --focus: #0A0A0A;
  --warning: #A8141A;
  --placeholder: #5E6166;
  color-scheme: light;
}
:root[data-theme="dark"] { color-scheme: dark; }

/* ---------- High-contrast preference: stronger palette ---------- */
@media (prefers-contrast: more) {
  :root, :root[data-theme="dark"] {
    --bg: #000000; --on-bg: #FFFFFF; --on-bg-muted: #E2E4E3;
    --surface: #141414; --on-surface: #FFFFFF; --on-surface-muted: #E2E4E3;
    --raised: #1E1E1E; --on-raised-muted: #E2E4E3;
    --border: #B5B5B5; --accent: #FF8A2A; --on-ink-muted: #E2E4E3;
    --scrim: rgb(0 0 0 / 0.9); --on-scrim-muted: #FFFFFF;
  }
  :root[data-theme="light"] {
    --bg: #FFFFFF; --on-bg: #000000; --on-bg-muted: #1A1A1A;
    --surface: #E6E6E6; --on-surface: #000000; --on-surface-muted: #1A1A1A;
    --on-raised-muted: #1A1A1A; --border: #000000; --accent: #7A2F00;
  }
}

/* ---------- Save-data / slow connection: skip decorative fonts & images ----------
   (Plain CSS is allowed here — Tailwind has no save-data variant.)
   html[data-save-data] is set by the bootstrap script in each page <head>. */
html[data-save-data] {
  --font-display: Impact, "Arial Narrow", sans-serif;
  --font-tech: Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-cond: "Arial Narrow", Arial, sans-serif;
}
html[data-save-data] [data-decorative] { display: none; }
@media (prefers-reduced-data: reduce) {
  :root {
    --font-display: Impact, "Arial Narrow", sans-serif;
    --font-tech: Arial, sans-serif;
    --font-body: system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-cond: "Arial Narrow", Arial, sans-serif;
  }
  [data-decorative] { display: none; }
}

/* ---------- Keyframes (plain CSS allowed) ---------- */
@keyframes af-rise { from { opacity: 0; transform: translateY(1.5rem); } to { opacity: 1; transform: none; } }
@keyframes af-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes af-kenburns { from { transform: scale(1.02); } to { transform: scale(1.12); } }
@keyframes af-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--af-rot, -18deg)); }
  50% { transform: translate3d(0, -1.1rem, 0) rotate(calc(var(--af-rot, -18deg) + 6deg)); }
}
@keyframes af-glow {
  0%, 100% { opacity: 0.55; transform: translate3d(0, 0, 0) scale(1); }
  50% { opacity: 0.95; transform: translate3d(2%, -3%, 0) scale(1.12); }
}
@keyframes af-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Embedded widget adjustment (Google Map — markup is not ours) ---------- */
.af-map iframe { display: block; width: 100%; height: 100%; border: 0; filter: grayscale(0.35) contrast(1.05); }
/* Dark theme: no colour filter on the map, so the Google marker and map keep their original colours. */
:root[data-theme="dark"] .af-map iframe { filter: none; }
