/* Growing at Home: one stylesheet for the whole site */

:root {
  --paper: #f6f1e7;
  --paper-2: #ede5d4;
  --card: #fbf8f2;
  --ink: #1f2a22;
  --ink-soft: #4a5449;
  --leaf: #24412f;
  --leaf-2: #3d6b4b;
  --sage: #a9bfa2;
  --marigold: #d58a22;
  --marigold-soft: #f3dcb4;
  --plum: #7b3a52;
  --plum-soft: #ead2d9;
  --soil: #6b4f3a;
  --line: #d8cdb8;
  --radius: 6px;
  --wrap: 1120px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
}

img, svg { max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--leaf);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
a { color: var(--leaf-2); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--plum); }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 2px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 44rem; }

.skip {
  position: absolute; left: -999px; top: .5rem;
  background: var(--leaf); color: #fff; padding: .5rem 1rem; z-index: 10;
}
.skip:focus { left: .5rem; }

.eyebrow {
  font: 600 .78rem/1.2 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--soil);
  margin-bottom: .9rem;
}

.lede { font-size: 1.22rem; color: var(--ink-soft); max-width: 40rem; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky; top: 0; z-index: 5;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font: 600 1.25rem/1 var(--serif); color: var(--leaf); text-decoration: none;
}
.brand-mark { width: 2rem; height: 2rem; fill: none; stroke: var(--leaf-2); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.4rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: .95rem; padding: .3rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--leaf-2); }
.site-nav a[aria-current="page"] { border-color: var(--marigold); color: var(--leaf); }
.nav-toggle {
  display: none; font: 600 .9rem var(--sans); background: none; color: var(--leaf);
  border: 1px solid var(--line); border-radius: var(--radius); padding: .45rem .8rem; cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: .5rem 1.25rem 1rem; }
  .site-nav a { display: block; padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { border-color: var(--line); color: var(--plum); }
}

