/* ============================================================
   Safety Clinic — marketing site stylesheet
   Cinematic editorial treatment. Single stylesheet, no JS.
   Light mode default, dark mode via prefers-color-scheme.
   Scroll effects are pure CSS (scroll-driven animations),
   gated behind @supports + prefers-reduced-motion.
   ============================================================ */

/* ---------- Font ---------- */
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/HankenGrotesk-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Surfaces (light) */
  --bg: #FFFFFF;
  --app-bg: #E7EDEF;
  --card: #FFFFFF;
  --card-border: #E4EBEC;
  --divider: #F1F5F5;
  --field-bg: #F4F8F8;
  --chip-bg: #F1F5F5;
  --splash-bg: #F6FAF9;

  /* Navy (app sidebar family) */
  --navy: #14333B;
  --navy-deep: #0F2A30;
  --navy-text: #BFD2D5;
  --navy-muted: #6FA39C;

  /* Brand teal */
  --primary: #0E8C84;
  --primary-dark: #0B6A63;
  --primary-bright: #39B8A6;
  --accent: #4FD0BC;

  /* Ink / text */
  --ink: #15282E;
  --slate: #3D5760;
  --muted: #62787F;
  --muted-2: #647A81;

  /* Status */
  --green: #3FA776;  --green-bg: #E9F4EE;
  --amber: #D89A3C;  --amber-bg: #FBF4E6;
  --red:   #CE6A52;  --red-bg:   #FBEEEA;  --red-deep: #B85741;
  --purple:#8B6FB0;  --purple-bg:#F3EEF8;
  --blue:  #4670C8;  --blue-bg:  #EAF0FB;

  /* Gradients */
  --grad-deep:   linear-gradient(135deg, #15333B, #1C4750);
  --grad-brand:  linear-gradient(135deg, #39B8A6, #0E8C84);
  --grad-avatar: linear-gradient(135deg, #5BC2B0, #2C8C82);

  /* Derived */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  --nav-bg: rgba(255, 255, 255, 0.78);
  --shadow-card: 0 1px 2px rgba(21, 40, 46, 0.04), 0 8px 24px rgba(21, 40, 46, 0.06);
  --shadow-mock: 0 2px 6px rgba(11, 30, 35, 0.08), 0 32px 64px rgba(11, 30, 35, 0.14);
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
}

/* Site is intentionally light-only: clean white surfaces in every color scheme. */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Layout helpers ---------- */
.container {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

.eyebrow {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}

/* Reveal-on-scroll (elements get .in from js/effects.js) */
.js .reveal,
.js .reveal-late {
  opacity: 0;
  transform: translateY(42px);
  transition:
    opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal-late { transition-delay: 0.12s; }
.js .reveal.in,
.js .reveal-late.in { opacity: 1; transform: none; }
@keyframes rise {
  from { opacity: 0; transform: translateY(42px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Blur-text reveal */
.js .blur-in {
  filter: blur(14px);
  opacity: 0.15;
  transition:
    filter 1s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .blur-in.in { filter: blur(0); opacity: 1; }

/* Scroll progress bar (driven by js/effects.js) */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* Animated grid field canvases (React islands) */
.grid-anim {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.grid-anim canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Film grain overlay for cinematic photo bands */
.hero::after,
.statement::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  background-size: 280px;
  mix-blend-mode: overlay;
  opacity: 0.5;
  pointer-events: none;
  z-index: 5;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn:hover { text-decoration: none; }

/* Film grain on the brand-teal surfaces — the same texture as the hero's
   photo bands, so gradients read as printed material rather than flat fills.
   The pseudo sits above the background but below button labels (.btn is a
   stacking context), and never intercepts clicks. */
.btn-primary::after,
.mock-side::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  background-size: 160px;
  mix-blend-mode: overlay;
  opacity: 0.45;
  pointer-events: none;
}
.btn-primary::after { z-index: -1; }
.mock-side {
  position: relative;
  overflow: hidden;
}
.mock-side > * { position: relative; z-index: 1; }
.mock-side::after { z-index: 0; }

/* Interactive hover buttons (on brand): a small dot beside the label
   floods the pill on hover while the label slides out to the right and
   returns as a duplicate with an arrow. Pure CSS, transform-based. */
.btn .btn-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
  transition: transform 0.3s ease-in-out;
}
.btn:hover .btn-dot,
.btn:focus-visible .btn-dot { transform: scale(110); }

.btn .btn-label {
  display: inline-block;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
.btn:hover .btn-label,
.btn:focus-visible .btn-label { transform: translateX(3rem); opacity: 0; }

.btn .btn-swap {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #FFFFFF;
  transform: translateX(3rem);
  opacity: 0;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
.btn:hover .btn-swap,
.btn:focus-visible .btn-swap { transform: translateX(0); opacity: 1; }
.btn-arrow { width: 17px; height: 17px; flex: none; }

.btn-primary {
  background: var(--grad-brand);
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(14, 140, 132, 0.35);
}
.btn-primary .btn-dot { background: #FFFFFF; }
.btn-primary .btn-swap { color: var(--primary-dark); }
.btn-primary:hover {
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(11, 106, 99, 0.5);
}

.btn-ghost {
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.btn-ghost .btn-dot { background: var(--primary-bright); }
.btn-ghost:hover { color: #FFFFFF; border-color: var(--primary-bright); }

.btn-quiet {
  padding: 11px 22px;
  font-size: 15px;
  color: var(--ink);
  border: 1px solid var(--card-border);
  background: var(--card);
}

.btn-quiet:hover { color: #FFFFFF; border-color: var(--primary); }

/* ---------- Nav (fixed, light glass) ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--nav-bg);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--card-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 750;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-right: auto;
}
.brand:hover { color: var(--primary); text-decoration: none; }

.brand-tile {
  width: 34px;
  height: 34px;
  display: block;
  flex-shrink: 0;
}
.brand-tile img { width: 100%; height: 100%; display: block; object-fit: contain; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav-links a { color: var(--slate); }
.nav-links a:hover { color: var(--primary); text-decoration: none; }

.nav-links .btn-quiet {
  letter-spacing: 0.1em;
  padding: 10px 20px;
  font-size: 12.5px;
  color: var(--ink);
  background: transparent;
  border-color: var(--card-border);
}
.nav-links .btn-quiet:hover { color: #FFFFFF; border-color: var(--primary); }

@media (max-width: 640px) {
  .nav-links a:not(.btn-quiet) { display: none; }
  .nav-inner { gap: 16px; }
}

/* ---------- Hero (full-bleed cinematic) ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #FFFFFF;
  overflow: hidden;
  background: var(--navy-deep);
}

.hero-bg {
  position: absolute;
  inset: 0;
}
.hero-bg img,
.hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}
.hero-vid {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.hero-vid.is-showing { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .hero-bg img { animation: kenburns 16s cubic-bezier(0.2, 0.6, 0.3, 1) both; }
}
@keyframes kenburns {
  from { transform: scale(1.1); }
  to   { transform: scale(1); }
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(11, 28, 33, 0.9) 0%, rgba(11, 28, 33, 0.48) 40%, rgba(11, 28, 33, 0.18) 72%, rgba(11, 28, 33, 0.34) 100%);
}

.hero-content {
  position: relative;
  width: 100%;
  padding-top: 120px; /* clearance under the fixed nav on short viewports */
  padding-bottom: clamp(48px, 8vh, 96px);
}

.hero h1 {
  font-size: clamp(52px, 9.5vw, 128px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.98;
  max-width: 12ch;
}

.hero-sub {
  margin-top: 28px;
  max-width: 520px;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
}

.hero-ctas {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

@media (prefers-reduced-motion: no-preference) {
  .hero h1 { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both; }
  .hero-sub { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s both; }
  .hero-ctas { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.4s both; }
}

.hero-meta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 32px;
  margin-top: clamp(36px, 6vh, 72px);
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}

/* ---------- Threat → answer (OSHA stakes, scroll-scrubbed) ----------
   Progressive enhancement: the base rules render a readable, static
   villain→hero section (no-JS and prefers-reduced-motion land here). JS adds
   .is-scrolly on wide, motion-OK viewports to turn it into a sticky,
   scroll-scrubbed animation driven by the --turn custom property (0 = threat
   world, 1 = answer world) plus per-row .is-visible / .is-covered classes. */
.threat { position: relative; background: var(--splash-bg); }
.threat-stage { position: relative; overflow: hidden; }
.threat-bg { position: absolute; inset: 0; }
.threat-bg img { width: 100%; height: 100%; object-fit: cover; }
.threat-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(15,42,48,0.94), rgba(11,28,33,0.82));
}
.threat-grain { position: absolute; inset: 0; opacity: 0.5; mix-blend-mode: screen; }

/* Base (static/readable) = the answer world: light surface, dark text. */
.threat-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  /* padding-block only: this element also carries .container, whose
     padding-inline is the page gutter. A `padding: … 0` shorthand here would
     reset that to zero and run the copy flush to the screen edge on phones. */
  padding-block: clamp(72px, 12vh, 130px);
}
.threat-bg, .threat-scrim, .threat-grain { opacity: 0; } /* base: hidden; scrolly fades them in */

.threat-eyebrow-bad, .threat-eyebrow-good { display: block; }
.threat-eyebrow-good { display: none; }
.threat-headline {
  display: grid;
  font-size: clamp(34px, 4.6vw, 60px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: var(--ink);
  margin-bottom: 20px;
}
.threat-headline .th-bad, .threat-headline .th-good { grid-area: 1 / 1; }
.threat-headline em { font-style: normal; color: var(--red-deep); }
.threat-headline .th-good { display: none; }
.threat-headline .th-good em { color: var(--primary); }

.threat-lede { max-width: 44ch; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.6; color: var(--slate); }
.threat-lede + .threat-lede { margin-top: 14px; }
.th-good-lede { color: var(--primary-dark); font-weight: 600; }

.threat-meter {
  margin-top: clamp(24px, 3vh, 34px);
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card);
  box-shadow: var(--shadow-card);
  display: grid;
}
.tm-label { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.tm-label-good { display: none; }
.tm-value { display: flex; align-items: flex-start; margin: 4px 0 2px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.tm-num { font-size: clamp(40px, 5.5vw, 64px); color: var(--red-deep); font-variant-numeric: tabular-nums; }
.tm-plus { font-size: clamp(22px, 3vw, 34px); color: var(--red-deep); margin-top: 4px; }
.tm-foot { margin-top: 10px; font-size: 12px; line-height: 1.5; color: var(--muted-2); }

.threat-cta { margin-top: clamp(24px, 3vh, 32px); display: flex; flex-wrap: wrap; gap: 12px; }

.threat-ledger-wrap { position: relative; }
.threat-mark { display: none; position: absolute; top: -30px; right: -8px; z-index: 5; }
.threat-mark img { width: 52px; height: 52px; filter: drop-shadow(0 6px 16px rgba(11,30,35,0.28)); }
.threat-ledger { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }

.threat-row {
  position: relative;
  padding: 16px 18px 16px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  background: var(--card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.threat-row::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--green); /* base = covered/answer accent */
}
.tr-head { display: flex; align-items: baseline; gap: 12px; }
.tr-num { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.tr-title { flex: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.tr-title strong { font-size: clamp(15px, 1.5vw, 17px); font-weight: 750; letter-spacing: -0.01em; color: var(--ink); }
.tr-code { font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; color: var(--muted-2); font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.tr-tag { flex-shrink: 0; }
.tag-bad, .tag-good {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: var(--radius-pill);
}
.tag-bad { color: var(--red-deep); background: var(--red-bg); display: none; }
.tag-good { color: var(--green); background: var(--green-bg); }
.tr-desc { display: block; margin-top: 8px; font-size: 14px; line-height: 1.55; }
.tr-bad, .tr-good { display: block; color: var(--slate); }
.tr-bad { color: var(--muted); }
/* Static mode: label both descriptions so the story reads without motion. */
.threat:not(.is-scrolly) .tr-bad::before { content: "Commonly cited — "; font-weight: 700; color: var(--red-deep); }
.threat:not(.is-scrolly) .tr-good::before { content: "With SafetyClinic.app — "; font-weight: 700; color: var(--primary-dark); }
.threat:not(.is-scrolly) .tr-good { margin-top: 6px; }

/* ---------- Scrolly enhancement ---------- */
.threat.is-scrolly { min-height: 340vh; background: transparent; }
/* --turn lives on the stage so the world layers (bg/scrim/grain/::after,
   which are the stage's own children/pseudo) AND the inner subtree all
   inherit it. JS sets it on the stage each frame. */
.threat.is-scrolly .threat-stage { position: sticky; top: 0; height: 100vh; --turn: 0; }
.threat.is-scrolly .threat-inner { min-height: 100vh; position: relative; z-index: 2; }

/* World crossfade: bad (photo+dark) fades out, light answer world fades in. */
.threat.is-scrolly .threat-bg { opacity: calc(1 - var(--turn)); }
.threat.is-scrolly .threat-scrim { opacity: calc(1 - var(--turn)); }
.threat.is-scrolly .threat-grain { opacity: calc((1 - var(--turn)) * 0.5); }
.threat.is-scrolly .threat-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(120% 90% at 30% 0%, #FFFFFF, var(--splash-bg));
  opacity: var(--turn);
}

/* Copy crossfade — bad elements live on the dark world, good on the light. */
.threat.is-scrolly .threat-eyebrows { display: grid; }
.threat.is-scrolly .threat-eyebrow-good { display: block; }
.threat.is-scrolly .threat-eyebrow-bad, .threat.is-scrolly .threat-eyebrow-good { grid-area: 1 / 1; }
.threat.is-scrolly .threat-eyebrow-bad { color: var(--red); opacity: calc(1 - var(--turn)); }
.threat.is-scrolly .threat-eyebrow-good { color: var(--primary-dark); opacity: var(--turn); }

.threat.is-scrolly .threat-headline .th-bad { display: block; color: #fff; opacity: calc(1 - var(--turn)); }
.threat.is-scrolly .threat-headline .th-bad em { color: #F0A594; }
.threat.is-scrolly .threat-headline .th-good { display: block; color: var(--ink); opacity: var(--turn); }

.threat.is-scrolly .threat-ledes { display: grid; }
.threat.is-scrolly .th-bad-lede, .threat.is-scrolly .th-good-lede { grid-area: 1 / 1; }
.threat.is-scrolly .th-bad-lede { color: rgba(255,255,255,0.82); opacity: calc(1 - var(--turn)); }
.threat.is-scrolly .th-good-lede { opacity: var(--turn); }

/* Meter card crossfades from dark glass to white; number red→teal. */
.threat.is-scrolly .threat-meter {
  border-color: color-mix(in srgb, rgba(255,255,255,0.22) calc((1 - var(--turn)) * 100%), var(--card-border) calc(var(--turn) * 100%));
  background: color-mix(in srgb, rgba(10,26,30,0.55) calc((1 - var(--turn)) * 100%), var(--card) calc(var(--turn) * 100%));
  backdrop-filter: blur(6px);
}
.threat.is-scrolly .tm-label { display: grid; }
.threat.is-scrolly .tm-label-bad, .threat.is-scrolly .tm-label-good { grid-area: 1 / 1; }
.threat.is-scrolly .tm-label-good { display: block; }
.threat.is-scrolly .tm-label-bad { color: rgba(255,255,255,0.7); opacity: calc(1 - var(--turn)); }
.threat.is-scrolly .tm-label-good { color: var(--primary-dark); opacity: var(--turn); }
.threat.is-scrolly .tm-num, .threat.is-scrolly .tm-plus {
  color: color-mix(in srgb, #F0A594 calc((1 - var(--turn)) * 100%), var(--primary) calc(var(--turn) * 100%));
}
.threat.is-scrolly .tm-foot { color: color-mix(in srgb, rgba(255,255,255,0.6) calc((1 - var(--turn)) * 100%), var(--muted-2) calc(var(--turn) * 100%)); }
.threat.is-scrolly .threat-cta { opacity: var(--turn); transition: opacity 0.3s ease; }

.threat.is-scrolly .threat-mark {
  display: block;
  opacity: var(--turn);
  transform: scale(calc(0.6 + var(--turn) * 0.4)) rotate(calc((1 - var(--turn)) * -12deg));
  transition: opacity 0.2s linear;
}

/* Rows: hidden until scrolled to, dark glass in the threat world, then flip
   to a light "covered" card as the answer arrives. */
.threat.is-scrolly .threat-row {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2,0.7,0.2,1),
              background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(12,30,34,0.6);
  backdrop-filter: blur(6px);
  box-shadow: none;
}
.threat.is-scrolly .threat-row.is-visible { opacity: 1; transform: none; }
.threat.is-scrolly .threat-row.is-covered {
  background: var(--card);
  border-color: var(--card-border);
  box-shadow: var(--shadow-card);
}
.threat.is-scrolly .threat-row::before { background: var(--red); transition: background 0.4s ease; }
.threat.is-scrolly .threat-row.is-covered::before { background: var(--green); }
.threat.is-scrolly .tr-num { color: rgba(255,255,255,0.55); transition: color 0.4s ease; }
.threat.is-scrolly .threat-row.is-covered .tr-num { color: var(--muted-2); }
.threat.is-scrolly .tr-title strong { color: #fff; transition: color 0.4s ease; }
.threat.is-scrolly .threat-row.is-covered .tr-title strong { color: var(--ink); }
.threat.is-scrolly .tr-code { color: rgba(255,255,255,0.6); transition: color 0.4s ease; }
.threat.is-scrolly .threat-row.is-covered .tr-code { color: var(--muted-2); }
.threat.is-scrolly .tr-desc { position: relative; display: grid; }
.threat.is-scrolly .tr-bad, .threat.is-scrolly .tr-good { grid-area: 1 / 1; transition: opacity 0.4s ease; }
.threat.is-scrolly .tr-bad::before, .threat.is-scrolly .tr-good::before { content: none; }
.threat.is-scrolly .tr-bad { color: rgba(255,255,255,0.8); opacity: 1; }
.threat.is-scrolly .tr-good { color: var(--slate); opacity: 0; }
.threat.is-scrolly .threat-row.is-covered .tr-bad { opacity: 0; }
.threat.is-scrolly .threat-row.is-covered .tr-good { opacity: 1; }
.threat.is-scrolly .tag-bad { display: inline-block; opacity: 1; transition: opacity 0.3s ease; }
.threat.is-scrolly .tag-good { position: absolute; opacity: 0; transition: opacity 0.3s ease; }
.threat.is-scrolly .tr-tag { position: relative; display: inline-flex; }
.threat.is-scrolly .threat-row.is-covered .tag-bad { opacity: 0; }
.threat.is-scrolly .threat-row.is-covered .tag-good { position: static; opacity: 1; }

@media (max-width: 1039px) {
  /* Below the scrolly breakpoint, always render the static two-column/stacked
     version even if JS added the class (JS also gates on width, this is belt). */
  .threat.is-scrolly { min-height: 0; }
  .threat.is-scrolly .threat-stage { position: static; height: auto; }
}
@media (max-width: 860px) {
  .threat-inner { grid-template-columns: 1fr; gap: 36px; }
}

/* ---------- Ticker (marquee strip) ---------- */
.ticker {
  background: var(--field-bg);
  color: var(--muted);
  border-bottom: 1px solid var(--card-border);
  overflow: hidden;
  padding: 17px 0;
}
.ticker-track {
  display: flex;
  width: max-content;
}
.ticker-group {
  display: flex;
  align-items: center;
  gap: 44px;
  padding-right: 44px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ticker-group .tick-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .ticker-track { animation: ticker 52s linear infinite; }
}
@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* ---------- Editorial intro ---------- */
.intro { padding: clamp(90px, 13vh, 150px) 0; border-bottom: 1px solid var(--card-border); margin-bottom: clamp(90px, 13vh, 150px); }

.intro-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 860px) { .intro-grid { grid-template-columns: 1fr; align-items: start; } }

.display {
  font-size: clamp(38px, 5.6vw, 72px);
  letter-spacing: -0.03em;
  line-height: 1.0;
}
.display em {
  font-style: normal;
  color: var(--primary);
}

.intro-copy {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(26px, 3vw, 40px);
}

/* Animated stats under the intro headline */
.intro-stats {
  margin-top: clamp(36px, 5vh, 56px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.5vw, 32px);
}
@media (max-width: 560px) { .intro-stats { grid-template-columns: 1fr; } }

.intro-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 2px solid var(--primary-bright);
  padding-top: 14px;
}
.intro-stat-num {
  font-size: clamp(34px, 3.6vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.intro-stat-label {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  font-weight: 550;
  max-width: 22ch;
}

.intro-copy p {
  color: var(--slate);
  font-size: 18px;
  line-height: 1.65;
}
.intro-copy p + p { margin-top: 18px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 2px solid var(--primary-bright);
  padding-bottom: 6px;
  transition: color 0.18s ease, border-color 0.18s ease, gap 0.18s ease;
}
.text-link:hover { color: var(--primary); border-color: var(--primary); text-decoration: none; gap: 16px; }
.text-link svg { width: 16px; height: 16px; }

/* ---------- Product band (light, dashboard mockup) ---------- */
.product-band {
  position: relative;
  background: var(--field-bg);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  color: var(--ink);
  padding: clamp(100px, 14vh, 160px) 0 0;
  overflow: hidden;
}
.product-band::before {
  content: "";
  position: absolute;
  width: 900px;
  height: 900px;
  top: -320px;
  right: -220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 208, 188, 0.14), transparent 65%);
  pointer-events: none;
  z-index: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .product-band::before { animation: aurora 16s ease-in-out infinite alternate; }
}
@keyframes aurora {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-160px, 120px) scale(1.18); }
}
.product-band > .container { position: relative; z-index: 1; }
.product-band .eyebrow { color: var(--primary); }
.product-band h2 { color: var(--ink); }

.product-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: end;
  margin-bottom: clamp(56px, 8vh, 88px);
}
@media (max-width: 860px) { .product-head { grid-template-columns: 1fr; } }
.product-head p { color: var(--slate); font-size: 18px; line-height: 1.65; }

.mockup-wrap {
  display: flex;
  justify-content: center;
}

.mockup {
  width: min(980px, 100%);
  background: var(--card);
  border-radius: 18px 18px 0 0;
  box-shadow: var(--shadow-mock);
  display: grid;
  grid-template-columns: 200px 1fr;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-bottom: none;
  text-align: left;
  font-size: 13px;
  color: var(--ink);
}

.mock-side {
  background: var(--navy);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mock-side-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 13px;
  padding: 4px 8px 14px;
}
.mock-side-brand .brand-tile { width: 22px; height: 22px; border-radius: 6px; }

.mock-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--navy-text);
  font-weight: 550;
  font-size: 12.5px;
}
.mock-nav-item.is-active { background: rgba(79, 208, 188, 0.14); color: #FFFFFF; }
.mock-nav-item svg { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.85; }

.mock-main { background: var(--field-bg); padding: 20px; }

.mock-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.mock-title { font-weight: 750; font-size: 15px; }
.mock-sub { color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.mock-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--grad-avatar);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.mock-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.mock-stat {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 11px;
  padding: 12px 14px;
}
.mock-stat-num { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.mock-stat-label { color: var(--muted); font-size: 11px; font-weight: 550; margin-top: 2px; }
.mock-stat-delta { font-size: 10.5px; font-weight: 650; margin-top: 6px; display: inline-block; padding: 2px 7px; border-radius: 999px; }
.delta-good { color: var(--green); background: var(--green-bg); }
.delta-warn { color: var(--amber); background: var(--amber-bg); }

.mock-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 10px;
}

.mock-panel {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 11px;
  padding: 14px;
}
.mock-panel-title {
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mock-panel-title span:last-child { color: var(--primary); font-size: 11px; font-weight: 600; }

.mock-check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  border-top: 1px solid var(--divider);
  font-size: 12px;
  color: var(--slate);
  font-weight: 500;
}
.mock-check:first-of-type { border-top: none; }
.mock-check .check-q { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chip {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  flex-shrink: 0;
}
.chip-pass { color: var(--green); background: var(--green-bg); }
.chip-fail { color: var(--red); background: var(--red-bg); }
.chip-due  { color: var(--amber); background: var(--amber-bg); }
.chip-open { color: var(--blue); background: var(--blue-bg); }

.mock-chart {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 96px;
  padding-top: 6px;
}
.bar {
  flex: 1;
  border-radius: 5px 5px 2px 2px;
  background: var(--primary-bright);
  opacity: 0.85;
  min-height: 8px;
}
.bar:nth-child(odd) { background: var(--primary); }
.b1 { height: 46%; } .b2 { height: 62%; } .b3 { height: 55%; }
.b4 { height: 74%; } .b5 { height: 68%; } .b6 { height: 88%; } .b7 { height: 80%; }
.mock-chart-caption {
  display: flex;
  justify-content: space-between;
  color: var(--muted-2);
  font-size: 10px;
  margin-top: 8px;
}

@media (max-width: 760px) {
  .mockup { grid-template-columns: 1fr; }
  .mock-side { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 14px; }
  .mock-side-brand { padding: 0 6px 0 0; }
  .mock-nav-item { padding: 5px 9px; }
  .mock-nav-item span { display: none; }
  .mock-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .mock-grid { grid-template-columns: 1fr; }
}

/* ---------- Problems / solution ---------- */
.problems { padding: 0 0 clamp(110px, 16vh, 180px); }
.problems .section-head { margin-bottom: clamp(40px, 6vh, 64px); }

.problems-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 860px) { .problems-grid { grid-template-columns: 1fr; } }

.pain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.pain-list li {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 22px 0;
  border-top: 1px solid var(--card-border);
  color: var(--slate);
  font-size: 16.5px;
  line-height: 1.6;
}
.pain-list li:last-child { border-bottom: 1px solid var(--card-border); }
.pain-list strong { color: var(--ink); font-weight: 700; }
.pain-mark {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--red-bg);
  color: var(--red);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  transform: translateY(2px);
}

.solution-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(28px, 3.5vw, 44px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  position: sticky;
  top: 104px;
}
.solution-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--green-bg);
  color: var(--green);
  display: grid;
  place-items: center;
}
.solution-mark svg { width: 24px; height: 24px; }
.solution-card h3 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 750; letter-spacing: -0.02em; }
.solution-card p { color: var(--slate); font-size: 16px; line-height: 1.6; }
.solution-card .btn { margin-top: 6px; }

/* ---------- Value pillars ---------- */
.pillars { padding: clamp(110px, 16vh, 180px) 0 0; }
.pillars .section-head { margin-bottom: clamp(40px, 6vh, 64px); }

.pillars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 24px);
}
@media (max-width: 760px) { .pillars-grid { grid-template-columns: 1fr; } }

.pillar {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(26px, 3vw, 40px);
}
.pillar-audience {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}
.pillar h3 {
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 750;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.pillar p { color: var(--slate); font-size: 15.5px; line-height: 1.6; }

/* ---------- Who we serve (facility-type roster) ---------- */
.serve { padding: clamp(110px, 16vh, 180px) 0 0; }
.serve .section-head { margin-bottom: clamp(40px, 6vh, 64px); }
.serve .section-head p { margin-top: 18px; color: var(--slate); font-size: 18px; line-height: 1.65; max-width: 60ch; }

.serve-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 24px);
}
@media (max-width: 760px) { .serve-grid { grid-template-columns: 1fr; } }

.serve-col {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(26px, 3vw, 40px);
}
.serve-col h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-dark);
  margin-bottom: 20px;
}
.serve-list { list-style: none; margin: 0; padding: 0; }
.serve-list li {
  padding: 14px 0;
  border-top: 1px solid var(--divider);
}
.serve-list li:first-child { border-top: 0; padding-top: 0; }
.serve-list li:last-child { padding-bottom: 0; }
.serve-list strong {
  display: block;
  font-size: 16.5px;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 3px;
}
.serve-list span { color: var(--muted); font-size: 14.5px; line-height: 1.55; }

.serve-note {
  margin-top: clamp(28px, 4vh, 40px);
  color: var(--slate);
  font-size: 16.5px;
  line-height: 1.6;
  max-width: 62ch;
}

/* ---------- Numbered feature index ---------- */
.features { padding: clamp(110px, 16vh, 180px) 0 clamp(80px, 10vh, 120px); }

.features .section-head { max-width: 720px; margin-bottom: clamp(56px, 8vh, 88px); }
.features .section-head p { margin-top: 20px; color: var(--slate); font-size: 18px; max-width: 560px; }

.feature-row {
  display: grid;
  grid-template-columns: 116px 1.1fr 1.4fr;
  gap: clamp(18px, 3.5vw, 56px);
  align-items: baseline;
  padding: clamp(26px, 3.5vh, 38px) 0;
  border-top: 1px solid var(--card-border);
}
.feature-row:last-of-type { border-bottom: 1px solid var(--card-border); }

.feature-mark {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  background: var(--chip-bg);
  display: grid;
  place-items: center;
  transition: background-color 0.18s ease, transform 0.18s ease;
}
.feature-icon img { width: 28px; height: 28px; display: block; }
.feature-row:hover .feature-icon { background: var(--green-bg); transform: translateY(-2px); }

.feature-num {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  transition: color 0.18s ease;
}
.feature-row:hover .feature-num { color: var(--primary); }

.feature-row h3 {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.1;
  transition: color 0.18s ease;
}
.feature-row:hover h3 { color: var(--primary-dark); }

.feature-row p {
  color: var(--slate);
  font-size: 16.5px;
  line-height: 1.6;
  max-width: 52ch;
}

@media (max-width: 760px) {
  .feature-row { grid-template-columns: 1fr; gap: 12px; align-items: start; }
  .feature-mark { flex-direction: row; align-items: center; gap: 12px; }
  .feature-num { font-size: 13px; }
}

/* Mobile-apps note. When the store listings go live, restore the badge
   markup + img/badge-*.svg from git history and point them at the real
   listing URLs. */
.apps-soon {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 46ch;
}
.apps-soon.is-centered { text-align: center; margin-inline: auto; }

/* ---------- Mobile app section (iPhone mockup) ---------- */
.mobile { padding: clamp(100px, 15vh, 170px) 0; overflow: hidden; }

.mobile-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
@media (max-width: 860px) { .mobile-grid { grid-template-columns: 1fr; } }

.mobile-copy .display em { font-style: normal; color: var(--primary); }
.mobile-copy > p { margin-top: 22px; color: var(--slate); font-size: 18px; line-height: 1.65; max-width: 46ch; }
.mobile-copy .apps-soon { margin-top: 34px; }

.phone-wrap { display: flex; justify-content: center; }

.phone {
  position: relative;
  width: min(340px, 86vw);
  aspect-ratio: 340 / 700;
  background: #0B1C21;
  border-radius: 54px;
  padding: 10px;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.16),
    0 2px 6px rgba(11, 30, 35, 0.2),
    0 40px 80px rgba(11, 30, 35, 0.4);
}
.phone::before {
  /* side button hint */
  content: "";
  position: absolute;
  right: -2.5px;
  top: 22%;
  width: 2.5px;
  height: 64px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
}

.phone-island {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 26px;
  border-radius: 999px;
  background: #0B1C21;
  z-index: 3;
}

.phone-screen {
  position: relative;
  height: 100%;
  border-radius: 44px;
  background: var(--field-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: var(--ink);
}

.ph-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 26px 6px;
  font-weight: 700;
  font-size: 13px;
}
.ph-glyphs { display: inline-flex; }
.ph-glyphs svg { width: 46px; height: 12px; }

.ph-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px 4px;
}
.ph-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 750;
  font-size: 13.5px;
  letter-spacing: -0.01em;
}
.ph-brand img { width: 22px; height: 22px; display: block; }
.ph-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--grad-avatar);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.ph-greeting { display: flex; flex-direction: column; padding: 10px 18px 0; }
.ph-hello { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.ph-sub { color: var(--muted); font-size: 11px; margin-top: 2px; }

.ph-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  padding: 12px 18px 0;
}
.ph-stat {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
}
.ph-stat-num { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.ph-stat-label { color: var(--muted); font-size: 9.5px; font-weight: 550; margin-top: 1px; }

.ph-section {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 18px 7px;
  font-weight: 750;
  font-size: 12.5px;
}
.ph-link { color: var(--primary); font-size: 11px; font-weight: 650; }

.ph-card {
  margin: 0 18px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 3px 12px;
}
.ph-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--divider);
}
.ph-row:first-child { border-top: none; }
.ph-row-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--chip-bg);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ph-row-icon img { width: 16px; height: 16px; display: block; }
.ph-row-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ph-row-title { font-weight: 650; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-row-meta { color: var(--muted); font-size: 9.5px; margin-top: 1px; }
.ph-row .chip { font-size: 8.5px; padding: 2px 7px; }

.ph-tabbar {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--card-border);
  background: var(--card);
  padding: 8px 6px 18px;
}
.ph-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 8.5px;
  font-weight: 650;
  color: var(--muted);
}
.ph-tab img { width: 20px; height: 20px; opacity: 0.55; }
.ph-tab.is-active { color: var(--primary); }
.ph-tab.is-active img { opacity: 1; }

