/* ============================================================
   andBeyond.digital — single stylesheet
   Brand: blue crane identity. Crane blue (#85C0D0) is a DARK
   THEME accent only — on light surfaces the accent role is
   petrol (#15597C). No gold. No inline styles (CSP).
   ============================================================ */

/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/assets/fonts/figtree-latin-v1.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Metric-tuned fallback to keep CLS at zero while Figtree loads */
@font-face {
  font-family: 'Figtree Fallback';
  src: local('Helvetica Neue'), local('Arial');
  size-adjust: 101%;
  ascent-override: 94%;
  descent-override: 25%;
  line-gap-override: 0%;
}

/* ---------- Design tokens ----------
   Dark is the default theme (:root). html.theme-light overrides
   the colour tokens; components only ever consume tokens.
   Crane blue (#85C0D0) carries meaning on dark ONLY — the light
   theme swaps the accent role to petrol (#15597C). */
:root {
  color-scheme: dark;

  --bg: #08080D;            /* page */
  --surface: #1D1E2C;       /* cards, banners */
  --surface-raised: #262838;
  --band: #1D1E2C;          /* full-width section bands */
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.74);
  --subtle: rgba(255, 255, 255, 0.55);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);

  --accent: #85C0D0;        /* crane blue */
  --accent-strong: #A5D4E1; /* link hover */
  --accent-soft: rgba(133, 192, 208, 0.14);
  --accent-border: rgba(133, 192, 208, 0.35);

  --cta: #0E7C6B;           /* teal — 5.1:1 with white text, both themes */
  --cta-hover: #0A6B59;
  --on-cta: #ffffff;         /* label on CTA teal */
  --cta-glow: rgba(14, 124, 107, 0.30);
  --banner-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);

  --chip-bg: rgba(8, 8, 13, 0.55);
  --promise-bg: rgba(255, 255, 255, 0.03);
  --header-bg: rgba(8, 8, 13, 0.82);
  --menu-bg: rgba(8, 8, 13, 0.94); /* denser than the bar: nested backdrop blurs composite unreliably */
  --crane-stroke: #85C0D0;
  /* C3NTR film phone: a physical object, so the metal and glass read the
     same in both themes; only the drop shadow follows the page */
  --phone-metal: linear-gradient(180deg, #6A6A72 0%, #34343A 5%, #1E1E23 30%, #17171B 50%, #1E1E23 70%, #34343A 95%, #5E5E66 100%);
  --phone-key: linear-gradient(90deg, #2A2A30, #55555D 55%, #2F2F35);
  --phone-key-left: linear-gradient(270deg, #2A2A30, #55555D 55%, #2F2F35);
  --phone-glass: #040405;
  --phone-glass-edge: 0 0 0 1px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  --phone-screen: #0B0B0D;
  --phone-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.02) 9%, rgba(255, 255, 255, 0) 20%);
  --phone-sheen-edge: rgba(255, 255, 255, 0.04);
  --phone-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), inset 0 1.5px 1px rgba(255, 255, 255, 0.22),
    0 2px 4px rgba(0, 0, 0, 0.45), 0 28px 56px -18px rgba(0, 0, 0, 0.78), 0 64px 120px -40px rgba(0, 0, 0, 0.6);
  --film-btn-bg: rgba(14, 14, 18, 0.56);       /* glass play button, always over dark footage */
  --film-btn-bg-hover: rgba(40, 40, 46, 0.66);
  --film-btn-border: rgba(255, 255, 255, 0.34);
  --film-btn-fg: #ffffff;
  --film-focus: #85C0D0;                       /* crane blue: the footage is dark in both themes */

  --hero-glow-1: rgba(133, 192, 208, 0.13); /* crane blue wash */
  --hero-glow-2: rgba(14, 124, 107, 0.11);  /* teal undertone */
  --hero-glow-3: rgba(21, 89, 124, 0.18);   /* petrol depth */

  --font: 'Figtree', 'Figtree Fallback', system-ui, -apple-system, sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --pill: 999px;

  --max-w: 1100px;
  --pad-x: clamp(20px, 5vw, 48px);
  --section-py: clamp(72px, 9vw, 128px);

  --focus-ring: var(--accent);
}

