/* Sanford Media Partners — site styles.
   Built on the Modernist design-system tokens, retuned to the Sanford navy accent.
   Sections: tokens · base · shared components · layout chrome · pages. */

/* ═════════ Tokens ═════════ */
/* Registered so getComputedStyle returns it in px (site.js reads it for the nav colour) */
@property --dark-from { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --dark-end { syntax: "<length>"; inherits: false; initial-value: 0px; }
:root {
  --sf-bg: #fafbf8;
  --sf-ink: #19191b;
  --sf-body: #3e413f;
  --sf-muted: #535656;
  --sf-subtle: #717577;
  --sf-rule: #c1c2bd;
  --sf-tint: #e8eef6;
  --sf-tint-deep: #c9d6e8;
  /* One accent: the brand navy. On navy surfaces it flips to white (see "Navy surfaces"). */
  --sf-ui: #1f3c68;   /* cards, icons and accents: a step lighter than the navy backgrounds */
  --sf-accent: var(--sf-ui);
  --sf-accent-600: var(--sf-ui);
  --sf-accent-700: var(--sf-ui);
  --sf-navy: #001b44;
  --sf-navy-glow: #0d3474;
  --sf-sky: #8fb6e8;
  --sf-dot: #5b8fd1; /* the full stop in the wordmarks; sky blue on navy */
  --sf-wave-1: #4a6d9e;
  --sf-wave-2: #001b44;
  --sf-footer-end: var(--sf-navy);
  /* Navy ⇄ page fades travel through the brand blues rather than grey */
  --sf-fade-down: linear-gradient(180deg, var(--sf-navy) 0%, #001b44 64.0%, #011c45 66.0%, #021f49 68.0%, #04224f 70.0%, #072755 72.0%, #0b2b5d 74.0%, #0e3064 76.0%, #204073 78.0%, #2f5183 80.0%, #3b5e92 82.0%, #627da8 84.0%, #8199bd 86.0%, #98aecf 88.0%, #b6c5dc 90.0%, #d0d9e6 92.0%, #e3e8ed 94.0%, #f0f2f3 96.0%, #f7f9f7 98.0%, #fafbf8 100.0%);
  --sf-fade-out: linear-gradient(0deg, #fafbf8 calc(var(--sf-fade-len) * 0.0000), #f7f9f7 calc(var(--sf-fade-len) * 0.0556), #f0f2f3 calc(var(--sf-fade-len) * 0.1111), #e3e8ed calc(var(--sf-fade-len) * 0.1667), #d0d9e6 calc(var(--sf-fade-len) * 0.2222), #b6c5dc calc(var(--sf-fade-len) * 0.2778), #98aecf calc(var(--sf-fade-len) * 0.3333), #8199bd calc(var(--sf-fade-len) * 0.3889), #627da8 calc(var(--sf-fade-len) * 0.4444), #3b5e92 calc(var(--sf-fade-len) * 0.5000), #2f5183 calc(var(--sf-fade-len) * 0.5556), #204073 calc(var(--sf-fade-len) * 0.6111), #0e3064 calc(var(--sf-fade-len) * 0.6667), #0b2b5d calc(var(--sf-fade-len) * 0.7222), #072755 calc(var(--sf-fade-len) * 0.7778), #04224f calc(var(--sf-fade-len) * 0.8333), #021f49 calc(var(--sf-fade-len) * 0.8889), #011c45 calc(var(--sf-fade-len) * 0.9444), #001b44 calc(var(--sf-fade-len) * 1.0000));
  --sf-fade-len: clamp(360px, 38vw, 520px);
  --sf-fade-up: linear-gradient(180deg, #fafbf8 calc(var(--sf-fade-len) * 0.0000), #f7f9f7 calc(var(--sf-fade-len) * 0.0556), #f0f2f3 calc(var(--sf-fade-len) * 0.1111), #e3e8ed calc(var(--sf-fade-len) * 0.1667), #d0d9e6 calc(var(--sf-fade-len) * 0.2222), #b6c5dc calc(var(--sf-fade-len) * 0.2778), #98aecf calc(var(--sf-fade-len) * 0.3333), #8199bd calc(var(--sf-fade-len) * 0.3889), #627da8 calc(var(--sf-fade-len) * 0.4444), #3b5e92 calc(var(--sf-fade-len) * 0.5000), #2f5183 calc(var(--sf-fade-len) * 0.5556), #204073 calc(var(--sf-fade-len) * 0.6111), #0e3064 calc(var(--sf-fade-len) * 0.6667), #0b2b5d calc(var(--sf-fade-len) * 0.7222), #072755 calc(var(--sf-fade-len) * 0.7778), #04224f calc(var(--sf-fade-len) * 0.8333), #021f49 calc(var(--sf-fade-len) * 0.8889), #011c45 calc(var(--sf-fade-len) * 0.9444), #001b44 calc(var(--sf-fade-len) * 1.0000));

  /* Form fields keep the Modernist field treatment */
  --field-text: var(--sf-ink);
  --field-bg: #fff;
  --field-border: color-mix(in srgb, var(--sf-accent) 18%, #dfe5ee);

  --font: "Archivo", system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
  --max: 1152px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.25, 1.15, .5, 1);
  --lift-shadow: 0 18px 36px rgba(62, 65, 63, 0.16);

  /* Shape: buttons and the nav bar are pills; the open mobile menu uses a softer corner */
  --radius-pill: 999px;
  --radius-panel: 24px;
}

/* ═════════ Base ═════════ */
body > main { flex: 1 0 auto; display: flex; flex-direction: column; }
/* On short pages the spare height goes above the closing band, so the band
   still runs straight into the footer's gradient. */
body > main > :is(.cta-band, .home-contact):last-child { margin-top: auto; }
*, *::before, *::after { box-sizing: border-box; }

/* html carries the blue so overscroll above the hero and below the footer stays on-palette */
html { scroll-behavior: smooth; background: var(--sf-footer-end); }
body {
  margin: 0;
  min-height: 100vh;
  /* footer sits at the bottom of the window on short pages */
  display: flex;
  flex-direction: column;
  background: var(--sf-bg);
  color: var(--sf-ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  text-wrap: pretty;
}
h1, h2, h3, p { margin: 0; font-weight: 400; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--sf-accent) 30%, transparent); }
section[id] { scroll-margin-top: 110px; }

.container { max-width: var(--max); margin: 0 auto; }
.section { padding-inline: var(--gutter); }
.pt-first { padding-top: clamp(56px, 7vw, 88px); }
.pb-mid { padding-bottom: clamp(88px, 10vw, 128px); }
.pb-end { padding-bottom: clamp(100px, 12vw, 160px); }
.rule-top { border-top: 2px solid var(--sf-ink); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sf-accent-700);
  font-weight: 600;
}
.eyebrow-lg { font-size: 13px; }
.h-section { font-size: clamp(34px, 4vw, 48px); letter-spacing: -0.035em; line-height: 1.05; }

/* ═════════ Shared components ═════════ */

/* — Button (the "Sweep" primary) — */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
  background: transparent;
  color: var(--btn-fg, var(--sf-accent-700));
  border: 2px solid var(--btn-line, var(--sf-accent));
  border-radius: var(--radius-pill);
  transition: transform 260ms var(--ease-out), color 260ms ease;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--btn-fill, var(--sf-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms var(--ease-out);
}
.btn > span { display: inline-block; transition: transform 260ms var(--ease-out); }
.btn:hover { color: var(--btn-fg-hover, #fff); text-decoration: none; }
.btn:hover::before { transform: scaleX(1); }
.btn:hover > span { transform: translateX(4px); }
.btn:active { transform: scale(.98); }
.btn-lg { padding: 16px 20px; font-size: 15px; min-width: 240px; }

/* — "Read more" link with nudging arrow — */
.more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sf-accent-700);
  transition: font-size 220ms ease, font-weight 220ms ease;
}
.more > span { display: inline-block; transition: transform 220ms ease; }
a.more:hover, .card:hover .more { font-weight: 800; font-size: 16px; text-decoration: none; }
a.more:hover > span, .card:hover .more > span { animation: sf-push 700ms ease-in-out infinite; }
@keyframes sf-push { 0%, 100% { transform: translateX(2px); } 50% { transform: translateX(8px); } }

/* — Photo with Unsplash credit chip — */
.photo {
  position: relative;
  overflow: hidden;
  background: rgba(127, 127, 127, .08);
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
}
.credit {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 3;
  max-width: calc(100% - 12px);
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font: 10px/1.2 system-ui, -apple-system, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.credit a:hover { text-decoration: underline; }

/* — Card: whole surface is a link via a stretched title anchor — */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--sf-bg);
  transition: transform 300ms var(--ease-spring), box-shadow 300ms ease;
}
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-link:hover { text-decoration: none; }
.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible) { outline: 2px solid var(--sf-accent); outline-offset: 2px; }