/* Sections */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-alt { background: var(--paper-2); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-head p { max-width: 34rem; margin: 0; color: var(--ink-soft); }

/* Home hero */
.hero { padding: clamp(3rem, 7vw, 5rem) 0 clamp(2.5rem, 6vw, 4rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { max-width: 16ch; }
.hero-art { width: 100%; height: auto; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }
@media (max-width: 760px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { max-width: 340px; } }

.btn {
  display: inline-block; font: 600 .95rem/1 var(--sans); text-decoration: none;
  padding: .85rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--leaf);
  background: var(--leaf); color: #fff;
}
.btn:hover { background: var(--leaf-2); border-color: var(--leaf-2); color: #fff; }
.btn-quiet { background: transparent; color: var(--leaf); }
.btn-quiet:hover { background: var(--card); color: var(--leaf); }

/* This month strip */
.now {
  background: var(--leaf); color: #eef2ea;
  padding: 1.6rem 0;
}
.now-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem 2.5rem; align-items: center; }
.now h2 { color: #fff; margin: 0; font-size: 1.5rem; }
.now p { margin: 0; color: #cfdac9; }
.now a { color: #fff; }
.now .chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.now .chip { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); color: #fff; }
@media (max-width: 860px) { .now-inner { grid-template-columns: 1fr; } }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; display: flex; flex-direction: column;
}
.card h3 { margin-bottom: .35rem; }
.card p { color: var(--ink-soft); font-size: .98rem; }
.card .more { margin-top: auto; font-weight: 600; font-size: .95rem; }
.card-icon { width: 2.6rem; height: 2.6rem; margin-bottom: 1rem; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-food .card-icon { stroke: var(--leaf-2); }
.card-flower .card-icon { stroke: var(--plum); }
.card-soil .card-icon { stroke: var(--soil); }
.card-cal .card-icon { stroke: var(--marigold); }

/* Principles list */
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem 2.5rem; counter-reset: p; list-style: none; padding: 0; margin: 0; }
.principles li { counter-increment: p; padding-top: 1rem; border-top: 2px solid var(--leaf); }
.principles li::before { content: counter(p, decimal-leading-zero); display: block; font: 600 .8rem var(--sans); color: #8a5200; letter-spacing: .1em; margin-bottom: .4rem; }
.principles h3 { font-size: 1.15rem; }
.principles p { color: var(--ink-soft); font-size: .98rem; margin: 0; }

/* Page header */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 2.5rem); border-bottom: 1px solid var(--line); }
.page-head h1 { max-width: 18ch; }

/* In-page index */
.toc { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.5rem; padding: 0; list-style: none; }
.chip {
  display: inline-block; font-size: .88rem; line-height: 1; padding: .5rem .75rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  color: var(--ink); text-decoration: none;
}
a.chip:hover { border-color: var(--leaf-2); color: var(--leaf); }

/* Crop guides */
.guide-group { margin-bottom: 3.5rem; }
.guide-group > h2 { padding-bottom: .5rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.guide-group > p { max-width: 44rem; color: var(--ink-soft); }
.guides { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 1.25rem; }
.guide {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--leaf-2);
  border-radius: var(--radius); padding: 1.35rem 1.5rem; scroll-margin-top: 5.5rem;
}
.page-flowers .guide { border-left-color: var(--plum); }
.guide h3 { margin-bottom: .1rem; }
.guide .latin { font-style: italic; color: var(--ink-soft); font-size: .92rem; margin-bottom: .9rem; }
.guide dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0 0 .9rem; font-size: .95rem; }
.guide dt { font-weight: 600; color: var(--soil); }
.guide dd { margin: 0; }
.guide .tip { font-size: .95rem; margin: 0; padding-top: .8rem; border-top: 1px dashed var(--line); color: var(--ink-soft); }
.guide .tip strong { color: var(--ink); }

/* Prose pages */
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 1.8rem; }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: .4rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3.5rem; align-items: start; }
.aside {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; position: sticky; top: 5.5rem; font-size: .96rem;
}
.aside h3 { font-size: 1.1rem; margin-top: 0; }
.aside ul { padding-left: 1.1rem; margin: 0; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } .aside { position: static; } }

.note {
  background: var(--marigold-soft); border-radius: var(--radius); padding: 1rem 1.2rem;
  font-size: .96rem; margin: 1.5rem 0;
}

/* Planting calendar */
.cal-controls { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: end; margin-bottom: 2rem; }
.cal-controls fieldset { border: 0; padding: 0; margin: 0; }
.cal-controls legend, .cal-controls label { font: 600 .8rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--soil); display: block; margin-bottom: .55rem; }
.seg { display: inline-flex; border: 1px solid var(--leaf); border-radius: var(--radius); overflow: hidden; flex-wrap: wrap; }
.seg button {
  font: 500 .95rem var(--sans); background: var(--card); color: var(--leaf);
  border: 0; border-right: 1px solid var(--leaf); padding: .65rem 1rem; cursor: pointer;
}
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--leaf); color: #fff; }
select {
  font: 500 .95rem var(--sans); color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem 2rem .6rem .8rem;
}
.zone-note { color: var(--ink-soft); font-size: .95rem; max-width: 46rem; margin-bottom: 2rem; }

.now-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 3.5rem; }
@media (max-width: 760px) { .now-lists { grid-template-columns: 1fr; } }
.now-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.now-list h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.now-list h3 span { font: 500 .85rem var(--sans); color: var(--ink-soft); }
.now-list ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.now-list .chip { background: var(--paper); }
.now-list.food .chip { border-color: var(--sage); }
.now-list.flowers .chip { border-color: var(--plum-soft); }
.now-list .empty { color: var(--ink-soft); font-size: .95rem; }

