/* =============================================================
   AFFAF PRINTERS | DESIGN TOKENS
   The only stylesheet permitted to hold raw values.
   Every other file consumes these custom properties.
   Themes are driven by a data-theme attribute on <html>,
   set before first paint by the inline script in <head>.
   ============================================================= */

:root {

  /* ---------------------------------------------------------
     1. Fixed brand colours, identical in both themes
     --------------------------------------------------------- */
  --ink:      #0B1F3A;   /* navy, used full bleed for bands and footer */
  --crimson:  #C1121F;
  --crimson-hover: #A00E19;

  /* CMYK signature colours, for the stripe and the logo dots */
  --cyan:     #00AEEF;
  --magenta:  #EC008C;
  --yellow:   #FFF100;
  --key:      #111111;

  --whatsapp: #25D366;

  /* Colours that sit on a navy band in both themes */
  --on-ink:        #FFFFFF;
  --on-ink-muted:  #C9D3E6;   /* 11.0:1 on navy */
  --on-ink-line:   rgba(255, 255, 255, 0.18);

  /* ---------------------------------------------------------
     2. Typography
     --------------------------------------------------------- */
  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Headings are the hero of this site: big, heavy, confident */
  --fs-display: clamp(2.75rem, 1.30rem + 4.11vw, 5rem);      /* 44 to 80 */
  --fs-h1:      clamp(2.25rem, 1.55rem + 3.05vw, 3.75rem);   /* 36 to 60 */
  --fs-h2:      clamp(1.75rem, 1.30rem + 1.95vw, 2.75rem);   /* 28 to 44 */
  --fs-h3:      clamp(1.375rem, 1.20rem + 0.75vw, 1.75rem);  /* 22 to 28 */
  --fs-stat:    clamp(2.25rem, 1.90rem + 1.55vw, 3rem);      /* 36 to 48 */

  /* Hero headline. Sized so the two lines hold and the headline
     keeps clear air on the right at every width. See CLAUDE.md 11.1. */
  --fs-hero:    clamp(1.375rem, 0.47rem + 4.20vw, 4.25rem);  /* 22 to 68 */
  --fs-hero-2:  clamp(1.125rem, 0.50rem + 2.60vw, 3rem);     /* 18 to 48 */

  --fs-lead:    clamp(1.0625rem, 1.00rem + 0.28vw, 1.25rem); /* 17 to 20 */
  --fs-statement: 1.25rem;   /* 20, footer statement */
  --fs-card:    1.25rem;     /* 20, card title */
  --fs-contact: 1.125rem;    /* 18, phone and email */
  --fs-body:    1rem;        /* 16 */
  --fs-nav:     0.9375rem;   /* 15 */
  --fs-sm:      0.875rem;    /* 14 */
  --fs-label:   0.75rem;     /* 12, uppercase labels */

  --lh-display: 1.05;
  --lh-heading: 1.12;
  --lh-snug:    1.35;
  --lh-body:    1.6;

  --ls-display: -0.02em;
  --ls-logo:    -0.03em;
  --ls-body:     0em;
  --ls-label:    0.16em;
  --ls-stat:     0.14em;
  --ls-logo-sub: 0.18em;

  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;
  --fw-heavy:    800;

  /* ---------------------------------------------------------
     3. Spacing scale, 4px base
     --------------------------------------------------------- */
  --space-1:  0.25rem;   /*   4px */
  --space-2:  0.50rem;   /*   8px */
  --space-3:  0.75rem;   /*  12px */
  --space-4:  1.00rem;   /*  16px */
  --space-5:  1.25rem;   /*  20px */
  --space-6:  1.50rem;   /*  24px */
  --space-7:  2.00rem;   /*  32px */
  --space-8:  2.50rem;   /*  40px */
  --space-9:  3.00rem;   /*  48px */
  --space-10: 3.50rem;   /*  56px */
  --space-11: 4.00rem;   /*  64px */
  --space-12: 5.00rem;   /*  80px */
  --space-13: 6.00rem;   /*  96px */
  --space-14: 7.00rem;   /* 112px */
  --space-15: 8.00rem;   /* 128px */
  --space-16: 10.0rem;   /* 160px */

  --section-y: clamp(4rem, 6vw, 7rem);

  /* ---------------------------------------------------------
     4. Radius scale
     --------------------------------------------------------- */
  --radius-xs:    4px;
  --radius-btn:   8px;
  --radius-card: 12px;
  --radius-tile: 14px;   /* CMYK icon tile */
  --radius-lg:   16px;
  --radius-xl:   20px;   /* the wide sister company card */
  --radius-pill: 999px;

  /* ---------------------------------------------------------
     5. Fixed sizes
     --------------------------------------------------------- */
  --header-h:  72px;
  --control-h: 44px;   /* toggle and buttons in the header */
  --logo-h:    28px;   /* wordmark height in the header */
  --logo-h-lg: 40px;   /* wordmark height in the footer */
  --stripe-h:   3px;   /* the four colour signature stripe */
  --tile:      56px;   /* icon tile */
  --tile-icon: 28px;   /* the filled glyph inside it */

  /* ---------------------------------------------------------
     6. Motion
     --------------------------------------------------------- */
  --dur-fast: 140ms;
  --dur-base: 220ms;
  --dur-slow: 420ms;
  --ease-out:      cubic-bezier(0.22, 0.85, 0.24, 1);
  --ease-emphasis: cubic-bezier(0.34, 1.32, 0.50, 1);
  --ease-in-out:   cubic-bezier(0.45, 0, 0.55, 1);
  --ease-rise:     cubic-bezier(0.2, 0.8, 0.2, 1);   /* hero words rising out of their masks */

  /* ---------------------------------------------------------
     7. Z-index scale
     --------------------------------------------------------- */
  --z-base:    1;
  --z-raised: 10;
  --z-float:  60;
  --z-header: 80;
  --z-menu:  100;
  --z-skip:  200;

  /* ---------------------------------------------------------
     8. Layout widths
     --------------------------------------------------------- */
  --container:        1200px;
  --container-wide:   1400px;
  --container-narrow:  720px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --hairline: 1px;
  --rule:     2px;

}

