/* ============================================================================
   Caledapt — design system
   ----------------------------------------------------------------------------
   Foundation for the Next site. Three jobs:

   1. Brand tokens taken from the business card, not from the previous site.
   2. A golden-ratio spacing scale used as a system rather than a gimmick.
   3. Component primitives (buttons, cards, panels, fields) so inner routes can
      be built later without re-inventing the visual language.

   Layer order: this file, then site.css, then motion.css. Motion is always last
   because it animates what these rules define.

   Palette provenance, from the printed card:
     near-black ink     #070606 / #0B0F12   the card's ground
     warm white         #FAF7EA               card typography, never pure #fff
     cyan               #19E8DE               interface accent only
     sun gold / copper  #DEB98D / #BB6B44     landscape warmth, rare emphasis
   ========================================================================== */

/* ============================================================================
   Caledapt — self-hosted variable fonts
   ----------------------------------------------------------------------------
   Both families ship as ONE variable woff2 covering the whole weight range.
   Google Fonts served byte-identical files for each requested weight (verified
   by hash), so declaring 400/500/600 separately would have shipped the same
   48KB three times. One file each, declared once with a weight RANGE:

       220KB of naive 5-file setup  ->  86KB, and one download per family.

   Latin subset only: the site is en-GB, so cyrillic/greek/vietnamese are dead
   weight. font-display:swap keeps text visible on a slow connection, and
   metric-compatible fallbacks stop the swap causing a layout shift.
   ========================================================================== */

/* Fallback stacks tuned so the swap from the webfont to the system font
   changes metrics as little as possible. */
