/* ===========================================================
   JE Machuca — Agroquímicos · Sistema visual
   Paleta: verde profundo · verde campo · amarillo trigo
   Tipografías: Bricolage Grotesque (display) + Hanken Grotesk (texto)
   =========================================================== */

:root {
  /* Marca */
  --green-950: #08240f;
  --green-900: #0d3b1a;
  --green-800: #134a23;
  --green-700: #1a5e2a;   /* primario */
  --green-600: #237a37;
  --green-500: #3da35d;   /* acento campo */
  --green-300: #8fce9f;
  --green-100: #dcefe0;

  --wheat-500: #f4d03f;   /* amarillo trigo */
  --wheat-400: #f7dd6b;
  --wheat-600: #d9ad1f;

  --cream: #f6f4ea;
  --paper: #fbfaf4;
  --ink: #13251a;
  --ink-soft: #41523f;
  --line: #e3e2d4;

  --accent: var(--green-500);
  --accent-strong: var(--green-700);

  --maxw: 1200px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(8,36,15,.06), 0 4px 14px rgba(8,36,15,.05);
  --shadow-md: 0 10px 30px rgba(8,36,15,.10), 0 2px 8px rgba(8,36,15,.06);
  --shadow-lg: 0 30px 70px rgba(8,36,15,.18);

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-brand: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 18px;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--green-900);
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 28px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green-600);
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; background: var(--accent); border-radius: 2px;
}

.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }

