/* ==============================================================================
 * PaperRss — Minimal Zine Poster & Editorial System (Inspired by gc-minimal-zine-poster & otty.sh)
 * Pure Warm Paper & Ink Aesthetic (米白纸张色、黑白灰、杂志海报排版、极简纯粹)
 * ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Noto+Serif+SC:wght@500;600;700&display=swap');

:root {
  /* Warm Paper & Clean Neutral Palette */
  --paper: #f7f5ef;
  --surface: #ffffff;
  --ink: #1c1a17;
  --muted: #666155;
  --subtle: #948e7f;
  --chip: #eeece3;
  --chip-hover: #e3dfd4;
  --card: #f1eee4;
  --card-hover: #e9e5d9;
  --skel: #e5e1d3;
  --panel: #eae6db;
  --hairline: rgba(28, 26, 23, 0.09);
  --border: rgba(28, 26, 23, 0.08);
  --border-medium: rgba(28, 26, 23, 0.15);
  --label: rgba(28, 26, 23, 0.44);
  --kbd-bg: rgba(28, 26, 23, 0.06);
  --kbd-ink: rgba(28, 26, 23, 0.78);
  --hover: rgba(28, 26, 23, 0.04);
  --ring: rgba(28, 26, 23, 0.12);
  --dot: rgba(28, 26, 23, 0.28);
  --accent: #1c1a17;
  --accent-hover: #000000;
  --shadow-sm: 0 1px 2px rgba(28, 26, 23, 0.04);
  --shadow-md: 0 4px 16px rgba(28, 26, 23, 0.06), 0 1px 3px rgba(28, 26, 23, 0.04);
  --shadow-lg: 0 20px 48px -12px rgba(28, 26, 23, 0.12), 0 2px 8px rgba(28, 26, 23, 0.04);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Noto Serif SC', 'Cormorant Garamond', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Backward compatibility mappings */
  --bg-paper: var(--paper);
  --bg-paper-elevated: var(--surface);
  --bg-paper-card: var(--card);
  --text-main: var(--ink);
  --text-muted: var(--muted);
  --text-subtle: var(--subtle);
  --border-light: var(--border);
  --color-cobalt: var(--ink);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Layout Container */
.container {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ==============================================================================
 * Header / Navbar (Hidden by default for pure Minimal Zine / Poster feel)
 * Structure kept intact for compatibility with DOM test assertions
 * ============================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 239, 0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  display: none !important; /* Minimalist poster layout: header hidden */
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  justify-self: start;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  justify-self: center;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: end;
}

/* ==============================================================================
 * Hero Section (Minimal Zine Poster Layout — High Impact, Deep Focus)
 * ============================================================================== */
.hero {
  padding: 5.5rem 0 3.5rem 0;
  position: relative;
}

.hero-content {
  width: min(100%, 820px);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform-origin: center top;
  will-change: transform, filter, opacity;
}

.hero-app-icon {
  width: 84px;
  height: 84px;
  flex: 0 0 auto;
  margin: 0 0 1.15rem;
  user-select: none;
  -webkit-user-drag: none;
}

.hero-app-icon img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 22px;
  box-shadow: var(--shadow-md);
}

/* Scramble Title — Zine Poster Typography (Mono/Serif Hybrid, Pure Ink) */
.hero h1,
.hero-brand-name,
.scramble-title {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--ink);
  cursor: pointer;
  margin-bottom: 1rem;
}

.scramble-target {
  display: inline-block;
  line-height: inherit;
  white-space: nowrap;
}

/* Scramble characters: Pure monochrome ink with typographic texture */
.scramble-char {
  font-family: var(--font-mono);
  color: var(--ink);
  opacity: 0.65;
  font-size: 0.9em;
  display: inline-block;
  vertical-align: middle;
}

.settling-char {
  display: inline-block;
  color: inherit;
  vertical-align: baseline;
}

.hero-subtitle,
.hero-bio {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 620px;
  line-height: 1.68;
  margin-bottom: 2rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* Hero CTA Cluster — Download, Star & Lang Switches Together */
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  margin-bottom: 1.5rem;
}

/* Split Download Button (Universal macOS) */
.dl-split {
  position: relative;
  display: inline-flex;
  align-items: stretch;
}

