/* ==========================================================================
   1 Poultry — design tokens
   Source of truth: Figma "1Poultry - Website" (file NXXE41JbmzVpedmPum8QQ9)
   Design frame width: 1440px
   ========================================================================== */

:root {
  /* ---- Brand colour ---- */
  --c-cream:        #FCF1E8;
  --c-cream-70:     rgba(252, 241, 232, 0.70);
  --c-cream-40:     rgba(252, 241, 232, 0.40);
  --c-cream-15:     rgba(252, 241, 232, 0.15);

  --c-black:        #101010;   /* footer / dark sections */
  --c-black-true:   #000000;   /* menu overlay, enquire */
  --c-white:        #FFFFFF;
  --c-white-70:     rgba(255, 255, 255, 0.70);
  --c-white-40:     rgba(255, 255, 255, 0.40);
  --c-white-15:     rgba(255, 255, 255, 0.15);


  /* Extended palette — sampled from the page artwork in Figma and promoted
     here once a second page needed the same value. */
  --c-claret:    #760E28;   /* "Built to Last" / History timeline panels */
  --c-coral:     #FA7C7C;   /* Innovation statistic figures             */
  --c-ink-navy:  #0E1238;   /* Landing location band                    */
  --c-ink-blue:  #110E23;   /* Innovation social panel                  */
  --c-paper:     #F2F1F0;

  /* Menu / accent gradient ramp (sampled from the Figma menu type fills) */
  --c-blush:        #F9B1AF;
  --c-rose:         #D95467;
  --c-plum:         #77244D;
  --c-indigo:       #141342;
  --c-navy:         #020E29;

  --grad-menu: linear-gradient(97deg,
                 var(--c-blush)  10%,
                 var(--c-rose)   24%,
                 var(--c-plum)   36%,
                 var(--c-indigo) 45%,
                 var(--c-navy)   58%);

  /* Full-bleed image scrims used on every hero / interstitial */
  --grad-scrim-top:    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.00) 42%);
  --grad-scrim-bottom: linear-gradient(0deg,   rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.00) 42%);

  /* ---- Typography ----
     Poultry Sans is the brand face, self-hosted from assets/fonts/.
     The rest of the stack is only a first-paint fallback.                */
  --font-sans: "Poultry Sans", "Avenir Next", "Avenir",
               "Century Gothic", "Trebuchet MS", system-ui, sans-serif;

  /* ---- The type scale ----
     Seven steps and nothing between them. The site had drifted to twenty-four
     distinct sizes — 14, 15, 17, 21, 24, 26, 30, 35, 42, 46, 50 had all
     appeared as one-offs, each reasonable on its own and collectively noise.
     Every one of them now resolves to a step below.

     The Figma gives 55 and 25 and 16; the gap between 32 and 55 is what let
     everything in, so --fs-title fills it at 40 — the value the strays were
     already clustering around (39.9, 40, 40.3, 42).

       55  display   section headlines
       40  title     secondary headlines, large figures, rail captions
       32  lead      sub-headlines and ledes
       25  body      body copy, buttons
       20  small     secondary body, UI labels
       18  xs        small labels
       16  micro     notes, keys, footnotes

     The vw value hits the Figma size exactly at 1440px wide. */
  --fs-menu:    clamp(2.75rem, calc(7.639vw * var(--s)), 6.875rem);  /* menu overlay items      */
  --fs-display: clamp(2.125rem, calc(3.819vw * var(--s)), 3.4375rem);   /* Heading style, 55/100%  */
  --fs-title:   clamp(1.625rem, calc(2.778vw * var(--s)), 2.5rem);
  --fs-lead:    clamp(1.375rem, calc(2.222vw * var(--s)), 2rem);
  --fs-body:    clamp(1.125rem, calc(1.736vw * var(--s)), 1.5625rem);   /* Body style, 25/100%     */
  --fs-small:   clamp(1rem, calc(1.389vw * var(--s)), 1.25rem);
  --fs-xs:      clamp(0.875rem, calc(1.250vw * var(--s)), 1.125rem);
  --fs-micro:   clamp(0.75rem, calc(1.111vw * var(--s)), 1rem);

  /* One line-height per register, not per element: headings set tight,
     prose sets open, and the short UI lines in between sit at 1.3. */
  --lh-tight:   1.15;   /* matches the Figma 55px Heading style */
  --lh-snug:    1.25;
  --lh-ui:      1.30;
  --lh-body:    1.45;

  /* ---- The spacing grid ----
     Every gap, margin and section padding on the site comes from this ladder.
     Five is the base because the design's own two fixed measures — the 45px
     page margin and the 20px column gutter — are both multiples of it, and
     because the steps below then land on round numbers a person can hold in
     their head. Section padding uses 60 and up; anything inside a component
     uses 45 and down. */
  --sp-1:   0.3125rem;
  --sp-2:  0.625rem;
  --sp-3:  0.9375rem;
  --sp-4:  1.25rem;
  --sp-5:  1.875rem;
  --sp-6:  2.8125rem;
  --sp-7:  3.75rem;
  --sp-8:  5rem;
  --sp-9: 7.5rem;
  --sp-10:10rem;

  /* The vertical air above and below a stacked block section on a phone.
     Every composition on the site was drawn to its own 1440 x 1024 frame and
     carries the figure that frame asked for — 119px above the home strip,
     160 above the Location strip, 80 on the History closer, 45 on the split
     panels. Side by side on a desktop those are composition. Folded into one
     column they are just five bands in a row with five different amounts of
     air, which reads as a mistake rather than as a decision. Below 860 they
     all use this. */
  --sec-y: 3.75rem;

  /* The fit factor, as a plain number.

     Lengths are in rem and scale with the root font size, but a viewport
     unit does not — and under the old document zoom it did, because the
     whole page was scaled after the unit resolved. Multiplying every vw/vh
     term by this reproduces that exactly, so the fluid clamps land where
     they always did.

     This is only a multiplier for viewport units. Nothing converts a
     measurement with it, which is the whole difference between it and the
     --page-scale it replaces. */
  --s: 1;

  /* ---- Layout ---- */
  --page-max:   90rem;
  --pad-x:      clamp(1.25rem, calc(3.125vw * var(--s)), 2.8125rem);
  --gutter:     clamp(1rem, calc(1.389vw * var(--s)), 1.25rem);

  /* One screen tall.

     This used to divide out documentElement.style.zoom, because under zoom a
     viewport unit does not mean what it says — and engines disagreed about
     by how much, which is what put a screenful of empty page after the
     Experience carousel in Safari and a fifth of a screen under the hero.

     There is no zoom now: the design is fitted by scaling the root font
     size, so a length in rem scales and a viewport unit does not, which is
     exactly the distinction the layout wants. One screenful is one
     screenful, in every browser, with no arithmetic. */
  /* NOT multiplied by --s. Every other viewport term is, to reproduce how
     they behaved under the old document zoom; this one is the exception on
     purpose, because one screenful must be one screenful. */
  --screen-h:   100svh;
  --vh-hero:    var(--screen-h);

  /* ---- Motion ----
     One place to retune the feel of the whole site.                      */
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.30, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.50, 1);
  --ease-in-out:    cubic-bezier(0.65, 0.05, 0.36, 1);
  --ease-soft:      cubic-bezier(0.38, 0.005, 0.215, 1);

  --dur-xs:  180ms;
  --dur-sm:  320ms;
  --dur-md:  620ms;
  --dur-lg:  1000ms;
  --dur-xl:  1600ms;

  /* 0px, deliberately. A revealing element used to rise 28px into place,
     and that travel is what read as "the text repositions itself" — on
     every heading, button and list row on the site. Type fades in where it
     sits; photographs keep their own drift and zoom, which is scenery
     rather than content moving. */
  --reveal-shift: 0;
  --stagger:      90ms;

  /* ---- Depth ---- */
  --z-base:     0;
  --z-raised:   10;
  --z-menu:     100;   /* full-screen overlay sits over the page ...        */
  --z-header:   200;   /* ... but under the header, so the X stays clickable */
  --z-modal:    250;   /* lightboxes (floorplan viewer) sit over the header   */
  --z-loader:   300;
}