/* — Article card grid (Insights library + home teaser) — */
.articles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 48px 32px;
}
.articles .card { gap: 14px; padding: 12px; margin: -12px; }
.articles .card:hover { transform: scale(1.025); box-shadow: var(--lift-shadow); z-index: 2; }
.articles .card[hidden] { display: none; }
.articles .photo { height: 240px; }
.articles h3 { font-size: 22px; letter-spacing: -0.02em; line-height: 1.25; }
.articles p { font-size: 15px; line-height: 1.6; color: var(--sf-body); }

.articles-teaser { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 32px; }
.articles-teaser .card { gap: 16px; }
.articles-teaser .photo { height: 280px; }
.articles-teaser h3 { font-size: 24px; line-height: 1.2; }

/* — Form fields — */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form .full { grid-column: 1 / -1; }
.field > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
  color: var(--sf-ink);
}
.input {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  color: var(--field-text);
  caret-color: var(--sf-accent);
  background: var(--field-bg);
  border: 1.5px solid var(--field-border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(7, 26, 54, 0.04);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}
.input::placeholder { color: color-mix(in srgb, var(--sf-muted) 70%, transparent); }
.input:hover { border-color: color-mix(in srgb, var(--sf-accent) 40%, #dfe5ee); }
.input:focus-visible {
  outline: none;
  border-color: var(--sf-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--sf-accent) 16%, transparent);
}
/* Only flag a field once the visitor has interacted with it */
.input:user-invalid { border-color: #d64545; box-shadow: 0 0 0 4px rgba(214, 69, 69, 0.12); }
select.input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%231f3c68' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}
textarea.input { min-height: 132px; resize: vertical; }
/* Enquiry forms sit on a white card that lifts off the navy */
.form-panel {
  gap: 18px 16px;
  padding: clamp(24px, 3vw, 40px);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-panel, 24px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 28px 60px -32px rgba(7, 26, 54, 0.35);
}
.form-panel .btn-lg { margin-top: 6px; }
/* Honeypot field: off-screen for people, still present for bots */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: 14px; color: var(--sf-body); margin-top: 12px; }
.form-status:empty { display: none; }

/* ═════════ Layout chrome ═════════ */

/* — Navigation — */
.nav-spacer { height: 94px; }
.nav-wrap {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 24px var(--gutter) 0;
  pointer-events: none;
}
.nav-wrap > .container { pointer-events: auto; }
.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 14px 14px 14px 28px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  transition: background 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}
.nav.is-scrolled {
  /* Clear "liquid glass": mostly transparent, blurred and brightened behind, with a lit top edge */
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.06) 100%);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  backdrop-filter: blur(20px) saturate(1.8);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1),
    0 10px 30px rgba(0, 20, 50, 0.12);
}
/* Over the light page content the glass catches more light and the nav switches to dark text
   (site.js sets .on-light from what is behind the nav). */