html.theme-light {
  color-scheme: light;

  --bg: #ffffff;
  --surface: #ffffff;
  --surface-raised: #E9ECF2;
  --band: #F2F4F8;
  --text: #1D1E2C;
  --muted: rgba(29, 30, 44, 0.78);
  --subtle: rgba(29, 30, 44, 0.66);  /* 5.3:1 on white, 5.1:1 on band */
  --border: rgba(29, 30, 44, 0.14);
  --border-strong: rgba(29, 30, 44, 0.28);

  --accent: #15597C;        /* petrol — crane blue fails on light */
  --accent-strong: #0F4A68;
  --accent-soft: rgba(21, 89, 124, 0.10);
  --accent-border: rgba(21, 89, 124, 0.38);

  --chip-bg: #ffffff;
  --banner-shadow: 0 18px 50px rgba(29, 30, 44, 0.18);
  --cta-glow: rgba(14, 124, 107, 0.22);
  --promise-bg: rgba(29, 30, 44, 0.04);
  --header-bg: rgba(255, 255, 255, 0.86);
  --menu-bg: rgba(255, 255, 255, 0.95);
  --crane-stroke: #558F9F;
  --phone-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), inset 0 1.5px 1px rgba(255, 255, 255, 0.22),
    0 2px 4px rgba(29, 30, 44, 0.25), 0 28px 56px -18px rgba(29, 30, 44, 0.40), 0 64px 120px -40px rgba(29, 30, 44, 0.28);

  /* Decorative only on light (crane blue carries no meaning here) */
  --hero-glow-1: rgba(133, 192, 208, 0.16);
  --hero-glow-2: rgba(14, 124, 107, 0.07);
  --hero-glow-3: rgba(21, 89, 124, 0.08);

  --focus-ring: var(--accent);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; /* kill the grey tap flash on Chrome Android */
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4, p { margin: 0 0 0.6em; overflow-wrap: break-word; }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--cta); color: var(--on-cta); }

/* Screen reader only text (e.g. "opens in a new tab") */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--cta);
  color: var(--on-cta);
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus-visible { left: 0; }

/* ---------- Type scale ---------- */
.t-hero {
  font-size: clamp(2.5rem, 6.5vw, 4.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.022em;
  margin-bottom: 0.45em;
}
.t-h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.t-h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.4em;
}
.eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1em;
}
.lead { font-size: clamp(1.0625rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 42em; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; color: var(--subtle); }

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: var(--pad-x);
}
.section { padding-block: var(--section-py); }
.section-head { max-width: 46em; margin-bottom: clamp(36px, 5vw, 56px); }

/* ---------- Header / nav ----------
   Drawer header: hidden on load so the hero owns the fold, slides
   down once the visitor scrolls. The hidden state requires .js so
   no-JS visitors get a normal sticky header. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  transition: background 250ms ease, border-color 250ms ease;
  border-bottom: 1px solid transparent;
}
.js .site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
}
/* Mobile only: the drawer (hidden at top, slides in on scroll).
   The shown state keeps a 3D transform (translate3d, not none) so the
   fixed header stays on its own compositing layer — without it, mobile
   Chrome re-composites the un-transformed fixed bar against the
   scrolling layer and it rides the page instead of sticking. */
@media (max-width: 960px) {
  .js .site-header {
    transform: translate3d(0, -100%, 0);
    visibility: hidden;
    will-change: transform;
    backface-visibility: hidden;
  }
  .js .site-header.scrolled,
  .js .site-header.nav-open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
  }
}
.site-header.scrolled,
.site-header.nav-open {
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}
/* Desktop: full-width bar; logo left, links truly centred, toggle + CTA right.
   The CTA keeps its grid space and fades via opacity only, so nothing
   shifts when it appears. */
