/* SurgeTix Connect documentation
   Editorial scrollytelling design system
   Tokens mirror the runtime widget tokens (--st-*) so docs feel native. */

:root {
  --st-bg: #09090b;
  --st-bg-surface: #131316;
  --st-bg-elevated: #1c1c20;
  --st-text: #fafafa;
  --st-text-muted: #a1a1aa;
  --st-text-dim: #71717a;
  --st-accent: #ff6666;
  --st-accent-bright: #ff8a8a;
  --st-crimson: #943c3c;
  --st-cream: #f4ece0;
  --st-on-accent: #09090b;
  --st-border: #27272a;
  --st-border-bright: #3f3f46;
  --st-success: #22c55e;
  --st-radius: 10px;
  --st-radius-lg: 18px;

  --st-font-display: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --st-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --st-font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono", monospace;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --measure: 64ch;
  --max-width: 1240px;
}

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

html {
  scroll-behavior: auto; /* Lenis owns scroll */
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: clip;
}

body {
  margin: 0;
  font-family: var(--st-font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--st-text);
  background: var(--st-bg);
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}

::selection {
  background: var(--st-accent);
  color: var(--st-on-accent);
}

a {
  color: var(--st-accent-bright);
  text-decoration: none;
  text-decoration-color: color-mix(in srgb, var(--st-accent-bright) 35%, transparent);
  text-underline-offset: 4px;
  transition: color 200ms ease, text-decoration-color 200ms ease;
}
a:hover, a:focus-visible {
  color: var(--st-accent);
  text-decoration: underline;
  text-decoration-color: var(--st-accent);
}

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

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

/* ─────────────── typography ─────────────── */

h1, h2, h3, h4 {
  font-family: var(--st-font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 0.5em;
  color: var(--st-text);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 500;
}

h3 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
}

h4 {
  font-size: 1.1rem;
  font-family: var(--st-font);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--st-text-muted);
  font-weight: 600;
}

p {
  margin: 0 0 1.2em;
  max-width: var(--measure);
}

p.lead {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  color: var(--st-text-muted);
  line-height: 1.55;
  max-width: 56ch;
}

.eyebrow {
  display: inline-block;
  font-family: var(--st-font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--st-accent);
  margin: 0 0 1.25rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--st-accent) 30%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--st-accent) 8%, transparent);
}

.display-serif {
  font-family: var(--st-font-display);
  font-style: italic;
  font-weight: 500;
}

/* ─────────────── layout ─────────────── */

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

.container--narrow {
  max-width: 760px;
}

section {
  position: relative;
}

.section-pad {
  padding-block: clamp(5rem, 12vh, 9rem);
}

.section-pad-sm {
  padding-block: clamp(3rem, 8vh, 5rem);
}

.docs-header {
  padding-top: 9rem;
  padding-bottom: clamp(5rem, 12vh, 9rem);
}

.divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--st-border) 20%, var(--st-border) 80%, transparent);
  border: 0;
  margin: 0;
}

/* ─────────────── nav ─────────────── */

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 1.1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--st-bg) 70%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 220ms ease, background 220ms ease;
}
.site-nav.is-scrolled {
  border-color: var(--st-border);
  background: color-mix(in srgb, var(--st-bg) 88%, transparent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
  color: var(--st-text);
  font-family: var(--st-font-display);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--st-text); text-decoration: none; }

.brand-mark {
  width: 128px;
  height: 128px;
  margin: -42px -28px;
  background: url("../img/surgetix-logo.png") center / contain no-repeat;
  flex: 0 0 auto;
}

.brand-suffix {
  color: var(--st-text-muted);
  font-style: italic;
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  color: var(--st-text-muted);
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}
.nav-links a:hover, .nav-links a.is-active {
  color: var(--st-text);
  background: var(--st-bg-surface);
  text-decoration: none;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 101;
  background: transparent;
  pointer-events: none;
}
.scroll-progress__bar {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--st-crimson), var(--st-accent));
  box-shadow: 0 0 18px var(--st-accent);
  will-change: transform;
}

