/* =========================================================================
   Ringleader theme: grayscale, dark/light. All colors come from variables.
   ========================================================================= */

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f4f4f5;
  --color-bg-elev: #ffffff;
  --color-text: #18181b;
  --color-text-light: #52525b;
  --color-border: #e4e4e7;
  --color-accent: #18181b;        /* grayscale by default */
  --color-accent-contrast: #ffffff;
  --color-brand: #2d5bff;         /* accent: a beautiful blue, used with restraint */
  --color-brand-contrast: #ffffff;
  --color-shadow: rgba(0, 0, 0, 0.08);
  --color-shadow-strong: rgba(0, 0, 0, 0.16);
  --color-overlay: rgba(0, 0, 0, 0.5);
  --color-code-bg: #18181b;
  --color-code-text: #f4f4f5;

  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "Space Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --container: 1120px;
  --header-h: 68px;
  --radius: 12px;
  --radius-sm: 8px;

  /* isometric hero block faces: layered grays for iso depth (light) */
  --iso-top: #ffffff;   --iso-top-line: #d4d4d8;
  --iso-left: #e7e7ea;  --iso-left-line: #cfcfd4;
  --iso-right: #d2d2d8; --iso-right-line: #b9b9c1;
  --iso-shadow: rgba(24, 24, 33, 0.16);
}

:root[data-theme="dark"] {
  --iso-top: #28282c;   --iso-top-line: #3c3c42;
  --iso-left: #1b1b1e;  --iso-left-line: #303036;
  --iso-right: #131316; --iso-right-line: #27272c;
  --iso-shadow: rgba(0, 0, 0, 0.42);

  --color-bg: #0a0a0a;
  --color-bg-alt: #161616;
  --color-bg-elev: #161616;
  --color-text: #f4f4f5;
  --color-text-light: #a1a1aa;
  --color-border: #27272a;
  --color-accent: #f4f4f5;
  --color-accent-contrast: #0a0a0a;
  --color-shadow: rgba(0, 0, 0, 0.5);
  --color-shadow-strong: rgba(0, 0, 0, 0.7);
  --color-overlay: rgba(0, 0, 0, 0.7);
  --color-code-bg: #161616;
  --color-code-text: #f4f4f5;
}

/* --------------------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; }
/* overflow-x: clip prevents any stray element from creating horizontal scroll
   on mobile (Kim's feedback). `clip` (not `hidden`) keeps the sticky header
   working, since it doesn't establish a scroll container. */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
/* cookie banner is non-blocking — no scroll lock (RIN-21) */
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition-base), color var(--transition-base);
}
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.18; font-weight: 700; letter-spacing: -0.02em; }
:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; border-radius: 4px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================== Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-base);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px var(--color-shadow); }
.btn:active { transform: translateY(0); }

.btn-feature {
  background: var(--color-brand);
  color: var(--color-brand-contrast);
  position: relative;
  overflow: hidden;
  animation: ctaGlow 3.2s ease-in-out infinite;
}
.btn-feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px var(--color-shadow-strong);
  animation-play-state: paused;          /* pause idle glow on hover */
}
/* shine sweep */
.btn-feature::after {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  animation: ctaShine 3.6s ease-in-out infinite;
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-outline:hover { border-color: var(--color-brand); }

@keyframes ctaGlow {
  0%, 100% { box-shadow: 0 0 0 0 var(--color-shadow); }
  50% { box-shadow: 0 0 22px 2px var(--color-shadow-strong); }
}
@keyframes ctaShine {
  0%, 60% { left: -120%; }
  100% { left: 140%; }
}

/* =============================================================== Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--color-bg) 86%, transparent);
  border-bottom: 1px solid transparent;
  transition: background var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--color-bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 1px 14px var(--color-shadow);
  border-bottom-color: var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--color-text); }
.logo-mark { width: 38px; height: 38px; flex: none; }
.logo-wordmark { height: 27px; width: auto; flex: none; }
/* Mark stays blue in all themes; wordmark swaps: black on light, white on dark. */
.logo-on-dark { display: none; }
:root[data-theme="dark"] .logo-on-light { display: none; }
:root[data-theme="dark"] .logo-on-dark { display: inline-block; }
.logo-badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-light);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}
.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text-light);
  font-size: 0.93rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: color var(--transition-base), background var(--transition-base);
}
.nav-link:hover { color: var(--color-text); background: var(--color-bg-alt); }
.nav-link.active { color: var(--color-text); font-weight: 600; }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.header-cta { padding: 9px 18px; font-size: 0.9rem; }