@font-face {
  font-family: "Inter var";
  src: url("../assets/fonts/inter-var.woff2") format("woff2-variations"),
       url("../assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: optional;
  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;
}
@font-face {
  font-family: "Montserrat var";
  src: url("../assets/fonts/montserrat-var.woff2") format("woff2-variations"),
       url("../assets/fonts/montserrat-var.woff2") format("woff2");
  font-weight: 700 800;
  font-style: normal;
  font-display: optional;
  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;
}

/* ================================================================ tokens == */
:root {
  /* --- ink / structure ------------------------------------------------- */
  --ink-950: #070606;
  --ink-900: #0B0F12;
  --ink-850: #11171A;
  --ink-800: #161E22;
  --graphite-700: #383532;

  /* --- text ------------------------------------------------------------ */
  --text-primary: #FAF7EA;
  --text-muted: #D6D8D6;
  --text-dim: #7C8A8F;
  --text-on-cyan: #05191B;

  /* --- brand accent ---------------------------------------------------- */
  --caledapt-cyan: #19E8DE;
  --caledapt-cyan-bright: #48EFDF;
  --caledapt-cyan-deep: #0BDED4;
  --caledapt-blue: #5B8CFF;

  /* --- landscape warmth: environmental only, never interface ----------- */
  --sun-gold: #DEB98D;
  --copper: #BB6B44;

  /* --- semantic surfaces ----------------------------------------------- */
  --surface-0: var(--ink-950);
  --surface-1: var(--ink-900);
  --surface-2: var(--ink-850);
  --surface-3: var(--ink-800);
  --line: rgba(25, 232, 222, .16);
  --line-soft: rgba(250, 247, 234, .09);
  --line-strong: rgba(25, 232, 222, .38);

  /* --- golden ratio spacing, phi = 1.618 ------------------------------
     Each step is the previous rounded to a usable pixel value. Used for
     padding, gaps and section rhythm so vertical spacing is proportional
     rather than arbitrary. */
  /* Very narrow viewports: the display scale is stepped down once more. A single
     long word at 49.6px needs ~330px, which will not fit a 320px column, and
     an h2 cannot break mid-word. */
  /* Viewport-relative, NOT rem.
     The middle term was 3.1rem/5.1rem, which resolves against the ROOT font size
     and is therefore constant at ~49.6px/81.6px no matter how narrow the
     viewport. clamp() only interpolates its middle term, so a constant middle
     term produces a constant size and the "responsive" H1 stayed enormous on a
     320px phone, forcing long headings to clip. vw gives a genuine gradient
     between the min and max bounds. */
  --t-xl: clamp(30px, 5.2vw, 62px);
  --t-2xl: clamp(42px, 8.5vw, 104px);

  --phi: 1.618;
  --space-0: 0px;
  --space-1: 4px;
  --space-2: 7px;
  --space-3: 11px;
  --space-4: 18px;
  --space-5: 29px;
  --space-6: 47px;
  --space-7: 76px;
  --space-8: 123px;

  /* --- type scale ------------------------------------------------------ */
  --font-display: "Montserrat var", Montserrat, "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter var", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;

  /* Modular ratio, tighter than phi for headings: 1.25 between steps. */
  --t-xs: clamp(11px, 0.72rem, 13px);
  --t-sm: clamp(13px, 0.82rem, 15px);
  --t-base: clamp(15px, 0.94rem, 17px);
  --t-md: clamp(18px, 1.15rem, 22px);
  --t-lg: clamp(24px, 1.7rem, 34px);

  /* --- layout geometry -------------------------------------------------- */
  --measure: 68ch;              /* readable prose */
  /* A WIDE BAND, NOT THE FULL SCREEN.
     1220px was too narrow on a 1920 desktop (350px of dead space each side).
     Removing the cap entirely was worse in the other direction: every `1fr`
     column grew with the viewport, so a 61.8% split column reached 1134px and
     forms, diagrams and client logos read as oversized, while body copy sat
     13px from the screen edge.
     1680px is the compromise: 86% of a 1920 screen (1220 -> 1680 is +38% of
     usable width) and a hard stop before components get cartoonish.
     Above 2154px it grows again (78vw) up to 2160px, so a 27" 1440p screen is
     not marooned with a 1680 band in the middle of it. The same expression is
     duplicated in caledapt-v11/v12 because those two files also declare --max
     at :root and whichever parses last wins. */
  --max: clamp(1680px, 78vw, 2160px);
  --max-narrow: 880px;
  /* The border between content and the viewport edge. 20px on a phone, ~32px
     at 1440, ~42px at 1920: enough to read as a deliberate margin, small
     enough that the page still fills the window. The safe-area floor further
     down still wins on notched devices. */
  --shell: clamp(20px, 2.2vw, 44px);

  /* --- golden ratio splits: 38.2 / 61.8 ---------------------------------
     Expressed as fr, not %, so the tracks divide the space remaining after
     the gap. 382fr/618fr is the same 38.2/61.8 proportion without the
     overflow that percentage tracks cause alongside a fixed gap. */
  --split-minor: 382fr;
  --split-major: 618fr;

  /* --- radii: restrained, not pill-shaped ------------------------------ */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* --- elevation: shallow, cyan-tinted --------------------------------- */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 var(--space-3) var(--space-5) rgba(0, 0, 0, .45);
  --shadow-3: 0 var(--space-5) var(--space-7) rgba(0, 0, 0, .55);
  --glow-cyan: 0 0 var(--space-5) rgba(25, 232, 222, .18);

  /* --- easing ----------------------------------------------------------- */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  /* --- motion (overridden wholesale by the reduced-motion block) -------- */
  --dur-fast: 180ms;
  --dur: 320ms;
  --dur-slow: 620ms;

  color-scheme: dark;
}

/* ================================================================= reset == */
*, *::before, *::after { box-sizing: border-box; }

/* Long unbroken tokens must wrap everywhere, not only in headings.
   overflow-wrap:break-word was set on h1-h4 only, so a long email, URL or
   product name in body copy, a button label, a badge or a footer link had no
   wrapping rule at all and could push its container past the viewport. Measured
   at 375px: a single 28-character token in a paragraph made .shell render 379px
   wide inside a 375px viewport. `anywhere` is the correct value here (rather than
   break-word) because it also affects min-content, which is what grid and flex
   tracks actually size against. */
:where(p, li, a, button, span, td, th, label, small, .btn, .badge, .pill, .tag) {
  overflow-wrap: anywhere;
}

/* Element-margin reset. This sheet already normalises headings and paragraphs,
   but block-level elements with UA default margins were left unreset, so those
   margins were still live. <figure> defaults to margin: 1em 40px (measured
   15.04px 40px), which made .founder__figure render 360px wide inside a 280px
   shell column at a 320px viewport and get clipped at BOTH edges. Reset the
   offenders at source rather than patching each component. */
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, pre {
  margin: 0;
}

html {
  background: var(--surface-0);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--surface-0);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  /* A single long word must never force a horizontal scrollbar. */
  overflow-wrap: break-word;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.028em;
  margin: 0;
  color: var(--text-primary);
  text-wrap: balance;
}