.nav.is-scrolled.on-light {
  --sf-ink: #19191b;
  --sf-body: #3e413f;
  --sf-accent: #1f3c68;
  --sf-wave-1: #4a6d9e;
  --sf-wave-2: #001b44;
  --btn-fg: #1f3c68;
  --btn-line: #1f3c68;
  --btn-fill: #1f3c68;
  --btn-fg-hover: #fff;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.66) 0%, rgba(255, 255, 255, 0.42) 100%);
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(255, 255, 255, 0.3),
    0 10px 30px rgba(0, 20, 50, 0.1);
}
.nav-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--sf-ink); justify-self: start; min-width: 0; }
.nav-brand:hover { text-decoration: none; }
.nav-brand .brand-mark { flex: none; display: block; }
.nav-brand { touch-action: pan-y; }
.nb-word { font-weight: 800; font-size: 18px; letter-spacing: -0.03em; line-height: 1; color: var(--sf-ink); }
.nb-dot { color: var(--sf-dot); }
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 3vw, 36px);
  font-size: 14px;
  color: var(--sf-body);
}
.nav-links a {
  display: inline-block;
  transform-origin: center;
  transition: transform 180ms ease, font-weight 180ms ease, color 180ms ease;
}
.nav-links a:hover {
  font-weight: 700;
  transform: scale(1.1);
  color: var(--sf-ink);
  text-decoration: none;
}
.nav-links a[aria-current="page"] {
  color: var(--sf-ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: var(--sf-accent);
}
.nav-cta { display: flex; justify-content: flex-end; }
.nav-cta .btn { padding: 12px 18px; min-width: 160px; }
.nav-toggle { display: none; }

/* — Inner-page header — */
.page-header {
  background: radial-gradient(ellipse 70% 70% at 85% 0%, var(--sf-navy-glow) 0%, transparent 70%), var(--sf-fade-out);
  padding: 0 var(--gutter) calc(var(--sf-fade-len) + clamp(48px, 6vw, 80px));
  --dark-end: var(--sf-fade-len); /* site.js: the bottom fade reads as light */
}
.page-header .intro {
  padding-top: clamp(64px, 10vw, 120px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.page-header h1 {
  font-size: clamp(44px, 6.4vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  max-width: 16ch;
}
.page-header .lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--sf-body);
  max-width: 52ch;
}

/* — Closing CTA band + footer — */
.cta-band {
  background: var(--sf-fade-up);
  padding: clamp(72px, 9vw, 112px) var(--gutter);
  padding-top: calc(var(--sf-fade-len) + clamp(40px, 5vw, 64px));
  --dark-from: var(--sf-fade-len);
}
.cta-band .container {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: end;
}
.cta-band h2 {
  font-size: clamp(36px, 4.6vw, 56px);
  letter-spacing: -0.04em;
  line-height: 1.04;
  max-width: 16ch;
}

.site-footer {
  padding: 28px var(--gutter);
  /* On pages without a closing band, the footer itself eases in from the page */
  padding-top: calc(var(--sf-fade-len) + 24px);
  background: var(--sf-fade-up);
  --dark-from: var(--sf-fade-len);
}
/* After a navy closing band, the footer simply continues it */
main:has(> :is(.cta-band, .home-contact):last-child) + .site-footer { padding-top: 28px; background: var(--sf-navy); --dark-from: 0px; }
.site-footer .container { border-top: 1px solid rgba(255, 255, 255, 0.14); padding-top: 24px; }
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  font-size: 13px;
  color: var(--sf-muted);
}
.site-footer strong { font-weight: 800; color: var(--sf-ink); }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-brand .brand-mark { flex: none; display: block; }


/* — Navy surfaces —
   The hero, inner-page headers (and the nav inside them), closing bands and footer are navy.
   Inside them the colour tokens flip to light values, so every component adapts. */
:is(.hero, .page-header, .cta-band, .home-contact, .site-footer, .service-card, .tile) {
  --sf-ink: #fff;
  --sf-body: rgba(255, 255, 255, 0.84);
  --sf-muted: rgba(255, 255, 255, 0.68);
  --sf-accent: #fff;
  --sf-accent-700: #fff;
  --sf-dot: var(--sf-sky);
  --sf-wave-1: #d6e5f9;
  --sf-wave-2: #6f9ad6;
  --btn-fg: #fff;
  --btn-line: rgba(255, 255, 255, 0.85);
  --btn-fill: #fff;
  --btn-fg-hover: var(--sf-navy);
  color: var(--sf-ink);
}
/* The enquiry card stays light inside the navy contact section */
.form-panel {
  --sf-ink: #19191b;
  --sf-body: #3e413f;
  --sf-muted: #535656;
  --sf-accent: #1f3c68;
  --sf-accent-700: #1f3c68;
  --btn-fg: #1f3c68;
  --btn-line: #1f3c68;
  --btn-fill: #1f3c68;
  --btn-fg-hover: #fff;
  --sf-rule: #c1c2bd;
  --field-text: #19191b;
  --field-border: color-mix(in srgb, #1f3c68 18%, #dfe5ee);
  color: var(--sf-ink);
}

/* ═════════ Home ═════════ */
/* The hero fills the first screen; its content sits at the vertical centre,
   left-aligned. Bottom padding mirrors the nav spacer so it centres on the whole viewport. */
.hero {
  background: radial-gradient(ellipse 70% 55% at 80% 10%, var(--sf-navy-glow) 0%, transparent 70%), var(--sf-fade-down);
  --dark-until: 0.8; /* site.js: the nav reads this section as dark above this fraction of its height */
  /* The content stays centred in the first screen; the extra height below it carries the fade */
  --hero-fade: 44vh;
  padding: 0 var(--gutter) calc(94px + var(--hero-fade));
  min-height: calc(100vh + var(--hero-fade));
  min-height: calc(100svh + var(--hero-fade));
  display: flex;
  flex-direction: column;
  position: relative;
  /* Above the page content, so the fixed nav inside the hero stays on top while scrolling */
  z-index: 10;
  overflow: clip;
  isolation: isolate;
}
/* Signal waves drawn by site.js; sit behind the hero content and never take clicks */
.hero-signal { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero-grid {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  width: 100%;
  align-content: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: clamp(24px, 3vw, 36px); }
.hero-lockup {
  display: flex;
  align-items: center;
  gap: 0.35em;
  font-size: clamp(56px, 9.5vw, 140px);
  touch-action: pan-y;
}
.hero-wave { width: 1.1em; height: auto; flex: none; overflow: visible; }
.hw-bar { transform-box: fill-box; transform-origin: center; will-change: transform; }
.hero .hero-wordmark {
  margin: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
  font-size: 1em;
  line-height: 1;
  color: var(--sf-ink);
}
.hw-sanford { font-weight: 800; font-size: 1em; line-height: 0.95; letter-spacing: -0.045em; color: var(--sf-ink); }
.hw-dot { color: var(--sf-dot); }
.hw-partners { font-weight: 500; font-size: 0.28em; letter-spacing: 0; line-height: 1.2; margin-top: 0.3em; color: var(--sf-muted); }
.hero .lede { font-size: clamp(17px, 1.6vw, 22px); line-height: 1.55; color: var(--sf-body); max-width: 46ch; }

.impact { padding-top: clamp(80px, 10vw, 120px); }
.impact .container { display: flex; flex-direction: column; gap: 48px; }
.impact-intro {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 32px;
  align-items: end;
}
.home-h2 { font-size: clamp(36px, 4vw, 48px); letter-spacing: -0.035em; line-height: 1.05; }
.impact-intro p { font-size: 17px; line-height: 1.6; color: var(--sf-body); max-width: 44ch; }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 32px;
}
.stat { border-top: 2px solid var(--sf-ink); padding-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.stat-num { font-size: clamp(48px, 5vw, 64px); line-height: 1; letter-spacing: -0.04em; color: var(--sf-accent-700); }
.stat-text { font-size: 15px; line-height: 1.5; }
.stat-source { font-size: 12px; color: var(--sf-muted); }

.services { padding-top: clamp(80px, 10vw, 120px); }
.services .home-h2 { margin-bottom: clamp(40px, 6vw, 72px); }
.services .timeline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2px minmax(0, 1fr);
  column-gap: clamp(24px, 4.5vw, 56px);
}
.services .timeline-col { display: flex; flex-direction: column; gap: 96px; }
.services .timeline-col.offset { padding-top: 200px; }
.services .timeline-line { background: var(--sf-rule); }
.services .timeline-line > span {
  display: block; width: 100%; height: 100%;
  background: var(--sf-accent);
  transform-origin: top;
  transform: scaleY(var(--progress, 1));
}
.service-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--sf-accent);
}
.service-card {
  background: var(--sf-ui);
  color: var(--sf-ink);
  border: 0;
  padding: 32px;
  gap: 20px;
  transition: transform 300ms var(--ease-spring), box-shadow 320ms ease;
}
.service-card:hover { transform: scale(1.025); box-shadow: var(--lift-shadow); z-index: 2; }
.service-card .photo { height: 220px; aspect-ratio: auto; }
.service-card h3 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--sf-ink); }
.service-card p { font-size: 15px; line-height: 1.6; color: var(--sf-body); }

