/* =========================================================
   Madulu Organic Farms - styles
   Palette taken from the original Lovable site
   ========================================================= */
:root {
  --forest: #193422;      /* headings, dark backgrounds */
  --green: #0e4e23;       /* deep brand green */
  --leaf: #197638;        /* accents */
  --leaf-soft: rgba(48, 166, 87, 0.14);
  --sage: #527a5f;        /* body text */
  --gold: #f9c31f;        /* banana gold */
  --gold-dark: #e0ab0a;
  --cream: #faf8f5;
  --sand: #f2eee6;
  --stone: #c5c1b9;
  --white: #ffffff;

  --serif: "Playfair Display", Georgia, serif;
  --sans: "Source Sans 3", system-ui, -apple-system, sans-serif;

  --radius: 18px;
  --shadow: 0 10px 30px rgba(25, 52, 34, 0.10);
  --shadow-lg: 0 20px 50px rgba(25, 52, 34, 0.18);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--sage);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--leaf); }
h1, h2, h3 { font-family: var(--serif); color: var(--forest); line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--forest); padding: .6rem 1rem; z-index: 200; }
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .9rem 1.6rem; border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: .55rem 1.1rem; font-size: .92rem; }
.btn-block { width: 100%; }
.btn-gold { background: var(--gold); color: var(--green); box-shadow: 0 8px 20px rgba(249, 195, 31, .35); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-ghost { border-color: rgba(250, 248, 245, .7); color: var(--cream); background: transparent; }
.btn-ghost:hover { background: rgba(250, 248, 245, .12); }
.btn-green { background: var(--green); color: var(--cream); }
.btn-green:hover { background: var(--forest); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  display: flex; align-items: center;
  transition: background .3s ease, box-shadow .3s ease;
}
.site-header.scrolled { background: rgba(25, 52, 34, .96); backdrop-filter: blur(8px); box-shadow: 0 4px 20px rgba(0,0,0,.15); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--cream); }
.brand-logo { width: 44px; height: 44px; object-fit: contain; }
.brand-text { font: 700 1.25rem var(--serif); }
.brand-text em { font-style: normal; color: var(--gold); font-weight: 600; }
.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav a:not(.btn) { color: rgba(250, 248, 245, .85); text-decoration: none; font-weight: 500; position: relative; }
.site-nav a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px; background: var(--gold); transition: width .25s; }
.site-nav a:not(.btn):hover { color: var(--white); }
.site-nav a:not(.btn):hover::after, .site-nav a.active::after { width: 100%; }

.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--cream); transition: transform .3s, opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; text-align: center; color: var(--cream); overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background: url("/images/farm-aerial.jpg") center 75% / cover no-repeat, linear-gradient(160deg, #2d5a3a, #0e4e23);
  transform: scale(1.05); animation: slowzoom 18s ease-out forwards;
}
@keyframes slowzoom { to { transform: scale(1); } }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,40,22,.55) 0%, rgba(25,52,34,.55) 55%, rgba(25,52,34,.85) 100%); }
.hero-content { position: relative; padding: calc(var(--header-h) + 3rem) 0 5rem; max-width: 860px; }
.hero h1 { color: var(--cream); font-size: clamp(2.6rem, 7vw, 5rem); margin-bottom: 1.25rem; }
.gold { color: var(--gold); }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: rgba(250, 248, 245, .9); max-width: 640px; margin: 0 auto 2.25rem; }
.pill { display: inline-block; padding: .45rem 1.1rem; border-radius: 999px; background: rgba(249,195,31,.18); border: 1px solid rgba(249,195,31,.5); color: var(--gold); font-weight: 600; font-size: .9rem; letter-spacing: .02em; margin-bottom: 1.5rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.scroll-cue { position: absolute; bottom: 1.75rem; left: 50%; width: 26px; height: 42px; margin-left: -13px; border: 2px solid rgba(250,248,245,.6); border-radius: 20px; }
.scroll-cue::after { content: ""; position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; background: var(--gold); border-radius: 2px; animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Facts strip ---------- */
.facts { background: var(--forest); color: var(--cream); }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 1.75rem 1rem; text-align: center; border-right: 1px solid rgba(250,248,245,.1); }
.fact:last-child { border-right: 0; }
.fact strong { display: block; font: 700 1.9rem var(--serif); color: var(--gold); }
.fact span { font-size: .95rem; color: rgba(250,248,245,.75); }

/* ---------- Sections ---------- */
.section { padding: clamp(4.5rem, 9vw, 7rem) 0; }
.section-cream { background: var(--cream); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 3.5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-weight: 700; font-size: .82rem; color: var(--leaf); margin-bottom: .75rem; }

/* About */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.about-media { position: relative; }
.about-media img { width: 100%; aspect-ratio: 4 / 5; max-height: 600px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-lg); background: var(--sand); }
.badge-organic { position: absolute; right: -1.25rem; bottom: 2rem; background: var(--gold); color: var(--green); border-radius: 16px; padding: 1rem 1.4rem; text-align: center; box-shadow: var(--shadow); }
.badge-organic strong { display: block; font: 700 1.8rem var(--serif); line-height: 1; }
.badge-organic span { font-weight: 600; font-size: .9rem; }
.vm-cards { display: grid; gap: 1rem; margin-top: 1.75rem; }
.vm-card { background: var(--cream); border-left: 4px solid var(--gold); border-radius: 12px; padding: 1.25rem 1.5rem; }
.vm-card h3 { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.vm-card p { margin: 0; }
.icon { color: var(--leaf); }

/* Values */
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.value { background: var(--white); border-radius: var(--radius); padding: 1.75rem 1.5rem; box-shadow: 0 2px 10px rgba(25,52,34,.05); border: 1px solid rgba(25,52,34,.06); transition: transform .25s, box-shadow .25s; }
.value:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.value-icon { width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.5rem; background: var(--leaf-soft); border-radius: 14px; margin-bottom: 1rem; }
.value h3 { font-size: 1.15rem; }
.value p { font-size: .97rem; margin: 0; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 260px; gap: 1rem; }
.gallery-wide { grid-column: span 3; grid-row: span 2; }
.gallery-wide img { object-position: center 70%; }
.gallery-item { position: relative; padding: 0; font: inherit; border: 0; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; background: var(--sand); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; transition: transform .6s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.5rem 1.25rem 1rem; text-align: left; color: var(--cream); font-weight: 600; background: linear-gradient(transparent, rgba(25,52,34,.85)); }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--green), var(--forest)); color: var(--cream); padding: 3.5rem 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-band h2 { color: var(--cream); font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: .35rem; }
.cta-band p { margin: 0; color: rgba(250,248,245,.8); }
.cta-actions { display: flex; gap: .9rem; flex-wrap: wrap; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 2.5rem; align-items: start; }
.contact-info { display: grid; gap: 1.25rem; }
.info-item { display: flex; gap: 1rem; align-items: flex-start; }
.info-icon { flex: none; width: 46px; height: 46px; display: grid; place-items: center; background: var(--leaf-soft); border-radius: 12px; font-size: 1.2rem; }
.info-item h3 { font: 700 1rem var(--sans); color: var(--forest); margin: 0 0 .15rem; }
.info-item p { margin: 0; }
.info-item a { color: var(--sage); text-decoration: none; }
.info-item a:hover { color: var(--leaf); text-decoration: underline; }
.map-wrap { margin-top: .5rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16 / 10; background: var(--sand); }
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

