/* ==========================================================================
   Zedass.in — stylesheet
   Palette and type roles follow the Zedass Brand Manual, edition 01.
   Structural device: the service docket — a job code, a segment tag,
   and a plain description of the work.
   ========================================================================== */

/* --- Brand fonts: self-hosted, Latin subset, SIL OFL 1.1 (licences in assets/fonts/) ---------------
   Before 2026-10-20 these never loaded and every visitor saw Helvetica/Georgia (finding F9). */
@font-face { font-family: "Inter Tight"; src: url("fonts/inter-tight-var.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-var.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --ink:      #0F1A19;
  --slate:    #24413E;
  --slate-2:  #35605B;
  --paper:    #F1F4F2;
  --card:     #FFFFFF;
  --amber:    #E39B2E;
  --amber-dk: #B87A16;
  --rule:     #CBD5D1;
  --muted:    #5E706D;

  --font-display: "Inter Tight", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --wrap: 1140px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 4px;

  /* Design system v2 (docs/design/REVAMP_PLAN_2026-10-20.md §7). Brand palette above is unchanged;
     these extend it for depth and readable contrast. Ratios computed (WCAG 2.x), not estimated. */
  --amber-300: #EAB462;   /* hover fill for amber buttons; Ink text on it 9.5:1 */
  --amber-700: #885D1C;   /* amber TEXT on light backgrounds: 5.2:1 on paper, 5.8:1 on white.
                             (--amber-dk is 3.25:1 on paper — large display text only) */
  --ink-850:  #182322;    /* raised surfaces on Ink */
  --ink-800:  #1F2928;
  --text-mid: #ADB3B1;    /* secondary text on Ink, 8.3:1 */
  --line-dark-1: rgba(241, 244, 242, .08);
  --line-dark-2: rgba(241, 244, 242, .16);

  --shadow-1: 0 1px 2px rgba(15, 26, 25, .06), 0 8px 24px -12px rgba(15, 26, 25, .18);
  --shadow-2: 0 2px 4px rgba(15, 26, 25, .06), 0 22px 44px -18px rgba(15, 26, 25, .32);

  /* Motion: one curve, few durations. Entrances slower than hovers; only transform/opacity animate. */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --dur-hover: 200ms;
  --dur-reveal: 640ms;
  --reveal-shift: 24px;
  --stagger: 70ms;

  /* Sticky bars: heights are DECLARED, and scroll offsets are derived from them, so an #anchor always lands
     exactly under the bars (a guessed 130px left a 10px gap — S02, 2026-10-20). */
  --header-h: 69px;          /* .header-inner min-height 68 + 1px border */
  --practice-h: 47px;        /* .practice-nav ul 46 + 1px border */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 15px); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--slate-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--amber-700); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -9999px; background: var(--ink); color: #fff; padding: .75rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* --- Type roles ---------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;          /* Inter Tight is pre-tightened: 800 + -0.025em made words touch ("Everythingfrom") */
  letter-spacing: -0.012em;
  line-height: 1.08;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.8vw, 4.3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.9vw, 1.4rem); letter-spacing: -0.006em; }
h4 { font-size: 1.03rem; letter-spacing: -0.005em; }
h1 em, h2 em { font-style: normal; color: var(--amber-dk); }
.section--ink h1 em, .section--ink h2 em,
.section--slate h1 em, .section--slate h2 em { color: var(--amber); }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

.lede { font-size: clamp(1.1rem, 1.7vw, 1.3rem); line-height: 1.6; color: var(--slate); max-width: 48ch; }

