/* ==========================================================================
   Cusillos S.A. · estilos
   ========================================================================== */

:root {
  /* Marca */
  --teal: #004b55;
  --teal-900: #003840;
  --teal-950: #002c33;
  --teal-field: rgba(255, 255, 255, 0.1);
  --rust: #b5541e;
  --orange: #ed6f2d;
  --orange-600: #d65d1f;
  --gold: #f0ad3f;
  --ink: #1f2a2c;
  --ink-soft: #4a5759;
  --paper: #ffffff;
  --paper-warm: #f6f3ee;
  --line: rgba(0, 75, 85, 0.12);
  --on-dark-soft: rgba(255, 255, 255, 0.78);
  --on-dark-line: rgba(255, 255, 255, 0.16);

  /* Tipografía */
  --font-head: "Raleway", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Montserrat", ui-sans-serif, system-ui, sans-serif;

  /* Espaciado (base 4) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;
  --s-20: 80px; --s-24: 96px; --s-32: 128px;
  --section-y: clamp(80px, 10vw, 144px);
  --band-y: clamp(64px, 8vw, 112px);

  /* Layout */
  --max: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --col-gap: clamp(20px, 3vw, 40px);
  --header-h: 88px;

  /* Movimiento */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --radius: 4px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) - 8px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
h1, h2, h3 { margin: 0; font-family: var(--font-head); font-weight: 500; line-height: 1.15; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
button { font: inherit; color: inherit; }

::selection { background: var(--gold); color: var(--teal-950); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 2px; }
.band :focus-visible, .hero :focus-visible, .footer :focus-visible, .mv__panel--rust :focus-visible { outline-color: var(--gold); }

html { scrollbar-color: var(--teal) transparent; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--paper-warm); }
::-webkit-scrollbar-thumb { background: var(--teal); border-radius: 10px; border: 2px solid var(--paper-warm); }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--teal); color: #fff; padding: 10px 16px; border-radius: var(--radius);
  text-decoration: none; transition: top 160ms var(--ease-out);
}
.skip:focus { top: 16px; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}
.section { padding-block: var(--section-y); }
.band { padding-block: var(--band-y); color: #fff; }
.band--teal { background: var(--teal); }
.band--rust { background: var(--rust); }

/* ---------- Tipografía ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-size: 14px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal); margin-bottom: var(--s-5);
}
.eyebrow::before { content: "//"; color: var(--orange); letter-spacing: 0.05em; }
.eyebrow { flex-wrap: wrap; }
.eyebrow__sep { color: var(--orange); letter-spacing: 0.05em; }
.eyebrow--light { color: #fff; }
.eyebrow--light::before { color: var(--gold); }

.h2 {
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.14;
  letter-spacing: -0.015em;
  color: var(--teal);
}
.band .h2 { color: #fff; }
.h2--sm { font-size: clamp(24px, 2.4vw, 32px); }
.h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.005em; }

/* ---------- Botones y links ---------- */
.btn {
  --btn-bg: var(--orange);
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  background: var(--btn-bg); color: #fff;
  font: 600 14px/1 var(--font-body); letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; border: 0; border-radius: var(--radius); cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12), 0 6px 16px -6px rgba(237,111,45,0.55);
  transition: background-color 200ms var(--ease-out), transform 160ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.btn__arrow { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 240ms var(--ease-out); }
.btn:active { transform: scale(0.97); }
.btn__spinner { display: none; }
.btn__wa { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-left: -4px; }

.link-light {
  position: relative; color: #fff; text-decoration: none; font-weight: 500; padding-block: 6px;
}
.link-light::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: currentColor;
  transform-origin: right; transition: transform 320ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover { --btn-bg: var(--orange-600); transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,0.14), 0 10px 24px -8px rgba(237,111,45,0.7); }
  .btn:hover .btn__arrow { transform: translateX(3px); }
  .btn:active { transform: scale(0.97); }
  .link-light:hover::after { transform: scaleX(0); }
}

/* ---------- Iconos ---------- */
.icon { width: 40px; height: 40px; fill: none; stroke: var(--teal); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon--gold { stroke: var(--gold); }
.icon--sm { width: 20px; height: 20px; stroke-width: 1.6; }

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  transition: box-shadow 240ms var(--ease-out);
}
.header.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 8px 24px -12px rgba(0, 44, 51, 0.18); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.header__logo { display: block; flex-shrink: 0; }
.header__logo img { width: 84px; height: auto; transition: width 240ms var(--ease-out); }
.header.is-scrolled .header__logo img { width: 72px; }

