/* ================================================
   FOOD BRIDGE — Main Stylesheet
   ================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --color-primary: #e8743b;
  --color-primary-dark: #c95f2b;
  --color-accent: #d4a24e;
  --color-green: #5a9e4b;
  --color-green-dark: #3d7a2e;
  --color-red: #e25555;
  --color-dark: #2c3e50;
  --color-text: #444;
  --color-light-text: #666;
  --color-bg: #ffffff;
  --color-bg-alt: #faf8f5;
  --color-bg-warm: #fdf0e2;
  --color-bg-green: #e8f5e3;
  --color-border: #e8e4df;
  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 16px rgba(0,0,0,.07);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.10);
  --transition: .25s ease;
  --max-width: 1140px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dark); }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  color: var(--color-dark);
  line-height: 1.25;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }

.section-title {
  text-align: center;
  margin-bottom: .5rem;
}
.section-subtitle {
  text-align: center;
  color: var(--color-light-text);
  max-width: 560px;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
}

.highlight {
  color: var(--color-primary);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-align: center;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(232,116,59,.35);
}
.btn-outline {
  border-color: var(--color-dark);
  color: var(--color-dark);
  background: transparent;
}
.btn-outline:hover {
  background: var(--color-dark);
  color: #fff;
  transform: translateY(-2px);
}
.btn-green {
  background: var(--color-green);
  color: #fff;
}
.btn-green:hover {
  background: var(--color-green-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(90,158,75,.35);
}
.btn-lg { padding: 16px 48px; font-size: 1.1rem; }

/* ================================================
   HEADER
   ================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo-link { display: flex; align-items: center; }
.logo-img { height: 60px; width: auto; }
.howitworks-img { height: 80px; width: auto; }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
}
.main-nav a {
  color: var(--color-dark);
  font-weight: 500;
  font-size: .95rem;
  position: relative;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--color-primary);
  transition: width var(--transition);
}
.main-nav a:hover::after { width: 100%; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--color-dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* ================================================
   HERO
   ================================================ */