.eyebrow {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--amber-700); margin: 0 0 1rem; display: block;
}
.code {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.tbc { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .08em; color: var(--amber-700); }

/* --- Header / nav -------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(241, 244, 242, .94);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow var(--dur-hover) var(--ease-out), background-color var(--dur-hover) var(--ease-out);
}
/* site.js adds .is-scrolled once the page has moved 16px: the header lifts off the content. */
.site-header.is-scrolled { background: rgba(241, 244, 242, .98); box-shadow: 0 6px 24px -14px rgba(15, 26, 25, .35); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: .58rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-word { font-family: var(--font-display); font-weight: 800; font-size: 1.28rem; letter-spacing: .005em; }
.brand-word i { font-style: normal; color: var(--amber-dk); }
.site-footer .brand-word i { color: var(--amber); }

.nav-toggle {
  display: none; font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .16em; text-transform: uppercase;
  background: var(--ink); color: #fff; border: 0;
  padding: .6rem .9rem; border-radius: var(--radius); cursor: pointer;
}

.nav ul { list-style: none; display: flex; align-items: center; gap: .2rem; margin: 0; padding: 0; }
.nav a, .nav .subnav-btn {
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--slate); text-decoration: none; padding: .55rem .7rem;
  border-radius: var(--radius); display: inline-block; background: none; border: 0; cursor: pointer;
  line-height: 1.4;   /* same box for the <a> links and the Services <button> (it sat 1px low) */
}
.nav a, .nav .subnav-btn { transition: background-color var(--dur-hover) var(--ease-out), color var(--dur-hover) var(--ease-out); }
.nav a:hover, .nav .subnav-btn:hover { background: #E2E8E5; color: var(--ink); }
/* "Get started" (D13): last item of the nav, so it ends the desktop row and sits inside the phone menu. */
.nav .nav-cta { margin-left: .6rem; }
.nav .nav-cta .btn { display: inline-flex; justify-content: center; color: var(--ink); background: var(--amber); padding: .7rem 1.05rem; letter-spacing: .12em; }
.nav .nav-cta .btn:hover { background: var(--amber-300); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--amber); }
.has-sub.is-section > .subnav-btn { color: var(--ink); box-shadow: inset 0 -2px 0 var(--amber); }

.has-sub { position: relative; }
.subnav {
  position: absolute; top: 100%; left: 0; min-width: 240px;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: .4rem; display: none; flex-direction: column;
  box-shadow: 0 12px 28px rgba(15,26,25,.12);
}
.subnav li { width: 100%; }
.subnav a { display: block; text-transform: none; letter-spacing: .01em; font-size: .84rem; font-family: var(--font-body); }
/* Scoped under .nav on purpose: `.nav ul { display: flex }` above is more specific than a bare
   `.subnav`, and .subnav IS a ul inside .nav — so the dropdown was permanently open (fixed 2026-09-29). */
.nav .subnav { display: none; }
.nav .has-sub.open .subnav { display: flex; }

/* --- Hero ---------------------------------------------------------------- */

.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1.12fr .88fr; align-items: center; }   /* end left an empty block above the copy beside a tall board */
.hero h1 { margin-bottom: .5em; }
/* Two-column heroes have ~560px for the copy: at full size "Zedass began where" wrapped into 4 ragged lines.
   Headlines must break only where the <br> says (test V09). */
.hero-grid h1 { font-size: clamp(2.3rem, 4.7vw, 3.9rem); }
/* Longer headlines (≥ ~20 characters on a line: About, Consultancy) are sized to the COPY COLUMN, not the window,
   so they break only where the <br> says at every width (V09). cqi = 1% of the column; vw is the fallback. */
.hero-copy { container-type: inline-size; }
.hero-grid h1.h1--long { font-size: clamp(2rem, 3.4vw, 3rem); font-size: clamp(2rem, 7.9cqi, 3rem); }

/* Hero photo, with the dispatch board overlapping its lower edge (added 2026-09-29) */
.hero-visual { position: relative; }
/* A photo makes the right column much taller than the copy; bottom-aligning (the default above)
   then leaves a large empty block over the headline. Centre heroes that carry a photo. */

.hero-photo, .inline-photo {
  display: block; overflow: hidden; border-radius: var(--radius); background: var(--slate);
  box-shadow: 0 18px 40px rgba(15,26,25,.14);
}
.hero-photo { aspect-ratio: 5 / 4; }
.hero-photo img, .inline-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-visual .board { position: relative; z-index: 1; margin: -5.5rem 0 0 clamp(1rem, 9%, 3.5rem); }
.inline-photo { aspect-ratio: 16 / 10; margin-bottom: 1.1rem; }