@media (min-width: 961px) {
  .site-header .container { max-width: none; }
  .nav-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  .nav-row .brand { justify-self: start; }
  .nav-row .nav-links { justify-self: center; }
  .nav-row .nav-right { justify-self: end; }
  .nav-right { display: inline-flex; align-items: center; gap: 14px; }
  /* visibility as well as opacity: a faded out CTA must not take focus */
  .nav-cta-desktop { opacity: 0; visibility: hidden; pointer-events: none; }
  .site-header.show-cta .nav-cta-desktop { opacity: 1; visibility: visible; pointer-events: auto; }
}
/* Tablet: tighter bar so the CTA never wraps */
@media (min-width: 961px) and (max-width: 1120px) {
  .nav-row { gap: 14px; }
  .nav-right { gap: 8px; }
  .nav-links { gap: clamp(10px, 1.8vw, 22px); }
  .nav-links a { font-size: 0.92rem; }
  .nav-cta-desktop { padding: 10px 18px; min-height: 44px; font-size: 0.95rem; }
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding-block: 5px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
}
.brand img { height: 44px; width: auto; }
.legal-header .brand img { height: 40px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 30px);
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 12px 2px;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.nav-cta {
  margin-left: 8px;
  padding: 12px 24px;
  color: var(--on-cta);
}
/* Theme toggle: header (desktop), menu panel (mobile), legal headers */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid transparent;
  border-radius: var(--pill);
  background: transparent;
  color: var(--subtle);
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
html.theme-light .theme-toggle .icon-moon { display: block; }
html.theme-light .theme-toggle .icon-sun { display: none; }

/* The header CTA pair: desktop button in the row, mobile button in the panel */
@media (min-width: 961px) {
  .nav-links .nav-cta-mobile { display: none !important; }
}
@media (max-width: 960px) {
  /* The whole right cluster (toggle + CTA) is desktop chrome; the mobile
     menu carries its own CTA and Appearance toggle */
  .nav-row .nav-right { display: none !important; }
}

