/*
 * Streetfellows Media – public website (externwebb/).
 * Hand-written, mobile-first stylesheet built on the design system in Design/ (Nordic Bold v2.0):
 * the token block below is a copy of Design/tokens.css and the @font-face rules of Design/fonts.css,
 * and the components follow Design/components.css. Keep them in sync with Design/.
 *
 * Rules for this file:
 *   - No raw colour values outside the token block. Overlays are mixed from tokens.
 *   - Base rules are for 320–390 px. Larger screens are added with min-width queries
 *     (768, 1024, 1440). The only max-* query is max-height for the sticky header at zoom.
 *   - Behaviour hooks used by site.js and the regression suite in tests/:
 *     .skip-link, .motion-toggle, .motion-paused, .animate-marquee (keyframes "marquee"),
 *     .consent-banner, --consent-height, .consent-embed-placeholder, --navigation-clearance,
 *     .site-navigation, .desktop-navigation, #mobile-menu, .legal-links, .form-status.
 */

/* ---------- Fonts (self-hosted, SIL OFL 1.1 – see /fonts/OFL-*.txt) ---------- */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: italic;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/barlow-condensed-latin-800-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/montserrat-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/montserrat-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/montserrat-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/montserrat-latin-700-normal.woff2') format('woff2');
}

/* ---------- Tokens (copy of Design/tokens.css) ---------- */
:root {
  /* 1. Primitives — canonical sRGB */
  --midnight: #081B2B;
  --nordic: #0F2D44;
  --mint: #8FFFD6;
  --offwhite: #F7F5EF;
  --cool-grey: #CCD5DA;
  --graphite: #60717C;
  --white: #FFFFFF;
  --mint-hover: #70EBC0;
  --mint-pressed: #55D7A9;
  --midnight-pressed: #061420;
  --teal: #12634F;
  --dark-border: #395367;
  --error: #B42318;
  --error-hover: #912018;
  --warning: #805500;
  --success: #12634F;
  --info: #175CD3;
  --grey-hover: #E8ECEE;
  --row-hover: #F0F3F4;
  --row-selected: #E0FAF0;
  --disabled-bg: #E4E8EA;
  --disabled-bg-dark: #263C4C;
  --disabled-text-dark: #A5B3BC;
  --success-bg: #E0FAF0;
  --warning-bg: #FFF3D6;
  --error-bg: #FEE4E2;
  --info-bg: #EAF2FF;
  --neutral-bg: #E8ECEE;
  --neutral-text: #344654;
  --overlay: rgba(8, 27, 43, .65);

  /* Typography */
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-ui: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-display: 800;
  --tracking-display: -.02em;
  --tracking-eyebrow: .18em;

  --hero-size: 56px;      --hero-lh: .88;
  --hero-compact-size: 48px; --hero-compact-lh: .92;
  --h2-size: 40px;         --h2-lh: .95;
  --h3-size: 28px;         --h3-lh: 1.05;
  --lead-size: 17px;       --lead-lh: 1.55;
  --eyebrow-size: 11px;    --eyebrow-lh: 1.4;
  --body-size: 16px;       --body-lh: 1.6;
  --caption-size: 12px;    --caption-lh: 1.5;
  --nav-size: 14px;        --nav-lh: 1.4;
  --button-size: 14px;     --button-lh: 1.4;
  --portal-h1-size: 24px;  --portal-h1-lh: 1.2;
  --portal-h2-size: 20px;  --portal-h2-lh: 1.3;
  --portal-h3-size: 18px;  --portal-h3-lh: 1.4;
  --portal-body-size: 14px; --portal-body-lh: 1.5;
  --table-head-size: 13px;
  --kpi-size: 32px;        --kpi-lh: 1.1;
  --measure: 70ch;

  /* Spacing scale */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 40px; --space-8: 48px;
  --space-9: 64px; --space-10: 80px; --space-11: 96px; --space-12: 128px;

  /* Layout */
  --public-max: 1440px;
  --gutter: 24px;
  --grid-gap: 16px;
  --section-space: 48px;
  --header-height: 64px;

  /* Shape, elevation, motion */
  --radius-control: 8px;
  --radius-card: 12px;
  --radius-badge: 6px;
  --control-height: 48px;
  --control-height-lg: 56px;
  --touch-target: 44px;
  --shadow-sm: 0 1px 2px rgba(8, 27, 43, .06);
  --shadow-md: 0 4px 16px rgba(8, 27, 43, .08);
  --shadow-lg: 0 16px 48px rgba(8, 27, 43, .16);
  --focus-width: 3px;
  --focus-offset: 3px;
  --transition: 180ms ease-out;
  --z-header: 100;
  --z-drawer: 200;
  --z-modal: 300;
  --z-toast: 400;

  /* Photographic overlays (KONTRAST.md: at least 75 % Midnight behind text). Mixed from tokens. */
  --overlay-text: color-mix(in srgb, var(--midnight) 82%, transparent);
  --overlay-strong: color-mix(in srgb, var(--midnight) 92%, transparent);
  --overlay-soft: color-mix(in srgb, var(--midnight) 45%, transparent);

  /* 2. Semantic — light surface (default) */
  --surface: var(--offwhite);
  --surface-raised: var(--white);
  --surface-muted: var(--grey-hover);
  --text: var(--midnight);
  --text-muted: var(--graphite);
  --text-accent: var(--teal);
  --link: var(--midnight);
  --border: var(--cool-grey);
  --border-strong: var(--graphite);
  --primary: var(--midnight);
  --primary-text: var(--white);
  --primary-hover: var(--nordic);
  --primary-pressed: var(--midnight-pressed);
  --secondary-border: var(--midnight);
  --secondary-text: var(--midnight);
  --secondary-hover: var(--grey-hover);
  --focus: var(--midnight);
  --accent: var(--mint);

  /* 3. Component */
  --table-head-bg: var(--offwhite);
  --input-bg: var(--white);
  --input-border: var(--graphite);
}