/* Anyone who has asked their OS to calm animation down gets a calm site. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-xs: 1ms; --dur-sm: 1ms; --dur-md: 1ms;
    --dur-lg: 1ms; --dur-xl: 1ms;
    --reveal-shift: 0; --stagger: 0ms;
  }
}


/* ==========================================================================
   Desktop: pin the fluid scale to its Figma values
   Above the mobile breakpoint the whole document is zoom-scaled by site.js,
   so the vw-based clamps would scale a second time — and Chrome resolves vw
   against the REAL viewport under zoom, not the logical one, which is what
   made spacing drift from the design. Above 860px every token is simply its
   1440 Figma value and the zoom does all the scaling. The fluid clamps above
   still apply below 860px, where the layout stacks and zoom is off.
   ========================================================================== */
/* Below the fold-down the smallest step is 13, not 12. Twelve is a desktop
   label size — a caption sitting beside 25px body copy on a 1440 board — and
   on a phone, where everything around it has already come down a step, it
   reads as broken rather than as small. Nothing on the site sets type below
   this token. */
@media (max-width: 860px) {
  :root { --fs-micro: 0.8125rem; }
}

@media (min-width: 861px) {
  :root {
    --fs-menu:    6.875rem;
    --fs-display:  3.4375rem;
    --fs-title:    2.5rem;
    --fs-lead:     2rem;
    --fs-body:     1.5625rem;
    --fs-small:    1.25rem;
    --fs-xs:       1.125rem;
    --fs-micro:    1rem;
    --pad-x:       2.8125rem;
    --gutter:      1.25rem;
  }
}
