/* ═══════════════════════════════════════════════════════════
   BORLOTTI BEAN — Storybook Stylesheet
   Mobile-first. Picture book aesthetic. No grids or cards.
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;1,9..144,300;1,9..144,400&family=Nunito:wght@400;600;700;800&display=swap');

/* ── TOKENS ── */
:root {
  --cream:      #faf4e8;
  --cream-dark: #f2e8d4;
  --cream-deep: #e8d8bc;
  --burg:       #6e1a28;
  --burg-mid:   #9c3048;
  --burg-soft:  #c4768a;
  --burg-pale:  #f5dce4;
  --sage:       #4e6e46;
  --sage-mid:   #7a9e70;
  --sage-pale:  #e4eede;
  --sage-light: #edf4e8;
  --soil:       #7a4e2d;
  --soil-mid:   #a87448;
  --soil-light: #f0dfc8;
  --pink:       #e8a0b0;
  --pink-pale:  #fce8f0;
  --yellow:     #e8b830;
  --white:      #fffdf6;
  --ink:        #3a2010;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Nunito', sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--cream);
  font-family: var(--font-body);
  color: var(--ink);
  overflow-x: hidden;
  /* subtle paper grain */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23g)' opacity='0.028'/%3E%3C/svg%3E");
}

/* ── FLOATING LEAVES (ambient) ── */
.leaf-float {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  font-size: 18px;
  animation: leaf-drift linear infinite;
  will-change: transform, opacity;
}

@keyframes leaf-drift {
  0%   { opacity: 0;   transform: translateY(100vh) rotate(0deg)   translateX(0); }
  10%  { opacity: 0.5; }
  90%  { opacity: 0.3; }
  100% { opacity: 0;   transform: translateY(-10vh) rotate(180deg) translateX(60px); }
}

/* ── SPARKLES ── */
.sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  font-size: 11px;
  color: var(--yellow);
  animation: sparkle-rise ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes sparkle-rise {
  0%   { opacity: 0; transform: translateY(0)     scale(0.5); }
  40%  { opacity: 1; transform: translateY(-30px) scale(1);   }
  100% { opacity: 0; transform: translateY(-80px) scale(0.6); }
}

/* ═══════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 28px 48px;
  position: relative;
  overflow: hidden;
}

/* soft vignette at bottom to bleed into next section */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(transparent, var(--cream));
  pointer-events: none;
}

/* corner botanical decorations */
.hero-corner {
  position: absolute;
  font-size: 32px;
  opacity: 0.4;
  line-height: 1.4;
  pointer-events: none;
}
.hero-corner--tl { top: 20px; left: 12px; transform: rotate(-10deg); }
.hero-corner--tr { top: 20px; right: 12px; transform: rotate(10deg) scaleX(-1); }

/* bean mascot */
.hero-bean {
  width: min(260px, 72vw);
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
  animation: gentle-float 5s ease-in-out infinite;
  filter: drop-shadow(0 12px 24px rgba(110, 26, 40, 0.15));
}

@keyframes gentle-float {
  0%, 100% { transform: translateY(0)   rotate(-1deg); }
  50%       { transform: translateY(-14px) rotate(1deg); }
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(42px, 13vw, 64px);
  font-weight: 400;
  color: var(--burg);
  line-height: 1.05;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.hero-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--burg-mid);
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(17px, 5vw, 21px);
  font-weight: 300;
  font-style: italic;
  color: var(--sage);
  line-height: 1.5;
  max-width: 320px;
  position: relative;
  z-index: 1;
}

/* scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
  animation: hint-fade 3s ease-in-out 2s infinite;
  opacity: 0;
}
.scroll-hint span {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 700;
  opacity: 0.6;
}
.scroll-hint svg { opacity: 0.5; }

@keyframes hint-fade {
  0%, 100% { opacity: 0; transform: translateX(-50%) translateY(0); }
  30%, 70%  { opacity: 1; transform: translateX(-50%) translateY(4px); }
}

/* ═══════════════════════════════════════════════════════════
   SHARED SECTION STYLES
═══════════════════════════════════════════════════════════ */
section {
  position: relative;
  padding: 80px 28px;
  overflow: hidden;
}

