/* Nexus Editions cinematic shell
 * References: Shopify Editions (cinematic chapters) + floga.io (~30% bar:
 * frosted nav, saturated fields, gradient type, product glow, color tiles)
 * Contrast rule: never put light type on light product art without a solid scrim.
 */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts-20260804/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --bg: #050507;
  --bg-2: #0b0b0f;
  --elev: #121218;
  --ink: #f7f7f8;
  --muted: #a8a8b3;
  --faint: #6d6d78;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --orange: #ff8a3d;
  --orange-2: #ffb37a;
  --coral: #ff8f6b;
  --blue: #6aa8ff;
  --violet: #b48cff;
  --pink: #ff8ec8;
  --glass: rgba(18, 18, 24, 0.55);
  --glass-border: rgba(255, 255, 255, 0.12);
  --max: 1200px;
  --nav-h: 72px;
  --r: 22px;
  --r-lg: 32px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .ed-float, .ed-orb, .ed-hero-canvas { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: 100px;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: #fff; color: #000; padding: 8px 12px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ── draft banner ───────────────────────────────────── */
.ed-draft-banner { /* staging only; not used in production pages */
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  background: #2a1408;
  color: #ffd4b0;
  border-bottom: 1px solid rgba(255, 138, 61, 0.35);
}
.ed-draft-banner strong { color: #fff; }
.ed-draft-banner a { color: #ffb37a; text-decoration: underline; text-underline-offset: 2px; }

/* ── floating glass nav (Floga) ─────────────────────── */
.ed-top {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  width: min(calc(100% - 28px), 1080px);
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.08);
}
.ed-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.01em;
}
.ed-brand .brand-mark,
.ed-brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  display: block; object-fit: contain;
  background: transparent; box-shadow: none;
}
.ed-top-actions { display: flex; align-items: center; gap: 6px; }
.ed-top-link {
  font-size: 13.5px;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  transition: color .15s, background .15s;
}
.ed-top-link:hover { color: var(--ink); background: rgba(255,255,255,0.06); }

/* hamburger — desktop hidden; JS injects the button */
.ed-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ed-nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  border-radius: 1px;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
  transform-origin: center;
}
.ed-top.is-open .ed-nav-toggle span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.ed-top.is-open .ed-nav-toggle span:nth-child(2) {
  opacity: 0;
}
.ed-top.is-open .ed-nav-toggle span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* link panel: desktop = inline row inside the frosted nav; mobile overrides below */
.ed-mobile-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  min-width: 0;
  margin: 0 6px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  position: static;
}
.ed-mobile-panel a,
.ed-mobile-panel .ed-top-link {
  display: inline-flex;
  align-items: center;
  font-size: 13.5px;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color .15s, background .15s;
  width: auto;
}
.ed-mobile-panel a:hover,
.ed-mobile-panel .ed-top-link:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}
.ed-top-actions {
  flex: 0 0 auto;
}

