/* ==========================================================================
   BBCB DESIGN TOKENS (v2)
   --------------------------------------------------------------------------
   The single source for colours, type, spacing, radii, shadows and motion.
   - Every token from the approved prototype keeps its name and value.
   - Type and section spacing are now fluid: each clamp() runs from the
     prototype's mobile value (at 360px) to its desktop value (at 1440px).
   - New in v2: gold accent, elevation scale, motion, contrast-safe variants.
   `wp bbcb setup` copies the colours and fonts into Elementor's Site Settings.
   The first :root block is read by PHP (bbcb_tokens()), so keep it one
   declaration per token.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts: self-hosted, SIL Open Font License. latin-ext carries the cedi sign.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/poppins-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/poppins-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/poppins-800-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/poppins-800-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Inter is a variable font: one file per subset covers weights 400 to 600. */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/inter-variable-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/inter-variable-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand colours (prototype, unchanged) */
  --color-primary: #0878F9;
  --color-primary-strong: #0A6CE6;
  --color-primary-dark: #0558C4;
  --color-navy: #071F49;
  --color-footer: #041B3A;
  --color-accent: #12A4FF;
  --color-surface-pale: #EAF5FF;
  --color-bg-light: #F7FAFE;
  --color-white: #FFFFFF;
  --color-text: #253653;
  --color-text-muted: #5A6A85;
  --color-border: #E4EDF8;

  /* Supporting colours (prototype, unchanged) */
  --color-blue-deep: #0A4FC4;
  --color-blue-night: #0B2F7A;
  --color-error: #C62828;
  --color-success: #1B7F4B;
  --color-success-bg: #E8F6EE;
  --color-placeholder: #B45309;
  --color-placeholder-bg: #FFF4E5;

  /* v2: gold accent. Only for the "Since 1983" mark, trust badges and one highlight per page. */
  --color-gold: #D4A537;
  --color-gold-strong: #8F6A12;
  --color-gold-deep: #7A5A0E;
  --color-gold-soft: #FBF3DF;

  /* v2: contrast-safe companions (audit V5 and A1) */
  --color-highlight-on-blue: #CFEAFF;
  --color-input-placeholder: #5A6A85;

  /* v2: form fields and status boxes (the prototype's values, now named) */
  --color-input-border: #D3E1F2;
  --color-success-border: #A7D9BC;
  --color-error-bg: #FDEEEE;
  --color-error-border: #F2B8B8;

  /* Gradients (prototype, unchanged) */
  --gradient-blue: linear-gradient(135deg, #0A6CE6 0%, #0878F9 55%, #12A4FF 100%);
  --gradient-icon: linear-gradient(140deg, #2DB0FF 0%, #0878F9 100%);
  --gradient-strip: linear-gradient(90deg, #0A4FC4 0%, #0878F9 60%, #12A4FF 100%);

  /* v2: gradients that keep white text at 4.5:1 or better along their whole length */
  --gradient-blue-strong: linear-gradient(135deg, #0B2F7A 0%, #0A4FC4 48%, #0A6CE6 100%);
  --gradient-strip-strong: linear-gradient(90deg, #0A4FC4 0%, #0A5FD8 60%, #0A6CE6 100%);
  --gradient-navy: linear-gradient(160deg, #071F49 0%, #041B3A 100%);

  /* v2: soft light patches laid over blue sections so they do not look flat */
  --mesh-on-blue: radial-gradient(60% 80% at 88% 8%, rgb(18 164 255 / 28%) 0%, rgb(18 164 255 / 0%) 70%), radial-gradient(50% 70% at 6% 96%, rgb(255 255 255 / 9%) 0%, rgb(255 255 255 / 0%) 70%);

  /* Typography */
  --font-heading: "Poppins", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  /* Type scale: fluid from the prototype's mobile size to its desktop size */
  --fs-display: clamp(2.5rem, 1.9167rem + 2.5926vw, 4.25rem);
  --fs-h1: clamp(2.125rem, 1.75rem + 1.6667vw, 3.25rem);
  --fs-h2: clamp(1.75rem, 1.4583rem + 1.2963vw, 2.625rem);
  --fs-h3: clamp(1.1875rem, 1.125rem + 0.2778vw, 1.375rem);
  --fs-h4: 1.125rem;
  --fs-lead: clamp(1rem, 0.9583rem + 0.1852vw, 1.125rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-xsmall: 0.8125rem;
  --fs-eyebrow: 0.8125rem;

  --lh-tight: 1.08;
  --lh-heading: 1.18;
  --lh-body: 1.65;

  /* Spacing scale (prototype, unchanged) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 88px;
  --space-10: 120px;

  --section-pad-y: clamp(56px, 42.667px + 3.7037vw, 96px);
  --container-max: 1200px;
  --gutter: clamp(16px, 13.333px + 0.7407vw, 24px);
  --header-height: 88px;

  /* v2: site header and overlays (Stage 3) */
  --header-height-compact: 68px;
  --utility-height: 44px;
  --color-frost: rgb(255 255 255 / 86%);
  --z-header: 100;
  --z-overlay: 200;

  /* Radii (prototype, unchanged) */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* v2: elevation scale. Levels 2 to 4 are the prototype's three shadows. */
  --elevation-1: 0 1px 2px rgb(7 31 73 / 6%), 0 2px 6px rgb(7 31 73 / 4%);
  --elevation-2: 0 8px 28px rgb(7 31 73 / 8%);
  --elevation-3: 0 14px 36px rgb(7 31 73 / 13%);
  --elevation-4: 0 18px 48px rgb(7 31 73 / 12%);
  --elevation-5: 0 32px 72px rgb(7 31 73 / 18%);

  /* Shadows (prototype names, same values, now pointing at the scale) */
  --shadow-card: var(--elevation-2);
  --shadow-card-hover: var(--elevation-3);
  --shadow-float: var(--elevation-4);
  --shadow-button: 0 8px 20px rgb(8 120 249 / 28%);

  /* Motion */
  --transition: 0.2s ease;
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 600ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --reveal-distance: 24px;
  --reveal-stagger: 80ms;
}

/* The header is shorter on tablets and phones (prototype values). */
@media (max-width: 1024px) {
  :root {
    --header-height: 76px;
    --header-height-compact: 64px;
  }
}

@media (max-width: 767px) {
  :root {
    --header-height: 68px;
    --header-height-compact: 60px;
  }
}

/* Visitors who ask for less motion get none. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition: 0s;
    --duration-fast: 0ms;
    --duration-base: 0ms;
    --duration-slow: 0ms;
    --reveal-distance: 0px;
    --reveal-stagger: 0ms;
  }
}