/* botanical rule — the decorative divider between sections */
.botanical-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 28px;
  margin: 4px 0;
  opacity: 0.5;
  font-size: 18px;
  color: var(--sage-mid);
  letter-spacing: 4px;
}
.botanical-rule::before,
.botanical-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sage-mid), transparent);
}

.section-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 14px;
  display: block;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(32px, 9vw, 46px);
  font-weight: 400;
  color: var(--burg);
  line-height: 1.1;
  margin-bottom: 24px;
}

.section-heading em {
  font-style: italic;
  color: var(--burg-mid);
}

.section-body {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--soil);
  max-width: 400px;
}

/* ── reveal on scroll ── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s;  }
.reveal-delay-3 { transition-delay: 0.45s; }

/* ═══════════════════════════════════════════════════════════
   SECTION 2 — INFOGRAPHIC
═══════════════════════════════════════════════════════════ */
.section-infographic {
  background: var(--cream-dark);
  padding: 64px 0 80px;
}

.section-infographic .inner {
  padding: 0 28px;
  margin-bottom: 36px;
}

.infographic-frame {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 16px;
}

/* soft frame glow around infographic */
.infographic-frame::before {
  content: '';
  position: absolute;
  inset: -8px;
  background: radial-gradient(ellipse at center, rgba(200, 160, 100, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.infographic-img {
  width: 100%;
  border-radius: 20px;
  box-shadow:
    0 2px 8px rgba(110, 26, 40, 0.08),
    0 12px 40px rgba(110, 26, 40, 0.14),
    0 0 0 1px rgba(200, 160, 100, 0.15);
  display: block;
}

/* ═══════════════════════════════════════════════════════════
   SECTION 3 — WATCH ME GROW (scrolling story)
═══════════════════════════════════════════════════════════ */
.section-grow {
  background: var(--cream);
  padding-top: 80px;
  padding-bottom: 20px;
}

.grow-intro {
  padding: 0 28px;
  margin-bottom: 64px;
}

/* the vertical vine line */
.grow-timeline {
  position: relative;
  padding: 0 28px 60px;
}

.grow-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--sage-mid) 8%,
    var(--sage-mid) 92%,
    transparent 100%
  );
  opacity: 0.35;
}

/* each growth stage */
.grow-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 80px;
  position: relative;
}

.grow-stage:last-child { margin-bottom: 20px; }

/* the emoji node on the vine */
.grow-node {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--cream-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 20px rgba(110, 26, 40, 0.10);
  animation: node-breathe 4s ease-in-out infinite;
}

@keyframes node-breathe {
  0%, 100% { box-shadow: 0 4px 20px rgba(110, 26, 40, 0.10); }
  50%       { box-shadow: 0 4px 28px rgba(110, 26, 40, 0.20); }
}

.grow-stage-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--burg);
  margin-bottom: 10px;
  font-style: italic;
}

.grow-stage-text {
  font-size: 16px;
  color: var(--soil-mid);
  font-weight: 600;
  max-width: 260px;
  line-height: 1.6;
}