.nav { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); }
.nav a { position: relative; font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none; padding-block: 8px; }
.nav a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; border-radius: 2px;
  background: var(--orange); transform: scaleX(0); transform-origin: left;
  transition: transform 280ms var(--ease-out);
}
.nav a.is-active:not(.nav__cta)::after { transform: scaleX(1); }
.nav a.is-active:not(.nav__cta) { color: var(--teal); }
.nav__cta {
  padding: 10px 18px !important; border: 1px solid var(--teal); border-radius: var(--radius); color: var(--teal) !important;
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.nav__cta.is-active { background: var(--teal); color: #fff !important; }
@media (hover: hover) and (pointer: fine) {
  .nav a:not(.nav__cta):hover::after { transform: scaleX(1); }
  .nav__cta:hover { background: var(--teal); color: #fff !important; }
}

.nav { margin-left: auto; }
.lang { display: flex; align-items: center; gap: 2px; margin-left: clamp(16px, 2vw, 28px); padding-left: clamp(12px, 1.6vw, 20px); border-left: 1px solid var(--line); }
.lang__btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-width: 36px; min-height: 36px; padding: 0 6px; border: 0; border-radius: var(--radius); background: none; cursor: pointer;
  font: 600 13px/1 var(--font-body); letter-spacing: 0.08em; color: var(--ink-soft);
  transition: color 200ms var(--ease-out);
}
.lang__btn[aria-pressed="true"] { color: var(--teal); text-decoration: underline 2px var(--orange); text-underline-offset: 6px; }
.lang__flag {
  width: 21px; height: 14px; flex-shrink: 0; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  opacity: 0.55; filter: saturate(0.6); transition: opacity 200ms var(--ease-out), filter 200ms var(--ease-out);
}
.lang__btn[aria-pressed="true"] .lang__flag { opacity: 1; filter: none; }
@media (hover: hover) and (pointer: fine) {
  .lang__btn:hover { color: var(--teal); }
  .lang__btn:hover .lang__flag { opacity: 1; filter: none; }
}

.nav-toggle { display: none; position: relative; width: 44px; height: 44px; margin-right: -10px; background: none; border: 0; cursor: pointer; }
.nav-toggle span {
  position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px; background: var(--teal);
  transition: transform 280ms var(--ease-out), top 280ms var(--ease-out);
}
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(560px, calc(100svh - var(--header-h)), 860px);
  display: flex; flex-direction: column; justify-content: center;
  color: #fff; background: var(--teal);
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% center; transform-origin: 75% 55%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(0,60,68,0.94) 0%, rgba(0,70,80,0.78) 32%, rgba(0,75,85,0.25) 62%, rgba(0,75,85,0) 78%),
    linear-gradient(0deg, rgba(0,44,51,0.55) 0%, rgba(0,44,51,0) 30%);
}
.hero__content { padding-block: var(--s-24) calc(var(--s-24) + 40px); }
.hero__title {
  font-size: clamp(40px, 5.6vw, 72px); line-height: 1.05; letter-spacing: -0.025em;
  max-width: 14em; margin-bottom: var(--s-8);
}
.hero__lead { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; max-width: 30em; color: rgba(255,255,255,0.9); margin-bottom: var(--s-10); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-6) var(--s-8); }

.hero__facts { position: absolute; left: 0; right: 0; bottom: 0; border-top: 1px solid var(--on-dark-line); }
.hero__facts-inner { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: var(--s-12); padding-block: var(--s-5); }
.hero__facts p { font-size: 13px; color: var(--on-dark-soft); letter-spacing: 0.02em; }
.hero__facts strong { color: #fff; font-weight: 600; }

/* ==========================================================================
   Intro (Nosotros / Producción)
   ========================================================================== */
.intro { row-gap: var(--s-8); align-items: end; }
.intro__head { grid-column: 1 / span 7; }
.intro__body { grid-column: 9 / span 4; display: grid; gap: var(--s-4); color: var(--ink-soft); font-size: 16px; line-height: 1.75; padding-bottom: 6px; }

/* ---------- Pilares ---------- */
.pillars { padding-block: clamp(56px, 6vw, 88px); }
.pillars__grid { row-gap: var(--s-10); }
.pillar { grid-column: span 4; padding-right: var(--s-8); }
.pillar::before {
  content: ""; display: block; width: 48px; height: 2px; background: var(--gold); margin-bottom: var(--s-6);
  transform-origin: left; transition: transform 400ms var(--ease-out);
}
.pillar .h3 { margin-bottom: var(--s-3); }
.pillar p { color: var(--on-dark-soft); font-size: 15px; max-width: 30ch; }
@media (hover: hover) and (pointer: fine) { .pillar:hover::before { transform: scaleX(1.6); } }

/* ---------- Misión / Visión ---------- */
.mv { display: grid; grid-template-columns: 1fr 1fr; }
.mv__media { position: relative; overflow: hidden; min-height: 420px; }
.mv__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% center; }
.mv__panels { display: grid; grid-template-rows: 1fr 1fr; }
.mv__panel {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(40px, 5vw, 72px) max(var(--gutter), calc((100vw - var(--max)) / 2)) clamp(40px, 5vw, 72px) clamp(32px, 5vw, 72px);
}
.mv__panel > * { max-width: 460px; }
.mv__title { font-size: 24px; font-weight: 600; letter-spacing: 0.02em; color: var(--orange); margin-top: var(--s-4); }
.mv__title::after { content: ""; display: block; width: 48px; height: 2px; background: var(--gold); margin: var(--s-4) 0 var(--s-5); }
.mv__panel p { font-size: 15.5px; line-height: 1.75; color: var(--ink-soft); }
.mv__panel .mv__lead {
  font-family: var(--font-head); font-size: 19px; font-weight: 600;
  line-height: 1.35; color: var(--teal); margin-bottom: var(--s-2);
}
.mv__panel strong { color: var(--ink); font-weight: 600; }
.mv__panel--rust { background: var(--rust); color: #fff; }
.mv__panel--rust .icon { stroke: #fff; }
.mv__panel--rust .mv__title { color: #fff; }
.mv__panel--rust p { color: rgba(255,255,255,0.88); }

/* ---------- Valores ---------- */
.values__head { margin-bottom: var(--s-12); }
.values__head .h2 { max-width: 22ch; }
.values__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--on-dark-line); }
.value { padding: var(--s-8) var(--s-8) var(--s-2) 0; position: relative; }
.value + .value { padding-left: var(--s-8); border-left: 1px solid var(--on-dark-line); }
.value h3 { font-size: 22px; font-weight: 600; color: var(--gold); margin-bottom: var(--s-3); }
.value p { font-size: 15px; color: var(--on-dark-soft); }

/* ---------- Cultivos ---------- */
.crops {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-5);
  margin-top: clamp(56px, 6vw, 88px);
}
.crop { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 3; background: var(--paper-warm); }
.crop img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
.crop::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,44,51,0) 55%, rgba(0,44,51,0.72) 100%);
  transition: opacity 400ms var(--ease-out);
}
.crop::after { content: ""; position: absolute; inset: 0; z-index: 2; outline: 1px solid rgba(0,0,0,0.08); outline-offset: -1px; border-radius: inherit; pointer-events: none; }
.crop__name {
  position: absolute; left: var(--s-6); bottom: var(--s-5); z-index: 2;
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #fff;
}
.crop__name::before { content: ""; width: 18px; height: 2px; background: var(--gold); transition: width 400ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .crop:hover img { transform: scale(1.04); }
  .crop:hover .crop__name::before { width: 30px; }
}