/* Mobile menu — icon only, no chrome. The button lives OUTSIDE the
   header in the DOM (a fixed child of a transformed header would ride
   the drawer), pinned where it sits when the header is open. At the
   top of the page it floats at 80% opacity; when the header draws in
   it is already in place and eases to 100%. */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  opacity: 0.8;
}
.js.header-shown .menu-toggle,
.menu-toggle[aria-expanded="true"] { opacity: 1; }
.menu-toggle svg { width: 24px; height: 24px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
@media (max-width: 960px) {
  .menu-toggle {
    position: fixed;
    top: 14px;
    right: clamp(14px, 4vw, 20px);
    z-index: 60;
    transform: translateZ(0); /* own layer, so it stays pinned on mobile Chrome */
    backface-visibility: hidden;
  }
}
@media (min-width: 961px) {
  .menu-toggle { display: none; }
}

@media (max-width: 960px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px var(--pad-x) 20px;
    background: var(--menu-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
  }
  .site-header.nav-open .nav-links { display: flex; }
  .site-header.nav-open {
    background: var(--menu-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: transparent;
  }
  .nav-links a {
    font-size: 1.05rem;
    padding: 14px 4px;
  }
  .nav-links a.nav-cta {
    margin: 10px 0 0;
    justify-content: center;
  }
  .menu-extra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    color: var(--subtle);
    font-size: 0.9rem;
  }
}
@media (min-width: 961px) {
  .nav-links .menu-extra { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  background: var(--cta);
  color: var(--on-cta);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.btn:hover, .btn:focus-visible {
  background: var(--cta-hover);
  color: var(--on-cta);
}
.btn-quiet {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn-quiet:hover, .btn-quiet:focus-visible {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.cta-stack { display: inline-flex; flex-direction: column; align-items: center; }
.cta-note { margin-top: 14px; }
/* Desktop: the hero CTA stretches to the trust-line width below it and
   shares its left edge with the title and lead above (mobile stays centred). */
@media (min-width: 861px) {
  .cta-stack { align-items: stretch; }
}

/* ---------- Hero ---------- */
/* Gradient centres as registered properties so the keyframes can
   interpolate them — browsers without @property keep a static glow. */
@property --hero-x1 { syntax: '<percentage>'; inherits: false; initial-value: 22%; }
@property --hero-y1 { syntax: '<percentage>'; inherits: false; initial-value: 18%; }
@property --hero-x2 { syntax: '<percentage>'; inherits: false; initial-value: 82%; }
@property --hero-y2 { syntax: '<percentage>'; inherits: false; initial-value: 34%; }
@property --hero-x3 { syntax: '<percentage>'; inherits: false; initial-value: 55%; }
@property --hero-y3 { syntax: '<percentage>'; inherits: false; initial-value: 78%; }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: clamp(88px, 12vh, 140px) clamp(110px, 14vh, 160px);
  overflow: clip;
}
.hero > .container { width: 100%; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(48% 44% at var(--hero-x1) var(--hero-y1), var(--hero-glow-1), transparent 70%),
    radial-gradient(52% 46% at var(--hero-x2) var(--hero-y2), var(--hero-glow-2), transparent 72%),
    radial-gradient(64% 56% at var(--hero-x3) var(--hero-y3), var(--hero-glow-3), transparent 74%);
  /* Fade out before the section edge so the hero dissolves into the
     solid page background that section 2 sits on. */
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 58%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 58%, transparent 96%);
}
/* Scroll cue: a quiet chevron that pulses toward section 2.
   Static chevron without motion preference or JS. */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: clamp(16px, 4vh, 36px);
  transform: translateX(-50%);
  display: inline-flex;
  padding: 12px; /* comfortable touch target around a small icon */
  color: var(--subtle);
  transition: color 200ms ease;
}
.scroll-cue:hover, .scroll-cue:focus-visible { color: var(--text); }
.scroll-cue svg {
  width: 26px;
  height: 26px;
}
@media (max-height: 540px) {
  .scroll-cue { display: none; }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
@media (max-width: 860px) {
  /* The mobile header is hidden at the top of the page, so the hero
     needs no header clearance; tighter padding keeps the cue in view. */
  .hero { padding-block: clamp(48px, 7vh, 80px) clamp(100px, 13vh, 140px); }
  .hero-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 28px; }
  .hero-art { order: -1; max-width: 168px; }
  .hero .t-hero { font-size: clamp(3rem, 9.5vw, 4.25rem); }
  .hero .lead { margin-inline: auto; }
  .section-head { text-align: center; margin-inline: auto; }
  .section-head .lead, .after-cards { margin-inline: auto; text-align: center; }
}
.hero-art { position: relative; }
.hero-art svg { width: min(380px, 100%); height: auto; margin-inline: auto; }
.hero .lead { margin-bottom: 1.8em; }

/* ---------- Cards (What we do) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(24px, 3.5vw, 36px);
  transition: border-color 200ms ease, background 200ms ease;
}
.card:hover { border-color: var(--accent-border); }
.card .t-h3 { display: flex; align-items: center; gap: 12px; }
.card-icon {
  width: 38px;
  height: 38px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
}
.card-icon svg { width: 20px; height: 20px; }
.after-cards { margin-top: 28px; max-width: 46em; }
.promise {
  margin-top: 36px;
  padding: 22px 26px;
  border-left: 2px solid var(--accent);
  background: var(--promise-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  max-width: 52em;
}
.promise p { margin: 0; color: var(--muted); }
.promise strong { color: var(--text); }

/* ---------- C3NTR showcase ---------- */
.showcase { background: var(--band); }
.showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
@media (max-width: 860px) {
  .showcase-grid { grid-template-columns: 1fr; }
}
.chips { display: grid; gap: 12px; margin: 28px 0 32px; padding: 0; list-style: none; }
.chip {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}
.chip svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--accent); }
.chip p { margin: 0; font-size: 0.97rem; }
.chip strong { color: var(--text); }
.chip span { color: var(--muted); }

/* C3NTR film phone (ported from c3ntr.app's hero). Real app footage in a
   CSS drawn phone, no notch or island (Apple's bezel licence excludes
   websites). Never autoplays: the poster shows until Play, and the video
   src is only set on Play, so nothing heavy loads up front. */
