/* ==========================================================================
   My Home Garden — design tokens
   Palette: deep moss, soft sage, warm soil brown, soft gold, cream, ink.
   Display face: Fraunces (organic, warm serif). Body: Karla (humanist sans).
   ========================================================================== */

:root {
  --moss: #3F5D42;
  --moss-dark: #2C4230;
  --sage: #8FA888;
  --sage-light: #DCE6D8;
  --soil: #7A5B3A;
  --soil-light: #EDE1D2;
  --gold: #E3A72E;
  --gold-light: #F6DFA1;
  --cream: #FBF7EE;
  --cream-deep: #F3ECDC;
  --ink: #2B2A20;
  --ink-soft: #55523F;
  --white: #FFFFFF;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Karla", -apple-system, "Segoe UI", sans-serif;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;

  --shadow-soft: 0 8px 24px rgba(43, 42, 32, 0.08);
  --shadow-lift: 0 16px 40px rgba(43, 42, 32, 0.14);

  --container: 1180px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 2.75rem;
  --space-5: 4.5rem;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--moss);
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--moss-dark);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }

p { margin: 0 0 1em; color: var(--ink-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soil);
  margin-bottom: 0.75em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--gold);
  display: inline-block;
  border-radius: 2px;
}

.lede {
  font-size: 1.15rem;
  max-width: 62ch;
  color: var(--ink-soft);
}

/* ---------------------------- Buttons ---------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.85em 1.7em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn-primary {
  background: var(--gold);
  color: var(--moss-dark);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  background: var(--gold-light);
}
.btn-outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}
.btn-secondary {
  background: var(--moss);
  color: var(--white);
}
.btn-secondary:hover {
  background: var(--moss-dark);
  transform: translateY(-2px);
}

/* ---------------------------- Header / Nav ---------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 247, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(63, 93, 66, 0.12);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--moss-dark);
}
.brand svg { width: 30px; height: 30px; }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.94rem;
  padding: 0.5em 0.8em;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--sage-light);
  color: var(--moss-dark);
}

.nav-toggle {
  display: none;
  background: var(--moss);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.5em 0.8em;
  font-size: 1.1rem;
  cursor: pointer;
}

/* ---------------------------- Hero ---------------------------- */

.hero {
  position: relative;
  color: var(--white);
  background: linear-gradient(180deg, rgba(20,32,22,0.35), rgba(20,32,22,0.65)), var(--moss-dark);
  overflow: hidden;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: clamp(4.5rem, 12vw, 8rem) 0 clamp(6rem, 10vw, 8rem);
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 0.35em;
}

.hero .lede {
  color: rgba(255,255,255,0.92);
  font-size: 1.25rem;
  margin: 0 auto 2em;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-wave {
  display: block;
  width: 100%;
  height: auto;
  margin-top: -2px;
}

/* ---------------------------- Page header (inner pages) ---------------------------- */

.page-header {
  background: var(--moss-dark);
  color: var(--white);
  padding: var(--space-5) 0 var(--space-4);
  text-align: center;
}
.page-header h1 { color: var(--white); }
.page-header .lede { color: rgba(255,255,255,0.88); margin: 0 auto; }

/* ---------------------------- Sections ---------------------------- */

section { padding: var(--space-5) 0; }
.section-tight { padding: var(--space-4) 0; }
.section-alt { background: var(--cream-deep); }
.section-moss {
  background: var(--moss-dark);
  color: var(--white);
}
.section-moss h2, .section-moss h3 { color: var(--white); }
.section-moss p { color: rgba(255,255,255,0.85); }
.section-moss .eyebrow { color: var(--gold-light); }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-4);
}
.section-head .lede { margin: 0 auto; }

/* ---------------------------- Leaf divider (signature element) ---------------------------- */

.leaf-divider {
  display: flex;
  justify-content: center;
  padding: var(--space-2) 0;
}
.leaf-divider svg { width: 220px; height: 28px; }

/* ---------------------------- Cards ---------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: var(--space-3);
}

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}

.card-art {
  aspect-ratio: 4 / 3;
  width: 100%;
}

.card-body {
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-body h3 { margin-bottom: 0.4em; }
.card-body p { flex: 1; }
.card-link {
  font-weight: 700;
  color: var(--moss);
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin-top: 0.5em;
}
.card-link::after { content: "→"; transition: transform 0.18s ease; }
.card-link:hover::after { transform: translateX(4px); }

/* ---------------------------- Placeholder art (botanical SVG illustrations) ---------------------------- */

.art-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.art-frame svg { width: 100%; height: 100%; display: block; }
.photo-note {
  font-size: 0.8rem;
  color: var(--ink-soft);
  opacity: 0.65;
  text-align: center;
  margin-top: 0.35em;
}

/* ---------------------------- Seasonal wheel (signature diagram) ---------------------------- */