/* ---------- Cómo producimos ---------- */
.how__head { margin-bottom: clamp(48px, 5vw, 72px); }
.how__head .h2 { max-width: 20ch; }
.how__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.how__item { padding-right: var(--s-10); }
.how__item + .how__item { padding-left: var(--s-10); border-left: 1px solid rgba(255,255,255,0.2); }
.how__item .h3 { margin: var(--s-5) 0 var(--s-3); }
.how__item p { font-size: 15px; color: rgba(255,255,255,0.86); max-width: 32ch; }
.how__link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: var(--s-5);
  font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); text-decoration: none;
}
.how__link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 240ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .how__link:hover svg { transform: translateX(3px); } }

/* ---------- Zonas ---------- */
.zones__grid { row-gap: var(--s-12); align-items: center; }
.zones__text { grid-column: 1 / span 5; }
.zones__lead { color: var(--ink-soft); margin-top: var(--s-6); max-width: 44ch; }
.zones__list { display: grid; margin-top: var(--s-6); border-top: 1px solid var(--line); }
.zone {
  display: flex; align-items: flex-start; gap: var(--s-4); padding: var(--s-4) var(--s-2);
  border-bottom: 1px solid var(--line); cursor: default; outline-offset: -2px;
  transition: background-color 200ms var(--ease-out);
}
.zone strong { display: block; font-family: var(--font-head); font-size: 18px; font-weight: 600; color: var(--teal); line-height: 1.3; }
.zone small { display: block; font-size: 14px; color: var(--ink-soft); line-height: 1.5; margin-top: 2px; }
.zone__dot { flex-shrink: 0; width: 12px; height: 12px; margin-top: 6px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(237,111,45,0.16); transition: box-shadow 240ms var(--ease-out); }
.zone--office .zone__dot { border-radius: 3px; background: var(--teal); box-shadow: 0 0 0 4px rgba(0,75,85,0.12); }
.zone.is-hot { background: var(--paper-warm); }
.zone.is-hot .zone__dot { box-shadow: 0 0 0 7px rgba(237,111,45,0.22); }
.zone--office.is-hot .zone__dot { box-shadow: 0 0 0 7px rgba(0,75,85,0.16); }
.zones__note { margin-top: var(--s-5); font-size: 13px; color: var(--ink-soft); }
.zones__map { grid-column: 7 / span 6; position: relative; border-radius: 12px; overflow: hidden; background: #eef3f2; box-shadow: inset 0 0 0 1px var(--line); }
.map { display: block; width: 100%; height: auto; }
.map__land { fill: #e2e9e7; stroke: #fff; stroke-width: 1.2; stroke-linejoin: round; }
.map__land--focus { fill: #fff; stroke: rgba(0,75,85,0.55); stroke-width: 1.6; }
.map__prov { font: 500 11px/1 var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; fill: rgba(0,75,85,0.38); text-anchor: middle; }
.map__prov--focus { font-weight: 600; fill: rgba(0,75,85,0.62); }
.map__mini { fill: #dde5e3; stroke: #fff; stroke-width: 0.5; }
.map__mini--focus { fill: var(--teal); }
.map__card { fill: #fff; filter: drop-shadow(0 6px 12px rgba(0,44,51,0.12)); }
.map__box { fill: none; stroke: var(--orange); stroke-width: 1.6; }
.pin__dot { fill: var(--orange); stroke: #fff; stroke-width: 2.5; }
.pin--office .pin__dot { fill: var(--teal); }
.pin__halo { fill: rgba(237,111,45,0.2); transform: scale(0.6); transition: transform 300ms var(--ease-out); }
.pin--office .pin__halo { fill: rgba(0,75,85,0.16); }
.pin__label { font: 600 13px/1 var(--font-body); fill: var(--teal-950); paint-order: stroke; stroke: rgba(255,255,255,0.9); stroke-width: 4px; stroke-linejoin: round; }
.pin.is-hot .pin__halo { transform: scale(1.25); }
@media (prefers-reduced-motion: no-preference) {
  .pin--finca .pin__halo { animation: pin-pulse 2.8s var(--ease-out) infinite; }
  .pin--finca:nth-child(2) .pin__halo { animation-delay: 0.5s; }
  .pin--finca:nth-child(3) .pin__halo { animation-delay: 1s; }
  .pin.is-hot .pin__halo { animation: none; }
}
@keyframes pin-pulse { 0% { transform: scale(0.5); opacity: 1; } 70%, 100% { transform: scale(1.6); opacity: 0; } }

/* ---------- Certificaciones ---------- */
.certs-head { row-gap: var(--s-6); align-items: end; margin-bottom: clamp(48px, 5vw, 72px); }
.certs-head__title { grid-column: 1 / span 6; }
.certs-head__body { grid-column: 8 / span 5; color: var(--on-dark-soft); font-size: 16px; line-height: 1.75; padding-bottom: 6px; }
.cert-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--col-gap); }
.cert-card {
  display: flex; flex-direction: column; padding: clamp(28px, 3vw, 44px);
  background: #fff; color: var(--ink); border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1), 0 24px 48px -28px rgba(0,0,0,0.5);
}
.cert-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); height: 96px; margin-bottom: var(--s-8); }
.cert-card__logo { display: flex; align-items: center; height: 100%; }
.cert-card__logo img { height: 100%; width: auto; }
.cert-card__logo--wide img { height: 62px; }
.cert-card__since {
  flex-shrink: 0; padding: 7px 12px; border-radius: 999px; background: rgba(240,173,63,0.16); color: #8a5a0b;
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1;
}
.cert-card__title { font-size: clamp(22px, 2vw, 26px); font-weight: 600; color: var(--teal); }
.cert-card__org { margin-top: var(--s-1); font-size: 13px; letter-spacing: 0.04em; color: var(--ink-soft); }
.cert-card__text { margin-top: var(--s-5); font-size: 15.5px; line-height: 1.7; color: var(--ink-soft); }
.cert-card__list { display: grid; gap: var(--s-3); margin-top: var(--s-6); padding-top: var(--s-6); border-top: 1px solid var(--line); }
.cert-card__list li { display: flex; gap: var(--s-3); font-size: 15px; line-height: 1.5; }
.cert-card__check { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: var(--orange); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Compromiso ---------- */
.compromiso__head { max-width: 760px; margin-bottom: clamp(56px, 7vw, 104px); }
.programs { display: grid; gap: clamp(72px, 9vw, 128px); }
.program { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: var(--s-8); align-items: center; }
.program__media { grid-column: 1 / span 7; grid-row: 1; }
.program__text { grid-column: 9 / span 4; grid-row: 1; }
.program--reverse .program__media { grid-column: 6 / span 7; }
.program--reverse .program__text { grid-column: 1 / span 4; }
.program__title { font-size: clamp(24px, 2.2vw, 30px); font-weight: 600; color: var(--teal); letter-spacing: -0.01em; margin-bottom: var(--s-3); }
.program__tag { font-weight: 600; font-size: 16px; color: var(--orange-600); margin-bottom: var(--s-5); }
.program__text p:not(.program__tag) { font-size: 15.5px; line-height: 1.75; color: var(--ink-soft); }
.program__text p + p:not(.program__tag) { margin-top: var(--s-4); }

/* ---------- Redes ---------- */
.networks { margin-top: clamp(48px, 5vw, 72px); padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--on-dark-line); }
.networks__label { font-size: 13px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-dark-soft); margin-bottom: var(--s-6); }
.networks__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--col-gap); }
.network {
  display: flex; align-items: center; gap: var(--s-6); padding: var(--s-5);
  border: 1px solid var(--on-dark-line); border-radius: 12px; background: rgba(255,255,255,0.04);
}
.network__logo {
  flex-shrink: 0; display: block; width: 132px; height: 92px; padding: 12px;
  background: #fff; border-radius: 8px;
}
.network__logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.network__logo--wide { padding: 14px 12px; }
.network__title { font-size: 18px; font-weight: 600; color: #fff; margin-bottom: var(--s-2); }
.network__text p { font-size: 14.5px; line-height: 1.6; color: var(--on-dark-soft); }

/* ---------- Revistas ---------- */
.report {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-8) var(--col-gap); align-items: center;
  margin-top: clamp(72px, 9vw, 128px); padding: clamp(28px, 4vw, 56px);
  background: #eef3f2; border-radius: 12px;
}
.report__text .eyebrow { margin-bottom: var(--s-4); }
.report__title { font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; color: var(--teal); margin-bottom: var(--s-4); }
.report__text p:not(.eyebrow) { font-size: 15.5px; color: var(--ink-soft); max-width: 44ch; }
.report__mags { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); }
.mag { display: flex; gap: var(--s-4); align-items: flex-end; text-decoration: none; color: inherit; border-radius: 8px; }
.mag__cover {
  flex: 0 0 auto; width: clamp(96px, 9vw, 128px); aspect-ratio: 480 / 679; border-radius: 6px; overflow: hidden; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12), 0 14px 28px -14px rgba(0,44,51,0.45);
  transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
}
.mag__cover img { width: 100%; height: 100%; object-fit: cover; }
.mag__info { display: grid; gap: 2px; padding-bottom: 4px; }
.mag__info strong { font-family: var(--font-head); font-size: 18px; font-weight: 600; color: var(--teal); line-height: 1.25; }
.mag__info small { font-size: 13px; color: var(--ink-soft); }
.mag__cta {
  display: inline-flex; align-items: center; gap: 6px; margin-top: var(--s-3);
  font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange-600);
}
.mag__cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 240ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .mag:hover .mag__cover { transform: translateY(-4px) rotate(-1deg); box-shadow: 0 2px 4px rgba(0,0,0,0.12), 0 22px 36px -16px rgba(0,44,51,0.55); }
  .mag:hover .mag__cta svg { transform: translateY(2px); }
}

