/* ==========================================================================
   Gilbey. — base design system
   Tokens, type, chrome (nav + footer), buttons, wordmark lockup.
   Page-specific CSS goes in an inline <style> block at the bottom of each page.
   ========================================================================== */

/* ---- Fonts ---------------------------------------------------------------
   Helvetica Neue is licensed desktop-only in the folder Jonny supplied.
   Self-hosted here for the build; swap for a webfont licence (or a metric
   match like Inter Tight / Archivo) before this goes public if needed.       */
@font-face{font-family:'HN';src:url('../fonts/HelveticaNeueRoman.woff2') format('woff2'),url('../fonts/HelveticaNeueRoman.otf') format('opentype');font-weight:400;font-display:swap}
@font-face{font-family:'HN';src:url('../fonts/HelveticaNeueMedium.woff2') format('woff2'),url('../fonts/HelveticaNeueMedium.otf') format('opentype');font-weight:500;font-display:swap}
@font-face{font-family:'HN';src:url('../fonts/HelveticaNeueBold.woff2') format('woff2'),url('../fonts/HelveticaNeueBold.otf') format('opentype');font-weight:700;font-display:swap}
@font-face{font-family:'HN';src:url('../fonts/HelveticaNeueBlack.woff2') format('woff2'),url('../fonts/HelveticaNeueBlack.otf') format('opentype');font-weight:900;font-display:swap}
@font-face{font-family:'Poppins';src:url('../fonts/Poppins-Regular.woff2') format('woff2'),url('../fonts/Poppins-Regular.ttf') format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:'Poppins';src:url('../fonts/Poppins-Medium.woff2') format('woff2'),url('../fonts/Poppins-Medium.ttf') format('truetype');font-weight:500;font-display:swap}
@font-face{font-family:'Poppins';src:url('../fonts/Poppins-SemiBold.woff2') format('woff2'),url('../fonts/Poppins-SemiBold.ttf') format('truetype');font-weight:600;font-display:swap}
@font-face{font-family:'Poppins';src:url('../fonts/Poppins-Bold.woff2') format('woff2'),url('../fonts/Poppins-Bold.ttf') format('truetype');font-weight:700;font-display:swap}

/* ---- Tokens -------------------------------------------------------------- */
:root{
  --pink:#ff96b6;
  --pink-ink:#ff96b6;        /* brand pink — used for type too, per Jonny */
  --pink-soft:rgba(255,150,182,.16);
  --ink:#212121;
  --ink-70:#5a5a5a;
  --ink-45:#8b8b8b;
  --paper:#ffffff;
  --paper-2:#f6f4f3;
  --line:#e6e2e0;

  --display:'HN','Helvetica Neue',Helvetica,Arial,sans-serif;
  --body:'Poppins',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;

  --wrap:1180px;
  --gut:clamp(20px,5vw,48px);
  /* the bar floats: a gap above it, an inset either side, and a pill height.
     --nav-h is the space it visually occupies, which is what anchors and the
     hero paddings clear. */
  --nav-gap:clamp(10px,1.5vw,18px);
  --nav-inset:clamp(10px,1.9vw,30px);
  --nav-pill:60px;
  --nav-h:calc(var(--nav-gap) * 2 + var(--nav-pill));

  --ease:cubic-bezier(.2,.7,.2,1);
  --spring:cubic-bezier(.34,1.4,.55,1);
}

/* ---- Reset --------------------------------------------------------------- */
*,*::before,*::after{box-sizing:border-box}
/* Scroll-reveal starts elements rotated by .8deg. On a full-width block that
   rotation widens the bounding box by height x sin(.8deg) — a few px — which
   was enough to put a horizontal scrollbar on the page before anything had
   even animated. `clip` rather than `hidden`: hidden on the root makes a
   scroll container and breaks position:sticky and the fixed nav, clip does
   not (verified in the pane: the nav still pins and no page scrolls sideways). */
html{overflow-x:clip}
/* Several sections bleed a bar off one edge on purpose, so the page needs a
   horizontal clip. It must be on <html> ONLY: putting any overflow on <body>
   makes it the scroll container and silently kills position:sticky on the nav. */
