:root {
  --bg: #ffe4c4;
  --bg-2: #ffd3a3;
  --bg-deep: #ffc48a;
  --paper: #fff6ea;
  --ink: #2a1d12;
  --ink-soft: #5c4633;
  --line: rgba(42, 29, 18, 0.12);
  --mint: #12c48a;
  --mint-deep: #0a8a62;
  --orange: #f15a12;
  --terra: #c2410c;
  --leaf: #1b5e38;
  --shadow: 0 24px 50px rgba(90, 40, 8, 0.12);
  --radius: 28px;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(255, 255, 255, 0.55), transparent 50%),
    radial-gradient(900px 500px at 110% 10%, rgba(18, 196, 138, 0.16), transparent 45%),
    radial-gradient(800px 500px at 50% 120%, rgba(241, 90, 18, 0.12), transparent 50%),
    var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}
body > * { position: relative; z-index: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--leaf); }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 20; }

.wrap { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 12;
  backdrop-filter: blur(16px);
  background: rgba(255, 228, 196, 0.82);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 108px;
  overflow: visible;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
}
.brand img, .brand svg { width: min(300px, 46vw); height: auto; display: block; }
.brand-mark { width: 72px; height: 72px; }
.plant-photo {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  border-radius: 28px;
  box-shadow: 0 18px 40px rgba(80, 36, 8, 0.18);
}
.hero-art .plant-photo { border-radius: 36px; max-height: 560px; }
.quiz-art .plant-photo { max-width: 360px; margin: 0 auto; }
.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}
.nav a, .nav button.nav-link {
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
  font-size: 0.92rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.nav a:hover, .nav a[aria-current="page"], .nav button.nav-link:hover {
  background: rgba(255, 255, 255, 0.6);
}
.nav a { position: relative; z-index: 2; }
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.menu-toggle { display: none; }

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 0 1rem;
  min-height: calc(100svh - 76px);
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(18, 196, 138, 0.16);
  color: var(--mint-deep);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}
h1, h2, h3, .display { font-family: var(--display); font-weight: 620; letter-spacing: -0.03em; line-height: 1.08; }
h1 { font-size: clamp(2.4rem, 6vw, 5rem); margin: 0.7rem 0 1rem; }
h2 { font-size: clamp(1.8rem, 3.4vw, 3rem); margin: 0 0 0.8rem; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 36rem; }
.sci { font-style: italic; color: var(--ink-soft); margin: 0; }
.match-item.selected { outline: 3px solid var(--mint); }
.search-hero {
  margin-top: 1.6rem;
  display: flex;
  gap: 0.6rem;
  background: var(--paper);
  padding: 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-width: 520px;
}
.search-hero input, .field input, .field textarea, .field select {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  padding: 0.85rem 1rem;
}
.search-hero button, .btn {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  background: var(--mint);
  color: #063322;
}
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn-orange { background: var(--orange); color: #fff7ef; }
.hero-art {
  position: relative;
  min-height: 520px;
}
.hero-art .stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.hero-art .hero-side {
  inset: auto -4% -4% auto;
  width: 46%;
  height: 52%;
}
.hero-art .back-glow {
  position: absolute;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.7), transparent 70%);
  filter: blur(6px);
}
.float-note {
  position: absolute;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 0.85rem 1rem;
  max-width: 200px;
  box-shadow: var(--shadow);
}
.float-note.a { left: 0; top: 12%; }
.float-note.b { right: 0; bottom: 18%; }
.float-note strong { display: block; font-family: var(--display); font-size: 1.15rem; }

.section { padding: 4rem 0; }
.section-head { max-width: 40rem; margin-bottom: 2rem; }
.paths {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1rem;
}
.path {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 230px;
  overflow: hidden;
  position: relative;
}
.path.featured {
  background: #1a1220 url("../img/plants/lavanda.jpg") center / cover no-repeat;
  color: #fff !important;
}
.path.featured::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 10, 18, 0.78) 0%, rgba(16, 10, 18, 0.4) 52%, transparent 80%);
  z-index: 0;
  pointer-events: none;
}
.path.featured > * { position: relative; z-index: 1; }
a.path.featured,
a.path.featured h3,
a.path.featured p,
a.path.featured .go,
a.path.featured .kicker {
  color: #fff !important;
}
.path.featured .kicker { background: rgba(255, 255, 255, 0.2); }
.path.featured .path-art { display: none; }
.path h3 { margin: 0.3rem 0 0.5rem; font-size: 1.7rem; }
.path p { margin: 0; color: var(--ink-soft); }
.path .go { margin-top: auto; font-weight: 750; color: var(--mint-deep); }
.path-art { position: absolute; right: -20px; bottom: -30px; opacity: 0.9; pointer-events: none; }

