/* ==========================================================================
   Stasis ION Technology — stasision.com
   Brand system carried over from the preclinical dossier, not invented here:
   ink #001C1C · lavender #E0D6FF · mint #E0FAF0 · General Sans + Newsreader.
   ========================================================================== */

@font-face {
  font-family: 'General Sans';
  src: url('../fonts/GeneralSans-Variable.woff2') format('woff2-variations');
  font-weight: 200 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'General Sans';
  src: url('../fonts/GeneralSans-VariableItalic.woff2') format('woff2-variations');
  font-weight: 200 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('../fonts/Newsreader.ttf') format('truetype-variations');
  font-weight: 200 800; font-style: normal; font-display: swap;
}

:root {
  /* Brand */
  --ink:        #001C1C;
  --ink-2:      #062827;
  --ink-3:      #0C3130;
  --lav:        #E0D6FF;
  --lav-dim:    #B9AAF0;
  --mint:       #E0FAF0;
  --mint-dim:   #8FD9C0;

  /* Text on dark — all verified ≥4.5:1 against --ink */
  --fg:         #F4F8F7;   /* 16.8:1 */
  --fg-2:       #B7C6C4;   /* 8.3:1  */
  --fg-3:       #8CA09E;   /* 5.3:1  */

  --line:       rgba(224,214,255,.14);
  --line-2:     rgba(224,214,255,.28);

  --sans: 'General Sans', -apple-system, BlinkMacSystemFont, 'Avenir Next', sans-serif;
  --serif: 'Newsreader', Charter, Georgia, serif;

  --sp-1: .5rem;  --sp-2: 1rem;  --sp-3: 1.5rem;  --sp-4: 2rem;
  --sp-5: 3rem;   --sp-6: 4rem;  --sp-7: 6rem;    --sp-8: 8rem;

  --r-sm: 8px; --r-md: 14px; --r-lg: 22px;
  --wrap: 1200px;
  --ease: cubic-bezier(.16,1,.3,1);

  /* Theme-dependent surfaces that were hardcoded before */
  --nav-bg:   rgba(0,28,28,.82);
  --on-lav:   #001C1C;          /* text on a lavender button */
  --stat-bg:  var(--ink);
  --ink-hero: #001C1C;          /* hero stays dark in both themes */
  --shadow:   0 1px 3px rgba(0,0,0,.3);
  color-scheme: dark;
}

/* ---------- Light theme --------------------------------------------------
   Every pair below is verified >=4.5:1 by tools/audit-a11y.mjs, which runs
   against BOTH themes. The pale brand lavender/mint cannot carry text on
   white, so light mode uses deepened versions of the same hues. */
[data-theme="light"] {
  --ink:        #FFFFFF;
  --ink-2:      #F3F7F6;
  --ink-3:      #E8F0EE;
  --lav:        #5B3FC4;
  --lav-dim:    #7B62D9;
  --mint:       #0B6B4F;
  --mint-dim:   #128A66;

  --fg:         #001C1C;
  --fg-2:       #334746;
  --fg-3:       #556967;

  --line:       rgba(0,28,28,.13);
  --line-2:     rgba(0,28,28,.26);

  --nav-bg:     rgba(255,255,255,.86);
  --on-lav:     #FFFFFF;
  --stat-bg:    var(--ink);
  --shadow:     0 1px 3px rgba(0,28,28,.10);
  color-scheme: light;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg-2);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }

h1, h2, h3, h4 { color: var(--fg); font-weight: 600; letter-spacing: -.02em; line-height: 1.14; margin: 0; }
h1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); letter-spacing: -.012em; }
p  { margin: 0 0 var(--sp-2); max-width: 68ch; }
a  { color: var(--lav); text-decoration-color: rgba(224,214,255,.35); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--lav); }

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

