:root {
  --ink: #14241f;
  --ink-soft: #3d534b;
  --paper: #f3f6f1;
  --paper-2: #e4ece6;
  --white: #f8faf7;
  --river: #2a5f74;
  --river-deep: #1d4556;
  --moss: #3f6b4e;
  --moss-deep: #2d4d39;
  --foam: #d7e8e3;
  --gold: #a8894f;
  --gold-deep: #7d6640;
  --gold-line: rgba(61, 107, 78, 0.35);
  --charcoal: #1c2a26;
  --shadow: 0 14px 40px rgba(20, 36, 31, 0.10);
  --radius: 4px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Libre Franklin", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --wrap: min(1100px, calc(100% - 40px));
  /* aliases for older class names */
  --water: var(--river);
  --water-soft: #3d7a8f;
  --felt: var(--moss);
  --felt-deep: var(--moss-deep);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
}

h1, h2, h3, h4, .logo, .display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}

a {
  color: var(--river);
}

a:hover {
  color: var(--moss-deep);
}

.wrap {
  width: var(--wrap);
  margin: 0 auto;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 8px;
  top: 8px;
  background: var(--white);
  padding: 8px 12px;
  z-index: 40;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(248, 250, 247, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gold-line);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.2rem;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--gold-line);
}

.pip {
  display: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
  align-items: center;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 11px;
  border-bottom: 1px solid transparent;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--moss-deep);
  border-bottom-color: var(--moss);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--gold-line);
  background: transparent;
  color: var(--ink);
  padding: 8px 12px;
  font: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius);
}

/* Hero */
.hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--gold-line);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(42, 95, 116, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, transparent 55%, rgba(63, 107, 78, 0.06) 100%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
  position: relative;
}

.hero-media {
  margin: 0;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow);
  background: var(--foam);
  aspect-ratio: 16 / 10;
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-aside {
  border-left: 1px solid var(--gold-line);
  padding: 8px 0 8px 28px;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.35;
  font-style: italic;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--moss-deep);
  font-weight: 600;
  margin: 0 0 14px;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.08;
  margin: 0 0 18px;
}

.lede {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 38rem;
  margin: 0;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 10px;
}

/* Bands & sections */
.band {
  padding: 56px 0;
}

.band + .band {
  border-top: 1px solid var(--gold-line);
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin: 0 0 8px;
}

.section-lead {
  color: var(--ink-soft);
  max-width: 40rem;
  margin: 0 0 28px;
}

/* Buttons */
.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 11px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
}

.btn.primary {
  background: var(--moss);
  color: var(--white);
}

.btn.primary:hover {
  background: var(--moss-deep);
  color: var(--white);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--gold-line);
}

.btn.ghost:hover {
  color: var(--river-deep);
  box-shadow: inset 0 0 0 1px var(--river);
}

/* Cards */
.card,
.panel {
  background: var(--white);
  border: 1px solid var(--gold-line);
  padding: 20px 22px;
  border-radius: var(--radius);
}

.card h3 {
  margin: 6px 0 8px;
  font-size: 1.35rem;
}

.meta {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--moss-deep);
  font-weight: 600;
}

.muted {
  color: var(--ink-soft);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

/* Grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.beat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.region-card {
  background: var(--white);
  border: 1px solid var(--gold-line);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.region-card:hover {
  border-color: var(--moss);
  box-shadow: var(--shadow);
  color: inherit;
}

.region-card .water-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--river), var(--moss), transparent);
  margin: 4px 0 8px;
  border-radius: 2px;
}

.region-card h3 {
  margin: 0;
  font-size: 1.5rem;
}

.region-card p {
  margin: 0;
  color: var(--ink-soft);
  flex: 1;
}

/* Conditions sample */
.conditions-card {
  background: var(--white);
  border: 1px solid var(--gold-line);
  padding: 22px;
  position: relative;
  border-radius: var(--radius);
}

.sample-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--moss-deep);
  border: 1px solid var(--gold-line);
  background: var(--foam);
  padding: 4px 9px;
  margin-bottom: 12px;
  border-radius: var(--radius);
}

.conditions-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 16px 0;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 4px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin: 0;
  color: var(--river);
}

.confidence-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 4px 8px;
  border: 1px solid var(--gold-line);
  background: var(--paper-2);
  color: var(--ink);
  border-radius: var(--radius);
}

.ethics-banner {
  border-left: 3px solid var(--moss);
  background: rgba(63, 107, 78, 0.08);
  padding: 14px 16px;
  margin: 16px 0;
  color: var(--ink);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.ethics-banner strong {
  color: var(--moss-deep);
}

/* Filters */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  align-items: center;
}

.filter-btn {
  appearance: none;
  border: 1px solid var(--gold-line);
  background: transparent;
  color: var(--ink);
  padding: 8px 14px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius);
}

.filter-btn:hover,
.filter-btn[aria-pressed="true"] {
  background: var(--river-deep);
  color: var(--white);
  border-color: var(--river-deep);
}

.beat-card {
  background: var(--white);
  border: 1px solid var(--gold-line);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-radius: var(--radius);
}

.beat-card h3 {
  margin: 4px 0;
  font-size: 1.4rem;
}

.beat-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.beat-card h3 a:hover {
  color: var(--moss-deep);
}

.gage-list {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.gage-list li {
  margin-bottom: 4px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--gold-line);
  color: var(--ink-soft);
  background: var(--paper);
  border-radius: var(--radius);
}