/* Light surface nested inside a dark one (form cards in dark sections). */
[data-theme='light'] {
  --surface: var(--offwhite);
  --surface-raised: var(--white);
  --surface-muted: var(--grey-hover);
  --text: var(--midnight);
  --text-muted: var(--graphite);
  --text-accent: var(--teal);
  --link: var(--midnight);
  --border: var(--cool-grey);
  --border-strong: var(--graphite);
  --primary: var(--midnight);
  --primary-text: var(--white);
  --primary-hover: var(--nordic);
  --primary-pressed: var(--midnight-pressed);
  --secondary-border: var(--midnight);
  --secondary-text: var(--midnight);
  --secondary-hover: var(--grey-hover);
  --focus: var(--midnight);
}

/* Dark surface. The consent banner and motion button are added by site.js outside any themed
   region, so they take the dark surface by class. */
[data-theme='dark'], .consent-banner, .motion-toggle {
  --surface: var(--midnight);
  --surface-raised: var(--nordic);
  --surface-muted: var(--nordic);
  --text: var(--offwhite);
  --text-muted: var(--cool-grey);
  --text-accent: var(--mint);
  --link: var(--mint);
  --border: var(--dark-border);
  --border-strong: var(--offwhite);
  --primary: var(--mint);
  --primary-text: var(--midnight);
  --primary-hover: var(--mint-hover);
  --primary-pressed: var(--mint-pressed);
  --secondary-border: var(--offwhite);
  --secondary-text: var(--offwhite);
  --secondary-hover: var(--nordic);
  --focus: var(--mint);
}