@media (prefers-color-scheme: dark) {
  .phone {
    box-shadow:
      inset 0 0 0 2px rgba(255, 255, 255, 0.22),
      0 2px 6px rgba(0, 0, 0, 0.4),
      0 40px 80px rgba(0, 0, 0, 0.5);
  }
}

/* ---------- Full-bleed statement band ---------- */
.statement {
  position: relative;
  min-height: clamp(520px, 82vh, 760px);
  display: flex;
  align-items: flex-end;
  color: #FFFFFF;
  overflow: hidden;
  background: var(--navy);
}

.statement-media { position: absolute; inset: 0; overflow: hidden; }
.statement-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .statement-media img {
      height: 124%;
      animation: drift linear both;
      animation-timeline: view();
    }
  }
}
@keyframes drift {
  from { transform: translateY(-14%); }
  to   { transform: translateY(0); }
}

.statement-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 28, 33, 0.9) 0%, rgba(11, 28, 33, 0.25) 55%, rgba(11, 28, 33, 0.05) 100%);
}

.statement-content {
  position: relative;
  width: 100%;
  padding: clamp(48px, 8vh, 88px) 0;
}
.statement-content .eyebrow { color: rgba(255, 255, 255, 0.6); }
.statement-content h2 {
  font-size: clamp(34px, 5vw, 64px);
  letter-spacing: -0.03em;
  max-width: 18ch;
  color: #FFFFFF;
}
.statement-content > .container > p {
  margin-top: 22px;
  max-width: 540px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.82);
}