/* ============ Botones ============ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body);
  font-weight: 700; font-size: 16px;
  padding: 15px 26px; border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap; line-height: 1;
}
.btn svg { width: 19px; height: 19px; }
.btn-primary { background: var(--accent-strong); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-wa { background: #25D366; color: #07351a; }
.btn-wa:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(37,211,102,.35); }
.btn-ghost { background: transparent; color: var(--green-900); border-color: rgba(19,37,26,.18); }
.btn-ghost:hover { border-color: var(--green-700); background: rgba(26,94,42,.05); }
.btn-light { background: #fff; color: var(--green-900); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-outline-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* ============ Header / nav ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
  background: transparent;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(251,250,244,.92); backdrop-filter: blur(12px); border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark { width: 42px; height: 42px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-brand); font-weight: 800; font-size: 20px; letter-spacing: -.01em; color: var(--green-900); white-space: nowrap; }
.brand-sub { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--green-600); font-weight: 700; margin-top: 3px; }

.nav.on-dark .brand-name { color: #fff; }
.nav.on-dark .brand-sub { color: var(--wheat-400); }
.nav.on-dark .nav-link { color: rgba(255,255,255,.82); }
.nav.on-dark .nav-link:hover { color: #fff; }
.nav.on-dark .lang-toggle { border-color: rgba(255,255,255,.28); color: #fff; }
.nav.on-dark .menu-btn span { background: #fff; }

.nav-links { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.nav-link { font-weight: 600; font-size: 15.5px; color: var(--ink-soft); transition: color .15s ease; position: relative; }
.nav-link:hover { color: var(--green-700); }
.nav-actions { display: flex; align-items: center; gap: 14px; }

.lang-toggle {
  display: inline-flex; align-items: center; border: 1.5px solid var(--line);
  border-radius: 999px; overflow: hidden; font-weight: 700; font-size: 13px;
  background: rgba(255,255,255,.5);
}
.lang-toggle button {
  border: none; background: transparent; cursor: pointer; padding: 7px 12px;
  font: inherit; color: inherit; transition: background .15s ease, color .15s ease;
}
.lang-toggle button.active { background: var(--accent-strong); color: #fff; }

.menu-btn { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-btn span { width: 24px; height: 2.5px; background: var(--green-900); border-radius: 2px; transition: .25s; }

/* ============ Hero ============ */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(61,163,93,.45) 0%, transparent 55%),
    linear-gradient(160deg, var(--green-900) 0%, var(--green-800) 45%, var(--green-950) 100%);
  padding-top: 150px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M0 30 Q15 18 30 30 T60 30' fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='1.4'/%3E%3C/svg%3E");
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; position: relative; z-index: 2; padding-bottom: 110px; }
.hero h1 { color: #fff; font-size: clamp(40px, 5.6vw, 74px); font-weight: 800; }
.hero h1 .hl { color: var(--wheat-500); }
.hero-lead { font-size: clamp(17px, 1.5vw, 21px); color: rgba(255,255,255,.84); max-width: 36ch; margin-top: 22px; }
.hero-cta { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.hero-tag { font-size: 13.5px; font-weight: 600; color: #eafff0; border: 1px solid rgba(255,255,255,.22); padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.06); }

.hero-visual { position: relative; }
.media-slot { display: block; overflow: hidden; }
.media-slot > svg { width: 100%; height: 100%; display: block; }
.media-slot > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-slot > img { object-position: 35% center; }
.hero-slot { width: 100%; height: 460px; box-shadow: var(--shadow-lg); background: linear-gradient(160deg, var(--green-100), #ffffff); border-radius: 20px; }
.hero-badge {
  position: absolute; left: -26px; bottom: -26px; background: var(--wheat-500); color: var(--green-950);
  border-radius: 16px; padding: 18px 22px; box-shadow: var(--shadow-md); z-index: 3;
}
.hero-badge b { font-family: var(--font-display); font-size: 34px; display: block; line-height: 1; }
.hero-badge span { font-size: 13px; font-weight: 700; letter-spacing: .04em; }

/* franja de stats */
.hero-stats {
  position: relative; z-index: 3; display: grid; grid-template-columns: repeat(3, 1fr);
  background: rgba(255,255,255,.07); border-top: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(4px);
}
.hero-stats .stat { padding: 28px 0; text-align: center; border-right: 1px solid rgba(255,255,255,.12); }
.hero-stats .stat:last-child { border-right: none; }
.hero-stats .num { font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 3vw, 40px); color: var(--wheat-500); }
.hero-stats .lbl { font-size: 13.5px; color: rgba(255,255,255,.8); font-weight: 600; letter-spacing: .02em; margin-top: 4px; }

/* ============ Categorías ============ */
.cats { background: var(--green-900); color: #fff; }
.cats-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; margin-bottom: 44px; }
.cats-head h2 { color: #fff; font-size: clamp(30px, 3.6vw, 46px); }
.cats-head p { color: rgba(255,255,255,.74); max-width: 42ch; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cat-card {
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.13); border-radius: var(--radius); padding: 30px;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.cat-card:hover { transform: translateY(-4px); border-color: var(--wheat-500); }
.cat-ic { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: rgba(244,208,63,.16); margin-bottom: 20px; }
.cat-ic svg { width: 30px; height: 30px; stroke: var(--wheat-500); }
.cat-card h3 { color: #fff; font-size: 23px; margin-bottom: 8px; }
.cat-card p { color: rgba(255,255,255,.74); font-size: 15.5px; }

/* ============ Nosotros ============ */
.about-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: 60px; align-items: center; }
.about-visual { position: relative; }
.about-slot { width: 100%; height: 480px; box-shadow: var(--shadow-md); background: linear-gradient(160deg, var(--green-100), #ffffff); border-radius: 20px; }
.about-chip {
  position: absolute; right: -22px; top: 30px; background: #fff; border-radius: 14px;
  padding: 16px 20px; box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 12px;
}
.about-chip .dot { width: 40px; height: 40px; border-radius: 10px; background: var(--green-100); display: grid; place-items: center; }
.about-chip .dot svg { width: 22px; height: 22px; stroke: var(--green-700); }
.about-chip b { display: block; font-family: var(--font-display); font-size: 17px; color: var(--green-900); }
.about-chip span { font-size: 12.5px; color: var(--ink-soft); }

.about h2 { font-size: clamp(30px, 3.8vw, 50px); margin: 16px 0 22px; }
.about-lead { font-size: 19px; color: var(--ink-soft); }
.about-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.about-points li { display: flex; gap: 14px; align-items: flex-start; }
.about-points .tick { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--green-100); display: grid; place-items: center; margin-top: 2px; }
.about-points .tick svg { width: 15px; height: 15px; stroke: var(--green-700); }
.about-points b { color: var(--green-900); }

/* ============ Por qué elegirnos ============ */
.why { background: var(--cream); }
.why-head { text-align: center; max-width: 60ch; margin: 0 auto 56px; }
.why-head h2 { font-size: clamp(30px, 3.8vw, 50px); }
.why-head p { color: var(--ink-soft); margin-top: 16px; font-size: 19px; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.why-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 30px; transition: transform .2s ease, box-shadow .2s ease;
}
.why-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.why-ic { width: 56px; height: 56px; border-radius: 14px; background: var(--green-700); display: grid; place-items: center; margin-bottom: 22px; }
.why-ic svg { width: 28px; height: 28px; stroke: var(--wheat-500); }
.why-card h3 { font-size: 21px; margin-bottom: 10px; }
.why-card p { color: var(--ink-soft); font-size: 16px; }

/* ============ Contacto ============ */
.contact { background: var(--green-950); color: #fff; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.contact h2 { color: #fff; font-size: clamp(30px, 3.8vw, 50px); }
.contact-lead { color: rgba(255,255,255,.78); margin-top: 16px; font-size: 18px; max-width: 42ch; }
.contact-list { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list .ci { flex: none; width: 46px; height: 46px; border-radius: 12px; background: rgba(255,255,255,.08); display: grid; place-items: center; border: 1px solid rgba(255,255,255,.14); }
.contact-list .ci svg { width: 22px; height: 22px; stroke: var(--wheat-500); }
.contact-list .ck { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.6); font-weight: 700; }
.contact-list .cv { font-size: 17px; color: #fff; font-weight: 600; }
.contact-list a.cv:hover { color: var(--wheat-400); }

.form-card { background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow-lg); }
.form-card h3 { font-size: 24px; margin-bottom: 6px; }
.form-card .fc-sub { color: var(--ink-soft); font-size: 15px; margin-bottom: 24px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 14px; color: var(--green-900); margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 13px 15px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(61,163,93,.18); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-card .btn { width: 100%; justify-content: center; margin-top: 6px; }
.form-ok { display: none; text-align: center; padding: 20px; border-radius: 12px; background: var(--green-100); color: var(--green-800); font-weight: 600; margin-top: 14px; }
.form-ok.show { display: block; }

.map-wrap { margin-top: 26px; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,.14); position: relative; }
.map-wrap iframe { width: 100%; height: 280px; border: 0; display: block; filter: grayscale(.2) contrast(1.05); }

/* ============ FAQ ============ */
.faq { background: var(--paper); }
.faq-head { text-align: center; margin-bottom: 48px; }
.faq-head h2 { font-size: clamp(30px, 3.8vw, 50px); }
.faq-list { max-width: 820px; margin: 0 auto; display: grid; gap: 14px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--cream); overflow: hidden; transition: border-color .2s ease; }
.faq-item.open { border-color: var(--green-500); background: #fff; }
.faq-q { width: 100%; text-align: left; background: none; border: none; cursor: pointer; font: inherit; font-weight: 700; font-size: 18px; color: var(--green-900); padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.faq-q .pm { flex: none; width: 26px; height: 26px; position: relative; }
.faq-q .pm::before, .faq-q .pm::after { content: ""; position: absolute; background: var(--green-600); border-radius: 2px; transition: transform .25s ease; }
.faq-q .pm::before { width: 16px; height: 2.5px; top: 12px; left: 5px; }
.faq-q .pm::after { width: 2.5px; height: 16px; top: 5px; left: 12px; }
.faq-item.open .pm::after { transform: scaleY(0); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a .faq-a-inner { padding: 0 24px 22px; color: var(--ink-soft); font-size: 16.5px; }

/* ============ Footer ============ */
.footer { background: var(--green-950); color: rgba(255,255,255,.7); padding: 60px 0 28px; border-top: 1px solid rgba(255,255,255,.08); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer .brand-name { color: #fff; }
.footer .brand-sub { color: var(--wheat-400); }
.footer-about { margin-top: 18px; font-size: 15px; max-width: 38ch; }
.footer h4 { color: #fff; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 18px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; font-size: 15px; }
.footer-links a:hover { color: var(--wheat-400); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; font-size: 13.5px; color: rgba(255,255,255,.5); }

/* ============ WhatsApp flotante ============ */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%; background: #25D366;
  display: grid; place-items: center; box-shadow: 0 10px 28px rgba(37,211,102,.45);
  transition: transform .2s ease; animation: wa-pulse 2.6s infinite;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; fill: #fff; }
@keyframes wa-pulse { 0% { box-shadow: 0 10px 28px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,.45);} 70% { box-shadow: 0 10px 28px rgba(37,211,102,.45), 0 0 0 16px rgba(37,211,102,0);} 100% { box-shadow: 0 10px 28px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,0);} }

/* ============ Reveal ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .hero-grid, .about-grid, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 40px; padding-bottom: 80px; }
  .hero-visual { order: -1; }
  .hero-slot { height: 320px; }
  .about-visual { order: -1; }
  .cat-grid, .why-grid { grid-template-columns: 1fr; }
  .footer-grid { gap: 30px; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .nav-links { position: fixed; top: 76px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 10px 20px 20px;
    transform: translateY(-130%); transition: transform .3s ease; box-shadow: var(--shadow-md); margin-left: 0; }
  .nav-links.open { transform: translateY(0); }
  .nav-link { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .menu-btn { display: flex; margin-left: auto; }
  .nav-cta-desktop { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stats .stat { border-right: none; border-bottom: 1px solid rgba(255,255,255,.12); }
  .hero-badge { left: 50%; transform: translateX(-50%); bottom: -22px; }
  .about-chip { right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .wa-float { animation: none; }
  html { scroll-behavior: auto; }
}