@media (min-width: 768px) {
  :root {
    --hero-size: 80px; --hero-compact-size: 64px; --h2-size: 48px; --h3-size: 32px;
    --lead-size: 18px; --eyebrow-size: 12px; --kpi-size: 36px;
    --gutter: 40px; --grid-gap: 24px; --section-space: 64px; --header-height: 80px;
  }
}
@media (min-width: 1024px) {
  :root {
    --hero-size: 112px; --hero-compact-size: 88px; --h2-size: 64px; --h3-size: 36px;
    --lead-size: 20px; --kpi-size: 40px;
    --gutter: 64px; --grid-gap: 32px; --section-space: 96px;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  /* Keep focused fields and anchor targets below the sticky header and above the consent banner. */
  scroll-padding-top: var(--navigation-clearance, 10rem);
  scroll-padding-bottom: var(--consent-height, 0px);
}
body {
  margin: 0;
  font: var(--weight-regular) var(--body-size)/var(--body-lh) var(--font-ui);
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  /* Long words and intrinsic widths must not push enlarged text out of its box (WCAG 1.4.10). */
  overflow-wrap: anywhere;
}
/* Room for the fixed motion button so it never covers the last line of the footer. */
body:has([data-motion-toggle]) .site-footer { padding-bottom: calc(var(--space-9) + var(--space-10)); }
[data-theme] { color: var(--text); }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
img, svg, video { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: .2em; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: var(--focus-offset); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.icon { width: 24px; height: 24px; flex: none; stroke-width: 2; }
.icon-sm { width: 18px; height: 18px; flex: none; }

/* Controls that float over any background get a Midnight halo around the mint ring. */
.skip-link:focus-visible, .motion-toggle:focus-visible {
  outline-color: var(--mint);
  box-shadow: 0 0 0 calc(var(--focus-offset) + var(--focus-width) + 3px) var(--midnight);
}

.skip-link {
  position: absolute; left: var(--space-4); top: var(--space-4); z-index: var(--z-toast);
  max-width: calc(100% - 2 * var(--space-4));
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-control);
  background: var(--midnight); color: var(--white); font-weight: var(--weight-bold);
  transform: translateY(calc(-100% - 2rem));
}
.skip-link:focus { transform: none; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--public-max); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: var(--section-space); background: var(--surface); }
.section--white { background: var(--white); }
.section--nordic { background: var(--nordic); }
.section-head { max-width: 48rem; display: grid; gap: var(--space-4); }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }
.section-head + * { margin-top: var(--space-8); }
.split { display: grid; gap: var(--space-8); align-items: start; }
@media (min-width: 1024px) {
  .split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-9); }
  .split--center { align-items: center; }
  .section-head + * { margin-top: var(--space-9); }
}

/* ---------- Typography ---------- */
.hero-title, .hero-compact, .marketing-h2, .marketing-h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--weight-display);
  text-transform: uppercase;
  letter-spacing: var(--tracking-display);
}
/* Never let a word force sideways scrolling at 320 px; enlarged text may still break anywhere. */
.hero-title    { font-size: min(var(--hero-size), 15vw); line-height: calc(var(--hero-lh) + .06); } /* room for Å over the line above */
.hero-compact  { font-size: min(var(--hero-compact-size), 13vw); line-height: var(--hero-compact-lh); }
.marketing-h2  { font-size: var(--h2-size); line-height: var(--h2-lh); }
.marketing-h3  { font-size: var(--h3-size); line-height: var(--h3-lh); }
.hero-title > span, .hero-compact > span { display: block; }
.dot-accent    { color: var(--mint); }
.eyebrow {
  font-size: var(--eyebrow-size); line-height: var(--eyebrow-lh); color: var(--text-accent);
  font-weight: var(--weight-bold); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
}
.lead { font-size: var(--lead-size); line-height: var(--lead-lh); max-width: var(--measure); }
.muted { color: var(--text-muted); }
.accent-bar {
  display: block; width: 96px; height: 10px; background: var(--accent);
  clip-path: polygon(3% 0, 100% 0, 97% 100%, 0 100%);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--control-height); padding: 10px var(--space-5);
  border: 1px solid transparent; border-radius: var(--radius-control);
  font: var(--weight-bold) var(--button-size)/var(--button-lh) var(--font-ui);
  text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { background: var(--primary-pressed); }