.header-controls { display: flex; align-items: center; gap: 8px; }

/* theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg-elev);
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition-base);
}
.theme-toggle:hover { border-color: var(--color-accent); transform: translateY(-1px); }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg-elev);
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 18px; height: 2px;
  margin: 0 auto;
  background: var(--color-text);
  transition: transform var(--transition-base), opacity var(--transition-base);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----------------------------------------------------- Documents dropdown */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 230px;
  list-style: none;
  margin: 0;
  padding: 8px;
  background: var(--color-bg-elev);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px var(--color-shadow-strong);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
  z-index: 50;
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.caret { transition: transform var(--transition-base); }
.has-dropdown:hover .caret,
.has-dropdown.open .caret { transform: rotate(180deg); }
.dropdown-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
}
.dropdown-group:hover { background: var(--color-bg-alt); }
.dropdown-item {
  display: block;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-light);
  transition: all var(--transition-base);
}
.dropdown-item:hover { background: var(--color-bg-alt); color: var(--color-text); }
.dropdown-item.active { color: var(--color-text); }
.dropdown-group-name { font-size: 0.9rem; font-weight: 600; }
.dropdown-links { display: inline-flex; gap: 6px; }
.dropdown-links a {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 9px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-light);
  transition: all var(--transition-base);
}
.dropdown-links a:hover { color: var(--color-text); border-color: var(--color-accent); }

/* ================================================================= Hero */
.hero { padding: clamp(48px, 9vw, 104px) 0 clamp(40px, 7vw, 84px); overflow: hidden; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-light);
  padding: 5px 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  margin: 0 0 20px;
}
.hero-title { font-size: clamp(2.1rem, 5vw, 3.5rem); margin: 0 0 18px; }
.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--color-text-light);
  max-width: 36ch;
  margin: 0 0 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-visual { display: flex; justify-content: center; }
