:root {
  color-scheme: light;
  --paper: #f5f1e7;
  --ink: #232b20;
  --muted: #505947;
  --line: #c7c9b6;
  --green: #334637;
  --serif: "PT Serif", Georgia, serif;
  --sans: "Inter", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--sans); }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .22em; }
a:focus-visible, button:focus-visible { outline: 2px solid #9c4d2a; outline-offset: 4px; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.05; }
p { margin: 0; }
figure { margin: 0; }
img { display: block; width: 100%; height: auto; object-fit: cover; }
figcaption { margin-top: .6rem; color: var(--muted); font-size: .78rem; }

.wrap { width: min(100% - 3rem, 76rem); margin-inline: auto; }
.skip { position: absolute; top: .5rem; left: .5rem; z-index: 1; padding: .5rem; background: white; transform: translateY(-150%); }
.skip:focus { transform: none; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.15rem; border-bottom: 1px solid var(--line); }
.brand { font: 1.55rem/1.2 var(--serif); text-decoration: none; white-space: nowrap; }
nav { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; }
nav a { font-size: .9rem; text-decoration: none; }
nav a:hover { text-decoration: underline; }

.hero { display: grid; grid-template-columns: .9fr 1.2fr; gap: clamp(1.5rem, 5vw, 5rem); align-items: center; padding-block: clamp(2.5rem, 6vw, 5.75rem); }
.hero-copy { padding-bottom: 1rem; }
.hero h1 { font-size: clamp(3.05rem, 6.4vw, 6.35rem); letter-spacing: -.065em; margin-block: .95rem 1.2rem; }
.hero p:not(.eyebrow) { max-width: 34ch; color: var(--muted); }
.hero img { aspect-ratio: 5 / 4; }
.eyebrow { font-size: .75rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.button { display: inline-flex; gap: 1.3rem; align-items: center; margin-top: 1.7rem; padding: .75rem 1rem; color: white; background: var(--green); text-decoration: none; }
.button:hover { background: #475b43; }

.section { padding-block: clamp(2.75rem, 6vw, 5rem); }
.section-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1rem 2rem; align-items: end; margin-bottom: 2.25rem; }
.section-head p { max-width: 48ch; color: var(--muted); }
h2 { font-size: clamp(2.3rem, 4.5vw, 4.25rem); letter-spacing: -.045em; }
h3 { font-size: clamp(1.6rem, 2.4vw, 2.2rem); letter-spacing: -.025em; }
.botany-grid, .variety-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.botany-grid img { aspect-ratio: 4 / 3; margin-bottom: 1.1rem; }
article h3 { margin-block: .5rem .6rem; }
.latin { color: var(--muted); margin-bottom: .7rem; }
.cultivar-section { background: #e6e9da; }
.feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.5rem 3rem; align-items: center; margin-bottom: 2.5rem; }
.feature img { aspect-ratio: 16 / 9; }
.feature h3 { margin-block: .6rem .85rem; }
.feature p { max-width: 42ch; }
.filters { margin: 0 0 1.2rem; padding: 0; border: 0; }
.filters legend { margin-bottom: .5rem; font-size: .88rem; }
.filters div { display: flex; flex-wrap: wrap; gap: .5rem; }
.filters button { border: 1px solid var(--green); padding: .48rem .8rem; background: transparent; color: var(--green); font: inherit; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--green); color: white; }
.variety-grid article { border-top: 1px solid #a5ad99; padding-block: 1rem; }
.sources h2 { margin-bottom: 1rem; font-size: clamp(2rem, 4vw, 3rem); }
.sources ul { padding-inline-start: 1.25rem; margin-bottom: 1.75rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 57rem) {
  .botany-grid, .variety-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 40rem) {
  .wrap { width: calc(100% - 2rem); }
  .hero, .section-head, .feature, .botany-grid { grid-template-columns: 1fr; }
  .masthead { flex-wrap: wrap; }
  .botany-grid { gap: 2rem; }
  .hero-copy { padding-bottom: 0; }
}

@media (max-width: 26rem) {
  .variety-grid { grid-template-columns: 1fr; }
}

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