.teaser .container { display: flex; flex-direction: column; gap: 40px; }
.teaser-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: end;
  border-top: 2px solid var(--sf-accent);
  padding-top: 24px;
}

.home-contact {
  background: radial-gradient(ellipse 60% 70% at 10% 100%, var(--sf-navy-glow) 0%, transparent 70%), var(--sf-fade-up);
  padding: clamp(80px, 10vw, 120px) var(--gutter);
  padding-top: calc(var(--sf-fade-len) + clamp(40px, 5vw, 64px));
  --dark-from: var(--sf-fade-len);
}
.home-contact .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 56px;
  align-items: start;
}
.home-contact .copy { display: flex; flex-direction: column; gap: 20px; }
.home-contact h2 { font-size: clamp(40px, 5vw, 60px); letter-spacing: -0.04em; line-height: 1.02; }
.home-contact .copy p { font-size: 17px; line-height: 1.6; color: var(--sf-body); max-width: 40ch; }

/* ═════════ Capabilities ═════════ */
.practices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: clamp(48px, 6vw, 72px) clamp(32px, 4vw, 56px);
}
.practice { display: flex; flex-direction: column; gap: 16px; }
.practice-top { display: flex; justify-content: space-between; align-items: center; }
.practice-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: var(--sf-ui);
  color: #fff;
}
.practice-num { font-size: 13px; color: var(--sf-subtle); font-variant-numeric: tabular-nums; }
.practice h2 { margin-top: 4px; font-size: 26px; letter-spacing: -0.025em; line-height: 1.15; }
.practice p { font-size: 15px; line-height: 1.6; color: var(--sf-body); max-width: 36ch; }
.practice > a { font-size: 14px; font-weight: 600; color: var(--sf-accent-700); }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.studio .photo { height: 460px; }
.studio-copy { display: flex; flex-direction: column; gap: 20px; }
.studio-copy p { font-size: 17px; line-height: 1.6; color: var(--sf-body); max-width: 44ch; }
.spec-list { display: flex; flex-direction: column; margin: 8px 0 0; padding: 0; list-style: none; }
.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 2px solid var(--sf-rule);
  font-size: 15px;
}
.spec-list li span:last-child { color: var(--sf-muted); }