.btn-secondary { background: transparent; color: var(--secondary-text); border-color: var(--secondary-border); }
.btn-secondary:hover { background: var(--secondary-hover); }
.btn-lg { min-height: var(--control-height-lg); }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ---------- Logo ---------- */
.site-logo { display: inline-block; flex: none; line-height: 0; border-radius: var(--radius-control); }
.site-logo img { width: 140px; height: auto; }
@media (min-width: 1024px) { .site-logo img { width: 160px; } }

/* ---------- Header and navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: var(--midnight); color: var(--offwhite);
  border-bottom: 1px solid var(--dark-border);
}
.site-navigation {
  min-height: var(--header-height);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding-block: var(--space-2);
}
.desktop-navigation { display: none; }
.desktop-navigation a, .mobile-menu nav > a:not(.btn) {
  color: var(--offwhite); font-size: var(--nav-size); line-height: var(--nav-lh);
  font-weight: var(--weight-semibold); text-decoration: none;
}
.desktop-navigation a { padding-block: var(--space-2); }
.desktop-navigation a:hover, .desktop-navigation a[aria-current='page'],
.mobile-menu nav > a:not(.btn):hover, .mobile-menu nav > a[aria-current='page'] {
  color: var(--white);
  text-decoration: underline; text-decoration-color: var(--mint);
  text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.header-actions { display: flex; align-items: center; gap: var(--space-3); flex: none; }
.header-cta { display: none; }
.menu-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--touch-target); height: var(--touch-target); padding: 0;
  border: 1px solid var(--secondary-border); border-radius: var(--radius-control);
  background: transparent; color: var(--offwhite); cursor: pointer;
}
.menu-button:hover { background: var(--nordic); }
.menu-button[aria-expanded='true'] .menu-button__open,
.menu-button[aria-expanded='false'] .menu-button__close { display: none; }
.mobile-menu {
  border-top: 1px solid var(--dark-border); background: var(--midnight);
  /* A tall menu (large text) scrolls inside the sticky header instead of leaving the screen. */
  max-height: calc(100vh - var(--header-height)); overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: grid; gap: var(--space-1); padding-block: var(--space-3) var(--space-5); }
.mobile-menu nav > a:not(.btn) {
  display: flex; align-items: center; min-height: var(--touch-target);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-control);
}
.mobile-menu nav > a:not(.btn):hover { background: var(--nordic); }
.mobile-menu .btn { margin-top: var(--space-3); }

@media (min-width: 768px) {
  .header-cta { display: inline-flex; }
}
@media (min-width: 1024px) {
  .site-navigation { gap: var(--space-5); }
  .desktop-navigation {
    display: flex; flex: 1; min-width: 0; flex-wrap: wrap; justify-content: center;
    align-items: center; column-gap: var(--space-4); row-gap: 0;
  }
  .menu-button, .mobile-menu, .mobile-menu[hidden] { display: none; }
}
@media (min-width: 1440px) { .desktop-navigation { column-gap: var(--space-6); } }
/* At 200–400 % zoom the viewport is only about 425–212 CSS px tall; a sticky header would cover
   much of it (WCAG 1.4.4, 1.4.10). Let it scroll away there. */
@media (max-height: 30rem) {
  .site-header { position: static; }
  html { scroll-padding-top: 1rem; }
  .mobile-menu { max-height: none; }
}