/* Signature element: the dispatch board */
.board {
  border-top: 3px solid var(--amber);
  background: var(--card); color: var(--ink);   /* a white card sets its own text colour — inside a dark hero it
                                                    inherited light text: 1.11:1 (caught by P02, 2026-10-20) */
  border-radius: var(--radius);
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px -28px rgba(15,26,25,.5);
}
.board-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: .85rem 1.1rem; border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
}
.board-row {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: baseline;
  padding: 1rem 1.1rem; border-bottom: 1px solid var(--rule);
  text-decoration: none; color: inherit;
  transition: background-color var(--dur-hover) var(--ease-out);
}
.board-row:last-child { border-bottom: 0; }
a.board-row:hover { background: #F6F9F7; color: inherit; }
a.board-row .code { transition: transform var(--dur-hover) var(--ease-out); }
.board-row .code { color: var(--amber-700); white-space: nowrap; }
.board-row strong { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; letter-spacing: 0; display: block; }
.board-row small { color: var(--muted); font-size: .88rem; line-height: 1.45; display: block; }

/* --- Brand strip --------------------------------------------------------- */

.strip { padding: 2.25rem 0 2.75rem; border-block: 1px solid var(--rule); background: #EDF1EF; overflow: hidden; }
.strip-label {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 1.1rem;
}


/* --- 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; }
.icon { width: 1.5rem; height: 1.5rem; flex: none; }

/* --- Dark-hero pages (D12): the header joins the hero ---------------------------------------------
   Only TOP-LEVEL links turn light: the desktop dropdown stays a white card with dark links. */
.has-dark-hero .site-header { background: rgba(15, 26, 25, .94); border-bottom-color: var(--line-dark-1); }
.has-dark-hero .site-header.is-scrolled { background: rgba(15, 26, 25, .98); box-shadow: 0 8px 28px -14px rgba(0, 0, 0, .7); }
.has-dark-hero .brand, .has-dark-hero .brand:hover { color: #fff; }
.has-dark-hero .brand-word i { color: var(--amber); }
.has-dark-hero .nav > ul > li > a:not(.btn), .has-dark-hero .nav .subnav-btn { color: #C9D3D0; }
.has-dark-hero .nav > ul > li > a:not(.btn):hover, .has-dark-hero .nav .subnav-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.has-dark-hero .nav a[aria-current="page"] { color: #fff; }
.has-dark-hero .nav-toggle { background: rgba(255, 255, 255, .1); }

/* --- Home hero (P2, reference mock) --------------------------------------------------------------- */
.hero--home {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--ink); color: var(--paper);
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(2.5rem, 4vw, 3.5rem);
}
/* Soft amber glow behind the headline — a pseudo-element, NOT the section's own background, so the hero's
   text stays measurable by the contrast test (P02 skips text whose ancestors carry a background image). */
.hero--home::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(55% 60% at 8% 18%, rgba(227, 155, 46, .14), transparent 70%);
}
.hero-media {
  /* D17 (Agnelo's review): the footage was boxed into a diagonal slice beside a flat Ink panel, so the copy looked
     like it sat on a "green background hiding the carousel". It now spans from 30% and FADES (mask) into the Ink
     under the copy — one continuous scene. Legibility over every scene is measured by scripts/test-hero-legibility.js. */
  position: absolute; top: 0; right: 0; bottom: 0; left: 32%; z-index: -1; background: var(--ink);
  /* Under the headline the footage is ~20% visible (scene signage ghosted behind "from" at ~35% looked busy). */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .25) 26%, #000 55%);
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .25) 26%, #000 55%);
}
.hero-media::after {   /* darken under the service cards and a touch under the header; the sides stay clear */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, rgba(15, 26, 25, .92) 0%, rgba(15, 26, 25, 0) 46%),
              linear-gradient(180deg, rgba(15, 26, 25, .45) 0%, rgba(15, 26, 25, 0) 18%);
}
.hero-poster, .hero-video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
/* The video stays transparent over the poster until it is really playing (site.js adds .is-playing). */
.hero-video { opacity: 0; transition: opacity 600ms var(--ease-out); }
.hero-video.is-playing { opacity: 1; }
.hero-toggle {
  position: absolute; top: 1rem; right: 1rem; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line-dark-2); background: rgba(15, 26, 25, .66); color: #fff;
  transition: background-color var(--dur-hover) var(--ease-out);
}
.hero-toggle:hover { background: rgba(15, 26, 25, .88); }
.hero-toggle[hidden] { display: none; }   /* display:grid above would override [hidden]: without JS a dead button showed */
.hero-toggle .icon { width: 1.1rem; height: 1.1rem; }
.hero-toggle .icon-play, .hero-toggle.is-paused .icon-pause { display: none; }
.hero-toggle.is-paused .icon-play { display: block; }