.hero {
  background: linear-gradient(135deg, var(--color-bg-warm) 0%, #fff 60%, var(--color-bg-green) 100%);
  padding: 80px 0 60px;
  text-align: center;
}
.hero-content { max-width: 780px; margin: 0 auto; }
.hero h1 { margin-bottom: 1.25rem; }
.hero-sub {
  font-size: 1.15rem;
  color: var(--color-light-text);
  max-width: 600px;
  margin: 0 auto 2rem;
}
.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stat strong {
  font-size: 2rem;
  color: var(--color-primary);
}
.stat span {
  font-size: .9rem;
  color: var(--color-light-text);
}

/* ================================================
   SECTIONS
   ================================================ */
.section {
  padding: 80px 0;
}
.section-alt {
  background: var(--color-bg-alt);
}

/* ---------- Steps Grid ---------- */
.steps-grid {
  display: grid;
  /* Two columns and two rows layout for four step-cards */
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  /* Make rows equal height so cards align neatly */
  grid-auto-rows: 1fr;
}

/* Responsive: single column on small screens */
@media (max-width: 560px) {
  .steps-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
}
.step-card {
  background: #e6b977;
  border-radius: var(--radius);
  padding: 40px 32px 32px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.step-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.step-icon { margin-bottom: 20px; }
.step-card h3 { margin-bottom: .75rem; color: var(--color-dark); }
.step-card p { color: var(--color-light-text); font-size: .95rem; }

/* Themed accents for each step card */
.steps-grid .step-card:nth-child(1) {
  border-left: 6px solid var(--color-primary);
  background: linear-gradient(180deg, rgba(232,116,59,.04), #fff 40%);
}
.steps-grid .step-card:nth-child(2) {
  border-left: 6px solid var(--color-accent);
  background: linear-gradient(180deg, rgba(212,162,78,.04), #fff 40%);
}
.steps-grid .step-card:nth-child(3) {
  border-left: 6px solid var(--color-green);
  background: linear-gradient(180deg, rgba(90,158,75,.04), #fff 40%);
}
.steps-grid .step-card:nth-child(4) {
  border-left: 6px solid var(--color-red);
  background: linear-gradient(180deg, rgba(226,85,85,.04), #fff 40%);
}

/* Make the icon container stand out */
.step-icon {
  margin-bottom: 20px;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  margin-left: auto;
  margin-right: auto;
  background: rgba(44,62,80,.03);
}
.step-icon-img {
  width: 90%;
  max-height: 90%;
  display: block;
  object-fit: contain;
}
.steps-grid .step-card:nth-child(1) .step-icon { background: rgba(232,116,59,.08); }
.steps-grid .step-card:nth-child(2) .step-icon { background: rgba(212,162,78,.08); }
.steps-grid .step-card:nth-child(3) .step-icon { background: rgba(90,158,75,.08); }
.steps-grid .step-card:nth-child(4) .step-icon { background: rgba(226,85,85,.08); }

/* ---------- Two Column Layout ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.two-col.reverse .col-text { order: 2; }
.two-col.reverse .col-visual { order: 1; }

.feature-list {
  list-style: none;
  margin: 1.5rem 0 2rem;
}
.feature-list li {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: flex-start;
}
.check-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-bg-warm);
  color: var(--color-primary);
  font-weight: 700;
  font-size: .85rem;
}
.check-icon.pantry {
  background: var(--color-bg-green);
  color: var(--color-green);
}

.illustration-card {
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.bakery-card { background: var(--color-bg-warm); }
.pantry-card { background: var(--color-bg-green); }
.illustration { max-width: 320px; }

/* ================================================
   PICKUP FORM
   ================================================ */
.pickup-form {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}
.form-group.full-width { grid-column: 1 / -1; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 6px;
  color: var(--color-dark);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: .95rem;
  color: var(--color-dark);
  transition: border-color var(--transition), box-shadow var(--transition);
  background: #fff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(232,116,59,.15);
}
.form-group textarea { resize: vertical; }

/* Success state */
.form-success {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}
.success-inner {
  background: #fff;
  padding: 48px 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.success-inner h3 {
  margin: 16px 0 8px;
  color: var(--color-green);
  font-size: 1.6rem;
}
.success-inner p {
  color: var(--color-light-text);
  margin-bottom: 24px;
}

/* ================================================
   TESTIMONIALS
   ================================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.testimonial {
  background: #fff;
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--color-primary);
  position: relative;
}
.testimonial p {
  font-style: italic;
  font-size: 1.02rem;
  margin-bottom: 16px;
  color: var(--color-dark);
}
.testimonial footer {
  display: flex;
  flex-direction: column;
}
.testimonial footer strong {
  color: var(--color-dark);
}
.testimonial footer span {
  font-size: .85rem;
  color: var(--color-light-text);
}

/* ================================================
   ABOUT
   ================================================ */
.about-content { max-width: 760px; margin: 0 auto; }
.about-text p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  text-align: center;
}
.about-text em { color: var(--color-primary); font-style: italic; }

/* ================================================
   FAQ
   ================================================ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 0;
}
.faq-item summary {
  padding: 20px 0;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-dark);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--color-primary);
  transition: transform var(--transition);
}
.faq-item[open] summary::after {
  content: '−';
}
.faq-item p {
  padding: 0 0 20px;
  color: var(--color-light-text);
  line-height: 1.7;
}

/* ================================================
   CONTACT
   ================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  max-width: 780px;
  margin: 0 auto;
}
.contact-card {
  text-align: center;
  background: #fff;
  padding: 36px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}
.contact-card:hover { transform: translateY(-4px); }
.contact-card h4 { margin: 12px 0 6px; color: var(--color-dark); }
.contact-card a, .contact-card p {
  color: var(--color-light-text);
  font-size: .95rem;
}

/* ================================================
   FOOTER
   ================================================ */
.site-footer {
  background: var(--color-dark);
  color: rgba(255,255,255,.7);
  padding-top: 56px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand p { margin-top: 12px; font-size: .9rem; line-height: 1.6; }
.footer-logo { height: 60px; width: auto; opacity: .95; }
.footer-logo-link { display: inline-block; }

.footer-links h4,
.footer-social h4 {
  color: #fff;
  font-size: .95rem;
  margin-bottom: 16px;
}
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: #fff; }

.social-icons {
  display: flex;
  gap: 14px;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.7);
  transition: all var(--transition);
}
.social-link:hover {
  background: var(--color-primary);
  color: #fff;
}

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: .85rem;
}

/* ================================================
   BACK TO TOP
   ================================================ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all var(--transition);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-3px);
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .two-col.reverse .col-text,
  .two-col.reverse .col-visual { order: unset; }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  /* Mobile nav */
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease, padding .35s ease;
    border-bottom: 1px solid var(--color-border);
  }
  .main-nav.open {
    max-height: 400px;
    padding: 16px 24px 24px;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }
  .main-nav li { border-bottom: 1px solid var(--color-border); }
  .main-nav a { display: block; padding: 14px 0; }

  /* Hero */
  .hero { padding: 48px 0 40px; }
  .hero-stats { gap: 28px; }

  /* Form */
  .form-grid { grid-template-columns: 1fr; }
  .pickup-form { padding: 24px; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .social-icons { justify-content: center; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 300px; }
  .stat strong { font-size: 1.6rem; }
}