html{overflow-x:clip}
/* the nav is sticky, so an anchor target has to stop clear of it or the
   heading you jumped to sits underneath the bar */
section[id],[id^="external-"],[id^="internal-"]{scroll-margin-top:calc(var(--nav-h) + 18px)}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{
  margin:0;background:var(--paper);color:var(--ink);
  font-family:var(--body);font-size:clamp(16.5px,1.18vw,19.5px);line-height:1.62;
  -webkit-font-smoothing:antialiased;
}
img,svg{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
button,input,textarea,select{font:inherit;color:inherit}
:focus-visible{outline:3px solid var(--pink);outline-offset:3px}

/* ---- Layout -------------------------------------------------------------- */
.wrap{width:100%;max-width:var(--wrap);margin-inline:auto;padding-inline:var(--gut)}
.section{padding:clamp(64px,9vw,132px) 0}
.section--tint{background:var(--paper-2)}
.section--ink{background:var(--ink);color:var(--paper)}
/* the platform pages close with a CTA band and then the enquiry form, both
   dark, which merged into one unbroken slab. A hairline keeps them legible
   as two blocks wherever they end up adjacent. */
.section--ink + .section--ink{border-top:1px solid rgba(255,255,255,.11)}
.section--ink .lede{color:rgba(255,255,255,.72)}

/* ---- Type ---------------------------------------------------------------- */
h1,h2,h3,h4{font-family:var(--display);font-weight:900;letter-spacing:-.035em;line-height:.96;margin:0 0 .5em;
  overflow-wrap:break-word}
h1{font-size:clamp(46px,7.4vw,104px)}
/* the 46px floor clips a long word like "management" on a small phone */
@media (max-width:400px){h1{font-size:clamp(34px,11vw,46px)}}
h2{font-size:clamp(34px,4.6vw,62px)}
h3{font-size:clamp(23px,2.2vw,31px);letter-spacing:-.02em;line-height:1.12}
h4{font-size:clamp(17px,1.4vw,21px);letter-spacing:-.01em}
p{margin:0 0 1.15em}
.lede{font-size:clamp(18.5px,1.7vw,24px);line-height:1.5;color:var(--ink-70)}
/* Display face at normal case. The old wide-tracked uppercase version read as
   obviously AI-written (Jonny, 2026-09-18 and again 2026-09-23) — do not bring
   letter-spacing + text-transform:uppercase back for labels. */
.eyebrow{
  font-family:var(--display);font-weight:900;
  font-size:clamp(14px,1.2vw,16.5px);letter-spacing:-.02em;
  text-transform:none;color:var(--pink-ink);margin:0 0 16px;
}
.section--ink .eyebrow{color:var(--pink)}
strong,b{font-weight:600}
.pink{color:var(--pink-ink)}
.section--ink .pink{color:var(--pink)}
.mark{background:var(--pink);color:var(--ink);padding:0 .12em}

/* ---- Wordmark lockup ------------------------------------------------------
   Rebuilt in type (not the PNG) so the quip can rotate on load.
   .wm-quip mirrors the condensed line in Jonny's lockups.                    */
.wm{display:inline-block;line-height:1;font-family:var(--display);font-weight:900;color:var(--ink)}
.wm-word{display:block;font-size:var(--wm-size,30px);letter-spacing:-.045em;white-space:nowrap}
.wm-word em{font-style:normal;color:var(--pink)}
.wm-dot{
  display:inline-block;width:.19em;height:.19em;background:var(--pink);
  margin-left:.04em;vertical-align:baseline;
}
.wm-quip{
  display:block;font-size:calc(var(--wm-size,30px) * .215);
  font-weight:700;letter-spacing:-.005em;white-space:nowrap;
  transform:scaleX(.92);transform-origin:0 50%;
  margin-top:calc(var(--wm-size,30px) * -.16);
  padding-left:calc(var(--wm-size,30px) * .30);
  color:var(--ink);opacity:0;transition:opacity .45s var(--ease);
}
.wm-quip.is-in{opacity:1}
.wm--light{color:var(--paper)}
.wm--light .wm-quip{color:var(--paper)}


/* ---- Brand lockup (image logo + type fallback) ---------------------------
   The logo is a file: img/logo-gilbey.svg (light version for dark grounds:
   img/logo-gilbey-light.svg). If the file is missing, site.js flips the
   anchor to .is-fallback and the type lockup below stands in.               */
.brand{display:inline-block;line-height:1}
.brand__img{height:var(--logo-h,30px);width:auto}
.brand__fallback{display:none}
.brand.is-fallback .brand__img{display:none}
.brand.is-fallback .brand__fallback{display:inline-block}
.brand__quip{display:block}

/* ---- Buttons ------------------------------------------------------------- */
.btn{
  --bg:var(--ink);--fg:var(--paper);
  display:inline-flex;align-items:center;gap:.6em;
  background:var(--bg);color:var(--fg);
  font-family:var(--body);font-weight:600;font-size:16.5px;letter-spacing:-.01em;
  padding:16px 28px;border:2px solid var(--bg);border-radius:0;cursor:pointer;
  transition:transform .18s var(--ease),background .18s var(--ease),color .18s var(--ease),border-color .18s var(--ease);
}
.btn:hover{transform:translateY(-2px)}
.btn--pink{--bg:var(--pink);--fg:var(--ink)}
.btn--ghost{--bg:transparent;--fg:var(--ink);border-color:var(--ink)}
.btn--ghost:hover{--bg:var(--ink);--fg:var(--paper)}
.section--ink .btn--ghost{--fg:var(--paper);border-color:var(--paper)}
.section--ink .btn--ghost:hover{--bg:var(--paper);--fg:var(--ink)}
.btn__arrow{transition:transform .18s var(--ease)}
.btn:hover .btn__arrow{transform:translateX(4px)}

/* ---- Nav ----------------------------------------------------------------- */
/* The bar sits above the page rather than on it: a fixed, inset, frosted pill
   that the content scrolls underneath. .nav spans the viewport but must not
   swallow clicks in the empty space either side of the pill.               */
.nav{
  position:fixed;top:0;left:0;right:0;z-index:80;
  padding-top:var(--nav-gap);pointer-events:none;
}
.nav__inner{
  pointer-events:auto;position:relative;
  /* .wrap sets width:100%, which would ignore the inset and overhang */
  width:auto;max-width:none;margin-inline:var(--nav-inset);
  /* asymmetric on purpose: the brand needs room on the left, but the CTA is
     meant to sit into the right-hand end of the bar rather than float on it */
  padding-left:clamp(12px,1.4vw,22px);
  padding-right:clamp(4px,.3vw,5px);
  /* three parts: brand, the links in the middle, Book on the right */
  display:flex;align-items:center;gap:clamp(6px,1.2vw,20px);
  min-height:var(--nav-pill);
  background:rgba(255,255,255,.72);
  -webkit-backdrop-filter:blur(14px) saturate(1.4);
  backdrop-filter:blur(14px) saturate(1.4);
  border-radius:999px;
  box-shadow:0 2px 20px rgba(33,33,33,.13);
  transition:background .25s var(--ease),box-shadow .25s var(--ease);
}
/* once the page has moved it is floating over copy, not a header image, so
   it firms up a little to stay readable */
.nav.is-stuck .nav__inner{background:rgba(255,255,255,.88);box-shadow:0 4px 26px rgba(33,33,33,.16)}
/* no backdrop-filter (older Safari, Firefox with it disabled): go opaque */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  .nav__inner{background:var(--paper)}
  .nav.is-stuck .nav__inner{background:var(--paper)}
}
.nav__brand{--wm-size:30px;--logo-h:30px;flex:0 0 auto;padding:6px 0}
/* the middle takes the slack, so the links stay centred in the pill however
   wide the brand and the button happen to be */