/* ---- hero isometric stack ---- */
.iso-panel {
  --iso-T: 9.5s;
  position: relative;
  width: 100%;
  max-width: 440px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: radial-gradient(120% 90% at 50% 18%, var(--color-bg-alt), var(--color-bg) 72%);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 22px 60px -30px var(--iso-shadow);
}
/* faint iso floor grid */
.iso-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--color-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.28;
  transform: perspective(700px) rotateX(60deg) scale(1.5);
  transform-origin: center 78%;
  -webkit-mask-image: radial-gradient(circle at 50% 70%, #000, transparent 68%);
  mask-image: radial-gradient(circle at 50% 70%, #000, transparent 68%);
  pointer-events: none;
}

/* ---- animated flat isometric stack (all browsers; see hero-stack.html).
   2D only: no transform-style / preserve-3d and no 3D rotations, so WebKit
   (Safari + every iOS browser) renders it identically to Chromium. The blocks
   are pre-projected isometric SVG shapes; the assembly is animated purely with
   2D translate / opacity / scale, which every engine treats the same. ---- */
.iso-stage {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.iso-svg { display: block; width: 84%; height: auto; margin: 0 auto; overflow: visible; }
.isf-top   { fill: var(--iso-top);   stroke: var(--iso-top-line);   stroke-width: 1.2; stroke-linejoin: round; }
.isf-left  { fill: var(--iso-left);  stroke: var(--iso-left-line);  stroke-width: 1.2; stroke-linejoin: round; }
.isf-right { fill: var(--iso-right); stroke: var(--iso-right-line); stroke-width: 1.2; stroke-linejoin: round; }
.isf-glyph { color: var(--color-text-light); stroke: currentColor; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
/* top-layer glyph is the filled three-ring brand mark, not a stroked line icon */
.isf-mark { fill: #2D5BFF; stroke: none; }
/* soft neutral contact shadow under the landed stack; fades with the stack */
.isf-shadow { fill: var(--iso-shadow); opacity: 0; animation: isoShadow var(--iso-T) ease-in-out infinite; }

/* the assembly: 3 sheets fly in from above, settle into a tight stack, hold,
   then fly fully out for the loop. One shared timeline, staggered per layer.
   The settled rest positions pull the sheets close together (rest offsets
   -58 / 0 / +58, ~12px apart) so they read as one cohesive stack.
   transform-box: fill-box pins each group's own box as the origin so the
   2D translate is consistent across engines. 2D translate + opacity only. */
.iso-cube { transform-box: fill-box; transform-origin: center; }
.iso-c1 { animation: isoFly1 var(--iso-T) cubic-bezier(.22, 1, .36, 1) infinite; }
.iso-c2 { animation: isoFly2 var(--iso-T) cubic-bezier(.22, 1, .36, 1) infinite; }
.iso-c3 { animation: isoFly3 var(--iso-T) cubic-bezier(.22, 1, .36, 1) infinite; }

/* Each sheet flies in from far above to its rest offset (decelerating settle),
   holds assembled, then accelerates fully up and out of frame. Assembly runs
   bottom -> top; disassembly runs top -> bottom. The ease-in on the exit
   keyframe makes the fly-out accelerate away rather than fade in place. */
@keyframes isoFly1 { /* bottom (VM): in first (lands 16%), out last; rest -58 */
  0%   { transform: translateY(-258px); opacity: 0; }
  3%   { opacity: 1; }
  16%  { transform: translateY(-58px); opacity: 1; }
  80%  { transform: translateY(-58px); opacity: 1; animation-timing-function: cubic-bezier(.5, 0, .85, .4); }
  90%  { transform: translateY(-258px); opacity: 0; }
  100% { transform: translateY(-258px); opacity: 0; }
}
@keyframes isoFly2 { /* middle (container): lands 32%; rest 0 */
  0%, 16% { transform: translateY(-200px); opacity: 0; }
  19%  { opacity: 1; }
  32%  { transform: translateY(0); opacity: 1; }
  74%  { transform: translateY(0); opacity: 1; animation-timing-function: cubic-bezier(.5, 0, .85, .4); }
  84%  { transform: translateY(-200px); opacity: 0; }
  100% { transform: translateY(-200px); opacity: 0; }
}
@keyframes isoFly3 { /* top (workstation): lands 48%, out first; rest +58 */
  0%, 32% { transform: translateY(-142px); opacity: 0; }
  35%  { opacity: 1; }
  48%  { transform: translateY(58px); opacity: 1; }
  68%  { transform: translateY(58px); opacity: 1; animation-timing-function: cubic-bezier(.5, 0, .85, .4); }
  78%  { transform: translateY(-142px); opacity: 0; }
  100% { transform: translateY(-142px); opacity: 0; }
}
/* contact shadow tracks the bottom sheet: fades in as it flies in and is
   fully present by the time it lands (16%), then fades as the stack leaves */
@keyframes isoShadow {
  0%, 4% { opacity: 0; }
  16%    { opacity: 1; }
  80%    { opacity: 1; }
  90%, 100% { opacity: 0; }
}

/* mono status line cycling in sync with the assembly */
.iso-status {
  position: absolute;
  left: 0; right: 0; bottom: 16px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--color-text-light);
}
.iso-ok {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-text);
  animation: isoBeat var(--iso-T) ease-in-out infinite;
}
@keyframes isoBeat { 0%, 100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1); } }
.iso-steps { display: grid; }
.iso-st { grid-area: 1 / 1; white-space: nowrap; opacity: 0; }
.iso-st.s0 { animation: isoStep0 var(--iso-T) linear infinite; }
.iso-st.s1 { animation: isoStep1 var(--iso-T) linear infinite; }
.iso-st.s2 { animation: isoStep2 var(--iso-T) linear infinite; }
.iso-st.s3 { animation: isoStep3 var(--iso-T) linear infinite; }
.iso-st.s4 { animation: isoStep4 var(--iso-T) linear infinite; }
@keyframes isoStep0 { 0%, 13% { opacity: 1; } 16%, 100% { opacity: 0; } }
@keyframes isoStep1 { 0%, 13% { opacity: 0; } 16%, 29% { opacity: 1; } 32%, 100% { opacity: 0; } }
@keyframes isoStep2 { 0%, 29% { opacity: 0; } 32%, 45% { opacity: 1; } 48%, 100% { opacity: 0; } }
@keyframes isoStep3 { 0%, 45% { opacity: 0; } 48%, 61% { opacity: 1; } 64%, 100% { opacity: 0; } }
@keyframes isoStep4 { 0%, 61% { opacity: 0; } 64%, 88% { opacity: 1; } 92%, 100% { opacity: 0; } }

