:root {
  --ink: #14181f;
  --ink-soft: #2a3140;
  --paper: #e7ebe8;
  --paper-deep: #d5dcd6;
  --mist: #f3f5f2;
  --accent: #0f7a6b;
  --accent-hot: #d4552a;
  --line: rgba(20, 24, 31, 0.14);
  --shadow: 0 24px 60px rgba(20, 24, 31, 0.12);
  --font-brand: "Syne", sans-serif;
  --font-display: "Source Serif 4", Georgia, serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --shell: min(1120px, calc(100% - 2.5rem));
  --narrow: min(720px, calc(100% - 2.5rem));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(15, 122, 107, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(212, 85, 42, 0.10), transparent 50%),
    linear-gradient(180deg, var(--mist), var(--paper) 40%, var(--paper-deep));
  min-height: 100vh;
  line-height: 1.55;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hot); }
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--mist); padding: 0.5rem 1rem;
}
.skip-link:focus { left: 0.75rem; top: 0.75rem; z-index: 20; }

.shell { width: var(--shell); margin-inline: auto; }
.shell.narrow { width: var(--narrow); }

.site-header {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(243, 245, 242, 0.82);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4rem;
}
.brand {
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav a:hover { color: var(--accent); }

.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}
.hero-plane {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(120deg, rgba(20,24,31,0.88) 0%, rgba(20,24,31,0.55) 42%, rgba(15,122,107,0.35) 100%),
    radial-gradient(circle at 70% 30%, rgba(212,85,42,0.35), transparent 40%),
    linear-gradient(160deg, #1c2430, #0f7a6b 70%, #d4552a);
  transform: scale(1.02);
  animation: plane-in 1.4s ease-out both;
}
.hero-plane::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -18deg,
      transparent 0 14px,
      rgba(255,255,255,0.03) 14px 15px
    );
}
.hero-copy {
  padding: clamp(4rem, 12vh, 7rem) 0 clamp(3rem, 8vh, 5rem);
  color: #f5f7f4;
  max-width: min(36rem, 100%);
}
.brand-mark {
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: clamp(1.65rem, 6.2vw, 3.4rem);
  letter-spacing: -0.035em;
  margin: 0 0 1rem;
  line-height: 1.05;
  width: 100%;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.manifesto {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.45rem, 3.5vw, 2.1rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  max-width: 22ch;
}
.hero .lede {
  color: rgba(245, 247, 244, 0.86);
  max-width: 34ch;
  font-size: 1.05rem;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.75rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary {
  background: #f5f7f4;
  color: var(--ink);
}
.btn.primary:hover { background: #fff; color: var(--ink); }
.btn.ghost {
  border-color: rgba(245,247,244,0.45);
  color: #f5f7f4;
}
.btn.ghost:hover { background: rgba(245,247,244,0.1); color: #fff; }

.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section.muted { background: rgba(255,255,255,0.35); }
.section h2, .page-hero h1, .article h1 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  line-height: 1.15;
}
.section h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.page-hero { padding: clamp(3rem, 8vw, 5rem) 0 1rem; }
.page-hero h1, .article h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); }
.section-lede, .lede {
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.75rem;
}
.eyebrow a { color: inherit; text-decoration: none; }

.principle-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}
.principle-list li {
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  font-size: 1.05rem;
}
.principle-list strong {
  font-family: var(--font-brand);
  font-weight: 700;
  margin-right: 0.35rem;
}

.link-list, .chapter-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.75rem;
}
.link-list a, .chapter-list a {
  display: grid;
  gap: 0.25rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.chapter-list a {
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}
.link-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}
.link-summary { color: var(--ink-soft); }
.num {
  font-family: var(--font-brand);
  font-weight: 700;
  color: var(--accent);
  padding-top: 0.2rem;
}
.text-link {
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
}
.text-link:hover { color: var(--accent-hot); }

.article { padding: 2rem 0 4rem; }
.prose {
  font-family: var(--font-display);
  font-size: 1.12rem;
  line-height: 1.7;
}
.prose h2, .prose h3 {
  font-family: var(--font-brand);
  margin-top: 2rem;
}
.prose p { margin: 0 0 1.1rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: rgba(20,24,31,0.06);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
}
.prose pre {
  overflow: auto;
  padding: 1rem;
  background: var(--ink);
  color: #eef2ee;
  border-radius: 0.75rem;
}
.prose pre code { background: transparent; color: inherit; padding: 0; }

.chapter-nav {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.chapter-nav ul { list-style: none; padding: 0; margin: 0; }
.chapter-nav li { margin: 0.4rem 0; }
.chapter-nav li[aria-current="page"] a { font-weight: 700; color: var(--ink); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  background: rgba(255,255,255,0.4);
}
.footer-inner { display: grid; gap: 0.75rem; }
.footer-brand {
  font-family: var(--font-brand);
  font-weight: 800;
  margin: 0;
}
.footer-credit, .footer-nav {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.footer-nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-nav a { color: var(--ink-soft); text-decoration: none; }
.footer-nav a:hover { color: var(--accent); }

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.8s ease forwards;
}
.delay-1 { animation-delay: 0.12s; }
.delay-2 { animation-delay: 0.24s; }
.delay-3 { animation-delay: 0.36s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}
@keyframes plane-in {
  from { transform: scale(1.08); filter: saturate(0.8); }
  to { transform: scale(1.02); filter: none; }
}

@media (max-width: 720px) {
  .header-inner { flex-direction: column; align-items: flex-start; padding: 0.85rem 0; }
  .hero-copy { max-width: none; }
  .brand-mark { font-size: clamp(2.2rem, 12vw, 3.4rem); }
  .manifesto { max-width: none; }
}
