/*
  Allofit LLC - Main Stylesheet
  ---
  1. Root Variables & Globals
  2. Typography & Base
  3. Utility Classes
  4. Header & Navigation
  5. Sections (Hero, About, Products, etc.)
  6. Components (Cards, Buttons, Forms, etc.)
  7. Responsive (Media Queries)
*/

/* 1. Root Variables & Globals
----------------------------------- */
:root {
  --font-heading: 'Merriweather', serif;
  --font-body: 'Inter', sans-serif;
  
  --color-primary: #2F7C31; /* A deep, natural green */
  --color-primary-dark: #225924;
  --color-secondary: #EAAA00; /* A golden/harvest accent */
  --color-dark: #222222;
  --color-body: #333333;
  --color-muted: #666666;
  --color-light-gray: #f4f4f4;
  --color-white: #ffffff;
  --color-border: #e0e0e0;
  
  --shadow: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
  --radius: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Offset for sticky header */
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-body);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

/* 2. Typography & Base
----------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-dark);
  margin-bottom: 0.75em;
}

h1 { font-size: 3.2rem; }
h2 { font-size: 2.5rem; margin-bottom: 1em; }
h3 { font-size: 1.5rem; }

p { margin-bottom: 1.25rem; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); text-decoration: underline; }

ul, ol { margin-left: 1.5rem; margin-bottom: 1.25rem; }
img { max-width: 100%; height: auto; display: block; }
table { width: 100%; border-collapse: collapse; }
label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
input, textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(47, 124, 49, 0.2);
}
.form-group { margin-bottom: 1rem; }

/* 3. Utility Classes
----------------------------------- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section {
  padding: 5rem 0;
}
.section.soft { background-color: var(--color-light-gray); }
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.grid.three { grid-template-columns: repeat(3, 1fr); }

.muted { color: var(--color-muted); }
.small { font-size: 0.9rem; }
.lead { font-size: 1.2rem; font-weight: 300; }
.aka { font-weight: 400; font-family: var(--font-body); color: var(--color-muted); font-size: 1.2rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 4. Header & Navigation
----------------------------------- */
.site-header {
  padding: 1rem 0;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logo { height: 40px; width: 40px; }
.brand-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-dark);
}
.nav { position: relative; }
.menu {
  display: flex;
  list-style: none;
  margin: 0;
  gap: 1.5rem;
}
.menu a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-body);
  text-decoration: none;
  padding: 0.5rem 0;
  transition: color 0.2s;
}
.menu a:hover {
  color: var(--color-primary);
}
.nav-toggle { display: none; }

/* 5. Sections
----------------------------------- */

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--color-primary);
  color: white;
  padding: 0.5rem 1rem;
  z-index: 1000;
  transition: top 0.3s ease;
  border-radius: 0 0 var(--radius) var(--radius);
}
.skip-link:focus {
  top: 0;
}

/* Hero */
.hero {
  background-color: var(--color-dark); /* Fallback */
  /* TODO: Add a real background image */
  background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1599908552144-4f40ACE7e060?auto=format&fit=crop&q=80&w=2070');
  background-size: cover;
  background-position: center;
  color: var(--color-white);
  padding: 8rem 0;
  text-align: center;
}
.hero-inner {
  max-width: 800px;
}
.hero h1 { color: var(--color-white); }
.hero .tagline {
  font-size: 1.3rem;
  font-weight: 300;
  opacity: 0.9;
  margin-bottom: 2rem;
}
.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 4rem;
}
.hero-badges {
  display: flex;
  justify-content: center;
  gap: 1rem;
  opacity: 0.8;
}
.hero-badges img {
  height: 80px;
  width: auto;
}

/* About */
.keyfacts {
  list-style: none;
  margin: 0;
}
.keyfacts li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}
.keyfacts li:last-child { border: none; }

/* Products */
.bg-microgreens { background-color: #f0f9f0; }

/* Chefs */
.checklist {
  list-style: none;
  margin: 0;
}
.checklist li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-primary);
  font-weight: 800;
}
.note.card {
  background: #fffbef;
  border-left: 4px solid var(--color-secondary);
}

/* Testimonials */
blockquote {
  margin: 0;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--color-muted);
}
blockquote footer {
  font-style: normal;
  margin-top: 1rem;
}
blockquote footer strong {
  display: block;
  color: var(--color-dark);
}

