:root {
  --bg: #f5ecd9;
  --bg-soft: #efe2c5;
  --ink: #1d1a17;
  --muted: #5a5248;
  --line: rgba(29, 26, 23, 0.12);
  --panel: rgba(255, 250, 241, 0.82);
  --panel-strong: rgba(255, 249, 237, 0.96);
  --signal: #cf5f2a;
  --signal-deep: #7c2412;
  --cool: #1d5f73;
  --shadow: 0 18px 50px rgba(81, 46, 24, 0.12);
  --radius: 28px;
  --radius-sm: 18px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(207, 95, 42, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(29, 95, 115, 0.14), transparent 28%),
    linear-gradient(180deg, #f8f0df 0%, #f2e5ca 55%, #ecdab8 100%);
  font-family: "Sora", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(29, 26, 23, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 26, 23, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent 80%);
}

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

.topbar,
.hero,
.section,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  background: rgba(255, 248, 235, 0.7);
}

.brand,
.topbar a,
.button,
.footer a {
  color: inherit;
  text-decoration: none;
}

.brand {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.topbar-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.topbar-links a {
  font-size: 0.92rem;
  color: var(--muted);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 24px;
  align-items: stretch;
  min-height: 74vh;
}

.hero-copy,
.hero-side,
.section,
.footer {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--panel);
  backdrop-filter: blur(12px);
}

.hero-copy {
  border-radius: calc(var(--radius) + 10px);
  padding: clamp(28px, 6vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-side {
  border-radius: calc(var(--radius) + 10px);
  padding: 22px;
  display: grid;
  gap: 18px;
  align-content: center;
}

.eyebrow,
.signal-label,
.timeline-day {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.eyebrow {
  color: var(--signal-deep);
  margin: 0 0 12px;
}

h1,
h2,
h3 {
  font-family: "Bricolage Grotesque", sans-serif;
  line-height: 0.95;
  margin: 0;
}

h1 {
  font-size: clamp(3.2rem, 10vw, 7.6rem);
  letter-spacing: -0.06em;
  max-width: 10ch;
}

h1 span {
  color: var(--signal);
}

.hero-summary {
  max-width: 46rem;
  margin: 22px 0 0;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.7;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.button:hover,
.button:focus-visible,
.system-panel:hover,
.timeline-item:hover,
.status-card:hover,
.signal-card:hover {
  transform: translateY(-3px);
}

.button:focus-visible,
.topbar a:focus-visible,
.footer a:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.button-primary {
  background: var(--ink);
  color: #f7f0e4;
}

.button-secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.35);
}

.signal-card {
  border-radius: var(--radius-sm);
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.signal-card:hover,
.system-panel:hover,
.timeline-item:hover,
.status-card:hover {
  border-color: rgba(207, 95, 42, 0.4);
  box-shadow: 0 22px 45px rgba(75, 45, 18, 0.12);
}

.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.96rem;
}

.metric-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

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

.terminal-card pre {
  margin: 10px 0 0;
  overflow-x: auto;
  font-family: "IBM Plex Mono", monospace;
  line-height: 1.7;
  font-size: 0.9rem;
}

.section,
.footer {
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 42px);
  margin-top: 24px;
}

.section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.section h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: -0.05em;
  max-width: 13ch;
}

.two-column,
.status-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.two-column p,
.manifesto p,
.system-panel p,
.timeline-item p,
.status-card li {
  color: var(--muted);
  line-height: 1.75;
}

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

.timeline-item,
.system-panel,
.status-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  background: rgba(255, 252, 246, 0.72);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.timeline-item h3,
.system-panel h3,
.status-card h3 {
  font-size: 1.45rem;
  margin: 10px 0 12px;
  letter-spacing: -0.04em;
}

.systems-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.challenge-band {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.challenge-band span {
  padding: 12px 15px;
  border-radius: 999px;
  border: 1px solid rgba(29, 95, 115, 0.24);
  background: rgba(29, 95, 115, 0.08);
  font-size: 0.93rem;
}

.status-card ul {
  margin: 16px 0 0;
  padding-left: 18px;
}

.status-card-good {
  border-color: rgba(29, 95, 115, 0.24);
  background: rgba(29, 95, 115, 0.08);
}

.status-card-warn {
  border-color: rgba(207, 95, 42, 0.28);
  background: rgba(207, 95, 42, 0.08);
}

.manifesto {
  display: grid;
  gap: 16px;
  max-width: 56rem;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer p {
  margin: 0;
  color: var(--muted);
  max-width: 52rem;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

.reveal,
.reveal-on-load {
  opacity: 0;
  transform: translateY(26px);
}

.reveal-on-load.is-visible,
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 700ms ease, transform 700ms ease;
}

.hero-copy.is-visible {
  transition-delay: 80ms;
}

.hero-side.is-visible {
  transition-delay: 180ms;
}

@media (max-width: 980px) {
  .hero,
  .timeline,
  .systems-grid,
  .two-column,
  .status-layout,
  .footer {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .footer {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--max));
    padding-top: 10px;
  }

  .topbar {
    border-radius: 28px;
    padding: 16px;
  }

  .topbar-links {
    gap: 10px 14px;
  }

  h1 {
    max-width: 100%;
  }

  .hero-summary {
    font-size: 1rem;
  }

  .button {
    width: 100%;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal,
  .reveal-on-load {
    opacity: 1;
    transform: none;
  }
}
