/* ==========================================================================
   monai tech — marketing site stylesheet (v3 "motion" edition)
   Strict monochrome system: black, white and greys ONLY.
   Hierarchy comes from contrast, weight, size, spacing, hairlines & motion.
   Motion language: cinematic scroll-driven reveals, pinned sections,
   masked word rises, parallax. All gated behind .js / reduced-motion.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Surfaces (pure neutrals, zero chroma) */
  --ink-0: #000000;            /* darkest bands: hero, security, final CTA   */
  --ink-1: #0a0a0a;            /* page background                            */
  --ink-2: #101010;            /* card surface                               */
  --ink-3: #161616;            /* raised surface / UI fragments              */

  /* Hairlines */
  --line:        rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);

  /* Type */
  --txt-hi:  #f7f7f7;
  --txt-mid: #a6a6a6;
  --txt-low: #6f6f6f;

  --font-sans: "Archivo", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --header-h: 72px;
  --radius-lg: 20px;
  --radius-md: 14px;

  /* Signature easing — long, decelerating, "expensive" */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --container: min(1180px, 92vw);
}

/* ---------- Reset-lite ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--ink-1);
  color: var(--txt-mid);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
strong { color: var(--txt-hi); font-weight: 700; }
::selection { background: #ffffff; color: #000000; }

:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Utilities ---------- */
.container { width: var(--container); margin-inline: auto; }

.section { padding-block: clamp(64px, 8vw, 108px); }