/* ---------- People / portraits ---------- */
.people {
  position: relative;
  padding: clamp(100px, 15vh, 170px) 0;
  overflow: hidden;
}
.people > .container { position: relative; z-index: 1; }
.people .section-head { max-width: 720px; margin-bottom: clamp(48px, 7vh, 76px); }
.people .section-head p { margin-top: 20px; color: var(--slate); font-size: 18px; max-width: 560px; }
.people .display em { font-style: normal; color: var(--primary); }

/* Gradient Text (reactbits.dev/text-animations/gradient-text) — flowing brand gradient */
.gradient-text {
  font-style: normal;
  background-image: linear-gradient(90deg, #0E8C84, #39B8A6, #4FD0BC, #39B8A6, #0E8C84);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
@media (prefers-reduced-motion: no-preference) {
  .gradient-text { animation: gradient-flow 6s linear infinite; }
}
@keyframes gradient-flow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 24px);
}
@media (max-width: 900px) { .people-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .people-grid { grid-template-columns: 1fr; } }

.person { margin: 0; }
.person-photo {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--field-bg);
  box-shadow: var(--shadow-card);
}
.person-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.person:hover .person-photo img { transform: scale(1.04); }

.person figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 4px 0;
}
.person-role { font-weight: 700; font-size: 16px; color: var(--ink); letter-spacing: -0.01em; }
.person-line { font-size: 13.5px; color: var(--muted); }