.dl-main {
  display: inline-flex;
  height: 44px;
  align-items: center;
  gap: 0.55rem;
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  padding: 0 1.35rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.dl-main:hover {
  opacity: 0.92;
}

.dl-main-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.dl-main-icon svg {
  width: 16px;
  height: 16px;
}

.dl-tag-universal {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.18);
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  margin-left: 0.15rem;
}

.dl-toggle {
  display: inline-flex;
  height: 44px;
  width: 38px;
  align-items: center;
  justify-content: center;
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--ink);
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.dl-toggle:hover {
  opacity: 0.92;
}

.dl-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.dl-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Download Dropdown Menu */
.dl-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 50;
  min-width: 300px;
  display: none;
  flex-direction: column;
  gap: 3px;
  padding: 6px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border-medium);
  box-shadow: 0 12px 32px rgba(28, 26, 23, 0.12), 0 2px 6px rgba(28, 26, 23, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: menuFadeIn 0.15s ease forwards;
}

.dl-menu.is-open {
  display: flex;
}

@keyframes menuFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.dl-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 9px 12px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
}

.dl-item:hover,
.dl-item:focus-visible {
  background-color: var(--card-hover);
  color: var(--ink);
  outline: none;
}

.dl-item:active {
  background-color: var(--skel);
}

.dl-os {
  font-weight: 500;
  white-space: nowrap;
}

.dl-item-sub {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.15s ease;
}

.dl-item:hover .dl-item-sub,
.dl-item:focus-visible .dl-item-sub {
  color: var(--ink);
}

/* GitHub Star Pill Button (in Hero CTA cluster) */
.btn-github {
  display: inline-flex;
  height: 44px;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--chip);
  padding: 0 1.15rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn-github:hover {
  background: var(--chip-hover);
}

.gh-star-badge {
  display: none;
  align-items: center;
  gap: 0.25rem;
  background: var(--kbd-bg);
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.gh-star-badge.is-visible {
  display: inline-flex;
}

.gh-star-icon {
  width: 11px;
  height: 11px;
  fill: var(--ink);
}

/* Language Switcher Pill in Hero */
.language-switcher {
  display: inline-flex;
  height: 44px;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0 1rem;
  border-radius: 999px;
  background: var(--chip);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.language-switcher:hover {
  background: var(--chip-hover);
  color: var(--ink);
}

/* Secondary CTA Chip (Explore Features) */
.hero-cta-secondary {
  display: inline-flex;
  height: 44px;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink);
  background: var(--chip);
  text-decoration: none;
  padding: 0 1.15rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: -0.01em;
  transition: background 0.15s ease, color 0.15s ease;
}

.hero-cta-secondary:hover {
  background: var(--chip-hover);
}

.hero-cta-secondary svg {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}

.hero-cta-secondary:hover svg {
  transform: translate(2px, -2px);
}

/* ==============================================================================
 * Section Dividers (Minimal Zine Hairline + Monospace uppercase labels)
 * ============================================================================== */
.section-divider {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 5rem auto 3rem;
  max-width: 960px;
}

.section-divider .hairline {
  height: 1px;
  flex: 1;
  background-color: var(--hairline);
}

.section-divider .section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--label);
  white-space: nowrap;
}

/* ==============================================================================
 * Showcase Stage — 3-Card Stacking Parallax
 * ============================================================================== */
.stage-section {
  position: relative;
  height: 300vh;
  margin-bottom: 2rem;
}