.tag.water {
  color: var(--river);
  border-color: rgba(42, 95, 116, 0.35);
}

.tag.ethics {
  color: var(--moss-deep);
  border-color: rgba(63, 107, 78, 0.4);
}

/* Hatch calendar */
.hatch-month {
  background: var(--white);
  border: 1px solid var(--gold-line);
  padding: 20px 22px;
  margin-bottom: 16px;
  border-radius: var(--radius);
}

.hatch-month.ethics-critical {
  border-left: 3px solid var(--moss);
}

.hatch-month h3 {
  margin: 0 0 10px;
  font-size: 1.4rem;
}

.insect-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.insect-chips li {
  font-size: 0.9rem;
  padding: 6px 12px;
  background: var(--foam);
  border: 1px solid var(--gold-line);
  color: var(--ink);
  border-radius: var(--radius);
}

/* Beat detail */
.beat-hero {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--gold-line);
}

.beat-hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 28px;
  padding: 40px 0 56px;
}

.detail-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-block h2 {
  font-size: 1.5rem;
  margin: 0 0 10px;
}

.detail-block p,
.detail-block li {
  color: var(--ink-soft);
}

.season-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.season-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--gold-line);
}

.season-list li:last-child {
  border-bottom: 0;
}

.season-list strong {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--moss-deep);
  margin-bottom: 4px;
  font-weight: 600;
}

.side-panel {
  background: var(--white);
  border: 1px solid var(--gold-line);
  padding: 20px 22px;
  position: sticky;
  top: 88px;
  align-self: start;
  border-radius: var(--radius);
}

.side-panel h3 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

.side-panel dl {
  margin: 0;
}

.side-panel dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--moss-deep);
  margin-top: 12px;
}

.side-panel dd {
  margin: 4px 0 0;
  color: var(--ink-soft);
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

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

.breadcrumb a:hover {
  color: var(--moss-deep);
}

/* About */
.prose {
  max-width: 42rem;
}

.prose p {
  color: var(--ink-soft);
}

.prose ul {
  color: var(--ink-soft);
}

.scope-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 28px;
}

.scope-card h3 {
  margin: 0 0 10px;
  font-size: 1.3rem;
}

.scope-card ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}

.scope-card.out {
  background: var(--paper-2);
}

/* Footer */
footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--gold-line);
  color: var(--ink-soft);
  font-size: 0.92rem;
}

footer .foot-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

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

footer a:hover {
  color: var(--moss-deep);
}

.water-accent {
  height: 2px;
  background: linear-gradient(90deg, var(--river), var(--moss), transparent);
  margin: 0 0 24px;
  border-radius: 2px;
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--river);
  outline-offset: 2px;
}

/* Learn media */
.learn-media {
  margin: 0 0 28px;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow);
  background: var(--foam);
  max-height: 320px;
}

.learn-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: cover;
  object-position: center;
}

.learn-media.tall {
  max-height: 380px;
}

.learn-media.tall img {
  max-height: 380px;
  object-position: center 30%;
}

/* Mobile */
@media (max-width: 900px) {
  .hero-grid,
  .card-grid,
  .card-grid-2,
  .beat-grid,
  .detail-grid,
  .scope-grid,
  .conditions-row {
    grid-template-columns: 1fr;
  }

  .hero-aside {
    border-left: 0;
    border-top: 1px solid var(--gold-line);
    padding: 22px 0 0;
  }

  .nav-toggle {
    display: inline-block;
  }

  nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  nav.open {
    display: flex;
  }

  .bar {
    flex-wrap: wrap;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .hero {
    padding: 40px 0 32px;
  }

  .logo-mark {
    width: 32px;
    height: 32px;
  }
}

/* Nav dropdown (Learn) */
.nav-item.has-sub {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.nav-sub {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--gold-line);
  padding: 8px 0;
  z-index: 40;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.nav-item.has-sub:hover .nav-sub,
.nav-item.has-sub:focus-within .nav-sub,
.nav-item.has-sub.open .nav-sub {
  display: block;
}

.nav-sub a {
  display: block;
  padding: 8px 14px;
  border-bottom: 0;
  font-size: 0.72rem;
  white-space: nowrap;
}

.nav-sub a:hover,
.nav-sub a[aria-current="page"] {
  color: var(--moss-deep);
  background: var(--paper);
}

/* Learn long-form */
.learn-article {
  padding: 48px 0 64px;
}

.learn-article .wrap {
  max-width: min(760px, calc(100% - 40px));
}

.learn-article h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.learn-article h2 {
  margin-top: 2.4rem;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
}

.learn-article h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.learn-article p {
  color: var(--ink-soft);
}

.learn-article .lede {
  color: var(--ink-soft);
  font-size: 1.12rem;
  max-width: none;
}

.learn-list {
  color: var(--ink-soft);
  padding-left: 1.25rem;
}

.learn-list li {
  margin-bottom: 0.55rem;
}

.source-note {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--gold-line);
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.learn-article .cta-row {
  margin-top: 28px;
}

@media (max-width: 900px) {
  .nav-item.has-sub {
    width: 100%;
  }
  .nav-sub {
    position: static;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0 0 0 12px;
    display: none;
  }
  .nav-item.has-sub.open .nav-sub {
    display: block;
  }
  .nav-sub a {
    padding: 6px 11px;
  }
}
