/* ==========================================================================
   TOKENS — the single source of truth for colour, type, space and motion.

   BRAND SYSTEM — BeamPark Properties
   ----------------------------------
   One dark (navy, taken from the logo), two light grounds (ivory, sand), one
   ink for text, and gold as the only accent — the swoosh under the logo mark.
   Two typefaces: Cormorant Garamond for headings, Manrope for everything else.

   Rules the rest of the stylesheets follow:
     · Grounds are ivory, sand or navy. Never pure white, never a third tint.
     · Text on light is ink (body) or navy (headings); muted text is slate.
     · Text on navy or on a photo is ivory; muted text there is mist.
     · Gold is for accents only: eyebrows, rules, active states, the cursor.
       On light grounds small gold text uses --c-gold-ink (it passes 4.5:1).
     · Serif only at heading sizes (≥ 20px) and never for data — phone
       numbers, addresses, form text and labels are always Manrope.
   ========================================================================== */

:root {

  /* ------------------------------------------------------------------ */
  /* 1. COLOUR                                                           */
  /* ------------------------------------------------------------------ */

  /* Brand */
  --c-navy:         #173e62;   /* brand — dark grounds, headings, buttons     */
  --c-navy-deep:    #0f2c48;   /* hover / pressed on navy, deep panels        */
  --c-ink:          #13283d;   /* body text on light grounds        13.8:1    */
  --c-slate:        #56636f;   /* muted text on light grounds  5.7:1 / 5.0:1  */

  /* Grounds */
  --c-ivory:        #f8f5ef;   /* page ground; text colour on dark            */
  --c-sand:         #ede6da;   /* panels, cards, tinted plates                */
  --c-sand-deep:    #e1d8c8;   /* map ground, hairlines on sand               */
  --c-white:        #ffffff;   /* reserved — not used for grounds             */

  /* Accent — the logo's gold, toned down for print-like restraint */
  --c-gold:         #d0ad67;   /* on navy / photos: rules, icons, active 5.3:1 */
  --c-gold-ink:     #7f5f28;   /* small gold text on ivory or sand      4.7:1 */

  /* On dark */
  --c-mist:         #b8c4cf;   /* muted text on navy                    6.2:1 */

  /* Scrim — the one colour every photo overlay is mixed from, so a gradient
     over a render reads as shade, not as a second tint. */
  --scrim:          11 25 40;  /* rgb() channels of a navy-black            */

  /* Semantic aliases — components reference these. */
  --bg-page:        var(--c-ivory);
  --bg-panel:       var(--c-sand);
  --bg-dark:        var(--c-navy);

  --fg-default:     var(--c-ink);
  --fg-title:       var(--c-navy);
  --fg-muted:       var(--c-slate);
  --fg-accent:      var(--c-gold-ink);
  --fg-on-dark:     var(--c-ivory);
  --fg-muted-dark:  var(--c-mist);
  --fg-accent-dark: var(--c-gold);

  --rule:           color-mix(in srgb, var(--c-ink) 14%, transparent);
  --rule-strong:    color-mix(in srgb, var(--c-ink) 32%, transparent);
  --rule-on-dark:   color-mix(in srgb, var(--c-ivory) 24%, transparent);
  --focus-ring:     var(--c-gold);

  /* Depth — layered and navy-tinted, never a flat black drop. */
  --shadow-card:    0 1px 2px rgb(var(--scrim) / .06), 0 12px 32px rgb(var(--scrim) / .10);
  --shadow-float:   0 2px 4px rgb(var(--scrim) / .08), 0 24px 56px rgb(var(--scrim) / .18);

  /* LEGACY ALIASES — the palette the site was cloned with (brown, cream,
     terracotta, olive, tan). The inner pages still reference these names, so
     each one now resolves to its counterpart in the brand system instead of
     to its old colour. Do not use them in new code; they go once every page
     is migrated. */
  --c-brown:        var(--c-navy);
  --c-brown-deep:   var(--c-navy-deep);
  --c-brown-alt:    var(--c-navy);
  --c-cream:        var(--c-ivory);
  --c-cream-light:  var(--c-sand);
  --c-off-white:    var(--c-ivory);
  --c-terracotta:   var(--c-gold-ink);
  --c-terracotta-2: var(--c-gold);
  --c-terracotta-3: var(--c-gold-ink);
  --c-tan:          var(--c-sand);
  --c-tan-2:        var(--c-sand-deep);
  --c-tan-3:        var(--c-sand-deep);
  --c-olive:        var(--c-navy);
  --c-olive-2:      var(--c-navy);
  --c-olive-3:      var(--c-navy);
  --c-olive-dark:   var(--c-navy-deep);
  --c-black:        #000000;
  --c-overlay:      rgb(var(--scrim) / .30);
  --c-shadow-sm:    rgb(var(--scrim) / .15);
  --c-shadow-md:    rgb(var(--scrim) / .20);
  --bg-band:        var(--c-ivory);
  --bg-nature:      var(--c-navy);
  --bg-interior:    var(--c-sand);
  --fg-on-nature:   var(--c-ivory);


  /* ------------------------------------------------------------------ */
  /* 2. TYPEFACE                                                         */
  /* ------------------------------------------------------------------ */

  /* Two families, loaded from Google Fonts in each page's <head>:
       Cormorant Garamond 500/600 (+500 italic) — headings, figures, marquees
       Manrope 400–700                          — text, labels, buttons, data */
  --font-display: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --font-body:    'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-serif:   var(--font-display);   /* legacy name, same face */
  --font-stretch-display: normal;        /* neither face has a width axis */

  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semi:    600;
  --fw-bold:    700;

  /* ---- Type scale ------------------------------------------------------
     Nine steps. Fluid between a 360 phone and a 1920 desktop, where the
     layout stops growing. Approximate values at 1440:
       display 144 · h1 78 · h2 63 · h3 46 · h4 32 · h5 23
       lead 19 · body 17 · small 14 · label 12                            */

  /* Display — marquee words */
  --fs-display-xl: clamp(72px, 13vw,  240px);
  --fs-display-lg: clamp(56px, 10vw,  192px);

  /* Headings — Cormorant Garamond */
  --fs-h1:  clamp(44px, 5.4vw,  104px);   /* hero statements            */
  --fs-h2:  clamp(36px, 4.4vw,   84px);   /* section titles             */
  --fs-h3:  clamp(30px, 3.2vw,   60px);   /* panel / feature titles     */
  --fs-h4:  clamp(24px, 2.2vw,   40px);   /* sub-heads, figures         */
  --fs-h5:  clamp(20px, 1.6vw,   28px);   /* card titles                */

  /* Text — Manrope */
  --fs-lead:  clamp(17px, 1.3vw,  22px);  /* intro paragraphs           */
  --fs-text:  clamp(15px, 1.15vw, 18px);  /* body copy                  */
  --fs-small: clamp(13px, 0.95vw, 15px);  /* captions, legends, notes   */
  --fs-label: clamp(12px, 0.85vw, 14px);  /* uppercase labels, buttons  */
  --fs-legal: 12px;                       /* consent, copyright         */

  /* Old step names, folded onto the scale above so every reference lands
     on one of the nine sizes. */
  --fs-h2s:     var(--fs-h2);
  --fs-h3s:     var(--fs-h3);
  --fs-h6:      var(--fs-h5);
  --fs-body-xl: var(--fs-lead);
  --fs-body-lg: var(--fs-text);
  --fs-body-md: var(--fs-text);
  --fs-body:    var(--fs-text);
  --fs-ui-lg:   var(--fs-small);
  --fs-ui:      var(--fs-small);
  --fs-micro:   var(--fs-label);
  --fs-serif-statement: var(--fs-h4);

  /* ---- Line height ---- */
  --lh-display: 0.92;
  --lh-h1:      1.0;
  --lh-h2:      1.04;
  --lh-h2-loose:1.08;
  --lh-h3:      1.1;
  --lh-stat:    1;
  --lh-card:    1.25;
  --lh-body:    1.65;
  --lh-list:    1.6;
  --lh-tight:   1;

  /* ---- Letter spacing ----
     The serif wants only a touch of negative tracking at size; Manrope runs
     at normal tracking for text and opens up for uppercase labels. */
  --ls-display:  -0.02em;
  --ls-h1:       -0.02em;
  --ls-h2:       -0.018em;
  --ls-h2s:      -0.018em;
  --ls-h3:       -0.015em;
  --ls-stat:     -0.01em;
  --ls-card:     -0.01em;
  --ls-body-lg:   0;
  --ls-body:      0;
  --ls-label:     0.14em;
  --ls-none:      0;


  /* ------------------------------------------------------------------ */
  /* 3. LAYOUT  [SPEC §3.4]                                              */
  /* ------------------------------------------------------------------ */

  --bp-xs:      480px;
  --bp-sm:      640px;
  --bp-md:      960px;
  --bp-lg:      1200px;
  --bp-xl:      1600px;

  /* Container.
     The original centres a fixed artboard per breakpoint (1200/960/640/480/320)
     with 20px inner margins, and above 1200 zooms the whole board by vw/1200.
     Reproducing that proportionally — rather than §3.4's flat 1200px cap — is
     what keeps the rebuild 1:1 at 1440: capping the column while letting type
     grow would rewrap every paragraph. Each value below is contentWidth /
     artboardWidth for that breakpoint. Growth stops at a 1920 viewport.
     Overridden per breakpoint in base.css. */
  --container:  min(96.667vw, 1856px);   /* 1160/1200 — 1160px at 1200 exactly */
  --gutter:     0px;                     /* the vw fraction already is the gutter */
  --grid-cols:  12;
  --grid-gap:   20px;                /* [SPEC §3.4] */

  /* Vertical rhythm — 1200 px reference values, fluid like the type. */
  --sp-3xs: clamp(4px,   0.333vw,   6px);   /* D=4   */
  --sp-2xs: clamp(8px,   0.667vw,  13px);   /* D=8   */
  --sp-xs:  clamp(12px,  1.25vw,   24px);   /* D=15  */
  --sp-sm:  clamp(16px,  1.667vw,  32px);   /* D=20  */
  --sp-md:  clamp(24px,  2.5vw,    48px);   /* D=30  */
  --sp-lg:  clamp(32px,  3.333vw,  64px);   /* D=40  */
  --sp-xl:  clamp(48px,  5vw,      96px);   /* D=60  */
  --sp-2xl: clamp(64px,  6.667vw, 128px);   /* D=80  */
  --sp-3xl: clamp(80px, 10vw,     192px);   /* D=120 */

  /* The gap one section leaves before the next begins — the rhythm of the
     page. Used at the open and close of every light reading section. */
  --section-gap: clamp(88px, 10vw, 176px);


  /* ------------------------------------------------------------------ */
  /* 4. RADII & BORDERS  [SPEC §3.3]                                     */
  /* ------------------------------------------------------------------ */

  /* Three radii only: square photography, one soft corner for floating UI
     (panels, cards, inset media), and the pill for buttons and round icons. */
  --r-0:      0px;      /* photography, full-bleed bands */
  --r-card:   12px;     /* floating panels, inset media, image cards */
  --r-sm:     8px;      /* rows inside a panel */
  --r-lg:     100px;
  --r-pill:   3000px;   /* pill buttons */

  --bw-hair:  1px;
  --bw-rule:  2px;


  /* ------------------------------------------------------------------ */
  /* 5. MOTION  [SPEC §3.3 / §5]                                         */
  /* ------------------------------------------------------------------ */

  /* CSS easings & durations */
  --ease-css:  cubic-bezier(.22, 1, .36, 1);
  --ease-in:   cubic-bezier(.55, .085, .68, .53);
  --dur-fast:  .3s;
  --dur-base:  .6s;
  --dur-slow:  1s;

  /* GSAP eases — read by the JS modules so timings live in one place.
     Strings, not CSS values: consumed via getComputedStyle in js/motion.js. */
  --gsap-ease-out:   power3.out;
  --gsap-ease-in:    power2.in;
  --gsap-ease-lin:   linear;

  /* Named durations used by the JS modules [SPEC §5, §7] — seconds. */
  --d-charrise:      1;      /* §5.1 char rise duration      */
  --d-charrise-step: 0.05;   /* §5.1 stagger.each            */
  --d-marquee:       15;     /* §5.5 loop, desktop           */
  --d-marquee-sm:    10;     /* §8   loop, <640px            */
  --d-cursor:        0.5;    /* §5.6 follow lag              */
  --d-nav-in:        0.6;    /* §5.7 sticky reveal in        */
  --d-nav-out:       0.4;    /* §5.7 sticky reveal out       */
  --d-menu-step:     0.06;   /* §7.2 menu item stagger       */
  --d-popup:         0.4;    /* §7.3 modal fade + rise       */
  --d-tab:           0.35;   /* §7.4 panel crossfade         */
  --d-entrance:      0.9;    /* §5.8 generic entrance        */
  --d-page-leave:    0.5;    /* §5.9 page transition out     */



  /* ------------------------------------------------------------------ */
  /* 6. STACKING                                                         */
  /* ------------------------------------------------------------------ */

  --z-base:      0;
  --z-raised:    1;
  --z-hotspot:   5;
  /* Above the home page's About section (995), which rises over the dive:
     at 100 the sticky bar slid in *underneath* it, so for the whole of that
     section the Menu button was hidden and a tap landed on the About panel.
     Still below the menu and popups. (Hidden during the dive itself.) */
  --z-sticky:    996;
  --z-header:    200;
  /* Above the dive layers, which are authored at 991-995 from the source's
     own z-order. At 500 the menu opened *underneath* them: near the top of a
     phone the dive's line is already a tall bar and cut straight through the
     open menu. Popups stay above the menu, as they were. */
  --z-menu:      1000;
  --z-popup:     1100;
  --z-progress:  900;
  --z-cursor:    9999;   /* [SPEC §5.6] */
}


/* ==========================================================================
   REDUCED MOTION  [SPEC §9]
   Collapse every duration to zero; the JS modules read prefers-reduced-motion
   directly and skip §5.1–5.6 entirely, leaving static end-states.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0s;
    --dur-base: 0s;
    --dur-slow: 0s;
  }
}
