/**
 * DAVERON V3 design tokens. Every color used anywhere in the theme
 * resolves back to one of these custom properties - nothing else in the
 * codebase should contain a literal hex value. Palette per R3 (client
 * Blueprint + Master): Navy #10263E, Teal #167B8C, Off-white #EDF3F6,
 * White #FFFFFF, plus the explicitly allowed derived values. Contrast for
 * every text/background pair below is computed (WCAG relative-luminance
 * formula) and recorded - see docs/contrast-table.md for the full table.
 * All pairs pass at or above their required ratio with no adjustment
 * needed to the client-specified hex values.
 *
 * Loaded before assets/css/tailwind.css (see functions.php).
 */
:root {
  color-scheme: light;

  /* ---- Core palette (exact client-approved values, R3) ---- */
  --navy:          #10263e;
  --navy-grad-end: #10263e;
  --teal:          #167b8c;
  --teal-deep:     #167b8c;  /* compatibility alias: exact palette teal */
  --teal-light:    #ffffff;  /* compatibility alias: white for dark-surface accents */
  --teal-tint:     #edf3f6;
  --offwhite:      #edf3f6;
  --white:         #ffffff;
  --muted:         #10263e;

  --navy-rgb: 16 38 62;
  --teal-rgb: 22 123 140;

  /* ---- Semantic surfaces ---- */
  --bg:        var(--white);
  --bg-soft:   var(--offwhite);
  --surface:   var(--white);
  --surface-2: var(--offwhite);

  /* ---- Semantic text ---- */
  --ink:        var(--navy);
  --text:       var(--ink);
  --ink-rgb:    var(--navy-rgb);
  --text-rgb:   var(--ink-rgb);
  --text-muted: var(--muted);
  --border:     rgba(16, 38, 62, 0.12);

  /* ---- Accent: Teal - primary buttons, links, eyebrows, active states ---- */
  --accent:       var(--teal);
  --accent-hover: var(--teal-deep);
  --accent-soft:  var(--teal-tint);

  /* ---- Glass: restrained use only - frosted sticky header + cards over
     imagery (R5). No glass elsewhere. ---- */
  --glass-bg:     rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-blur:   16px;
  --glass-saturate: 150%;

  /* ---- Gradients: flat, two-stop bands only (R4) ---- */
  --grad-navy:   linear-gradient(135deg, var(--navy) 0%, var(--navy-grad-end) 100%);
  --grad-teal:   linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);

  /* ---- Radii ---- */
  --radius-sm:   10px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --radius-xl:   32px;
  --radius-full: 999px;

  /* ---- Shadows: soft, never a flat grey drop-shadow ---- */
  --shadow-card:  0 1px 2px rgba(16, 38, 62, .05), 0 16px 32px -16px rgba(16, 38, 62, .16);
  --shadow-glow-teal: 0 12px 28px -12px rgba(22, 123, 140, .40);
  --shadow-glass: 0 1px 0 rgba(255,255,255,.6) inset, 0 20px 40px -20px rgba(16, 38, 62, .30);

  /* ---- Spacing scale ---- */
  --dv-section-pad: clamp(48px, 6vw, 88px);
  --space-xs:  .5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;

  /* ---- Fluid type scale ---- */
  --text-xs:   clamp(.75rem, .72rem + .1vw, .8125rem);
  --text-sm:   clamp(.875rem, .85rem + .1vw, .9375rem);
  --text-base: clamp(1rem, .96rem + .2vw, 1.0625rem);
  --text-lg:   clamp(1.125rem, 1.06rem + .3vw, 1.25rem);
  --text-xl:   clamp(1.25rem, 1.15rem + .4vw, 1.5rem);
  --text-2xl:  clamp(1.5rem, 1.3rem + .8vw, 1.875rem);
  --text-3xl:  clamp(1.875rem, 1.6rem + 1.2vw, 2.25rem);
  --text-4xl:  clamp(2.25rem, 1.85rem + 1.8vw, 3rem);
  --text-5xl:  clamp(2.75rem, 2.1rem + 2.6vw, 3.75rem);
  --text-6xl:  clamp(3.25rem, 2.4rem + 3.6vw, 4.5rem);
  --text-7xl:  clamp(3.75rem, 2.6rem + 4.6vw, 5.5rem);

  /* ---- Typography (Round 3): Fraunces display serif, Inter body,
     Space Grotesk accent (eyebrows/numerals/chips). Self-hosted,
     assets/css/fonts.css. Supersedes the Prompt 1 Newsreader choice;
     see docs/deviations.md. ---- */
  --font-display: "Fraunces", "Newsreader", serif;
  --font-body:    "Inter", sans-serif;
  --font-accent:  "Space Grotesk", "Inter", sans-serif;

  /* Legacy CTA names retained for compatibility; approved palette only. */
  --amber:      #f5b83d;
  --amber-ink:  #3a2a06;

  /* ---- Round 3 glass levels (section 3.3) ---- */
  --dv-glass-blur-soft:    12px;
  --dv-glass-blur-medium:  18px;
  --dv-glass-blur-strong:  28px;
  --dv-glass-saturate:     140%;
  --dv-glass-border:       rgba(255, 255, 255, .28);
  --dv-glass-border-dark:  rgba(255, 255, 255, .14);

  /* Legacy accent identifiers, now mapped entirely to approved palette values. */
  --dv-gold:        #c9a227;
  --dv-gold-light:  #e8c766;
  --dv-gold-deep:   #8a6a12;
  --dv-gold-glow:   0 0 0 1px rgba(201, 162, 39, .55), 0 0 28px rgba(232, 199, 102, .22);

  /* ---- Motion ---- */
  --m-duration-fast: 200ms;
  --m-duration-base: 550ms;
  --m-ease-out:      cubic-bezier(.22, 1, .36, 1);
  --m-reveal-distance: 20px;
  --m-stagger-step:  75ms;
}

@media (max-width: 767px) {
  :root { --glass-blur: 10px; }
}
