/* ==========================================================================
   1 Poultry — Experience
   Figma: "Experience - Desktop" (321:22072), 1440 x 3576
   Three composed blocks, each one Figma screen:
     1. full-bleed hero              321:22073 + 321:22076   1440 x 1024
     2. "Component 8"                321:22078               1440 x  932
        — a scroll-locked sequence: the caption on the left changes to match
          each image arriving on the right. Six variants in the Figma
          component set (297:18302) give the six caption/image pairs.
     3. closing full-bleed CTA band  321:22081               1440 x 1024
   All three sit in .screen / .screen__stage so a whole block always fits one
   screenful — the shared fit-to-screen contract in components.css + site.js.
   ========================================================================== */


/* ---------- 1. Hero (321:22073 image + 321:22076 tagline) ------------- */
.exp-hero { min-height: var(--vh-hero); }

/* Overscan the bed so the parallax has somewhere to travel */
.exp-hero .bleed__media,
.exp-cta  .bleed__media { inset: -8% 0; }

/* Figma lays a near-even 40% black over the whole plate (its two "Gradient"
   rects overlap across the full height); base.css's .bleed scrims are
   edge-weighted. This fills the middle so the two together land on the
   Figma's density and the cream type reads at any crop. */
.exp-wash {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg,
                rgba(0, 0, 0, 0.00)  0%,
                rgba(0, 0, 0, 0.42) 40%,
                rgba(0, 0, 0, 0.42) 60%,
                rgba(0, 0, 0, 0.00) 100%);
}

/* Both bleed blocks compose on the Figma 1440 x 1024 board. The stage is
   scaled by --fit (site.js), so type inside it is set at the Figma px size
   and never at a vw size — otherwise it would scale twice. */
.exp-hero__stage,
.exp-cta__stage {
  display: grid;
  place-items: center;
}

.exp-hero__title {
  font-size: var(--fs-display);                /* Figma Heading, 55/100% */
  line-height: var(--lh-tight);
  max-width: 40.25rem;               /* Figma tagline box */
  margin-inline: auto;
}


/* ---------- 2. Scroll-locked sequence ("Component 8", 321:22078) ------
   Base (and phone) layout is a plain stacked list of caption + image pairs.
   From 861px up the pairs stack in one 1440 x 932 board and the page script
   pins the frame and scrubs through them. Reduced motion drops back to the
   stacked list at every width, at the bottom of this file.               */
.exp-seq {
  position: relative;
  background: var(--c-cream);
  color: var(--c-black);
}

/* The scroll lock. .is-seq and --seq-screens are set by the page script
   once it is actually driving the sequence, so with the script off (or
   below 861px, or at reduced motion) this block simply does not apply and
   the stacked list is what renders.

   Sticky rather than a ScrollTrigger pin: the document carries a whole-page
   scale, and a pin's spacer is added in unscaled pixels inside that scaled
   document, so the frame drifted by the scale factor on every screenful.
   Sticky is laid out with everything else, so it holds. */
.exp-seq.is-seq { height: calc(var(--seq-screens, 6) * var(--screen-h)); }
.exp-seq.is-seq .exp-seq__frame {
  position: sticky;
  top: 0;
  height: var(--screen-h);
}

.exp-seq__frame {
  background: var(--c-cream);
  padding-block: clamp(3.75rem, calc(5.5556vw * var(--s)), 5rem);
  padding-inline: var(--pad-x);
}

/* The pinned sequence needs a real board to lay out against: the caption
   column left, the plate right, both vertically centred. .screen__stage used
   to carry height: var(--stage-h); it no longer does, so the stage collapsed
   to 0 and the captions floated ~130px above their images. */
.exp-seq__frame.screen { padding-block: 0; }
.exp-seq__stage {
  --stage-w: 90rem;
  width: 100%;
  max-width: 90rem;
  height: min(58.25rem, 100%);       /* Figma "Component 8" board */
}

/* Nothing above 860: the pinned sequence lays the items out itself and the
   wrapper must not become a box in the middle of it. */
.exp-seq__viewport { display: contents; }
.exp-seq__nav { display: none; }

.exp-seq__items {
  display: grid;
  gap: clamp(2.8125rem, calc(4.1667vw * var(--s)), 3.75rem);
  max-width: 61.25rem;
  margin-inline: auto;
}

.exp-seq__figure {
  display: flex;
  flex-direction: column;
  gap: clamp(0.9375rem, calc(1.3889vw * var(--s)), 1.25rem);
}