/* ---------- Carrusel ---------- */
.carousel { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 10; background: var(--paper-warm); touch-action: pan-y; }
.carousel::after { content: ""; position: absolute; inset: 0; outline: 1px solid rgba(0,0,0,0.08); outline-offset: -1px; border-radius: inherit; pointer-events: none; z-index: 3; }
.carousel__track { position: relative; height: 100%; }
/* Fundido entre fotos + movimiento lento (efecto "Ken Burns") */
.carousel__track img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  user-select: none; -webkit-user-drag: none;
  opacity: 0; transform: scale(1.02) translate3d(0, 0, 0);
  transition: opacity 1200ms ease, transform 0s linear 1200ms;
  will-change: opacity, transform;
}
.carousel__track img.is-active {
  opacity: 1; z-index: 1;
  transform: scale(1.12) translate3d(var(--kb-x, -2%), var(--kb-y, -1.5%), 0);
  transition: opacity 1200ms ease, transform 9000ms linear;
}
.carousel__track img:nth-child(3n+2) { --kb-x: 2%; --kb-y: 1.5%; transform-origin: 70% 40%; }
.carousel__track img:nth-child(3n+3) { --kb-x: -1.5%; --kb-y: 2%; transform-origin: 30% 70%; }
@media (prefers-reduced-motion: reduce) {
  .carousel__track img, .carousel__track img.is-active { transform: none; transition: opacity 600ms ease !important; }
}
.carousel__shade { position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(0deg, rgba(0,0,0,0.38), rgba(0,0,0,0)); pointer-events: none; z-index: 1; }
.carousel__btn {
  position: absolute; top: 50%; z-index: 2;
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: 1px solid rgba(255,255,255,0.45); border-radius: 50%;
  background: rgba(0, 44, 51, 0.32); color: #fff; cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transform: translateY(-50%);
  transition: background-color 200ms var(--ease-out), opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
}
.carousel__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.carousel__btn--prev { left: var(--s-4); }
.carousel__btn--next { right: var(--s-4); }
.carousel__btn:active { transform: translateY(-50%) scale(0.94); }
.carousel__bar { position: absolute; left: var(--s-5); right: var(--s-5); bottom: var(--s-4); z-index: 2; display: flex; align-items: center; justify-content: space-between; color: #fff; }
.carousel__dots { display: flex; gap: 6px; }
.carousel__dot { position: relative; width: 28px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.carousel__dot::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px; border-radius: 2px; background: rgba(255,255,255,0.4); }
.carousel__dot::after {
  content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px; border-radius: 2px; background: #fff;
  transform: scaleX(0); transform-origin: left;
}
.carousel__dot.is-done::after { transform: scaleX(1); }
.carousel__dot.is-active::after { animation: dot-progress var(--dur, 6000ms) linear forwards; }
.carousel.is-paused .carousel__dot.is-active::after { animation-play-state: paused; }
@keyframes dot-progress { to { transform: scaleX(1); } }
.carousel__count { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }

@media (hover: hover) and (pointer: fine) {
  .carousel__btn { opacity: 0; }
  .carousel__btn--prev { transform: translate(-6px, -50%); }
  .carousel__btn--next { transform: translate(6px, -50%); }
  .carousel:hover .carousel__btn, .carousel:focus-within .carousel__btn { opacity: 1; transform: translateY(-50%); }
  .carousel__btn:hover { background: rgba(0, 44, 51, 0.6); }
  .carousel__btn:active { transform: translateY(-50%) scale(0.94); }
}

/* ---------- Programas de sustentabilidad (lista + foto grande) ---------- */
.showcase {
  --sc-dur: 4000ms;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px); align-items: start;
}
.showcase__list { display: grid; }
.showcase__item {
  position: relative; padding: var(--s-6) 0 var(--s-6) var(--s-8);
  border-left: 2px solid var(--line); cursor: pointer;
  transition: background-color 300ms var(--ease-out);
}
.showcase__bar {
  position: absolute; left: -2px; top: 0; bottom: 0; width: 2px;
  background: var(--orange); transform: scaleY(0); transform-origin: top;
}
.showcase__item.is-active .showcase__bar { animation: sc-progress var(--sc-dur) linear forwards; }
.showcase.is-paused .showcase__item.is-active .showcase__bar { animation-play-state: paused; }
@keyframes sc-progress { to { transform: scaleY(1); } }
.showcase__title { font-size: clamp(22px, 2vw, 28px); font-weight: 600; letter-spacing: -0.01em; }
.showcase__title button {
  all: unset; cursor: pointer; display: block; width: 100%;
  color: var(--ink-soft); opacity: 0.55;
  transition: color 300ms var(--ease-out), opacity 300ms var(--ease-out);
}
.showcase__title button:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; border-radius: 2px; }
.showcase__item.is-active .showcase__title button { color: var(--teal); opacity: 1; }
.showcase__tag { margin-top: var(--s-2); font-weight: 600; font-size: 15px; color: var(--ink-soft); opacity: 0.55; transition: color 300ms, opacity 300ms; }
.showcase__item.is-active .showcase__tag { color: var(--orange-600); opacity: 1; }
.showcase__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 600ms var(--ease-out); }
.showcase__body > div { overflow: hidden; opacity: 0; transform: translateY(6px); transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-out); }
.showcase__item.is-active .showcase__body { grid-template-rows: 1fr; }
.showcase__item.is-active .showcase__body > div { opacity: 1; transform: none; transition-delay: 120ms; }
.showcase__body p { font-size: 15.5px; line-height: 1.75; color: var(--ink-soft); padding-top: var(--s-4); max-width: 52ch; }
@media (hover: hover) and (pointer: fine) {
  .showcase__item:not(.is-active):hover .showcase__title button,
  .showcase__item:not(.is-active):hover .showcase__tag { opacity: 0.9; }
  .showcase__item:not(.is-active):hover .showcase__title button { color: var(--teal); }
}