/* ---------- Hero and video sections ---------- */
.media-section { position: relative; isolation: isolate; overflow: hidden; background: var(--midnight); color: var(--text); }
.media-section > video {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover;
}
.media-overlay { position: absolute; inset: 0; z-index: -1; background: var(--overlay-text); }
.hero { display: flex; align-items: flex-end; }
.hero__content {
  position: relative; display: grid; gap: var(--space-5); justify-items: start;
  max-width: 44rem; padding-block: var(--space-9) var(--space-11);
}
.hero__lead { color: var(--offwhite); }
.hero-note {
  max-width: var(--measure); padding: var(--space-3) var(--space-4);
  border-left: 4px solid var(--mint); border-radius: 0 var(--radius-control) var(--radius-control) 0;
  background: var(--midnight); font-size: 14px; font-weight: var(--weight-medium);
}
.hero-stats {
  display: flex; flex-wrap: wrap; gap: var(--space-5) var(--space-7);
  margin-top: var(--space-2); padding-top: var(--space-5); border-top: 1px solid var(--dark-border);
}
.hero-stat { display: grid; gap: var(--space-1); }
.hero-stat__value {
  font-family: var(--font-display); font-style: italic; font-weight: var(--weight-display);
  font-size: 44px; line-height: 1; letter-spacing: var(--tracking-display); color: var(--white);
  font-variant-numeric: tabular-nums;
}
.hero-stat__label {
  font-size: var(--caption-size); font-weight: var(--weight-bold);
  letter-spacing: .08em; text-transform: uppercase; color: var(--offwhite);
}
.wedge {
  position: absolute; right: 0; bottom: 0; z-index: 1; pointer-events: none;
  width: clamp(120px, 18vw, 280px); aspect-ratio: 2 / 1;
  background: var(--accent); clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.media-section--band .media-content { position: relative; padding-block: var(--section-space); }
.media-section--band .section-head { max-width: 40rem; }
@media (min-width: 768px) {
  .hero { min-height: clamp(560px, 70vh, 820px); align-items: center; }
  .hero__content { padding-block: var(--space-11) var(--space-12); }
  .hero-stat__value { font-size: 56px; }
}
@media (min-width: 1024px) {
  /* Text sits in the left part; the overlay keeps at least 80 % Midnight there. */
  .media-overlay {
    background: linear-gradient(90deg, var(--overlay-strong) 0%, var(--overlay-text) 70%, var(--overlay-soft) 100%);
  }
}

/* ---------- Place strip (ortsremsa) ---------- */
.place-strip { background: var(--nordic); color: var(--offwhite); border-block: 1px solid var(--dark-border); }
.place-strip__viewport { overflow: hidden; padding-block: var(--space-5); }
.animate-marquee {
  display: flex; width: max-content; white-space: nowrap;
  font-size: var(--nav-size); font-weight: var(--weight-semibold);
  animation: marquee 40s linear infinite;
}
.place-strip__group { display: flex; align-items: center; gap: var(--space-8); padding-right: var(--space-8); }
.place-strip__group > span { display: inline-flex; align-items: center; gap: var(--space-2); }
.place-strip__group svg { width: 16px; height: 16px; flex: none; color: var(--mint); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
/* Paused (button) or reduced motion: the names stand still and wrap so every one is visible. */
.motion-paused *, .motion-paused *::before, .motion-paused *::after { animation-play-state: paused !important; }
.motion-paused .animate-marquee { animation: none; width: auto; white-space: normal; }
.motion-paused .place-strip__group { flex-wrap: wrap; gap: var(--space-3) var(--space-6); padding-inline: var(--gutter); }
.motion-paused .animate-marquee > [aria-hidden='true'] { display: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-play-state: paused !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
  .animate-marquee { animation: none; width: auto; white-space: normal; }
  .place-strip__group { flex-wrap: wrap; gap: var(--space-3) var(--space-6); padding-inline: var(--gutter); }
  .animate-marquee > [aria-hidden='true'] { display: none; }
}

/* ---------- Cards, benefits, stats, steps, lists ---------- */
.card-grid { display: grid; gap: var(--grid-gap); }
@media (min-width: 768px) { .card-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card {
  display: grid; gap: var(--space-3); align-content: start;
  padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-card);
  background: var(--surface-raised); color: var(--text); box-shadow: var(--shadow-sm);
}
@media (min-width: 768px) { .card { padding: var(--space-6); } }
[data-theme='dark'] .card { box-shadow: none; }
.card p { color: var(--text-muted); }
/* Card titles stay whole words in three narrow columns ("Kostnadseffektivt" at 1024 px). */
.card .marketing-h3 { font-size: 26px; }
@media (min-width: 1440px) { .card .marketing-h3 { font-size: 32px; } }
.card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: var(--radius-control);
  background: var(--midnight); color: var(--mint); margin-bottom: var(--space-2);
}
.card__icon svg { width: 24px; height: 24px; stroke-width: 1.75; }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
@media (min-width: 768px) { .stat-grid { gap: var(--grid-gap); } }
.stat {
  display: grid; gap: var(--space-2); align-content: start;
  padding: var(--space-4); border: 1px solid var(--dark-border); border-radius: var(--radius-card);
  background: var(--nordic);
}
@media (min-width: 768px) { .stat { padding: var(--space-5); } }
.stat__value {
  font-family: var(--font-display); font-style: italic; font-weight: var(--weight-display);
  font-size: 40px; line-height: 1; letter-spacing: var(--tracking-display); color: var(--mint);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 1024px) { .stat__value { font-size: 56px; } }
.stat__label { font-size: 14px; color: var(--offwhite); }

.steps { display: grid; gap: var(--space-7); counter-reset: none; list-style: none; padding: 0; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-7) var(--grid-gap); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.step { display: grid; gap: var(--space-3); align-content: start; }
.step__number {
  font-family: var(--font-display); font-style: italic; font-weight: var(--weight-display);
  font-size: 32px; line-height: 1; color: var(--text-accent);
}
.step__image {
  aspect-ratio: 1; border: 1px solid var(--border); border-radius: var(--radius-card);
  background: var(--white); overflow: hidden;
}
.step__image img { width: 100%; height: 100%; object-fit: contain; padding: var(--space-4); }
.step h3 { font-size: 18px; line-height: 1.4; font-weight: var(--weight-bold); }
.step p { color: var(--text-muted); font-size: 15px; }
.step--rule { padding-top: var(--space-4); border-top: 3px solid var(--midnight); }

.checklist { display: grid; gap: var(--space-3); list-style: none; padding: 0; }
.checklist li { display: flex; align-items: flex-start; gap: var(--space-3); }
.checklist svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--text-accent); }
.checklist--lg li { font-size: var(--lead-size); }
.bar-list { display: grid; gap: var(--space-3); list-style: none; padding: 0; color: var(--offwhite); }
.bar-list li { display: flex; align-items: baseline; gap: var(--space-3); }
.bar-list li::before {
  content: ''; flex: none; width: 18px; height: 6px; background: var(--mint);
  clip-path: polygon(20% 0, 100% 0, 80% 100%, 0 100%); transform: translateY(-3px);
}