.year-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.year { border-collapse: collapse; width: 100%; min-width: 760px; font-size: .9rem; }
.year th, .year td { padding: .45rem .3rem; text-align: center; border-bottom: 1px solid var(--paper-2); }
.year thead th { font: 600 .78rem var(--sans); color: var(--soil); letter-spacing: .05em; background: var(--card); position: sticky; top: 0; }
.year thead th.is-now { color: var(--plum); }
.year tbody th { text-align: left; font-weight: 500; padding-left: 1rem; white-space: nowrap; }
.year tr.group th { background: var(--paper-2); font: 600 .78rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--soil); padding-top: .7rem; }
.year td.on .bar { display: block; height: .8rem; border-radius: 3px; background: var(--leaf-2); }
.year tr.flower td.on .bar { background: var(--plum); }
.year td.is-now { background: rgba(213, 138, 34, .12); }
.legend { display: flex; gap: 1.5rem; font-size: .88rem; color: var(--ink-soft); margin: .9rem 0 0; flex-wrap: wrap; }
.legend i { display: inline-block; width: 1.4rem; height: .7rem; border-radius: 3px; margin-right: .4rem; vertical-align: middle; }

/* Footer */
.site-footer { background: var(--ink); color: #c9cfc4; padding: 3rem 0 2rem; font-size: .93rem; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem 3rem; }
.footer-brand { font: 600 1.2rem var(--serif); color: #fff; margin-bottom: .5rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; columns: 2; }
.site-footer li { margin-bottom: .4rem; }
.site-footer a { color: #e6ebe1; text-decoration: none; }
.site-footer a:hover { color: var(--marigold-soft); text-decoration: underline; }
.footer-note { grid-column: 1 / -1; border-top: 1px solid #39443b; padding-top: 1.2rem; margin: .5rem 0 0; color: #9aa395; font-size: .85rem; }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }

@media print {
  .site-header, .site-footer, .cal-controls, .nav-toggle { display: none; }
  body { background: #fff; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.spaced { margin-top: 3rem; }
.key-food { background: var(--leaf-2); }
.key-flower { background: var(--plum); }
a.card { text-decoration: none; color: inherit; }
a.card:hover { border-color: var(--leaf-2); }
a.card:hover .more { text-decoration: underline; }
.now .chips { list-style: none; padding: 0; margin: 0; }
.now .seg { border-color: rgba(255,255,255,.45); }
.now .seg button { background: transparent; color: #eef2ea; border-right-color: rgba(255,255,255,.45); }
.now .seg button[aria-pressed="true"] { background: var(--marigold-soft); color: var(--ink); }
.year thead th:first-child { text-align: left; padding-left: 1rem; }

/* Photos */
.hero-photo { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); display: block; }
@media (max-width: 760px) { .hero-photo { aspect-ratio: 16 / 10; } }
.page-photo { margin: 2rem auto 0; }
.page-photo img { width: 100%; height: auto; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--radius); display: block; }
@media (max-width: 760px) { .page-photo img { aspect-ratio: 16 / 10; } }

/* Newsletter band */
.signup { background: var(--paper-2); border-top: 1px solid var(--line); padding: 3rem 0; }
.signup-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 1.5rem 3rem; align-items: end; }
.signup h2 { margin-bottom: .4rem; }
.signup p { color: var(--ink-soft); margin: 0; max-width: 32rem; }
.signup-form { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: .8rem; align-items: end; }
.field label { display: block; font: 600 .8rem var(--sans); color: var(--soil); margin-bottom: .35rem; }
.field label span { font-weight: 400; color: var(--ink-soft); }
.field input { width: 100%; font: 400 1rem var(--sans); padding: .75rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); }
.field input:focus { border-color: var(--leaf-2); }
.signup .btn { cursor: pointer; padding: .85rem 1.3rem; }
@media (max-width: 860px) { .signup-inner { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .signup-form { grid-template-columns: 1fr; } }
.footer-note a { color: #c9cfc4; text-decoration: underline; }
