/* ==========================================================================
   Apella — shared design system
   Fresh & clean redesign. Loaded on every page alongside Tailwind (CDN).
   ========================================================================== */

:root {
  --brand-900: #14532d;
  --brand-800: #166534;
  --brand-700: #15803d;
  --brand-600: #16a34a;
  --brand-500: #22c55e;
  --accent:    #10b981;
  --lime:      #84cc16;

  --bg:      #f6faf6;
  --surface: #ffffff;
  --text:    #1f2937;
  --muted:   #6b7280;
  --border:  #e6f2e6;

  --radius-sm: 0.75rem;
  --radius:    1rem;
  --radius-lg: 1.5rem;

  --shadow-sm: 0 1px 2px rgba(16, 40, 20, .05), 0 1px 3px rgba(16, 40, 20, .05);
  --shadow-md: 0 8px 24px rgba(16, 40, 20, .08);
  --shadow-lg: 0 18px 44px rgba(16, 40, 20, .13);

  --nav-h: 4.5rem;
  --ease:  cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  padding-top: var(--nav-h);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { letter-spacing: -0.02em; }

img { max-width: 100%; }

/* Full-bleed helper for sections that should span the viewport width */
.full-width-section,
.full-width {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  background: linear-gradient(180deg, var(--brand-800), var(--brand-900));
  color: #fff;
  transition: box-shadow .3s var(--ease), background .3s var(--ease);
}
.site-nav.scrolled { box-shadow: 0 6px 24px rgba(16, 40, 20, .22); }

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.nav-logo img {
  height: 3rem;
  width: 3rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .35);
}
.nav-logo .nav-brand {
  font-weight: 700;
  font-size: 1.35rem;
  color: #fff;
  letter-spacing: .04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .5rem .85rem;
  border-radius: .6rem;
  color: rgba(255, 255, 255, .88);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.nav-link.active { color: #fff; }
.nav-link.active::after {
  content: '';
  position: absolute;
  left: .85rem;
  right: .85rem;
  bottom: .28rem;
  height: 2px;
  border-radius: 2px;
  background: var(--lime);
}
.nav-link .chev { width: 1rem; height: 1rem; transition: transform .25s var(--ease); }

/* Products dropdown */
.nav-item { position: relative; }
.nav-dropdown {
  position: absolute;
  top: calc(100% + .4rem);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 13rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: .5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  z-index: 60;
}
.nav-item.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-item.open .chev { transform: rotate(180deg); }
.nav-dropdown a {
  display: block;
  padding: .55rem .75rem;
  border-radius: .5rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.nav-dropdown a:hover { background: #f0fdf4; color: var(--brand-700); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  background: rgba(255, 255, 255, .1);
  border-radius: .6rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: #fff;
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.site-nav.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-nav.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile layout */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: .15rem;
    padding: 1rem 1.25rem 1.5rem;
    background: linear-gradient(180deg, var(--brand-800), var(--brand-900));
    box-shadow: 0 20px 30px rgba(16, 40, 20, .3);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .site-nav.menu-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-link { font-size: 1.05rem; padding: .8rem 1rem; }
  .nav-link.active::after { display: none; }
  .nav-link.active { background: rgba(255, 255, 255, .12); }

  .nav-dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    background: rgba(255, 255, 255, .06);
    display: none;
    min-width: 0;
    margin: .2rem .25rem .4rem;
  }
  .nav-item.open .nav-dropdown { display: block; transform: none; }
  .nav-dropdown a { color: rgba(255, 255, 255, .9); }
  .nav-dropdown a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
}

/* ==========================================================================
   Cards & buttons
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

/* Neutral tile so mismatched product photos look consistent */
.product-media {
  height: 12rem;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.product-media img { max-height: 100%; width: auto; object-fit: contain; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: #fff; color: var(--brand-800); box-shadow: var(--shadow-md); }
.btn-outline { border: 2px solid rgba(255, 255, 255, .85); color: #fff; }
.btn-outline:hover { background: #fff; color: var(--brand-800); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: linear-gradient(180deg, var(--brand-800), var(--brand-900));
  color: #fff;
  padding: 3rem 1.25rem 2.5rem;
  margin-top: 4rem;
}
.footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-bottom: 1rem; }
.footer-brand img { height: 2.5rem; width: 2.5rem; border-radius: 50%; object-fit: cover; }
.footer-brand span { font-weight: 700; font-size: 1.15rem; letter-spacing: .04em; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.5rem; margin-top: 1rem; }
.footer-links a { color: rgba(255, 255, 255, .82); text-decoration: none; transition: color .2s var(--ease); }
.footer-links a:hover { color: #fff; }
.footer-copy { color: rgba(255, 255, 255, .7); font-size: .95rem; margin-top: 1.25rem; }

/* ==========================================================================
   Seasonality chart (freshFruits.html) — responsive, no horizontal scroll
   ========================================================================== */

.season {
  max-width: 1120px;
  margin: 2.5rem auto 4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.season-head {
  text-align: center;
  padding: 2.5rem 1.5rem 1rem;
}
.season-head h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300;
  color: #333;
  margin: 0;
}
.season-head p { color: var(--muted); margin: .5rem 0 0; }

.season-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0 1.5rem 1.5rem;
  color: var(--muted);
  font-size: .9rem;
}
.season-legend span { display: inline-flex; align-items: center; gap: .45rem; }
.legend-swatch { width: 14px; height: 14px; border-radius: 4px; }
.legend-swatch.on  { background: linear-gradient(135deg, var(--lime), var(--brand-500)); }
.legend-swatch.off { background: #e5e7eb; }

.season-body { padding: 0 1.25rem 1.5rem; }

/* Desktop month header (aligned with the 12-cell bars) */
.season-monthhead {
  display: grid;
  grid-template-columns: var(--season-label, 190px) 1fr var(--season-export, 96px);
  align-items: center;
  gap: 1rem;
  padding: .5rem 1rem;
  border-bottom: 2px dotted #e2e8f0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .03em;
}
.season-monthhead .mh-label { text-transform: uppercase; }
.season-monthhead .mh-months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; text-align: center; }
.season-monthhead .mh-export { text-align: center; text-transform: uppercase; }

/* One fruit row */
.season-row {
  display: grid;
  grid-template-columns: var(--season-label, 190px) 1fr var(--season-export, 96px);
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px dotted #eef2f0;
  border-radius: var(--radius);
  transition: background .25s var(--ease), box-shadow .25s var(--ease);
}
.season-row:last-child { border-bottom: none; }
.season-row:hover { background: linear-gradient(135deg, rgba(132, 204, 22, .06), rgba(34, 197, 94, .06)); }

.season-fruit { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.season-fruit img {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .12));
  transition: transform .25s var(--ease);
}
.season-row:hover .season-fruit img { transform: scale(1.08) rotate(6deg); }
.season-fruit .name { font-weight: 600; color: #333; }

.season-bar { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.season-cell {
  height: 22px;
  border-radius: 6px;
  background: #eceff1;
  transition: transform .2s var(--ease);
}
.season-cell.active {
  background: linear-gradient(135deg, var(--lime), var(--brand-500));
  box-shadow: 0 2px 6px rgba(132, 204, 22, .3);
}
.season-row:hover .season-cell.active { transform: translateY(-1px); }

/* Small month initials under the bar — mobile only */
.season-scale {
  display: none;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  margin-top: .35rem;
  text-align: center;
  font-size: .62rem;
  font-weight: 600;
  color: #9aa4a0;
}

.season-export { display: flex; justify-content: center; }
.export-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--brand-600);
  font-weight: 700;
  font-size: 1.25rem;
}

/* Mobile: each fruit becomes a stacked card */
@media (max-width: 760px) {
  .season-monthhead { display: none; }
  .season-body { padding: 1rem; display: grid; gap: 1rem; }
  .season-row {
    grid-template-columns: 1fr;
    gap: .75rem;
    padding: 1.1rem;
    border: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
  }
  .season-row:hover { transform: none; }
  .season-fruit { justify-content: flex-start; }
  .season-scale { display: grid; }
  .season-export { justify-content: flex-start; }
  .season-export .export-badge::after { content: 'Exportable'; font-size: .9rem; color: var(--muted); font-weight: 600; }
  .season-cell { height: 26px; }
}

/* ==========================================================================
   Wave dividers & animations
   ========================================================================== */

.wave-divider { position: relative; height: 70px; overflow: hidden; line-height: 0; }
.wave-divider svg { position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; }
.wave-top { transform: rotate(180deg); }

.scroll-animation { animation: fadeInUp .8s ease-out both; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
.float-animation { animation: float 6s ease-in-out infinite; }
@keyframes shimmer { 0% { left: -100%; } 100% { left: 100%; } }