/* Visually hidden but available to screen readers. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--lav); color: var(--on-lav); padding: .75rem 1.25rem;
  border-radius: 0 0 var(--r-sm) 0; font-weight: 600;
}
.skip:focus { left: 0; }

/* ---------- Section furniture -------------------------------------------- */
section { padding-block: clamp(4rem, 9vw, 7.5rem); position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--lav); margin-bottom: var(--sp-3);
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--lav-dim); }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--fg-2); max-width: 62ch; }
.sec-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* ---------- Nav ----------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 72px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; min-height: 44px; }
.brand img { height: 30px; width: auto; }
.brand span { font-weight: 600; color: var(--fg); letter-spacing: -.01em; font-size: 1.02rem; }
.brand span i { font-style: normal; color: var(--lav); }
.nav-links { display: flex; align-items: center; gap: var(--sp-3); }
/* :not(.btn) — otherwise this out-specifies .btn-primary and the CTA renders
   lavender-on-lavender. */
.nav-links a:not(.btn) {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--fg-2); text-decoration: none; font-size: .93rem; font-weight: 500;
  padding: .25rem .1rem; transition: color .18s var(--ease);
}
.nav-links a:not(.btn):hover { color: var(--fg); }
.nav-links .btn { min-height: 42px; padding: .55rem 1.2rem; }
.nav-toggle { display: none; }

/* ---------- Buttons ------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .8rem 1.5rem;
  border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: .95rem; font-weight: 600; letter-spacing: -.005em;
  text-decoration: none; cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease),
              border-color .18s var(--ease), color .18s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--lav); color: var(--on-lav); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--line-2); color: var(--fg); }
.btn-ghost:hover { border-color: var(--lav); background: rgba(224,214,255,.07); }
.btn svg { width: 17px; height: 17px; flex: none; }

/* ---------- Hero ---------------------------------------------------------- */
.hero { padding-block: clamp(4rem, 11vw, 8.5rem) clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(58% 46% at 76% 8%, rgba(224,214,255,.13), transparent 62%),
    radial-gradient(50% 42% at 12% 84%, rgba(224,250,240,.09), transparent 60%);
  pointer-events: none;
}
.hero h1 { max-width: 16ch; margin-bottom: var(--sp-3); }
.hero h1 em { font-style: normal; color: var(--lav); }
.hero .lede { font-size: clamp(1.1rem, 1.7vw, 1.28rem); margin-bottom: var(--sp-4); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-6); }

.statline {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
}
.statline div { background: var(--stat-bg); padding: 1.35rem 1.1rem; }
.statline b {
  display: block; font-size: clamp(1.35rem, 2.4vw, 1.85rem); font-weight: 600;
  color: var(--lav); letter-spacing: -.03em; line-height: 1.1; margin-bottom: .3rem;
}
.statline span { font-size: .78rem; line-height: 1.42; color: var(--fg-3); display: block; }

/* ---------- Cards / grids ------------------------------------------------- */
.grid { display: grid; gap: var(--sp-2); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: clamp(1.5rem, 2.4vw, 2rem);
  transition: border-color .22s var(--ease), background-color .22s var(--ease);
}
.card:hover { border-color: var(--line-2); background: var(--ink-3); }
.card h3 { margin-bottom: .6rem; }
.card p { color: var(--fg-2); font-size: .95rem; margin: 0; max-width: none; }
.card .ix {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center; margin-bottom: 1rem;
  background: rgba(224,214,255,.1); color: var(--lav);
}
.card .ix svg { width: 20px; height: 20px; }
.card.mint .ix { background: rgba(224,250,240,.1); color: var(--mint); }