.stage-sticky-viewport {
  position: sticky;
  top: 3rem;
  width: 100%;
  height: calc(100vh - 4.5rem);
  max-height: 880px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-cards-wrapper {
  position: relative;
  width: 100%;
  max-width: 1080px;
}

.stage-card {
  width: 100%;
  border-radius: 16px;
}

.stage-card-base,
.stage-card-1 {
  position: relative;
  z-index: 1;
  transform-origin: center top;
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.stage-card-scrim {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: rgba(247, 245, 239, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
  transform: translateZ(0);
}

.stage-card-mid,
.stage-card-2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2;
  transform-origin: center top;
  transform: translate3d(0, 115%, 0);
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.stage-card-overlay,
.stage-card-top,
.stage-card-3 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 3;
  transform-origin: center top;
  transform: translate3d(0, 230%, 0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.stage-image {
  width: 100%;
  display: block;
  height: auto;
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  transform: translateZ(0);
  background-color: var(--card);
}

/* ==============================================================================
 * Trust Rail / Core Philosophy Pillars (4-Column Bento Bar)
 * ============================================================================== */
.trust-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 3rem auto;
  max-width: 960px;
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem 1.1rem;
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: transform 0.15s ease, background 0.15s ease;
}

.trust-item:hover {
  background: var(--card-hover);
}

.trust-item strong {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.trust-item span {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ==============================================================================
 * Feature Sections (Bento Cards & Editorial Grids)
 * ============================================================================== */
#features {
  position: relative;
  z-index: 1;
  transform-origin: center top;
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  margin-bottom: 4rem;
  padding-top: 1rem;
}

.section-title-group {
  text-align: left;
  max-width: 960px;
  margin: 0 auto 2rem;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--label);
  margin-bottom: 0.4rem;
}

.section-title-group h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.3;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 960px;
  margin: 0 auto;
}

.feature-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--card);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 1.5rem;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.feature-card:hover {
  background: var(--card-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--label);
  margin-bottom: 0.6rem;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.feature-card-img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-sm);
  display: block;
}

.feature-card-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ==============================================================================
 * Installation Section (Terminal Card & Step Guide)
 * ============================================================================== */
.install-section {
  max-width: 960px;
  margin: 0 auto 4.5rem;
}

.install-box {
  background: var(--card);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 1.75rem;
}

.install-intro {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.install-methods {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.install-method-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.install-method-item strong {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.install-subtext {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.install-subtext code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--kbd-bg);
  color: var(--kbd-ink);
}

.install-cmd-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
  margin-top: 0.35rem;
}

.install-cmd {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink);
  line-height: 1.4;
  overflow-x: auto;
  white-space: nowrap;
  flex: 1;
}

.install-cmd-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 0.85rem;
  border-radius: 999px;
  border: 0;
  background: var(--ink);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.install-cmd-copy:hover {
  opacity: 0.9;
}

.install-note {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
}

.install-note a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ==============================================================================
 * Sponsor & Feedback Section
 * ============================================================================== */
.sponsor-section {
  max-width: 960px;
  margin: 0 auto 4.5rem;
  background: var(--card);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 2rem;
  text-align: left;
}

.sponsor-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--label);
  margin-bottom: 0.5rem;
}

.sponsor-section h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.sponsor-desc {
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 600px;
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.sponsor-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}

.qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.85rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.qr-card img {
  width: 130px;
  height: 130px;
  display: block;
  border-radius: 6px;
}

.qr-caption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.feedback-links {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.feedback-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.feedback-btn:hover {
  opacity: 0.9;
}

.feedback-btn.secondary-feedback {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-medium);
}

.feedback-btn.secondary-feedback:hover {
  background: var(--chip);
}

.paypal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 1.5rem;
  border-radius: 999px;
  background: #0070ba;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 112, 186, 0.2);
  transition: opacity 0.15s ease;
}

.paypal-button:hover {
  opacity: 0.92;
}

/* ==============================================================================
 * Footer
 * ============================================================================== */
.site-footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4.5rem;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--label);
  margin-bottom: 0.85rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a {
  font-size: 0.84rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
}

.footer-copy a {
  color: inherit;
  text-decoration: none;
}

.footer-copy a:hover {
  text-decoration: underline;
}

/* ==============================================================================
 * Legal pages
 * ============================================================================== */
.legal-body {
  background:
    radial-gradient(circle at 12% 5%, rgba(28, 26, 23, 0.035), transparent 30rem),
    var(--paper);
}

.legal-shell {
  width: min(calc(100% - 2rem), 900px);
  margin-inline: auto;
}

.legal-topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
}

.legal-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.legal-topbar-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.9rem 1.25rem;
}

.legal-topbar-links a,
.legal-footer a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
}

.legal-topbar-links a:hover,
.legal-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.legal-hero {
  padding: 5.5rem 0 4rem;
  border-bottom: 1px solid var(--border);
}

.legal-eyebrow,
.legal-section-number {
  font-family: var(--font-mono);
  color: var(--label);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  font-weight: 600;
}

