/* ============================================
   FruitWatch — Design tokens
   ============================================ */
:root {
  --cream: #FBF7F0;
  --orchard: #2F4A3C;
  --orchard-deep: #1E332A;
  --blossom: #E8B4C8;
  --blossom-deep: #C97D9A;
  --bark: #6B4A3A;
  --gold: #D4A24C;
  --sky: #A8C4C9;
  --ink: #21261F;
  --paper: #FFFFFF;

  --display: "Fraunces", Georgia, serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", "Courier New", monospace;

  --max-width: 1120px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  color: var(--orchard-deep);
}

p { margin: 0 0 1em; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* ============================================
   Header / nav
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 240, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(47, 74, 60, 0.12);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--orchard-deep);
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

nav.primary-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

nav.primary-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}

nav.primary-nav a:hover {
  background: rgba(47, 74, 60, 0.08);
}

nav.primary-nav a.active {
  background: var(--orchard);
  color: var(--cream);
}

nav.primary-nav a.cta {
  background: var(--blossom-deep);
  color: var(--paper);
  margin-left: 6px;
}
nav.primary-nav a.cta:hover {
  background: #b96b8a;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--blossom-deep);
  color: var(--paper);
  box-shadow: 0 6px 18px rgba(201, 125, 154, 0.35);
}
.btn-primary:hover { box-shadow: 0 8px 22px rgba(201, 125, 154, 0.45); }

.btn-ghost {
  background: transparent;
  color: var(--orchard-deep);
  border: 1.5px solid rgba(47, 74, 60, 0.3);
}
.btn-ghost:hover { background: rgba(47, 74, 60, 0.06); }

/* ============================================
   Hero / signature bloom-timeline element
   ============================================ */
.hero {
  padding: 86px 0 64px;
  position: relative;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blossom-deep);
  margin-bottom: 14px;
  display: inline-block;
}

.hero h1 {
  font-size: clamp(2.4rem, 4.2vw, 3.6rem);
  line-height: 1.04;
}

.hero .lede {
  font-size: 1.15rem;
  color: #444;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* Bloom timeline — signature element */
.bloom-timeline {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 28px 26px 22px;
  box-shadow: 0 16px 40px rgba(47, 74, 60, 0.12);
  border: 1px solid rgba(47, 74, 60, 0.08);
}

.bloom-timeline h3 {
  font-size: 0.95rem;
  font-family: var(--mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bark);
  margin-bottom: 18px;
}

.bloom-track {
  position: relative;
  height: 64px;
}

.bloom-axis {
  position: absolute;
  left: 0; right: 0;
  top: 30px;
  height: 2px;
  background: rgba(47, 74, 60, 0.15);
}

.bloom-stage {
  position: absolute;
  top: 14px;
  transform: translateX(-50%);
  text-align: center;
  width: 70px;
}

.bloom-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin: 0 auto 6px;
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 2px rgba(47,74,60,0.18);
}

.bloom-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--bark);
  white-space: nowrap;
}

.bloom-date {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: #999;
}

/* ============================================
   Sections
   ============================================ */
section { padding: 64px 0; }

.section-head {
  max-width: 60ch;
  margin-bottom: 38px;
}

.section-head .eyebrow { margin-bottom: 10px; }

.alt-bg {
  background: var(--paper);
  border-top: 1px solid rgba(47,74,60,0.08);
  border-bottom: 1px solid rgba(47,74,60,0.08);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 26px;
  border: 1px solid rgba(47,74,60,0.1);
}

.card .icon {
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  color: var(--blossom-deep);
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.card p { color: #555; font-size: 0.95rem; margin: 0; }

/* Species strip */
.species-strip {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.species-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cream);
  border: 1px solid rgba(47,74,60,0.15);
  border-radius: 999px;
  padding: 8px 16px 8px 10px;
  font-size: 0.88rem;
}
.species-pill .dot { width: 10px; height: 10px; border-radius: 50%; }

/* ============================================
   Process steps (submit page — genuine sequence)
   ============================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
  margin-bottom: 50px;
}
.step {
  position: relative;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.step:not(:first-child)::before {
  display: none;
}
.step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--orchard);
  color: var(--cream);
  font-family: var(--mono);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { font-size: 0.9rem; color: #555; }

/* Form embed frame */
.form-shell {
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid rgba(47,74,60,0.12);
  box-shadow: 0 16px 44px rgba(47,74,60,0.10);
  overflow: hidden;
}
.form-shell-bar {
  background: var(--orchard);
  color: var(--cream);
  padding: 12px 20px;
  font-family: var(--mono);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-shell-bar .dots { display: flex; gap: 6px; margin-right: 10px; }
.form-shell-bar .dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(251,247,240,0.4);
}
.form-embed-placeholder {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 50px 30px;
  color: #666;
  background:
    repeating-linear-gradient(45deg, rgba(47,74,60,0.025) 0 12px, transparent 12px 24px);
}
.form-embed-placeholder .mock-icon { width: 56px; height: 56px; margin-bottom: 18px; color: var(--blossom-deep); }
.form-embed-placeholder code {
  font-family: var(--mono);
  background: rgba(47,74,60,0.07);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
}

/* ============================================
   Results page
   ============================================ */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 46px;
}
.stat-row-3 { grid-template-columns: repeat(3, 1fr); }