.contact-form { background: var(--white); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow); display: grid; gap: 1rem; }
.contact-form h3 { font-size: 1.5rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-form label { display: grid; gap: .35rem; font-weight: 600; font-size: .92rem; color: var(--forest); }
.contact-form input, .contact-form textarea, .contact-form select {
  font: 400 1rem var(--sans); color: var(--forest);
  padding: .8rem 1rem; border: 1.5px solid #e2ded5; border-radius: 10px; background: var(--cream);
  transition: border-color .2s, box-shadow .2s;
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 3px var(--leaf-soft); }
.contact-form .invalid { border-color: #c0392b; }
.contact-form textarea { resize: vertical; }
.hp { position: absolute; left: -9999px; }
.form-status { margin: 0; min-height: 1.5em; font-weight: 600; }
.form-status.ok { color: var(--leaf); }
.form-status.err { color: #c0392b; }

/* Footer */
.site-footer { background: var(--forest); color: rgba(250,248,245,.75); padding: 3.5rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; align-items: start; }
.footer-brand { font: 700 1.4rem var(--serif); color: var(--cream); margin: 0; display: flex; align-items: center; gap: .6rem; }
.footer-brand em { font-style: normal; color: var(--gold); }
.footer-tag { margin: .3rem 0 0; }
.site-footer nav, .footer-contact { display: grid; gap: .45rem; }
.site-footer a { color: rgba(250,248,245,.8); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(250,248,245,.1); margin-top: 2.5rem; padding-top: 1.25rem; font-size: .9rem; }
.footer-bottom p { margin: 0; }

/* WhatsApp float */
.wa-float { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 90; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: transform .2s; }
.wa-float:hover { transform: scale(1.08); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(10, 22, 14, .92); display: grid; place-items: center; padding: 2rem; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(1100px, 100%); }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: 12px; }
.lightbox figcaption { text-align: center; color: var(--cream); margin-top: 1rem; }
.lightbox-close { position: absolute; top: 1rem; right: 1.25rem; background: none; border: 0; color: var(--cream); font-size: 2.5rem; cursor: pointer; line-height: 1; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-bg { animation: none; transform: none; }
  .scroll-cue::after { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .values-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--forest); padding: .5rem 1.25rem 1.5rem;
    transform: translateY(-120%); transition: transform .3s ease; box-shadow: 0 10px 20px rgba(0,0,0,.2);
  }
  .site-nav.open { transform: none; }
  .site-nav a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid rgba(250,248,245,.08); }
  .site-nav .btn { margin-top: 1rem; }
  .site-header { background: rgba(25, 52, 34, .96); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .badge-organic { right: 1rem; }
  .about-media img { aspect-ratio: 4 / 3; }
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(2) { border-right: 0; }
  .fact:nth-child(-n+2) { border-bottom: 1px solid rgba(250,248,245,.1); }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; }
  .gallery-wide { grid-column: span 2; grid-row: span 1; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .values-grid, .field-row { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .gallery-wide { grid-column: span 1; }
  .cta-actions, .cta-actions .btn { width: 100%; }
}
