:root {
  --sage: #6b8f71;
  --sage-dark: #4a6b50;
  --rose: #d98c8c;
  --cream: #fbf7f0;
  --cream-alt: #f2ece0;
  --ink: #2f3a33;
  --muted: #66736a;
  --card: #ffffff;
  --border: #e3dccd;
  --shadow: 0 6px 20px rgba(47, 58, 51, 0.08);
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sage: #8fb895;
    --sage-dark: #a9cfae;
    --rose: #e6a3a3;
    --cream: #1c221e;
    --cream-alt: #232a25;
    --ink: #eef1ec;
    --muted: #a7b3aa;
    --card: #29312b;
    --border: #3a443d;
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
}

h1, h2, h3, .logo {
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 1.15;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--cream) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--sage-dark);
  text-decoration: none;
}
.logo span { color: var(--rose); }

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.nav-links a:hover { color: var(--sage); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--ink);
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid var(--sage);
  transition: transform 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--sage); color: #fff; }
.btn-primary:hover { background: var(--sage-dark); border-color: var(--sage-dark); }
.btn-ghost { background: transparent; color: var(--sage-dark); }

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 80px;
  text-align: center;
  background:
    radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--rose) 22%, transparent), transparent 45%),
    radial-gradient(circle at 85% 70%, color-mix(in srgb, var(--sage) 25%, transparent), transparent 50%);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  color: var(--sage-dark);
  font-weight: 700;
}
.hero h1 {
  font-size: clamp(2.8rem, 8vw, 5rem);
  margin: 0.2em 0;
}
.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 28px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.verse {
  margin: 48px auto 0;
  max-width: 560px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-style: italic;
}
.verse cite {
  display: block;
  margin-top: 6px;
  font-size: 0.95rem;
  font-style: normal;
  color: var(--muted);
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--cream-alt); }
.section h2 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin: 0 0 8px;
  text-align: center;
}
.section-intro {
  text-align: center;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 36px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 1.6rem; margin: 0 0 8px; }

/* ---------- Herbs ---------- */
.herb-controls { margin-bottom: 28px; }
#herb-search {
  width: 100%;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  margin-bottom: 14px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  text-transform: capitalize;
  cursor: pointer;
}
.chip.active {
  background: var(--sage);
  border-color: var(--sage);
  color: #fff;
}

.herb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.herb-card { transition: transform 0.2s; }
.herb-card:hover { transform: translateY(-3px); }
.herb-emoji { font-size: 2.4rem; }
.herb-card p { color: var(--muted); margin: 10px 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sage) 18%, transparent);
  color: var(--sage-dark);
  text-transform: capitalize;
  font-weight: 700;
}
details summary {
  cursor: pointer;
  color: var(--sage-dark);
  font-weight: 700;
}
.caution { color: var(--rose) !important; }
.empty { text-align: center; color: var(--muted); }

/* ---------- Reminders ---------- */
.reminder-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.checklist-card { grid-row: span 2; }

.tip-text {
  font-size: 1.25rem;
  min-height: 3.5em;
}
.fade { animation: fade 0.4s ease; }
@keyframes fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.checklist-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
#progress-label { color: var(--muted); font-weight: 700; }
.progress {
  height: 10px;
  border-radius: 999px;
  background: var(--cream-alt);
  overflow: hidden;
  margin: 8px 0 16px;
}
.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--sage), var(--rose));
  transition: width 0.3s;
}
.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.checklist input { width: 20px; height: 20px; accent-color: var(--sage); }
.checklist label { flex: 1; cursor: pointer; }
.checklist input:checked + label {
  text-decoration: line-through;
  color: var(--muted);
}
.checklist .remove {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--muted);
  cursor: pointer;
}
.checklist .remove:hover { color: var(--rose); }

.add-habit { display: flex; gap: 8px; }
.add-habit input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--cream);
  color: var(--ink);
  font: inherit;
}

.glasses { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.glass {
  font-size: 1.6rem;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.25;
  filter: grayscale(1);
  transition: opacity 0.2s, transform 0.2s;
}
.glass.full { opacity: 1; filter: none; }
.glass:hover { transform: scale(1.15); }
.water-count { color: var(--muted); font-weight: 700; margin: 0; }

/* ---------- About ---------- */
.about { max-width: 720px; text-align: center; }
.disclaimer {
  margin-top: 24px;
  padding: 16px 20px;
  border-left: 4px solid var(--rose);
  background: var(--cream-alt);
  border-radius: 8px;
  text-align: left;
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 28px 0;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 14px 16px; }

  .reminder-layout { grid-template-columns: 1fr; }
  .checklist-card { grid-row: auto; }
}
