/* =====================================================================
   OAKCLICK · BRAND TOKENS  (v2 "Lawn-Sign Loud")
   Source of truth: docs/BRAND_SYSTEM.md · Specimen: brand/index.html
   ---------------------------------------------------------------------
   Import first:  <link rel="stylesheet" href="/css/brand-tokens.css">
   Palette switch: <html data-palette="a|b|c">. No attribute = "b"
   (recommended). The selectors are plain attribute selectors, so any
   element can carry data-palette to scope a palette to a subtree.
   Rules: no gradients anywhere. Flat fields, hard edges, hard shadows.
   Every text pair below is contrast-checked (see BRAND_SYSTEM.md §4).
   ===================================================================== */

/* ---------- Fonts (all OFL, self-hosted) ---------- */
/* Archivo variable: wght 100-900 + wdth 62-125 in ONE 90 KB file.
   Condensed cut = huge display, expanded cut = labels, stickers, wordmark. */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url("../assets/fonts/archivo-latin-wdth-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("../assets/fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); }

:root {
  /* ---------- Type families ---------- */
  --font-display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif; /* headlines, numbers, labels */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;   /* running text, UI */
  --font-accent: "Instrument Serif", Georgia, "Times New Roman", serif;           /* ONE italic word per headline, max */

  /* Archivo width presets (font-stretch values) */
  --wdth-compressed: 68%;   /* hero H1, giant numbers: tall, loud, saves width */
  --wdth-normal: 100%;      /* H2-H4 */
  --wdth-wide: 118%;        /* eyebrows, stickers, buttons, wordmark */

  /* Weights */
  --w-body: 400;            /* body copy */
  --w-ui: 560;              /* buttons, nav, inputs */
  --w-head: 760;            /* H2-H4 */
  --w-display: 860;         /* H1, mega numbers */

  /* ---------- Type scale (fluid; mobile 390 -> desktop 1440) ---------- */
  --fs-mega: clamp(4rem, 2.2rem + 9.2vw, 11rem);      /* 64 -> 176  hero word / section takeover */
  --fs-h1: clamp(3rem, 1.8rem + 6vw, 7.5rem);         /* 48 -> 120  page H1 (compressed caps) */
  --fs-h2: clamp(2.25rem, 1.6rem + 3.2vw, 4.5rem);    /* 36 -> 72   section heads */
  --fs-h3: clamp(1.5rem, 1.25rem + 1.2vw, 2.25rem);   /* 24 -> 36   card heads */
  --fs-h4: clamp(1.25rem, 1.15rem + .5vw, 1.5rem);    /* 20 -> 24 */
  --fs-lead: clamp(1.125rem, 1.05rem + .4vw, 1.375rem); /* 18 -> 22 intro paragraph */
  --fs-body: clamp(1rem, .97rem + .15vw, 1.0625rem);  /* 16 -> 17 */
  --fs-small: .9375rem;                                /* 15  captions */
  --fs-label: .8125rem;                                /* 13  eyebrows/tags (Archivo wide caps). Floor: never below 13px */

  --lh-mega: .86;           /* compressed caps only */
  --lh-display: .94;        /* H1 */
  --lh-head: 1.04;          /* H2-H4 */
  --lh-body: 1.55;
  --track-display: -.01em;  /* compressed caps need almost no negative tracking */
  --track-head: -.02em;
  --track-label: .08em;     /* wide caps labels */

  /* ---------- Spacing (4px base, 8px rhythm) ---------- */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px; --sp-10: 144px;
  --gutter: clamp(16px, 4vw, 48px);                /* page side padding */
  --section-pad: clamp(64px, 5rem + 4vw, 160px);  /* vertical padding of a full-bleed field */
  --maxw: 1320px;                                  /* content max width */

  /* ---------- Shape language ---------- */
  --r-0: 0;                 /* fields, cards, inputs: square is the default */
  --r-tag: 10px;            /* key-tag badges */
  --r-sm: 6px;              /* small UI inside motion graphics / screens */
  --r-pill: 999px;          /* buttons, nav bar, chips */
  --cut: 28px;              /* "gable cut": 45deg chamfer on ONE corner of cards (top-right) */
  --cut-sm: 16px;           /* gable cut on small cards / tags */
  --punch: 7px;             /* radius of the key-tag punch hole */
  --stroke: 2px;            /* default outline, ink */
  --stroke-bold: 3px;       /* large stickers, focus rings */
  --sticker-tilt: -6deg;    /* stickers are ALWAYS slightly rotated; nothing else is */

  /* ---------- Hard (flat offset) shadows: no blur, ever ---------- */
  --shadow-sm: 3px 3px 0 0 var(--c-ink);   /* chips, small buttons */
  --shadow-md: 5px 5px 0 0 var(--c-ink);   /* buttons, inputs on focus, nav */
  --shadow-lg: 8px 8px 0 0 var(--c-ink);   /* cards, floating UI */
  --shadow-loud: 6px 6px 0 0 var(--c-loud); /* the one highlighted card per section */
  /* cards with a gable cut use filter: drop-shadow() so the shadow follows the cut */
  --drop-lg: drop-shadow(8px 8px 0 var(--c-ink));
  --drop-md: drop-shadow(5px 5px 0 var(--c-ink));

  /* ---------- Motion ("Snap & Settle") ---------- */
  --dur-instant: 80ms;      /* press, toggles */
  --dur-fast: 160ms;        /* hover, chip select */
  --dur-base: 240ms;        /* menus, nav hide/show */
  --dur-slow: 420ms;        /* single reveal */
  --dur-reveal: 600ms;      /* gable wipe / hero line reveal */
  --dur-stamp: 520ms;       /* sticker stamp */
  --dur-loop-short: 3s;     /* primitives: pin ripple, live dot */
  --dur-loop: 6s;           /* service motion graphics */
  --dur-loop-long: 8s;      /* ambient hero loops (max) */
  --ease-out: cubic-bezier(.16, 1, .3, 1);       /* settle: entrances */
  --ease-standard: cubic-bezier(.2, 0, 0, 1);    /* state changes, hover */
  --ease-snap: cubic-bezier(.34, 1.56, .64, 1);  /* overshoot: stamps, pops (small elements only) */
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);   /* travels that stay on screen (cards moving lanes) */
  --ease-exit: cubic-bezier(.4, 0, 1, 1);        /* leaving */
  --stagger: 60ms;          /* cards in a row */
  --stagger-cap: 300ms;     /* total stagger never exceeds this */
  --lift: -3px;             /* hover lift for buttons (paired with bigger shadow) */
  --press: 5px;             /* press-in distance = shadow offset, so the button "lands" on its shadow */

  /* ---------- Textures (flat; data URIs, no gradients) ---------- */
  /* film grain: multiply at 6-10% on saturated fields only */
  --tex-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.1 -.2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  /* halftone: hard 2.5px dots on a 10px grid; tint with mask-image + background-color */
  --tex-halftone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Ccircle cx='5' cy='5' r='2.5'/%3E%3C/svg%3E");
  /* diagonal hatch (45deg, matches the gable cut) for "coming soon"/placeholder areas */
  --tex-hatch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='M-3 3l6-6M0 12L12 0M9 15l6-6' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");

  /* ---------- Z layers ---------- */
  --z-sticker: 5; --z-nav: 50; --z-sheet: 80; --z-toast: 90;
}