/* ═════════ Who we advise ═════════ */
.audiences { display: flex; flex-direction: column; }
.audience {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(24px, 4vw, 56px);
  padding: 40px 0;
  border-bottom: 2px solid var(--sf-rule);
  align-items: center;
}
.audience-copy { display: flex; flex-direction: column; gap: 14px; }
.audience-num { font-size: 13px; color: var(--sf-accent-700); font-weight: 600; }
.audience h2 { font-size: clamp(28px, 3vw, 36px); letter-spacing: -0.03em; line-height: 1.1; }
.audience p { font-size: 16px; line-height: 1.6; color: var(--sf-body); max-width: 44ch; }
.audience .photo { height: 260px; }

/* ═════════ Approach ═════════ */
.method { display: flex; flex-direction: column; margin: 0 auto; padding: 0; list-style: none; }
.method-step {
  display: grid;
  grid-template-columns: minmax(80px, 140px) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 56px);
  padding: 36px 0;
  border-bottom: 2px solid var(--sf-rule);
  align-items: baseline;
}
.method-num { font-size: clamp(40px, 5vw, 64px); letter-spacing: -0.04em; color: var(--sf-accent); line-height: 1; }
.method-title { display: flex; flex-direction: column; gap: 8px; }
.method-title h2 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.025em; line-height: 1.15; }
.method-step p { font-size: 16px; line-height: 1.6; color: var(--sf-body); }