/* ---------- Contact / application sections and forms ---------- */
.contact { display: grid; gap: var(--space-8); }
@media (min-width: 1024px) { .contact { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-9); align-items: start; } }
.contact__intro { display: grid; gap: var(--space-5); align-content: start; }
.contact__intro .lead { color: var(--offwhite); }
.form-card {
  display: grid; gap: var(--space-4);
  padding: var(--space-5); border-radius: var(--radius-card);
  background: var(--white); color: var(--text); box-shadow: var(--shadow-lg);
}
@media (min-width: 768px) { .form-card { padding: var(--space-6); } }
.form-card--narrow { max-width: 44rem; margin-inline: auto; }
.form-row { display: grid; gap: var(--space-4); }
@media (min-width: 768px) {
  .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-row > .field--wide { grid-column: 1 / -1; }
}
.field { display: grid; gap: var(--space-2); min-width: 0; }
.field > label, .field__label { font-size: 14px; font-weight: var(--weight-semibold); color: var(--text); }
.input, .textarea {
  width: 100%; min-width: 0; min-height: var(--control-height); padding: var(--space-3);
  border: 1px solid var(--input-border); border-radius: var(--radius-control);
  background: var(--input-bg); color: var(--midnight);
  font: var(--weight-regular) var(--body-size)/1.5 var(--font-ui);
}
.textarea { min-height: 120px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--graphite); opacity: 1; }
.input:focus-visible, .textarea:focus-visible { outline-color: var(--midnight); }
.form-status { text-align: center; font-size: 14px; color: var(--text-muted); }
.form-status__link { color: var(--link); font-weight: var(--weight-semibold); text-decoration: underline; }

