/* ============================================================================
   Fomomento — Marketing site styles (scoped under .mk)
   Authored with CANONICAL --fm-* tokens (see styles/tokens.css). Light/dark
   bands share one set of local vars (--ink/--paper/--dim/--line/--fill/--glow)
   so every component adapts by band, not by duplicated rules.
   ============================================================================ */

/* Marketing page only (this stylesheet is linked solely from index.astro).
   Guard against horizontal overflow on very small viewports. */
html { overflow-x: clip; }

.mk {
  --ink:   var(--fm-fg);
  --paper: var(--fm-bg);
  --dim:   var(--fm-neutral-500);   /* clears 4.5:1 on paper */
  --line:  var(--fm-border);
  --fill:  var(--fm-subtle);
  --glow:  rgba(212,178,106,0.14);   /* faint warm core */

  font-family: var(--fm-font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- Bands ---------------------------------------------------------------- */
.band { position: relative; background: var(--paper); color: var(--ink); }
.band-inner { padding-block: clamp(80px, 12vh, 160px); }

.band.dark {
  --ink:   var(--fm-bg);
  --paper: var(--fm-neutral-ink);
  --dim:   var(--fm-neutral-300);
  --line:  var(--fm-neutral-600);
  --fill:  var(--fm-neutral-800);
  background: linear-gradient(180deg, #0A0A0B 0%, #101013 55%, #17171A 100%);
  color: var(--fm-bg);
}
.band.tint { background: var(--fm-subtle); }

/* ---- Container ------------------------------------------------------------ */
.mk-container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

/* ---- Type ----------------------------------------------------------------- */
.mk-kicker {
  font-family: var(--fm-font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--dim);
  display: block;
}

.mk-h1 {
  font-family: var(--fm-font-display);
  font-weight: 600;
  font-size: clamp(40px, 7vw, 84px);
  letter-spacing: -0.02em;
  line-height: 1.03;
  margin: 0;
  text-wrap: balance;
}
.mk-h2 {
  font-family: var(--fm-font-display);
  font-weight: 600;
  font-size: clamp(30px, 4.2vw, 52px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}
.mk-lead {
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.45;
  color: var(--dim);
  margin: 0;
  max-width: 34ch;
}
.mk-body {
  font-size: 17px;
  line-height: 1.6;
  color: var(--dim);
  max-width: 62ch;
  margin: 0;
  text-wrap: pretty;
}
.mk-body strong, .mk-body b { color: var(--ink); font-weight: 600; }
.mk-small { font-size: 13.5px; line-height: 1.5; color: var(--dim); }

/* ---- Buttons -------------------------------------------------------------- */
.mk-btn {
  font-family: var(--fm-font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--fm-radius-md);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 160ms var(--fm-ease), border-color 160ms var(--fm-ease),
              background 160ms var(--fm-ease), color 160ms var(--fm-ease);
}
.mk-btn-xl { height: 52px; padding: 0 26px; font-size: 16px; }
.mk-btn-primary { background: var(--ink); color: var(--paper); }
.mk-btn-primary:hover { opacity: 0.82; }
.mk-btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.mk-btn-ghost:hover { border-color: var(--ink); }
.mk-btn-link {
  background: none; border: 0; padding: 0; height: auto;
  color: var(--ink); font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.mk-btn-link:hover { border-bottom-color: var(--ink); }
.mk-btn-link svg { transition: transform 200ms var(--fm-ease); }
.mk-btn-link:hover svg { transform: translateY(2px); }

/* ---- Nav ------------------------------------------------------------------ */
.mk-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: 68px;
  display: flex; align-items: center;
  transition: background 260ms var(--fm-ease), box-shadow 260ms var(--fm-ease),
              border-color 260ms var(--fm-ease);
  border-bottom: 1px solid transparent;
}
.mk-nav-inner {
  width: 100%; max-width: 1200px; margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.mk-nav-links { display: flex; align-items: center; gap: 28px; }
.mk-nav-links a {
  font-size: 14px; font-weight: 500; text-decoration: none;
  color: rgba(250,250,248,0.72);
  transition: color 160ms var(--fm-ease);
}
.mk-nav-links a:hover { color: #FAFAF8; }
.mk-nav .wordmark-dark { display: block; }
.mk-nav .wordmark-light { display: none; }
.mk-nav .mk-btn-primary { height: 40px; padding: 0 16px; font-size: 14px; background: #FAFAF8; color: #0A0A0B; }
.mk-nav .mk-btn-primary:hover { opacity: 0.85; }

/* Solid state (after scroll) */
.mk-nav.solid {
  background: rgba(250,250,248,0.86);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom-color: var(--fm-border);
  box-shadow: var(--fm-shadow-sm);
}
.mk-nav.solid .wordmark-dark { display: none; }
.mk-nav.solid .wordmark-light { display: block; }
.mk-nav.solid .mk-nav-links a { color: var(--fm-neutral-500); }
.mk-nav.solid .mk-nav-links a:hover { color: var(--fm-fg); }
.mk-nav.solid .mk-btn-primary { background: var(--fm-fg); color: var(--fm-bg); }

.mk-nav-menu-btn { display: none; color: #FAFAF8; border-color: rgba(250,250,248,0.30); }
.mk-nav.solid .mk-nav-menu-btn { color: var(--fm-fg); border-color: var(--fm-border); }
html[data-theme="dark"] .mk-nav.solid .mk-nav-menu-btn { color: #FAFAF8; border-color: var(--fm-neutral-600); }

/* In-menu CTA lives inside .mk-nav-links; hidden on desktop, shown in the mobile panel. */
.mk-menu-cta { display: none; }

/* ---- Hero ----------------------------------------------------------------- */
#hero .band-inner { min-height: 88vh; display: flex; align-items: center; padding-top: 96px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  width: 100%;
}
.hero-copy { display: flex; flex-direction: column; gap: 28px; position: relative; z-index: 2; }
.hero-copy .mk-h1 { max-width: 14ch; }
.hero-copy .mk-lead { max-width: 46ch; }
.hero-cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hero-note { color: var(--dim); font-style: italic; }
.hero-stage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 520px;
}

/* ============================================================================
   EVENT HORIZON — signature centerpiece (CSS + SVG, transform/opacity only)
   ============================================================================ */
.horizon {
  --size: clamp(320px, 40vw, 560px);
  position: relative;
  width: var(--size);
  height: var(--size);
  flex: 0 0 auto;
}
/* Outer soft glow */
.horizon-glow {
  position: absolute; inset: -30%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--glow) 0%, rgba(0,0,0,0) 46%),
    radial-gradient(circle at 50% 50%, rgba(160,160,166,0.16) 0%, rgba(0,0,0,0) 40%);
  filter: blur(6px);
}

/* Rotating layers (whole-SVG rotation is the reliable path) */
.horizon-arcs, .horizon-ring {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transform-origin: 50% 50%;
  will-change: transform;
}
.horizon-arcs { animation: horizon-spin 120s linear infinite; }
.horizon-ring { animation: horizon-spin 84s linear infinite reverse; }

/* Event horizon disc */
.horizon-disc {
  position: absolute; left: 50%; top: 50%;
  width: 58%; height: 58%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 46%, #050506 0%, #000 62%, #000 100%);
  box-shadow:
    inset 0 0 40px 6px rgba(0,0,0,0.9),
    inset 0 6px 22px rgba(90,90,96,0.16),
    0 0 40px 6px rgba(0,0,0,0.5);
}
.horizon-disc::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%;
  box-shadow: 0 0 1px 1px rgba(230,230,226,0.35);
}

/* Infalling particles */
.horizon-particles { position: absolute; inset: 0; }
.horizon-particles .p {
  position: absolute; left: 50%; top: 50%;
  width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px;
  border-radius: 50%;
  background: rgba(250,250,248,0.95);
  opacity: 0;
  animation: infall var(--dur, 15s) var(--fm-ease-grav) infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes horizon-spin { to { transform: rotate(360deg); } }
@keyframes infall {
  0%   { opacity: 0; transform: rotate(var(--a)) translateX(var(--r0)) scale(1); }
  12%  { opacity: 0.9; }
  86%  { opacity: 0.55; }
  100% { opacity: 0; transform: rotate(calc(var(--a) + 34deg)) translateX(var(--r1)) scale(0.4); }
}

/* ---- Section header block ------------------------------------------------- */
.mk-head { display: flex; flex-direction: column; gap: 18px; max-width: 40ch; }
.mk-head.center { max-width: min(92vw, 760px); margin-inline: auto; text-align: center; align-items: center; }
.mk-head.center .mk-body { max-width: min(92vw, 640px); margin-inline: auto; }

/* ---- §2 Problem: patchwork motif ----------------------------------------- */
.problem-grid {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,0.9fr);
  gap: clamp(32px, 6vw, 80px); align-items: center;
}
.patchwork { position: relative; min-height: 300px; }
.patch {
  position: absolute;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--fm-radius-md);
  font-size: 14px; font-weight: 500; color: var(--dim);
  box-shadow: var(--fm-shadow-sm);
}
.patch svg { color: var(--fm-neutral-400); }
.patch.p1 { top: 4%;  left: 2%;  transform: rotate(-4deg); }
.patch.p2 { top: 0%;  right: 6%; transform: rotate(3deg); }
.patch.p3 { top: 34%; left: 22%; transform: rotate(2deg); }
.patch.p4 { top: 40%; right: 2%; transform: rotate(-3deg); }
.patch.p5 { top: 70%; left: 6%;  transform: rotate(3deg); }
.patch.p6 { top: 74%; right: 16%; transform: rotate(-2deg); }

/* ---- §3 Power / cascade --------------------------------------------------- */
.power-grid {
  display: grid; grid-template-columns: minmax(0,0.9fr) minmax(0,1.1fr);
  gap: clamp(32px, 6vw, 80px); align-items: center;
}
.power-copy { display: flex; flex-direction: column; gap: 22px; }
.power-copy .mk-body + .mk-body { margin-top: 2px; }
.cascade-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--fm-radius-lg);
  background: rgba(255,255,255,0.02);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.cascade-caption {
  position: absolute; left: 16px; bottom: 14px;
  font-family: var(--fm-font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--dim);
}
/* cascade fills its frame */
.cascade-a { position: absolute; inset: 0; }

/* Node-graph */
.cg-node {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center;
}
.cg-dot {
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  transition: box-shadow 300ms var(--fm-ease), border-color 300ms var(--fm-ease);
}
.cg-node.center .cg-dot { width: 66px; height: 66px; background: var(--fm-neutral-800); border-color: var(--fm-neutral-600); color: #FAFAF8; }
.cg-label { font-family: var(--fm-font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.cg-node.lit .cg-dot { border-color: #FAFAF8; box-shadow: 0 0 0 1px #FAFAF8, 0 0 22px 2px rgba(250,250,248,0.5); }
.cg-node.lit .cg-label { color: var(--ink); }

/* traveling pulse along each edge */
.cascade-a .edge { opacity: 0; animation: edge-pulse 6s linear infinite; animation-delay: var(--ed, 0s); }
@keyframes edge-pulse {
  0%   { stroke-dashoffset: 100; opacity: 0; }
  3%   { opacity: 1; }
  14%  { stroke-dashoffset: 0; opacity: 1; }
  19%  { opacity: 0; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

/* ---- §4 Capabilities ------------------------------------------------------ */
.cap-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 20px; margin-top: 56px;
}
.cap-card {
  border: 1px solid var(--line);
  border-radius: var(--fm-radius-lg);
  padding: var(--fm-space-6);
  display: flex; flex-direction: column; gap: 12px;
  background: var(--paper);
  transition: border-color 200ms var(--fm-ease);
}
.cap-card:hover { border-color: var(--ink); }
.cap-ico { color: var(--ink); }
.cap-title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; margin: 0; color: var(--ink); }
.cap-body { font-size: 14.5px; line-height: 1.55; color: var(--dim); margin: 0; }

/* ---- §5 Flows ------------------------------------------------------------- */
.flows-grid {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,0.8fr);
  gap: clamp(32px, 6vw, 80px); align-items: center;
}
.flows-copy { display: flex; flex-direction: column; gap: 22px; }
.switch-card {
  border: 1px solid var(--line); border-radius: var(--fm-radius-lg);
  padding: var(--fm-space-6); background: var(--paper);
  display: flex; flex-direction: column;
}
.switch-core {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 4px;
}
.switch-core .lead { display: flex; align-items: center; gap: 10px; }
.switch-core .name { font-size: 15px; font-weight: 500; color: var(--ink); }
.switch-always { font-family: var(--fm-font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.switch-div { height: 1px; background: var(--line); margin: 6px 0; }
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 4px;
}
.switch-row .name { font-size: 15px; font-weight: 500; color: var(--ink); }
.sw {
  width: 40px; height: 24px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--fm-border); position: relative; flex: 0 0 auto;
  transition: background 200ms var(--fm-ease);
}
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--fm-shadow-sm); transition: transform 200ms var(--fm-ease); }
.sw.on { background: var(--fm-fg); }
.sw.on::after { transform: translateX(16px); }
.sw.locked { background: var(--fm-fg); cursor: default; opacity: 0.5; }
.sw.locked::after { transform: translateX(16px); }

/* ---- §6 Who / chips ------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; }
.chip {
  padding: 10px 18px; border-radius: var(--fm-radius-full);
  border: 1px solid var(--line); background: var(--paper);
  font-size: 14px; font-weight: 500; color: var(--ink);
}

/* ---- §7 Positioning ------------------------------------------------------- */
.positioning { max-width: min(92vw, 740px); margin-inline: auto; text-align: center; }
.positioning .mk-body { max-width: none; font-size: clamp(19px, 2.4vw, 26px); line-height: 1.5; color: var(--ink); }

/* ---- §8 Trust ------------------------------------------------------------- */
.trust-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 28px 48px; margin-top: 56px; }
.trust-item { display: flex; gap: 16px; }
.trust-ico { flex: 0 0 auto; color: var(--ink); margin-top: 2px; }
.trust-item h3 { font-size: 17px; font-weight: 600; margin: 0 0 6px; color: var(--ink); letter-spacing: -0.01em; }
.trust-item p { font-size: 14.5px; line-height: 1.55; color: var(--dim); margin: 0; max-width: 42ch; }

/* ---- §9 Pricing ----------------------------------------------------------- */
.pricing { text-align: center; max-width: min(92vw, 660px); margin-inline: auto; display: flex; flex-direction: column; gap: 22px; align-items: center; }
.pricing-line {
  font-family: var(--fm-font-display); font-weight: 600;
  font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.02em; color: var(--ink);
  margin-top: 8px;
}

/* ---- §10 Request access form --------------------------------------------- */
.req-grid { display: grid; grid-template-columns: minmax(0,0.85fr) minmax(0,1fr); gap: clamp(36px, 6vw, 88px); align-items: start; position: relative; z-index: 2; }
.req-copy { display: flex; flex-direction: column; gap: 20px; position: relative; z-index: 2; }
/* horizon sits behind the whole band (like the centered hero) with a vignette so copy + form stay legible */
#request .band-inner { position: relative; overflow: hidden; }
.req-stage { position: absolute; inset: 0; z-index: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; pointer-events: none; }
.req-stage .horizon { --size: clamp(380px, 52vw, 680px); opacity: 0.5; }
.req-vignette { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 74% 64% at 50% 50%, rgba(10,10,11,0.74) 0%, rgba(10,10,11,0.44) 48%, rgba(10,10,11,0) 80%); }
.req-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; position: relative; z-index: 2; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.field input, .field select {
  height: 46px; padding: 0 14px; width: 100%;
  border-radius: var(--fm-radius-md);
  border: 1px solid var(--fm-neutral-600);
  background: var(--fm-neutral-800);
  color: #FAFAF8;
  font-family: var(--fm-font-body); font-size: 15px;
  transition: border-color 150ms var(--fm-ease), box-shadow 150ms var(--fm-ease);
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23A0A0A6' d='M0 0h12L6 8z'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.field input::placeholder { color: var(--fm-neutral-400); }
.field input:focus, .field select:focus { outline: none; border-color: #FAFAF8; box-shadow: 0 0 0 3px rgba(250,250,248,0.12); }
.field.invalid input, .field.invalid select { border-color: var(--fm-error-dark); }
.field-err { font-size: 12.5px; color: var(--fm-error-dark); min-height: 0; display: none; }
.field.invalid .field-err { display: block; }
.req-actions { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 16px; margin-top: 4px; }
.req-micro { font-size: 13px; line-height: 1.5; color: var(--dim); max-width: 60ch; }

.req-success { display: none; flex-direction: column; gap: 16px; align-items: flex-start; padding: 8px 0; }
.req-success.show { display: flex; }
.req-form.hide { display: none; }
.req-check {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--fm-success-dark); border: 1px solid var(--fm-success-dark);
}
.req-success p { font-size: 16px; line-height: 1.55; color: var(--ink); max-width: 52ch; margin: 0; }

/* ---- §11 FAQ -------------------------------------------------------------- */
.faq { max-width: 720px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 4px;
  font-size: 17px; font-weight: 500; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { flex: 0 0 auto; color: var(--dim); transition: transform 220ms var(--fm-ease); }
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq .faq-a { padding: 0 4px 24px; }
.faq .faq-a p { font-size: 15.5px; line-height: 1.6; color: var(--dim); margin: 0; max-width: 64ch; }

/* ---- Footer --------------------------------------------------------------- */
#footer { border-top: 1px solid var(--line); }
#footer .band-inner { padding-block: clamp(56px, 8vh, 88px); }
/* DEV-531: 4 link-columns (was 3) — added "Compare & guides" for the new
   standalone SEO pages. */
.footer-top { display: grid; grid-template-columns: minmax(0,1.4fr) repeat(4, minmax(0,1fr)); gap: 40px; }
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; max-width: 30ch; }
.footer-brand .wm-light { display: block; }
.footer-brand .wm-dark { display: none; }
.footer-tag { font-size: 14px; line-height: 1.55; color: var(--dim); }
.footer-col h4 { font-family: var(--fm-font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin: 0 0 16px; font-weight: 500; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-col a, .footer-col li { font-size: 14px; color: var(--ink); text-decoration: none; }
.footer-col a:hover { color: var(--dim); }
.footer-legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--dim); }

/* ---- Scroll reveal --------------------------------------------------------
   Only elements JS explicitly ARMS (below the fold at load) start hidden, so
   above-the-fold content is never dependent on a transition completing (a
   backgrounded iframe pauses transitions at their from-state). */
.reveal.armed { opacity: 0; transform: translateY(12px); transition: opacity 500ms var(--fm-ease), transform 500ms var(--fm-ease); }
.reveal.armed.in { opacity: 1; transform: none; }
.reveal-stagger.armed > * { opacity: 0; transform: translateY(12px); transition: opacity 480ms var(--fm-ease), transform 480ms var(--fm-ease); }
.reveal-stagger.armed.in > * { opacity: 1; transform: none; }
.reveal-stagger.armed.in > *:nth-child(2) { transition-delay: 60ms; }
.reveal-stagger.armed.in > *:nth-child(3) { transition-delay: 120ms; }
.reveal-stagger.armed.in > *:nth-child(4) { transition-delay: 180ms; }
.reveal-stagger.armed.in > *:nth-child(5) { transition-delay: 120ms; }
.reveal-stagger.armed.in > *:nth-child(6) { transition-delay: 180ms; }
.reveal-stagger.armed.in > *:nth-child(7) { transition-delay: 240ms; }
.reveal-stagger.armed.in > *:nth-child(8) { transition-delay: 300ms; }

/* ---- Motion off (tweak) + reduced-motion --------------------------------- */
html[data-motion="off"] .horizon-arcs,
html[data-motion="off"] .horizon-ring,
html[data-motion="off"] .horizon-particles .p,
html[data-motion="off"] .cg-node,
html[data-motion="off"] .cascade-a .edge { animation: none !important; }
html[data-motion="off"] .cascade-a .edge { opacity: 0; }
html[data-motion="off"] .horizon-particles { display: none; }
html[data-motion="off"] .reveal.armed,
html[data-motion="off"] .reveal-stagger.armed > * { opacity: 1; transform: none; transition: none; }

@media (prefers-reduced-motion: reduce) {
  .horizon-arcs, .horizon-ring { animation: none !important; }
  .horizon-particles { display: none; }
  .reveal.armed, .reveal-stagger.armed > * { opacity: 1 !important; transform: none !important; transition: none; }
  .cg-node, .cascade-a .edge { animation: none !important; }
  .cascade-a .edge { opacity: 0; }
}

/* ---- Responsive ----------------------------------------------------------- */
@media (max-width: 1024px) {
  .cap-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .power-grid, .problem-grid, .flows-grid, .req-grid { grid-template-columns: 1fr; }
  .req-stage .horizon { --size: clamp(320px, 82vw, 520px); opacity: 0.4; }
  .footer-top { grid-template-columns: 1fr 1fr; }

  /* Hero: overlap (horizon behind the headline) rather than stack tall */
  #hero .band-inner { position: relative; }
  #hero .hero-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  #hero .hero-copy { align-items: center; z-index: 2; }
  #hero .hero-copy .mk-h1 { max-width: 16ch; }
  #hero .hero-copy .mk-lead { max-width: 48ch; }
  #hero .hero-cta { justify-content: center; }
  #hero .hero-stage { position: absolute; inset: 0; z-index: 0; align-items: center; min-height: 0; pointer-events: none; }
  #hero .horizon { --size: clamp(300px, 78vw, 480px); opacity: 0.5; }
  #hero .hero-stage::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse 72% 60% at 50% 46%, rgba(10,10,11,0.82) 0%, rgba(10,10,11,0.5) 46%, rgba(10,10,11,0) 78%);
  }
}
@media (max-width: 640px) {
  /* Nav collapses to wordmark + hamburger; links + CTA drop into a full-width panel. */
  .mk-nav-inner { gap: 12px; }
  .mk-nav-cta, .lang-toggle { display: none; }
  .mk-nav-menu-btn { display: inline-flex; }

  .mk-nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 0 16px;
    background: rgba(250,250,248,0.98);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--fm-border);
    box-shadow: var(--fm-shadow-lg);
  }
  .mk-nav-links.open { display: flex; }
  .mk-nav-links a { color: var(--fm-fg); padding: 14px clamp(20px, 6vw, 28px); font-size: 16px; }
  .mk-nav-links a.mk-menu-cta {
    display: inline-flex; justify-content: center;
    background: var(--fm-fg); color: var(--fm-bg);
    height: 48px; margin: 10px clamp(20px, 6vw, 28px) 0;
    padding: 0 20px; border-radius: var(--fm-radius-md); font-size: 15px;
  }
  .mk-nav-links a.mk-menu-cta:hover { opacity: 0.85; }

  html[data-theme="dark"] .mk-nav-links { background: rgba(20,20,23,0.98); border-bottom-color: var(--fm-neutral-600); }
  html[data-theme="dark"] .mk-nav-links a { color: #FAFAF8; }
  html[data-theme="dark"] .mk-nav-links a.mk-menu-cta { background: #FAFAF8; color: #0A0A0B; }

  /* Keep menu colors correct once the nav has solidified — the desktop
     `.mk-nav.solid .mk-nav-links a` rules would otherwise grey these out. */
  .mk-nav.solid .mk-nav-links a { color: var(--fm-fg); }
  .mk-nav.solid .mk-nav-links a.mk-menu-cta { background: var(--fm-fg); color: var(--fm-bg); }
  html[data-theme="dark"] .mk-nav.solid .mk-nav-links a { color: #FAFAF8; }
  html[data-theme="dark"] .mk-nav.solid .mk-nav-links a.mk-menu-cta { background: #FAFAF8; color: #0A0A0B; }

  .cap-grid, .trust-grid { grid-template-columns: 1fr; }
  .req-form { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .patchwork { min-height: 360px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .mk-btn { width: 100%; }

  /* Cascade: give the node-graph vertical room so it doesn't squish. */
  .cascade-frame { aspect-ratio: 1 / 1; }
  .cg-dot { width: 46px; height: 46px; }
  .cg-node.center .cg-dot { width: 56px; height: 56px; }
  .cg-label { font-size: 9px; }
}

/* Reduce clutter of nav links on tablet where they still show */
@media (max-width: 860px) and (min-width: 641px) {
  .mk-nav-links { gap: 18px; }
}

/* ============================================================================
   LANGUAGE TOGGLE (nav)
   ============================================================================ */
.lang-toggle {
  display: inline-flex; align-items: center;
  border: 1px solid rgba(250,250,248,0.28);
  border-radius: var(--fm-radius-full);
  padding: 2px; height: 32px;
  font-family: var(--fm-font-mono);
}
.lang-toggle button, .lang-toggle a {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 11px; letter-spacing: 0.08em; font-weight: 500;
  color: rgba(250,250,248,0.68); text-decoration: none;
  display: inline-flex; align-items: center;
  height: 26px; padding: 0 10px; border-radius: var(--fm-radius-full);
  transition: color 160ms var(--fm-ease), background 160ms var(--fm-ease);
}
.lang-toggle button[aria-pressed="true"], .lang-toggle a[aria-current="page"] { background: #FAFAF8; color: #0A0A0B; }
/* Solid nav: dark-on-light */
.mk-nav.solid .lang-toggle { border-color: var(--fm-border); }
.mk-nav.solid .lang-toggle button, .mk-nav.solid .lang-toggle a { color: var(--fm-neutral-500); }
.mk-nav.solid .lang-toggle button[aria-pressed="true"], .mk-nav.solid .lang-toggle a[aria-current="page"] { background: var(--fm-fg); color: var(--fm-bg); }

/* ============================================================================
   MEDIA SLOTS — clean placeholders documenting where real assets drop in
   ============================================================================ */
#product { background: none; }
#product .band-inner { padding-top: clamp(40px, 6vh, 88px); padding-bottom: clamp(64px, 9vh, 128px); }
/* Product shot breaks out wider than the 1200px reading column so the app
   frame reads big. Deliberate: this section is the visual centerpiece. */
#product .mk-container { max-width: 1520px; }
.product-shot {
  /* Sits BELOW the hero — no negative pull-up. A full-width opaque frame
     overlapping the vertically-centered hero used to cover the left CTA on
     shorter/large desktop viewports (CTA rendered invisible). */
  position: relative; z-index: 5;
  /* Staged, not slapped on: the devices rest on a soft gradient panel with a
     top sheen, a hairline edge, and a deep ambient shadow so the pair floats. */
  padding: clamp(28px, 5vw, 72px);
  border-radius: 28px;
  background:
    radial-gradient(120% 90% at 50% 6%, rgba(255,255,255,0.75) 0%, rgba(255,255,255,0) 56%),
    linear-gradient(180deg, var(--fm-subtle) 0%, var(--fm-bg) 100%);
  border: 1px solid var(--fm-border);
  box-shadow: 0 40px 80px -44px rgba(20,20,23,0.28);
}
.product-cap {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-top: 16px; flex-wrap: wrap;
}
.product-cap .lead { font-family: var(--fm-font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fm-neutral-500); }
.product-cap .dim  { font-family: var(--fm-font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--fm-neutral-400); }

/* Desktop app + phone shown together; the phone sits beside the Mac and
   bottom-aligns, then stacks with a slight overlap on narrow screens. */
.device-cluster {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 28px;
}

/* Light/dark image swap, shared by both frames (mirrors the nav wordmark). */
.frame-shot { line-height: 0; }
.frame-shot img { display: block; width: 100%; height: auto; }
.frame-shot .shot-dark { display: none; }
html[data-theme="dark"] .frame-shot .shot-light { display: none; }
html[data-theme="dark"] .frame-shot .shot-dark  { display: block; }

.browser-frame {
  flex: 1; min-width: 0;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-lg);
  overflow: hidden;
  background: var(--fm-bg);
  box-shadow: var(--fm-shadow-lg);
}
.browser-bar {
  height: 40px; display: flex; align-items: center; gap: 14px;
  padding: 0 16px; border-bottom: 1px solid var(--fm-border);
  background: var(--fm-subtle);
}
.browser-dots { display: flex; gap: 7px; }
.browser-dots span { width: 11px; height: 11px; border-radius: 50%; background: var(--fm-border); }
.browser-url {
  flex: 1; max-width: 320px; height: 24px; display: inline-flex; align-items: center;
  padding: 0 12px; border-radius: var(--fm-radius-full);
  background: var(--fm-bg); border: 1px solid var(--fm-border);
  font-family: var(--fm-font-mono); font-size: 11px; color: var(--fm-neutral-500);
}

/* Phone frame — black bezel in both themes (phones are black). */
.phone-frame {
  position: relative;
  width: 200px; flex: none;
  padding: 9px;
  background: #0a0a0b;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 40px;
  box-shadow: var(--fm-shadow-lg);
}
.phone-frame .frame-shot { border-radius: 32px; overflow: hidden; }

/* Stack early: below this the flex:1 app frame gets squeezed narrower than the
   fixed-width phone, so the tall phone starts to dominate. Go vertical while
   the app is still comfortably wide. */
@media (max-width: 900px) {
  .device-cluster { flex-direction: column; align-items: center; gap: 20px; }
  .phone-frame { width: 200px; }
}

/* ============================================================================
   DARK THEME (Tweaks → Appearance). Monochrome inverts: light bands become
   charcoal, the gravity wells drop to pure black so the rhythm survives.
   ============================================================================ */
html[data-theme="dark"] .mk { background: #0d0d0f; }
html[data-theme="dark"] .band {
  --ink: #FAFAF8; --paper: #141417; --dim: var(--fm-neutral-300);
  --line: var(--fm-neutral-600); --fill: var(--fm-neutral-800);
  background: #141417; color: #FAFAF8;
}
html[data-theme="dark"] .band.tint { background: #1b1b1f; }
html[data-theme="dark"] .band.dark { background: linear-gradient(180deg, #000 0%, #08080a 55%, #0d0d10 100%); }
html[data-theme="dark"] .browser-frame { background: #141417; }
html[data-theme="dark"] .browser-bar { background: #1b1b1f; border-bottom-color: var(--fm-neutral-600); }
html[data-theme="dark"] .browser-url { background: #141417; border-color: var(--fm-neutral-600); color: var(--fm-neutral-300); }
html[data-theme="dark"] .browser-dots span { background: var(--fm-neutral-600); }
html[data-theme="dark"] .product-cap .lead { color: var(--fm-neutral-300); }
html[data-theme="dark"] .product-shot {
  background:
    radial-gradient(120% 90% at 50% 6%, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 56%),
    linear-gradient(180deg, #1b1b1f 0%, #141417 100%);
  border-color: var(--fm-neutral-800);
  box-shadow: 0 44px 90px -44px rgba(0,0,0,0.65);
}

/* Solidified nav in dark theme */
html[data-theme="dark"] .mk-nav.solid {
  background: rgba(20,20,23,0.82);
  border-bottom-color: var(--fm-neutral-600);
}
html[data-theme="dark"] .mk-nav.solid .wordmark-dark { display: block; }
html[data-theme="dark"] .mk-nav.solid .wordmark-light { display: none; }
html[data-theme="dark"] .mk-nav.solid .mk-nav-links a { color: var(--fm-neutral-300); }
html[data-theme="dark"] .mk-nav.solid .mk-nav-links a:hover { color: #FAFAF8; }
html[data-theme="dark"] .mk-nav.solid .mk-btn-primary { background: #FAFAF8; color: #0A0A0B; }
html[data-theme="dark"] .mk-nav.solid .lang-toggle { border-color: var(--fm-neutral-600); }
html[data-theme="dark"] .mk-nav.solid .lang-toggle button, html[data-theme="dark"] .mk-nav.solid .lang-toggle a { color: var(--fm-neutral-300); }
html[data-theme="dark"] .mk-nav.solid .lang-toggle button[aria-pressed="true"], html[data-theme="dark"] .mk-nav.solid .lang-toggle a[aria-current="page"] { background: #FAFAF8; color: #0A0A0B; }

/* Footer follows the theme regardless of the light/ink footer tweak */
html[data-theme="dark"] .footer-brand .wm-light { display: none; }
html[data-theme="dark"] .footer-brand .wm-dark { display: block; }

/* ============================================================================
   DEV-531: standalone SEO pages (/compare/*, /guides/*) — long-form prose +
   a plain internal-link callout. Shares every token/component above (band,
   mk-container, mk-h1/h2, mk-body, cap-card, trust-item, chips, faq); this is
   only what those pages need on top: article headings/lists and one callout.
   ============================================================================ */
.mk-article { max-width: 720px; margin-inline: auto; display: flex; flex-direction: column; gap: 18px; }
.mk-article h2 {
  font-family: var(--fm-font-display);
  font-weight: 600;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--ink);
  margin: 12px 0 0;
}
.mk-article h3 {
  font-size: 17px; font-weight: 600; color: var(--ink);
  letter-spacing: -0.01em; margin: 4px 0 0;
}
.mk-article p { font-size: 15.5px; line-height: 1.65; color: var(--dim); margin: 0; }
.mk-article strong { color: var(--ink); font-weight: 600; }
.mk-article ul, .mk-article ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.mk-article li { font-size: 15.5px; line-height: 1.6; color: var(--dim); }
.mk-article li::marker { color: var(--dim); }
.mk-article a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

/* Inline "back to product" callout — a lighter-weight CTA than the full
   request-access band, used mid-article on compare/guide pages. */
.mk-callout {
  border: 1px solid var(--line);
  border-radius: var(--fm-radius-lg);
  padding: var(--fm-space-6);
  background: var(--paper);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.mk-callout p { margin: 0; font-size: 15px; color: var(--ink); max-width: 46ch; }
.mk-callout p .dim { color: var(--dim); }
