/* ==========================================================================
   Corepath Advisory — Design Tokens
   Palette is derived from the supplied logo: navy #000E3F, azure #0565B6.
   The navy is used as a near-black canvas rather than a "corporate blue",
   and azure appears only as a precision accent. A warm ivory keeps the
   overall temperature from going cold.
   ========================================================================== */

:root {
  /* ---- Brand ----
     Palette taken from the Corepath React build (project/app/globals.css):
       --ink #0b1935  --ink-2 #162b4d  --blue #1178c7  --blue-2 #65b8ed
       --mint #c8e5d5  --paper #f8f8f5  --line #dbe2e7  --muted #66717e
     Two values are adjusted for contrast only, noted inline. */
  --cp-navy:          #0b1935;  /* --ink */
  --cp-navy-raised:   #162b4d;  /* --ink-2, gradient floor + raised surfaces */
  --cp-navy-deep:     #08122a;  /* a shade under --ink, for the footer ground */
  --cp-navy-line:     #24365c;

  /* --blue is #1178c7. At 4.35:1 on paper it just misses AA for small text, so
     text and hairlines use a fractionally deeper blue and the vivid original is
     kept for fills, where the contrast is measured against white instead. */
  --cp-azure:         #0F6DB4;
  --cp-azure-vivid:   #1178c7;  /* --blue, exact — button + CTA fills */
  --cp-azure-bright:  #65b8ed;  /* --blue-2, exact — accents on dark */
  --cp-azure-soft:    rgba(17, 120, 199, 0.12);

  --cp-mint:          #c8e5d5;  /* --mint, the Values section ground */

  /* ---- Neutrals ---- */
  --cp-ivory:         #f8f8f5;  /* --paper */
  --cp-ivory-deep:    #eaf2f3;  /* cool pale, Challenges */
  --cp-ivory-cool:    #eef3f4;  /* cool pale, Partners / lists */
  --cp-paper:         #FFFFFF;
  --cp-ink:           #0b1935;  /* --ink */
  --cp-ink-soft:      #5a6875;  /* 5.4:1 on paper */
  /* Was #66717e (the React build's --muted). That measured 4.7:1 on paper but
     only 4.37:1 on the cooler #eaf2f3 ground the Challenges section uses —
     under AA. Nudged darker: 5.0:1 on paper, 4.7:1 on the cool ground, and
     still lighter than --cp-ink-soft so the hierarchy holds. */
  --cp-ink-faint:     #636C77;
  --cp-rule:          #dbe2e7;  /* --line */
  --cp-rule-soft:     #edf0f2;

  /* On-dark text */
  --cp-on-dark:       #F3F6FB;
  --cp-on-dark-soft:  rgba(226, 233, 244, 0.76);
  --cp-on-dark-faint: rgba(198, 212, 232, 0.68);
  --cp-rule-dark:     rgba(160, 190, 235, 0.20);

  --cp-focus:         #7FBFF5;

  /* ---- Typography ---- */
  --cp-font-display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --cp-font-sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Fluid scale — 320px to 1600px viewport */
  --cp-step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --cp-step-0:  clamp(1rem, 0.96rem + 0.19vw, 1.125rem);
  --cp-step-1:  clamp(1.15rem, 1.08rem + 0.35vw, 1.4rem);
  --cp-step-2:  clamp(1.4rem, 1.26rem + 0.68vw, 1.85rem);
  --cp-step-3:  clamp(1.75rem, 1.5rem + 1.2vw, 2.6rem);
  --cp-step-4:  clamp(2.1rem, 1.68rem + 2.05vw, 3.6rem);
  --cp-step-5:  clamp(2.6rem, 1.9rem + 3.4vw, 5rem);
  --cp-step-6:  clamp(3rem, 1.85rem + 5.6vw, 7rem);

  --cp-lh-tight:   1.06;
  --cp-lh-snug:    1.22;
  --cp-lh-normal:  1.65;

  --cp-track-wide: 0.16em;   /* eyebrows, small caps */
  --cp-track-tight: -0.022em;

  /* ---- Space ---- */
  --cp-space-2xs: 0.375rem;
  --cp-space-xs:  0.625rem;
  --cp-space-sm:  1rem;
  --cp-space-md:  1.75rem;
  --cp-space-lg:  3rem;
  --cp-space-xl:  clamp(3.5rem, 2.4rem + 5.2vw, 7rem);
  --cp-space-2xl: clamp(5rem, 3.2rem + 8.4vw, 11rem);

  /* ---- Layout ---- */
  --cp-gutter:     clamp(1.25rem, 0.85rem + 2vw, 3.5rem);
  --cp-max:        84rem;   /* full shell */
  --cp-measure:    38rem;   /* comfortable reading width */
  --cp-header-h:   clamp(5.5rem, 4.8rem + 2vw, 7.25rem);

  /* ---- Surfaces ---- */
  --cp-radius-sm: 3px;
  --cp-radius:    6px;
  --cp-radius-lg: 14px;
  --cp-shadow-sm: 0 1px 2px rgba(11, 25, 53, 0.05), 0 4px 14px rgba(11, 25, 53, 0.05);
  --cp-shadow:    0 2px 6px rgba(11, 25, 53, 0.07), 0 18px 48px rgba(11, 25, 53, 0.09);
  --cp-shadow-lg: 0 4px 12px rgba(11, 25, 53, 0.08), 0 36px 90px rgba(11, 25, 53, 0.24);
  --cp-glass:     rgba(11, 25, 53, 0.88);  /* opaque enough that nav text stays >4.5:1 over a light section */

  /* ---- Motion ---- */
  --cp-ease:        cubic-bezier(0.22, 0.61, 0.36, 1);
  --cp-ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --cp-ease-inout:  cubic-bezier(0.65, 0, 0.35, 1);
  --cp-dur-xs:  160ms;
  --cp-dur-sm:  260ms;
  --cp-dur-md:  420ms;
  --cp-dur-lg:  760ms;
  --cp-dur-xl:  1100ms;
  --cp-stagger: 90ms;

  --cp-z-nav: 100;
  --cp-z-overlay: 200;
  --cp-z-cursor: 9999;
}

/* Motion is opt-out at the token level, so every animation that reads these
   values collapses at once rather than each needing its own guard. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --cp-dur-xs: 1ms;
    --cp-dur-sm: 1ms;
    --cp-dur-md: 1ms;
    --cp-dur-lg: 1ms;
    --cp-dur-xl: 1ms;
    --cp-stagger: 0ms;
  }
}