.exp-seq__caption {
  order: -1;                      /* caption reads above its image */
  font-size: clamp(1.375rem, calc(2.222vw * var(--s)), 2rem);
  line-height: var(--lh-snug);
  text-align: center;
  max-width: 24ch;
  margin-inline: auto;
}

.exp-seq__plate {
  position: relative;
  overflow: hidden;
  aspect-ratio: 864 / 624;        /* Figma plate 864 x 623.7 */
  background: rgba(16, 16, 16, 0.06);
}
.exp-seq__plate img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 861px) {
  /* .screen holds the frame to one screenful itself now; all that is left
     to do here is drop the stacked layout's padding so the 932px stage has
     the whole board. */
  .exp-seq__frame { padding: 0; }

  /* Every pair occupies the same board; only one is lit at a time. */
  .exp-seq__items {
    position: absolute;
    inset: 0;
    display: block;
    max-width: none;
    margin: 0;
  }
  .exp-seq__item   { position: absolute; inset: 0; }
  .exp-seq__figure { display: block; }

  /* Left column — Figma text box x 43, w 366, optical centre 18px below
     the board centre. Centred with padding rather than a translate, so the
     transform channel is left free for the enter/leave tweens. */
  .exp-seq__caption {
    position: absolute;
    left: var(--pad-x);
    top: 0;
    bottom: 0;
    /* Whatever the plate and the 80 between them leave. Stating a width here
       instead meant the caption was the last thing to get room and the first
       to run to three lines. */
    right: calc(var(--seq-plate) + var(--pad-x) + var(--sp-8));
    width: auto;
    max-width: none;
    margin: 0;
    padding-top: 1.875rem;
    display: grid;
    align-content: center;
    font-size: var(--fs-title);   /* the landing rail's caption size */
    line-height: var(--lh-snug);
    will-change: transform, opacity;
  }

  /* Right column, at the landing rail's plate — 960 wide in the rail's own
     960:693 box, so it is the same picture in the same frame on both pages.
     It gives that width up only when the board is too narrow to hold it, a
     column of type and 80 between them: the caption keeps 430 whatever
     happens, because a narrower picture is a change nobody notices and a
     caption that breaks to four lines is one everybody does. */
  .exp-seq__frame {
    --seq-plate: min(60rem, calc(100% - var(--pad-x) * 2 - var(--sp-8) - 26.875rem));
  }
  .exp-seq__plate {
    position: absolute;
    left: auto;
    right: var(--pad-x);
    /* top:0/bottom:0 with auto block margins centres the plate on whatever
       the board actually measures, rather than trusting a stated offset to a
       frame that carries its own padding. */
    top: 0;
    bottom: 0;
    margin-block: auto;
    width: var(--seq-plate);
    height: auto;
    aspect-ratio: 960 / 693;
    will-change: opacity;
  }
  .exp-seq__plate img { will-change: transform; }
}


/* ---------- 3. Closing band ("Frame 22", 321:22081) ------------------- */
.exp-cta__wash {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--c-black-true);
  opacity: 0.22;
  pointer-events: none;
}

/* Figma drops the closing block (Frame 24) with its top on the board's
   midpoint, so its centre sits 78px below dead centre. */
.exp-cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.875rem;                                   /* Figma 36px */
  transform: translateY(4.875rem);
}
.exp-cta__title {
  font-size: var(--fs-display);                             /* Figma Heading, 55/100% */
  line-height: var(--lh-tight);
  max-width: 42.375rem;                            /* Figma heading box */
}
.exp-cta .btn { will-change: transform; }


/* ---------- Responsive ------------------------------------------------
   At 860 and below components.css releases the .screen contract, so the
   stages are unscaled and the Figma px sizes go back to the fluid tokens. */
@media (max-width: 860px) {
  /* .screen drops its min-height and clipping here, so the two full-bleed
     bands have to keep their own. */
  .exp-hero,
  .exp-cta { min-height: var(--vh-hero); overflow: hidden; }

  .exp-hero__title,
  .exp-cta__title  { font-size: var(--fs-display); max-width: 22ch; }
  .exp-cta__inner  { transform: none; gap: clamp(1.25rem, calc(2.0833vw * var(--s)), 1.875rem); }
}

@media (max-width: 768px) {
  .exp-hero .bleed__media,
  .exp-cta  .bleed__media { inset: -5% 0; }
}

/* -- the sequence on a phone ------------------------------------------- */
/* A stacked column of six pictures reads as a page of pictures — you scroll
   past it. The same six as a scroller with the next one's edge showing reads
   as a set you are being shown, which is what the pinned desktop version is.
   Same peek, same dots and arrows, same component as the home page. */