.nav__mid{flex:1 1 auto;min-width:0;display:flex;justify-content:center}
.nav__links{display:flex;align-items:center;gap:clamp(0px,.35vw,5px);list-style:none;margin:0;padding:0}
.nav__link{
  --link-pad:clamp(8px,.95vw,14px);
  display:inline-flex;align-items:center;gap:6px;white-space:nowrap;
  padding:10px var(--link-pad);font-weight:500;letter-spacing:-.01em;
  font-size:clamp(14.5px,1.05vw,16px);
  color:var(--ink);position:relative;
}
.nav__link::after{
  content:'';position:absolute;left:var(--link-pad);right:var(--link-pad);bottom:4px;height:2px;
  background:var(--pink);transform:scaleX(0);transform-origin:0 50%;
  transition:transform .22s var(--ease);
}
.nav__link:hover::after,.nav__item.is-open>.nav__link::after,.nav__link[aria-current='page']::after{transform:scaleX(1)}
.nav__caret{width:9px;height:9px;transition:transform .22s var(--ease)}
.nav__item.is-open .nav__caret{transform:rotate(180deg)}
/* "Book" sits inside the bar rather than in the link list, so it survives the
   burger breakpoint and stays reachable on a phone. It must never shrink or
   wrap — everything else gives way to it. */