/* =============================================================
   LIGHT THEME, the default on every first visit
   ============================================================= */
:root,
[data-theme="light"] {
  color-scheme: light;

  --bg:          #FFFFFF;
  --bg-alt:      #F4F6FA;
  --surface:     #FFFFFF;
  --text:        #0B1F3A;   /* 16.5:1 on white */
  --text-muted:  #4A5875;   /*  7.2:1 on white */
  --line:        #E3E8F0;

  --accent:       var(--crimson);
  --accent-hover: var(--crimson-hover);
  --accent-text:  var(--crimson);   /* 5.9:1 on white */
  --text-on-accent: #FFFFFF;

  --focus-ring: var(--crimson);
  --selection-bg: rgba(193, 18, 31, 0.18);

  /* The key segment of the stripe, the key logo dot and the key tile */
  --key-print: var(--key);
  --key-glyph: #FFFFFF;

  --success: #146B3A;
  --danger:  #A81420;

  /* Full bleed navy band. Light theme uses the ink navy flat. */
  --band-ink-bg: var(--ink);
  --band-ink-border: transparent;

  /* Card edge. Flat in light, a soft gradient in dark. */
  --card-border-top: var(--line);
  --card-border-bottom: var(--line);

  /* Solid navy button, used once on the sister company card */
  --btn-ink-bg: var(--ink);
  --btn-ink-fg: #FFFFFF;

  /* Hero ground: gradient, halftone screen and CMYK bloom */
  --halftone-ink: rgba(11, 31, 58, 0.04);
  --bloom-opacity: 0.08;

  --shadow-1: 0 1px 2px rgba(11, 31, 58, 0.06);
  --shadow-2: 0 4px 10px rgba(11, 31, 58, 0.08),
              0 12px 28px rgba(11, 31, 58, 0.08);
  --shadow-3: 0 8px 20px rgba(11, 31, 58, 0.10),
              0 24px 56px rgba(11, 31, 58, 0.12);

  --header-bg: rgba(255, 255, 255, 0.92);

  /* Ring that keeps the WhatsApp button off any ground it sits on */
  --wa-ring: #FFFFFF;
}

/* =============================================================
   DARK THEME, only ever reached by a saved choice
   ============================================================= */
[data-theme="dark"] {
  color-scheme: dark;

  /* Neutral charcoal, so the CMYK colours carry the page */
  --bg:          #0B0B0F;
  --bg-alt:      #111117;
  --surface:     #16161E;
  --text:        #F5F5F7;   /* 17.4:1 on bg */
  --text-muted:  #A0A3AD;   /*  7.8:1 on bg */
  --line:        #26262F;

  --accent:       var(--crimson);
  --accent-hover: var(--crimson-hover);
  /* The same crimson, lifted only where it has to carry text,
     because #C1121F on this ground is 2.7:1 and fails AA */
  --accent-text:  #FF5A63;   /* 6.4:1 on bg, 5.6:1 on surface */
  --text-on-accent: #FFFFFF;

  --focus-ring: #FF5A63;
  --selection-bg: rgba(255, 90, 99, 0.28);

  /* Key black would vanish on this ground, so the key segment and
     the key logo dot invert. The mark still reads as four colours. */
  --key-print: #FFFFFF;
  --key-glyph: var(--ink);

  --success: #4ADE80;
  --danger:  #FF7A82;

  /* The navy bands become charcoal so they sit in the same family,
     with hairlines top and bottom to separate them from the page */
  --band-ink-bg: #12121A;
  --band-ink-border: var(--line);

  /* Card edge is a soft vertical gradient on the dark ground */
  --card-border-top: #2A2A36;
  --card-border-bottom: #1A1A22;

  --btn-ink-bg: var(--text);
  --btn-ink-fg: var(--ink);

  --halftone-ink: rgba(245, 245, 247, 0.05);
  --bloom-opacity: 0.14;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.40);
  --shadow-2: 0 4px 10px rgba(0, 0, 0, 0.46),
              0 12px 28px rgba(0, 0, 0, 0.40);
  --shadow-3: 0 8px 20px rgba(0, 0, 0, 0.52),
              0 24px 56px rgba(0, 0, 0, 0.46);

  --header-bg: rgba(7, 13, 26, 0.92);

  --wa-ring: var(--surface);
}