.hero-home-grid .hero-copy { max-width: 34.5rem; }   /* stays clear of the footage's diagonal at 1280–1440 */
.hero--home h1 { color: #fff; font-size: clamp(2.6rem, 4.7vw, 4.3rem); line-height: 1.03; margin-bottom: .45em; }
.hero--home h1 em { color: var(--amber); }
.hero--home .lede { color: #D3DDDA; max-width: 34ch; }
.hero--home .eyebrow { color: var(--amber); }
.eyebrow--rule { display: flex; align-items: center; gap: .9rem; }
.eyebrow--rule::before { content: ""; width: 2.5rem; height: 1px; background: currentColor; opacity: .7; }


.proof { list-style: none; margin: 2.6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.1rem 0; }
.proof li {
  display: flex; align-items: center; gap: .7rem; padding: 0 1.4rem; line-height: 1.25;
  font-family: var(--font-display); font-weight: 500; font-size: .92rem; color: #D3DDDA;
  border-left: 1px solid var(--line-dark-2);
}
.proof li:first-child { padding-left: 0; border-left: 0; }
.proof .icon { color: var(--amber); width: 1.75rem; height: 1.75rem; }
.hero-tagline {
  display: flex; align-items: center; gap: .7rem; margin: 2.4rem 0 0;
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: var(--text-mid);
}
.hero-tagline::after { content: ""; width: 4rem; height: 1px; background: currentColor; opacity: .6; }

/* Service cards — overlap the footage, as in the reference */
.svc-cards { list-style: none; margin: clamp(2.5rem, 5vw, 4rem) 0 0; padding: 0;
             display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.svc-card {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--paper);
  background: var(--ink-850); border: 1px solid var(--line-dark-2); border-radius: 12px; overflow: hidden;
  transition: transform var(--dur-hover) var(--ease-out), border-color var(--dur-hover) var(--ease-out),
              box-shadow var(--dur-hover) var(--ease-out);
}
.svc-card:hover { color: var(--paper); }
.svc-card-media { display: block; aspect-ratio: 16 / 8; overflow: hidden; background: var(--slate); }
.svc-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
.svc-card-media--type {
  display: flex; flex-wrap: wrap; align-content: center; gap: .45rem; padding: 1rem 1.2rem; background: var(--ink-800);
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: #C3D2CE;
}
.svc-card-media--type span { border: 1px solid var(--line-dark-2); border-radius: var(--radius); padding: .35rem .55rem; }
.svc-card-body { display: grid; gap: .55rem; padding: 1.1rem 1.2rem 1.3rem; }
.svc-card-head { display: flex; align-items: center; gap: .65rem; }
.svc-card-head .icon { color: var(--amber); width: 1.4rem; height: 1.4rem; }
.svc-card-title { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; color: #fff; }
.svc-card-go {
  margin-left: auto; width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-dark-2); color: #fff;
  transition: background-color var(--dur-hover) var(--ease-out), color var(--dur-hover) var(--ease-out), border-color var(--dur-hover) var(--ease-out);
}
.svc-card-go .arrow { width: .95rem; height: .95rem; transition: transform var(--dur-hover) var(--ease-out); }
.svc-card-text { font-size: .95rem; line-height: 1.5; color: #C3CDCA; }
@media (hover: hover) and (pointer: fine) {
  .svc-card:hover { transform: translate3d(0, -4px, 0); border-color: rgba(227, 155, 46, .55); box-shadow: 0 22px 40px -22px rgba(0, 0, 0, .8); }
  .svc-card:hover .svc-card-media img { transform: scale(1.05); }
  .svc-card:hover .svc-card-go { background: var(--amber); border-color: var(--amber); color: var(--ink); }
  .svc-card:hover .svc-card-go .arrow { transform: translate3d(2px, 0, 0); }
}
.svc-card:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

/* --- Dark service heroes (P3, D12): same layout as before (copy · photo · board), on Ink -------- */
.hero--dark { position: relative; isolation: isolate; overflow: hidden; background: var(--ink); color: var(--paper); }
.hero--dark::before {   /* glow on a pseudo-element so the contrast test can still measure the hero text */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 60% at 6% 12%, rgba(227, 155, 46, .13), transparent 70%);
}
.hero--dark h1 { color: #fff; }
.hero--dark h1 em { color: var(--amber); }
.hero--dark .lede { color: #D3DDDA; }
.hero--dark .eyebrow { color: var(--amber); }
.hero--dark .hero-photo { box-shadow: 0 26px 50px -22px rgba(0, 0, 0, .75); }
.hero--dark .board { box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .7); }

/* About hero (D12b): two photos in one frame — where it began (steam car care), what followed (kitchens) */
.hero-duo { position: relative; aspect-ratio: 1 / .92; }
.hero-duo > picture { position: absolute; display: block; overflow: hidden; border-radius: 12px; aspect-ratio: 5 / 4;
                      background: var(--slate); box-shadow: 0 26px 50px -22px rgba(0, 0, 0, .75); }
.hero-duo > picture img { width: 100%; height: 100%; object-fit: cover; }
.hero-duo-a { top: 0; left: 0; width: 78%; }
.hero-duo-b { right: 0; bottom: 0; width: 56%; border: 4px solid var(--ink); }
/* Two dark bands in a row (Work with us: hero → enquiry) need a seam, or they read as one block */
.hero--dark + .section--enquiry, .hero--dark + .section--ink { border-top: 1px solid var(--line-dark-2); }

/* Kitchens photo band (P3) */
.photo-band { padding: 0 0 clamp(3rem, 6vw, 5.5rem); }
.photo-band-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.photo-band-item { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 12px; background: var(--slate); }
.photo-band-item img { width: 100%; height: 100%; object-fit: cover; }

/* Consultancy practice menu (P3): sticks under the header; site.js marks the practice in view */
.practice-nav {
  position: sticky; top: var(--header-h); z-index: 40;
  background: rgba(241, 244, 242, .96); backdrop-filter: saturate(160%) blur(8px); border-bottom: 1px solid var(--rule);
}
.practice-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; height: calc(var(--practice-h) - 1px);
                   overflow-x: auto; scrollbar-width: none; }
.practice-nav ul::-webkit-scrollbar { display: none; }
.practice-nav a {
  display: flex; align-items: center; height: 100%; white-space: nowrap; padding: 0 .8rem; text-decoration: none;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--slate);
  transition: color var(--dur-hover) var(--ease-out), box-shadow var(--dur-hover) var(--ease-out);
}
.practice-nav a:hover { color: var(--ink); }
.practice-nav a[aria-current="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--amber); }
html:has(.practice-nav) { scroll-padding-top: calc(var(--header-h) + var(--practice-h)); }   /* lands under both bars */

/* About: the team photo (P4) */
.team-band { display: block; margin: 0 0 clamp(2rem, 4vw, 3rem); aspect-ratio: 1280 / 560; overflow: hidden;
             border-radius: 12px; background: var(--slate); }
.team-band img { width: 100%; height: 100%; object-fit: cover; }

/* Contact: branded CV drop zone over the REAL file input (P4). The input is transparent and fills the zone, so
   click, keyboard and drag-and-drop reach it natively; nothing here replaces the browser's own file handling. */
.file-drop {
  position: relative; border: 1.5px dashed rgba(241, 244, 242, .34); border-radius: 10px; background: rgba(255, 255, 255, .04);
  transition: border-color var(--dur-hover) var(--ease-out), background-color var(--dur-hover) var(--ease-out);
}
.field .file-drop-input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; opacity: 0; cursor: pointer; }
.file-drop-face {
  display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: 1.5rem 1rem;
  text-align: center; pointer-events: none; color: #C3D2CE; font-size: .95rem; line-height: 1.4;
}
.file-drop-face .icon { color: var(--amber); width: 1.8rem; height: 1.8rem; }
.file-drop-browse { color: var(--amber); text-decoration: underline; text-underline-offset: 3px; }
.file-drop-name { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .04em; color: #fff; }
.file-drop-name:empty { display: none; }
.file-drop:hover, .file-drop.is-dragover { border-color: var(--amber); background: rgba(227, 155, 46, .08); }
.file-drop:focus-within { outline: 3px solid var(--amber); outline-offset: 2px; }
.file-drop.has-file { border-style: solid; border-color: rgba(227, 155, 46, .65); }

/* Ventures — a static row (D14) */
.strip-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 3rem; }
.strip-inner .strip-label { margin: 0; }
.ventures { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .75rem clamp(2rem, 5vw, 4rem); }
.ventures li {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 2vw, 1.4rem);
  letter-spacing: -.01em; color: var(--slate-2);
}

