:root {
  color-scheme: light;
  --paper: #f4ecdf;
  --paper-strong: #efe4d3;
  --ink: #20261d;
  --ink-soft: #485146;
  --line: rgba(28, 39, 26, 0.14);
  --line-strong: rgba(28, 39, 26, 0.22);
  --green: #2e6f4d;
  --green-deep: #1f4e35;
  --green-soft: rgba(46, 111, 77, 0.12);
  --shadow: 0 24px 70px rgba(32, 38, 29, 0.09);
  --radius-xl: 2rem;
  --radius-lg: 1.35rem;
  --radius-md: 1rem;
  --page-width: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(46, 111, 77, 0.18), transparent 26%),
    radial-gradient(circle at 85% 12%, rgba(199, 160, 83, 0.14), transparent 18%),
    linear-gradient(180deg, #f8f2e8 0%, var(--paper) 38%, #f0e4d3 100%);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

body::before {
  background-image:
    linear-gradient(rgba(45, 63, 40, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 63, 40, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 82%);
}

body::after {
  background:
    linear-gradient(120deg, transparent 0 48%, rgba(255, 255, 255, 0.4) 48% 51%, transparent 51%),
    radial-gradient(circle at 20% 80%, rgba(46, 111, 77, 0.08), transparent 30%);
  mix-blend-mode: soft-light;
  z-index: -1;
}

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

a {
  color: inherit;
}

button,
a {
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--green);
  color: #f8f7f2;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.page-shell {
  width: min(var(--page-width), calc(100% - 2rem));
  margin: 0 auto;
  padding-bottom: 4rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
}

.topbar.is-scrolled {
  backdrop-filter: blur(18px);
}

.topbar.is-scrolled::before {
  content: "";
  position: absolute;
  inset: 0 -1rem;
  border-radius: 999px;
  background: rgba(248, 242, 232, 0.78);
  border: 1px solid rgba(28, 39, 26, 0.08);
  box-shadow: 0 18px 44px rgba(32, 38, 29, 0.07);
  z-index: -1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.brand-mark {
  width: 3.5rem;
  height: 3.5rem;
  flex: none;
}

.brand-copy {
  display: grid;
  gap: 0.15rem;
}

.brand-copy strong,
h1,
h2,
h3,
summary,
.footer-title {
  font-family: "Baskerville", "Iowan Old Style", "Palatino Linotype", serif;
}

.brand-copy strong {
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.brand-copy span {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.nav a {
  padding: 0.78rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.42);
}

.nav a:hover,
.button:hover,
.copy-button:hover {
  transform: translateY(-1px);
}

.section {
  margin-top: 4.4rem;
}

.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.92), rgba(243, 233, 217, 0.95)),
    linear-gradient(120deg, rgba(255, 255, 255, 0.45), transparent 48%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(46, 111, 77, 0.08), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 40%);
  pointer-events: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.95fr);
  gap: 1.35rem;
  align-items: stretch;
}

.hero-copy,
.hero-visual {
  padding: 2.1rem;
}

.eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-family: "Menlo", "Courier New", monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

h1 {
  max-width: 10ch;
  font-size: clamp(3.2rem, 6vw, 6rem);
}

h2 {
  max-width: 15ch;
  font-size: clamp(2.2rem, 3.5vw, 3.5rem);
}

h3,
summary {
  font-size: 1.35rem;
  line-height: 1.15;
}

p,
dd,
dt,
li {
  margin: 0;
  line-height: 1.65;
  color: var(--ink-soft);
}

.hero-dek {
  max-width: 60ch;
  margin-top: 1.25rem;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.button,
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.92rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.button-primary {
  background: var(--green);
  color: #f8f7f2;
  border-color: transparent;
}

.button-secondary,
.button-tertiary,
.copy-button {
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
}

.copy-button.is-copied {
  background: var(--green);
  border-color: transparent;
  color: #f8f7f2;
}

.trust-note {
  margin-top: 1.4rem;
  max-width: 56ch;
  padding-left: 1rem;
  border-left: 3px solid rgba(46, 111, 77, 0.28);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.hero-facts div {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(28, 39, 26, 0.08);
}

.hero-facts dt {
  font-family: "Menlo", "Courier New", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}

.hero-facts dd {
  margin-top: 0.35rem;
  color: var(--ink);
  line-height: 1.4;
}

.hero-visual {
  display: grid;
  gap: 1rem;
}

.hero-poster {
  margin: 0;
  border-radius: calc(var(--radius-xl) - 0.3rem);
  overflow: hidden;
  border: 1px solid rgba(28, 39, 26, 0.08);
  background: #ece4d6;
}

.hero-poster img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.hero-code {
  position: relative;
  z-index: 1;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius-lg);
  background: #1f241f;
  color: #f1eadf;
}

.hero-code pre,
.code-card pre {
  margin: 0;
  overflow-x: auto;
}

.hero-code code,
.code-card code {
  font-family: "Menlo", "Courier New", monospace;
  font-size: 0.95rem;
  line-height: 1.7;
}

.section-heading {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1.25rem;
}

.section-heading p {
  max-width: 62ch;
}

.split-grid,
.card-grid,
.value-grid,
.guide-grid {
  display: grid;
  gap: 1rem;
}

.split-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.prose-card,
.format-card,
.value-card,
.code-card,
.note-card {
  padding: 1.5rem;
}

.prose-card p,
.format-card p,
.value-card p,
.note-card p {
  margin-top: 0.9rem;
}

.card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card-index {
  display: inline-flex;
  margin-bottom: 1rem;
  font-family: "Menlo", "Courier New", monospace;
  font-size: 0.8rem;
  color: var(--green);
}

.value-band {
  position: relative;
}

.value-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.code-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.code-card {
  background:
    linear-gradient(180deg, rgba(35, 41, 34, 0.98), rgba(24, 28, 24, 0.98)),
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 44%);
  border-color: rgba(255, 255, 255, 0.06);
}

.code-card h3,
.code-card p,
.code-card code {
  color: #f1eadf;
}

.code-card p {
  margin-top: 0.4rem;
  color: rgba(241, 234, 223, 0.74);
}

.note-card {
  margin-top: 1rem;
}

.faq-list {
  display: grid;
  gap: 1rem;
}

.faq-list details {
  padding: 1.3rem 1.4rem;
}

.faq-list summary {
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list details p {
  margin-top: 0.85rem;
  max-width: 68ch;
}

.footer {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem 2rem;
  align-items: start;
  margin-top: 4rem;
  padding: 2rem 0 1rem;
  border-top: 1px solid var(--line);
}

.footer-title {
  font-size: 1.3rem;
  color: var(--ink);
}

.footer-copy,
.footer-meta {
  max-width: 60ch;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.footer-links a {
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

@media (max-width: 1024px) {
  .hero,
  .split-grid,
  .card-grid,
  .value-grid,
  .guide-grid,
  .footer {
    grid-template-columns: 1fr;
  }

  .hero-facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(var(--page-width), calc(100% - 1rem));
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-copy,
  .hero-visual,
  .prose-card,
  .format-card,
  .value-card,
  .code-card,
  .note-card,
  .faq-list details {
    padding: 1.25rem;
  }

  h1 {
    max-width: 11ch;
    font-size: clamp(2.6rem, 11vw, 4rem);
  }

  h2 {
    max-width: none;
    font-size: clamp(1.9rem, 8vw, 2.8rem);
  }

  .button,
  .copy-button,
  .nav a {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }

  .code-card-head {
    flex-direction: column;
  }
}