h1 { font-size: var(--t-2xl); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-md); }
h4 { font-size: var(--t-base); letter-spacing: .04em; }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }

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

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

code, kbd {
  font-family: var(--font-mono);
  font-size: .92em;
}

hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: var(--space-6) 0;
}

/* =========================================================== typography == */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--caledapt-cyan);
  margin-bottom: var(--space-4);
}
.eyebrow::before {
  content: "";
  width: var(--space-5);
  height: 1px;
  background: var(--caledapt-cyan);
  opacity: .7;
  flex: none;
}

.lede {
  font-size: var(--t-md);
  line-height: 1.56;
  color: var(--text-muted);
  max-width: var(--measure);
}

.prose { max-width: var(--measure); }
.prose p { color: var(--text-muted); }

.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.accent { color: var(--caledapt-cyan); }
.gold { color: var(--sun-gold); }

/* The card's one typographic device: a two-tone headline where the second
   clause carries the accent. Used sparingly, once per section. */
.split-accent { color: var(--caledapt-cyan); }

/* ================================================================ layout == */
/* FULL-WIDTH BAND. The shell fills the window up to --max (1680) and `--shell`
   is the only inset, so the frame is edge-to-edge on a laptop without letting
   every 1fr column grow with the viewport. Prose measures and `.shell--narrow`
   keep their own caps. */
.shell {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--shell);
}

.section {
  padding-block: var(--space-8);
  position: relative;
}
.section--tight { padding-block: var(--space-7); }
/* SEPARATOR, NOT A FILL.

   These were `background: var(--surface-1)` / `var(--surface-2)` -- both
   effectively opaque -- so every alternate section painted a solid band over the
   continuous scenic stage. Measured on the homepage: 6 solid section backgrounds
   alternating with 3 transparent ones, so the page read as a stack of dark panels
   with the landscape showing only in the gaps.

   The brief asks for the scrolling backdrop to run continuously top to bottom
   with the sections separated, not alternately filled. So the fills go and a
   hairline takes their place: 0.09 alpha over the 70% veil reads as a rule
   without becoming a band. */
.section--alt { border-top: 1px solid var(--line-soft); }
.section--raised {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

/* Golden-ratio two-column split. Flips to one column below 900px.

   The columns are fr, not %. Percentage grid tracks resolve against the
   CONTAINER, so `38.2% 61.8%` plus a 76px gap makes the grid 76px wider than
   its parent and it spills. At wide viewports --max clamps the row and the
   overflow is invisible; at 1024px the section genuinely overflowed by 23px.
   fr units divide the space that is LEFT after the gap, which is what a 38.2 /
   61.8 proportion actually means. */
.split {
  display: grid;
  grid-template-columns: 382fr 618fr;
  gap: var(--space-7);
  align-items: center;
}
.split--reverse { grid-template-columns: 618fr 382fr; }
.split--reverse > *:first-child { order: 2; }
.split--reverse > *:last-child { order: 1; }

@media (max-width: 900px) {
  .split, .split--reverse { grid-template-columns: 1fr; gap: var(--space-6); }
  .split--reverse > *:first-child,
  .split--reverse > *:last-child { order: 0; }
}

/* ============================================================== buttons == */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text-primary);
  --btn-bd: var(--line-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 44px;                 /* touch target */
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-md);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.btn:hover { border-color: var(--line-strong); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  --btn-bg: var(--caledapt-cyan);
  --btn-fg: var(--text-on-cyan);
  --btn-bd: var(--caledapt-cyan);
  font-weight: 700;
}
.btn--primary:hover {
  background: var(--caledapt-cyan-bright);
  border-color: var(--caledapt-cyan-bright);
  box-shadow: var(--glow-cyan);
}

.btn--secondary {
  --btn-bg: transparent;
  --btn-fg: var(--text-primary);
  --btn-bd: var(--line-soft);
}
.btn--secondary:hover {
  border-color: var(--line-strong);
  background: rgba(25, 232, 222, .06);
}