.season-wheel-wrap {
  display: flex;
  justify-content: center;
  padding: var(--space-2) 0;
}
.season-wheel { width: min(480px, 90vw); height: auto; }

.season-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin: var(--space-3) 0;
}
.season-tab {
  padding: 0.6em 1.3em;
  border-radius: 999px;
  border: 2px solid var(--sage);
  background: transparent;
  color: var(--moss-dark);
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.18s ease;
}
.season-tab:hover { background: var(--sage-light); }
.season-tab[aria-selected="true"] {
  background: var(--moss);
  border-color: var(--moss);
  color: var(--white);
}

/* ---------------------------- Tips / icon list ---------------------------- */

.tip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
}
.tip-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.tip-icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--sage-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tip-icon svg { width: 26px; height: 26px; }
.tip-item h3 { margin-bottom: 0.2em; font-size: 1.1rem; }
.tip-item p { margin: 0; font-size: 0.95rem; }

/* ---------------------------- Climate stat strip ---------------------------- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
  text-align: center;
}
.stat-strip .stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
}
.stat-strip .stat span {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
}

/* ---------------------------- Newsletter ---------------------------- */

.newsletter-box {
  background: var(--soil-light);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
}
.newsletter-form {
  display: flex;
  gap: 0.6rem;
  max-width: 460px;
  margin: 1.2rem auto 0;
  flex-wrap: wrap;
  justify-content: center;
}
.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 0.85em 1.1em;
  border-radius: 999px;
  border: 2px solid var(--soil);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--white);
}

/* ---------------------------- Gallery (masonry) ---------------------------- */

.masonry {
  columns: 3 220px;
  column-gap: var(--space-3);
}
.masonry-item {
  break-inside: avoid;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease;
}
.masonry-item:hover { transform: scale(1.02); }

/* ---------------------------- Articles / journal ---------------------------- */

.post-card { }
.post-meta {
  font-size: 0.82rem;
  color: var(--soil);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4em;
}
.post-tag {
  display: inline-block;
  background: var(--sage-light);
  color: var(--moss-dark);
  border-radius: 999px;
  padding: 0.2em 0.8em;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.6em;
}

.definition-list dt {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--moss-dark);
  margin-top: 1.4em;
}
.definition-list dd {
  margin: 0.3em 0 0;
  color: var(--ink-soft);
}

/* ---------------------------- Tables (planting calendar) ---------------------------- */

.table-wrap { overflow-x: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-soft); }
table.planting-calendar {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  min-width: 640px;
}
table.planting-calendar th, table.planting-calendar td {
  padding: 0.85em 1em;
  text-align: left;
  border-bottom: 1px solid var(--cream-deep);
  font-size: 0.92rem;
}
table.planting-calendar th {
  background: var(--moss);
  color: var(--white);
  font-family: var(--font-body);
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
}
table.planting-calendar tr:last-child td { border-bottom: none; }
table.planting-calendar tr:hover td { background: var(--cream-deep); }

/* ---------------------------- Contact ---------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-4);
  align-items: start;
}
.form-field { margin-bottom: 1.2rem; }
.form-field label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4em;
  font-size: 0.92rem;
  color: var(--moss-dark);
}
.form-field input, .form-field textarea {
  width: 100%;
  padding: 0.8em 1em;
  border-radius: var(--radius-sm);
  border: 2px solid var(--sage-light);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--white);
  transition: border-color 0.15s ease;
}
.form-field input:focus, .form-field textarea:focus {
  border-color: var(--moss);
  outline: none;
}
.social-icons { display: flex; gap: 0.8rem; margin-top: 1rem; }
.social-icons a {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--sage-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}
.social-icons a:hover { background: var(--gold-light); transform: translateY(-2px); }
.social-icons svg { width: 20px; height: 20px; color: var(--moss-dark); }

.alert-success {
  background: var(--sage-light);
  border-radius: var(--radius-sm);
  padding: 1em 1.3em;
  color: var(--moss-dark);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* ---------------------------- Footer ---------------------------- */

.site-footer {
  background: var(--moss-dark);
  color: rgba(255,255,255,0.85);
  padding: var(--space-5) 0 var(--space-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--space-4);
}
.footer-grid h4 { color: var(--white); font-family: var(--font-body); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; }
.footer-grid a { color: rgba(255,255,255,0.78); }
.footer-grid a:hover { color: var(--gold-light); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5em; }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-size: 1.25rem; color: var(--white); margin-bottom: 0.6rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.14);
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

/* ---------------------------- Scroll reveal ---------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------------------------- Responsive ---------------------------- */

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    padding: var(--space-2);
    border-bottom: 1px solid rgba(63,93,66,0.12);
    box-shadow: var(--shadow-soft);
  }
  .nav-links.is-open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .masonry { columns: 2 160px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .masonry { columns: 1; }
}