/* =====================================================================
   PALETTES. Each = 2 quiet + 1 loud (+ ink). Roles, not colour names,
   are what components use. --on-* is the ONLY text colour allowed on
   that fill (all pass AA 4.5:1 for normal text).
   ===================================================================== */

/* ---------- B · COBALT CANDY (recommended, default) ----------
   From the owner's refs: Marshmallow #F0F0F0 + Blue-violet #105BFF + Bubblegum #FE68D0 */
:root, [data-palette="b"] {
  --c-field: #105BFF;     /* COBALT: primary saturated field (hero, audience, CTA) */
  --c-on-field: #FFFFFF;  /* text on cobalt: 5.30:1 */
  --c-deep: #0A0B2E;      /* NIGHT INK: the one dark field (AI demo, footer) */
  --c-on-deep: #F0F0F0;   /* 16.75:1 */
  --c-paper: #F0F0F0;     /* MARSHMALLOW: quiet neutral (cool, never beige) */
  --c-on-paper: #0A0B2E;  /* ink on marshmallow: 16.75:1 */
  --c-loud: #FE68D0;      /* BUBBLEGUM: the loud one. CTA fills, stickers, one highlight per section */
  --c-on-loud: #0A0B2E;   /* ink on bubblegum: 7.37:1 (never white: 2.6:1) */
  --c-tint: #FFC8EE;      /* CANDY: soft pink for tags, table stripes, selected rows */
  --c-on-tint: #0A0B2E;   /* 13.40:1 */
  --c-ink: #0A0B2E;       /* strokes, hard shadows, body text */
  --c-white: #FFFFFF;     /* inputs, phone screens, cards on paper */
  --c-muted: #54566E;     /* secondary text on paper: 6.28:1 (on white 7.16:1) */
  --c-link: #105BFF;      /* cobalt text on marshmallow: 4.65:1 */
  --c-focus: #FE68D0;     /* focus ring colour (always paired with ink outline) */
  --c-loud-on-dark: #FE68D0; /* loud used as TEXT on night: 7.37:1 */
  --c-brand: #105BFF;     /* logo house colour on white/paper (= field here) */

  /* Colour-blocking map: 9 homepage sections (bg / text / accent) */
  --blk-hero-bg: var(--c-field);     --blk-hero-fg: var(--c-on-field);     --blk-hero-accent: var(--c-loud);
  --blk-proof-bg: var(--c-loud);     --blk-proof-fg: var(--c-on-loud);     --blk-proof-accent: var(--c-ink);
  --blk-services-bg: var(--c-paper); --blk-services-fg: var(--c-on-paper); --blk-services-accent: var(--c-field);
  --blk-audience-bg: var(--c-field); --blk-audience-fg: var(--c-on-field); --blk-audience-accent: var(--c-loud);
  --blk-work-bg: var(--c-paper);     --blk-work-fg: var(--c-on-paper);     --blk-work-accent: var(--c-loud);
  --blk-ai-bg: var(--c-deep);        --blk-ai-fg: var(--c-on-deep);        --blk-ai-accent: var(--c-loud);
  --blk-results-bg: var(--c-loud);   --blk-results-fg: var(--c-on-loud);   --blk-results-accent: var(--c-field);
  --blk-voices-bg: var(--c-paper);   --blk-voices-fg: var(--c-on-paper);   --blk-voices-accent: var(--c-field);
  --blk-cta-bg: var(--c-field);      --blk-cta-fg: var(--c-on-field);      --blk-cta-accent: var(--c-loud);
  --blk-footer-bg: var(--c-deep);    --blk-footer-fg: var(--c-on-deep);

  /* Motion-graphic colour hooks (SVGs read these when inlined; they carry B fallbacks) */
  --mg-field: var(--c-field); --mg-paper: var(--c-white); --mg-loud: var(--c-loud);
  --mg-ink: var(--c-ink); --mg-tint: var(--c-tint); --mg-deep: var(--c-deep);
}