/* ---------- Testimonial wall ----------
   Avatar tiles on a 21x21 CSS grid whose filled cells trace logo-mark.svg, so
   the faces form the SafetyClinic mark. The grid is intrinsically responsive:
   21 equal columns inside a square stage, so tiles scale with the container and
   no JS resize handling is needed. Tiles are decorative; the quotes live in
   .tw-list, which is the accessible/no-JS/narrow-screen presentation. */
.testimonials {
  position: relative;
  padding: clamp(96px, 14vh, 160px) 0 clamp(80px, 12vh, 140px);
  overflow: hidden;
}
.tw-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(115% 85% at 50% 4%, var(--field-bg) 0%, var(--bg) 60%);
}
.testimonials > .container { position: relative; z-index: 1; }

/* Copy left, wall right, tops level — `start` lifts the wall up beside the
   heading instead of letting it sit underneath. The card list spans both
   columns so that where it is painted it reads as a full-width grid. */
.tw-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.tw-list { grid-column: 1 / -1; }

@media (max-width: 980px) {
  .tw-layout { grid-template-columns: minmax(0, 1fr); }
}

/* :not(.tw-count) so the count line keeps its own smaller, muted treatment
   rather than being outranked by this more specific selector. */
.testimonials .tw-copy p:not(.tw-count) {
  margin-top: 20px;
  color: var(--slate);
  font-size: 18px;
  max-width: 46ch;
}