.legal-hero h1 {
  max-width: 760px;
  margin: 0.9rem 0 1.2rem;
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.legal-hero > p:not(.legal-eyebrow) {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.05rem;
}

.legal-callout {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1.25rem;
  margin-top: 2.25rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--border-medium);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
}

.legal-callout span {
  color: var(--muted);
}

.legal-document section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 1.5rem;
}

.legal-document h2 {
  margin: 0.75rem 0 2.25rem;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
}

.legal-document h3 {
  margin: 2rem 0 0.65rem;
  font-size: 1rem;
}

.legal-document p,
.legal-document li {
  color: var(--muted);
  line-height: 1.8;
}

.legal-document p + p {
  margin-top: 0.9rem;
}

.legal-document ul,
.legal-document ol {
  padding-left: 1.4rem;
}

.legal-document li + li {
  margin-top: 0.5rem;
}

.legal-document a {
  color: var(--ink);
  text-underline-offset: 0.18em;
}

.legal-source-link {
  margin-top: 1.5rem !important;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.legal-table-wrap {
  overflow-x: auto;
  margin-top: 1.4rem;
}

.legal-document table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-size: 0.88rem;
}

.legal-document th,
.legal-document td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.legal-document th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.legal-document td {
  color: var(--muted);
}

.legal-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 4rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
}

/* ==============================================================================
 * Responsive Breakpoints
 * ============================================================================== */
@media (max-width: 1024px), (prefers-reduced-motion: reduce) {
  .stage-section {
    height: auto !important;
    padding: 1.5rem 0 3.5rem 0 !important;
    margin-bottom: 3rem !important;
  }

  .stage-sticky-viewport {
    position: static !important;
    height: auto !important;
    max-height: none !important;
    display: block !important;
    overflow: visible !important;
  }

  .stage-cards-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 2rem !important;
  }

  .stage-card {
    position: static !important;
    width: 100% !important;
    display: block !important;
  }

  .stage-card-base,
  .stage-card-1 {
    position: static !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
    margin-bottom: 0 !important;
  }

  .stage-card-mid,
  .stage-card-2,
  .stage-card-overlay,
  .stage-card-top,
  .stage-card-3 {
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
    margin-top: 0 !important;
    z-index: 1 !important;
  }

  .stage-card-scrim {
    display: none !important;
  }

  #features {
    position: static !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
    margin-bottom: 3rem !important;
  }

  .sponsor-section {
    position: static !important;
    transform: none !important;
  }
}

@media (max-width: 768px) {
  .site-header {
    display: flex;
    justify-content: space-between;
    padding: 0.65rem 1rem;
  }

  .site-nav {
    display: none;
  }

  .trust-rail {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 0.55rem 0.85rem;
  }

  .btn-github > span:first-child {
    display: none;
  }

  .brand-tag {
    display: none;
  }

  .btn-download-primary {
    display: none;
  }

  .hero {
    padding: 3.5rem 0 2rem 0;
  }

  .hero-app-icon {
    width: 68px;
    height: 68px;
    margin-bottom: 0.85rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-brand-name,
  .scramble-title {
    font-size: 2.2rem;
  }

  .hero-subtitle,
  .hero-bio {
    font-size: 0.94rem;
    line-height: 1.55;
    margin-bottom: 1.75rem;
  }

  .hero-ctas {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 360px;
    margin-inline: auto;
  }

  .dl-split {
    width: 100%;
    max-width: 340px;
  }

  .dl-menu {
    min-width: 0;
    width: 100%;
  }

  .dl-main {
    flex: 1;
    justify-content: center;
    font-size: 0.78rem;
    padding: 0 0.85rem;
    white-space: nowrap;
  }

  .btn-github,
  .language-switcher,
  .hero-cta-secondary {
    height: 38px;
    padding: 0 0.85rem;
    font-size: 0.76rem;
  }

  .trust-rail {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .legal-topbar {
    align-items: flex-start;
    padding: 1rem 0;
  }

  .legal-topbar-links {
    max-width: 12rem;
  }

  .legal-hero {
    padding: 3.5rem 0 3rem;
  }

  .legal-callout {
    grid-template-columns: 1fr;
  }

  .legal-document section {
    padding: 3rem 0;
  }

  .legal-footer {
    flex-direction: column;
  }
}