/* alternating accent colours per stage */
.grow-stage:nth-child(1) .grow-node { background: var(--soil-light); border-color: var(--soil-mid); }
.grow-stage:nth-child(2) .grow-node { background: #f0ece0; border-color: var(--soil); }
.grow-stage:nth-child(3) .grow-node { background: var(--sage-light); border-color: var(--sage-mid); }
.grow-stage:nth-child(4) .grow-node { background: var(--sage-light); border-color: var(--sage); }
.grow-stage:nth-child(5) .grow-node { background: #e4f0dc; border-color: var(--sage); }

/* ═══════════════════════════════════════════════════════════
   SECTION 4 — DID YOU KNOW (no grid — prose-style)
═══════════════════════════════════════════════════════════ */
.section-facts {
  background: linear-gradient(180deg, var(--cream) 0%, var(--burg-pale) 60%, var(--cream-dark) 100%);
  padding: 80px 28px 80px;
}

/* facts as big typographic statements, not cards */
.fact-item {
  margin-bottom: 56px;
  position: relative;
  padding-left: 28px;
}

.fact-item:last-child { margin-bottom: 0; }

/* left botanical marker */
.fact-item::before {
  content: attr(data-marker);
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 20px;
  opacity: 0.7;
}

.fact-number {
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: 300;
  font-style: italic;
  color: var(--burg-pale);
  line-height: 1;
  margin-bottom: -16px;
  display: block;
  user-select: none;
}

.fact-text {
  font-family: var(--font-display);
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 400;
  font-style: italic;
  color: var(--burg);
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════
   SECTION 5 — GARDEN TO PLATE (story flow)
═══════════════════════════════════════════════════════════ */
.section-plate {
  background: var(--cream-dark);
  padding: 80px 28px 80px;
}

.plate-journey {
  margin-top: 48px;
  position: relative;
}

/* vertical joining line */
.plate-journey::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 32px;
  bottom: 32px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--soil-mid) 15%, var(--soil-mid) 85%, transparent);
  opacity: 0.3;
}

.plate-step {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 52px;
  position: relative;
}
.plate-step:last-child { margin-bottom: 0; }

.plate-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--cream-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 3px 14px rgba(122, 78, 45, 0.12);
}

.plate-step-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-style: italic;
  font-weight: 400;
  color: var(--burg);
  margin-bottom: 6px;
  margin-top: 10px;
}

.plate-step-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--soil-mid);
  line-height: 1.6;
}

/* story connector arrow */
.plate-arrow {
  padding-left: 78px;
  margin-top: -38px;
  margin-bottom: 14px;
  font-size: 18px;
  color: var(--soil-mid);
  opacity: 0.4;
  display: block;
}

/* ═══════════════════════════════════════════════════════════
   FINAL SECTION
═══════════════════════════════════════════════════════════ */
.section-final {
  min-height: 100svh;
  background: linear-gradient(180deg, var(--cream-dark) 0%, var(--cream) 50%, var(--sage-light) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 36px 100px;
  position: relative;
  overflow: hidden;
}

.final-bean {
  width: min(200px, 55vw);
  margin-bottom: 20px;
  opacity: 0.18;
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  filter: blur(1px);
  pointer-events: none;
  animation: final-sway 8s ease-in-out infinite;
}

@keyframes final-sway {
  0%, 100% { transform: translateX(-50%) rotate(-2deg); }
  50%       { transform: translateX(-50%) rotate(2deg); }
}

.final-quote {
  font-family: var(--font-display);
  font-size: clamp(26px, 7.5vw, 36px);
  font-weight: 300;
  font-style: italic;
  color: var(--burg);
  line-height: 1.5;
  max-width: 340px;
  position: relative;
  z-index: 1;
}

.final-quote strong {
  font-weight: 500;
  color: var(--sage);
  font-style: normal;
}

.final-flourish {
  margin-top: 40px;
  font-size: 22px;
  letter-spacing: 8px;
  opacity: 0.5;
  color: var(--sage-mid);
}

/* corner vines for final section */
.final-corner {
  position: absolute;
  font-size: 28px;
  opacity: 0.25;
  pointer-events: none;
  line-height: 1.5;
}
.final-corner--bl { bottom: 20px; left: 12px; transform: rotate(10deg); }
.final-corner--br { bottom: 20px; right: 12px; transform: rotate(-10deg) scaleX(-1); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (min-width: 480px) {
  .grow-stage {
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
  }
  .plate-step {
    max-width: 420px;
  }
}

@media (min-width: 640px) {
  section { padding: 100px 40px; }
  .hero { padding: 80px 40px 60px; }
  .hero-bean { width: 280px; }
  .section-infographic .inner { padding: 0 40px; }
  .infographic-frame { padding: 0 24px; }
}