.feature-plant {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  align-items: center;
  background: linear-gradient(135deg, rgba(255,255,255,.45), rgba(18,196,138,.12));
  border-radius: 40px;
  padding: 1.5rem 1.5rem 0;
  border: 1px solid var(--line);
  overflow: hidden;
}
.meta-row, .chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip, .filter-chip {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.55);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 650;
}
.filter-chip { cursor: pointer; font-family: inherit; }
.filter-chip[aria-pressed="true"], .chip.solid { background: var(--ink); color: #fff6ea; border-color: var(--ink); }

.plant-list { display: grid; gap: 1.2rem; }
.plant-row {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 1.2rem;
  align-items: center;
  background: rgba(255, 246, 234, 0.72);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 0.8rem 1rem;
  text-decoration: none;
  color: inherit;
}
.plant-row > a {
  display: contents;
  color: inherit;
  text-decoration: none;
}
.path, .plant-row, .btn, .option { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.path:hover, .plant-row:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.btn:hover { filter: brightness(1.05); }
.plant-row:nth-child(even) { background: rgba(255, 255, 255, 0.42); }
.plant-row h3 { margin: 0 0 0.25rem; font-size: 1.5rem; }
.plant-row .sci { font-style: italic; color: var(--ink-soft); font-size: 0.92rem; }
.fav {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 1.15rem;
}
.fav[aria-pressed="true"] { background: #ffe0cc; }

.plant-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: end;
  padding: 2rem 0 1rem;
}
.care-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
  margin: 1.5rem 0;
}
.care {
  background: var(--paper);
  border-radius: 20px;
  padding: 0.9rem;
  border: 1px solid var(--line);
}
.care span { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); font-weight: 750; }
.prose { max-width: 68ch; }
.prose p { font-size: 1.05rem; }
.article-grid { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 2rem; }
.side-panel {
  background: var(--paper);
  border-radius: 28px;
  padding: 1.2rem;
  border: 1px solid var(--line);
  position: sticky;
  top: 96px;
}
.side-panel a { display: inline-block; margin: 0.2rem 0.6rem 0.2rem 0; }

.game-shell {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: start;
}
.board, .panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 1.4rem;
  box-shadow: var(--shadow);
}
.score {
  font-family: var(--display);
  font-size: 2.4rem;
  margin: 0;
}
.options { display: grid; gap: 0.6rem; }
.option, .match-item, .part-btn {
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 0.9rem 1rem;
  font: inherit;
  cursor: pointer;
}
.option.correct, .match-item.correct { background: #d1fae5; border-color: #059669; }
.option.wrong, .match-item.wrong { background: #ffe4e6; border-color: #e11d48; }
.quiz-art { display: grid; place-items: center; min-height: 320px; }

.explorer {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
}
.plant-map { width: 100%; max-width: 520px; margin: 0 auto; display: block; }
.plant-map .hot {
  cursor: pointer;
  fill: rgba(18, 196, 138, 0.01);
  stroke: transparent;
}
.plant-map .hot:hover, .plant-map .hot:focus, .plant-map .hot.active {
  fill: rgba(18, 196, 138, 0.18);
  stroke: var(--mint-deep);
  stroke-width: 2;
}

.timeline { display: grid; gap: 0; }
.t-step {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  width: 100%;
}
.t-step .dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--orange);
  margin: 0 auto;
}
.t-step .rail { position: relative; }
.t-step .rail::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 22px;
  bottom: -22px;
  width: 2px;
  background: rgba(241, 90, 18, 0.28);
}
.t-step:last-child .rail::after { display: none; }
.t-step.active { background: rgba(255,255,255,.4); border-radius: 20px; padding-left: 0.6rem; }

.assoc { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.empty {
  padding: 2rem;
  border: 1px dashed var(--line);
  border-radius: 24px;
  text-align: center;
}

.site-footer {
  margin-top: 3rem;
  padding: 2.5rem 0 1.5rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 246, 234, 0.55);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 1.5rem;
}
.footer-grid a { display: block; margin: 0.3rem 0; text-decoration: none; }
.site-footer img { width: min(240px, 70vw); height: auto; }
.legal { font-size: 0.88rem; color: var(--ink-soft); }

.search-modal[hidden] { display: none; }
.search-modal {
  position: fixed;
  inset: 0;
  background: rgba(42, 29, 18, 0.35);
  z-index: 30;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 12vh 1rem 1rem;
}
.search-box {
  width: min(680px, 100%);
  background: var(--paper);
  border-radius: 24px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.search-results { margin-top: 0.8rem; display: grid; gap: 0.4rem; }
.search-results a {
  text-decoration: none;
  color: inherit;
  padding: 0.7rem;
  border-radius: 14px;
  background: rgba(255, 228, 196, 0.45);
}

.form { display: grid; gap: 0.8rem; max-width: 36rem; }
.field {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.notice {
  background: #d1fae5;
  border-radius: 16px;
  padding: 0.8rem 1rem;
}

@media (max-width: 900px) {
  .hero, .feature-plant, .article-grid, .game-shell, .explorer, .paths, .footer-grid, .assoc, .plant-hero {
    grid-template-columns: 1fr;
  }
  .care-grid { grid-template-columns: 1fr 1fr; }
  .hero { min-height: auto; padding-top: 1.4rem; }
  .hero-art { min-height: 380px; }
  .nav { display: none; }
  .header-inner.nav-open .nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    inset: 108px 0 auto;
    background: rgba(255, 228, 196, 0.97);
    padding: 1rem;
    border-bottom: 1px solid var(--line);
  }
  .learn-menu { position: static; box-shadow: none; }
  .menu-toggle { display: grid; margin-left: auto; }
  .plant-row { grid-template-columns: 110px 1fr; }
  .plant-row .fav { grid-column: 2; justify-self: start; }
  .float-note.b, .hero-side { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