/* mobile nav */
@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ─────────────── hero ─────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 8rem 4rem;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center 30%;
  filter: saturate(1.05) brightness(0.62);
  transform: scale(1.05);
  will-change: transform;
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 30%, transparent, var(--st-bg) 75%),
    linear-gradient(180deg, transparent 30%, var(--st-bg) 100%);
}

.hero__grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.hero__inner {
  max-width: 980px;
}
.hero h1 {
  margin-bottom: 1.4rem;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--st-accent);
}
.hero p.lead {
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  color: var(--st-text);
  max-width: 60ch;
}
.hero__meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2.2rem;
  color: var(--st-text-muted);
  font-family: var(--st-font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}
.hero__meta span { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero__meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--st-accent); box-shadow: 0 0 12px var(--st-accent); }

.hero__cta {
  display: inline-flex;
  gap: 1rem;
  align-items: center;
  margin-top: 2.2rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.96rem;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 200ms ease, background 200ms ease, color 200ms ease, border-color 200ms ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  background: var(--st-accent);
  color: var(--st-on-accent);
}
.btn-primary:hover { background: var(--st-accent-bright); color: var(--st-on-accent); }
.btn-ghost {
  background: transparent;
  color: var(--st-text);
  border-color: var(--st-border-bright);
}
.btn-ghost:hover { color: var(--st-text); border-color: var(--st-text-muted); }