.phone-wrap { position: relative; display: grid; justify-items: center; }
.phone {
  --phone-w: min(66vw, 300px);
  --phone-rim: max(2px, calc(var(--phone-w) * 0.012));
  --phone-bezel: calc(var(--phone-w) * 0.03);
  --phone-inset: calc(var(--phone-rim) + var(--phone-bezel));
  --phone-radius: calc(var(--phone-w) * 0.155);
  --phone-screen-radius: calc(var(--phone-radius) - var(--phone-inset));
  --phone-key-w: max(2px, calc(var(--phone-w) * 0.008));
  position: relative;
  width: var(--phone-w);
  padding: var(--phone-inset);
  border-radius: var(--phone-radius);
  background: var(--phone-metal);
  box-shadow: var(--phone-shadow);
}
.phone::before {
  content: "";
  position: absolute;
  inset: var(--phone-rim);
  border-radius: calc(var(--phone-radius) - var(--phone-rim));
  background: var(--phone-glass);
  box-shadow: var(--phone-glass-edge);
}
.phone-keys {
  position: absolute;
  top: calc(var(--phone-w) * 0.56);
  right: calc(var(--phone-key-w) * -1);
  width: var(--phone-key-w);
  height: calc(var(--phone-w) * 0.3);
  border-radius: 0 3px 3px 0;
  background: var(--phone-key);
  pointer-events: none;
}
.phone-keys::before,
.phone-keys::after {
  content: "";
  position: absolute;
  left: calc(var(--phone-w) * -1 - var(--phone-key-w));
  width: var(--phone-key-w);
  height: calc(var(--phone-w) * 0.16);
  border-radius: 3px 0 0 3px;
  background: var(--phone-key-left);
}
.phone-keys::before { top: calc(var(--phone-w) * -0.14); }
.phone-keys::after { top: calc(var(--phone-w) * 0.06); }
.phone-screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 640 / 1386;
  border-radius: var(--phone-screen-radius);
  background: var(--phone-screen);
}
.phone-sheen {
  position: absolute;
  inset: var(--phone-inset);
  border-radius: var(--phone-screen-radius);
  background: var(--phone-sheen);
  box-shadow: inset 0 0 0 1px var(--phone-sheen-edge);
  pointer-events: none;
}
.film-media {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.film-video { opacity: 0; }
[data-video="playing"] .film-video,
[data-video="paused"] .film-video { opacity: 1; }
.film-play,
.film-ctl {
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
}
.film-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: clamp(56px, calc(var(--phone-w) * 0.17), 76px);
  height: clamp(56px, calc(var(--phone-w) * 0.17), 76px);
  transform: translate(-50%, -50%);
  color: var(--film-btn-fg);
  background: var(--film-btn-bg);
  border: 1px solid var(--film-btn-border);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}
.film-play svg { width: 40%; height: 40%; transform: translateX(-4.5%); }
.film-play:hover { background: var(--film-btn-bg-hover); }
.film-play:focus-visible { outline-color: var(--film-focus); border-radius: 50%; }
/* Pause and sound sit beside the phone, never over the app's own UI */
.film-controls {
  position: absolute;
  z-index: 3;
  top: var(--phone-bezel);
  left: calc(100% + 10px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.film-play[hidden],
.film-controls[hidden] { display: none; }
.film-ctl {
  width: 44px;
  height: 44px;
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
}
.film-ctl svg { width: 18px; height: 18px; }
.film-ctl:hover { border-color: var(--accent-border); }
.film-ctl:focus-visible { border-radius: 50%; }
.film-ico-play,
.film-ico-sound,
.film-ctl[data-state="paused"] .film-ico-pause,
.film-ctl[data-state="sound"] .film-ico-muted { display: none; }
.film-ctl[data-state="paused"] .film-ico-play,
.film-ctl[data-state="sound"] .film-ico-sound { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .film-video { transition: opacity 250ms ease-out; }
  .film-play, .film-ctl { transition: background-color 200ms ease-out, border-color 200ms ease-out; }
}
.showcase-cta-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
@media (max-width: 860px) {
  .showcase-close { text-align: center; }
  .showcase-cta-row { justify-content: center; }
}

/* ---------- Selected work ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 560px) {
  .work-grid { grid-template-columns: 1fr; }
}
.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 200ms ease;
}
.work-card:hover { border-color: var(--accent-border); }
.work-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  margin-bottom: 18px;
}
.work-card h3 { font-size: 1.08rem; font-weight: 600; margin-bottom: 0.35em; }
.work-card p { color: var(--muted); font-size: 0.97rem; margin-bottom: 0.9em; }
.work-domain {
  display: inline-block;
  padding-block: 13px;
  margin-block: -8px;
  font-size: 0.85rem;
}

/* ---------- How we work ---------- */
.steps { display: grid; gap: clamp(28px, 4vw, 44px); margin: 0; padding: 0; list-style: none; }
.step {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 560px) {
  .step { grid-template-columns: 1fr; gap: 8px; }
}
.step p.step-no {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
  padding-top: 2px;
}
.step h3 { margin-bottom: 0.3em; }
.step p { color: var(--muted); max-width: 46em; margin: 0; }
.name-story {
  margin-top: clamp(48px, 6vw, 72px);
  padding: clamp(26px, 4vw, 40px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 56em;
}
.name-story p { margin: 0; font-size: clamp(1.0625rem, 1.5vw, 1.15rem); color: var(--muted); }
.name-story strong { color: var(--text); }

/* ---------- Contact ---------- */
.contact { background: var(--band); text-align: center; }
.contact .section-head { margin-inline: auto; }
.contact .lead { margin-inline: auto; }
.contact .btn { margin-top: 10px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 44px 36px;
  background: var(--bg);
}
.footer-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.footer-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--muted); }
.footer-brand img { height: 52px; width: auto; }
.footer-home { display: inline-flex; padding: 4px 0; }
.crane-on-light { display: none; }
.theme-light .crane-on-light { display: block; }
.theme-light .crane-on-dark { display: none; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; }
.footer-links a,
.footer-links button {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: var(--font);
  font-size: 0.92rem;
  line-height: inherit;
  padding: 10px 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.footer-links a:hover,
.footer-links button:hover { color: var(--text); }
.footer-legal { margin-top: 26px; text-align: center; }
.footer-legal p { margin: 0 0 8px; }
.footer-c3ntr,
.footer-legal p.footer-c3ntr { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; }
.c3ntr-link {
  display: inline-flex;
  align-items: center;
  padding-block: 12px;
  margin-block: -12px;
  opacity: 0.75;
  transition: opacity 150ms ease;
}
.c3ntr-link:hover, .c3ntr-link:focus-visible { opacity: 1; }
.c3ntr-link img { height: 16px; width: auto; }


/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  inset-inline: 16px;
  bottom: 16px;
  z-index: 90;
  margin-inline: auto;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--banner-shadow);
}
.cookie-banner p { margin: 0 0 14px; font-size: 0.95rem; color: var(--muted); }
.cookie-actions { display: flex; gap: 12px; justify-content: flex-end; }
/* Equal weight on purpose: neither choice is nudged (ICO), and CTA
   teal stays reserved for Book a Chat */