.ed-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.ed-pill:hover { transform: translateY(-1px); }
.ed-pill.primary {
  background: linear-gradient(180deg, #ffb07a, #ff8a3d);
  color: #1a0a00;
  box-shadow: 0 10px 28px rgba(255, 138, 61, 0.35);
}
.ed-pill.primary:hover { box-shadow: 0 14px 36px rgba(255, 138, 61, 0.45); }
.ed-pill.ghost {
  background: rgba(255,255,255,0.06);
  color: var(--ink);
  border-color: var(--line-2);
}
.ed-pill.ghost:hover { background: rgba(255,255,255,0.1); }
.ed-pill.light {
  background: #fff;
  color: #0a0a0a;
}
.ed-pill.soft {
  background: rgba(255, 138, 61, 0.14);
  color: var(--orange-2);
  border-color: rgba(255, 138, 61, 0.28);
}

/* ── HERO: cinematic full-bleed (Shopify + Floga color) ─ */
.ed-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: calc(28px + 90px) 24px 120px;
  overflow: hidden;
}
.ed-hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.ed-hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 75% 40%, rgba(255, 138, 61, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 45% at 15% 70%, rgba(106, 168, 255, 0.12), transparent 50%),
    radial-gradient(ellipse 40% 35% at 50% 0%, rgba(180, 140, 255, 0.14), transparent 55%),
    linear-gradient(180deg, rgba(5,5,7,0.15) 0%, rgba(5,5,7,0.55) 70%, #050507 100%);
}
.ed-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  z-index: 1;
  pointer-events: none;
  animation: orb-drift 14s ease-in-out infinite alternate;
}
.ed-orb.a {
  width: 420px; height: 420px;
  background: #ff6b2c;
  top: 12%; right: 8%;
  animation-delay: 0s;
}
.ed-orb.b {
  width: 360px; height: 360px;
  background: #5b7cff;
  bottom: 10%; left: 5%;
  animation-delay: -4s;
  opacity: 0.35;
}
.ed-orb.c {
  width: 280px; height: 280px;
  background: #c56bff;
  top: 40%; left: 40%;
  animation-delay: -7s;
  opacity: 0.25;
}
@keyframes orb-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(30px, -24px) scale(1.08); }
}

.ed-hero-inner {
  position: relative;
  z-index: 2;
  width: min(100%, var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px 56px;
  align-items: center;
}

.ed-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-2);
}
.ed-kicker::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 5px rgba(255, 138, 61, 0.18);
}

.ed-hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.8rem, 6.5vw, 5.1rem);
  line-height: 0.98;
  letter-spacing: -0.048em;
  font-weight: 650;
  max-width: 11ch;
}
.grad {
  background: linear-gradient(105deg, #fff 0%, #ffd0a8 35%, #ff8a3d 55%, #ff8ec8 85%, #b48cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.grad-soft {
  /* Single warm accent at reduced chroma — not a rainbow */
  background: linear-gradient(100deg, #f0c9a8 0%, #ff8a3d 55%, #e8893f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ed-hero .lead {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  max-width: 38ch;
  line-height: 1.55;
}
.ed-hero .lead strong { color: #e8e8ee; font-weight: 600; }

.ed-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 36px;
}

.ed-hero-stat {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}
.ed-hero-stat div strong {
  display: block;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  font-weight: 650;
}
.ed-hero-stat div span {
  color: var(--faint);
  font-size: 13px;
}

/* product float (Floga phone energy) */
.ed-hero-stage {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
}
.ed-hero-glow {
  position: absolute;
  width: 78%;
  height: 70%;
  border-radius: 40%;
  background: radial-gradient(circle, rgba(255, 138, 61, 0.45), rgba(106, 168, 255, 0.15) 45%, transparent 70%);
  filter: blur(8px);
  z-index: 0;
  animation: orb-drift 10s ease-in-out infinite alternate;
}
.ed-float {
  position: relative;
  z-index: 2;
  width: min(280px, 58vw);
  border-radius: 36px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow:
    0 40px 100px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.05) inset,
    0 0 80px rgba(255, 138, 61, 0.15);
  background: #111;
  transform: rotate(-3deg);
  animation: phone-float 7s ease-in-out infinite;
}
.ed-float img {
  width: 100%;
  aspect-ratio: 9/18.5;
  object-fit: cover;
  object-position: top;
}
.ed-float.b {
  position: absolute;
  width: min(210px, 42vw);
  right: 4%;
  bottom: 6%;
  z-index: 1;
  transform: rotate(8deg);
  opacity: 0.95;
  animation: phone-float 8.5s ease-in-out infinite reverse;
  animation-delay: -2s;
}
@keyframes phone-float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-14px) rotate(-2deg); }
}
.ed-float.b {
  animation-name: phone-float-b;
}
@keyframes phone-float-b {
  0%, 100% { transform: translateY(0) rotate(8deg); }
  50% { transform: translateY(-10px) rotate(9deg); }
}

