:root {
  --ink: #141820;
  --ink-soft: rgba(20, 24, 32, 0.68);
  --ink-faint: rgba(20, 24, 32, 0.45);
  --paper: #f3f0ea;
  --paper-2: #e7e2d8;
  --stage: #1a2332;
  --stage-2: #243044;
  --signal: #c45c26;
  --hold: #2f6f5e;
  --line: rgba(20, 24, 32, 0.12);
  --serif: "Literata", "Times New Roman", serif;
  --sans: "Bricolage Grotesque", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse 90% 55% at 10% -10%, rgba(196, 92, 38, 0.08), transparent 50%),
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(47, 111, 94, 0.08), transparent 45%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  font-family: var(--serif);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.site-locked > :not(.site-gate):not(script) {
  visibility: hidden;
  pointer-events: none;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Gate */
.site-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  place-items: center;
  padding: 1.5rem;
  background: var(--stage);
}

body.site-locked .site-gate {
  display: grid;
}

.gate-card {
  width: min(22rem, 100%);
  text-align: center;
  color: #f3f0ea;
}

.gate-mark {
  margin: 0 0 0.75rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(243, 240, 234, 0.55);
}

.gate-title {
  margin: 0;
  font-family: var(--sans);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.gate-copy {
  margin: 0.6rem 0 0;
  color: rgba(243, 240, 234, 0.7);
}

.gate-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.gate-form input {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(243, 240, 234, 0.22);
  border-radius: 0;
  background: rgba(243, 240, 234, 0.06);
  color: #f3f0ea;
  font: inherit;
}

.gate-form button {
  min-height: 2.85rem;
  border: 0;
  background: #f3f0ea;
  color: var(--stage);
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.gate-error {
  margin: 0.75rem 0 0;
  color: #ffb4a2;
  font-size: 0.9rem;
}

/* Top */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem clamp(1.1rem, 3vw, 2.5rem);
  background: rgba(243, 240, 234, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.top-brand {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

.top-nav {
  display: flex;
  gap: 1.25rem;
}

.top-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
}

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

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  min-height: calc(100svh - 3.5rem);
  padding: clamp(2rem, 5vw, 4rem) clamp(1.1rem, 3vw, 2.5rem) clamp(3rem, 6vw, 5rem);
}

.hero-brand {
  margin: 0 0 0.85rem;
  font-family: var(--sans);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.hero-title {
  margin: 0;
  max-width: 14ch;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 1.1rem 0 0;
  max-width: 32rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.6rem;
  min-height: 2.9rem;
  padding: 0.7rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.btn:hover {
  background: #000;
}

.btn--light {
  background: var(--paper);
  color: var(--stage);
}

.btn--light:hover {
  background: #fff;
}

.hero-stage {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  background:
    linear-gradient(160deg, var(--stage) 0%, var(--stage-2) 100%);
  color: #f3f0ea;
  min-height: 22rem;
}

.read {
  padding: 1.15rem 1.2rem 1.1rem;
  border: 1px solid rgba(243, 240, 234, 0.14);
  background: rgba(243, 240, 234, 0.04);
}

.read header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(243, 240, 234, 0.62);
}

.tag {
  letter-spacing: 0.08em;
  color: rgba(243, 240, 234, 0.42);
}

.metric {
  margin: 0.55rem 0 0;
  font-family: var(--sans);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}

.metric--big {
  font-size: clamp(3rem, 7vw, 4.2rem);
}

.dir {
  margin-left: 0.2rem;
  font-size: 0.45em;
  text-decoration: none;
  vertical-align: super;
}

.dir.up {
  color: #ff8f6b;
}

.spark {
  display: block;
  width: 100%;
  height: 3.2rem;
  margin-top: 0.85rem;
}

.spark path {
  fill: none;
  stroke: #f3f0ea;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
}

body.is-ready .spark path {
  animation: draw 1.4s ease forwards 0.25s;
}

.delta {
  margin: 0.85rem 0 0;
  font-family: var(--sans);
  font-weight: 700;
  color: #ff8f6b;
}

.hint {
  margin: 0.7rem 0 0;
  font-size: 0.88rem;
  color: rgba(243, 240, 234, 0.55);
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* Sections */
.band,
.split {
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.1rem, 3vw, 2.5rem);
}

.band--principle,
.band--contact {
  background: var(--stage);
  color: #f3f0ea;
}

.kicker {
  margin: 0 0 0.85rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.band--principle .kicker,
.band--contact .kicker {
  color: rgba(243, 240, 234, 0.45);
}

.band h2,
.split h3 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.band h2 {
  max-width: 22ch;
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
}

.split h3 {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
}

.prose {
  margin: 1rem 0 0;
  max-width: 40rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.band--principle .prose,
.band--contact .prose {
  color: rgba(243, 240, 234, 0.7);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.states {
  margin-top: 1.5rem;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.states-head,
.states [role="row"] {
  display: grid;
  grid-template-columns: 5.5rem 5.5rem 1fr;
  gap: 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.02rem;
}

.states-head {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.states [role="row"] span:first-child,
.states [role="row"] span:nth-child(2) {
  font-family: var(--sans);
  font-weight: 700;
}

.states .is-alert {
  background: rgba(196, 92, 38, 0.08);
}

.rules {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  max-width: 46rem;
}

.rules li {
  position: relative;
  padding: 0.85rem 0 0.85rem 1.25rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}

.rules li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.25rem;
  width: 0.45rem;
  height: 0.45rem;
  background: var(--signal);
}

.foot {
  padding: 1.5rem clamp(1.1rem, 3vw, 2.5rem) 2rem;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 0.9rem;
}

.foot p {
  margin: 0;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-title {
    max-width: none;
  }

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

@media (max-width: 640px) {
  .top-nav {
    gap: 0.85rem;
  }

  .states-head,
  .states [role="row"] {
    grid-template-columns: 4.2rem 4.2rem 1fr;
    gap: 0.55rem;
    font-size: 0.95rem;
  }
}

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

  body.is-ready .spark path {
    animation: none;
    stroke-dashoffset: 0;
  }
}