.tw-wrap { display: flex; justify-content: center; }

.tw-stage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(21, 1fr);
  grid-template-rows: repeat(21, 1fr);
  gap: 0.54%;
  width: min(651px, 100%);
  aspect-ratio: 1;
}
/* No JS (or no tiles built): fall back to the readable card list. */
.tw-stage:empty { display: none; }

.tw-tile {
  position: relative;
  grid-column: var(--c);
  grid-row: var(--r);
  border-radius: 25%;
  overflow: hidden;
  background: var(--app-bg);
  box-shadow: 0 1px 2px rgba(21, 40, 46, 0.08);
  transition: box-shadow 0.25s ease;
}
.tw-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* The pop is scroll-triggered, not load-triggered: a CSS animation starts the
   moment the element renders, so by the time you scrolled down to the wall it
   had already played. JS adds .is-in when the stage enters the viewport, and
   only then do the tiles animate — held at opacity 0 until it does. */
@media (prefers-reduced-motion: no-preference) {
  .js .tw-stage:not(.is-in) .tw-tile { opacity: 0; }
  .tw-stage.is-in .tw-tile { animation: tilePop 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms) both; }
}
@keyframes tilePop {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

/* Teal veil over each face keeps the mark legible as a logo; the checkmark
   stroke gets the brighter tint plus a ring so the check reads at tile size. */
.tw-tint {
  position: absolute;
  inset: 0;
  background: rgba(14, 140, 132, 0.22);
  transition: opacity 0.3s ease;
}
.tw-tile.is-check .tw-tint {
  background: rgba(57, 184, 166, 0.52);
  box-shadow: inset 0 0 0 1px rgba(57, 184, 166, 0.9);
}
.tw-stage.is-hoverable .tw-tile:hover { box-shadow: 0 0 0 2px var(--primary), 0 10px 24px rgba(11, 30, 35, 0.2); }
.tw-stage.is-hoverable .tw-tile:hover .tw-tint { opacity: 0; }

/* Hover quote card — positioned by JS above or below the hovered tile. */
.tw-pop {
  position: absolute;
  z-index: 40;
  width: min(328px, 88vw);
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card);
  box-shadow: 0 1px 2px rgba(21, 40, 46, 0.04), 0 18px 44px rgba(21, 40, 46, 0.14);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .tw-pop { animation: cardIn 0.18s ease both; }
}
@keyframes cardIn { from { opacity: 0; } to { opacity: 1; } }
.tw-pop-head { display: flex; align-items: center; gap: 12px; }
.tw-pop-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex: none;
  overflow: hidden;
  background: var(--app-bg);
}
.tw-pop-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tw-pop-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tw-pop-name { font-weight: 700; font-size: 15.5px; color: var(--ink); letter-spacing: -0.01em; }
.tw-pop-role { font-size: 13px; color: var(--muted); }
.tw-pop-quote { margin-top: 14px; font-size: 16.5px; line-height: 1.5; color: var(--slate); }