.band-black { background: var(--ink-0); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Light band — inverted: light background, black type.
   Re-scopes the neutral tokens so every component restyles automatically. */
.band-light {
  --ink-2: #ffffff;
  --ink-3: #ffffff;
  --line: rgba(0, 0, 0, 0.10);
  --line-strong: rgba(0, 0, 0, 0.22);
  --txt-hi: #0a0a0a;
  --txt-mid: #4d4d4d;
  --txt-low: #8a8a8a;
  background: #f5f5f5;
  color: var(--txt-mid);
}
.band-light .card { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); }
.band-light .card:hover { border-color: rgba(0, 0, 0, 0.30); }
.band-light .btn-primary { background: #0a0a0a; color: #ffffff; }
.band-light .btn-primary:hover { background: #333333; }
.band-light .btn-ghost { border-color: rgba(0, 0, 0, 0.28); color: #0a0a0a; }
.band-light .btn-ghost:hover { background: rgba(0, 0, 0, 0.05); border-color: rgba(0, 0, 0, 0.5); }
.band-light .faq-q:hover { color: #000000; }
.band-light .skel-bar, .band-light .skel-avatar { background: #e4e4e4; }
.band-light.final-cta::before { background: radial-gradient(ellipse 55% 60% at 50% 100%, rgba(0, 0, 0, 0.05), transparent 65%); }
.band-light ::selection { background: #000000; color: #ffffff; }

/* Light bands read as rounded sheets sliding up over the black page */
:root { --sheet-r: clamp(28px, 4.5vw, 52px); }
.band-light {
  position: relative;
  z-index: 2;
  border-radius: var(--sheet-r) var(--sheet-r) 0 0;
  margin-top: calc(var(--sheet-r) * -1);
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--txt-low);
  margin-bottom: 20px;
}

h1, h2, h3 { color: var(--txt-hi); font-weight: 750; letter-spacing: -0.025em; text-wrap: balance; }

h2 { font-size: clamp(1.9rem, 4.6vw, 3.25rem); line-height: 1.06; font-weight: 800; }
h3 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.015em; }

.lead { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.6; max-width: 46em; text-wrap: pretty; }
p { text-wrap: pretty; }

.dim { color: var(--txt-low); }

.section-head { max-width: 780px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head.centered { margin-inline: auto; text-align: center; }

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

.skip-link {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 200;
  padding: 10px 16px;
  background: #ffffff; color: #000000;
  font-weight: 600; font-size: 0.9rem;
  border-radius: 999px;
  transform: translateY(-64px);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* Monospace placeholder markers (to be replaced before launch) */
.placeholder-note {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--txt-low);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  max-width: 640px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 15px 30px;
  white-space: nowrap;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.98); }

.btn-primary { background: #ffffff; color: #000000; }
.btn-primary:hover { background: #e6e6e6; box-shadow: 0 14px 34px -14px rgba(255, 255, 255, 0.35); }
.band-light .btn-primary:hover { box-shadow: 0 14px 34px -16px rgba(0, 0, 0, 0.5); }

.btn-ghost { border: 1px solid var(--line-strong); color: var(--txt-hi); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.05); }

.btn-sm { padding: 11px 22px; font-size: 0.875rem; }

/* ==========================================================================
   Header — condenses on scroll, hides scrolling down, returns scrolling up
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s ease, border-color 0.35s ease, transform 0.5s var(--ease-out);
}
.site-header.scrolled {
  background: rgba(5, 5, 5, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.site-header.is-hidden { transform: translateY(-102%); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
  transition: height 0.35s ease;
}
.site-header.scrolled .header-inner { height: 60px; }

.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { height: 30px; width: auto; transition: height 0.35s ease; }
.site-header.scrolled .brand img { height: 26px; }

.main-nav ul {
  display: flex;
  gap: 34px;
  list-style: none;
  padding: 0;
}
.main-nav a {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--txt-mid);
  transition: color 0.2s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -6px;
  height: 1px;
  background: #ffffff;
  transition: right 0.35s var(--ease-out);
}
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { right: 0; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--txt-hi); }

.header-actions { display: flex; align-items: center; gap: 22px; }
.login-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--txt-mid);
  transition: color 0.2s ease;
}
.login-link:hover { color: var(--txt-hi); }

/* Hamburger */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  margin-right: -8px;
}
.nav-toggle span {
  position: absolute;
  left: 10px; right: 10px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.3s ease, top 0.3s ease;
}
.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 25px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 110; /* above the header (100) so the menu's own close button is tappable */
  padding: calc(var(--header-h) + 24px) 6vw 40px;
  background: rgba(4, 4, 4, 0.97);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}
body.menu-open .mobile-menu { opacity: 1; visibility: visible; transform: none; }
body.menu-open { overflow: hidden; }
body.menu-open .site-header.is-hidden { transform: none; }

.mobile-nav { list-style: none; padding: 0; display: flex; flex-direction: column; }
.mobile-nav li { border-bottom: 1px solid var(--line); }
.mobile-nav a {
  display: block;
  padding: 20px 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--txt-hi);
}
.mobile-actions { display: grid; gap: 12px; padding-top: 32px; }
.mobile-actions .btn { width: 100%; }

/* Close (X) button inside the mobile menu — top-right, 44px hit area */
.mobile-menu-close {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 14px);
  right: 20px;
  width: 44px;
  height: 44px;
  z-index: 2;
}
.mobile-menu-close span {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 21px;
  height: 2px;
  border-radius: 2px;
  background: #ffffff;
}
.mobile-menu-close span:nth-child(1) { transform: rotate(45deg); }
.mobile-menu-close span:nth-child(2) { transform: rotate(-45deg); }
.mobile-menu-close:hover span { background: var(--txt-mid); }

@media (max-width: 919px) {
  .main-nav, .header-actions { display: none; }
  .nav-toggle { display: block; }
}
@media (min-width: 920px) {
  .mobile-menu { display: none; }
}

/* ==========================================================================
   Hero — full-viewport cinematic opening
   ========================================================================== */
.hero {
  position: relative;
  background: var(--ink-0);
  border-bottom: 1px solid var(--line);
  overflow: clip;
  padding-bottom: clamp(72px, 9vw, 130px);
}

/* --- Ambient background video (Higgsfield-generated) --- */
.hero-video {
  position: absolute;
  inset: 0 0 auto;
  height: min(100vh, 100%);
  overflow: hidden;
  pointer-events: none;
}
.hero-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);          /* guarantee zero chroma */
  opacity: 0.55;                 /* subtle — texture, not spectacle */
}
.hero-video-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 42%, rgba(0, 0, 0, 0.42), transparent 70%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.15) 40%, var(--ink-0) 96%);
}
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}
/* keep all hero content above the video layer */
.hero > *:not(.hero-video) { position: relative; z-index: 1; }

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 90%;
  background: radial-gradient(ellipse 60% 55% at 50% 0%, rgba(255, 255, 255, 0.10), transparent 65%);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: heroGlow 12s ease-in-out infinite alternate; }
}
@keyframes heroGlow {
  from { opacity: 0.75; transform: translateY(0); }
  to   { opacity: 1;    transform: translateY(4%); }
}

.hero-stage {
  position: relative;
  min-height: 80svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: var(--header-h);
  padding-bottom: 28px;
}

.hero-inner { position: relative; text-align: center; will-change: transform, opacity; }

.hero-kicker {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--txt-low);
  margin-bottom: clamp(22px, 3vh, 34px);
}

.hero-title {
  font-size: clamp(2.6rem, 7.4vw, 5.9rem);
  line-height: 0.99;
  font-weight: 800;
  letter-spacing: -0.04em;
  max-width: 16ch;
  margin-inline: auto;
}
.hero-title .line-dim { color: #8d8d8d; }

.hero-sub {
  max-width: 620px;
  margin: clamp(24px, 3.4vh, 36px) auto 0;
  font-size: clamp(1.0625rem, 1.7vw, 1.2rem);
  line-height: 1.6;
}

.hero-cta {
  margin-top: clamp(28px, 4vh, 44px);
  display: flex;
  justify-content: center;
}

.scroll-cue-removed { display: none; }

/* --- TEMP: hero video A/B switcher (remove with the markup) --- */
.hero-ab {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: rgba(16, 16, 16, 0.92);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}
.hero-ab-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--txt-low);
  padding: 0 6px;
}
.hero-ab button {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--txt-mid);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
}
.hero-ab button:hover { color: var(--txt-hi); }
.hero-ab button.is-active {
  color: var(--ink-0);
  background: var(--txt-hi);
}