/* ---------- YouTube consent embed ---------- */
.video-frame {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9;
  border: 1px solid var(--dark-border); border-radius: var(--radius-card); background: var(--midnight);
}
/* Until the video loads, the notice sets the height so no text is clipped on narrow screens. */
.video-frame:has(> .consent-embed > .consent-embed-placeholder:not([hidden])) { aspect-ratio: auto; }
.consent-embed { position: absolute; inset: 0; }
.consent-embed:has(> .consent-embed-placeholder:not([hidden])) { position: static; }
.consent-embed__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.consent-embed-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-4);
  min-height: 100%; padding: var(--space-6) var(--space-5); text-align: center; font-size: 14px;
  color: var(--offwhite);
}
.consent-embed-placeholder p { max-width: 36rem; }
.consent-embed-placeholder[hidden] { display: none; }
.consent-embed-placeholder a { color: var(--mint); }

/* ---------- Cookie choice banner (created by site.js) ---------- */
.consent-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-modal);
  max-height: 60vh; overflow-y: auto;
  padding: var(--space-5) var(--gutter);
  border-top: 3px solid var(--mint); background: var(--midnight); color: var(--offwhite);
  font-size: 14px; line-height: 1.5;
}
.consent-banner[hidden] { display: none; }
.consent-banner h2 { font-size: 16px; font-weight: var(--weight-bold); margin-bottom: var(--space-1); }
.consent-banner p { max-width: var(--measure); }
.consent-banner a { color: var(--mint); }
.consent-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }
.consent-actions button, .consent-embed-placeholder button {
  min-height: var(--control-height); padding: 10px var(--space-5);
  border: 1px solid var(--mint); border-radius: var(--radius-control);
  background: var(--mint); color: var(--midnight);
  font: var(--weight-bold) var(--button-size)/var(--button-lh) var(--font-ui); cursor: pointer;
}
.consent-actions button:hover, .consent-embed-placeholder button:hover { background: var(--mint-hover); border-color: var(--mint-hover); }
.consent-actions button + button { background: transparent; color: var(--offwhite); border-color: var(--offwhite); }
.consent-actions button + button:hover { background: var(--nordic); border-color: var(--offwhite); }

/* ---------- Motion button (pause/start all movement) ---------- */
.motion-toggle {
  position: fixed; right: var(--space-4); bottom: calc(var(--consent-height, 0px) + var(--space-4));
  z-index: var(--z-drawer);
  min-height: var(--touch-target); padding: var(--space-2) var(--space-4);
  border: 1px solid var(--offwhite); border-radius: var(--radius-control);
  background: var(--midnight); color: var(--offwhite);
  font: var(--weight-semibold) 14px/1.4 var(--font-ui); cursor: pointer;
}
.motion-toggle[hidden] { display: none; }
.motion-toggle:hover { background: var(--nordic); }

/* ---------- Footer ---------- */
.site-footer { background: var(--midnight); color: var(--offwhite); padding-block: var(--space-9); border-top: 1px solid var(--dark-border); }
.site-footer__inner { display: grid; gap: var(--space-6); }
.site-footer .site-logo img { width: 160px; }
.legal-links { display: flex; flex-direction: column; align-items: flex-start; gap: 0; font-size: 14px; }
.legal-links a, .legal-links button {
  display: inline-flex; align-items: center; min-height: var(--touch-target);
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--offwhite); font: var(--weight-semibold) 14px/1.4 var(--font-ui);
  text-decoration: underline; text-decoration-color: var(--dark-border); text-underline-offset: .3em;
}
.legal-links a:hover, .legal-links button:hover, .legal-links a[aria-current='page'] { color: var(--white); text-decoration-color: var(--mint); text-decoration-thickness: 2px; }
.site-footer__meta { display: grid; gap: var(--space-3); padding-top: var(--space-5); border-top: 1px solid var(--dark-border); color: var(--cool-grey); font-size: 14px; }
.site-footer__note { font-size: var(--caption-size); }
@media (min-width: 768px) {
  .site-footer__inner { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: var(--space-6) var(--space-9); }
  .legal-links { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; column-gap: var(--space-5); }
  .site-footer__meta { grid-column: 1 / -1; }
}