/* Process */
.bg-mushrooms { background-color: #f9f6f0; }
.steps {
  list-style: none;
  counter-reset: steps-counter;
  margin: 0;
  max-width: 800px;
}
.steps li {
  counter-increment: steps-counter;
  position: relative;
  padding: 1.5rem 0 1.5rem 3.5rem;
  font-size: 1.1rem;
}
.steps li::before {
  content: counter(steps-counter);
  position: absolute;
  left: 0;
  top: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
}

/* Pricing */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--color-white);
}
.table {
  width: 100%;
  text-align: left;
}
.table th, .table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}
.table th {
  font-family: var(--font-heading);
  background: var(--color-light-gray);
}
.table tr:last-child td {
  border-bottom: none;
}

/* Delivery */
.map {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.map iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Contact */
.contact-list { list-style: none; margin: 0 0 2rem 0; }
.contact-list li { font-size: 1.1rem; margin-bottom: 0.5rem; }
.cta-row { display: flex; gap: 1rem; margin-bottom: 1.5rem; }

/* FAQ */
.faq {
  max-width: 800px;
  margin: 0 auto;
}
.faq details {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}
.faq summary {
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none; /* Hide default triangle */
  position: relative;
  padding-right: 2rem;
}
.faq summary::after { /* Custom marker */
  content: '+';
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-primary);
}
.faq details[open] summary::after {
  content: '−';
}
.faq details p {
  padding: 1rem 0 0 0;
  margin: 0;
  color: var(--color-muted);
}

/* Footer */
.site-footer {
  background: var(--color-dark);
  color: #a0a0a0;
  padding: 3rem 0;
  text-align: center;
  font-size: 0.9rem;
}
.site-footer p { margin: 0 0 0.5rem 0; }
.site-footer a { color: var(--color-white); }


/* 6. Components
----------------------------------- */

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-white);
  text-decoration: none;
}
.btn-ghost {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}
.hero .btn-ghost:hover {
  background: var(--color-white);
  color: var(--color-dark);
  text-decoration: none;
}
.contact .btn-ghost {
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.contact .btn-ghost:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* Cards */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}
.card h3 {
  margin-bottom: 0.5rem;
  color: var(--color-primary-dark);
}
.card .bullets {
  list-style: none;
  margin: 1rem 0 0 0;
  font-size: 0.95rem;
}
.card .bullets li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}
.card .bullets li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1.2rem;
  top: -2px;
}


/* 7. Responsive (Media Queries)
----------------------------------- */
@media (max-width: 900px) {
  .split,
  .grid.three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 70px; /* Match header height */
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .hero { padding: 4rem 0; }
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  .hero .tagline { font-size: 1.1rem; }
  .hero-ctas { flex-direction: column; }
  .hero-badges { gap: 0.5rem; flex-wrap: wrap; }
  .hero-badges img { height: 60px; }

  /* Mobile Navigation */
  .nav-toggle {
    display: block;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 101;
    padding: 0.5rem;
  }
  .hamburger {
    display: block;
    position: relative;
    width: 24px;
    height: 2px;
    background: var(--color-dark);
    transition: all 0.2s ease-in-out;
  }
  .hamburger::before,
  .hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--color-dark);
    transition: all 0.2s ease-in-out;
  }
  .hamburger::before { top: -8px; }
  .hamburger::after { bottom: -8px; }
  
  .menu {
    position: fixed;
    top: 71px; /* Header height */
    right: 0;
    width: 100%;
    max-width: 320px;
    height: calc(100vh - 71px);
    flex-direction: column;
    background: var(--color-white);
    list-style: none;
    margin: 0;
    padding: 2rem;
    gap: 0;
    border-left: 1px solid var(--color-border);
    box-shadow: -5px 0 20px rgba(0,0,0,0.05);
    
    /* Hide by default */
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
  }
  .menu li {
    width: 100%;
  }
  .menu a {
    display: block;
    padding: 1rem;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--color-light-gray);
  }
  
  /* Nav Open State */
  .nav-open .menu {
    transform: translateX(0);
  }
  .nav-open .hamburger {
    background: transparent; /* Middle bar disappears */
  }
  .nav-open .hamburger::before {
    transform: rotate(45deg);
    top: 0;
  }
  .nav-open .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
  }
}