/* ===================================================================
   AgroFire — design tokens
   Canvas claro + bloques sólidos en el verde/naranja/amarillo del
   logo, tarjetas redondeadas de borde fino, fotos a pleno ancho.
   =================================================================== */
:root {
  --canvas: #faf8f2;
  --canvas-text: #12271a;
  --canvas-muted: #57604f;
  --canvas-border: #dcdccb;

  --green-950: #0d2417;
  --green-900: #123420;
  --green-800: #1d4a2c;
  --green-line: rgba(140, 205, 150, 0.32);

  --green: #3c8c34;
  --green-bright: #6fcf5e;
  --yellow: #f5b731;
  --orange: #f2601b;
  --red: #d62828;

  --white: #ffffff;
  --white-muted: rgba(255, 255, 255, 0.72);

  --font: "Manrope", sans-serif;

  --wrap: 1180px;
  --gap: clamp(24px, 6vw, 96px);
  --r-lg: 32px;
  --r-md: 20px;
}

/* ===================================================================
   Reset
   =================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--canvas-text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--orange);
  color: #1a1204;
  padding: 10px 16px;
  z-index: 999;
  font-weight: 600;
}
.skip-link:focus { left: 12px; top: 12px; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.hl {
  color: var(--green-bright);
  font-weight: 700;
}
.hl--onLight { color: var(--green); }
.hl--orange { color: var(--orange); }

/* ===================================================================
   Header — transparent over the hero photo, solidifies on scroll
   =================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-solid {
  background: var(--green-950);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand { display: flex; align-items: center; }
.brand-mark { height: 28px; width: auto; }
.brand-word {
  font-weight: 800;
  font-size: 20px;
  color: var(--white);
  align-items: center;
}
.main-nav {
  display: flex;
  gap: 32px;
  font-size: 14.5px;
  font-weight: 500;
}
.main-nav a { color: var(--white-muted); transition: color 0.15s ease; }
.main-nav a:hover { color: var(--white); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--white);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.site-header.is-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.site-header.is-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--green-950);
  padding: 4px clamp(20px, 5vw, 56px) 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.mobile-nav a {
  padding: 14px 0;
  color: var(--white-muted);
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--white); }

@media (max-width: 780px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .site-header.is-open { background: var(--green-950); }
  .site-header.is-open .mobile-nav { display: flex; }
}

/* ===================================================================
   Buttons
   =================================================================== */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  transition: transform 0.2s ease, background 0.2s ease;
}
a.btn-pill:hover { transform: translateY(-2px); }
.btn-pill--tonal { background: var(--green-800); color: var(--white); }
.btn-pill--tonal:hover { background: var(--green); }
.btn-pill--white { background: var(--white); color: var(--green-950); }
.btn-pill--white:hover { background: var(--yellow); }

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--canvas-muted);
  font-weight: 700;
}
.eyebrow--onDark { color: var(--green-bright); }

/* ===================================================================
   Hero — full-bleed photo, nav floats transparent on top
   =================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--green-950);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero--empty .hero-bg { display: none; }
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 50%, rgba(6, 12, 8, 0.4), transparent 70%),
    linear-gradient(to bottom, rgba(8, 16, 10, 0.55) 0%, rgba(8, 16, 10, 0.12) 22%, rgba(8, 16, 10, 0.18) 65%, rgba(8, 16, 10, 0.6) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
  color: var(--white);
}
.hero-kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}
.hero-content h1 {
  margin: 0;
  font-size: clamp(34px, 5.6vw, 64px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.reveal-in {
  opacity: 0;
  transform: translateY(16px);
  animation: heroIn 0.9s ease forwards;
}
.reveal-in-1 { animation-delay: 0.1s; }
.reveal-in-2 { animation-delay: 0.24s; }
.reveal-in-3 { animation-delay: 0.4s; }
@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-in { animation: none; opacity: 1; transform: none; }
}

/* ===================================================================
   Producto — mockup showcase
   =================================================================== */
.producto-inner { text-align: center; }
.section-head-center { max-width: 620px; margin-left: auto; margin-right: auto; }
.producto-sub {
  margin-top: 14px;
  color: var(--canvas-muted);
  font-size: 16px;
}