.engagements .container { display: flex; flex-direction: column; gap: 40px; }
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 16px;
}
.tile {
  background: var(--sf-ui);
  color: var(--sf-ink);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 2px solid var(--sf-accent);
}
.tile h3 { font-size: 24px; letter-spacing: -0.02em; }
.tile p { font-size: 15px; line-height: 1.6; color: var(--sf-body); }

/* ═════════ About ═════════ */
.story { align-items: start; }
.story-lead { font-size: clamp(26px, 2.8vw, 36px); line-height: 1.25; letter-spacing: -0.02em; }
.story-body { display: flex; flex-direction: column; gap: 16px; font-size: 16px; line-height: 1.65; color: var(--sf-body); }
.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 32px;
}
.value { border-top: 2px solid var(--sf-ink); padding-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.value h3 { font-size: 26px; letter-spacing: -0.02em; }
.value p { font-size: 15px; line-height: 1.6; color: var(--sf-body); }

/* ═════════ Contact ═════════ */
.enquiry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
.enquiry-side { display: flex; flex-direction: column; gap: 32px; }
.enquiry-side > p { font-size: 15px; line-height: 1.6; color: var(--sf-body); max-width: 40ch; }
.details { display: flex; flex-direction: column; margin: 0; }
.detail { display: flex; flex-direction: column; gap: 6px; padding: 20px 0; border-bottom: 2px solid var(--sf-rule); }
.detail dd { margin: 0; font-size: 18px; }
.detail .note { font-size: 14px; color: var(--sf-muted); }
select.input { font-family: inherit; }

/* ═════════ Articles ═════════ */
.back-link { font-size: 14px; font-weight: 600; color: var(--sf-accent-700); align-self: flex-start; }
.article-header h1 { font-size: clamp(38px, 5.4vw, 68px); line-height: 1.04; letter-spacing: -0.04em; max-width: 22ch; }
.article-header .intro { gap: 24px; }
.byline { font-size: 14px; color: var(--sf-muted); }
.article-hero .photo { height: clamp(260px, 42vw, 520px); }
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 68ch) minmax(220px, 300px);
  justify-content: space-between;
  gap: clamp(32px, 6vw, 88px);
  margin-top: clamp(40px, 6vw, 72px);
}
.article-aside { position: relative; }
.related {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--sf-tint);
  border-top: 2px solid var(--sf-accent);
  padding: 24px;
  transition: transform 300ms var(--ease-spring), box-shadow 300ms ease;
}
.related:hover { text-decoration: none; transform: scale(1.02); box-shadow: var(--lift-shadow); }
.related-title { font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; }
.related-blurb { font-size: 14px; line-height: 1.55; color: var(--sf-body); }