.hero__scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--st-font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--st-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.7;
}
.hero__scroll-hint::after {
  content: "";
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, var(--st-text-muted), transparent);
  animation: scroll-pulse 2.4s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { transform: scaleY(0.4); opacity: 0.3; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ─────────────── reveal helpers ─────────────── */

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* ─────────────── stat row ─────────────── */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.stat {
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius-lg);
  padding: 1.6rem 1.5rem;
  background: linear-gradient(160deg, var(--st-bg-surface), var(--st-bg));
}
.stat__num {
  font-family: var(--st-font-display);
  font-size: clamp(2.6rem, 4.5vw, 3.6rem);
  letter-spacing: -0.04em;
  color: var(--st-accent);
  line-height: 1;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.stat__num span {
  font-size: 0.55em;
  color: var(--st-text-muted);
  margin-left: 0.2em;
  font-style: italic;
}
.stat__label {
  margin-top: 0.7rem;
  color: var(--st-text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

/* ─────────────── code blocks ─────────────── */

pre, code, kbd, samp {
  font-family: var(--st-font-mono);
  font-feature-settings: "calt" 0;
}

code:not(pre code) {
  background: var(--st-bg-elevated);
  color: var(--st-cream);
  padding: 0.12em 0.42em;
  border-radius: 4px;
  font-size: 0.88em;
  border: 1px solid var(--st-border);
}

pre {
  position: relative;
  background: #0d0d11;
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius);
  padding: 1.4rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.85rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow:
    0 1px 0 0 color-mix(in srgb, var(--st-cream) 4%, transparent) inset,
    0 30px 60px -30px rgba(0,0,0,.6);
}
pre code { color: #e8e3da; background: transparent; padding: 0; border: 0; }

pre::before {
  content: attr(data-lang);
  position: absolute;
  top: 0.65rem;
  right: 0.95rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--st-text-dim);
}

.code-copy {
  position: absolute;
  bottom: 0.6rem;
  right: 0.7rem;
  background: transparent;
  border: 1px solid var(--st-border);
  color: var(--st-text-muted);
  font-family: var(--st-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 180ms ease, color 180ms ease, border-color 180ms ease;
}
pre:hover .code-copy,
.code-copy:focus-visible {
  opacity: 1;
}
.code-copy.is-copied {
  color: var(--st-accent);
  border-color: var(--st-accent);
  opacity: 1;
}

/* token coloring */
.tok-tag { color: #ff8a8a; }
.tok-attr { color: #d4a3ff; }
.tok-str { color: #a8d977; }
.tok-com { color: #5a5a63; font-style: italic; }
.tok-kw { color: #ff8a8a; }
.tok-fn { color: #ffc46b; }
.tok-num { color: #ffc46b; }
.tok-punct { color: #888; }

/* ─────────────── side-by-side scrolly ─────────────── */

.scrolly {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  padding-block: 3rem;
}
.scrolly__steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.scrolly__step {
  min-height: 90svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 2rem;
  opacity: 0.32;
  transition: opacity 350ms ease;
}
.scrolly__step.is-active { opacity: 1; }
.scrolly__step h3 { margin-bottom: 0.6rem; }
.scrolly__step .step-num {
  font-family: var(--st-font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--st-accent);
  margin-bottom: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.scrolly__step .step-num::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--st-accent);
}

.scrolly__sticky {
  position: sticky;
  top: 8rem;
  height: calc(100svh - 9rem);
  display: flex;
  align-items: center;
  justify-content: center;
}
.scrolly__visual {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius-lg);
  background: linear-gradient(160deg, var(--st-bg-surface), var(--st-bg));
  overflow: hidden;
}
.scrolly__panel {
  position: absolute;
  inset: 0;
  padding: clamp(1rem, 2.5vw, 2rem);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 420ms ease, transform 420ms ease;
  pointer-events: none;
}
.scrolly__panel.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scrolly__panel pre {
  margin: 0;
  flex: 1;
  overflow: auto;
  font-size: 0.78rem;
}

@media (max-width: 880px) {
  .scrolly { grid-template-columns: 1fr; }
  .scrolly__sticky { position: relative; top: 0; height: 60svh; margin-bottom: 2rem; }
  .scrolly__step { min-height: auto; padding-block: 1.5rem; opacity: 1; }
}

/* ─────────────── widget gallery cards ─────────────── */

.widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
  margin-top: 3rem;
}

.widget-card {
  position: relative;
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius-lg);
  background: linear-gradient(160deg, var(--st-bg-surface), color-mix(in srgb, var(--st-bg) 80%, var(--st-crimson) 6%));
  padding: 1.6rem 1.5rem;
  transition: transform 350ms cubic-bezier(.2,.7,.2,1), border-color 350ms ease, background 350ms ease;
  overflow: hidden;
}
.widget-card::before {
  content: "";
  position: absolute;
  top: -2px; left: -2px;
  width: 60px; height: 2px;
  background: var(--st-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 400ms cubic-bezier(.2,.7,.2,1);
}
.widget-card:hover {
  transform: translateY(-4px);
  border-color: var(--st-border-bright);
}
.widget-card:hover::before { transform: scaleX(1); }

.widget-card__tag {
  font-family: var(--st-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--st-accent);
}
.widget-card h3 {
  margin: 0.6rem 0 0.5rem;
  font-family: var(--st-font);
  font-size: 1.18rem;
  letter-spacing: -0.005em;
  font-weight: 600;
}
.widget-card p {
  font-size: 0.95rem;
  color: var(--st-text-muted);
  margin-bottom: 0;
}

/* ─────────────── feature row ─────────────── */

.feature-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  margin-block: clamp(4rem, 10vh, 7rem);
}
.feature-row--reverse { grid-template-columns: 1fr 1.1fr; }
.feature-row--reverse .feature-row__media { order: -1; }

.feature-row__media {
  border-radius: var(--st-radius-lg);
  overflow: hidden;
  border: 1px solid var(--st-border);
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--st-bg-surface);
}
.feature-row__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1);
}
.feature-row.is-visible .feature-row__media img { transform: scale(1); }

.feature-row__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 60%, color-mix(in srgb, var(--st-bg) 60%, transparent));
  pointer-events: none;
}

@media (max-width: 880px) {
  .feature-row, .feature-row--reverse { grid-template-columns: 1fr; }
  .feature-row--reverse .feature-row__media { order: 0; }
}

/* ─────────────── pinned scroll text reveal ─────────────── */

.big-quote {
  font-family: var(--st-font-display);
  font-size: clamp(2rem, 4.5vw, 4.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 400;
  margin: 0;
  max-width: 28ch;
}
.big-quote em { color: var(--st-accent); font-style: italic; }
.big-quote .quote-author {
  display: block;
  margin-top: 1.4rem;
  font-family: var(--st-font);
  font-size: 0.92rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--st-text-muted);
  font-weight: 500;
}

/* ─────────────── parallax marquee ─────────────── */

.marquee {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--st-border);
  padding-block: 1.4rem;
  background: var(--st-bg-surface);
}
.marquee__track {
  display: flex;
  gap: 4rem;
  white-space: nowrap;
  font-family: var(--st-font-display);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  letter-spacing: -0.01em;
  color: var(--st-text-muted);
}
.marquee__track span { display: inline-flex; align-items: center; gap: 1rem; }
.marquee__track span::after {
  content: "✦";
  color: var(--st-accent);
  font-size: 0.7em;
}

/* ─────────────── reference TOC ─────────────── */

.docs {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  margin-top: 3rem;
}
.docs__toc {
  position: sticky;
  top: 7rem;
  font-size: 0.88rem;
  border-left: 1px solid var(--st-border);
  padding-left: 1rem;
}
.docs__toc h4 { font-size: 0.72rem; margin-bottom: 0.7rem; }
.docs__toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.docs__toc a {
  display: block;
  color: var(--st-text-muted);
  padding: 0.3rem 0;
  border-left: 1px solid transparent;
  margin-left: -1rem;
  padding-left: 1rem;
  font-size: 0.86rem;
  transition: color 180ms ease, border-color 180ms ease;
}
.docs__toc a:hover, .docs__toc a.is-active {
  color: var(--st-text);
  border-color: var(--st-accent);
  text-decoration: none;
}

.docs__body section {
  margin-bottom: 4rem;
  scroll-margin-top: 6rem;
}
.docs__body h2 { margin-top: 0; }
.docs__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}
.docs__body th, .docs__body td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--st-border);
  vertical-align: top;
}
.docs__body th {
  font-family: var(--st-font);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--st-text-muted);
  background: var(--st-bg-surface);
}
.docs__body tr:hover td { background: color-mix(in srgb, var(--st-bg-surface) 60%, transparent); }
.docs__body td code { font-size: 0.82rem; }