/* ---------- A · LAGOON POP ----------
   From refs: Lagoon Blue #7BDFF2 + Cloud White + Bubblegum, pushed with Sky Blue #0593C6 / Hot Pink */
[data-palette="a"] {
  --c-field: #7BDFF2;     /* LAGOON: primary field (hero, CTA). Ink text only: 11.55:1 */
  --c-on-field: #071A26;
  --c-deep: #0593C6;      /* SKY: second saturated field (audience). Ink text 5.06:1; white fails (3.5) */
  --c-on-deep: #071A26;
  --c-paper: #FCFFFF;     /* CLOUD WHITE */
  --c-on-paper: #071A26;  /* 17.63:1 */
  --c-loud: #CC2D86;      /* HOT PINK (deepened from #D63995 so white text passes: 4.90:1) */
  --c-on-loud: #FFFFFF;
  --c-tint: #F2B5D4;      /* BUBBLEGUM (ref): soft flood for results. Ink 10.41:1 */
  --c-on-tint: #071A26;
  --c-ink: #071A26;       /* TIDE INK: strokes, shadows, the dark AI field */
  --c-white: #FFFFFF;
  --c-muted: #3D5361;     /* 8.01:1 on cloud */
  --c-link: #CC2D86;      /* pink text on cloud: 4.87:1 */
  --c-focus: #CC2D86;
  --c-loud-on-dark: #F2B5D4; /* hot pink on tide is 3.4: use bubblegum for text on dark (10.4:1) */
  --c-brand: #0593C6;     /* logo house on white: Sky, because Lagoon is too pale on white (graphic 3.5:1) */

  --blk-hero-bg: var(--c-field);     --blk-hero-fg: var(--c-on-field);     --blk-hero-accent: var(--c-loud);
  --blk-proof-bg: var(--c-loud);     --blk-proof-fg: var(--c-on-loud);     --blk-proof-accent: var(--c-field);
  --blk-services-bg: var(--c-paper); --blk-services-fg: var(--c-on-paper); --blk-services-accent: var(--c-deep);
  --blk-audience-bg: var(--c-deep);  --blk-audience-fg: var(--c-on-deep);  --blk-audience-accent: var(--c-field);
  --blk-work-bg: var(--c-paper);     --blk-work-fg: var(--c-on-paper);     --blk-work-accent: var(--c-loud);
  --blk-ai-bg: var(--c-ink);         --blk-ai-fg: var(--c-field);          --blk-ai-accent: var(--c-tint);
  --blk-results-bg: var(--c-tint);   --blk-results-fg: var(--c-on-tint);   --blk-results-accent: var(--c-loud);
  --blk-voices-bg: var(--c-paper);   --blk-voices-fg: var(--c-on-paper);   --blk-voices-accent: var(--c-deep);
  --blk-cta-bg: var(--c-field);      --blk-cta-fg: var(--c-on-field);      --blk-cta-accent: var(--c-loud);
  --blk-footer-bg: var(--c-ink);     --blk-footer-fg: var(--c-field);

  --mg-field: var(--c-field); --mg-paper: var(--c-white); --mg-loud: var(--c-loud);
  --mg-ink: var(--c-ink); --mg-tint: var(--c-tint); --mg-deep: var(--c-deep);
}