.showcase__stage {
  position: sticky; top: calc(var(--header-h) + 24px);
  margin: 0; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; isolation: isolate;
  background: var(--paper-warm);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 24px 48px -24px rgba(0,44,51,0.35);
}
.showcase__stage::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(0deg, rgba(0,30,36,0.55) 0%, rgba(0,30,36,0) 40%);
  border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}
.showcase__stage img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.04);
  transition: opacity 1000ms ease, transform 0s linear 1000ms;
}
.showcase__stage img.is-active {
  opacity: 1; z-index: 1; transform: scale(1.14) translate3d(-2%, -1.5%, 0);
  transition: opacity 1000ms ease, transform 12000ms linear;
}
.showcase__stage img:nth-of-type(even).is-active { transform: scale(1.14) translate3d(2%, 1.5%, 0); }
.showcase__chip {
  position: absolute; left: var(--s-5); bottom: var(--s-5); z-index: 3;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 8px 16px 8px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.16); color: #fff;
  -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.28);
  font-size: 14px; font-weight: 600;
}
.showcase__chip [data-showcase-count] { font-size: 12px; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; opacity: 0.85; padding-right: 12px; border-right: 1px solid rgba(255,255,255,0.35); }
.showcase__chip [data-showcase-name] { transition: opacity 300ms ease; }
.showcase__chip.is-swapping [data-showcase-name] { opacity: 0; }
.showcase__nav { position: absolute; right: var(--s-5); bottom: var(--s-5); z-index: 3; display: flex; gap: var(--s-2); }
.showcase__arrow {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,0.16); color: #fff;
  -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.28);
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out), transform 160ms var(--ease-out);
}
.showcase__arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.showcase__arrow:active { transform: scale(0.94); }
.showcase__arrow:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .showcase__arrow:hover { background: #fff; color: var(--teal); }
}