.btn--quiet {
  --btn-bd: transparent;
  --btn-fg: var(--text-muted);
  padding-inline: var(--space-3);
}
.btn--quiet:hover { color: var(--caledapt-cyan); }

.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .5;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

/* ================================================================= cards == */
.card {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: var(--space-6);
}
.card--cyan { border-color: var(--line); }
.card--flush { padding: 0; overflow: hidden; }

.card__eyebrow {
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: var(--space-3);
}
.card h3 { margin-bottom: var(--space-3); }
.card p { color: var(--text-muted); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
}

/* ================================================================= panel == */
.panel {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  padding: var(--space-6);
}
/* Tonal separation without a heavy drop shadow. */
.panel--raised { background: var(--surface-3); }

/* ============================================================== figures == */
.figure {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
}
.figure img { width: 100%; height: 100%; object-fit: cover; }

.figure--framed {
  position: relative;
}
/* Caption plate, so text never sits unprotected on scenery. */
.figure--framed::after {
  content: "";
  position: absolute;
  inset: 40% 0 0 0;
  background: linear-gradient(to top,
    rgba(7, 6, 6, .92), rgba(7, 6, 6, .55) 45%, transparent);
  pointer-events: none;
}

/* =============================================================== fields == */
/* FORM DENSITY.

   Measured before: the contact form was 1329px tall on desktop and 1438px on
   mobile -- larger than one viewport at either size -- with 105-127px between
   consecutive fields. Each control is only 48px, so the spacing was about 2x the
   thing it separated: an 8px label gap plus a 32px margin-bottom.

   Now 8px (label stays attached to its input) + 16px between fields. */
.field { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); }
.field > label {
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--text-muted);
}
.field .req { color: var(--caledapt-cyan); margin-left: 2px; }
.field .hint { font-size: var(--t-xs); color: var(--text-dim); }

.input, .select, .textarea {
  width: 100%;
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  background: var(--surface-1);
  color: var(--text-primary);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  transition: border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.select { appearance: none; padding-right: var(--space-7); }

.input:hover, .select:hover, .textarea:hover { border-color: var(--line); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible {
  outline: 2px solid var(--caledapt-cyan);
  outline-offset: 2px;
  border-color: var(--caledapt-cyan);
  box-shadow: 0 0 0 3px rgba(25, 232, 222, .16);
}
.input::placeholder, .textarea::placeholder { color: var(--text-dim); }

.field__error {
  font-size: var(--t-xs);
  color: #FF9B8A;
  min-height: 1.2em;
}
.input[aria-invalid="true"], .select[aria-invalid="true"] {
  border-color: #FF9B8A;
}

/* ============================================================== a11y ===== */
:focus-visible {
  outline: 2px solid var(--caledapt-cyan);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: var(--space-3) var(--space-5);
  background: var(--caledapt-cyan);
  color: var(--text-on-cyan);
  font-weight: 700;
  border-radius: 0 0 var(--r-md) 0;
}
.skip:focus { left: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================== tokens === */
.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--caledapt-cyan);
}

.rule {
  height: 1px;
  background: linear-gradient(90deg, var(--caledapt-cyan), transparent);
  border: 0;
  margin: var(--space-6) 0;
}

.metric {
  font-family: var(--font-display);
  font-size: var(--t-lg);
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.metric small {
  display: block;
  font-family: var(--font-body);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: var(--space-2);
}

/* Landscape photography must never sit under dense text without a plate. */
.on-scenery {
  position: relative;
}
.on-scenery::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg,
      rgba(7, 6, 6, .93) 0%,
      rgba(7, 6, 6, .82) 38.2%,
      rgba(7, 6, 6, .34) 61.8%,
      rgba(7, 6, 6, .12) 100%);
  pointer-events: none;
  z-index: 1;
}
/* Excluded: the Ask Caledapt launcher/panel are body-level children and must
   stay `position: fixed`. A generic `> *` rule beats a component rule on
   source order, so any new body-level widget needs an :not() here. */
.on-scenery > *:not(.rag-launcher):not(.rag-panel):not(.mobile-nav) { position: relative; z-index: 2; }

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


/* ============================================================================
   NARROW-VIEWPORT CORRECTIONS
   ----------------------------------------------------------------------------
   These are additive and deliberately kept together so the interaction between
   heading scale, grid collapse and safe areas is auditable in one place.
   ============================================================================ */

