@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Spline+Sans+Mono:wght@400;600&display=swap");

:root {
  --ink: #171717;
  --muted: #6b6b6b;
  --paper: #f3f0e8;
  --stone: #ece6db;
  --accent: #2e6b5f;
  --accent-2: #e07a3f;
  --shadow: rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

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

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

.hero {
  position: relative;
  background: radial-gradient(circle at top, #f6f1e7 0%, #e8efe9 50%, #dfe6e2 100%);
  padding: 28px 24px 96px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
  pointer-events: none;
}

.nav {
  max-width: 1100px;
  margin: 0 auto 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 20px;
  font-size: 14px;
  align-items: center;
}

.nav-links a {
  opacity: 0.8;
}

.nav-links a:hover {
  opacity: 1;
}

.pill {
  border: 1px solid var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.6);
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.kicker {
  font-family: "Spline Sans Mono", "Consolas", monospace;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 11px;
  margin-bottom: 12px;
}

h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  margin: 0 0 16px;
}

.lede {
  font-size: 18px;
  max-width: 640px;
  color: var(--muted);
}

.cta {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 24px rgba(46, 107, 95, 0.2);
}

.btn.ghost {
  background: transparent;
  border-color: var(--ink);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.15);
}

.hero-badges {
  margin-top: 32px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-badges span {
  background: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #e4e0d8;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 72px 24px;
}

.section.alt {
  background: var(--stone);
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

.section-header p {
  color: var(--muted);
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.card {
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 12px 26px var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-list ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.feature-list li {
  margin-bottom: 8px;
}

.steps {
  margin: 0;
  padding-left: 18px;
  font-size: 17px;
}

.steps li {
  margin-bottom: 10px;
}

.output-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.output-list div {
  background: #fff;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.output-list h3 {
  margin-top: 0;
}

.math-details {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 8px 16px 16px;
}

.math-details summary {
  cursor: pointer;
  font-weight: 600;
  padding: 10px 0;
  list-style: none;
}

.math-details summary::marker {
  display: none;
}

.math-details summary::before {
  content: "+";
  display: inline-block;
  margin-right: 8px;
  font-weight: 700;
}

.math-details[open] summary::before {
  content: "–";
}

.math-block {
  background: #fff;
  color: #111;
  padding: 16px 4px 4px;
}

.math-block h3 {
  margin: 18px 0 8px;
  font-size: 16px;
}

.math-block p {
  margin: 6px 0;
  color: #222;
}

.equation {
  margin: 10px 0 14px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.gallery figure {
  margin: 0;
  background: #fff;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 26px var(--shadow);
}

.gallery img {
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.gallery figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

.gallery img {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: min(92vw, 1200px);
  max-height: 86vh;
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  background: #fff;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  align-items: center;
}

.panel {
  background: #fff;
  padding: 22px;
  border-radius: 16px;
  box-shadow: 0 12px 28px var(--shadow);
}

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

.fineprint {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

.footer {
  text-align: center;
  padding: 24px 12px 40px;
  font-size: 14px;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 800px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}