.prose { font-size: 18px; line-height: 1.7; color: var(--sf-ink); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -0.025em; line-height: 1.2; margin-top: 1.8em; }
.prose p, .prose li { color: #2c2e2d; }
.prose strong { font-weight: 600; color: var(--sf-ink); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: .6em; }
.prose li::marker { color: var(--sf-accent); }
.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 24px;
  align-items: baseline;
  border-top: 2px solid var(--sf-ink);
  border-bottom: 2px solid var(--sf-rule);
  padding: 24px 0;
  margin: 1.8em 0;
}
.callout-num { grid-row: span 2; font-size: clamp(40px, 5vw, 60px); line-height: 1; letter-spacing: -0.04em; color: var(--sf-accent-700); }
.callout > span:nth-child(2) { font-size: 17px; line-height: 1.5; }
.callout-source { font-size: 13px; color: var(--sf-muted); }

.sources { margin-top: clamp(56px, 7vw, 88px); border-top: 2px solid var(--sf-ink); padding-top: 24px; max-width: 68ch; }
.sources ol { margin: 16px 0 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 12px; }
.sources li { font-size: 14px; line-height: 1.55; color: var(--sf-body); }
.sources li::marker { color: var(--sf-muted); }
.sources a { color: var(--sf-accent-700); font-weight: 600; white-space: nowrap; }