@media (prefers-reduced-motion: reduce) {
  .showcase__stage img, .showcase__stage img.is-active { transform: none !important; transition: opacity 600ms ease !important; }
}
@media (max-width: 860px) {
  .showcase { grid-template-columns: 1fr; gap: var(--s-8); }
  .showcase__stage { position: relative; top: auto; order: -1; border-radius: 16px; }
  .showcase__item { padding: var(--s-5) 0 var(--s-5) var(--s-6); }
}

/* ---------- Contacto ---------- */
.contact { padding-block: var(--section-y); }
.contact__grid { row-gap: var(--s-12); }
.contact__info { grid-column: 1 / span 5; }
.contact__info .h2 { max-width: 14ch; margin-bottom: var(--s-12); }
.contact__list { display: grid; gap: var(--s-6); }
.contact__list li { display: flex; align-items: center; gap: var(--s-4); }
.contact__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--on-dark-line); transition: border-color 200ms var(--ease-out), background-color 200ms var(--ease-out); }
.contact__icon .icon { stroke: var(--gold); }
.contact__list small { display: block; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-dark-soft); line-height: 1.4; }
.contact__list a { font-size: 17px; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 320ms var(--ease-out), color 200ms; }
@media (hover: hover) and (pointer: fine) {
  .contact__list li:hover .contact__icon { border-color: var(--gold); background: rgba(240,173,63,0.1); }
  .contact__list a:hover { background-size: 100% 1px; }
}