.nav__cta{
  flex:0 0 auto;align-self:center;white-space:nowrap;margin:0;
  /* tall enough to nearly fill the bar, so it reads as the end of it and not
     as a button dropped on top. It sits on an even ~4px inset from the bar's
     top, bottom and right edge, which is what makes it read as seated. */
  padding:12px clamp(18px,1.8vw,27px);
  font-size:clamp(14.5px,1.05vw,16px);
  border-radius:999px;
  /* the sheen is clipped to the pill */
  position:relative;overflow:hidden;
}
/* no lift — being part of the bar, it should not detach from it. The shine is
   the whole hover. */
.nav__cta:hover{transform:none}
/* the same light sweep the dropdown cards use, so the bar behaves as one piece */
.nav__cta::after{
  content:'';position:absolute;top:0;bottom:0;left:0;width:55%;pointer-events:none;opacity:0;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.9),transparent);
  transform:translateX(-170%);
}
.nav__cta:hover::after{animation:nav-sheen .85s var(--ease) 1}

/* the full label wherever it fits — measured, it clears the burger down to
   370px with room to spare. Below that it crowds the burger, so it shortens
   to "Book" — measured: at 340px the full label leaves 6px, which is not it. */
.nav__cta-short{display:none}
/* 369px was measured against the label alone and ignored the burger sitting
   next to it. On a 375px phone the full label left SIX pixels between the pill
   and the burger. Shortening at 430 gives the bar room on every real handset. */
@media (max-width:430px){
  .nav__cta-long{display:none}
  .nav__cta-short{display:inline}
}

/* dropdown — a full-width panel that drops from the bar, not a small menu.
   It spans the nav rather than the <li>, so .nav__item must not be a
   positioning context on desktop.                                          */
.nav__item{position:static}
.nav__panel{
  position:absolute;top:100%;left:0;right:0;margin:10px 0 0;
  background:rgba(255,255,255,.95);
  -webkit-backdrop-filter:blur(16px) saturate(1.4);
  backdrop-filter:blur(16px) saturate(1.4);
  border-radius:28px;
  box-shadow:0 18px 44px rgba(33,33,33,.16);
  list-style:none;
  padding:clamp(20px,2.4vw,30px) clamp(16px,1.7vw,26px) clamp(22px,2.6vw,32px);
  display:grid;grid-template-columns:repeat(auto-fit,minmax(215px,1fr));
  grid-template-rows:auto auto;align-items:stretch;
  gap:clamp(6px,1vw,14px);
  opacity:0;visibility:hidden;transform:translateY(-10px);
  transition:opacity .22s var(--ease),transform .28s var(--ease),visibility .22s;
}
.nav__item.is-open .nav__panel{opacity:1;visibility:visible;transform:none}
/* each li spans both rows and borrows them, so row 1 is as tall as the
   tallest title in the panel and every hover box matches */