.filter-panel { margin-bottom: 24px; }
.filter-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 16px;
  align-items: end;
}
.filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-field label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bark);
}
.filter-field select,
.filter-field input[type="date"] {
  font-family: var(--body);
  font-size: 0.92rem;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1.5px solid rgba(47,74,60,0.2);
  background: var(--cream);
  color: var(--ink);
}
.filter-field select:focus,
.filter-field input[type="date"]:focus {
  outline: none;
  border-color: var(--blossom-deep);
}
.filter-actions { align-items: stretch; }
.filter-actions .btn { width: 100%; padding: 10px 16px; font-size: 0.9rem; }

@media (max-width: 880px) {
  .filter-row { grid-template-columns: 1fr 1fr; }
}
.stat {
  background: var(--paper);
  border: 1px solid rgba(47,74,60,0.1);
  border-radius: var(--radius);
  padding: 22px 20px;
}
.stat .num {
  font-family: var(--mono);
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--orchard-deep);
  line-height: 1;
}
.stat .label {
  font-size: 0.82rem;
  color: var(--bark);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.results-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.panel {
  background: var(--paper);
  border: 1px solid rgba(47,74,60,0.1);
  border-radius: var(--radius);
  padding: 24px;
}
.panel h3 {
  font-size: 1.05rem;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel h3 .tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  background: var(--cream);
  border: 1px solid rgba(47,74,60,0.15);
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 500;
  color: var(--bark);
}

.map-placeholder {
  height: 420px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #DCE9E2 0%, #C9DCD2 100%);
  border: 1px solid rgba(47,74,60,0.1);
}

.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.bar-row .bar-label { width: 110px; font-size: 0.85rem; color: var(--bark); flex-shrink: 0; }
.bar-row .bar-track { flex: 1; height: 12px; background: rgba(47,74,60,0.08); border-radius: 999px; overflow: hidden; }
.bar-row .bar-fill { height: 100%; border-radius: 999px; }
.bar-row .bar-val { font-family: var(--mono); font-size: 0.8rem; width: 36px; text-align: right; flex-shrink: 0; }

.records-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.records-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bark);
  padding: 10px 12px;
  border-bottom: 2px solid rgba(47,74,60,0.12);
}
.records-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(47,74,60,0.07);
}
.records-table tr:hover td { background: rgba(232,180,200,0.08); }
.species-tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem;
}
.species-tag .dot { width: 8px; height: 8px; border-radius: 50%; }

/* ============================================
   Footer
   ============================================ */
footer {
  background: var(--orchard-deep);
  color: rgba(251,247,240,0.8);
  padding: 48px 0 32px;
  margin-top: 40px;
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}
footer h4 {
  color: var(--cream);
  font-size: 0.95rem;
  margin-bottom: 10px;
}
footer a { text-decoration: none; opacity: 0.85; }
footer a:hover { opacity: 1; text-decoration: underline; }
footer .foot-links { display: flex; gap: 32px; flex-wrap: wrap; }
footer .foot-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.88rem; }
.foot-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding: 20px 28px 0;
  border-top: 1px solid rgba(251,247,240,0.12);
  font-size: 0.8rem;
  opacity: 0.6;
}

/* ============================================
   Responsive
   ============================================ */
/* Hero image */
.hero-img-wrap {
  display: flex;
  align-items: center;
}

.hero-img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 20px 48px rgba(47, 74, 60, 0.18);
}

@media (max-width: 880px) {
  /* Hide all images on mobile */
  .hero-img-wrap { display: none; }
  .hero .wrap { grid-template-columns: 1fr; }

  /* Hide bee image — it's inline in the alt-bg grid */
  .why-grid {
    display: block !important;
  }
  .why-grid > img {
    display: none !important;
  }
  .why-grid > div {
    width: 100% !important;
  }

  /* Full width text */
  .hero h1 { font-size: clamp(1.8rem, 6vw, 2.4rem); }
  .hero .lede { max-width: 100%; }
  .wrap { padding: 0 16px; }

  /* Cards stack */
  .cards { grid-template-columns: 1fr; }

  /* Steps stack */
  .steps { grid-template-columns: 1fr; gap: 28px; }

  /* Results */
  .results-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .filter-row { grid-template-columns: 1fr 1fr; }

  /* Keep nav visible but smaller */
  nav.primary-nav { display: flex; gap: 2px; }
  nav.primary-nav a { font-size: 0.78rem; padding: 7px 10px; }
  nav.primary-nav a.cta { margin-left: 2px; }
  .site-header .wrap { justify-content: space-between; height: 60px; }
  .brand { font-size: 1.1rem; }
  .brand-mark { width: 24px; height: 24px; }
}

@keyframes spin { to { transform: rotate(360deg); } }

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