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

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/barlow-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/barlow-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/barlow-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/barlow-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/source-serif-4-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #0c1a24;
  --ink-soft: #1a2f3a;
  --paper: #f2f5f3;
  --paper-2: #e6ece8;
  --forest: #1a5f4a;
  --forest-bright: #2d8a6a;
  --muted: #5a6e66;
  --line: rgba(12, 26, 36, 0.12);
  --font-sans: "Barlow", "Segoe UI", sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip:focus {
  left: 0;
}

a {
  color: var(--forest);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--forest-bright);
}

.wrap {
  width: min(1080px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.wrap.narrow {
  width: min(680px, calc(100% - 2.5rem));
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(242, 245, 243, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

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

/* Hero */
.hero {
  position: relative;
  min-height: min(92vh, 760px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--ink);
  color: #e8f0ec;
}

.hero__plane {
  position: absolute;
  inset: 0;
  animation: hero-fade 1.2s ease-out both;
}

.hero__diagram {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
}

.hero__gate {
  animation: gate-pulse 4.5s ease-in-out infinite;
}

@keyframes hero-fade {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: none; }
}

@keyframes gate-pulse {
  0%, 100% { stroke-opacity: 0.7; }
  50% { stroke-opacity: 1; }
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 3.5rem;
  animation: content-up 0.9s ease-out both;
}

@keyframes content-up {
  from { transform: translateY(18px); }
  to { transform: none; }
}

.brand {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8fbfa8;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5.5vw, 3.15rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 14ch;
}

.hero__lead {
  margin: 0 0 1.75rem;
  max-width: 38ch;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 400;
  color: #b8cfc4;
  line-height: 1.5;
  opacity: 1;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn--primary {
  background: #c8e6d8;
  color: var(--ink);
}

.btn--primary:hover {
  background: #e0f2ea;
  color: var(--ink);
}

.btn--ghost {
  border-color: rgba(200, 230, 216, 0.45);
  color: #c8e6d8;
  background: transparent;
}

.btn--ghost:hover {
  border-color: #c8e6d8;
  color: #fff;
}

.section--cta .btn--primary {
  background: var(--forest);
  color: #fff;
}

.section--cta .btn--primary:hover {
  background: var(--forest-bright);
  color: #fff;
}

.section--cta .btn--ghost {
  border-color: var(--line);
  color: var(--ink);
}

.section--cta .btn--ghost:hover {
  border-color: var(--forest);
  color: var(--forest);
}

.btn--solid {
  background: var(--forest);
  color: #fff;
}

.btn--solid:hover {
  background: var(--forest-bright);
  color: #fff;
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section--band {
  background: var(--paper-2);
  border-block: 1px solid var(--line);
}

.section--cta {
  background:
    linear-gradient(160deg, #dce8e2 0%, var(--paper) 55%),
    var(--paper);
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--forest);
}

.section h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  max-width: 22ch;
}

.prose {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: 1.08rem;
  color: var(--ink-soft);
}

.prose.muted {
  color: var(--muted);
  font-size: 0.98rem;
}

.prose em {
  font-style: italic;
}

.bullets {
  margin: 0 0 1.25rem;
  padding-left: 1.15rem;
  font-family: var(--font-serif);
  color: var(--ink-soft);
}

.bullets li {
  margin-bottom: 0.55rem;
}

.sources-list a {
  text-decoration: none;
}

.sources-list a:hover {
  text-decoration: underline;
}

.steps {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .steps {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 2.5rem;
  }
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem 1rem;
  align-items: start;
  animation: content-up 0.7s ease-out both;
}

.steps li:nth-child(2) { animation-delay: 0.08s; }
.steps li:nth-child(3) { animation-delay: 0.16s; }
.steps li:nth-child(4) { animation-delay: 0.24s; }

.steps__n {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--forest);
  padding-top: 0.2rem;
}

.steps h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.contact-block {
  margin: 1.5rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
  font-size: 1rem;
  line-height: 1.7;
}

.contact-block a {
  text-decoration: none;
}

.contact-block a:hover {
  text-decoration: underline;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--forest);
}

/* Article pages */
.page-hero {
  background: var(--ink);
  color: #e8f0ec;
  padding: 4.25rem 0 3.25rem;
}

.page-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 16ch;
}

.page-hero .hero__lead {
  margin-bottom: 0;
  max-width: 42ch;
}

.page-hero__back {
  margin: 1.35rem 0 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.page-hero__back a {
  color: #c8e6d8;
  text-decoration: none;
}

.page-hero__back a:hover {
  color: #fff;
}

.page-main .section,
.page-hero {
  scroll-margin-top: 4.75rem;
}

.page-main .section {
  padding: 3.25rem 0;
}

.formula {
  margin: 0 0 1.15rem;
  padding: 0.9rem 1rem;
  background: rgba(26, 95, 74, 0.08);
  border-left: 3px solid var(--forest);
  font-weight: 600;
  color: var(--ink);
}

.table-wrap {
  margin: 0.25rem 0 1.25rem;
  overflow-x: auto;
}

table.cap {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}

table.cap caption {
  caption-side: bottom;
  padding-top: 0.65rem;
  text-align: left;
  font-size: 0.85rem;
  color: var(--muted);
}

table.cap th,
table.cap td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}

table.cap thead th {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
}

table.cap tbody th {
  font-weight: 600;
  text-align: left;
  color: var(--ink);
}

table.cap td {
  font-variant-numeric: tabular-nums;
}

table.cap th:nth-child(n+2),
table.cap td:nth-child(n+2) {
  text-align: right;
}

table.cap tr.is-constraint td {
  background: rgba(26, 95, 74, 0.08);
  font-weight: 600;
}

.tag {
  display: inline-block;
  margin-left: 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--forest);
  font-variant-numeric: normal;
}

.exercise {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  font-family: var(--font-serif);
  color: var(--ink-soft);
}

.exercise li {
  margin-bottom: 0.55rem;
  padding-left: 0.25rem;
}

.nav a[aria-current="page"] {
  color: var(--forest);
}

@media (max-width: 640px) {
  .nav {
    font-size: 0.8rem;
    gap: 0.25rem 0.75rem;
  }

  table.cap {
    min-width: 0;
  }

  table.cap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  table.cap tr {
    display: block;
    margin: 0 0 0.75rem;
    padding: 0.2rem 0 0.35rem;
    border-bottom: 1px solid var(--line);
  }

  table.cap tr.is-constraint {
    background: rgba(26, 95, 74, 0.08);
    padding-inline: 0.6rem;
  }

  table.cap tr.is-constraint td {
    background: transparent;
  }

  table.cap tbody th,
  table.cap td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border: 0;
    padding: 0.28rem 0;
    text-align: right;
  }

  table.cap tbody th {
    display: block;
    padding-top: 0.35rem;
    text-align: left;
  }

  table.cap td::before {
    content: attr(data-label);
    font-weight: 500;
    color: var(--muted);
    text-align: left;
  }

  .hero {
    min-height: 88vh;
  }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__plane,
  .hero__content,
  .hero__gate,
  .steps li {
    animation: none;
  }
}