.nav__panel > li{grid-row:1/span 2;display:grid;grid-template-rows:subgrid;align-content:start}
.nav__panel > li > a{grid-row:1}
.nav__panel a{
  display:block;padding:16px 18px 18px;border:1px solid transparent;border-radius:16px;
  position:relative;overflow:hidden;
  transition:background .16s var(--ease),transform .3s var(--spring);
}
.nav__panel a:hover{background:var(--pink-soft);transform:translateY(-2px)}
/* a light sweeps across the pink once on hover — no outline, just movement */
.nav__panel a::after{
  content:'';position:absolute;top:0;bottom:0;left:0;width:48%;pointer-events:none;opacity:0;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.85),transparent);
  transform:translateX(-170%);
}
.nav__panel a:hover::after{animation:nav-sheen .8s var(--ease) 1}
@keyframes nav-sheen{
  0%{transform:translateX(-170%);opacity:0}
  12%{opacity:1}
  100%{transform:translateX(330%);opacity:0}
}
.nav__panel b{
  display:block;font-family:var(--display);font-weight:900;letter-spacing:-.025em;
  font-size:clamp(17px,1.5vw,21px);line-height:1.15;
}
.nav__panel span{display:block;font-size:13.5px;line-height:1.45;color:var(--ink-45);margin-top:5px}

/* Sub-pages sitting under a service or under Work.
   These used to be the parent's own 900 weight at 70% ink, which read as a
   faded copy of the line above rather than a level below it. Structured the way
   Apple's global nav does it instead: a small quiet group label, then the
   children at full ink in a lighter weight of the same family, generous rhythm,
   no boxes. Helvetica Neue Medium (500) is in the brand set — see the @font-face
   block at the top of this file.                                            */
.nav__sub{
  list-style:none;margin:10px 0 0;padding:8px 0 0;grid-row:2;
  border-top:1px solid var(--line);
}
/* the label is a CSS-generated heading rather than markup: the nested <ul>
   already carries the hierarchy for a screen reader, this is for the eye */
.nav__sub::before{
  content:attr(data-label);display:block;
  padding:4px 18px 8px;
  font-family:var(--body);font-weight:600;font-size:11px;
  letter-spacing:.14em;text-transform:uppercase;color:var(--ink-45);
}
.nav__sub a{
  /* left padding matches the parent card's, so the two stay flush */
  display:flex;align-items:center;gap:.5em;
  padding:9px 18px;border-radius:10px;
  color:var(--ink);
  font-family:var(--display);font-weight:500;letter-spacing:-.005em;line-height:1.3;
  font-size:clamp(14.5px,1.2vw,16.5px);
  transition:color .16s var(--ease),background .16s var(--ease);
}
/* the lift and the light sweep belong to the big cards — on a 15px row they
   were noise — so both come off. A soft wash stays, because a row this size
   still needs an obvious hit target, and the text takes the pink. */
.nav__sub a:hover{background:var(--pink-soft);color:var(--pink-ink);transform:none}
.nav__sub a::after{
  content:'\2192';position:static;inset:auto;width:auto;height:auto;background:none;
  font-family:var(--body);font-size:.82em;line-height:1;color:var(--pink-ink);
  opacity:0;transform:translateX(-5px);
  transition:opacity .18s var(--ease),transform .25s var(--ease);
}
.nav__sub a:hover::after{animation:none;opacity:1;transform:none}

/* Services and Pricing: groups of plain links, not titled cards.
   The panel's default layout pairs a big card with its children across two
   subgrid rows. These menus have no cards — every group is a quiet label over
   a list — so the rows, the border and the card spacing all come off. */
.nav__panel--services{
  grid-template-columns:repeat(4,minmax(0,1fr));
  grid-template-rows:auto;
  align-items:start;
}
.nav__panel--services > li{grid-row:auto;display:block}
.nav__panel--services .nav__sub{grid-row:auto;margin:0;padding-top:0;border-top:0}
/* Three groups rather than four. Without its own count they huddle in the left
   three quarters of a panel that still spans the whole nav. */
