/* ==========================================================================
   ABONEX Solutions — Design Tokens
   Concept: "Editorial Precision" — warm paper, navy ink, one cyan accent.
   See DESIGN.md for the full rationale. Change values here, nowhere else.
   ========================================================================== */

:root {
  /* ---------------------------------------------------------------- COLOUR */

  /* Grounds — warm paper, never pure white */
  --paper:            #faf9f6;
  --paper-tint:       #f2f0ea;
  --paper-deep:       #eae7de;
  /* Service tile surfaces, alternating. Neither separates from --paper on its
     own (1.04-1.05:1), so both rely on the hairline border; the alternation is
     what gives the grid its rhythm. */
  --card:             #ffffff;
  --card-alt:         #edf6f7;

  /* Ink — brand navy, carried over from the ABONEX identity */
  --ink:              #101d2b;
  --ink-soft:         #18293b;
  --ink-deep:         #0a141e;

  /* Type on paper */
  --type:             #101d2b;  /* 15.7:1 on --paper  AAA */
  --type-muted:       #5e6b75;  /*  5.2:1 on --paper  AA  */
  --type-faint:       #646f78;  /*  4.9:1 on --paper, 4.5:1 on --paper-tint  AA */

  /* Hairlines — the structural system of this design */
  --hairline:         #e3dfd6;
  --hairline-strong:  #d5cfc2;
  --hairline-ink:     rgba(250, 249, 246, .14);
  --hairline-ink-str: rgba(250, 249, 246, .26);

  /* Accent — cyan lineage.
     --accent     carries ALL accent TEXT (5.6:1 on paper, AA)
     --accent-hi  is the original brand cyan: only 2.2:1 on paper, so it is
                  used for FILLS, RULES and GRAPHICS — never for text. */
  --accent:           #0c6e80;
  --accent-deep:      #09596a;
  --accent-hi:        #1fb4cc;
  --accent-wash:      rgba(31, 180, 204, .10);

  /* On navy surfaces */
  --on-ink:           #f5f3ee;  /* 15.0:1  AAA */
  --on-ink-muted:     #a8b4be;  /*  8.1:1  AA  */
  --accent-on-ink:    #3fc9df;  /*  8.6:1  AA  */

  /* CTA band. Navy on brand cyan measures 6.9:1; the softened lead tone is
     ink-deep at 82% over the band, which still clears AA at 5.6:1. */
  --band:             #1fb4cc;
  --on-band:          #101d2b;  /* 6.86:1 */
  --on-band-muted:    #0e313d;  /* 5.55:1 */
  --hairline-band:    rgba(16, 29, 43, .22);

  /* Feedback */
  --danger:           #b3261e;  /* 6.1:1 on --paper  AA */
  --danger-on-ink:    #ff9d94;
  --success:          #15803d;  /* 4.8:1 on --paper, 5.0:1 under --paper AA
                                   Was the teal accent and unused by anything;
                                   a success state that is the same colour as
                                   every other accent is not a success state. */

  --focus:            #1fb4cc;
  --selection-bg:     #1fb4cc;
  --selection-fg:     #101d2b;

  /* ------------------------------------------------------------ TYPOGRAPHY */

  --font-sans:  "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-mono:  "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Fluid scale — every size interpolates, nothing snaps at a breakpoint */
  --fs-display-xl: clamp(2.5rem, 5.2vw, 5rem);
  --fs-display-l:  clamp(2.5rem, 5.5vw, 5rem);
  --fs-display-m:  clamp(1.75rem, 3vw, 2.75rem);
  --fs-display-s:  clamp(1.375rem, 2vw, 1.75rem);
  /* Trimmed a step: the section intros read as a quiet line under the
     display heading, not a second headline competing with it. */
  --fs-lead:       clamp(1rem, 1.15vw, 1.1875rem);
  --fs-body:       1rem;
  --fs-sm:         .875rem;
  --fs-xs:         .8125rem;
  --fs-meta:       .6875rem;

  --lh-tight:   .92;
  --lh-snug:    1.08;
  --lh-normal:  1.5;
  --lh-relaxed: 1.65;

  --ls-tightest: -.04em;
  --ls-tighter:  -.03em;
  --ls-tight:    -.02em;
  --ls-normal:    0;
  --ls-meta:      .14em;
  --ls-wide:      .08em;

  /* ----------------------------------------------------------------- SPACE */

  --space-1:  .25rem;   /*  4px */
  --space-2:  .5rem;    /*  8px */
  --space-3:  .75rem;   /* 12px */
  --space-4:  1rem;     /* 16px */
  --space-5:  1.25rem;  /* 20px */
  --space-6:  1.5rem;   /* 24px */
  /* The scale used to jump 6 -> 8. An undefined var inside clamp() kills the
     whole declaration silently, and reaching for a "7" that did not exist had
     already cost one broken gap and one set of zero-padding cards. Defined so
     the gap cannot be fallen into again. */
  --space-7:  1.75rem;  /* 28px */
  --space-8:  2rem;     /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-32: 8rem;     /* 128px */
  --space-40: 10rem;    /* 160px */
  --space-48: 12rem;    /* 192px */

  --section-y:  clamp(6rem, 12vh, 11rem);
  /* Generous cap rather than a tight one: at 1440-1920 the page now runs
     effectively full-width, and the cap only engages past ~2100px to stop
     line lengths becoming unreadable on ultrawide displays. */
  --container:  2100px;
  --gutter:     clamp(1.25rem, 4vw, 7rem);
  /* Raised from the original 4.5rem when the logo gained its paper card: the
     card stands 46px tall against the old 34px mark, so the bar had only 13px
     of air above and below it and read as cramped. 6.5rem gives ~29px. */
  --nav-h:      6.5rem;
  /* Shorter bar once scrolled. Only .nav reads this; the scroll-padding and
     sticky offsets elsewhere stay on the full --nav-h, which just leaves a
     little extra clearance rather than breaking anything. */
  --nav-h-stuck: 5rem;

  /* ----------------------------------------------- RADII · SHADOW · MOTION */

  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-pill: 999px;

  --shadow-1: 0 1px 2px rgba(16, 29, 43, .04), 0 2px 8px rgba(16, 29, 43, .04);
  --shadow-2: 0 2px 4px rgba(16, 29, 43, .04), 0 12px 32px -8px rgba(16, 29, 43, .10);
  --shadow-3: 0 24px 64px -16px rgba(16, 29, 43, .18);

  --ease-out-expo:  cubic-bezier(.16, 1, .3, 1);
  --ease-out-quart: cubic-bezier(.25, 1, .5, 1);

  --dur-micro:  200ms;
  --dur-reveal: 450ms;
  --dur-hero:   700ms;

  --z-body:  1;
  --z-nav:   50;
  --z-menu:  60;
  --z-grain: 100;
}

@media (max-width: 640px) {
  :root {
    --nav-h:       5rem;
    --nav-h-stuck: 4.25rem;
  }
}