.mockup-float {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  animation: bob 6s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@media (prefers-reduced-motion: reduce) {
  .mockup-float { animation: none; }
}
.mockup-tilt {
  transform: rotateX(0deg) rotateY(0deg);
  transition: transform 0.35s ease-out;
  transform-style: preserve-3d;
  filter: drop-shadow(0 30px 44px rgba(18, 39, 26, 0.28));
}
.mockup-img { width: 100%; height: auto; }

.mockup-phone {
  position: absolute;
  right: 1%;
  bottom: -5%;
  width: 22%;
  z-index: 2;
  filter: drop-shadow(0 18px 26px rgba(18, 39, 26, 0.3));
  animation: bob 6s ease-in-out infinite;
  animation-delay: 0.4s;
}
.mockup-phone-img { width: 100%; height: auto; display: block; }
@media (prefers-reduced-motion: reduce) {
  .mockup-phone { animation: none; }
}

/* ===================================================================
   Redes — Instagram phone showcase
   =================================================================== */
.social-inner { text-align: center; }
.social-phones {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(8px, 3vw, 32px);
  margin-bottom: 40px;
}
.social-phone-img {
  height: clamp(300px, 38vw, 460px);
  width: auto;
  filter: drop-shadow(0 24px 36px rgba(18, 39, 26, 0.22));
  transition: transform 0.3s ease;
}
.social-phone--alt .social-phone-img { transform: translateY(4%); }
.social-phone:hover .social-phone-img { transform: translateY(-6px); }
.social-phone--alt:hover .social-phone-img { transform: translateY(calc(4% - 6px)); }

@media (max-width: 640px) {
  .social-phones { gap: 4px; }
  .social-phone-img { height: clamp(220px, 52vw, 320px); }
}

/* ===================================================================
   Poster — pre-composed photo slides, shown as a contained,
   rounded-corner object (not full-bleed) sitting on the canvas.
   =================================================================== */
section.poster-section { padding: clamp(20px, 4vw, 64px) 0; }

.poster {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--green-950);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(18, 39, 26, 0.16);
}
.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.poster--empty .poster-img { display: none; }
.poster--empty::after {
  content: "Falta la imagen en images/photos/";
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--white-muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* ===================================================================
   Sections — shared
   =================================================================== */
.section { padding: var(--gap) 0; }
section[id] { scroll-margin-top: 80px; }
.section-deep { background: var(--green-950); }
.section-deep + .section-deep { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.section-light { background: var(--canvas); }

.section-head { max-width: 560px; margin-bottom: 48px; }
.section-head h2 {
  margin-top: 12px;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.18;
  font-weight: 800;
  color: var(--canvas-text);
}
.section-deep .section-head h2 { color: var(--white); }

/* ===================================================================
   Cards
   =================================================================== */
.card-grid {
  display: grid;
  gap: 20px;
}
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  border: 1px solid var(--green-line);
  border-radius: var(--r-md);
  padding: 36px 26px;
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
div.card:hover {
  transform: translateY(-4px);
  border-color: var(--green-bright);
  background: rgba(255, 255, 255, 0.03);
}

.card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 1px solid var(--green-line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-bright);
}

.card-step {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white-muted);
  margin-bottom: 8px;
}

.card h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}
.card p { color: var(--white-muted); font-size: 14.5px; line-height: 1.6; }

/* risk variant */
.risk-dot { display: block; width: 14px; height: 14px; border-radius: 50%; }
.card-risk-1 .card-icon { border-color: rgba(111, 207, 94, 0.5); }
.card-risk-1 .risk-dot { background: var(--green-bright); }
.card-risk-2 .card-icon { border-color: rgba(245, 183, 49, 0.5); }
.card-risk-2 .risk-dot { background: var(--yellow); }
.card-risk-3 .card-icon { border-color: rgba(242, 96, 27, 0.5); }
.card-risk-3 .risk-dot { background: var(--orange); }
.card-risk-4 .card-icon { border-color: rgba(214, 40, 40, 0.5); }
.card-risk-4 .risk-dot { background: var(--red); }

.risk-note {
  max-width: 480px;
  margin: 32px auto 0;
  text-align: center;
  color: var(--white-muted);
  font-size: 15px;
}

@media (max-width: 900px) {
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .card-grid-4 { grid-template-columns: 1fr; }
}

/* ===================================================================
   Cotizador + Contacto — forms
   =================================================================== */
.producto-sub--onDark { color: var(--white-muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.field label, .quote-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.field input, .field textarea, .quote-ha input {
  font: inherit;
  font-size: 15px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--canvas-border);
  background: var(--white);
  color: var(--canvas-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus, .quote-ha input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(60, 140, 52, 0.25);
}
.field input.is-invalid, .field textarea.is-invalid, .quote-ha input.is-invalid {
  border-color: var(--red);
}

.btn-submit { border: none; cursor: pointer; font-family: inherit; justify-content: center; }
.btn-submit:hover:not(:disabled) { transform: translateY(-2px); }
.btn-submit:disabled { opacity: 0.6; cursor: progress; }

.form-status { min-height: 1.6em; font-size: 14.5px; font-weight: 500; color: var(--white-muted); }
.form-status.is-ok { color: var(--green-bright); }
.form-status.is-error { color: #ff8a7a; }
.form-status--light { color: var(--canvas-muted); text-align: center; }
.form-status--light.is-ok { color: var(--green); }
.form-status--light.is-error { color: var(--red); }

/* cotizador */
.quote {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--green-line);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.03);
  color: var(--white);
}
.quote-calc { display: flex; flex-direction: column; gap: 14px; }
.quote-ha { position: relative; }
.quote-ha input { font-size: 28px; font-weight: 800; padding-right: 60px; }
.quote-ha-unit {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-weight: 700; color: var(--canvas-muted);
}
.quote input[type="number"] { -moz-appearance: textfield; }
.quote input[type="number"]::-webkit-outer-spin-button,
.quote input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.quote input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 999px; cursor: pointer;
  background: linear-gradient(to right, var(--green-bright) var(--fill, 0%), rgba(255, 255, 255, 0.18) var(--fill, 0%));
}
.quote input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--white); border: 4px solid var(--green-bright);
}
.quote input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--white); border: 4px solid var(--green-bright);
}
.quote-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--white-muted); margin-top: -6px; }