.nav__panel--3{grid-template-columns:repeat(3,minmax(0,1fr))}

/* burger */
.nav__burger{display:none;background:none;border:0;padding:10px;cursor:pointer}
.nav__burger span{display:block;width:24px;height:2px;background:var(--ink);margin:5px 0;transition:transform .25s var(--ease),opacity .25s var(--ease)}
.nav.is-menu .nav__burger span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.nav.is-menu .nav__burger span:nth-child(2){opacity:0}
.nav.is-menu .nav__burger span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

@media (max-width:960px){
  .nav__burger{display:block;flex:0 0 auto;margin-right:-4px}
  /* .nav__mid keeps flex:1 — its list is absolutely positioned, so it adds no
     width and simply acts as the spacer that holds Book and the burger right */
  .nav__links{
    position:absolute;top:100%;left:0;right:0;margin-top:10px;
    background:rgba(255,255,255,.96);
    -webkit-backdrop-filter:blur(16px) saturate(1.4);
    backdrop-filter:blur(16px) saturate(1.4);
    border-radius:26px;box-shadow:0 18px 44px rgba(33,33,33,.16);
    flex-direction:column;align-items:stretch;gap:0;
    padding:10px clamp(16px,4vw,24px) 22px;
    max-height:calc(100dvh - var(--nav-h) - 24px);overflow:auto;
    transform:translateY(-12px);opacity:0;visibility:hidden;
    transition:opacity .22s var(--ease),transform .22s var(--ease),visibility .22s;
  }
  .nav.is-menu .nav__links{opacity:1;visibility:visible;transform:none}
  .nav__link{padding:16px 0;font-size:19px;font-family:var(--display);font-weight:700;letter-spacing:-.02em;justify-content:space-between;border-bottom:1px solid var(--line)}
  .nav__link::after{display:none}
  .nav__panel{
    position:static;opacity:1;visibility:visible;transform:none;
    border:0;box-shadow:none;padding:0 0 8px;min-width:0;
    display:none;
  }
  .nav__item.is-open .nav__panel{display:block}
  .nav__panel > li{display:block}
  .nav__panel a{padding:12px 0 12px 16px;border-radius:0;border-left:2px solid var(--pink)}
  /* on mobile the children step in again and drop the pink rule, so the two
     levels stay distinguishable in a single stacked list */
  .nav__sub{margin:4px 0 10px;padding-top:6px}
  .nav__sub::before{padding:2px 0 6px 16px}
  .nav__sub a{padding:10px 0 10px 30px;border-left:0;font-size:16px}
  .nav__sub a:hover{background:none}
  .nav__panel--services .nav__sub{margin:4px 0 10px}
}

/* tightest phones: the brand shrinks before Book does */
@media (max-width:430px){
  .nav__brand{--wm-size:26px;--logo-h:26px}
  .nav__cta{padding:10px 16px;font-size:14.5px}
}

/* honeypot: off-screen rather than display:none, because some bots skip
   hidden fields but fill everything they can reach */
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

/* ---- Footer -------------------------------------------------------------- */
.foot{background:var(--ink);color:var(--paper);padding:clamp(56px,7vw,88px) 0 32px}
.foot__top{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:40px}
.foot__brand{--wm-size:38px;--logo-h:38px}
.foot__brand p{margin:20px 0 0;color:rgba(255,255,255,.6);font-size:15.5px;max-width:30ch}
.foot h3{font-family:var(--body);font-weight:700;font-size:12px;letter-spacing:.16em;text-transform:uppercase;color:var(--pink);margin:0 0 16px}
.foot ul{list-style:none;margin:0;padding:0;display:grid;gap:11px}
.foot a{color:rgba(255,255,255,.74);font-size:15.5px;transition:color .16s var(--ease)}
.foot a:hover{color:var(--pink)}
.foot__base{
  margin-top:clamp(40px,6vw,72px);padding-top:24px;border-top:1px solid rgba(255,255,255,.14);
  display:flex;flex-wrap:wrap;gap:14px 26px;justify-content:space-between;
  font-size:13.5px;color:rgba(255,255,255,.5);
}
/* grid items are min-width:auto by default, so a single long link stops its
   1fr track shrinking and pushes the footer off the side of a 320px screen.
   Measured before this: 21px of horizontal scroll on every page at 320. */