/* ═════════ Responsive ═════════ */
@media (max-width: 860px) {
  .nav { grid-template-columns: 1fr auto; padding-left: 16px; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0;
    background: transparent; border: 0; border-radius: 50%; cursor: pointer; color: var(--sf-ink);
  }
  .nav-links {
    display: none;
    grid-column: 1 / -1;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0 12px;
    font-size: 16px;
  }
  .nav-links a { padding: 8px 0; }
  .nav-links a:hover { transform: none; }
  .nav.is-open {
    border-radius: var(--radius-panel);
    /* The open menu stays glass, just denser so the links stay readable */
    background: rgba(0, 27, 68, 0.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    backdrop-filter: blur(24px) saturate(1.8);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 10px 30px rgba(0, 20, 50, 0.2);
  }
  .nav.is-open.on-light { background: rgba(255, 255, 255, 0.78); border-color: rgba(255, 255, 255, 0.85); }
  .nav.is-open .nav-links { display: flex; }
  .nav-cta { display: none; }
  .nav.is-open .nav-cta { display: flex; grid-column: 1 / -1; justify-content: flex-start; padding-bottom: 6px; }
}

@media (max-width: 760px) {
  .featured .card .photo { height: 300px; }
  .studio .photo { height: 320px; }
  .services .timeline { grid-template-columns: minmax(0, 1fr); }
  .services .timeline-line { display: none; }
  .services .timeline-col { gap: 32px; }
  .services .timeline-col.offset { padding-top: 32px; }
  .method-step { grid-template-columns: auto minmax(0, 1fr); }
  .method-step p { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .related { position: static; }
  .prose { font-size: 17px; }
}

@media (max-width: 520px) {
  .callout { grid-template-columns: 1fr; }
  .callout-num { grid-row: auto; }
}

@media (max-width: 520px) {
  .form { grid-template-columns: 1fr; }
  .btn-lg { min-width: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .carousel-track { scroll-behavior: auto; }
  .card, .service-card, .btn, .btn::before, .filter, .filter::before, .btn > span, .more, .more > span { transition: none; }
  .card:hover, .service-card:hover { transform: none; }
  a.more:hover > span, .card:hover .more > span { animation: none; }
}

/* ═════════ Insights ═════════ */
.featured .card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  padding: 16px;
}
.featured .card:hover { transform: scale(1.012); box-shadow: var(--lift-shadow); }
.featured .photo { height: 440px; }
.featured .body { display: flex; flex-direction: column; gap: 18px; }
.featured h2 { font-size: clamp(32px, 3.6vw, 44px); letter-spacing: -0.035em; line-height: 1.08; }
.featured p { font-size: 17px; line-height: 1.6; color: var(--sf-body); max-width: 46ch; }

.library { padding-top: clamp(72px, 9vw, 112px); }
.library > .container { display: flex; flex-direction: column; gap: 40px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 24px; }
.filter {
  /* Same left-to-right sweep fill as .btn */
  position: relative;
  overflow: hidden;
  isolation: isolate;
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 16px;
  cursor: pointer;
  border: 2px solid var(--sf-rule);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--sf-ink);
  transition: transform 260ms var(--ease-out), color 260ms ease, border-color 260ms ease;
}
.filter::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--sf-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms var(--ease-out);
}
.filter:hover, .filter[aria-pressed="true"] { border-color: var(--sf-accent); color: #fff; }
.filter:hover::before, .filter[aria-pressed="true"]::before { transform: scaleX(1); }
.filter:active { transform: scale(.98); }

/* ═════════ Scroll reveal ═════════
   Elements with .reveal wait lowered and transparent, then settle in as they
   enter the viewport (site.js adds .is-in, plus a small stagger delay for items
   that arrive together). A keyframe animation is used rather than a transition
   so each component keeps its own hover transitions. Gated on .js so content
   is always visible without JavaScript. */
@keyframes reveal-in {
  from { opacity: 0; translate: 0 56px; }
  to   { opacity: 1; translate: none; }
}
@keyframes reveal-photo {
  from { scale: 1.08; }
  to   { scale: 1; }
}
.js .reveal:not(.is-in) { opacity: 0; }
.js .reveal.is-in { animation: reveal-in 900ms var(--ease-out) var(--reveal-delay, 0ms) both; }
.js .reveal.is-in .photo img { animation: reveal-photo 1400ms var(--ease-out) var(--reveal-delay, 0ms) both; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal:not(.is-in) { opacity: 1; }
  .js .reveal.is-in, .js .reveal.is-in .photo img { animation: none; }
}

/* ═════════ Home insights carousel ═════════ */
.teaser-actions { display: flex; align-items: center; gap: 24px; }
.carousel-nav { display: flex; align-items: center; gap: 8px; }
.carousel-count { margin-right: 8px; font: 600 14px/1 var(--font); color: var(--sf-accent-700); font-variant-numeric: tabular-nums; white-space: nowrap; }
.carousel-progress {
  position: relative; height: 4px; margin-top: 28px;
  background: var(--sf-rule); border-radius: 999px;
  cursor: pointer; touch-action: none;
}
.carousel-progress::before { content: ""; position: absolute; inset: -10px 0; } /* bigger hit area */
.carousel-progress:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 6px; }
.carousel-thumb {
  position: absolute; left: 0; top: 0; height: 100%; width: 100%;
  background: var(--sf-accent); border-radius: 999px;
  transform-origin: left center; will-change: transform;
}
.carousel-progress.is-dragging { cursor: grabbing; }
.carousel-btn {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 16px/1 var(--font);
  color: var(--sf-accent-700);
  background: transparent;
  border: 2px solid var(--sf-accent);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, opacity 200ms ease, transform 200ms var(--ease-out);
}
.carousel-btn:hover:not(:disabled) { background: var(--sf-accent-700); border-color: var(--sf-accent-700); color: #fff; }
.carousel-btn:active:not(:disabled) { transform: scale(.94); }
.carousel-btn:disabled { opacity: .35; cursor: default; }

.articles.carousel-track {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  /* room for the card hover lift, which would otherwise be clipped */
  padding: 24px 12px 32px;
  margin: -24px -12px -32px;
  scroll-padding-inline: 12px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 4px; }
.carousel-track .card {
  flex: 0 0 calc((100% - 64px) / 3);
  margin: 0;
  scroll-snap-align: start;
}
.carousel-track .photo { height: 260px; }
.carousel-track h3 { font-size: 22px; line-height: 1.25; }
@media (max-width: 960px) { .carousel-track .card { flex-basis: calc((100% - 32px) / 2); } }
@media (max-width: 620px) {
  .carousel-track .card { flex-basis: 85%; }
  .teaser-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; }
}