.quote-total {
  margin-top: 8px; padding: 22px; border-radius: var(--r-md);
  border: 1px solid var(--green-line); background: rgba(111, 207, 94, 0.08);
}
.quote-total-label { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--white-muted); }
.quote-total-value { font-size: clamp(32px, 5vw, 44px); font-weight: 800; color: var(--green-bright); line-height: 1.15; }
.quote-total-unit { font-size: 13.5px; color: var(--white-muted); }

.quote-data { display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.quote .field label { color: var(--white); }
.quote-data .btn-submit { margin-top: 4px; }

/* contacto */
.contact { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; align-items: center; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; width: 100%; }
.field--full { grid-column: 1 / -1; }

/* tablet: cotizador en una columna, nav más compacta */
@media (max-width: 900px) {
  .main-nav { gap: 22px; }
  .quote { grid-template-columns: 1fr; max-width: 560px; }
  .quote-data .btn-submit { align-self: stretch; }
}

/* celular */
@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact .btn-submit { align-self: stretch; }

  /* 16px evita el zoom automático de iOS al enfocar un campo */
  .field input, .field textarea { font-size: 16px; }
  .quote-ha input { font-size: 26px; }
}

@media (max-width: 480px) {
  .quote { padding: 22px 18px; border-radius: 24px; gap: 28px; }
  .quote-total { padding: 18px; }
  .btn-submit { width: 100%; padding: 16px 20px; }
  .section-head { margin-bottom: 32px; }
}

/* pantallas táctiles: slider más fácil de agarrar */
@media (pointer: coarse) {
  .quote input[type="range"] { height: 8px; padding: 14px 0; background-clip: content-box; }
  .quote input[type="range"]::-webkit-slider-thumb { width: 30px; height: 30px; }
  .quote input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; }
}

/* ===================================================================
   Footer
   =================================================================== */
.site-footer {
  padding: clamp(40px, 6vw, 72px) 0 28px;
  background: var(--green-950);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr;
  gap: clamp(28px, 5vw, 64px);
  padding-bottom: 40px;
}
.footer-brand a { display: inline-flex; }
.footer-mark { height: 34px; width: auto; }
.footer-word { font-weight: 800; font-size: 22px; color: var(--white); }
.footer-tag {
  margin-top: 16px;
  max-width: 340px;
  color: var(--white-muted);
  font-size: 14.5px;
  line-height: 1.65;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h3 {
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-bright);
}
.footer-col a {
  align-self: flex-start;
  color: var(--white-muted);
  font-size: 14.5px;
  overflow-wrap: anywhere;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--white); }
.footer-col .footer-cta { margin-top: 6px; color: var(--yellow); font-weight: 600; }
.footer-col .footer-cta:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: var(--white-muted);
}
.footer-up { color: var(--white-muted); transition: color 0.15s ease; }
.footer-up:hover { color: var(--white); }

@media (max-width: 760px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ===================================================================
   Scroll reveal
   =================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.poster.reveal .poster-img {
  transform: scale(1.06);
  transition: transform 1.2s ease;
}
.poster.reveal.is-visible .poster-img { transform: scale(1); }

/* cards drop in with a curved, slightly rotated arc instead of a straight rise */
.card-grid .card.reveal {
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.card-grid .card.reveal:nth-child(1) { transform: translateY(-56px) rotate(-5deg); transition-delay: 0s; }
.card-grid .card.reveal:nth-child(2) { transform: translateY(-56px) rotate(4deg); transition-delay: 0.09s; }
.card-grid .card.reveal:nth-child(3) { transform: translateY(-56px) rotate(-4deg); transition-delay: 0.18s; }
.card-grid .card.reveal:nth-child(4) { transform: translateY(-56px) rotate(5deg); transition-delay: 0.27s; }
.card-grid .card.reveal.is-visible { transform: translateY(0) rotate(0deg); }

@media (prefers-reduced-motion: reduce) {
  .card-grid .card.reveal:nth-child(n) { transform: none; }
}
