/* ============ Agrícola Miramar ============ */
:root {
  --green-900: #16301f;
  --green-800: #1e4029;
  --green-700: #2a5a38;
  --green-500: #4a8f5c;
  --green-100: #e8f1ea;
  --cream: #faf7f0;
  --sand: #f1ebdd;
  --earth: #8a6f4d;
  --ink: #1c211d;
  --text: #3d443e;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(22, 48, 31, 0.14);
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

::selection { background: var(--green-500); color: #fff; }

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 72px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; }

h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1rem; }

.center { text-align: center; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }

/* ============ Nav ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  background: rgba(250, 247, 240, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 16px rgba(22, 48, 31, 0.08);
}
.nav-inner {
  max-width: 1140px; margin: 0 auto; padding: 0.9rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav-brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-head); font-weight: 700; font-size: 1.15rem;
  color: var(--white); text-decoration: none;
}
.nav.scrolled .nav-brand { color: var(--green-900); }
.nav-logo { height: 38px; width: auto; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }
.nav-links { display: flex; gap: 1.6rem; }
.nav-links a {
  color: rgba(255,255,255,0.85); text-decoration: none;
  font-size: 0.92rem; font-weight: 500; transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -5px;
  width: 0; height: 2px; background: currentColor;
  border-radius: 2px; transition: width 0.25s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: var(--white); }
.nav.scrolled .nav-links a { color: var(--text); }
.nav.scrolled .nav-links a:hover { color: var(--green-700); }
.nav-actions { display: flex; align-items: center; gap: 0.9rem; }

.lang-toggle {
  display: flex; gap: 0.3rem; align-items: center;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px; padding: 0.3rem 0.75rem; cursor: pointer;
  color: var(--white); font-size: 0.8rem; font-family: var(--font-body);
}
.nav.scrolled .lang-toggle {
  background: var(--green-100); border-color: var(--green-500); color: var(--green-800);
}
.lang-opt { opacity: 0.55; font-weight: 500; }
.lang-opt.active { opacity: 1; font-weight: 700; }
.lang-sep { opacity: 0.4; }

.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 4px;
}
.nav-burger span {
  width: 22px; height: 2px; background: var(--white); border-radius: 2px;
}
.nav.scrolled .nav-burger span { background: var(--green-900); }

/* ============ Hero ============ */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: var(--white);
  background: linear-gradient(160deg, var(--green-900), var(--green-700));
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  animation: kenburns 26s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes kenburns {
  from { transform: scale(1) translateY(0); }
  to   { transform: scale(1.08) translateY(-1.5%); }
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,48,31,0.55), rgba(22,48,31,0.75));
}
.hero-content { position: relative; z-index: 2; padding: 6rem 1.5rem 4rem; max-width: 800px; }
.hero-content > * { animation: heroUp 0.9s cubic-bezier(.16,1,.3,1) both; }
.hero-content > *:nth-child(2) { animation-delay: 0.12s; }
.hero-content > *:nth-child(3) { animation-delay: 0.24s; }
.hero-content > *:nth-child(4) { animation-delay: 0.36s; }
@keyframes heroUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
.hero-kicker {
  text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.8rem;
  font-weight: 600; color: #cfe4d4; margin-bottom: 1rem;
}
.hero-title {
  font-size: clamp(2.6rem, 7vw, 4.6rem); color: var(--white);
  margin-bottom: 1.2rem; font-weight: 700;
}
.hero-sub {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: rgba(255,255,255,0.9);
  margin-bottom: 2.2rem; max-width: 620px; margin-left: auto; margin-right: auto;
}
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-scroll {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.7); font-size: 1.4rem; text-decoration: none;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 8px); } }

/* ============ Buttons ============ */
.btn {
  display: inline-block; padding: 0.85rem 1.9rem; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--green-500); color: var(--white);
  box-shadow: 0 8px 20px rgba(74, 143, 92, 0.35);
}
.btn-primary:hover { background: var(--green-700); }
.btn-outline {
  border: 2px solid rgba(255,255,255,0.75); color: var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }

/* ============ Sections ============ */
.section { padding: 5.5rem 0; }
.section-alt { background: var(--sand); }
.section-dark { background: var(--green-900); }
.section-dark h2, .section-dark .eyebrow, .section-dark p, .section-dark li { color: var(--cream); }
.section-dark .eyebrow { color: #a8c9b2; }

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.75rem;
  font-weight: 600; color: var(--green-500); margin-bottom: 0.6rem;
}
.section-lead {
  text-align: center; max-width: 640px; margin: 0 auto 3rem;
  font-size: 1.08rem;
}
.section-dark .section-lead { color: rgba(250,247,240,0.8); }

.two-col {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3.5rem; align-items: center;
}
.col-text p + p { margin-top: 1rem; }
.col-text.light p { color: rgba(250,247,240,0.85); }

.col-media {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  min-height: 320px; background: linear-gradient(150deg, var(--green-100), var(--sand));
}
.col-media img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.col-media.img-missing {
  display: flex; align-items: center; justify-content: center;
}
.col-media.img-missing::after {
  content: "🌿"; font-size: 3.5rem; opacity: 0.5;
}
.map-wrap { box-shadow: var(--shadow); }

.story-logo { height: 72px; width: auto; margin-bottom: 1.2rem; }

/* ============ Story stats ============ */
.story-stats { display: flex; gap: 2.5rem; margin-top: 2.2rem; }
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--font-head); font-size: 2.2rem; font-weight: 700;
  color: var(--green-700); font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 0.85rem; color: var(--text); }