/* ---------------------------------------------------------------------------
   1. Heading scale on small screens.
   Even with vw terms, clamp()'s MIN bound is what a 320px phone lands on, so the
   min values are tightened here. A long H1 at 42px in a 280px content box would
   need 3-4 words per line; these values keep 1-3.
   --------------------------------------------------------------------------- */
@media (max-width:560px){
  :root{
    --t-xl:clamp(28px,9vw,40px);
    --t-2xl:clamp(38px,12vw,54px);
  }
}

/* ---------------------------------------------------------------------------
   2. Grid collapse at phone widths.

   THE DEFECT: .card-grid--3 used minmax(290px,1fr) inside a .shell that has
   padding-inline:20px. At a 320px viewport that leaves 280px of content width
   against a 290px minimum track, so the grid is WIDER than its containing block.
   It does not produce a scrollbar: body carries overflow-x:hidden, so the
   overflow is silently clipped and the visitor sees a card cut off at the edge
   with no indication that content exists beyond it.

   Fixing this with more clipping would hide the problem rather than remove it,
   so the track minimum is removed at the width where it cannot be satisfied.
   grid-template-columns:minmax(0,1fr) is a single full-width column.
   --------------------------------------------------------------------------- */
@media (max-width:600px){
  .card-grid,
  .card-grid--3,
  .card-grid--2,
  .engagement,
  .sectors,
  .pricing,
  .ladder,
  .ladder__grid,
  .footer__grid,
  .story__grid,
  .story__copy-col,
  .agent-grid,
  .agent-cards,
  .plans-grid,
  .comparison-table,
  .feature-grid,
  .stat-grid{
    grid-template-columns:minmax(0,1fr);
  }
  /* A collapsed track must not retain a min-width from another rule. */
  .card-grid > *,
  .card-grid--3 > *,
  .card-grid--2 > *,
  .engagement > *,
  .sectors > *,
  .pricing > *,
  .ladder > *,
  .ladder__grid > *{
    min-width:0;
  }
}

/* ---------------------------------------------------------------------------
   3. One canonical navigation breakpoint: 1080px.
   site.css hands over to the mobile menu at max-width:1080px. theme-bridge.css
   previously hid .mobile-nav at min-width:901px. Between 901px and 1080px the
   desktop nav was gone AND the mobile menu was display:none !important, so
   there was a 180px band of tablet and small-laptop widths with NO working
   navigation at all. Both now agree on 1080/1081.
   --------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
   4. Safe areas for notched devices, especially landscape Safari where the
   inset is non-zero on the leading and trailing edges. env() resolves to 0px on
   devices without a cutout, so max() reproduces the original --shell padding
   there and does not double the spacing.
   --------------------------------------------------------------------------- */
.shell{
  padding-left:max(var(--shell),env(safe-area-inset-left));
  padding-right:max(var(--shell),env(safe-area-inset-right));
}

/* ---------------------------------------------------------------------------
   5. Heading legibility.
   A dark, soft, NON-GLOWING shadow so heading glyphs separate from bright
   mountain / cloud / sun areas of the scenic video. No opaque block behind the
   text, and the scenic layer is NOT darkened further -- the veil is untouched.
   The tight 1px pass does the separating work; the wide pass only adds weight.
   Where a gradient-accented heading reads muddy against its own gradient, drop
   the wide term to 0 3px 12px rgba(0,0,0,.35) rather than removing the tight one.
   --------------------------------------------------------------------------- */
:root{
  --heading-shadow:
    0 1px 2px rgba(0,0,0,.82),
    0 4px 16px rgba(0,0,0,.42);
}

h1,h2{
  text-shadow:var(--heading-shadow);
}

/* Respect an explicit no-shadow request. */
@media (prefers-reduced-motion:reduce){
  h1,h2{text-shadow:none;}
}


/* Grid and flex items default to min-width:auto, which lets intrinsic content
   size push a track wider than its container. .section-head's grid child measured
   373px inside a 280px track at 320px for exactly this reason. */
:where(.split, .section-head, .card-grid, .engagement, .sectors, .pricing, .shell) > * {
  min-width: 0;
}


}