/* ============================================================== Sections */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-alt { background: var(--color-bg-alt); }
.section-head { max-width: 640px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-brand);
  margin: 0 0 12px;
}
.section-title { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin: 0 0 14px; }
.section-lead { font-size: 1.08rem; color: var(--color-text-light); margin: 0; }
.section-cta { text-align: center; margin-top: 44px; }

/* feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
/* 2x2 variant for sets of four cards (e.g. the /why/ pillars) */
.feature-grid--2x2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) {
  .feature-grid--2x2 { grid-template-columns: 1fr; }
}
.feature-card {
  background: var(--color-bg-elev);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px var(--color-shadow); border-color: var(--color-accent); }
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  margin-bottom: 16px;
  transition: transform var(--transition-base), color var(--transition-base);
}
/* the icon lifts a little more than the card and warms to brand on hover, so
   icon and text read as separate layers rather than one flat block */
.feature-card:hover .feature-icon { transform: translateY(-4px) scale(1.08); color: var(--color-brand); }
.feature-icon svg { width: 30px; height: 30px; }
.feature-title { font-size: 1.18rem; margin: 0 0 8px; }
.feature-body { color: var(--color-text-light); margin: 0; font-size: 0.97rem; }

/* roadmap cards: shipped-feature styling, marked as not-yet-shipped */
.roadmap-card { position: relative; }
.roadmap-card .feature-icon { color: var(--color-text-light); }
.roadmap-badge {
  position: absolute;
  top: 18px; right: 18px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--color-brand);
  background: color-mix(in srgb, var(--color-brand) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-brand) 30%, transparent);
}
.roadmap-card:hover { border-color: var(--color-brand); }

/* split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
/* let grid items shrink below their content's min-content, so a wide code
   block scrolls internally instead of forcing the page wider (mobile). */
