/* Design tokens — Medium editorial system */
:root {
  --md-accent: #1A8917;
  --md-accent-hover: #156D12;
  --md-accent-soft: #E8F3E8;
  --md-ink: #191919;
  --md-text: #242424;
  --md-muted: #6B6B6B;
  --md-muted-soft: #757575;
  --md-canvas: #F7F4ED;
  --md-canvas-alt: #FFFFFF;
  --md-surface: #FFFFFF;
  --md-surface-warm: #F2EFE6;
  --md-border: #E6E6E6;
  --md-border-strong: #CFCFCF;
  --md-hero-green: #34AC45;
  --md-hero-moss: #48704B;
  --md-on-accent: #FFFFFF;
  --md-on-dark: #FFFFFF;
  --md-serif: "GT Super", Georgia, Cambria, "Times New Roman", serif;
  --md-sans: "Sohne", "Helvetica Neue", Arial, sans-serif;
  --md-radius-pill: 9999px;
  --md-radius-lg: 14px;
  --md-section: 84px;
  --md-hero: 112px;
  --md-nav-height: 75px;
  --md-max-width: 1192px;
  --md-content-width: 680px;
  --md-transition: 150ms ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--md-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--md-text);
  background-color: var(--md-canvas);
  -webkit-font-smoothing: antialiased;
}

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

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--md-accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--md-ink);
  color: var(--md-on-dark);
  border-radius: var(--md-radius-pill);
  font-size: 14px;
}

.skip-link:focus {
  top: 16px;
}

/* Shell */
.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--md-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: var(--md-content-width);
}

/* Top navigation */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--md-nav-height);
  background-color: var(--md-canvas);
  border-bottom: 1px solid var(--md-border);
}

.top-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.wordmark {
  font-family: var(--md-serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--md-ink);
  letter-spacing: -0.02em;
}

.wordmark span {
  color: var(--md-accent);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 14px;
  color: var(--md-text);
  transition: color var(--md-transition);
}