/* ---------- Bento (evidence) --------------------------------------------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2); }
.bento .cell {
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: clamp(1.4rem, 2.2vw, 1.9rem);
  display: flex; flex-direction: column; justify-content: space-between; gap: 1rem;
}
.bento .cell.wide { grid-column: span 2; }
.bento .cell.tall { grid-row: span 2; }
.bento .fig {
  font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 600; letter-spacing: -.04em;
  color: var(--lav); line-height: 1; margin-bottom: .5rem;
}
.bento .cell.mint .fig { color: var(--mint); }
.bento .lbl { font-size: 1rem; font-weight: 600; color: var(--fg); margin-bottom: .35rem; }
.bento .sub { font-size: .86rem; color: var(--fg-3); line-height: 1.5; }
.bento .cell img { border-radius: var(--r-sm); margin-top: auto; }

/* provenance tag — the whole point of this section */
.tag {
  display: inline-flex; align-items: center; gap: .4rem; align-self: flex-start;
  font-size: .68rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  padding: .3rem .6rem; border-radius: 999px; white-space: nowrap;
}
.tag-own  { background: rgba(224,214,255,.13); color: var(--lav); }
.tag-ref  { background: rgba(255,255,255,.07); color: var(--fg-3); border: 1px dashed rgba(255,255,255,.2); }

/* ---------- Split feature ------------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split img { border-radius: var(--r-md); border: 1px solid var(--line); }
.figbox { background: #fff; border-radius: var(--r-md); padding: 1.25rem; }

/* ---------- Routes -------------------------------------------------------- */
.route {
  display: grid; grid-template-columns: 62px 1fr; gap: var(--sp-3);
  padding-block: var(--sp-3); border-top: 1px solid var(--line);
}
.route:last-child { border-bottom: 1px solid var(--line); }
.route .n {
  font-size: 1.6rem; font-weight: 600; color: var(--lav);
  letter-spacing: -.03em; opacity: .55; line-height: 1;
}
.route h3 { margin-bottom: .45rem; }
.route p { margin: 0; font-size: .95rem; }
.route .pri {
  display: inline-block; font-size: .68rem; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--mint); margin-left: .6rem; vertical-align: middle;
}

/* ---------- Table --------------------------------------------------------- */
.tbl-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 640px; }
th, td { text-align: left; padding: .95rem 1.15rem; vertical-align: top; }
thead th { background: rgba(224,214,255,.07); color: var(--fg); font-weight: 600; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
tbody tr + tr td { border-top: 1px solid var(--line); }
tbody td { color: var(--fg-2); }
tbody td:first-child { color: var(--fg); font-weight: 500; }

/* ---------- Notice / limitations ------------------------------------------ */
.notice {
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: linear-gradient(180deg, rgba(224,214,255,.05), transparent);
}
.notice h3 { margin-bottom: .75rem; }
.notice ul { margin: 0; padding-left: 1.15rem; }
.notice li { margin-bottom: .55rem; font-size: .95rem; }
.notice li::marker { color: var(--lav-dim); }

/* ---------- CTA band ------------------------------------------------------ */
.cta-band {
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  padding: clamp(2.25rem, 5vw, 3.75rem);
  background:
    radial-gradient(70% 130% at 88% 12%, rgba(224,214,255,.13), transparent 62%),
    var(--ink-2);
  text-align: center;
}
.cta-band h2 { margin-bottom: var(--sp-2); }
.cta-band p { margin-inline: auto; margin-bottom: var(--sp-4); }
.cta-band .hero-cta { justify-content: center; margin-bottom: 0; }
.meta { font-size: .82rem; color: var(--fg-3); margin-top: var(--sp-3); }

/* ---------- Footer -------------------------------------------------------- */
footer { border-top: 1px solid var(--line); padding-block: var(--sp-5) var(--sp-4); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: var(--sp-4); margin-bottom: var(--sp-5); }
footer img.mark { height: 30px; width: auto; margin-bottom: var(--sp-2); }
footer .col-h { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); margin: 0 0 .6rem; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 0; }
/* min-height 44 rather than a margin gap — keeps the row a real touch target */
footer li a {
  display: flex; align-items: center; min-height: 44px;
  color: var(--fg-2); text-decoration: none; font-size: .92rem;
}
footer li a:hover { color: var(--fg); text-decoration: underline; }
.legal { border-top: 1px solid var(--line); padding-top: var(--sp-3); font-size: .78rem; color: var(--fg-3); }
.legal p { max-width: 100ch; margin-bottom: .6rem; }