.foot__top > *{min-width:0}
.foot a,.foot__brand p{overflow-wrap:anywhere}
.foot__brand p{max-width:min(30ch,100%)}
@media (max-width:820px){
  .foot__top{grid-template-columns:1fr 1fr}
  .foot__brand{grid-column:1/-1}
}
@media (max-width:430px){
  .foot__top{grid-template-columns:1fr;gap:34px}
}

/* ---- Scroll reveal -------------------------------------------------------
   Everything arrives with a little spring and a touch of rotation, staggered
   by source order (site.js sets --d per sibling). Graphics get .reveal--pop.  */
.reveal{
  opacity:0;transform:translateY(30px) rotate(-.8deg);
  transition:opacity .55s var(--ease) var(--d,0ms),
             transform .85s var(--spring) var(--d,0ms);
}
.reveal.is-in{opacity:1;transform:none}

.reveal--pop{transform:translateY(26px) scale(.86) rotate(-5deg)}
/* the pre-reveal offset is a percentage of the element, not a flat 38px:
   a flat offset on something already flush to the right edge (the cat on
   community-impact) widened the document and put a horizontal scrollbar on
   the page before the reveal ever fired. */
.reveal--right{transform:translateX(6%) rotate(.8deg)}
.reveal--left{transform:translateX(-6%) rotate(-.8deg)}
.reveal--drop{transform:translateY(-26px) rotate(1.5deg)}

/* idle whimsy — the cats keep breathing once they've landed */
@keyframes bob{
  0%,100%{transform:translateY(0) rotate(0deg)}
  50%{transform:translateY(-9px) rotate(1.1deg)}
}
@keyframes bob-alt{
  0%,100%{transform:translateY(0) rotate(0deg)}
  50%{transform:translateY(-6px) rotate(-1.3deg)}
}
.bob img{animation:bob 6s ease-in-out infinite;transform-origin:50% 90%}
.bob-alt img{animation:bob-alt 7.5s ease-in-out .9s infinite;transform-origin:50% 90%}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition-duration:.001ms!important}
  .reveal{opacity:1;transform:none}
}

/* ---- Interior page hero --------------------------------------------------
   Shared by every page except the homepage: eyebrow, H1, lede, hairline.     */
/* padding-block only: this element is also .wrap, and a padding shorthand
   here wipes out the side gutter, running the hero to the screen edge. */
/* the same header treatment as the homepage hero: the photo under a white
   wash, cut off on a 10deg diagonal, so no hairline is needed underneath.
   The band is inset -10% either side, so this has to clip. */