/* --- Word-mask choreography (hero on load, headings on scroll) --- */
.wline { display: inline-block; overflow: hidden; vertical-align: bottom; }
.wline .w { display: inline-block; }
.js .split-load .w {
  transform: translateY(118%);
  transition: transform 1s var(--ease-out);
}
.js.is-loaded .split-load .w { transform: none; }

.js .split-scroll .w {
  transform: translateY(118%);
  transition: transform 0.9s var(--ease-out);
}
.js .split-scroll.in .w { transform: none; }

.js .rise {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s ease, transform 0.9s var(--ease-out);
}
.js.is-loaded .rise { opacity: 1; transform: none; }
.rise.r1 { transition-delay: 0.1s; }
.rise.r2 { transition-delay: 0.55s; }
.rise.r3 { transition-delay: 0.7s; }

/* Product stage */
.product-stage {
  position: relative;
  max-width: 1020px;
  margin: 0 auto;
}
.product-stage::before {
  content: "";
  position: absolute;
  inset: -8% -12%;
  background: radial-gradient(ellipse 55% 50% at 50% 40%, rgba(255, 255, 255, 0.07), transparent 70%);
  pointer-events: none;
}

/* Cinematic scroll-driven entrance: the app tilts up as it enters (JS-driven) */
.js .stage-scroll {
  transform-origin: 50% 0;
  will-change: transform, opacity;
}

.browser-frame {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--ink-2);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 30px 90px -20px rgba(0, 0, 0, 0.9);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 46px;
  padding: 0 18px;
  background: #0d0d0d;
  border-bottom: 1px solid var(--line);
}
.b-dots { display: flex; gap: 7px; }
.b-dot { width: 10px; height: 10px; border-radius: 50%; background: #2c2c2c; }
.b-address {
  flex: 0 1 300px;
  margin-inline: auto;
  padding: 6px 16px;
  background: #060606;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--txt-low);
  text-align: center;
}
.b-spacer { width: 44px; }

.product-viewport {
  aspect-ratio: 1920 / 1085; /* matches the cropped screenshot exactly — no cut-off */
  background: #d9d9d9;
}
.product-viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  /* Keeps the whole site black & white even if a colour screenshot is swapped in */
  filter: grayscale(1);
}
@media (max-width: 640px) {
  .product-viewport { aspect-ratio: 1920 / 1085; }
}

/* Floating UI fragments (desktop only) */
.float-card {
  position: absolute;
  z-index: 2;
  width: 250px;
  padding: 18px;
  background: rgba(10, 10, 10, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.85);
  text-align: left;
  display: none;
}
.float-left { left: -84px; bottom: 16%; }
/* min-height ensures the card is tall enough to keep the Practice Value tile
   (icon + label + figure) fully covered as the dashboard scales. */
.float-right { right: -92px; top: 12%; width: 272px; min-height: 232px; }
/* Show the floating tiles on standard laptop/desktop widths (not just ≥1180),
   so the right-hand tile keeps the Practice Value figure covered. */
@media (min-width: 1000px) { .float-card { display: block; } }
/* Narrower desktops: pull the tiles in so they stay on-screen and the
   right-hand tile still sits over the Practice Value tile. */
@media (min-width: 1000px) and (max-width: 1179px) {
  .float-left  { left: -32px; bottom: 13%; width: 236px; }
  .float-right { right: -32px; top: 13%; width: 252px; }
}

@media (prefers-reduced-motion: no-preference) {
  .float-left  { animation: floaty 7s ease-in-out infinite alternate; }
  .float-right { animation: floaty 8.5s ease-in-out infinite alternate-reverse; }
}
@keyframes floaty {
  from { transform: translateY(-6px); }
  to   { transform: translateY(8px); }
}

/* Mini UI vocabulary (shared by float cards, pillar visuals & step panels) */
.ui-kpi { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; }
.ui-kpi + .ui-kpi { border-top: 1px solid var(--line); }
.kpi-label { font-size: 0.72rem; letter-spacing: 0.04em; color: var(--txt-low); }
.kpi-value { font-size: 1.02rem; font-weight: 750; color: var(--txt-hi); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

.ui-tag {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--txt-mid);
  margin-bottom: 12px;
}
.ui-insight-title { font-size: 0.9rem; font-weight: 650; line-height: 1.4; color: var(--txt-hi); }
.ui-action { margin-top: 12px; font-size: 0.76rem; line-height: 1.55; color: var(--txt-low); }
.ui-action-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--txt-mid);
  margin-bottom: 4px;
}

/* ==========================================================================
   Marquee — full-bleed scrolling strip
   ========================================================================== */