@media (max-width: 880px) {
  .docs { grid-template-columns: 1fr; }
  .docs__toc { position: relative; top: 0; }
}

/* ─────────────── examples grid ─────────────── */

.example {
  position: relative;
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius-lg);
  padding: 2rem;
  margin-bottom: 1.6rem;
  background: linear-gradient(160deg, var(--st-bg-surface), var(--st-bg));
  overflow: hidden;
}
.example > h3 { margin-top: 0; }
.example__lead { color: var(--st-text-muted); }
.example pre { margin-bottom: 0; }

.example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1.6rem;
  margin-top: 3rem;
}

/* ─────────────── footer ─────────────── */

.footer {
  margin-top: 6rem;
  border-top: 1px solid var(--st-border);
  padding: 4rem var(--gutter) 3rem;
  background: linear-gradient(180deg, var(--st-bg), color-mix(in srgb, var(--st-crimson) 10%, var(--st-bg)));
}
.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
}
.footer h4 { color: var(--st-text); font-family: var(--st-font); font-size: 0.78rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.footer a { color: var(--st-text-muted); font-size: 0.92rem; }
.footer a:hover { color: var(--st-text); }
.footer__blurb {
  color: var(--st-text-muted);
  margin-top: 1rem;
  font-size: 0.92rem;
  max-width: 34ch;
}
.footer__legal {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--st-border);
  font-size: 0.82rem;
  color: var(--st-text-dim);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: var(--max-width);
  margin-inline: auto;
}

@media (max-width: 720px) {
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

/* ─────────────── pinned hero word reveal ─────────────── */

.word-reveal {
  display: inline-block;
}
.word-reveal .w {
  display: inline-block;
  opacity: 0.18;
  transition: opacity 320ms ease;
  margin-right: 0.18em;
}
.word-reveal .w.is-on { opacity: 1; }

/* ─────────────── reduced motion ─────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .word-reveal .w { opacity: 1 !important; }
  .hero__bg { transform: none !important; }
}
