:root {
  --bg: #f6f4ec;
  --paper: #ffffff;
  --ink: #1b2328;
  --muted: #556268;
  --sea: #0f7f7a;
  --deep: #0e2f45;
  --sun: #f2b962;
  --accent: #0fa57d;
}

body.dark {
  --bg: #11161f;
  --paper: #1b2432;
  --ink: #e8eef8;
  --muted: #adc0da;
  --sea: #2c9e9d;
  --deep: #102238;
  --sun: #f6d380;
  --accent: #2fd4a6;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 80%, #b6e5ea 20%) 100%);
  transition: background-color 0.35s ease, color 0.35s ease;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  gap: 1rem;
  background: linear-gradient(130deg, #082d46 0%, #0d5d63 48%, #0f8f7d 100%);
  color: #f4fffb;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 7px solid rgba(255, 255, 255, 0.2);
  border-top-color: #f6c86f;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hero {
  position: relative;
  min-height: 94vh;
  overflow: hidden;
  color: #f7fffd;
  padding: 1.1rem 1.1rem 4rem;
  background: linear-gradient(120deg, #082d46 0%, #0d5d63 48%, #0f8f7d 100%);
}

body.dark .hero {
  background: linear-gradient(120deg, #050d16 0%, #11304c 58%, #1b6e6a 100%);
}

.parallax-layer {
  position: absolute;
  inset: -8% -8% auto;
  height: 140%;
  pointer-events: none;
  will-change: transform;
}

.layer-back {
  background: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.25) 0 14%, transparent 15%),
    radial-gradient(circle at 85% 25%, rgba(255, 255, 255, 0.15) 0 10%, transparent 11%),
    radial-gradient(circle at 55% 80%, rgba(255, 255, 255, 0.12) 0 12%, transparent 13%);
}

.layer-mid {
  background: linear-gradient(to top, rgba(255, 255, 255, 0.14), transparent 40%);
}

.nav,
.hero-content,
.section {
  position: relative;
  z-index: 3;
  max-width: 1120px;
  margin-inline: auto;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-family: "Chivo Mono", monospace;
  font-size: 1.15rem;
}

.nav-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.nav-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
  font-weight: 600;
}

.theme-toggle {
  border: 0;
  background: var(--sun);
  color: #1c2328;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
}

.hero-content {
  margin-top: 7rem;
}

.eyebrow {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.88rem;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5.2rem);
  line-height: 1.08;
  max-width: 12ch;
  margin: 0.5rem 0 1rem;
}

.lead {
  max-width: 62ch;
  font-size: 1.15rem;
  opacity: 0.96;
}

.cta {
  display: inline-block;
  margin-top: 1.3rem;
  background: var(--sun);
  color: #122124;
  text-decoration: none;
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
}

.section {
  padding: 4.2rem 1.2rem;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.18;
}

h3 {
  font-size: 1.25rem;
}

.split {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.4rem;
}

.panel,
.card,
.stat-card {
  background: var(--paper);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: 0 12px 30px rgba(16, 52, 55, 0.12);
}

.panel ul {
  margin: 0;
  padding-left: 1.2rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 0;
}

.stat-card {
  text-align: center;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

.stat-value {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.card p {
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.footer {
  text-align: center;
  padding: 1.7rem 1rem 2.4rem;
  color: color-mix(in srgb, var(--ink) 72%, var(--muted) 28%);
}

@media (max-width: 930px) {
  body {
    font-size: 17px;
  }

  .split,
  .cards,
  .stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
    line-height: 1.7;
  }

  .hero-content {
    margin-top: 4.6rem;
  }

  .nav-actions {
    gap: 0.5rem;
  }

  .theme-toggle {
    padding: 0.45rem 0.75rem;
  }

  .split,
  .cards,
  .stats {
    grid-template-columns: 1fr;
  }
}