/* ── sticky chapter rail ────────────────────────────── */
.ed-rail {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 65;
  width: min(calc(100% - 20px), 860px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px 8px;
  padding: 10px 12px 12px;
  border-radius: 20px;
  background: rgba(10, 10, 14, 0.72);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: 0 18px 50px rgba(0,0,0,0.5);
}
.ed-rail-label {
  grid-column: 1 / -1;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0 6px 2px;
}
.ed-rail a {
  font-size: 12.5px;
  color: var(--muted);
  padding: 7px 8px;
  border-radius: 10px;
  transition: color .15s, background .15s;
}
.ed-rail a:hover,
.ed-rail a.is-active {
  color: var(--ink);
  background: rgba(255,255,255,0.07);
}
.ed-rail a.is-active { color: var(--orange-2); }

/* ── chapters ───────────────────────────────────────── */
.ed-chapter {
  position: relative;
  padding: 100px 24px 48px;
  scroll-margin-top: 20px;
}
.ed-chapter.is-light {
  background: #f4f2ef;
  color: #17171a;
}
.ed-chapter.is-light .ed-chapter-tag { color: #c2410c; }
.ed-chapter.is-light .ed-chapter-head p,
.ed-chapter.is-light .ed-muted { color: #5c5c66; }
.ed-chapter.is-violet {
  background:
    radial-gradient(ellipse 80% 60% at 80% 20%, rgba(255, 138, 61, 0.18), transparent 50%),
    linear-gradient(160deg, #1a0f2e 0%, #0d0a14 50%, #050507 100%);
}
.ed-chapter-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
}
.ed-chapter-tag {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange-2);
}
.ed-chapter-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 40px;
}
.ed-chapter-head h2 {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  font-weight: 650;
  max-width: 18ch;
}
.ed-chapter-head p {
  margin: 14px 0 0;
  color: var(--muted);
  max-width: 44ch;
  font-size: 1.08rem;
}

/* Floga-style color tiles */
.ed-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.ed-tile {
  border-radius: 20px;
  padding: 28px 22px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* Light text on dark tinted cards — never black-on-black */
  color: #f5f5f7;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
  /* Base charcoal; hue comes in at ~50% intensity via overlays */
  background: #16161a;
  position: relative;
  overflow: hidden;
}
.ed-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5; /* dial color boxes to ~50% */
  pointer-events: none;
  border-radius: inherit;
}
.ed-tile > * { position: relative; z-index: 1; }
.ed-tile span {
  display: block;
  margin-top: 10px;
  font-weight: 500;
  font-size: 0.9rem;
  color: rgba(245, 245, 247, 0.78);
  opacity: 1;
}
/* Full hue kept on overlay only; 50% opacity = half intensity */
.ed-tile.t1::before { background: linear-gradient(145deg, #ff9a4a, #e85d1a); }
.ed-tile.t2::before { background: linear-gradient(145deg, #6aa8ff, #3b6fe0); }
.ed-tile.t3::before { background: linear-gradient(145deg, #3ecf8e, #1a9f63); }
.ed-tile.t4::before { background: linear-gradient(145deg, #b48cff, #7a4fd4); }

/* product stage — ALWAYS dark scrim for overlays */
.ed-stage {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0a0a0c;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.ed-stage-media {
  position: relative;
  background: #111;
}
.ed-stage-media img {
  width: 100%;
  max-height: 540px;
  object-fit: cover;
  object-position: top center;
  display: block;
}
/* Solid multi-stop scrim so light product art never washes out type */
.ed-stage-scrim {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 55%;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.94) 0%,
    rgba(0, 0, 0, 0.78) 35%,
    rgba(0, 0, 0, 0.35) 70%,
    transparent 100%
  );
}
.ed-stage-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 28px 28px 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-items: end;
  justify-content: space-between;
  color: #fff;
}
.ed-stage-caption h3 {
  margin: 0 0 6px;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.ed-stage-caption p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14.5px;
  max-width: 48ch;
  text-shadow: 0 1px 8px rgba(0,0,0,0.45);
}
/* Text panel fallback for very light hero art */
.ed-stage-caption.is-panel {
  position: relative;
  background: #0e0e12;
  border-top: 1px solid var(--line);
  color: var(--ink);
}
.ed-stage-caption.is-panel h3 { color: var(--ink); text-shadow: none; }
.ed-stage-caption.is-panel p { color: var(--muted); text-shadow: none; }
.ed-stage.has-panel .ed-stage-scrim { display: none; }

/* split feature row (Floga text + phone) */
.ed-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin: 28px 0;
}
.ed-split-copy h3 {
  margin: 0 0 14px;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.ed-split-copy p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 1.05rem;
}
.ed-split-copy p strong { color: #e8e8ee; font-weight: 600; }
.ed-chapter.is-light .ed-split-copy p strong { color: #17171a; }

.ed-phone-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
}
.ed-phone-blob {
  position: absolute;
  width: 85%;
  height: 75%;
  border-radius: 40%;
  background: linear-gradient(135deg, rgba(106,168,255,0.45), rgba(180,140,255,0.35), rgba(255,138,61,0.25));
  filter: blur(4px);
  z-index: 0;
}
.ed-phone {
  position: relative;
  z-index: 1;
  width: min(260px, 70%);
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 30px 70px rgba(0,0,0,0.4);
  background: #0a0a0a;
}
.ed-phone img {
  width: 100%;
  aspect-ratio: 9/18;
  object-fit: cover;
  object-position: top;
}

/* bento cards */
.ed-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.ed-card {
  grid-column: span 4;
  background: var(--elev);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform .18s ease, border-color .18s;
}
.ed-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
}
.ed-card.wide { grid-column: span 6; }
.ed-card.full { grid-column: span 12; }
.ed-card-media {
  aspect-ratio: 16/10;
  background: #0a0a0c;
  overflow: hidden;
  position: relative;
}
.ed-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.ed-card-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  background: var(--elev);
  color: var(--ink);
}
.ed-card-body h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.ed-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.45;
  flex: 1;
}
.ed-card-link {
  margin-top: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--orange-2);
}
.ed-card-link::after { content: " →"; }

/* games strip */
.ed-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.ed-strip-card {
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--elev);
  transition: transform .18s;
}
.ed-strip-card:hover { transform: translateY(-3px); }
.ed-strip-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.ed-strip-card .meta {
  padding: 14px 16px 16px;
  background: var(--elev);
}
.ed-strip-card h3 { margin: 0 0 4px; font-size: 1rem; color: var(--ink); }
.ed-strip-card p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* CTA panel */
.ed-panel {
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(255,138,61,0.18), transparent 50%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(106,168,255,0.1), transparent 50%),
    var(--elev);
  padding: 48px 40px;
  box-shadow: var(--shadow);
}
.ed-panel h2 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.035em;
}
.ed-panel p {
  margin: 0 0 22px;
  color: var(--muted);
  max-width: 48ch;
}
.ed-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* footer */
.ed-footer {
  margin-top: 20px;
  padding: 56px 24px 120px;
  border-top: 1px solid var(--line);
}
.ed-footer-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 40px;
}
.ed-footer strong { display: block; margin-bottom: 8px; }
.ed-footer .muted { color: var(--muted); font-size: 14px; max-width: 32ch; margin: 0; }
.ed-footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.ed-footer-cols p {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.ed-footer-cols a {
  display: block;
  color: var(--muted);
  font-size: 14px;
  padding: 4px 0;
}
.ed-footer-cols a:hover { color: var(--ink); }
.ed-footer-legal {
  width: min(100%, var(--max));
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 12.5px;
}

/* scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* responsive */
@media (max-width: 980px) {
  .ed-hero-inner,
  .ed-split,
  .ed-footer-inner { grid-template-columns: 1fr; }
  .ed-hero { min-height: auto; padding-bottom: 100px; }
  .ed-hero h1 { max-width: none; }
  .ed-hero-stage { min-height: 400px; margin-top: 8px; }
  .ed-tiles { grid-template-columns: 1fr 1fr; }
  .ed-card, .ed-card.wide { grid-column: span 6; }
  .ed-strip { grid-template-columns: 1fr; }
  .ed-rail {
    grid-template-columns: 1fr 1fr;
    bottom: 12px;
    width: min(calc(100% - 16px), 860px);
    padding: 8px 10px 10px;
  }
  .ed-rail a { font-size: 12px; padding: 8px 6px; }

  /* mobile nav: brand + hamburger (CTA hidden — links/CTAs live in panel) */
  .ed-nav-toggle {
    display: inline-flex !important;
    position: relative;
    z-index: 2;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }
  .ed-top {
    height: auto;
    min-height: 58px;
    border-radius: 28px;
    padding: 7px 7px 7px 12px;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    width: min(calc(100% - 16px), 1080px);
    top: 36px;
    overflow: visible;
  }
  .ed-brand {
    flex: 1 1 auto;
    min-width: 0;
  }
  .ed-brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ed-top-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0;
    min-width: 44px;
  }
  /* free space so the menu button never clips off-screen */
  .ed-top-actions > .ed-pill {
    display: none !important;
  }
  /* JS moves .ed-top-link into .ed-mobile-panel; hide any residual */
  .ed-top-actions > .ed-top-link {
    display: none !important;
  }

  .ed-mobile-panel {
    position: absolute !important;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    margin: 0;
    padding: 10px;
    border-radius: 20px;
    background: rgba(14, 14, 18, 0.96);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(22px) saturate(1.4);
    -webkit-backdrop-filter: blur(22px) saturate(1.4);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    z-index: 80;
    display: none;
  }
  .ed-top:not(.is-open) .ed-mobile-panel,
  .ed-mobile-panel[hidden] {
    display: none !important;
  }
  .ed-top.is-open .ed-mobile-panel {
    display: flex !important;
  }
  .ed-mobile-panel a,
  .ed-mobile-panel .ed-top-link {
    display: flex !important;
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    color: var(--ink);
    border-radius: 12px;
    white-space: normal;
  }
  .ed-mobile-panel a:hover,
  .ed-mobile-panel a[aria-current="page"],
  .ed-mobile-panel .ed-top-link:hover,
  .ed-mobile-panel .ed-top-link[aria-current="page"] {
    background: rgba(255, 138, 61, 0.12);
    color: var(--orange-2);
  }

  /* keep orbs inside hero — no horizontal spill */
  .ed-orb.a,
  .ed-orb.b,
  .ed-orb.c {
    width: min(280px, 65vw);
    height: min(280px, 65vw);
  }
}