/* ---------- C · CRIMSON BUTTER ----------
   From refs: Crimson #E13A26 + Deep Red #831613 + Baby Yellow #FEED65 */
[data-palette="c"] {
  --c-field: #D3311E;     /* CRIMSON (nudged from #E13A26 so white text passes: 4.97:1) */
  --c-on-field: #FFFFFF;
  --c-deep: #831613;      /* OXBLOOD (ref Deep Red): audience + AI fields. Butter text 8.38:1 */
  --c-on-deep: #FEED65;
  --c-paper: #FFFCFA;     /* MILK: near-white, warm only by 1-2 points; NOT cream */
  --c-on-paper: #2A0604;  /* 18.25:1 */
  --c-loud: #FEED65;      /* BUTTER (ref Baby Yellow): CTA fills, stickers, results flood */
  --c-on-loud: #2A0604;   /* 15.55:1 */
  --c-tint: #FFD6CC;      /* PEACH tint for tags/rows. Ink 13.98:1 */
  --c-on-tint: #2A0604;
  --c-ink: #2A0604;       /* BURNT INK: strokes, shadows, footer */
  --c-white: #FFFFFF;
  --c-muted: #6E3A33;     /* 8.88:1 on milk */
  --c-link: #B02716;      /* crimson-dark text on milk: 6.53:1 */
  --c-focus: #FEED65;
  --c-loud-on-dark: #FEED65;
  --c-brand: #D3311E;     /* logo house on white (= field) */

  --blk-hero-bg: var(--c-field);     --blk-hero-fg: var(--c-on-field);     --blk-hero-accent: var(--c-loud);
  --blk-proof-bg: var(--c-loud);     --blk-proof-fg: var(--c-on-loud);     --blk-proof-accent: var(--c-field);
  --blk-services-bg: var(--c-paper); --blk-services-fg: var(--c-on-paper); --blk-services-accent: var(--c-field);
  --blk-audience-bg: var(--c-deep);  --blk-audience-fg: var(--c-on-deep);  --blk-audience-accent: var(--c-loud);
  --blk-work-bg: var(--c-paper);     --blk-work-fg: var(--c-on-paper);     --blk-work-accent: var(--c-field);
  --blk-ai-bg: var(--c-ink);         --blk-ai-fg: var(--c-paper);          --blk-ai-accent: var(--c-loud);
  --blk-results-bg: var(--c-loud);   --blk-results-fg: var(--c-on-loud);   --blk-results-accent: var(--c-field);
  --blk-voices-bg: var(--c-paper);   --blk-voices-fg: var(--c-on-paper);   --blk-voices-accent: var(--c-field);
  --blk-cta-bg: var(--c-field);      --blk-cta-fg: var(--c-on-field);      --blk-cta-accent: var(--c-loud);
  --blk-footer-bg: var(--c-deep);    --blk-footer-fg: var(--c-on-deep);

  --mg-field: var(--c-field); --mg-paper: var(--c-white); --mg-loud: var(--c-loud);
  --mg-ink: var(--c-ink); --mg-tint: var(--c-tint); --mg-deep: var(--c-deep);
}

/* ---------- Reduced motion: tokens collapse, loops stop ---------- */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0ms; --dur-base: 0ms; --dur-slow: 0ms; --dur-reveal: 0ms; --dur-stamp: 0ms;
    --lift: 0px; --press: 0px; --stagger: 0ms; --stagger-cap: 0ms;
  }
}