.split > * { min-width: 0; }
.split-copy .section-title { text-align: left; }
.split-copy .btn { margin-top: 22px; }
.code-block {
  background: var(--color-code-bg);
  color: var(--color-code-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px 24px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.7;
  overflow-x: auto;
  min-width: 0;
  max-width: 100%;
  box-shadow: 0 14px 34px var(--color-shadow);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
/* tiny hover animation: the snippet lifts and picks up a faint brand glow */
.code-block:hover {
  transform: translateY(-3px);
  border-color: var(--color-brand);
  box-shadow: 0 20px 46px var(--color-shadow), 0 0 0 1px color-mix(in srgb, var(--color-brand) 35%, transparent);
}
.code-block .c-prompt { color: #a1a1aa; }
.code-block .c-key { color: #a1a1aa; }
.code-block .c-dim { color: #71717a; }
.code-block .c-ok { color: #d4d4d8; font-weight: 600; }

/* ============================================================= 404 page */
.notfound { padding: clamp(56px, 12vw, 130px) 0; }
.notfound-inner { max-width: 640px; margin: 0 auto; text-align: center; }
.notfound-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-light);
  padding: 5px 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  margin: 0 0 22px;
}
.notfound-title { font-size: clamp(2rem, 5.5vw, 3.1rem); margin: 0 0 16px; }
.notfound-lead {
  font-size: 1.12rem;
  color: var(--color-text-light);
  max-width: 46ch;
  margin: 0 auto 32px;
}
.notfound-term {
  text-align: left;
  margin: 0 auto 32px;
  max-width: 520px;
  font-size: 0.86rem;
}
.notfound-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.notfound-links {
  display: flex;
  gap: 8px 22px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
}
.notfound-links a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text-light);
  transition: color var(--transition-base);
}
.notfound-links a:hover { color: var(--color-text); }

/* ====================================================== Inner page layout */
.main-page { min-height: 60vh; }
.page-header { padding: clamp(48px, 8vw, 84px) 0 clamp(20px, 4vw, 36px); }
.page-title { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0; }
.page-lead { font-size: 1.15rem; color: var(--color-text-light); margin: 14px 0 0; max-width: 60ch; }
.page-body { padding-bottom: clamp(56px, 9vw, 96px); }

/* prose: the page body spans the full container so grids and cards line up
   with the page title; individual text blocks stay at a readable measure. */
.prose > p,
.prose > h2,
.prose > h3,
.prose > h4,
.prose > ul,
.prose > ol,
.prose > blockquote,
.prose > pre { max-width: 760px; }
.prose > h2 { font-size: 1.6rem; margin: 2.2em 0 0.6em; }
.prose > h3 { font-size: 1.22rem; margin: 1.8em 0 0.5em; }
.prose > p { margin: 0 0 1.1em; color: var(--color-text); }
.prose a { color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--color-border); }
.prose a:hover { text-decoration-color: var(--color-accent); }
/* buttons inside prose keep their own styling */
.prose a.btn { text-decoration: none; }
.prose a.btn-feature { color: var(--color-accent-contrast); }
.prose > ul, .prose > ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose > ul li, .prose > ol li { margin: 0.3em 0; }
.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--color-bg-alt);
  padding: 2px 6px;
  border-radius: 5px;
}
.prose pre {
  background: var(--color-code-bg);
  color: var(--color-code-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
}
.prose pre code { background: none; padding: 0; color: inherit; }
/* tiny hover animation on command snippets: lift + brand glow, matching the
   homepage .code-block. The .highlight wrapper is the hover target so the copy
   button (positioned on it) rises with the block. */
.prose .highlight,
.prose > pre {
  border-radius: var(--radius);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.prose .highlight:hover,
.prose > pre:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px var(--color-shadow);
}
.prose .highlight:hover pre,
.prose > pre:hover { border-color: var(--color-brand); }
/* copy-to-clipboard button on shell command blocks */
.prose .has-copy { position: relative; }
.code-copy {
  position: absolute;
  top: 8px; right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid rgba(244, 244, 245, 0.18);
  background: rgba(244, 244, 245, 0.08);
  color: #d4d4d8;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition-base), background var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}
.has-copy:hover .code-copy,
.code-copy:focus-visible { opacity: 1; }
.code-copy:hover { background: rgba(244, 244, 245, 0.16); color: #fff; border-color: rgba(244, 244, 245, 0.3); }
.code-copy .ic-check { display: none; }
.code-copy.copied { color: #4ade80; border-color: rgba(74, 222, 128, 0.4); opacity: 1; }
.code-copy.copied .ic-copy { display: none; }
.code-copy.copied .ic-check { display: inline; }
/* touch devices have no hover — keep the button visible */
@media (hover: none) {
  .code-copy { opacity: 1; }
}
.prose blockquote {
  border-left: 3px solid var(--color-border);
  margin: 1.4em 0;
  padding: 0.2em 0 0.2em 1.1em;
  color: var(--color-text-light);
}
.prose hr { border: none; border-top: 1px solid var(--color-border); margin: 2.4em 0; }

/* the shortcode components are also used inside .prose */
.prose .feature-grid,
.prose .team-grid,
.prose .openings-list,
.prose .page-cta,
.prose .workaround-grid,
.prose .pairs { margin: 1.8em 0; max-width: none; }
.prose .beta-grid { margin: 1.8em 0; max-width: none; }

/* failure-mode cards: greyed and dashed to read as the wrong answer */
.workaround-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 860px) {
  .workaround-grid { grid-template-columns: 1fr; }
}
.workaround-card {
  background: var(--color-bg-alt);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.workaround-title { font-size: 1.05rem; margin: 0 0 8px; }
.workaround-body { color: var(--color-text-light); font-size: 0.95rem; margin: 0; }

/* problem -> answer pairs (why page): each row pairs a workaround with the
   pillar that answers it, side by side. Hovering the row lifts both, so the
   problem and its fix read as one unit. */
.pairs { display: flex; flex-direction: column; gap: 18px; }
.pair-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 20px;
}
.pair-row > .workaround-card,
.pair-row > .feature-card { margin: 0; }
.pair-problem { display: flex; flex-direction: column; justify-content: center; }
.pair-arrow {
  align-self: center;
  display: flex;
  flex: none;
  color: var(--color-text-light);
}
.pair-arrow svg { width: 22px; height: 22px; }
.pair-row:hover .workaround-card,
.pair-row:hover .feature-card {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px var(--color-shadow);
  border-color: var(--color-brand);
}
/* the answer's icon lifts a touch more than its card, matching the home cards */
.pair-row:hover .feature-card .feature-icon { transform: translateY(-4px) scale(1.08); color: var(--color-brand); }
@media (max-width: 760px) {
  .pair-row { grid-template-columns: 1fr; gap: 12px; }
  .pair-arrow { transform: rotate(90deg); }
}

/* closing call-to-action card */
.page-cta {
  margin-top: 2.6em;
  padding: 40px 28px;
  background: var(--color-bg-elev);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-align: center;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.page-cta:hover { transform: translateY(-3px); box-shadow: 0 16px 38px var(--color-shadow); border-color: var(--color-accent); }
.page-cta-title { font-size: 1.5rem; margin: 0 0 10px; }
.page-cta-body { color: var(--color-text-light); max-width: 560px; margin: 0 auto 22px; }
.page-cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* team */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 860px) {
  .team-grid { grid-template-columns: 1fr; }
}
.team-card {
  background: var(--color-bg-elev);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.team-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px var(--color-shadow); border-color: var(--color-accent); }
.team-photo {
  width: 84px; height: 84px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  filter: grayscale(100%);
  transition: transform var(--transition-base), filter var(--transition-slow);
}
/* the portrait blooms to colour and rises a touch differently than the card,
   so photo and text feel like distinct layers (grayscale-by-default fits the
   site's monochrome identity) */
.team-card:hover .team-photo { filter: grayscale(0); transform: scale(1.07) translateY(-2px); }
/* touch devices can't hover to reveal colour, so show the portraits in colour */
@media (hover: none) {
  .team-photo { filter: none; }
}
.team-monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  background: var(--color-bg-alt);
  color: var(--color-accent);
  border: 1px solid var(--color-border);
}
.team-name { font-size: 1.2rem; margin: 0 0 4px; }
.team-role { color: var(--color-text-light); font-weight: 600; font-size: 0.9rem; margin: 0 0 12px; }
.team-bio { color: var(--color-text-light); font-size: 0.95rem; margin: 0; }

/* openings */
.openings-list { display: grid; gap: 16px; }
.opening-card {
  background: var(--color-bg-elev);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}
.opening-card:hover { transform: translateY(-4px); border-color: var(--color-accent); box-shadow: 0 14px 32px var(--color-shadow); }
.opening-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.opening-title { font-size: 1.2rem; margin: 0; }
.opening-meta { display: flex; gap: 8px; }
.tag {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--color-bg-alt);
  color: var(--color-text-light);
}
.opening-body { color: var(--color-text-light); margin: 12px 0 18px; }

/* beta: two-column request layout — form beside a value/expectations panel */
.beta-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 860px) {
  .beta-grid { grid-template-columns: 1fr; gap: 28px; }
}

