:root {
  --bg: #0f1419;
  --bg-2: #151c24;
  --panel: #121820;
  --fog: #e8eef4;
  --muted: #8b9aab;
  --copper: #d4894a;
  --copper-deep: #8f5528;
  --sky: #5b8fa8;
  --line: #2a3544;
  --ok: #7ea58a;
  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Space Grotesk", system-ui, sans-serif;
  --max: 72rem;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--fog);
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(91, 143, 168, 0.18), transparent 55%),
    radial-gradient(900px 500px at 10% 20%, rgba(212, 137, 74, 0.12), transparent 50%),
    linear-gradient(180deg, #0c1015 0%, var(--bg) 40%, #0d1218 100%);
  font-family: var(--font-display);
  font-optical-sizing: auto;
  line-height: 1.55;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 70%);
  z-index: 0;
}

a {
  color: var(--copper);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #e2a56a;
}

code {
  font-family: var(--font-ui);
  font-size: 0.92em;
  color: #f0d2b0;
  background: rgba(212, 137, 74, 0.1);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--copper);
  color: #1a1008;
  padding: 0.6rem 1rem;
  z-index: 20;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: clip;
  isolation: isolate;
}

.hero-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(212, 137, 74, 0.16), transparent 60%),
    radial-gradient(ellipse 60% 40% at 70% 10%, rgba(91, 143, 168, 0.22), transparent 55%),
    linear-gradient(180deg, #0a0e13 0%, #121925 55%, #0f1419 100%);
  z-index: -2;
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(91, 143, 168, 0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 143, 168, 0.18) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 85%);
  animation: gridDrift 28s linear infinite;
}

@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 64px 32px, 64px 32px; }
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--pad);
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  font-family: var(--font-ui);
}

.logo {
  color: var(--fog);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.topnav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.15rem;
}

.topnav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.topnav-links a:hover {
  color: var(--fog);
}

.hero-copy {
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: clamp(1.5rem, 6vh, 4rem) var(--pad) 1rem;
  animation: riseIn 0.9s ease both;
}

.brand {
  margin: 0 0 0.65rem;
  font-family: var(--font-ui);
  font-size: clamp(2.4rem, 8vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--fog);
  text-shadow: 0 0 40px rgba(212, 137, 74, 0.25);
}

.hero h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(1.55rem, 3.4vw, 2.35rem);
  font-weight: 500;
  line-height: 1.2;
  color: #d7e0ea;
}

.lede {
  margin: 1rem 0 0;
  max-width: 36ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
  font-family: var(--font-ui);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  border-radius: 0.35rem;
  background: linear-gradient(135deg, #d4894a, #b86a2f);
  color: #1a1008;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.cta:hover {
  color: #1a1008;
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.cta.ghost {
  background: transparent;
  color: var(--fog);
  border: 1px solid var(--line);
}

.cta.ghost:hover {
  border-color: var(--muted);
  color: var(--fog);
  filter: none;
}

.hero-art {
  margin: 0;
  padding: 0 var(--pad) clamp(1.5rem, 4vh, 3rem);
  max-width: var(--max);
  width: 100%;
  margin-inline: auto;
  animation: riseIn 1.1s ease 0.12s both;
}

.hero-art svg {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.45));
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main {
  position: relative;
  z-index: 1;
}

.section {
  padding: clamp(3rem, 8vw, 5.5rem) 0;
}

.section.alt {
  background: linear-gradient(180deg, rgba(18, 24, 32, 0.65), rgba(15, 20, 25, 0.2));
  border-block: 1px solid rgba(42, 53, 68, 0.7);
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.eyebrow {
  margin: 0 0 0.6rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
}

.section h2 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.section-lede,
.intro p,
.section > .section-inner > p {
  max-width: 58ch;
  color: #b7c3d0;
  font-size: 1.08rem;
}

.section-lede {
  margin-top: 0.9rem;
}

.diagram {
  margin: 1.75rem 0 1rem;
}

.diagram svg {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: var(--panel);
}

.diagram.compact {
  margin-top: 1rem;
}

.diagram figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 55ch;
}

.parts {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
}

.parts li {
  display: grid;
  gap: 0.25rem;
  padding-left: 1rem;
  border-left: 3px solid var(--copper);
}

.parts strong {
  font-family: var(--font-ui);
  font-size: 1.05rem;
}

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

.formula-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.75rem 0;
  font-family: var(--font-ui);
}

.formula-strip-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hf-note {
  margin: 1.25rem 0 1.5rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--copper);
  background: rgba(212, 137, 74, 0.08);
  color: #d4c2ad;
}

.band-group {
  margin-top: 1.25rem;
}

.band-group-title {
  margin: 0 0 0.55rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.band-panels {
  margin-top: 1rem;
}

.formula-strip > div {
  padding: 1rem 1.1rem;
  border-top: 2px solid var(--copper);
  background: rgba(18, 24, 32, 0.85);
}

.formula-strip .k {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.formula-strip .v {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--fog);
}

.note,
.hint {
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 58ch;
}

.band-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  font-family: var(--font-ui);
}

.tab {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 0.7rem 1rem;
  border-radius: 0.3rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.tab:hover {
  color: var(--fog);
  border-color: #445366;
}

.tab.is-active {
  color: #1a1008;
  background: linear-gradient(135deg, #d4894a, #b86a2f);
  border-color: transparent;
}

.band-panel h3 {
  margin: 0 0 1rem;
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: 0.98rem;
  margin: 0.5rem 0 1rem;
}

th,
td {
  text-align: left;
  padding: 0.75rem 0.6rem;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.two-col h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-ui);
  font-size: 1.1rem;
}

.checklist {
  margin: 0;
  padding-left: 1.1rem;
  color: #b7c3d0;
}

.checklist li {
  margin: 0.45rem 0;
}

.steps {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 1.75rem;
}

.steps > li {
  position: relative;
  padding-left: 3.2rem;
  counter-increment: step;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.95rem;
  color: #1a1008;
  background: var(--copper);
}

.steps strong {
  display: block;
  font-family: var(--font-ui);
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.steps p {
  margin: 0;
  color: #b7c3d0;
  max-width: 58ch;
}

.callout {
  margin-top: 2rem;
  padding: 1.1rem 1.2rem;
  border-left: 3px solid var(--ok);
  background: rgba(126, 165, 138, 0.08);
}

.callout p {
  margin: 0;
  color: #c5d4ca;
  max-width: 60ch;
}

.site-footer {
  padding: 3rem 0 4rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-ui);
}

.brand-foot {
  margin: 0 0 0.4rem;
  color: var(--fog);
  font-weight: 700;
  font-size: 1.2rem;
}

@media (max-width: 760px) {
  .topnav-links {
    display: none;
  }

  .formula-strip,
  .two-col {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding-top: 2rem;
  }

  .brand {
    font-size: clamp(2.6rem, 14vw, 4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-grid,
  .hero-copy,
  .hero-art {
    animation: none;
  }
}