@media (max-width: 860px) {
  .exp-seq__frame { padding-inline: 0; }
  .exp-seq__viewport {
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline-start: var(--pad-x);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .exp-seq__viewport::-webkit-scrollbar { display: none; }
  .exp-seq__items {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(calc(78vw * var(--s)), 30rem);
    gap: var(--sp-5);
    width: max-content;
    max-width: none;
    margin-inline: 0;
    padding-inline: var(--pad-x);
  }
  .exp-seq__item { scroll-snap-align: start; }
  .exp-seq__figure { gap: var(--sp-3); }
  .exp-seq__caption {
    order: 0;                 /* the words sit under the picture here */
    text-align: left;
    max-width: none;
    margin-inline: 0;
    font-size: var(--fs-lead);
  }
  .exp-seq__nav { display: flex; }
}

@media (max-width: 480px) {
  .exp-seq__frame { padding-block: clamp(2.8125rem, calc(5.5556vw * var(--s)), 5rem); }
}


/* ---------- A calm site for anyone who asked for one ------------------
   No pin, no sequence: the six pairs become a plain stacked list, fully
   visible and static. The stage has to be put back in flow as well as
   un-transformed: components.css centres it with position: absolute, so
   dropping only the transform would leave it parked at top/left 50% —
   half a screen down and half a stage off to the right. */
@media (prefers-reduced-motion: reduce) {
  .exp-seq__frame {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding-block: clamp(3.75rem, calc(5.5556vw * var(--s)), 5rem);
    padding-inline: var(--pad-x);
  }
  .exp-seq__stage {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
  }
  .exp-seq__items {
    position: static;
    display: grid;
    gap: clamp(2.8125rem, calc(4.1667vw * var(--s)), 3.75rem);
    max-width: 61.25rem;
    margin-inline: auto;
  }
  .exp-seq__item   { position: static; }
  .exp-seq__figure { display: flex; flex-direction: column; gap: clamp(0.9375rem, calc(1.3889vw * var(--s)), 1.25rem); }
  .exp-seq__caption {
    position: static;
    order: -1;
    width: auto;
    max-width: 26ch;
    margin-inline: auto;
    padding-top: 0;
    display: block;
    font-size: clamp(1.375rem, calc(2.222vw * var(--s)), 2rem);
    opacity: 1 !important;
    transform: none !important;
  }
  .exp-seq__plate {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 864 / 624;
    opacity: 1 !important;
  }
  .exp-seq__plate img { transform: none !important; }
}

.exp-hero__title em { font-style: italic; }

/* ==========================================================================
   3. Specification — the numbers on one screen
   Claret, because this is the proof behind "Designed to perform" on the
   landing page and it should read as the same argument. Cream ink, cream
   hairlines: a drawing sheet rather than a page of marketing.

   No heading. A grid of figures announces what it is faster than the word
   "Specification" over the top of it, and the room that word wanted is
   room the grid can use.

   Everything vertical is a fraction of the screen the block has to fit
   inside, capped at its 1440x1024 value, so a window that is shorter in
   proportion compresses the whole grid rather than pushing the bottom row
   past the fold.
   ========================================================================== */
.exp-spec {
  background: var(--c-claret);
  color: var(--c-cream);
  --spec-rule: rgba(252, 241, 232, 0.22);
  --spec-disc: min(3.625rem, calc(var(--screen-h) * 0.0566));
}
.exp-spec.screen > .screen__stage { --stage-w: 90rem; --stage-h: 64rem; }
.exp-spec__stage {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: min(10rem, calc(var(--screen-h) * 0.1563)) var(--pad-x)
           min(5rem, calc(var(--screen-h) * 0.0781));
}

/* Four across, three down. The hairlines are borders on the cells rather
   than rules of their own, so the grid can reflow at any breakpoint and the
   lines follow it without a single hand-placed divider. */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: clamp(1.25rem, calc(3.125vw * var(--s)), 2.8125rem);
}
.spec {
  padding-block: min(1.875rem, calc(var(--screen-h) * 0.0293));
  border-top: 1px solid var(--spec-rule);
}
.spec-grid > .spec:nth-child(-n + 4) { border-top: 0; padding-top: 0; }
.spec-grid > .spec:nth-last-child(-n + 4) { border-bottom: 1px solid var(--spec-rule); }

/* The same ring the credential badges wear on Innovation, at spec scale —
   one drawn language across the site rather than two. */