.beta-aside { display: grid; gap: 20px; }
.beta-aside-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.beta-aside-title {
  font-size: 1.1rem;
  margin: 0 0 18px;
}
.beta-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.beta-perks li { display: flex; gap: 14px; align-items: flex-start; font-size: 0.95rem; color: var(--color-text-light); line-height: 1.5; }
.beta-perks li strong { color: var(--color-text); font-weight: 600; }
.beta-perk-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: var(--color-bg-elev);
  border: 1px solid var(--color-border);
  color: var(--color-accent);
}
.beta-perk-icon svg { width: 20px; height: 20px; }
.beta-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.beta-steps li { display: flex; gap: 14px; align-items: center; font-size: 0.95rem; color: var(--color-text-light); line-height: 1.45; }
.beta-step-n {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--color-brand);
  color: var(--color-brand-contrast);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
}

/* beta form */
.beta-form {
  background: var(--color-bg-elev);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
}
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row label { font-size: 0.86rem; font-weight: 600; color: var(--color-text); }
.form-row input,
.form-row textarea {
  font: inherit;
  padding: 11px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--transition-base);
}
.form-row input:focus,
.form-row textarea:focus { outline: none; border-color: var(--color-accent); }
.beta-form .btn { width: 100%; margin-top: 4px; }
.form-note { font-size: 0.82rem; color: var(--color-text-light); margin: 14px 0 0; text-align: center; }

