:root {
  --bg: #050505;
  --bg-soft: #0d0d0f;
  --panel: rgba(14, 14, 16, 0.9);
  --panel-strong: rgba(18, 18, 20, 0.96);
  --text: #f5f1e8;
  --muted: #b6ad99;
  --line: rgba(211, 168, 74, 0.18);
  --line-strong: rgba(242, 209, 129, 0.28);
  --gold: #d3a84a;
  --gold-soft: #f2d181;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
  --max: 1120px;
  --radius-xl: 36px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --space-1: 10px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top center, rgba(211, 168, 74, 0.14), transparent 30%),
    radial-gradient(circle at 20% 16%, rgba(255, 214, 128, 0.07), transparent 18%),
    linear-gradient(180deg, #090909 0%, #050505 100%);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 18%),
    radial-gradient(circle at center, transparent 62%, rgba(0, 0, 0, 0.36) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.shell {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(5, 5, 5, 0.74);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand img,
.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.04);
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name strong {
  font-size: 0.96rem;
  letter-spacing: 0.02em;
}

.brand-name span {
  color: var(--muted);
  font-size: 0.76rem;
}

.nav,
.footer-nav,
.stage-actions,
.hero-actions,
.signal-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.nav {
  justify-content: flex-end;
  gap: 8px;
}

.nav a,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.nav a:hover,
.button:hover,
.back-link:hover,
.store-badge-link:hover {
  transform: translateY(-1px);
}

.nav a:hover,
.button:hover {
  border-color: var(--line-strong);
  background: rgba(211, 168, 74, 0.08);
}

.button-primary {
  background: linear-gradient(135deg, rgba(211, 168, 74, 0.24), rgba(211, 168, 74, 0.08));
  border-color: rgba(242, 209, 129, 0.34);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.03);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.page-title,
.stage-panel h1,
.story-head h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  letter-spacing: -0.04em;
}

.page-title {
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  line-height: 0.96;
}

.lede,
.stage-copy p,
.stack-card p,
.story-card p,
.rail-card span,
.legal-card p,
.legal-card li {
  margin: 0;
  color: var(--muted);
}

.stage-kicker,
.stack-label,
.story-index {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-soft);
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.home-stage {
  padding: 28px 0 20px;
}

.stage-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 420px);
  gap: 22px 28px;
  align-items: start;
  padding: clamp(28px, 4vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(211, 168, 74, 0.13), transparent 28%),
    linear-gradient(180deg, rgba(18, 18, 20, 0.98), rgba(10, 10, 12, 0.94));
  box-shadow: var(--shadow);
}

.stage-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 560px;
}

.stage-panel h1 {
  max-width: 8ch;
  font-size: clamp(3rem, 6vw, 5.4rem);
  line-height: 0.9;
}

.stage-copy p {
  max-width: 42ch;
  font-size: 1.02rem;
}

.stage-actions,
.hero-actions {
  gap: 10px;
}

.stage-badge {
  margin-top: 6px;
  align-self: flex-start;
}

.store-badge-link {
  display: inline-flex;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.store-badge {
  width: 180px;
  height: 60px;
}

.signal-row {
  gap: 10px;
}

.signal-row span {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.92rem;
}

.stage-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-self: stretch;
}

.stack-card {
  min-width: 0;
  padding: 22px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(8, 8, 10, 0.8);
}

.stack-card h2 {
  margin: 10px 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 0.96;
}

.stack-card-primary {
  min-height: 220px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(8, 8, 10, 0.8);
}

.stack-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.list-index {
  color: var(--gold-soft);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
}

.stack-card-mini {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.stack-card-mini strong {
  font-size: 1.08rem;
  line-height: 1.25;
}

.mini-chip {
  align-self: flex-start;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(211, 168, 74, 0.12);
  border: 1px solid rgba(211, 168, 74, 0.26);
  color: var(--gold-soft);
  font-size: 0.84rem;
}

.home-rail {
  padding: 0 0 24px;
}

.rail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.rail-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(14, 14, 16, 0.76);
}

.rail-card strong {
  font-size: 1rem;
}

.home-story {
  padding: 0 0 var(--space-6);
}

.story-head {
  max-width: 720px;
  margin-bottom: 18px;
}

.story-head h2 {
  margin-top: 10px;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 0.96;
}

.story-grid {
  display: grid;
  gap: 14px;
}

.story-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 22px;
  padding: 22px 24px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    rgba(14, 14, 16, 0.84);
  box-shadow: var(--shadow);
}

.story-card strong,
.story-card p {
  grid-column: 2;
}

.story-card strong {
  font-size: 1.2rem;
}

.story-index {
  grid-column: 1;
  grid-row: 1 / span 2;
  padding-top: 4px;
}

.legal-layout {
  padding: 40px 0 72px;
}

.legal-card {
  padding: 34px;
}

.legal-card h1 {
  margin-top: 0;
}

.legal-card h2 {
  margin: 32px 0 10px;
  font-size: 1.16rem;
}

.legal-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 20px;
  color: var(--gold-soft);
}

.footer {
  padding: 20px 0 42px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.footer-nav {
  gap: 14px;
}

.empty-state {
  padding: 92px 0;
  text-align: center;
}

.empty-state .panel {
  padding: 40px 28px;
}

@media (max-width: 960px) {
  .stage-panel,
  .rail-grid {
    grid-template-columns: 1fr;
  }

  .stage-copy {
    max-width: none;
  }

  .stage-stack {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar-inner,
  .footer-inner {
    align-items: flex-start;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
  }

  .stage-panel {
    padding: 26px 22px;
    gap: 22px;
  }

  .stage-panel h1 {
    max-width: none;
    font-size: clamp(2.9rem, 12vw, 4.4rem);
  }

  .stage-actions,
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .story-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .story-card strong,
  .story-card p,
  .story-index {
    grid-column: auto;
    grid-row: auto;
  }

  .legal-card {
    padding: 24px;
  }
}