.spec__disc {
  display: grid;
  place-items: center;
  width: var(--spec-disc);
  height: var(--spec-disc);
  border: 1px solid var(--c-cream-40);
  border-radius: 50%;
}
.spec__icon {
  display: block;
  width: 52%;
  height: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--c-cream);
}
.spec__figure {
  margin-top: min(1.25rem, calc(var(--screen-h) * 0.0195));
  font-size: min(2rem, calc(var(--screen-h) * 0.0313));
  line-height: var(--lh-tight);
}
/* The fabric and services cells lead on a word rather than a number, and a
   word needs a little less room per character than "5.0 kN/m²" does. */
.spec--word .spec__figure { font-size: min(1.5625rem, calc(var(--screen-h) * 0.0244)); }
.spec__label {
  margin-top: min(0.625rem, calc(var(--screen-h) * 0.0098));
  font-size: min(1.25rem, calc(var(--screen-h) * 0.0195));
  line-height: var(--lh-snug);
}
.spec__note {
  margin-top: 0.3125rem;
  font-size: min(1rem, calc(var(--screen-h) * 0.0156));
  line-height: var(--lh-ui);
  color: rgba(252, 241, 232, 0.62);
}

.exp-spec__ask {
  margin-top: min(1.875rem, calc(var(--screen-h) * 0.0293));
  font-size: min(1rem, calc(var(--screen-h) * 0.0156));
  color: rgba(252, 241, 232, 0.5);
}

@media (max-width: 1024px) {
  .spec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .spec-grid > .spec:nth-child(-n + 4) { border-top: 1px solid var(--spec-rule); padding-top: min(1.875rem, calc(var(--screen-h) * 0.0293)); }
  .spec-grid > .spec:nth-child(-n + 3) { border-top: 0; padding-top: 0; }
}
@media (max-width: 860px) {
  .exp-spec__stage { height: auto; padding-block: clamp(3.75rem, calc(8.3333vw * var(--s)), 7.5rem); }
  .exp-spec { --spec-disc: 3.25rem; }
  .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.25rem, calc(2.0833vw * var(--s)), 1.875rem); }
  .spec-grid > .spec:nth-child(-n + 3) { border-top: 1px solid var(--spec-rule); padding-top: 1.875rem; }
  .spec-grid > .spec:nth-child(-n + 2) { border-top: 0; padding-top: 0; }
  .spec { padding-block: 1.875rem; }
  .exp-spec__ask { margin-top: 1.875rem; }
}
/* Two columns all the way down, not one. Twelve specifications in a single
   file is a very long scroll for twelve short facts, and the pairing is what
   makes them read as a set. The disc and the figure come down a step instead;
   at 390 that leaves each column about 165 wide, which "6,690 sq ft" and
   "Demand-led ventilation" both sit inside. */
@media (max-width: 520px) {
  .exp-spec { --spec-disc: 2.5rem; }
  .spec-grid { column-gap: var(--sp-4); }
  .spec__figure { font-size: var(--fs-lead); }
  .spec { padding-block: 1.25rem; }
}

/* ---------- Vertical rhythm on a phone — see --sec-y ------------------- */
@media (max-width: 860px) {
  .exp-seq__frame.screen { padding-block: var(--sec-y); }
  .exp-spec__stage       { padding-block: var(--sec-y); }
  /* The stacker's band carried no vertical padding of its own: on a desktop
     it is a .screen and the composition is centred in a screenful, so none
     was needed. Stacked, the band is the height of its contents, which put
     "Expansive, flexible floorplates" hard against the foot of the carousel
     above it and the last floor area hard against the claret band below —
     black type on black with nothing between it and the section it is not
     part of. */
  .building__floorplates.screen { padding-block: var(--sec-y); }
}

/* ---------- The sequence's controls, above the breakpoint --------------
   Same reasoning as the home page band: while the frame is pinned there is
   no scroller, so the arrows were hidden and the sequence had no control on
   a desktop at all. They come back and drive the page (see the rail driver
   in experience.html). The dots stay here — unlike the home band this one
   carries no progress rule, so they are the only thing saying which of the
   five you are on. */
@media (min-width: 861px) {
  /* The five pairs are stacked absolutely across the whole board, so a nav
     left in flow underneath them is covered by the item on top — visible,
     and completely unclickable, which is worse than being hidden. It is
     lifted out and parked at the foot of the caption column, clear of the
     plate on the right. */
  .exp-seq__nav {
    display: flex;
    position: absolute;
    left: var(--pad-x);
    bottom: clamp(1.25rem, calc(2.8vw * var(--s)), 2.5rem);
    z-index: 2;
    width: auto;
  }
}