.page-hero{
  position:relative;isolation:isolate;overflow:hidden;
  /* the nav is fixed and out of flow, so the header image runs up behind it
     and the content has to start below it */
  padding-top:calc(var(--nav-h) + clamp(30px,4.4vw,64px));
  padding-bottom:clamp(60px,8vw,104px);
}
.page-hero__bg{
  /* There is no wallpaper behind a hero any more. The element stays in the
     markup and does nothing, unless a page sets --hero-img on .page-hero to
     use its OWN photograph — the two case studies do. NOTE the path must be
     relative to THIS stylesheet (../img/...), not to the HTML: a url() inside
     a custom property resolves where the var() is used. */
  display:none;
  position:absolute;inset:0;z-index:-1;
  background:#e7e2de var(--hero-img) center/cover no-repeat;
}
.page-hero[style*="--hero-img"] .page-hero__bg{display:block}
.page-hero__bg::before{content:'';position:absolute;inset:0;background:rgba(255,255,255,.84)}
.page-hero__bg::after{
  content:'';position:absolute;left:-10%;right:-10%;bottom:0;height:64%;
  background:linear-gradient(170deg,rgba(255,255,255,0) 50.5%,rgba(255,255,255,.85) 52.4%,#fff 53.6%);
}
.page-hero__inner{position:relative;z-index:1}
.page-hero h1{max-width:15ch;margin-bottom:.28em}
.page-hero .lede{max-width:54ch;margin:0}

/* ---- Forms ---------------------------------------------------------------
   The enquiry form block. Lives here (not page-inline) because the homepage
   partner section, the case-study CTA slide and pricing.html all use it.
   Written for dark grounds (.section--ink) — that's the only place it sits.  */
.partner{display:grid;grid-template-columns:.9fr 1.1fr;gap:clamp(30px,5vw,72px)}
.partner__alt{font-size:14.5px;color:rgba(255,255,255,.62);margin-top:26px}
.partner__alt a{color:var(--pink);text-decoration:underline;text-underline-offset:3px}
.partner__form{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-content:start}
.field{display:flex;flex-direction:column;gap:7px}
.field--full{grid-column:1/-1}
.field--full .btn{align-self:flex-start}
.field label{font-size:12px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:rgba(255,255,255,.6)}
.field label span{text-transform:none;letter-spacing:0;font-weight:400}
.field input,.field textarea{
  background:transparent;border:0;border-bottom:2px solid rgba(255,255,255,.28);
  color:var(--paper);padding:11px 2px;font-size:16px;transition:border-color .2s var(--ease);
}
.field input::placeholder,.field textarea::placeholder{color:rgba(255,255,255,.3);opacity:1}
.field input:focus,.field textarea:focus{outline:none;border-bottom-color:var(--pink)}
.field textarea{resize:vertical}
.form-status{margin:14px 0 0;font-size:13.5px;color:rgba(255,255,255,.6)}
.form-status[data-state='err']{color:var(--pink)}
.form-status[data-state='ok']{color:#8ee6b0}
@media (max-width:860px){.partner,.partner__form{grid-template-columns:1fr}}

/* ---- Image slots ---------------------------------------------------------
   A missing image shows its data-slot label as a dashed placeholder, so the
   page still reads while files are outstanding (engine in js/site.js).       */
.img-slot img{width:100%;height:auto;display:block}
.img-slot.is-empty img{display:none}
.img-slot.is-empty::after{
  content:attr(data-slot);display:flex;align-items:center;justify-content:center;
  aspect-ratio:var(--ratio,4/3);padding:20px;text-align:center;
  border:2px dashed var(--line);background:rgba(255,255,255,.72);
  color:var(--ink-45);font-size:11px;line-height:1.7;letter-spacing:.06em;text-transform:uppercase;
}

/* ---- Utilities ----------------------------------------------------------- */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.skip{position:absolute;left:-9999px;top:0;background:var(--ink);color:var(--paper);padding:12px 18px;z-index:200}
.skip:focus{left:12px;top:12px}

/* The Services tab opens the dropdown and nothing else — there is no services
   landing page, so it is a button rather than a link. */
.nav__link--parent{
  background:none;border:0;font:inherit;cursor:pointer;text-align:left;
  font-weight:500;font-size:16px;letter-spacing:-.01em;color:var(--ink);
}

/* ---- Phones: drop the live blurs --------------------------------------
   backdrop-filter re-blurs whatever is behind the element on every frame,
   which on a phone GPU costs real battery and makes the sticky nav judder
   while scrolling. Desktop keeps it; below 768 these go opaque instead.

   The opaque values are the ones the @supports fallback already uses for
   browsers without backdrop-filter, so this is a proven look rather than a
   new one. The element still needs an opaque background or the blur removal
   leaves translucent panels with the page showing through. */
@media (max-width:767px){
  .nav__inner,
  .nav.is-stuck .nav__inner{
    -webkit-backdrop-filter:none;backdrop-filter:none;
    background:var(--paper);
  }
  .nav__panel{-webkit-backdrop-filter:none;backdrop-filter:none;background:#fff}
  .nav__links{-webkit-backdrop-filter:none;backdrop-filter:none;background:#fff}
}