/* ---------- Reveal -------------------------------------------------------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}

/* ---------- Responsive ---------------------------------------------------- */
@media (max-width: 1000px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento .cell.tall { grid-row: span 1; }
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .statline { grid-template-columns: repeat(3, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 780px), (max-width: 950px) and (orientation: landscape) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: .25rem;
    position: absolute; inset: 72px 0 auto; padding: var(--sp-2) clamp(1.25rem, 4vw, 2.5rem) var(--sp-3);
    background: var(--ink-2); border-bottom: 1px solid var(--line);
  }
  .nav-links.open a { padding: .7rem 0; width: 100%; min-height: 44px; display: flex; align-items: center; }
  .nav-links .btn { width: 100%; margin-top: .5rem; }
  .nav-toggle {
    display: grid; place-items: center; width: 46px; height: 46px;
    background: none; border: 1px solid var(--line-2); border-radius: 10px;
    color: var(--fg); cursor: pointer;
  }
  .nav-toggle svg { width: 20px; height: 20px; }
  .split { grid-template-columns: 1fr; }
  .g-2, .g-3 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .bento { grid-template-columns: 1fr; }
  .bento .cell.wide { grid-column: span 1; }
  .g-4 { grid-template-columns: 1fr; }
  .statline { grid-template-columns: repeat(2, 1fr); }
  .statline div:last-child { grid-column: span 2; }
  .foot-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
}

/* ==========================================================================
   Added: language switcher, hero video + animated mark, contact form
   ========================================================================== */

/* ---------- Language switcher -------------------------------------------- */
.langbtn {
  min-width: 44px; min-height: 44px; padding: .5rem .85rem;
  background: none; border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--fg); font: inherit; font-size: .82rem; font-weight: 600;
  letter-spacing: .06em; cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.langbtn:hover { border-color: var(--lav); background: rgba(224,214,255,.08); }

.legal-note {
  border-left: 2px solid var(--lav-dim);
  padding: .75rem 0 .75rem 1rem;
  margin: 0 0 var(--sp-3);
  font-size: .84rem; line-height: 1.55; color: var(--fg-3); max-width: 90ch;
}

/* ---------- Hero: video is the background, mark sits in front ------------- */
/* The hero keeps its dark cinematic treatment in BOTH themes — it hosts a dark
   video, so inverting it would put dark text over dark footage. Tokens are
   pinned locally rather than inherited. */
.hero {
  isolation: isolate;
  /* Pin the WHOLE dark palette, not just the text tokens. Leaving --ink or
     --lav inherited put white stat cells and a deep-purple eyebrow inside the
     dark hero under the light theme (caught by the two-theme audit). */
  --ink:      #001C1C;
  --ink-2:    #062827;
  --ink-3:    #0C3130;
  --lav:      #E0D6FF;
  --lav-dim:  #B9AAF0;
  --mint:     #E0FAF0;
  --mint-dim: #8FD9C0;
  --fg:       #F4F8F7;
  --fg-2:     #C3D0CE;
  --fg-3:     #A6B7B5;
  --line:     rgba(224,214,255,.16);
  --line-2:   rgba(224,214,255,.30);
  --stat-bg:  rgba(0,28,28,.72);
  --on-lav:   #001C1C;
  background: var(--ink-hero, #001C1C);
  color: var(--fg-2);
}

.hero-video {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .62;
}

/* Scrim between video and content — this is what keeps the copy readable.
   Denser on the left where the text column sits. */
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,28,28,.95) 0%, rgba(0,28,28,.86) 42%,
                            rgba(0,28,28,.55) 72%, rgba(0,28,28,.42) 100%),
    linear-gradient(180deg, rgba(0,28,28,.55) 0%, transparent 26%,
                            transparent 74%, rgba(0,28,28,.75) 100%);
}
.hero::after { z-index: 2; }          /* brand glow, above the scrim */
.hero .wrap  { position: relative; z-index: 3; }   /* content in front of all */