/* Sits with the rest of the copy in the left column now, not centred beneath. */
.tw-count {
  margin-top: clamp(24px, 3.5vh, 34px);
  font-size: 13.5px;
  color: var(--muted-2);
}

/* ---------- Testimonial card list ----------
   The accessible twin of the wall. Kept in the DOM for screen readers, search
   engines and no-JS visitors; only painted where hover cards can't work. */
/* Card styling is the default so every case where the list is actually painted
   (no-JS, touch, narrow) looks deliberate; the wide+hover case below collapses
   it to a screen-reader-only transcript, where visual styling is moot. */
.tw-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(14px, 2vw, 22px);
  width: 100%;
}
.tw-card {
  margin: 0;
  height: 100%;
  padding: 24px 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card);
  box-shadow: var(--shadow-card);
}
.tw-quote { margin: 0; font-size: 16.5px; line-height: 1.55; color: var(--slate); }
.tw-quote::before { content: "\201C"; }
.tw-quote::after { content: "\201D"; }
.tw-attrib { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.tw-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex: none;
  overflow: hidden;
  background: var(--app-bg);
}
.tw-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tw-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tw-name { font-weight: 700; font-size: 15.5px; color: var(--ink); letter-spacing: -0.01em; }
.tw-role { font-size: 13px; color: var(--muted); }

