/* ==========================================================================
   Iowa Native Plants — clean static rebuild
   Design system + shared styles
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --green-900: #1c3a2a;
  --green-800: #244832;
  --green-700: #2f5d3f;
  --green-600: #3a7150;
  --green-500: #4f9268;
  --gold:      #e3a72f;
  --gold-soft: #f4d79a;
  --purple:    #7d5aa6;
  --cream:     #f7f5ee;
  --cream-2:   #efeadd;
  --ink:       #232a20;
  --muted:     #5d6a55;
  --line:      #ddd8c8;
  --white:     #ffffff;

  --maxw: 1120px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(28, 58, 42, .07);
  --shadow-md: 0 10px 30px rgba(28, 58, 42, .12);
  --shadow-lg: 0 20px 50px rgba(28, 58, 42, .18);

  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--green-700); text-decoration-color: rgba(47, 93, 63, .35); text-underline-offset: 3px; }
a:hover { color: var(--green-600); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  color: var(--green-900);
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1.1em; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }

.section { padding: 76px 0; }
.section--tight { padding: 52px 0; }
.section--cream2 { background: var(--cream-2); }
.section--green {
  background: linear-gradient(160deg, var(--green-800), var(--green-700));
  color: #eaf2ea;
}
.section--green h2, .section--green h3 { color: #fff; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 .8em;
}
.section--green .eyebrow { color: var(--gold-soft); }

.lead { font-size: 1.18rem; color: var(--muted); max-width: 60ch; }
.section--green .lead { color: #d6e4d6; }

.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: .85em 1.5em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--gold); color: #3a2c08; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: #efb648; color: #3a2c08; box-shadow: var(--shadow-md); }
.btn--green { background: var(--green-700); color: #fff; }
.btn--green:hover { background: var(--green-600); color: #fff; }
.btn--ghost { background: transparent; color: var(--green-800); border-color: var(--green-700); }
.btn--ghost:hover { background: var(--green-700); color: #fff; }
.section--green .btn--ghost { color: #fff; border-color: rgba(255,255,255,.6); }
.section--green .btn--ghost:hover { background: #fff; color: var(--green-800); }
.btn--sm { padding: .6em 1.1em; font-size: .92rem; }

.arrow::after { content: "\2192"; transition: transform .2s ease; }
.btn:hover .arrow::after, a.arrow:hover::after { transform: translateX(3px); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 245, 238, .92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 70px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 26px; width: auto; }
.brand__leaf {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  background: var(--green-700); color: #fff;
  border-radius: 10px; font-size: 18px;
}
.brand__name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.12rem;
  color: var(--green-900);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-block;
  padding: .5em .8em;
  border-radius: 8px;
  color: var(--green-900);
  font-weight: 500;
  text-decoration: none;
  font-size: .98rem;
}
.nav-links a:hover { background: var(--cream-2); }
.nav-links a.active { color: var(--green-600); font-weight: 700; }
.nav-links a.is-external::after { content: "\2197"; font-size: .8em; opacity: .55; margin-left: 2px; }

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  padding: 8px; border-radius: 8px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--green-900); margin: 5px 0; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 76vh;
  display: flex;
  align-items: center;
  color: #fff;
  isolation: isolate;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  background-size: cover; background-position: center;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, rgba(20,42,28,.82) 0%, rgba(20,42,28,.5) 48%, rgba(20,42,28,.18) 100%);
}
.hero__inner { padding: 90px 0; max-width: 820px; }
.hero h1 {
  color: #fff;
  font-size: clamp(2.8rem, 7.5vw, 5.25rem);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.025em;
  text-shadow: 0 3px 26px rgba(0,0,0,.38);
  margin-bottom: .35em;
}
.hero p { font-size: 1.25rem; color: #eaf2ea; max-width: 48ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

/* page hero (interior pages) */
.page-hero {
  position: relative; color: #fff; isolation: isolate;
  padding: clamp(64px, 12vw, 120px) 0 clamp(48px, 8vw, 84px);
}
.page-hero__bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; }
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, rgba(20,42,28,.85), rgba(20,42,28,.55));
}
.page-hero h1 { color: #fff; }
.page-hero p { color: #e7efe7; max-width: 56ch; font-size: 1.15rem; margin-bottom: 0; }

/* ---------- Benefit strip ---------- */
.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.benefit { text-align: center; }
.benefit__icon {
  width: 78px; height: 78px; margin: 0 auto 16px;
  display: grid; place-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}
.benefit__icon img {
  width: 42px; height: 42px; object-fit: contain;
  /* recolor black source icons to brand green */
  filter: invert(28%) sepia(18%) saturate(900%) hue-rotate(89deg) brightness(94%) contrast(88%);
}
.benefit h3 { font-size: 1.08rem; margin-bottom: 0; color: var(--green-800); }

/* ---------- Feature cards (alternating media) ---------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.feature + .feature { margin-top: 72px; }
.feature--reverse .feature__media { order: 2; }
.feature__media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.feature__body h2 { margin-bottom: .35em; }

/* ---------- Generic card grid ---------- */
.cards { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
@media (min-width: 720px) { .cards--2col { grid-template-columns: repeat(2, 1fr); } }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card h3 { color: var(--green-800); }
.card p { color: var(--muted); }
.card .btn { margin-top: auto; align-self: flex-start; }

/* link-list cards (resources) */
.linkcard { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow-sm); }
.linkcard h3 { color: var(--green-800); margin-bottom: .6em; }
.linklist { list-style: none; margin: 0; padding: 0; }
.linklist li { border-top: 1px solid var(--line); }
.linklist li:first-child { border-top: 0; }
.linklist a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: .8em 0; text-decoration: none; color: var(--green-900); font-weight: 500;
}
.linklist a:hover { color: var(--green-600); }
.linklist a::after { content: "\2192"; color: var(--gold); transition: transform .2s ease; }
.linklist a:hover::after { transform: translateX(4px); }

/* guide link cards (resources) */
.guidecard {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex; flex-direction: column;
  text-decoration: none;
}
.guidecard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.guidecard__label {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: .7em;
}
.guidecard h3 { color: var(--green-800); margin-bottom: .5em; line-height: 1.3; }
.guidecard p { color: var(--muted); font-size: .97rem; margin-bottom: 1.2em; }
.guidecard__cta { margin-top: auto; color: var(--green-700); font-weight: 600; font-size: .95rem; }
.guidecard:hover .guidecard__cta { color: var(--green-600); }

/* ---------- Book layout ---------- */
.book {
  display: grid; grid-template-columns: 220px 1fr; gap: 34px; align-items: start;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm);
}
.book + .book { margin-top: 30px; }
.book__cover img {
  width: 100%; border-radius: 8px;
  box-shadow: 0 14px 30px rgba(28,58,42,.22);
}
.book__body h3 { font-size: 1.6rem; margin-bottom: .15em; }
.book__author { color: var(--gold); font-weight: 700; letter-spacing: .02em; margin-bottom: .2em; }
.book__sub { font-style: italic; color: var(--muted); margin-bottom: 1em; }