.marquee {
  overflow: hidden;
  background: var(--ink-0);
  padding-top: clamp(18px, 2.6vw, 30px);
  padding-bottom: calc(clamp(18px, 2.6vw, 30px) + var(--sheet-r));
}
.marquee-track {
  display: flex;
  width: max-content;
}
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: marquee 36s linear infinite; }
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}
.marquee ul {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}
.marquee li {
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-size: clamp(1rem, 2vw, 1.45rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--txt-low);
}
.marquee li::after {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #2e2e2e;
  margin-inline: clamp(28px, 4vw, 56px);
}

/* ==========================================================================
   Split sections (image + copy)
   ========================================================================== */
.split {
  display: grid;
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1.1fr; }
  .split.flip > .media-frame { order: 2; }
}

.media-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ink-2);
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}
/* Cinematic image reveal: frame fades in while the photo settles from a zoom */
.js .media-frame img { transform: scale(1.14); transition: transform 1.6s var(--ease-out); }
.js .media-frame.is-in img { transform: scale(1); }

.copy-col h2 { margin-bottom: 24px; }
.copy-col p + p { margin-top: 18px; }

/* ==========================================================================
   Statement sections (Positioning / Simplicity) + scroll-scrubbed text
   ========================================================================== */
.statement { max-width: 880px; margin-inline: auto; text-align: center; }
.statement h2 { font-size: clamp(2.1rem, 5.4vw, 3.9rem); letter-spacing: -0.03em; }
.statement .lead { margin: 28px auto 0; }
.statement-lines span { display: block; }

/* Words illuminate one by one as the paragraph crosses the viewport */
.js .scrub { color: var(--txt-hi); }
.js .scrub .w { opacity: 0.16; transition: opacity 0.3s linear; }
.js .scrub .w.on { opacity: 1; }

/* ==========================================================================
   Cards & pillars
   ========================================================================== */
.card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 3vw, 38px);
  transition: border-color 0.25s ease, transform 0.4s var(--ease-out);
}
.card:hover { border-color: rgba(255, 255, 255, 0.22); transform: translateY(-4px); }