.nav-links a:hover {
  color: var(--md-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--md-ink);
  transition: transform var(--md-transition), opacity var(--md-transition);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: var(--md-nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background: var(--md-canvas);
  padding: 32px 24px;
  overflow-y: auto;
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav__list {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
}

.mobile-nav__list li {
  border-bottom: 1px solid var(--md-border);
}

.mobile-nav__list a {
  display: block;
  padding: 16px 0;
  font-size: 18px;
  color: var(--md-text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--md-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  border: none;
  border-radius: var(--md-radius-pill);
  cursor: pointer;
  transition: background-color var(--md-transition), color var(--md-transition);
  white-space: nowrap;
}

.btn--primary {
  height: 40px;
  padding: 11px 20px;
  background-color: var(--md-ink);
  color: var(--md-on-dark);
}

.btn--primary:hover {
  background-color: #333333;
}

.btn--green {
  height: 36px;
  padding: 9px 16px;
  background-color: var(--md-accent);
  color: var(--md-on-accent);
}

.btn--green:hover {
  background-color: var(--md-accent-hover);
}

.btn--secondary {
  height: 38px;
  padding: 10px 18px;
  background-color: var(--md-surface);
  color: var(--md-ink);
  border: 1px solid var(--md-border-strong);
}

.btn--secondary:hover {
  background-color: var(--md-surface-warm);
}

.btn--large {
  height: 44px;
  padding: 12px 24px;
  font-size: 15px;
}

.btn--ghost {
  height: 36px;
  padding: 9px 14px;
  background: transparent;
  color: var(--md-text);
}

.btn--ghost:hover {
  color: var(--md-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Hero */
.hero {
  padding: var(--md-section) 0;
  border-bottom: 1px solid var(--md-border);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

.hero__content {
  max-width: 560px;
}

.hero__eyebrow {
  font-size: 13px;
  color: var(--md-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 16px;
}

.hero__title {
  font-family: var(--md-serif);
  font-size: clamp(48px, 10vw, 106px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.055em;
  color: var(--md-ink);
  margin: 0 0 24px;
}

.hero__title em {
  font-style: normal;
  color: var(--md-accent);
}

.hero__subtitle {
  font-size: clamp(18px, 3vw, 22px);
  line-height: 1.32;
  letter-spacing: -0.012em;
  color: var(--md-text);
  margin: 0 0 32px;
  max-width: 430px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero__art {
  display: flex;
  justify-content: center;
}

.hero__art img {
  width: 100%;
  max-width: 520px;
  border-radius: var(--md-radius-lg);
}

/* Section base */
.section {
  padding: var(--md-section) 0;
}

.section--bordered {
  border-bottom: 1px solid var(--md-border);
}

.section__header {
  margin-bottom: 48px;
}

.section__title {
  font-family: var(--md-serif);
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--md-ink);
  margin: 0 0 16px;
}

.section__lead {
  font-size: 18px;
  line-height: 1.45;
  color: var(--md-muted);
  margin: 0;
  max-width: 560px;
}

/* Story rows */
.story-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.story-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--md-border);
}

.story-row:first-child {
  border-top: 1px solid var(--md-border);
}

.story-row__meta {
  font-size: 13px;
  color: var(--md-muted);
  margin: 0 0 8px;
}

.story-row__title {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--md-ink);
  margin: 0 0 8px;
}

.story-row__excerpt {
  font-size: 16px;
  line-height: 1.55;
  color: var(--md-text);
  margin: 0 0 12px;
}

.story-row__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.topic-pill {
  display: inline-block;
  padding: 8px 14px;
  background: var(--md-surface-warm);
  color: var(--md-text);
  font-size: 14px;
  border-radius: var(--md-radius-pill);
}

.reading-time {
  font-size: 13px;
  color: var(--md-muted);
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.feature-card {
  padding: 28px 0;
}

.feature-card__number {
  font-family: var(--md-serif);
  font-size: 32px;
  color: var(--md-accent);
  margin: 0 0 12px;
}

.feature-card__title {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--md-ink);
  margin: 0 0 8px;
}

.feature-card__text {
  font-size: 16px;
  line-height: 1.55;
  color: var(--md-muted);
  margin: 0;
}

/* Topic rail */
.topic-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 48px;
}

/* Membership callout */
.membership-callout {
  background: var(--md-ink);
  color: var(--md-on-dark);
  border-radius: var(--md-radius-lg);
  padding: 48px 32px;
  text-align: center;
}

.membership-callout__title {
  font-family: var(--md-serif);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

.membership-callout__text {
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 auto 28px;
  max-width: 480px;
}

.membership-callout .btn--green {
  height: 40px;
  padding: 11px 24px;
  font-size: 15px;
}

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding: 48px 0;
  border-top: 1px solid var(--md-border);
  border-bottom: 1px solid var(--md-border);
}

.stat-item__value {
  font-family: var(--md-serif);
  font-size: clamp(32px, 5vw, 48px);
  color: var(--md-ink);
  margin: 0 0 4px;
  letter-spacing: -0.03em;
}

.stat-item__label {
  font-size: 14px;
  color: var(--md-muted);
  margin: 0;
}

/* Editorial block */
.editorial-block {
  background: var(--md-surface);
  padding: var(--md-section) 0;
}

.editorial-block__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}

.editorial-block__quote {
  font-family: var(--md-serif);
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--md-ink);
  margin: 0;
  padding-left: 24px;
  border-left: 3px solid var(--md-accent);
}

.editorial-block__attribution {
  font-size: 14px;
  color: var(--md-muted);
  margin-top: 16px;
}

.editorial-block__body {
  font-size: 16px;
  line-height: 1.65;
  color: var(--md-text);
}

.editorial-block__body p {
  margin: 0 0 16px;
}

.editorial-block__body p:last-child {
  margin-bottom: 0;
}

/* CTA band */
.cta-band {
  background: var(--md-accent-soft);
  padding: var(--md-section) 0;
  text-align: center;
}

.cta-band__title {
  font-family: var(--md-serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--md-ink);
  margin: 0 0 12px;
}

.cta-band__text {
  font-size: 18px;
  color: var(--md-muted);
  margin: 0 auto 28px;
  max-width: 520px;
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 48px 0 32px;
  border-top: 1px solid var(--md-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-brand {
  font-family: var(--md-serif);
  font-size: 20px;
  color: var(--md-ink);
  margin: 0 0 8px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--md-muted);
  margin: 0;
  max-width: 280px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-nav a {
  font-size: 13px;
  color: var(--md-muted);
  transition: color var(--md-transition);
}

.footer-nav a:hover {
  color: var(--md-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--md-border);
}

.footer-bottom p {
  font-size: 13px;
  color: var(--md-muted-soft);
  margin: 0;
}

.footer-disclaimer {
  font-size: 12px;
  line-height: 1.5;
  color: var(--md-muted-soft);
  max-width: 720px;
}

/* Responsive */
@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-strip {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .nav-links {
    display: flex;
  }

  .hero__grid {
    grid-template-columns: 56% 44%;
    gap: 32px;
  }

  .story-row {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

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

  .editorial-block__inner {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
