/* ==========================================================================
   FOCUS — Reset, base typography, layout primitives
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-normal);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  /* `clip`, not `hidden`: hidden turns body into a scroll container, which
     breaks `position: sticky` on the header and confuses scroll measurement.
     `clip` contains the same accidental horizontal overflow without either. */
  overflow-x: clip;
}

img, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }

/* Author `display` on svg/img beats the UA sheet's [hidden] rule, so restate it. */
[hidden] { display: none !important; }

/* <picture> is inline by default, so an <img> sized at 100% height inside a
   fixed-ratio box has nothing to fill. Taking the wrapper out of the layout
   lets every `.card__media img` / `.hero__media img` rule work as written. */
picture { display: contents; }

/* Inline SVG icons inherit their size from the text around them unless a
   component says otherwise. Without this, an icon dropped into a badge or
   button renders at the SVG default of 300×150. */
.badge svg, .btn svg, .link-arrow svg, .topbar svg, .eyebrow svg {
  inline-size: 1.05em;
  block-size: 1.05em;
  flex: none;
}
.card__icon svg, .feature__icon svg { inline-size: 1.5rem; block-size: 1.5rem; }
input, button, textarea, select { font: inherit; color: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
ul[class], ol[class] { list-style: none; padding: 0; }

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6, .display,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-heading);
  text-wrap: balance;
}

h1, .h1 { font-size: var(--step-6); }
h2, .h2 { font-size: var(--step-5); }
h3, .h3 { font-size: var(--step-3); line-height: var(--leading-snug); }
h4, .h4 { font-size: var(--step-2); line-height: var(--leading-snug); letter-spacing: var(--tracking-snug); }
h5, .h5 { font-size: var(--step-1); line-height: var(--leading-snug); letter-spacing: var(--tracking-snug); }
h6, .h6 { font-size: var(--step-0); letter-spacing: var(--tracking-snug); }

.display-xl { font-size: var(--step-7); font-weight: 700; }

p { text-wrap: pretty; }

.lead {
  font-size: var(--step-1);
  line-height: var(--leading-relaxed);
  color: var(--text-muted);
  /* `balance` evens the line lengths instead of just avoiding orphans, which
     is what a two- or three-line standfirst needs. It only applies to short
     blocks, so longer body copy still uses `pretty`. */
  text-wrap: balance;
  max-inline-size: 48ch;
}
.section-head--center .lead,
.text-center .lead { margin-inline: auto; }

.prose { max-width: 68ch; }
.prose > * + * { margin-top: var(--space-md); }
.prose h2 { margin-top: var(--space-xl); }
.prose h3 { margin-top: var(--space-lg); }
.prose ul, .prose ol { padding-left: 1.35rem; display: grid; gap: var(--space-2xs); }
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 600; color: var(--text); }
/* A four-column policy table is unreadable when crushed into a phone. Let it
   keep a usable minimum width and scroll inside its own box instead — the page
   itself never scrolls sideways. */
.prose table { display: block; overflow-x: auto; min-inline-size: 0; }
.prose table tbody, .prose table thead { min-inline-size: 30rem; display: table; inline-size: 100%; }

/* Small caps label used above section headings */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--primary);
}
.eyebrow::before {
  content: "";
  inline-size: 1.75rem;
  block-size: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.on-dark .eyebrow, .eyebrow--light { color: var(--gold-400); }

/* Gold reads at 1.8:1 on white, so on light grounds the emphasis word takes a
   navy fill with a gold rule under it instead of a gold gradient. */
.text-underline-accent {
  color: var(--navy-700);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 100% 0.18em;
  background-position: 0 88%;
}

/* The one or two words per page that carry the message */
.text-gradient {
  background: var(--grad-headline);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

a { color: var(--primary); text-underline-offset: 0.22em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--primary-hover); }

/* --------------------------------------------------------------------------
   Focus — always visible, always on brand
   -------------------------------------------------------------------------- */

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}
.on-dark :focus-visible { outline-color: var(--gold-300); }

.skip-link {
  position: absolute;
  inset-inline-start: var(--space-sm);
  inset-block-start: -100%;
  z-index: var(--z-toast);
  padding: 0.8rem 1.25rem;
  background: var(--navy-800);
  color: #fff;
  font-weight: 600;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg);
  transition: inset-block-start var(--dur) var(--ease-out);
}
.skip-link:focus { inset-block-start: var(--space-sm); }