.grid-3 { display: grid; gap: 18px; }
@media (min-width: 700px)  { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.step-num {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  color: var(--txt-low);
}

.pillar-visual {
  background: #0c0c0c;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 26px;
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.pillar-body h3 { margin-bottom: 14px; }
.pillar-body p { font-size: 0.98rem; }

/* Sticky-stacking pillars: each card pins, the next slides over it */
.pillar-stack { display: grid; gap: 20px; }
@media (min-width: 900px) {
  .pillar-stack { display: block; }
  .pillar-stack .pillar-card {
    position: sticky;
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(36px, 5vw, 72px);
    align-items: center;
    padding: clamp(32px, 4vw, 52px);
    margin-bottom: 22px;
    min-height: clamp(300px, 40vh, 420px);
    background: #111111;
    box-shadow: 0 -20px 60px -34px rgba(0, 0, 0, 0.9);
    will-change: transform;
  }
  .pillar-stack .pillar-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: #000000;
    opacity: var(--covered, 0);
    pointer-events: none;
  }
  .pillar-stack .pillar-card:hover { transform: none; }
  .pillar-stack .pillar-card:nth-child(1) { top: calc(var(--header-h) + 44px); }
  .pillar-stack .pillar-card:nth-child(2) { top: calc(var(--header-h) + 78px); }
  .pillar-stack .pillar-card:nth-child(3) { top: calc(var(--header-h) + 112px); }
  .pillar-stack .pillar-visual { margin-bottom: 0; min-height: 240px; padding: 24px 28px; }
  .pillar-stack .pillar-body h3 { font-size: clamp(1.4rem, 1.9vw, 1.8rem); margin-bottom: 12px; }
  .pillar-stack .pillar-body p { font-size: 1.02rem; max-width: 40em; }
}

.bench-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.78rem;
}
.bench-row + .bench-row { border-top: 1px solid var(--line); }
.bench-name { color: var(--txt-hi); font-weight: 600; }
.bench-range { color: var(--txt-low); font-variant-numeric: tabular-nums; margin-left: auto; }
.bench-pill {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--txt-mid);
  white-space: nowrap;
}
.bench-pill.hi { background: #ffffff; color: #000000; border-color: #ffffff; }
.band-light .bench-pill.hi { background: #0a0a0a; color: #ffffff; border-color: #0a0a0a; }

/* ==========================================================================
   How It Works — pinned, scroll-driven step sequence
   Default (no-JS / mobile / reduced motion): simple stacked steps.
   With html.hiw-on (set by JS on desktop): section pins for ~3 viewports
   and the steps + visual panels advance with scroll.
   ========================================================================== */
.hiw { background: #f5f5f5; }

.hiw-pin { padding-block: clamp(72px, 9vw, 110px); }

.hiw-head { margin-bottom: clamp(32px, 4.5vh, 56px); }

.hiw-steps { list-style: none; padding: 0; margin: 0; }

.hiw-step {
  border-top: 1px solid var(--line);
  padding: clamp(22px, 3vh, 30px) 0;
  transition: opacity 0.5s ease;
}
.hiw-step .step-num { margin-bottom: 12px; }
.hiw-step h3 { font-size: clamp(1.3rem, 1.8vw, 1.6rem); margin-bottom: 10px; }
.hiw-step p:not(.step-num) { font-size: 0.98rem; max-width: 44em; }

.hiw-bar { display: none; }
.hiw-visuals { display: none; }

/* --- Enhanced pinned mode --- */
html.hiw-on .hiw-track { height: 170vh; } /* shorter track ≈ 2 wheel rolls per step */
html.hiw-on .hiw-pin {
  position: sticky;
  top: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: calc(var(--header-h) + 12px) 48px;
}
html.hiw-on .hiw-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(48px, 6vw, 96px);
  align-items: center;
}
html.hiw-on .hiw-step { opacity: 0.32; cursor: pointer; transition: opacity 0.45s ease; }
html.hiw-on .hiw-step.is-active { opacity: 1; }

html.hiw-on .hiw-bar {
  display: block;
  position: relative;
  height: 2px;
  margin-top: 20px;
  background: var(--line);
  overflow: hidden;
}
.hiw-bar i {
  position: absolute;
  inset: 0;
  background: #0a0a0a;
  transform: scaleX(0);
  transform-origin: left;
}

html.hiw-on .hiw-visuals {
  display: grid;
  position: relative;
}
.hiw-panel {
  grid-area: 1 / 1;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 3vw, 40px);
  min-height: clamp(320px, 44vh, 420px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.5s ease, transform 0.6s var(--ease-out);
  pointer-events: none;
}
.hiw-panel.is-active { opacity: 1; transform: none; }

.hiw-panel .ui-kpi { padding: 14px 0; }
.hiw-panel .kpi-label { font-size: 0.78rem; }
.hiw-panel .kpi-value { font-size: 1.35rem; }
.hiw-panel .bench-row { font-size: 0.85rem; padding: 12px 0; }
.hiw-panel .ui-insight-title { font-size: 1.05rem; }
.hiw-panel .ui-action { font-size: 0.85rem; }

.connect-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  font-size: 0.95rem;
}
.connect-row + .connect-row { border-top: 1px solid var(--line); }
.connect-row .c-name { color: var(--txt-hi); font-weight: 600; }

/* ==========================================================================
   Security
   ========================================================================== */
.sec-grid { display: grid; gap: 18px; margin-block: clamp(36px, 5vw, 56px); }
@media (min-width: 760px) { .sec-grid { grid-template-columns: 1fr 1fr; } }
.sec-card p { font-size: 1rem; }
.sec-close { max-width: 46em; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.6; }

/* ==========================================================================
   Reviews (placeholder)
   ========================================================================== */
.reviews .placeholder-note { margin-bottom: 40px; }
.skel-card { min-height: 200px; display: flex; flex-direction: column; gap: 12px; }
.skel-bar { height: 10px; border-radius: 999px; background: #1c1c1c; }
.skel-bar.w80 { width: 80%; }
.skel-bar.w60 { width: 60%; }
.skel-foot { margin-top: auto; display: flex; align-items: center; gap: 12px; }
.skel-avatar { width: 36px; height: 36px; border-radius: 50%; background: #1c1c1c; flex-shrink: 0; }
.skel-bar.w40 { width: 40%; height: 8px; }

/* ==========================================================================
   FAQ accordion
   ========================================================================== */
.faq-list { max-width: 860px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item h3 { font-size: inherit; }

.faq-q {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 18px;
  text-align: left;
  padding: 24px 4px;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--txt-hi);
  transition: color 0.2s ease;
}
.faq-q:hover { color: #ffffff; }
.faq-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--txt-low);
  min-width: 22px;
  flex-shrink: 0;
}
.faq-icon {
  position: relative;
  width: 14px; height: 14px;
  margin-left: auto;
  flex-shrink: 0;
  align-self: center;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  inset: 6px 0;
  background: var(--txt-mid);
  transition: transform 0.4s var(--ease-out);
}
.faq-icon::after { transform: rotate(90deg); }
.faq-q[aria-expanded="true"] .faq-icon::after { transform: rotate(0deg); }

.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ease-out);
}
.faq-a.open { grid-template-rows: 1fr; }
.faq-a-inner {
  overflow: hidden;
  min-height: 0;
  visibility: hidden;
  transition: visibility 0.5s;
}
.faq-a.open .faq-a-inner { visibility: visible; }
.faq-a-body { padding: 2px 4px 30px 40px; max-width: 720px; }
.faq-a-body p { font-size: 0.98rem; }
.faq-a-body p + p { margin-top: 12px; }
.faq-lead { color: var(--txt-hi); }

/* ==========================================================================
   Final CTA
   ========================================================================== */