/* form submission status (shared by beta + footer contact forms) */
.form-status {
  font-size: 0.88rem;
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  line-height: 1.45;
}
.form-status[hidden] { display: none; }
.form-status.is-success {
  color: #15803d;
  background: color-mix(in srgb, #16a34a 12%, var(--color-bg));
  border-color: color-mix(in srgb, #16a34a 35%, var(--color-border));
}
.form-status.is-error {
  color: #b91c1c;
  background: color-mix(in srgb, #dc2626 10%, var(--color-bg));
  border-color: color-mix(in srgb, #dc2626 32%, var(--color-border));
}
:root[data-theme="dark"] .form-status.is-success { color: #4ade80; }
:root[data-theme="dark"] .form-status.is-error { color: #f87171; }
/* the form swaps to a success card after a confirmed submission */
.form-sent { text-align: center; }
.form-sent-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: color-mix(in srgb, #16a34a 14%, var(--color-bg));
  color: #16a34a;
}
:root[data-theme="dark"] .form-sent-icon { color: #4ade80; }
.form-sent-title { font-size: 1.2rem; margin: 0 0 8px; }
.form-sent-body { color: var(--color-text-light); margin: 0; font-size: 0.95rem; }
.btn[aria-busy="true"] { opacity: 0.75; pointer-events: none; }
/* honeypot: kept in the layout (off-screen) rather than display:none, since
   some bots skip display:none fields. Hidden from AT and tab order via markup. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* two-up form rows (e.g. company + team size in the enterprise modal) */
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 480px) { .form-grid-2 { grid-template-columns: 1fr; } }
.form-row select {
  font: inherit;
  padding: 11px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--transition-base);
}
.form-row select:focus { outline: none; border-color: var(--color-accent); }

/* ============================================================= Modal dialog */
dialog.modal {
  width: min(92vw, 520px);
  max-height: min(90svh, 760px);
  padding: 0;
  border: none;
  background: transparent;
  overflow: visible;
  color: var(--color-text);
}
dialog.modal::backdrop {
  background: var(--color-overlay);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.modal-card {
  position: relative;
  background: var(--color-bg-elev);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -20px var(--color-shadow-strong);
  padding: 32px clamp(20px, 4vw, 36px) clamp(24px, 4vw, 32px);
  max-height: inherit;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: none;
  color: var(--color-text-light);
  cursor: pointer;
  transition: color var(--transition-base), background var(--transition-base), border-color var(--transition-base);
}
.modal-close:hover { color: var(--color-text); background: var(--color-bg-alt); border-color: var(--color-border); }
.modal-title { font-size: clamp(1.3rem, 5vw, 1.5rem); margin: 0 0 8px; padding-right: 38px; }
.modal-lead { color: var(--color-text-light); margin: 0 0 22px; font-size: 0.97rem; }
.modal-form .btn { width: 100%; margin-top: 4px; }
/* gentle entrance (skipped under reduced motion via the global rule) */
dialog.modal[open] { animation: modalIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* page list (section children) */
.page-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 12px; }
.page-list-item a {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}
.page-list-item a:hover { border-color: var(--color-accent); transform: translateY(-3px); box-shadow: 0 12px 26px var(--color-shadow); }
.page-list-title { display: block; font-weight: 600; font-size: 1.05rem; }
.page-list-desc { display: block; color: var(--color-text-light); font-size: 0.92rem; margin-top: 4px; }

/* ----------------------------------------------------- Legal document list */
.doc-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 12px; }
.doc-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}
.doc-list-item:hover { border-color: var(--color-accent); transform: translateY(-3px); box-shadow: 0 12px 26px var(--color-shadow); }
.doc-list-name { font-weight: 600; font-size: 1.05rem; }

/* =============================================================== Footer */
.site-footer { border-top: 1px solid var(--color-border); background: var(--color-bg-alt); margin-top: 40px; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 40px;
  padding: clamp(40px, 6vw, 64px) 24px clamp(28px, 4vw, 40px);
}
.footer-tagline { color: var(--color-text-light); margin: 14px 0 0; max-width: 32ch; font-size: 0.95rem; }
.footer-nav { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 28px; }
.footer-heading { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-light); margin: 0 0 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-col a { color: var(--color-text-light); font-size: 0.92rem; transition: color var(--transition-base); }
.footer-col a:hover { color: var(--color-text); }
.footer-form .form-row { margin-bottom: 12px; }
.footer-form .form-row label { font-size: 0.82rem; }
.footer-form .btn { width: 100%; margin-top: 2px; }
.footer-contact-alt { margin: 12px 0 0; font-size: 0.85rem; color: var(--color-text-light); }
.footer-contact-alt a { color: var(--color-text-light); border-bottom: 1px solid var(--color-border); }
.footer-contact-alt a:hover { color: var(--color-text); border-color: var(--color-accent); }
.footer-bottom { padding: 18px 24px 28px; border-top: 1px solid var(--color-border); }
.footer-bottom p { margin: 0; font-size: 0.85rem; color: var(--color-text-light); }

/* ======================================================= Cookie consent */
/* Non-blocking cookie banner: no full-screen backdrop and no scroll lock, so
   the page can never get trapped in a grayed-out state if the banner has a
   render quirk (iOS Safari, RIN-21). */
.cookie-backdrop { display: none; }
.cookie-consent {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 999;
  max-height: 85svh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--color-bg-elev);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -8px 30px var(--color-shadow-strong);
  transform: translateY(110%);
  transition: transform var(--transition-slow);
}
.cookie-consent.visible { transform: translateY(0); }
.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px calc(22px + env(safe-area-inset-bottom));
}
.cookie-title { font-size: 1.05rem; margin: 0 0 4px; }
.cookie-desc { margin: 0; color: var(--color-text-light); font-size: 0.92rem; max-width: 60ch; }
.cookie-desc a { text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { display: flex; gap: 12px; flex: none; }

/* ============================================ Reveal / fade-in animations */
.reveal {
  opacity: 0.5;
  transform: translateY(22px);
  transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.fade-in { opacity: 0; animation: fadeInUp 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.delay-1 { animation-delay: 0.12s; }
.delay-2 { animation-delay: 0.24s; }
.delay-3 { animation-delay: 0.36s; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================== Responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { order: -1; }
  .split { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* phones: the iso stack is now a 2D-only SVG animation that renders identically
   on every engine (including iOS Safari), so it ships everywhere — no flat
   fallback, no touch-hide. It just sits below the copy so the headline + CTA
   lead above the fold (RIN-21). */
@media (max-width: 720px) {
  .hero-visual { order: 2; margin-top: 6px; max-width: 320px; margin-left: auto; margin-right: auto; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 0;
    padding: 16px 24px 28px;
    background: var(--color-bg-elev);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 14px 30px var(--color-shadow-strong);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .primary-nav.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link { padding: 12px; font-size: 1rem; }
  .nav-actions { margin-top: 8px; }
  .header-cta { width: 100%; }
  /* dropdown becomes inline on mobile */
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    min-width: 0;
    margin-top: 4px;
    display: none;
  }
  .has-dropdown.open .dropdown-menu { display: block; }
  .has-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; } /* no hover-open on touch */
  .cookie-inner { flex-direction: column; align-items: stretch; text-align: left; }
  .cookie-actions { flex-direction: column; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
  .footer-col-contact { grid-column: 1 / -1; }
}

/* phones: the desktop logo (mark 50px + 2rem wordmark, RIN-20) is wide enough
   that the brand + theme toggle pushed the hamburger off-screen at <= ~456px,
   making the nav menu unopenable. Scale the brand down so both controls fit. */
@media (max-width: 480px) {
  .header-inner { gap: 12px; }
  .logo { gap: 7px; }
  .logo-mark { width: 31px; height: 31px; }
  .logo-wordmark { height: 21px; }
  .logo-badge { font-size: 0.55rem; padding: 2px 5px; }
}
@media (max-width: 380px) {
  .logo-badge { display: none; }
}

/* ============================================ Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .fade-in { opacity: 1; }
  .reveal { opacity: 1; transform: none; }
  .btn-feature::after { display: none; }
  /* Product decision: the hero stack animation plays for ALL visitors,
     including those with prefers-reduced-motion. Re-assert its animations
     with !important so the site-wide motion-reduction rule above doesn't
     freeze them (that rule would otherwise run them once at ~0ms and jump
     the stack to its flown-away end frame, leaving the panel empty). */
  .iso-c1 { animation: isoFly1 var(--iso-T) cubic-bezier(.22, 1, .36, 1) infinite !important; }
  .iso-c2 { animation: isoFly2 var(--iso-T) cubic-bezier(.22, 1, .36, 1) infinite !important; }
  .iso-c3 { animation: isoFly3 var(--iso-T) cubic-bezier(.22, 1, .36, 1) infinite !important; }
  .isf-shadow { animation: isoShadow var(--iso-T) ease-in-out infinite !important; }
  .iso-ok { animation: isoBeat var(--iso-T) ease-in-out infinite !important; }
  .iso-st.s0 { animation: isoStep0 var(--iso-T) linear infinite !important; }
  .iso-st.s1 { animation: isoStep1 var(--iso-T) linear infinite !important; }
  .iso-st.s2 { animation: isoStep2 var(--iso-T) linear infinite !important; }
  .iso-st.s3 { animation: isoStep3 var(--iso-T) linear infinite !important; }
  .iso-st.s4 { animation: isoStep4 var(--iso-T) linear infinite !important; }
}
