/* =====================================================
   shared.css — Bloom Landing
   Styles shared by index.html and how-it-works.html
===================================================== */

/* =====================================================
   DESIGN TOKENS
===================================================== */
:root {
  --green:       #48A111;
  --green-mid:   #6CA651;
  --green-light: #9BC264;
  --pink:        #F075AE;
  --yellow:      #F7DB91;
  --cream:       #FAFAF7;
  --dark:        #2D2D2D;
  --dark-green:  #1a3306;
  --darkest:     #0d1907;

  --font: 'Outfit', system-ui, sans-serif;

  /* Bermuda: -0.04em tracking, 1.3 heading lh */
  --tracking: -0.04em;
  --lh-head:  1.3em;
  --lh-body:  1.65em;

  /* Generous rounding */
  --r-card: 2rem;
  --r-pill: 100px;
}

/* =====================================================
   RESET
===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  color: var(--dark);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: var(--lh-body);
  letter-spacing: var(--tracking);
}
a { text-decoration: none; color: inherit; }

/* =====================================================
   GLOBAL TYPE SCALE
===================================================== */
h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: var(--tracking);
  line-height: var(--lh-head);
}

/* h2: 28 → 38 → 48 */
h2 { font-size: 28px; }
@media (min-width: 768px)  { h2 { font-size: 38px; } }
@media (min-width: 1400px) { h2 { font-size: 48px; } }

/* h3: 22 → 30 → 38 */
h3 { font-size: 22px; }
@media (min-width: 768px)  { h3 { font-size: 30px; } }
@media (min-width: 1400px) { h3 { font-size: 38px; } }

/* h4: 18 → 24 → 30 */
h4 { font-size: 18px; }
@media (min-width: 768px)  { h4 { font-size: 24px; } }
@media (min-width: 1400px) { h4 { font-size: 30px; } }

/* body: 14 → 18 → 22 */
body { font-size: 14px; }
@media (min-width: 768px)  { body { font-size: 18px; } }
@media (min-width: 1400px) { body { font-size: 22px; } }

/* =====================================================
   CONTAINER
===================================================== */
.wrap {
  width: 100%;
  margin: 0 auto;
  max-width: 1840px;
  padding: 0 24px;
}
@media (min-width: 1400px) { .wrap { padding: 0 80px; } }

/* =====================================================
   SCROLL REVEAL
===================================================== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.in { opacity: 1; transform: none; }

/* =====================================================
   IMAGE PLACEHOLDERS
===================================================== */
.ph {
  border: 2px dashed var(--green-light);
  background: rgba(255,255,255,.5);
  border-radius: var(--r-card);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}
.ph-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--green-mid);
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.5;
}

/* =====================================================
   BUTTONS
===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--font);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: var(--tracking);
  border: none;
  cursor: pointer;
  border-radius: var(--r-pill);
  padding: .875rem 2rem;
  transition: opacity .2s ease, transform .2s ease;
  white-space: nowrap;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn-green { background: var(--green); color: #fff; }
.btn-dark  { background: var(--dark);  color: #fff; }

/* =====================================================
   EYEBROW LABELS
===================================================== */
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}
.eyebrow-pink  { color: var(--pink); }
.eyebrow-green { color: var(--green-mid); }
.eyebrow-white { color: rgba(255,255,255,.6); }