/* ============ Products ============ */
.product-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
}
.product-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 6px 20px rgba(22,48,31,0.08);
  transition: transform 0.25s, box-shadow 0.25s;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.product-img {
  aspect-ratio: 4/3; overflow: hidden;
  background: linear-gradient(150deg, var(--green-100), var(--sand));
  display: flex; align-items: center; justify-content: center;
}
.product-img.img-missing img { display: none; }
.product-img.img-missing::after { content: "🌿"; font-size: 2.4rem; opacity: 0.45; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.product-card:hover .product-img img { transform: scale(1.05); }
.product-card h3 { padding: 1rem 1.2rem 0.15rem; font-size: 1.15rem; }
.product-card p { padding: 0 1.2rem 1.3rem; font-size: 0.88rem; color: var(--text); }

/* ============ Export check-list ============ */
.check-list { list-style: none; margin-top: 1.4rem; }
.check-list li {
  padding: 0.55rem 0 0.55rem 2rem; position: relative;
}
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0.55rem;
  width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: var(--green-500); color: var(--white);
  font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ============ Gallery ============ */
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1rem; margin-top: 2.5rem;
}
.g-item {
  border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(150deg, var(--green-100), var(--sand));
}
.gallery-grid img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  transition: transform 0.5s cubic-bezier(.16,1,.3,1), filter 0.5s;
}
.g-item:hover img { transform: scale(1.06); filter: brightness(1.05); }
.g-item:has(img.img-missing) {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1;
}
.g-item:has(img.img-missing)::after { content: "🌿"; font-size: 2rem; opacity: 0.4; }
.g-item img.img-missing { display: none; }

/* ============ Location ============ */
.location-address { margin-top: 1.4rem; font-size: 1.02rem; }

/* ============ Contact ============ */
.contact-cards {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem; max-width: 1060px; margin: 0 auto;
}
.contact-card {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius); padding: 2rem 1.4rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  text-decoration: none; text-align: center;
  transition: transform 0.2s, background 0.2s;
}
a.contact-card:hover { transform: translateY(-4px); background: rgba(255,255,255,0.1); }
.contact-icon { font-size: 1.6rem; color: #a8c9b2; }
.contact-label {
  text-transform: uppercase; letter-spacing: 0.15em;
  font-size: 0.72rem; color: #a8c9b2; font-weight: 600;
}
.contact-value { color: var(--cream); font-weight: 500; font-size: 0.95rem; }

/* ============ Footer ============ */
.footer { background: #0f2015; padding: 1.8rem 0; }
.footer-brand { display: flex; justify-content: center; margin-bottom: 1.1rem; }
.footer-logo { height: 44px; width: auto; opacity: 0.85; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.6rem;
  color: rgba(250,247,240,0.55); font-size: 0.85rem;
}
.footer-ig {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: rgba(250,247,240,0.55); text-decoration: none; transition: color 0.2s;
}
.footer-ig:hover { color: var(--cream); }

/* ============ Scroll reveal ============ */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.16,1,.3,1);
}
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-bg, .hero-content > * { animation: none; }
}

/* ============ Lightbox ============ */
.product-img img, .g-item img { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(12, 24, 16, 0.93);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
  padding: 1.5rem;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img {
  max-width: 92vw; max-height: 80vh; width: auto; height: auto;
  border-radius: 12px; box-shadow: 0 24px 70px rgba(0,0,0,0.5);
  transform: scale(0.93); transition: transform 0.35s cubic-bezier(.16,1,.3,1);
}
.lightbox.open img { transform: scale(1); }
.lightbox figcaption {
  margin-top: 0.9rem; color: var(--cream);
  font-family: var(--font-head); font-size: 1.15rem;
}
.lb-close {
  position: absolute; top: 1rem; right: 1.3rem;
  background: none; border: 0; color: var(--cream);
  font-size: 2.4rem; line-height: 1; cursor: pointer; opacity: 0.8;
  transition: opacity 0.2s;
}
.lb-close:hover { opacity: 1; }

/* ============ WhatsApp float ============ */
.wa-float {
  position: fixed; bottom: 1.4rem; right: 1.4rem; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  transition: transform 0.2s;
}
.wa-float:hover { transform: scale(1.08); }

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; gap: 2.2rem; }
  .contact-cards { grid-template-columns: 1fr; max-width: 440px; }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed; inset: 0; top: 0; z-index: -1;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 1.8rem; background: var(--green-900);
    opacity: 0; pointer-events: none; transition: opacity 0.25s;
  }
  .nav-links.open { opacity: 1; pointer-events: auto; z-index: 99; }
  .nav-links.open a { color: var(--white); font-size: 1.2rem; }
  .nav-burger { display: flex; z-index: 100; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .section { padding: 3.2rem 0; }
  .hero-content { padding-top: 5rem; }

  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
  .product-card h3 { padding: 0.7rem 0.8rem 0.1rem; font-size: 0.98rem; }
  .product-card p { padding: 0 0.8rem 0.9rem; font-size: 0.76rem; line-height: 1.45; }
  .product-img { aspect-ratio: 1/1; }

  .story-stats { gap: 1.4rem; }
  .stat-num { font-size: 1.7rem; }
  .section-lead { margin-bottom: 2rem; font-size: 0.98rem; }
}

@media (max-width: 520px) {
  .two-col { gap: 1.6rem; }
  .contact-cards { gap: 1rem; }
  .contact-card { padding: 1.3rem 1rem; }
}