/* highlighted single book (finder) */
.book--feature { background: var(--cream-2); }

/* ---------- Quote / callout ---------- */
.callout {
  border-left: 5px solid var(--gold);
  background: var(--white);
  padding: 26px 30px;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm);
  font-size: 1.18rem;
}
.callout cite { display: block; margin-top: .6em; font-size: .92rem; color: var(--muted); font-style: normal; }

/* ---------- Video embeds ---------- */
.videos { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.video__frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-md); background: #000;
}
.video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video h3 { margin-top: .7em; margin-bottom: .2em; }
.video p { color: var(--muted); margin-bottom: 0; }

/* ---------- Poem ---------- */
.poem-layout {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.poem { text-align: left; }
.poem__intro { color: var(--muted); margin-bottom: 4px; }
.poem__byline { color: var(--muted); font-style: italic; margin-bottom: 36px; }
.poem .stanza {
  font-family: var(--font-head); font-weight: 500;
  font-size: 1.3rem; line-height: 1.9; color: var(--green-900);
  margin: 0 0 1.9em;
}
.poem .stanza:last-child { margin-bottom: 0; }
.poem .indent { display: inline-block; padding-left: 1.8em; }

.poem-figure { margin: 0; position: sticky; top: 96px; }
.poem-figure img {
  width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.poem-figure figcaption { margin-top: 12px; font-size: .9rem; color: var(--muted); text-align: center; }

@media (max-width: 920px) {
  .poem-layout { grid-template-columns: 1fr; gap: 36px; }
  .poem-figure { position: static; }
  .poem .stanza { font-size: 1.05rem; }
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: start; }
.form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: var(--green-800); }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: .7em .85em; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--cream); transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus {
  outline: 0; border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(79,146,104,.18); background: #fff;
}
.field textarea { min-height: 140px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__note { font-size: .9rem; color: var(--muted); margin-top: 14px; }
.form-status { margin-top: 14px; font-weight: 600; }
.form-status.ok { color: var(--green-600); }
.form-status.err { color: #b1452f; }

.contact-aside .infobox { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow-sm); margin-bottom: 22px; }
.infobox h3 { color: var(--green-800); margin-bottom: .4em; }
.bigmail { font-size: 1.2rem; font-weight: 600; }

/* ---------- Land acknowledgment band ---------- */
.land { text-align: center; }
.land p { max-width: 70ch; margin-inline: auto; color: #d8e5d8; font-size: 1.1rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-900);
  color: #cdd9cc;
  padding: 56px 0 30px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: .82rem; text-transform: uppercase; letter-spacing: .14em; margin: 0 0 1em; }
.footer-nav { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: .55em; }
.site-footer a { color: #cdd9cc; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand .brand__leaf { background: var(--green-600); }
.footer-brand strong { color: #fff; font-family: var(--font-head); font-size: 1.15rem; font-weight: 600; }
.memorial { font-style: italic; color: #aebfac; max-width: 40ch; }
.footer-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between;
  font-size: .9rem; color: #9fb29d;
}

/* ---------- Utilities ---------- */
.stack-sm > * + * { margin-top: 12px; }
.mt-2 { margin-top: 28px; }
.maxw-prose { max-width: 70ch; }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--green-800); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 920px) {
  .benefits { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .feature, .feature--reverse { grid-template-columns: 1fr; }
  .feature--reverse .feature__media { order: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 12px 18px 18px;
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8em .6em; border-radius: 8px; }
  .section { padding: 56px 0; }
  .book { grid-template-columns: 1fr; gap: 22px; }
  .book__cover { max-width: 200px; margin-inline: auto; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero { min-height: 0; }
  .hero__inner { padding: 64px 20px; }
}