.final-cta {
  position: relative;
  text-align: center;
  overflow: hidden;
}
.final-cta::before {
  content: "";
  position: absolute;
  inset: auto -10% -40%;
  height: 80%;
  background: radial-gradient(ellipse 55% 60% at 50% 100%, rgba(255, 255, 255, 0.08), transparent 65%);
  pointer-events: none;
}
.final-cta .container { position: relative; }
.final-cta h2 { max-width: 16ch; margin-inline: auto; font-size: clamp(2.2rem, 5.6vw, 4rem); }
.final-cta .lead { margin: 26px auto 0; max-width: 560px; }
.cta-row {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--ink-0);
  border-top: 1px solid var(--line);
  padding-top: clamp(56px, 7vw, 88px);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px 32px;
  padding-bottom: clamp(44px, 5vw, 64px);
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1020px) { .footer-grid { grid-template-columns: 1.35fr 0.9fr 0.9fr 1.15fr; } }

.footer-brand img { height: 48px; width: auto; }
.footer-cta { margin-top: 26px; }

.footer-heading { font-size: 1.05rem; font-weight: 700; margin-bottom: 22px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; justify-items: start; }
.footer-links a { display: inline-flex; align-items: baseline; gap: 10px; font-size: 0.95rem; color: var(--txt-mid); transition: color 0.2s ease; }
.footer-links a:hover { color: var(--txt-hi); }
.link-arrow { color: var(--txt-low); transition: transform 0.3s var(--ease-out); }
.footer-links a:hover .link-arrow { transform: translateX(4px); }

.footer-email { display: inline-flex; align-items: center; gap: 10px; font-size: 0.95rem; color: var(--txt-mid); transition: color 0.2s ease; }
.footer-email:hover { color: var(--txt-hi); }
.footer-email svg { width: 18px; height: 18px; flex: none; }

.subscribe-form { margin-top: 24px; display: grid; gap: 12px; justify-items: start; max-width: 280px; }
.subscribe-form input {
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--txt-hi);
  font: inherit;
  font-size: 0.95rem;
}
.subscribe-form input::placeholder { color: var(--txt-low); }

.social-row { margin-top: 28px; display: flex; gap: 18px; }
.social-row a { color: var(--txt-mid); transition: color 0.2s ease; }
.social-row a:hover { color: var(--txt-hi); }
.social-row svg { width: 20px; height: 20px; }

.footer-legal { padding: 28px 0 36px; border-top: 1px solid var(--line); }
.fca-line { font-size: 0.85rem; color: var(--txt-mid); max-width: 72ch; }
.fca-line strong { color: var(--txt-hi); }
.company-line { margin-top: 14px; font-size: 0.78rem; color: var(--txt-low); }
.company-line a { text-decoration: underline; text-underline-offset: 3px; }
.company-line a:hover { color: var(--txt-mid); }

.footer-bar { border-top: 1px solid var(--line); padding: 18px 0; }
.footer-bar p { text-align: center; font-size: 0.85rem; color: var(--txt-mid); }

/* ==========================================================================
   About page
   ========================================================================== */
.page-hero {
  background: var(--ink-0);
  border-bottom: 1px solid var(--line);
  padding-top: calc(var(--header-h) + clamp(56px, 9vw, 110px));
  padding-bottom: clamp(64px, 8vw, 110px);
}
.mission-title {
  font-size: clamp(2rem, 5.2vw, 4.1rem);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 22ch;
  color: #8d8d8d;
}
.mission-title strong { color: var(--txt-hi); font-weight: 800; }

.editor-note { margin-top: 28px; }

.person-card { display: flex; flex-direction: column; }
.headshot {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: repeating-linear-gradient(45deg, #101010 0 14px, #0b0b0b 14px 28px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.headshot-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--txt-low);
  text-align: center;
  padding: 12px;
}
.person-name { margin-bottom: 4px; }
.person-role {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--txt-low);
  margin-bottom: 16px;
}
.person-bio { font-size: 0.95rem; }

.team-grid { display: grid; gap: 24px; }
@media (min-width: 780px) { .team-grid { grid-template-columns: 1fr 1fr; } }

.advisor .headshot { aspect-ratio: 1 / 1; max-width: 180px; }
.advisor .person-bio { font-size: 0.9rem; color: var(--txt-low); }

/* ==========================================================================
   V4 "GLOSS" PASS — subtle specular sheen over the mono system.
   Purely additive: delete this entire block to undo the gloss look
   (pre-gloss state is also snapshotted at snapshots/v4-higgsfield-media).
   ========================================================================== */