@media (max-width: 640px) {
  body { padding-bottom: 130px; }
  .ed-tiles { grid-template-columns: 1fr; }
  .ed-card, .ed-card.wide, .ed-card.full { grid-column: span 12; }
  .ed-float.b { display: none; }
  .ed-chapter-head { grid-template-columns: 1fr; }
  .ed-footer-cols { grid-template-columns: 1fr 1fr; }
  .ed-footer { padding: 40px 18px 130px; }
  .ed-panel { padding: 28px 18px; }
  .ed-hero { padding: calc(28px + 80px) 18px 90px; }
  .ed-chapter { padding: 72px 18px 40px; }
  .ed-stage-caption {
    flex-direction: column;
    align-items: flex-start;
  }
  .ed-hero-actions .ed-pill {
    min-height: 44px;
  }
  .ed-hero-stat { gap: 18px; }
  .ed-rail {
    bottom: max(8px, env(safe-area-inset-bottom, 0px));
    border-radius: 16px;
    max-height: min(42vh, 220px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .ed-draft-banner { /* staging only; not used in production pages */
    font-size: 11px;
    gap: 4px;
    padding: 0 8px;
  }
}

@media (max-width: 380px) {
  .ed-top-actions > .ed-pill {
    padding: 8px 10px;
    font-size: 12px;
  }
  .ed-brand span { font-size: 13px; }
}

/* production: never show staging draft banner */
.ed-draft-banner { display: none !important; }