.visually-hidden:not(:focus):not(:active) {
  position: absolute !important;
  inline-size: 1px; block-size: 1px;
  overflow: hidden; clip-path: inset(50%);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.container {
  inline-size: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}
.container--narrow { inline-size: min(100% - (var(--gutter) * 2), var(--container-narrow)); }
.container--wide   { inline-size: min(100% - (var(--gutter) * 2), var(--container-wide)); }

.section { padding-block: var(--space-section); position: relative; }
.section--tight { padding-block: var(--space-section-tight); }
.section--loose { padding-block: var(--space-3xl); }
/* Two sections on the same ground read as one band, so drop the seam. */
.section + .section:not([class*="--"]) { padding-block-start: 0; }

/* Section grounds */
.section--subtle { background: var(--bg-subtle); }
.section--paper  { background: var(--grad-paper); }
.section--dawn   { background: var(--grad-dawn); }
.section--tint   { background: var(--grad-tint); }
.section--accent { background: var(--grad-accent); }
/* Dark grounds survive only where a photograph sits behind the type. */
.section--night  { background: var(--grad-night); }
.section--royal  { background: var(--grad-royal); }

.on-dark { color: var(--text-on-dark); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4, .on-dark h5, .on-dark h6 { color: #fff; }
.on-dark p, .on-dark li { color: var(--text-on-dark-muted); }
.on-dark .lead { color: rgba(255, 255, 255, 0.80); }
.on-dark a { color: var(--gold-300); }

.stack { display: grid; gap: var(--space-md); }
.stack--sm { gap: var(--space-2xs); }
.stack--lg { gap: var(--space-lg); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: center;
}
.cluster--center { justify-content: center; }

.grid { display: grid; gap: var(--space-lg); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
/* Pairs of form fields, which need to sit side by side in narrower columns
   than editorial cards do. */
/* Exactly two columns once there is room: a four-field block should read
   as two tidy rows, not three across with one stranded underneath. */
.grid--pair { grid-template-columns: 1fr; }
@media (min-width: 34rem) { .grid--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Exactly two columns once there is room. auto-fit would fit three of these at
   desktop width and leave a lone card stranded on the second row. */
.grid--halves { grid-template-columns: 1fr; }
@media (min-width: 52rem) { .grid--halves { grid-template-columns: 1fr 1fr; } }

/* Asymmetric editorial split — text beside media */
.split {
  display: grid;
  gap: var(--space-2xl);
  align-items: center;
}
@media (min-width: 62rem) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--space-3xl); }
  .split--wide-start { grid-template-columns: 1.15fr 0.85fr; }
  .split--wide-end   { grid-template-columns: 0.85fr 1.15fr; }
  .split--reverse > :first-child { order: 2; }
}

/* Section heading block */
.section-head { max-width: 44rem; margin-bottom: var(--space-2xl); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head > * + * { margin-top: var(--space-sm); }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }         /* dark grounds only */
.text-primary { color: var(--primary); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-0 { margin-bottom: 0; }

.relative { position: relative; }
.z-1 { position: relative; z-index: 1; }
.full-bleed { inline-size: 100vw; margin-inline: calc(50% - 50vw); }

.rounded    { border-radius: var(--r-md); }
.rounded-lg { border-radius: var(--r-lg); }
.rounded-xl { border-radius: var(--r-xl); }

.hide { display: none !important; }
@media (max-width: 47.99rem) { .hide-mobile { display: none !important; } }
@media (min-width: 48rem)    { .hide-desktop { display: none !important; } }

/* Decorative top hairline that catches the light */
.edge-light { position: relative; }
.edge-light::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 10%;
  block-size: 1px;
  background: var(--grad-edge);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Scroll-reveal — progressive enhancement.
   Elements are fully visible if JS never runs; the .reveal class is only
   applied by script, and it is removed once the element has been seen.
   -------------------------------------------------------------------------- */

/* The page itself fades up once on load — one frame of polish, no layout cost. */
.js main { animation: page-in .5s var(--ease-out) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slower) var(--ease-out),
              transform var(--dur-slower) var(--ease-out);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal--delay-1 { transition-delay: 90ms; }
.js .reveal--delay-2 { transition-delay: 180ms; }
.js .reveal--delay-3 { transition-delay: 270ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .js main { animation: none; }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
  .site-header, .site-footer, .cookie-banner, .btn, .to-top { display: none !important; }
  body { color: #000; background: #fff; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