/* --- Sections ------------------------------------------------------------ */

.section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.section--ink { background: var(--ink); color: var(--paper); }
.section--slate { background: var(--slate); color: var(--paper); }
.section--ink h2, .section--ink h3, .section--slate h2, .section--slate h3 { color: #fff; }
.section--ink .lede, .section--slate .lede { color: #C3D2CE; }
.section--ink .eyebrow, .section--slate .eyebrow { color: var(--amber); }
.section--ink .prose, .section--slate .prose { color: #C9DAD6; }
.section--ink a, .section--slate a { color: var(--amber); }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3rem); }

/* --- Dockets ------------------------------------------------------------- */

.dockets { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.dockets--2 { grid-template-columns: repeat(2, 1fr); }

.docket {
  background: var(--card); border: 1px solid var(--rule);
  border-top: 3px solid var(--slate-2); border-radius: var(--radius);
  padding: 1.4rem 1.35rem 1.5rem; display: flex; flex-direction: column; gap: .55rem;
}
.docket--amber { border-top-color: var(--amber); }
/* Card with a media strip on top, bleeding to the card edges */
.docket-media {
  display: block; margin: -1.4rem -1.35rem .65rem; aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--slate);
}
.docket-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Consultancy has no photograph: a typographic tile in the same slot, so the three cards align */
.docket-media--type {
  background: var(--ink); color: #C3D2CE; display: flex; flex-wrap: wrap; align-content: center;
  gap: .45rem; padding: 1.4rem 1.35rem;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
}
.docket-media--type span { border: 1px solid rgba(255,255,255,.22); border-radius: var(--radius); padding: .4rem .6rem; }
.docket-media--type span:first-child { border-color: var(--amber); color: var(--amber); }
.docket-meta { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.docket h3 { margin: 0; }
.docket p { font-size: .97rem; color: var(--slate); }
.docket ul { margin: .2rem 0 0; padding-left: 1.05rem; font-size: .95rem; color: var(--slate); }
.docket li { margin-bottom: .3rem; }
.docket-link { margin-top: auto; padding-top: .5rem; }

.section--ink .docket, .section--slate .docket { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.16); }
.section--ink .docket p, .section--slate .docket p,
.section--ink .docket ul, .section--slate .docket ul { color: #C9DAD6; }
.section--ink .docket .code, .section--slate .docket .code { color: var(--amber); }
/* On the slate band the translucent card lightens the background: amber there is 4.08:1 (fails AA at 11.5px);
   amber-300 is 5.12:1 (measured by test P02, 2026-10-20). */
.section--slate .docket .code { color: var(--amber-300); }

/* --- Founder ------------------------------------------------------------- */

.founder {
  display: grid; grid-template-columns: 128px 1fr; gap: 1.75rem; align-items: start;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.16);
  border-top: 3px solid var(--amber); border-radius: var(--radius); padding: 1.6rem 1.5rem;
}
.founder-mark { background: rgba(255,255,255,.06); border-radius: var(--radius); padding: 1.1rem; }
.founder-mark svg { width: 100%; height: auto; display: block; }
.founder-body h3 { margin: .35rem 0 .7rem; color: #fff; }
.founder-body p { color: #C9DAD6; font-size: 1rem; }
.founder-body .code { color: var(--amber); }

/* --- Prose / layout ------------------------------------------------------ */

.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.8em; }
.prose ul { padding-left: 1.15rem; }
.prose li { margin-bottom: .45rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.split--sticky > :first-child { position: sticky; top: 100px; }

.note {
  border-left: 3px solid var(--amber); background: #FBF3E4;
  padding: 1rem 1.15rem; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .95rem; color: var(--slate); margin-top: 1.25rem;
}
.note--dark { background: rgba(227,155,46,.12); color: #C9DAD6; }

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem; font-family: var(--font-mono);
  font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  padding: .95rem 1.5rem; border-radius: var(--radius); min-height: 44px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color var(--dur-hover) var(--ease-out), color var(--dur-hover) var(--ease-out),
              border-color var(--dur-hover) var(--ease-out), transform 120ms var(--ease-out);
}
.btn:active { transform: scale(.98); }
.btn--sm { padding: .7rem 1.05rem; }
.btn .arrow { width: 1em; height: 1em; flex: none; transition: transform var(--dur-hover) var(--ease-out); }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--slate-2); color: #fff; }
.btn--amber { background: var(--amber); color: var(--ink); }
.btn--amber:hover { background: var(--amber-300); color: var(--ink); }   /* was white on amber-dk: 3.2:1 */
.btn--ghost { border-color: var(--rule); color: var(--slate); background: transparent; }
.btn--ghost:hover { border-color: var(--slate); color: var(--ink); }
/* Must come AFTER .btn: same specificity, and .btn resets border to transparent (found 2026-10-20). */
.btn--ghost-light { border-color: rgba(241, 244, 242, .36); color: var(--paper); background: transparent; }   /* .16 was invisible on Ink */
.btn--ghost-light:hover { border-color: var(--paper); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* --- Enquiry blocks ------------------------------------------------------ */

.section--enquiry { background: var(--ink); color: var(--paper); }
.section--enquiry h2 { color: #fff; }
.section--enquiry .eyebrow { color: var(--amber); }
.enq { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.enq-copy p { color: #C3D2CE; max-width: 40ch; }
.enq-form {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.16);
  border-top: 3px solid var(--amber); border-radius: var(--radius); padding: 1.5rem;
}

.form { display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field label {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.section--enquiry .field label, .section--ink .field label { color: #A9BCB8; }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 1rem; padding: .75rem .85rem;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--card); color: var(--ink); width: 100%;
}
.field textarea { resize: vertical; min-height: 96px; }
/* Safari draws a native <select> as a 28px pill beside 48px inputs (seen 2026-10-20, WebKit only).
   Same box as the inputs, with a drawn chevron. Checked by test P06 in both engines. */
.field select {
  -webkit-appearance: none; appearance: none; padding-right: 2.5rem; min-height: 3rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2335605B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; background-size: 12px 8px;
}
.field input:not([type="file"]) { min-height: 3rem; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--amber); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field-hint { font-size: .82rem; color: var(--muted); margin: 0; }
.section--ink .field-hint { color: #A9BCB8; }
.field input[type="file"] { padding: .6rem; background: var(--card); }
.hp { position: absolute; left: -9999px; }

/* Form result notice — written by site.js from the handler's redirect (?zd=…). A solid card with its
   own ink text, so it reads the same on the dark enquiry sections and on light ones. */
.form-note {
  margin: 0; padding: .85rem 1rem; border-radius: var(--radius);
  background: var(--card); color: var(--ink); border-left: 4px solid var(--slate-2);
  font-size: .95rem; line-height: 1.45;
}
.form-note:focus { outline: none; }
.form-note--ok  { border-left-color: var(--slate-2); }
.form-note--err { border-left-color: var(--amber-dk); }
.form-note strong { font-family: var(--font-display); }
.field [aria-invalid="true"] { border-color: var(--amber-dk); box-shadow: 0 0 0 1px var(--amber-dk); }
.form button[type="submit"][disabled] { opacity: .65; cursor: progress; }

/* --- Footer -------------------------------------------------------------- */

.site-footer { background: var(--ink); color: #A9BCB8; padding: clamp(2.5rem, 5vw, 4rem) 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer .brand { color: #fff; }
.footer-line { font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 1.02rem; margin: .9rem 0 .4rem; letter-spacing: 0; }
.footer-small { font-size: .9rem; max-width: 34ch; margin: 0; }
.site-footer h4 {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--amber); font-weight: 400; margin-bottom: .9rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: #D5E1DE; text-decoration: none; font-size: .93rem; }
.site-footer a:hover { color: var(--amber); text-decoration: underline; }
.footer-note {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.14);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
}

/* --- Motion (design system v2, REVAMP_PLAN §5) ---------------------------------------------------------
   Content is hidden ONLY when (a) JavaScript is running — the inline <head> script adds .js — and (b) the
   visitor has not asked for reduced motion. Without JS, or with reduce, everything is simply visible.
   (The handoff hid .reveal unconditionally, so a JS failure left sections blank.)
   Never put .reveal on a hero headline or hero image: an invisible LCP element delays Largest Contentful Paint. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0; transform: translate3d(0, var(--reveal-shift), 0);
    transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out);
    transition-delay: calc(var(--i, 0) * var(--stagger));
  }
  .js .reveal.in { opacity: 1; transform: none; }

  /* Hero board rows settle in once on load (CSS only — no JS needed, so no .js guard). */
  .board-row { animation: rowIn 560ms var(--ease-out) both; }
  .board-row:nth-child(2) { animation-delay: 70ms; }
  .board-row:nth-child(3) { animation-delay: 140ms; }
  .board-row:nth-child(4) { animation-delay: 210ms; }
  .board-row:nth-child(5) { animation-delay: 280ms; }
  .board-row:nth-child(6) { animation-delay: 350ms; }
  @keyframes rowIn { from { opacity: 0; transform: translate3d(0, 10px, 0); } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
                           transition-duration: .01ms !important; }
}

/* --- Hover language (mouse/trackpad only: touch devices would keep a "stuck" hover after a tap).
   Lift is reserved for cards that lead somewhere — lifting a card you cannot act on promises a click. */
@media (hover: hover) and (pointer: fine) {
  .docket { transition: transform var(--dur-hover) var(--ease-out), box-shadow var(--dur-hover) var(--ease-out),
                        border-color var(--dur-hover) var(--ease-out); }
  .docket:has(.docket-link a):hover { transform: translate3d(0, -4px, 0); box-shadow: var(--shadow-2); }
  .docket-media img { transition: transform 600ms var(--ease-out); }
  .docket:has(.docket-link a):hover .docket-media img { transform: scale(1.05); }
  .btn:hover .arrow { transform: translate3d(4px, 0, 0); }
  a.board-row:hover .code { transform: translate3d(4px, 0, 0); }
  .docket-link a { transition: color var(--dur-hover) var(--ease-out); }
}
/* Keyboard users get the same lift on the card whose link has focus. */
.docket:has(.docket-link a:focus-visible) { transform: translate3d(0, -4px, 0); box-shadow: var(--shadow-2); }

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 980px) {
  .hero-grid, .split, .enq { grid-template-columns: 1fr; }
  .split--sticky > :first-child { position: static; }
  .dockets, .dockets--2 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-photo { aspect-ratio: 16 / 11; }
  .hero-visual .board { margin: -3rem .75rem 0; }
  /* Home hero stacks: copy → footage → cards. The footage becomes a block (no diagonal). */
  .hero--home { display: flex; flex-direction: column; padding-top: clamp(2.5rem, 7vw, 4rem); }
  .hero--home > .hero-home-grid { order: 1; }
  .hero--home > .hero-media { order: 2; position: relative; left: auto; width: auto; margin: 2rem var(--gutter) 0;
    aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; -webkit-mask-image: none; mask-image: none; }
  .hero--home > .wrap:last-child { order: 3; }
  .hero-media::after { background: linear-gradient(0deg, rgba(15, 26, 25, .35) 0%, rgba(15, 26, 25, 0) 40%); }
  .hero-home-grid .hero-copy { max-width: none; }
  .svc-cards { grid-template-columns: 1fr; margin-top: 1.5rem; }
}

@media (max-width: 780px) {
  .nav-toggle { display: inline-block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--card); border-bottom: 1px solid var(--rule);
    padding: .75rem var(--gutter) 1.25rem;
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav a, .nav .subnav-btn { padding: .8rem .25rem; width: 100%; text-align: left; }
  .subnav { position: static; border: 0; box-shadow: none; padding: 0 0 .5rem 1rem; }
  .nav .nav-cta { margin: .75rem 0 0; }
  .practice-nav { top: 0; }                         /* the header is not sticky on phones */
  html:has(.practice-nav) { scroll-padding-top: var(--practice-h); }
  .has-dark-hero .nav { background: var(--ink-850); border-bottom-color: var(--line-dark-1); }
  .has-dark-hero .nav .subnav a { color: #C9D3D0; }
  .has-dark-hero .nav .subnav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
  .proof { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .proof li { flex-direction: column; align-items: flex-start; gap: .5rem; padding: 0; border-left: 0; font-size: .85rem; }
  .hero-tagline { letter-spacing: .16em; }
  .hero-tagline::after { display: none; }
  :root { --reveal-shift: 16px; }
  .site-header { position: relative; }
}

@media (max-width: 640px) {
  .dockets, .dockets--2 { grid-template-columns: 1fr; }
  .photo-band-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .founder { grid-template-columns: 1fr; }
  .founder-mark { width: 96px; }
}