/* The mark — large, layered over the footage */
.hero-mark {
  position: relative; z-index: 3;
  width: clamp(74px, 9vw, 116px); aspect-ratio: 1;
  margin-bottom: var(--sp-4);
}
.hero-mark img {
  width: 100%; height: auto; position: relative; z-index: 1;
  filter: drop-shadow(0 4px 26px rgba(0,28,28,.75));
  animation: hm-breathe 6s var(--ease) infinite;
}
.hero-mark .hm-ring {
  position: absolute; inset: -30%;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    rgba(224,214,255,0) 0deg, rgba(224,214,255,.55) 90deg,
    rgba(224,250,240,.55) 190deg, rgba(224,214,255,0) 300deg);
  filter: blur(15px);
  animation: hm-spin 11s linear infinite;
}
@keyframes hm-spin   { to { transform: rotate(360deg); } }
@keyframes hm-breathe{ 0%,100% { transform: scale(1); opacity: .95; }
                       50%     { transform: scale(1.04); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  /* Drop the motion, keep the picture: a still frame isn't animation, and simply
     hiding the video left a ~240px void where the band had reserved space. */
  .hero-video { display: none; }
  .hero::before {
    content: ''; position: absolute; inset: 0; z-index: 0;
    background: url('../video/hero-droplet-poster.jpg') 50% 50% / cover no-repeat;
    opacity: .62;
  }
  .hero-mark img, .hero-mark .hm-ring { animation: none; }
  .hero-mark .hm-ring { filter: blur(17px); opacity: .55; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 780px) {
  .hero::before { inset: 0 0 auto 0; height: var(--band); background-position: 50% 44%; opacity: .85; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 950px) and (orientation: landscape) {
  .hero::before { inset: 0; height: 100%; background-position: 62% 50%; opacity: .72; }
}
/* --- Mobile / portrait ---------------------------------------------------
   The hero runs ~1220px tall on a phone while the footage is 16:9. Stretching
   `cover` over that box scales the frame to ~2200px wide, so only ~17% of it is
   visible — a sliver that misses the droplet entirely.

   Instead the video becomes a band at the top, sized so the whole droplet stays
   in frame, with the mark over it and ALL copy below it on solid ink. Measured
   with tools/text-over-video.mjs, which samples the real rendered pixels behind
   each text run — the CSS audit can't see a video, and an earlier attempt that
   let the eyebrow sit on the droplet measured 2.85:1. */
@media (max-width: 780px) {
  .hero { --band: clamp(300px, 44vh, 400px); padding-block: 0 clamp(3rem, 6vw, 5rem); }

  .hero-video {
    height: var(--band);
    opacity: .85;
    object-position: 50% 44%;
  }
  .hero-scrim {
    background: linear-gradient(180deg,
      rgba(0,28,28,.62)  0px,
      rgba(0,28,28,.20)  70px,
      rgba(0,28,28,.20)  calc(var(--band) - 130px),
      rgba(0,28,28,.86)  calc(var(--band) - 40px),
      var(--ink-hero)    var(--band),
      var(--ink-hero)    100%);
  }

  /* Mark sits over the band; everything after it clears the band entirely. */
  .hero-mark {
    margin-top: 2.25rem;
    margin-bottom: calc(var(--band) - 2.25rem - clamp(74px, 9vw, 116px) - 1.25rem);
  }
  .hero .eyebrow { margin-top: 1.75rem; }
}

/* Landscape phones: short viewport, keep the band proportionally shorter. */
@media (max-width: 950px) and (orientation: landscape) {
  /* Short + wide: the frame fits reasonably, so keep it full-bleed but lift the
     footage and lean the scrim to the left where the copy sits. */
  .hero { --band: auto; padding-block: clamp(2rem,5vw,3.5rem) clamp(2.5rem,5vw,4rem); }
  .hero-video { height: 100%; opacity: .72; object-position: 62% 50%; }
  .hero-scrim {
    background:
      linear-gradient(90deg, rgba(0,28,28,.93) 0%, rgba(0,28,28,.88) 40%,
                              rgba(0,28,28,.55) 72%, rgba(0,28,28,.34) 100%),
      linear-gradient(180deg, rgba(0,28,28,.45) 0%, transparent 24%,
                              transparent 72%, rgba(0,28,28,.66) 100%);
  }
  .hero-mark { margin-top: 0; margin-bottom: var(--sp-3); }
  .hero .eyebrow { margin-top: 0; }
}

/* ---------- Form ---------------------------------------------------------- */
.form { max-width: 780px; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.field { margin-bottom: var(--sp-2); display: flex; flex-direction: column; }
.field label { font-size: .86rem; font-weight: 600; color: var(--fg); margin-bottom: .45rem; }
.field label span { color: var(--lav); }
.field input, .field select, .field textarea {
  font: inherit; font-size: .95rem;
  min-height: 48px; padding: .7rem .9rem;
  background: var(--ink); color: var(--fg);
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.field textarea { min-height: 132px; resize: vertical; line-height: 1.55; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(224,214,255,.45); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  border-color: var(--lav); outline: 2px solid var(--lav); outline-offset: 1px;
}
.field .hint { font-size: .8rem; color: var(--fg-3); margin: .45rem 0 0; }
.field .err  { font-size: .82rem; color: #FFB3A7; margin: .45rem 0 0; font-weight: 500; }
.field.invalid input, .field.invalid textarea { border-color: #FFB3A7; }

/* honeypot — off-screen, never display:none (bots skip hidden fields) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.f-actions { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-2); }
.f-alt { font-size: .88rem; color: var(--fg-3); margin: 0; }
.f-status { margin-top: var(--sp-2); font-size: .92rem; font-weight: 500; }
.f-status.ok  { color: var(--mint); }
.f-status.bad { color: #FFB3A7; }

@media (max-width: 780px) { .f-row { grid-template-columns: 1fr; } }

/* Inline mailto in the form's fallback line — WCAG 2.2 exempts inline text
   links from target sizing, but give it a comfortable hit area regardless. */
.f-alt a { display: inline-block; padding: .75rem .2rem; min-height: 44px; line-height: 1.5; }


/* ---------- Theme toggle -------------------------------------------------- */
.themebtn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: .5rem;
  background: none; border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--fg); cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.themebtn:hover { border-color: var(--lav); background: color-mix(in srgb, var(--lav) 8%, transparent); }
.themebtn svg { width: 19px; height: 19px; }
.themebtn .i-sun  { display: none; }
[data-theme="light"] .themebtn .i-sun  { display: block; }
[data-theme="light"] .themebtn .i-moon { display: none; }

/* Light-mode adjustments where a dark-first rule doesn't translate */
[data-theme="light"] .brand img,
[data-theme="light"] footer img.mark { filter: invert(1) brightness(.18); }
[data-theme="light"] .card,
[data-theme="light"] .bento .cell,
[data-theme="light"] .cta-band { box-shadow: var(--shadow); }
[data-theme="light"] .tag-ref { border-color: rgba(0,28,28,.28); }
[data-theme="light"] .figbox { border: 1px solid var(--line); }
[data-theme="light"] .field input,
[data-theme="light"] .field select,
[data-theme="light"] .field textarea { background: var(--ink); }
[data-theme="light"] .f-status.bad,
[data-theme="light"] .field .err { color: #A32B14; }
[data-theme="light"] .field.invalid input,
[data-theme="light"] .field.invalid textarea { border-color: #A32B14; }

/* The nav sits over the dark hero at scroll-top; keep its own contrast. */
[data-theme="light"] .nav { border-bottom-color: rgba(0,28,28,.13); }

/* ---------- Trademark mark ------------------------------------------------ */
/* Rendered small and raised so repeated brand mentions stay legible rather
   than cluttering the copy. */
.tm { font-size: .58em; vertical-align: super; line-height: 0; letter-spacing: 0; font-weight: 500; }
.brand .tm { color: var(--lav); margin-left: 1px; }