/* Black bands: faint top-light instead of flat black */
.band-black {
  background: radial-gradient(130% 70% at 50% 0%, #0e0e0e 0%, #000000 62%);
}

/* Light bands: porcelain gradient + crisp highlight on the sheet's top edge */
.band-light {
  background: linear-gradient(180deg, #fcfcfc 0%, #f2f2f2 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

/* Primary buttons — polished enamel */
.btn-primary {
  background: linear-gradient(180deg, #ffffff 0%, #ededed 58%, #dcdcdc 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 10px 26px -16px rgba(255, 255, 255, 0.40);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f4f4f4 58%, #e7e7e7 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 16px 40px -16px rgba(255, 255, 255, 0.50);
}
.band-light .btn-primary {
  background: linear-gradient(180deg, #2b2b2b 0%, #0c0c0c 55%, #000000 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.60),
    0 12px 30px -16px rgba(0, 0, 0, 0.60);
}
.band-light .btn-primary:hover {
  background: linear-gradient(180deg, #3d3d3d 0%, #171717 55%, #000000 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.60),
    0 16px 38px -16px rgba(0, 0, 0, 0.65);
}

/* Ghost buttons — a whisper of glass */
.btn-ghost {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
.band-light .btn-ghost {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.35));
  box-shadow: inset 0 1px 0 #ffffff;
}

/* Cards — lacquered: soft gradient + hairline top highlight */
.card {
  background: linear-gradient(180deg, #151515 0%, #0d0d0d 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.band-light .card {
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 3px rgba(0, 0, 0, 0.06);
}
.pillar-card {
  background: linear-gradient(180deg, #161616 0%, #0e0e0e 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.pillar-stack .pillar-card {
  background: linear-gradient(180deg, #161616 0%, #0e0e0e 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 -20px 60px -34px rgba(0, 0, 0, 0.9);
}

/* Product frame — glossy chrome + a diagonal screen glare */
.browser-frame {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 30px 90px -20px rgba(0, 0, 0, 0.9);
}
.browser-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(118deg,
    rgba(255, 255, 255, 0.13) 0%,
    rgba(255, 255, 255, 0.04) 20%,
    transparent 36%,
    transparent 74%,
    rgba(255, 255, 255, 0.05) 100%);
  mix-blend-mode: screen;
}
.browser-bar { background: linear-gradient(180deg, #181818 0%, #0b0b0b 100%); }
.b-dot { background: radial-gradient(circle at 35% 30%, #4d4d4d, #222222 72%); }
.b-address { box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.55); }

/* Photography — a faint glass sweep across media frames */
.media-frame { position: relative; }
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(115deg,
    rgba(255, 255, 255, 0.10) 0%,
    rgba(255, 255, 255, 0.03) 18%,
    transparent 34%);
  mix-blend-mode: screen;
}

/* Header — glassier when condensed */
.site-header.scrolled {
  background: rgba(8, 8, 8, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 40px -22px rgba(0, 0, 0, 0.9);
}

/* ==========================================================================
   V4.1 — real founder headshots (about.html)
   ========================================================================== */
.headshot.has-photo {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #1a1a1a;
  padding: 0;
}
.headshot.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}

/* ==========================================================================
   V4.2 — legal pages (cookie-policy.html / privacy-policy.html / terms-of-use.html)
   ========================================================================== */
.legal-updated {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--txt-low);
  margin-top: 20px;
}
.legal-body { max-width: 780px; }
.legal-meta {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 22px 26px;
  font-size: 0.92rem;
  margin-bottom: 44px;
}
.legal-meta p { margin: 0; }
.legal-meta strong { display: block; margin-bottom: 6px; }
.legal-body h2 {
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  letter-spacing: -0.015em;
  margin: 52px 0 16px;
}
.legal-body h2:first-of-type { margin-top: 0; }
.legal-body h3 { font-size: 1.02rem; color: var(--txt-hi); margin: 28px 0 10px; }
.legal-body p { margin-bottom: 14px; font-size: 0.97rem; }
.legal-body ul { margin: 0 0 16px; padding-left: 24px; display: grid; gap: 7px; font-size: 0.97rem; }
.legal-body li::marker { color: var(--txt-low); }
.legal-body a { text-decoration: underline; text-underline-offset: 3px; }
.legal-body .clause { color: var(--txt-hi); font-weight: 700; margin-right: 6px; }
.legal-foot {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--txt-low);
}

.team-sub { margin: clamp(48px, 6vw, 72px) 0 28px; }

/* ==========================================================================
   Resources stub
   ========================================================================== */
.stub-grid { margin-top: 48px; }
.stub-card {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stub-card span { font-family: var(--font-mono); font-size: 0.75rem; color: var(--txt-low); }

/* ==========================================================================
   Scroll-reveal motion
   ========================================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(42px);
  transition: opacity 0.9s ease, transform 1s var(--ease-out);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* Film grain over everything (element injected by JS) */
.grain {
  position: fixed;
  inset: -140px;
  z-index: 400;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}
@media (prefers-reduced-motion: no-preference) {
  .grain { animation: grainShift 1.1s steps(4) infinite; }
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-46px, 32px); }
  50% { transform: translate(28px, -50px); }
  75% { transform: translate(-30px, -18px); }
  100% { transform: translate(0, 0); }
}

/* ==========================================================================
   Reduced motion — every enhancement collapses to a static page
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .rise { opacity: 1; transform: none; transition: none; }
  .js .split-load .w, .js .split-scroll .w { transform: none; transition: none; }
  .grain { display: none; }
  .js .scrub .w { opacity: 1; }
  .js .media-frame img { transform: none; transition: none; }
  .marquee-track { animation: none; }
  .float-left, .float-right { animation: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   V4.3 — blog: resources listing grid + article pages
   ========================================================================== */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 960px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } }
.post-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 3px rgba(0, 0, 0, 0.06);
  text-decoration: none; color: inherit;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.post-card:hover {
  border-color: rgba(0, 0, 0, 0.35);
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 #ffffff, 0 16px 36px -20px rgba(0, 0, 0, 0.28);
}
.post-num { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--txt-low); }
.post-title { font-size: 1.1rem; line-height: 1.32; letter-spacing: -0.01em; margin: 0; }
.post-excerpt { font-size: 0.88rem; line-height: 1.55; color: var(--txt-low); margin: 0; flex-grow: 1; }
.post-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.05em; color: var(--txt-low);
  border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px;
}
.post-arrow { transition: transform 0.25s ease; }
.post-card:hover .post-arrow { transform: translateX(4px); }

.article-title { color: var(--txt-hi); }
.article-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--txt-low); margin-top: 20px; }
.article-body { max-width: 760px; }
.article-body p { margin-bottom: 16px; font-size: 1.02rem; line-height: 1.7; }
.article-body h2 { font-size: clamp(1.35rem, 2vw, 1.7rem); letter-spacing: -0.015em; margin: 48px 0 16px; }
.article-body > h2:first-child { margin-top: 0; }
.article-body h3 { font-size: 1.1rem; margin: 32px 0 12px; }
.article-body h4 { font-size: 1rem; margin: 26px 0 10px; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 26px; display: grid; gap: 8px; font-size: 1.02rem; line-height: 1.65; }
.article-body ul ul, .article-body ol ol, .article-body ul ol, .article-body ol ul { margin: 8px 0 0; }
.article-body li::marker { color: var(--txt-low); }
.article-body a { text-decoration: underline; text-underline-offset: 3px; }
.article-body u { text-decoration: underline; text-underline-offset: 3px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 0.95rem; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; vertical-align: top; }
.article-body th { background: #efefef; font-weight: 700; }
.article-back { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.article-back a { font-family: var(--font-mono); font-size: 0.85rem; text-decoration: none; }
.article-back a:hover { text-decoration: underline; }

/* ==========================================================================
   V5 — MOBILE (iPhone) refinements  ≤640px
   Implements the v5 mobile handoff spec against the existing responsive base.
   Purely additive: delete this whole block to revert to the prior mobile view.
   ========================================================================== */
@media (max-width: 640px) {
  /* Shorter header bar on phones */
  :root { --header-h: 56px; }

  /* Header — always in its "glass" state on mobile (not only after scrolling),
     with a safe-area inset so it sits correctly under the iOS status bar.
     IMPORTANT: the glass/blur is rendered on a ::before layer, NOT on the header
     element itself. A backdrop-filter on the element makes it the containing
     block for the fixed mobile menu nested inside it — which collapsed the menu
     to the header's height, so it appeared see-through and unreadable. Putting
     the blur on ::before keeps the frosted look while freeing the menu to cover
     the full screen. */
  .site-header,
  .site-header.scrolled {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
  }
  .site-header { padding-top: env(safe-area-inset-top); }
  .site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(6, 6, 6, 0.62);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
  .site-header.scrolled .header-inner { height: var(--header-h); }
  .brand img,
  .site-header.scrolled .brand img { height: 22px; }

  /* Mobile menu overlay — solid black so nothing bleeds through (white text on
     an opaque black panel, per design). */
  .mobile-menu { background: #070707; }

  /* Hero */
  .hero-title { font-size: 43px; line-height: 1; letter-spacing: -0.035em; max-width: 14ch; }
  .hero-kicker { font-size: 11px; }
  .hero-sub { max-width: 330px; font-size: 16px; }
  .hero-cta { margin-top: 30px; }
  .hero-cta .btn { width: 100%; max-width: 320px; padding-block: 17px; }

  /* Full-width, stacked call-to-action buttons */
  .cta-row { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 12px; }
  .cta-row .btn { width: 100%; padding-block: 17px; }
  .mobile-actions .btn { padding-block: 16px; }

  /* Split-section photos: 4/5 portrait crop so stacked images never run tall.
     (The About story photo opts into a 3/2 crop via .media-3-2.) */
  .media-frame { aspect-ratio: 4 / 5; }
  .media-frame.media-3-2 { aspect-ratio: 3 / 2; }

  /* Marquee */
  .marquee li { font-size: 15px; }
  .marquee li::after { margin-inline: 26px; }

  /* Footer — Navigation | Legal side by side; brand + contact full-width.
     Bottom safe-area padding clears the iOS home indicator. */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .footer-brand,
  .footer-contact { grid-column: 1 / -1; }
  .footer-bar { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
}