.cookie-btn {
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.cookie-btn:hover { background: var(--surface-raised); }
@media (max-width: 560px) {
  .cookie-banner { inset-inline: 10px; bottom: 10px; padding: 14px 16px; }
  .cookie-banner p { margin-bottom: 10px; font-size: 0.9rem; }
  .cookie-actions { justify-content: stretch; gap: 10px; }
  .cookie-btn { flex: 1; padding-inline: 10px; }
}

/* ============================================================
   Legal pages — themed by the same tokens as everything else.
   Dark by default, light when html.theme-light is set.
   ============================================================ */
.legal-header {
  border-bottom: 1px solid var(--border);
  padding-block: 14px;
}
.legal-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.legal-header .brand { color: var(--text); }
.legal-main { padding-block: clamp(40px, 6vw, 72px); max-width: 760px; }
.legal-main h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -0.015em; }
.legal-main h2 { font-size: 1.35rem; margin-top: 1.8em; }
.legal-main p, .legal-main li { color: var(--muted); }
.legal-main .legal-updated { color: var(--subtle); font-size: 0.9rem; }

/* ============================================================
   Motion — every rule lives inside prefers-reduced-motion:
   no-preference. Base CSS never hides content; the hidden
   initial states for reveals additionally require the
   .reveal-ready class set by script.js, so no-JS users see everything.
   ============================================================ */