/* =====================================================
   NAVIGATION — sticky shared header, all pages
===================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,250,247,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(155,194,100,.18);
  transition: box-shadow .2s ease;
}
.site-nav.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,.07); }

/* Auto-hide: invisible at scroll-top, slides in on first scroll */
.site-nav--auto-hide {
  transition: opacity .35s ease, transform .35s ease, box-shadow .2s ease;
}
.site-nav--auto-hide:not(.scrolled) {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}
.site-nav--auto-hide.scrolled {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Three-zone inner layout: logo | links | actions */
.nav-inner {
  max-width: 1840px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 2rem;
}
@media (min-width: 1400px) { .nav-inner { padding: 0 80px; } }

/* Logo */
.logo {
  font-family: var(--font);
  font-size: 22px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: var(--tracking);
  display: flex;
  align-items: center;
  gap: .3rem;
  flex-shrink: 0;
}
.logo-pip {
  width: 7px; height: 7px;
  background: var(--pink);
  border-radius: 50%;
}

/* Centre nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex: 1;
}

.nav-link {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: var(--tracking);
  color: rgba(45,45,45,.55);
  padding: .5rem .875rem;
  border-radius: var(--r-pill);
  transition: color .2s ease, background .2s ease;
  white-space: nowrap;
}
.nav-link:hover { color: var(--dark); background: rgba(155,194,100,.12); }
.nav-link--active { color: var(--green); background: rgba(72,161,17,.08); }

/* Right-side actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin-left: auto;
}

/* CTA button — compact variant for the nav */
.nav-cta {
  font-size: 14px !important;
  padding: .6rem 1.25rem !important;
}

/* ── Language selector ── */
.lang-selector { position: relative; }

.lang-btn {
  display: flex;
  align-items: center;
  gap: .375rem;
  padding: .5rem .75rem;
  background: transparent;
  border: 1.5px solid rgba(155,194,100,.3);
  border-radius: var(--r-pill);
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 800;
  color: rgba(45,45,45,.65);
  letter-spacing: var(--tracking);
  transition: border-color .2s ease, color .2s ease, background .2s ease;
  white-space: nowrap;
}
.lang-btn:hover,
.lang-selector.is-open .lang-btn {
  border-color: var(--green);
  color: var(--green);
  background: rgba(72,161,17,.05);
}
.lang-btn svg { flex-shrink: 0; color: inherit; }
.lang-chevron { transition: transform .2s ease; }
.lang-selector.is-open .lang-chevron { transform: rotate(180deg); }

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1.5px solid rgba(155,194,100,.22);
  border-radius: 1.25rem;
  padding: .375rem;
  min-width: 156px;
  list-style: none;
  box-shadow: 0 8px 32px rgba(0,0,0,.1), 0 2px 8px rgba(0,0,0,.06);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.lang-selector.is-open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  border-radius: .875rem;
  font-size: 13px;
  font-weight: 800;
  color: rgba(45,45,45,.65);
  letter-spacing: var(--tracking);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.lang-option:hover { background: rgba(155,194,100,.12); color: var(--dark); }
.lang-option--active { color: var(--green); background: rgba(72,161,17,.07); }
.lang-option a {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

/* ── Mobile hamburger ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  padding: 8px;
  background: transparent;
  border: 1.5px solid rgba(155,194,100,.3);
  border-radius: .75rem;
  cursor: pointer;
  transition: border-color .2s ease;
}
.nav-hamburger:hover { border-color: var(--green); }
.nav-hamburger span {
  display: block;
  width: 100%; height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile breakpoint ── */
@media (max-width: 767px) {
  .nav-hamburger { display: flex; }
  .nav-cta       { display: none; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: rgba(250,250,247,.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(155,194,100,.18);
    flex-direction: column;
    align-items: stretch;
    padding: .75rem 16px 1.25rem;
    gap: .25rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
  }
  .nav-links.is-open { display: flex; }

  .nav-link { padding: .75rem 1rem; border-radius: .875rem; }
}

/* =====================================================
   SECTION CURVE TOPS
   CSS-only wave: each colored section has a .curve-top
   div inside it, same bg color → organic curved edge
===================================================== */
section { position: relative; }

.curve-top {
  position: absolute;
  width: 100%;
  height: 3vw;
  left: 0;
  top: -3vw;
  overflow: hidden;
  pointer-events: none;
}
.curve-top::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150vw;
  height: 10vw;
  border-radius: 50% 50% 0 0;
}

/* =====================================================
   GARDEN SECTION
   Used by how-it-works.html and referenced by index.html
===================================================== */
.s-garden {
  background: var(--green-light);
  padding: 7rem 0;
}
.s-garden h2 { margin-bottom: 1.25rem; }
.s-garden .intro {
  line-height: var(--lh-body);
  max-width: 72ch;
  color: rgba(45,45,45,.85);
  margin-bottom: 1rem;
}
.s-garden .tagline {
  font-size: 16px;
  font-weight: 800;
  font-style: italic;
  color: var(--dark-green);
  margin-bottom: 3rem;
}
@media (min-width: 768px) { .s-garden .tagline { font-size: 22px; } }

/* Plant type grid */
.plant-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}
@media (min-width: 768px) {
  .plant-grid { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
}

.plant-card {
  background: #fff;
  border-radius: var(--r-card);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .625rem;
  transition: transform .2s ease;
}
.plant-card:hover { transform: translateY(-4px); }

.plant-icon {
  width: 44px; height: 44px;
  border-radius: .875rem;
  border: 2px dashed var(--green-light);
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
}
.plant-icon .ph-label { font-size: 9px; }

.plant-name { font-size: 16px; font-weight: 800; letter-spacing: var(--tracking); }
@media (min-width: 768px) { .plant-name { font-size: 20px; } }

.plant-type {
  font-size: 11px;
  font-weight: 800;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.plant-blurb {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(45,45,45,.7);
}
@media (min-width: 768px) { .plant-blurb { font-size: 16px; } }

.garden-screenshot {
  width: 100%;
  aspect-ratio: 4 / 3;
}

/* =====================================================
   TOOLS SECTION
===================================================== */
.s-tools {
  background: var(--cream);
  padding: 7rem 0;
}
.s-tools h2 { margin-bottom: 1.25rem; }
.s-tools .intro {
  line-height: var(--lh-body);
  color: rgba(45,45,45,.8);
  max-width: 66ch;
  margin-bottom: 3rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}
@media (min-width: 768px) {
  .tools-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
}

.tool-card {
  background: #fff;
  border-radius: var(--r-card);
  padding: 1.5rem;
  border: 2px solid rgba(155,194,100,.22);
  transition: border-color .2s ease, transform .2s ease;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.tool-card:hover { border-color: var(--green); transform: translateY(-3px); }
.tool-card > img { flex-shrink: 0; align-self: flex-start; }

/* Extracted from inline styles on tool card images */
.tool-card__img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border: 2px solid var(--green-light);
  border-radius: .75rem;
  padding: 4px;
  flex-shrink: 0;
  align-self: flex-start;
}

.tool-name {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: var(--tracking);
  margin-bottom: .25rem;
}
@media (min-width: 768px) { .tool-name { font-size: 20px; } }

.tool-desc {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(45,45,45,.7);
}
@media (min-width: 768px) { .tool-desc { font-size: 16px; } }

/* =====================================================
   FOOTER
===================================================== */
footer {
  background: var(--darkest);
  padding: 4rem 0 3rem;
  position: relative;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
  }
}

.footer-wordmark {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: var(--tracking);
  color: #fff;
  line-height: 1;
  margin-bottom: .375rem;
}
@media (min-width: 768px)  { .footer-wordmark { font-size: 64px; } }
@media (min-width: 1400px) { .footer-wordmark { font-size: 90px; } }

.footer-tagline {
  font-size: 14px;
  color: rgba(255,255,255,.35);
}

.footer-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-nav a {
  font-size: 14px;
  color: rgba(255,255,255,.4);
  transition: color .2s ease;
}
.footer-nav a:hover { color: var(--green-light); }