/* ---------- Policy pages ---------- */
.legal-page { padding-block: var(--section-space); }
.legal-page .prose { max-width: var(--measure); margin-inline: auto; }
.prose > * + * { margin-top: var(--space-4); }
.prose h1 { font-size: 32px; line-height: 1.15; font-weight: var(--weight-bold); }
.prose h2 { margin-top: var(--space-8); font-size: 22px; line-height: 1.3; font-weight: var(--weight-bold); }
.prose h3 { margin-top: var(--space-5); font-size: 18px; line-height: 1.4; font-weight: var(--weight-semibold); }
.prose h2 + *, .prose h3 + * { margin-top: var(--space-3); }
.prose ul { padding-left: var(--space-5); }
.prose li + li { margin-top: var(--space-2); }
.prose a:not(.btn) { color: var(--link); text-decoration: underline; }
.prose code { font-family: monospace; font-size: .9em; overflow-wrap: anywhere; }
@media (min-width: 768px) {
  .prose h1 { font-size: 40px; }
  .prose h2 { font-size: 24px; }
}
.legal-updated { color: var(--text-muted); font-size: 14px; }
.legal-page .accent-bar { margin-top: var(--space-4); }
.legal-toc { padding: var(--space-4) var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--white); }
.legal-toc h2 { margin-top: 0; font-size: 18px; }
.table-scroll { overflow-x: auto; border-radius: var(--radius-card); }
.legal-page table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; color: var(--midnight); }
.legal-page caption { text-align: left; font-weight: var(--weight-bold); padding-bottom: var(--space-2); }
/* Mobile first: each row is a card with labelled cells; a real table from 768 px. */
.legal-page thead {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.legal-page table, .legal-page caption, .legal-page tbody, .legal-page tr, .legal-page td { display: block; }
.legal-page tr { margin-bottom: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--white); }
.legal-page td { padding: var(--space-3) var(--space-4); }
.legal-page td + td { border-top: 1px solid var(--border); }
.legal-page td::before { content: attr(data-label); display: block; font-weight: var(--weight-bold); }
@media (min-width: 768px) {
  .legal-page thead { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
  .legal-page table { display: table; background: var(--white); }
  .legal-page caption { display: table-caption; }
  .legal-page thead { display: table-header-group; }
  .legal-page tbody { display: table-row-group; }
  .legal-page tr { display: table-row; margin: 0; border: 0; }
  .legal-page th, .legal-page td {
    display: table-cell; padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border); text-align: left; vertical-align: top;
  }
  .legal-page th { background: var(--table-head-bg); font-size: var(--table-head-size); font-weight: var(--weight-semibold); }
  .legal-page td + td { border-top: 1px solid var(--border); }
  .legal-page td::before { content: none; }
}

/* ---------- 404 ---------- */
.error-page { padding-block: var(--section-space); }
.error-page .prose { max-width: var(--measure); }
.error-code {
  font-family: var(--font-display); font-style: italic; font-weight: var(--weight-display);
  font-size: 96px; line-height: .9; color: var(--text-accent);
}
.error-page nav { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }

/* Mobile hero: show the entire advertising surface after the primary actions. */
.hero:has(> .hero__mobile-media) { flex-direction: column; align-items: stretch; }
.hero__mobile-media { display: block; position: relative; z-index: 0; width: 100%; }
.hero__mobile-media img { display: block; width: 100%; height: auto; }
.hero:has(> .hero__mobile-media) > video { visibility: hidden; }
@media (min-width: 768px) {
  .hero:has(> .hero__mobile-media) { flex-direction: row; }
  .hero__mobile-media { display: none; }
  .hero:has(> .hero__mobile-media) > video { visibility: visible; }
}