/* The "hover one" invitation only makes sense where hovering is possible; the
   touch/narrow variant introduces the cards shown underneath instead. */
.tw-hint-hover { display: none; }
.tw-hint-touch { display: inline; }

/* Wide + hover-capable: the wall is the presentation, so the list is reduced to
   a screen-reader-only transcript. */
@media (min-width: 861px) and (hover: hover) and (pointer: fine) {
  .js .tw-hint-hover { display: inline; }
  .js .tw-hint-touch { display: none; }

  .js .tw-list {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
}

/* ---------- Trust band ---------- */
.trust {
  position: relative;
  background: var(--field-bg);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  color: var(--ink);
  padding: clamp(100px, 14vh, 160px) 0;
  overflow: hidden;
}
.trust > .container { position: relative; z-index: 1; }
.trust-watermark {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: clamp(-80px, -4vw, 40px);
  width: clamp(280px, 42vw, 620px);
  height: auto;
  transform: translateY(-50%);
  opacity: 0.06;
  pointer-events: none;
}
@media (max-width: 860px) { .trust-watermark { opacity: 0.045; right: -18%; top: 38%; } }
.trust .eyebrow { color: var(--primary); }
.trust h2 {
  color: var(--ink);
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.03em;
  max-width: 14ch;
}
.trust-lede { margin-top: 22px; max-width: 520px; color: var(--slate); font-size: 18px; }

.trust-grid {
  margin-top: clamp(48px, 7vh, 72px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 clamp(28px, 4vw, 64px);
}
@media (max-width: 960px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .trust-grid { grid-template-columns: 1fr; } }

.trust-item {
  border-top: 1px solid var(--card-border);
  padding: 26px 0 34px;
}
.trust-item h3 {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.trust-item svg { width: 17px; height: 17px; color: var(--primary); flex-shrink: 0; }
.trust-item p { color: var(--slate); font-size: 15px; line-height: 1.6; }

/* ---------- Final CTA ---------- */
.cta {
  padding: clamp(120px, 18vh, 200px) 0;
  text-align: center;
}
.cta .eyebrow { margin-bottom: 26px; }
.cta h2 {
  font-size: clamp(44px, 7.5vw, 96px);
  letter-spacing: -0.03em;
  line-height: 0.98;
}
.cta p { margin: 26px auto 0; max-width: 460px; color: var(--slate); font-size: 18px; }
.cta-buttons {
  margin-top: 42px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.cta .btn-quiet { background: transparent; }

.cta-apps {
  margin-top: clamp(40px, 6vh, 60px);
  padding-top: clamp(32px, 5vh, 48px);
  border-top: 1px solid var(--card-border);
  max-width: 520px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.cta-apps-label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.cta-mail { margin: 36px auto 0; font-size: 15px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  background: var(--bg);
  border-top: 1px solid var(--card-border);
  color: var(--slate);
  padding: clamp(64px, 9vh, 96px) 0 clamp(36px, 5vh, 56px);
  overflow: hidden;
}

.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 40px clamp(28px, 5vw, 72px);
  padding-bottom: clamp(40px, 6vh, 64px);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
}
.footer-brand .brand-tile { width: 26px; height: 26px; border-radius: 7px; }
.footer-tagline {
  margin-top: 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 32ch;
}

.footer-col h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 6px 0 18px;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.footer-col ul a { color: var(--slate); font-size: 15px; }
.footer-col ul a:hover { color: var(--primary); text-decoration: none; }

.footer-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 26px;
  border-top: 1px solid var(--card-border);
  color: var(--muted);
  font-size: 13.5px;
}

/* Oversized wordmark: decorative watermark pinned behind the footer content */
.footer-wordmark {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.22em;
  z-index: 0;
  display: block;
  text-align: center;
  font-size: clamp(64px, 15vw, 240px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
  color: rgba(14, 140, 132, 0.06);
  pointer-events: none;
  user-select: none;
}

/* ---------- Legal pages ---------- */
.legal-hero {
  background: var(--field-bg);
  border-bottom: 1px solid var(--card-border);
  color: var(--ink);
  padding: 168px 0 72px;
}
.legal-hero h1 { color: var(--ink); font-size: clamp(38px, 6vw, 72px); letter-spacing: -0.03em; }
.legal-hero .eyebrow { color: var(--primary); }
.legal-updated { margin-top: 18px; font-size: 15px; color: var(--muted); }

.legal-body { padding: 72px 0 110px; }

.legal-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  max-width: 820px;
  margin-inline: auto;
  padding: clamp(28px, 5vw, 64px);
}

.legal-card > * { max-width: 70ch; }
.legal-card h2 { font-size: 22px; font-weight: 750; letter-spacing: -0.015em; margin: 40px 0 12px; }
.legal-card h2:first-child { margin-top: 0; }
.legal-card p { color: var(--slate); margin: 0 0 16px; }
.legal-card ul { color: var(--slate); margin: 0 0 16px; padding-left: 22px; }
.legal-card li { margin-bottom: 8px; }
.legal-card li::marker { color: var(--primary-bright); }
.legal-card strong { color: var(--ink); font-weight: 650; }
.legal-card h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; margin: 26px 0 10px; color: var(--ink); }
.legal-card a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.legal-card a:hover { color: var(--primary-bright); }
.legal-lead { font-size: 18px; color: var(--slate); }
.legal-toc { margin: 0 0 8px; padding: 20px 24px; background: var(--surface, rgba(20,51,59,0.04)); border-radius: 14px; }
.legal-toc h2 { margin: 0 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.legal-toc ul { columns: 2; column-gap: 32px; margin: 0; padding-left: 18px; }
.legal-card table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 15px; }
.legal-card th, .legal-card td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--card-border, rgba(20,51,59,0.12)); }
.legal-card th { color: var(--ink); font-weight: 700; }
.legal-card td { color: var(--slate); }
.legal-table-wrap { overflow-x: auto; }
@media (max-width: 640px) { .legal-toc ul { columns: 1; } }