.scroll-progress { display: none; }
.crane-anim .crane-lines { display: none; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* Hero gradient: glow centres drift slowly, back and forth */
  .hero::before {
    animation: hero-morph 30s ease-in-out infinite alternate;
  }
  /* script.js pauses the drift while the hero is off screen: animating
     registered custom properties recalculates style every frame */
  .hero.is-offscreen::before { animation-play-state: paused; }
  @keyframes hero-morph {
    0% {
      --hero-x1: 22%; --hero-y1: 18%;
      --hero-x2: 82%; --hero-y2: 34%;
      --hero-x3: 55%; --hero-y3: 78%;
    }
    33% {
      --hero-x1: 34%; --hero-y1: 30%;
      --hero-x2: 70%; --hero-y2: 16%;
      --hero-x3: 38%; --hero-y3: 64%;
    }
    66% {
      --hero-x1: 14%; --hero-y1: 42%;
      --hero-x2: 88%; --hero-y2: 48%;
      --hero-x3: 66%; --hero-y3: 56%;
    }
    100% {
      --hero-x1: 28%; --hero-y1: 12%;
      --hero-x2: 64%; --hero-y2: 28%;
      --hero-x3: 46%; --hero-y3: 80%;
    }
  }

  /* Hero crane: fold lines draw in, colour fades through */
  .crane-anim .crane-lines { display: block; stroke: var(--crane-stroke); }
  .crane-line {
    stroke-dashoffset: 0;
    animation: crane-draw 1s cubic-bezier(0.4, 0, 0.2, 1) both;
  }
  .crane-line:nth-of-type(1) { stroke-dasharray: 159; --len: 159; animation-delay: 0.05s; }
  .crane-line:nth-of-type(2) { stroke-dasharray: 173; --len: 173; animation-delay: 0.22s; }
  .crane-line:nth-of-type(3) { stroke-dasharray: 176; --len: 176; animation-delay: 0.40s; }
  .crane-line:nth-of-type(4) { stroke-dasharray: 97;  --len: 97;  animation-delay: 0.58s; }
  .crane-line:nth-of-type(5) { stroke-dasharray: 39;  --len: 39;  animation-delay: 0.72s; }
  .crane-anim .crane-fill {
    opacity: 0;
    animation: crane-fade 0.7s ease 1.15s forwards;
  }
  @keyframes crane-draw {
    from { stroke-dashoffset: var(--len); }
    to { stroke-dashoffset: 0; }
  }
  @keyframes crane-fade {
    to { opacity: 1; }
  }
  /* Lines hand over to the fill */
  .crane-anim .crane-lines {
    animation: crane-lines-out 0.6s ease 1.45s forwards;
  }
  @keyframes crane-lines-out {
    to { opacity: 0; }
  }

  /* Scroll cue: the chevron breathes downward, rests, repeats */
  .scroll-cue svg {
    animation: cue-pulse 3s ease-in-out infinite;
  }
  @keyframes cue-pulse {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(7px); opacity: 1; }
  }

  /* Scroll reveals — only once script.js runs (.reveal-ready on <html>) */
  .reveal-ready [data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 450ms ease, transform 450ms ease;
  }
  .reveal-ready [data-reveal].in-view {
    opacity: 1;
    transform: none;
  }
  .reveal-ready .card-grid [data-reveal]:nth-child(2),
  .reveal-ready .chips [data-reveal]:nth-child(2),
  .reveal-ready .work-grid [data-reveal]:nth-child(2) { transition-delay: 60ms; }
  .reveal-ready .chips [data-reveal]:nth-child(3),
  .reveal-ready .work-grid [data-reveal]:nth-child(3) { transition-delay: 120ms; }
  .reveal-ready .chips [data-reveal]:nth-child(4),
  .reveal-ready .work-grid [data-reveal]:nth-child(4) { transition-delay: 180ms; }

  /* CTA lift */
  .btn:hover, .btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px var(--cta-glow);
  }

  /* Header CTA fades in when the hero CTA leaves view */
  @media (min-width: 961px) {
    .nav-cta-desktop { transition: opacity 280ms ease, visibility 0s linear 280ms, background 150ms ease, transform 150ms ease; }
    .site-header.show-cta .nav-cta-desktop { transition-delay: 0s; }
  }

  /* Header drawer slides down on scroll */
  .js .site-header {
    transition: transform 380ms cubic-bezier(0.33, 1, 0.36, 1),
                visibility 380ms,
                background 250ms ease, border-color 250ms ease;
  }

  /* Mobile menu panel slides open */
  @media (max-width: 960px) {
    .site-header.nav-open .nav-links {
      animation: menu-in 220ms ease both;
    }
    @keyframes menu-in {
      from { opacity: 0; transform: translateY(-8px); }
      to { opacity: 1; transform: none; }
    }
  }

  /* Scroll progress hairline — driven by script.js with a smoothing
     lerp and clamped to [0,1], so macOS rubber-band overscroll never
     makes it jump forward and snap back. */
  .js .scroll-progress {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 60;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform-origin: 0 50%;
    transform: scaleX(0);
    will-change: transform;
  }
}

@media print {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---------- 404 ---------- */
.notfound {
  min-height: 70vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 6px;
}
.notfound img { width: 84px; margin: 0 auto 18px; }