.form { grid-column: 7 / span 6; display: grid; gap: var(--s-6); align-content: start; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); }
.form__honey { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.field { display: grid; gap: var(--s-2); }
.field label { font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.field__opt { text-transform: none; letter-spacing: 0; color: var(--on-dark-soft); font-weight: 400; }
.field input, .field textarea {
  width: 100%; font: 400 16px/1.5 var(--font-body); color: #fff;
  background: var(--teal-field); border: 1px solid rgba(255,255,255,0.18); border-radius: 10px;
  padding: 13px 16px; outline: none; resize: vertical; caret-color: var(--gold);
  transition: border-color 200ms var(--ease-out), background-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.field textarea { min-height: 148px; }
.field input:hover, .field textarea:hover { border-color: rgba(255,255,255,0.32); }
.field input:focus, .field textarea:focus { border-color: var(--gold); background: rgba(255,255,255,0.14); box-shadow: 0 0 0 3px rgba(240,173,63,0.22); }
.field__error { display: none; font-size: 13px; color: #ffc9a8; }
.field.is-invalid input, .field.is-invalid textarea { border-color: #ff9a66; }
.field.is-invalid .field__error { display: block; }
.form__footer { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-6); margin-top: var(--s-2); }
.form__status { font-size: 15px; }
.form__status.is-ok { color: #b8f0c8; }
.form__status.is-error { color: #ffc9a8; }
.form.is-sending .btn { pointer-events: none; opacity: 0.85; }
.form.is-sending .btn__arrow { display: none; }
.form.is-sending .btn__spinner {
  display: block; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff; animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Empleo (bloque corto que lleva al formulario) ---------- */
.jobs { background: var(--paper-warm); padding-block: clamp(56px, 7vw, 96px); }
.jobs__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-8) var(--s-12); flex-wrap: wrap; }
.jobs__text { flex: 1 1 520px; max-width: 720px; }
.jobs__text .h2 { margin-bottom: var(--s-4); }
.jobs__text p:not(.eyebrow) { color: var(--ink-soft); max-width: 60ch; }
.jobs__cta { flex-shrink: 0; }

/* ---------- Formulario único: campos según el motivo ---------- */
.form__row--single { grid-template-columns: 1fr; }
.form [hidden] { display: none !important; }
.form__extra {
  display: grid; gap: var(--s-6); padding: var(--s-5);
  border: 1px solid var(--on-dark-line); border-radius: 12px; background: rgba(255,255,255,0.04);
  animation: extra-in 360ms var(--ease-out);
}
@keyframes extra-in { from { opacity: 0; transform: translateY(-6px); } }
.field__label { font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }

.field select {
  width: 100%; font: 400 16px/1.5 var(--font-body); color: #fff;
  background-color: var(--teal-field); border: 1px solid rgba(255,255,255,0.18); border-radius: 10px;
  padding: 13px 44px 13px 16px; outline: none; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f0ad3f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
  transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.field select option { color: var(--ink); background: #fff; }
.field select:hover { border-color: rgba(255,255,255,0.32); }
.field select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(240,173,63,0.22); }

.file {
  position: relative; display: flex; align-items: center; gap: var(--s-4);
  padding: 14px 16px; border: 1px dashed rgba(255,255,255,0.32); border-radius: 10px; background: var(--teal-field); cursor: pointer;
  transition: border-color 200ms var(--ease-out), background-color 200ms var(--ease-out);
}
.field label.file { font-size: 15px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.file input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file:focus-within { border-color: var(--gold); border-style: solid; box-shadow: 0 0 0 3px rgba(240,173,63,0.22); }
.file__icon { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.file__icon svg { width: 20px; height: 20px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.file__name { font-size: 15px; color: var(--on-dark-soft); overflow-wrap: anywhere; }
.file.has-file { border-style: solid; border-color: var(--gold); }
.file.has-file .file__name { color: #fff; font-weight: 500; }
.file.has-file .file__icon { background: var(--gold); }
.file.has-file .file__icon svg { stroke: var(--teal-950); }
.field.is-invalid .file, .field.is-invalid select { border-color: #ff9a66; }
@media (hover: hover) and (pointer: fine) { .file:hover { border-color: var(--gold); background: rgba(255,255,255,0.14); } }

/* ---------- Footer ---------- */
.footer { background: var(--teal-950); color: var(--on-dark-soft); font-size: 14px; }
.footer__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-8); padding-block: var(--s-12) var(--s-10); }
.footer__logo img { width: 72px; height: auto; opacity: 0.92; transition: opacity 200ms; }
.footer__logo:hover img { opacity: 1; }
.footer__nav { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-8); }
.footer__nav a { text-decoration: none; color: #fff; padding-block: 6px; transition: color 200ms; }
.footer__nav a:hover { color: var(--gold); }
.footer__social { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; transition: color 200ms; }
.footer__social-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.footer__social:hover { color: var(--gold); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-8); padding-block: var(--s-6) var(--s-8); font-size: 13px; position: relative; }
.footer__bottom::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: rgba(255,255,255,0.1); }

.footer__wa { color: #fff; text-decoration: none; white-space: nowrap; transition: color 200ms; }
.footer__wa:hover { color: var(--gold); }

/* ---------- Volver arriba ---------- */
.to-top {
  position: fixed; z-index: 40;
  right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--teal); color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.14), 0 2px 4px rgba(0,0,0,0.12), 0 10px 24px -8px rgba(0,44,51,0.55);
  opacity: 0; visibility: hidden; transform: translateY(12px) scale(0.96);
  transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out), background-color 200ms var(--ease-out), visibility 0s linear 260ms;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out), background-color 200ms var(--ease-out), visibility 0s; }
.to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 240ms var(--ease-out); }
.to-top:active { transform: scale(0.94); }
.to-top:focus-visible { outline-color: var(--orange); }
@media (hover: hover) and (pointer: fine) {
  .to-top:hover { background: var(--orange); }
  .to-top:hover svg { transform: translateY(-2px); }
}

/* ---------- Popup del formulario ---------- */
.modal {
  width: min(440px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 12px;
  background: #fff; color: var(--ink);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.06), 0 24px 64px -16px rgba(0,44,51,0.45);
}
.modal::backdrop { background: rgba(0, 44, 51, 0.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal[open] { animation: modal-in 320ms var(--ease-out); }
.modal[open]::backdrop { animation: fade-in 320ms var(--ease-out); }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(0.97); } }
@keyframes fade-in { from { opacity: 0; } }
.modal__box { display: grid; justify-items: center; gap: var(--s-3); padding: var(--s-10) var(--s-8) var(--s-8); text-align: center; }
.modal__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: rgba(0,75,85,0.08); margin-bottom: var(--s-2); }
.modal__icon svg { width: 28px; height: 28px; fill: none; stroke: var(--teal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.modal__ok path { stroke-dasharray: 24; stroke-dashoffset: 24; }
.modal[open] .modal__ok path { animation: draw 420ms 180ms var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.modal__err { display: none; }
.modal.is-error .modal__ok { display: none; }
.modal.is-error .modal__err { display: block; }
.modal.is-error .modal__icon { background: rgba(237,111,45,0.12); }
.modal.is-error .modal__icon svg { stroke: var(--orange-600); stroke-width: 2.4; }
.modal__title { font-size: 26px; font-weight: 600; color: var(--teal); }
.modal__text { font-size: 15.5px; line-height: 1.65; color: var(--ink-soft); max-width: 34ch; }
.modal__text a { color: var(--teal); font-weight: 500; }
.modal__close { margin-top: var(--s-5); min-width: 140px; justify-content: center; }

/* ==========================================================================
   Movimiento (solo con JS activo)
   ========================================================================== */
@keyframes enter { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
@keyframes hero-zoom { from { transform: scale(1.08); } }

.js [data-enter] { animation: enter 900ms var(--ease-out) both; }
.js .hero__title[data-enter] { animation-delay: 120ms; }
.js .hero__lead[data-enter] { animation-delay: 240ms; }
.js .hero__actions[data-enter] { animation-delay: 360ms; }
.js .hero__facts[data-enter] { animation-delay: 560ms; }
.js .hero__media img { animation: hero-zoom 2400ms var(--ease-out) both; }

.js [data-reveal], .js [data-reveal-group] > * {
  opacity: 0; transform: translateY(20px);
  transition: opacity 800ms var(--ease-out), transform 900ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js .is-in[data-reveal], .js [data-reveal-group].is-in > * { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .js [data-reveal], .js [data-reveal-group] > * { opacity: 1; transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .nav a { font-size: 14px; }
  .intro__head { grid-column: 1 / span 12; max-width: 760px; }
  .intro__body { grid-column: 1 / span 9; max-width: 640px; }
  .intro { align-items: start; row-gap: var(--s-6); }
  .program__media, .program--reverse .program__media { grid-column: 1 / span 7; }
  .program__text, .program--reverse .program__text { grid-column: 8 / span 5; }
  .program--reverse .program__media { grid-column: 6 / span 7; }
  .program--reverse .program__text { grid-column: 1 / span 5; }
  .values__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .value:nth-child(3) { padding-left: 0; border-left: 0; }
  .value:nth-child(n+3) { border-top: 1px solid var(--on-dark-line); }
  .form { grid-column: 7 / span 6; }
  .contact__info { grid-column: 1 / span 6; }
  .zones__text { grid-column: 1 / span 6; }
  .zones__map { grid-column: 7 / span 6; }
  .certs-head__title { grid-column: 1 / span 12; }
  .certs-head__body { grid-column: 1 / span 9; }
}

/* Menú con botón de tres rayitas cuando no entra en una línea */
@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .lang { margin-left: auto; margin-right: var(--s-2); padding-left: 0; border-left: 0; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--s-2) var(--gutter) var(--s-6);
    background: #fff; box-shadow: 0 16px 32px -16px rgba(0,44,51,0.28);
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path 360ms var(--ease-out), visibility 0s linear 360ms;
  }
  .nav.is-open { clip-path: inset(0 0 -40px 0); visibility: visible; transition: clip-path 360ms var(--ease-out), visibility 0s; }
  .nav a { font-size: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a:not(.nav__cta)::after { display: none; }
  .nav__cta { margin-top: var(--s-5); text-align: center; border-bottom: 1px solid var(--teal) !important; padding: 14px 18px !important; }
}

@media (max-width: 860px) {
  :root { --header-h: 72px; }
  .header__logo img, .header.is-scrolled .header__logo img { width: 64px; }
  .hero { min-height: min(calc(100svh - var(--header-h)), 760px); justify-content: flex-end; }
  .hero::before {
    background:
      linear-gradient(0deg, rgba(0,50,58,0.96) 0%, rgba(0,60,68,0.82) 45%, rgba(0,75,85,0.35) 75%, rgba(0,75,85,0.15) 100%);
  }
  .hero__content { padding-block: var(--s-16) var(--s-8); }
  .hero__title { margin-bottom: var(--s-5); }
  .hero__title br { display: none; }
  .hero__lead { margin-bottom: var(--s-8); }
  .hero__facts { position: static; }
  .hero__facts-inner { grid-template-columns: 1fr; gap: var(--s-1); padding-block: var(--s-5) var(--s-6); }

  .intro__body { grid-column: 1 / -1; }
  .pillar { grid-column: 1 / -1; padding-right: 0; }
  .pillars__grid { row-gap: var(--s-8); }

  .mv { grid-template-columns: 1fr; }
  .mv__media { min-height: 0; aspect-ratio: 4 / 3; }
  .mv__panels { grid-template-rows: auto; }
  .mv__panel { padding: var(--s-12) var(--gutter); }

  .values__grid { grid-template-columns: 1fr; border-top: 0; }
  .value, .value + .value { padding: var(--s-6) 0; border-left: 0; border-top: 1px solid var(--on-dark-line); }

  .crops { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-12); }
  .crop__name { left: var(--s-4); bottom: var(--s-3); font-size: 13px; }
  .crop__name::before { width: 12px; }

  .how__grid { grid-template-columns: 1fr; }
  .how__item, .how__item + .how__item { padding: var(--s-8) 0; border-left: 0; border-top: 1px solid rgba(255,255,255,0.2); }
  .how__item:last-child { padding-bottom: 0; }

  .program, .program--reverse { grid-template-columns: 1fr; }
  .program__media, .program__text, .program--reverse .program__media, .program--reverse .program__text { grid-column: 1; grid-row: auto; }
  .programs { gap: var(--s-16); }

  .contact__info, .form { grid-column: 1 / -1; }
  .zones__text, .zones__map { grid-column: 1 / -1; }
  .certs-head__body { grid-column: 1 / -1; }
  .cert-cards { grid-template-columns: 1fr; }
  .networks__grid { grid-template-columns: 1fr; }
  .report { grid-template-columns: 1fr; }
  .cert-card__top { height: 80px; }
  .cert-card__logo--wide img { height: 52px; }
  .contact__info .h2 { margin-bottom: var(--s-8); }
  .form__row { grid-template-columns: 1fr; }

  .footer__top { flex-direction: column; align-items: flex-start; }
  .footer__bottom { flex-direction: column; }
}

@media (max-width: 420px) {
  .header__logo img, .header.is-scrolled .header__logo img { width: 56px; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .form .btn, .jobs__cta { width: 100%; justify-content: center; }
  .carousel { aspect-ratio: 4 / 3; }
  .report__mags { grid-template-columns: 1fr; }
  .network { flex-direction: column; align-items: flex-start; }
}