.legal-card mark {
  background: var(--amber-bg);
  color: var(--amber);
  font-weight: 650;
  padding: 1px 7px;
  border-radius: 6px;
}

/* ── Pricing page ────────────────────────────────────────────────────────────
   Kept in the stylesheet rather than a <style> block on the page: the site
   ships `style-src 'self'` with no unsafe-inline, so an inline block silently
   does not apply and the page renders unstyled. */

.price-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  max-width: 820px;
  margin-inline: auto;
  padding: clamp(28px, 5vw, 56px);
  text-align: center;
}
.price-card .eyebrow { color: var(--primary); margin-bottom: 14px; }

.price-figure {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 6px;
}
.price-amount {
  font-size: clamp(52px, 9vw, 84px);
  font-weight: 780;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
}
.price-unit { font-size: 17px; font-weight: 600; color: var(--muted); }
.price-note { color: var(--slate); font-size: 16px; margin: 0 0 4px; }
.price-annual { color: var(--muted); font-size: 14.5px; margin: 0; }

.price-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 28px 0 0;
}

.price-pilot {
  margin: 28px auto 0;
  padding: 16px 20px;
  max-width: 560px;
  background: var(--chip-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  color: var(--slate);
  font-size: 14.5px;
  line-height: 1.5;
}
.price-pilot strong { color: var(--ink); font-weight: 700; }

/* What's included — two columns that collapse to one on a phone. */
.price-includes {
  max-width: 820px;
  margin: 40px auto 0;
  padding: clamp(24px, 4vw, 40px);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
}
.price-includes h2 {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.015em;
  margin: 0 0 4px;
  color: var(--ink);
}
.price-includes > p { color: var(--muted); margin: 0 0 20px; font-size: 14.5px; }
.price-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px 28px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.price-list li {
  position: relative;
  padding-left: 26px;
  color: var(--slate);
  font-size: 14.5px;
  line-height: 1.45;
}
.price-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 15px;
  height: 8px;
  border-left: 2px solid var(--primary-bright);
  border-bottom: 2px solid var(--primary-bright);
  transform: rotate(-45deg);
  border-radius: 1px;
}

.price-faq { max-width: 820px; margin: 40px auto 0; }
.price-faq h2 {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
  color: var(--ink);
}
.price-faq dt {
  font-weight: 700;
  color: var(--ink);
  font-size: 15.5px;
  margin: 22px 0 6px;
}
.price-faq dt:first-of-type { margin-top: 0; }
.price-faq dd {
  margin: 0;
  color: var(--slate);
  font-size: 15px;
  line-height: 1.6;
  max-width: 70ch;
}
.price-faq a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
