/* ============================================================
   MIVESAR — Papaya premium · réplica estática
   Fuentes: Fraunces (display) + Manrope (texto)
   ============================================================ */

:root {
  --cream:      #faf8f4;
  --cream-2:    #f3efe8;
  --ink:        #1a1d1a;
  --dark:       #141311;
  --dark-2:     #1c1a17;
  --orange:     #f37020;
  --coral:      #c25e3a;
  --muted:      #77746c;
  --muted-2:    #a5a29a;
  --line:       rgba(26, 29, 26, 0.12);
  --line-soft:  rgba(26, 29, 26, 0.07);
  --line-dark:  rgba(255, 255, 255, 0.12);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1280px;
  --pad: 2rem;
  --header-h: 88px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--pad);
}

/* ---------- Tipografía utilitaria ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 1.6rem;
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--coral);
  opacity: .8;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.05; letter-spacing: -0.01em; }

.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 5.2vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.display .it { font-style: italic; color: var(--orange); }

.section-title {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 15ch;
}

.lead { color: #3a3f3a; font-weight: 300; font-size: 1.12rem; max-width: 46ch; }

.section { padding-block: clamp(4.5rem, 9vw, 8rem); }
.section--tight { padding-block: clamp(3.5rem, 6vw, 6rem); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .95rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, opacity .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: #e5641a; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn svg { width: 16px; height: 16px; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.header.scrolled {
  background: rgba(250, 248, 244, 0.85);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line-soft);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--pad);
}
.brand { display: flex; align-items: center; gap: .55rem; }
.brand__logo { height: 46px; width: auto; display: block; }
.brand--footer .brand__logo { height: 64px; }
.nav { display: flex; gap: 2rem; }
.nav a {
  font-size: .84rem;
  color: #fff;
  opacity: .9;
  transition: opacity .2s, color .2s;
}
.nav a:hover { opacity: 1; color: var(--orange); }
.nav a.active { color: var(--orange); opacity: 1; }
.header.scrolled .nav a.active { color: var(--orange); }

.header__right { display: flex; align-items: center; gap: 1.2rem; }
.lang {
  display: flex;
  align-items: center;
  gap: .15rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: .25rem;
  transition: background .3s, border-color .3s;
}
.lang button {
  border: none;
  background: transparent;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .05em;
  color: rgba(255,255,255,.75);
  padding: .35rem .65rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.lang button.active { background: #fff; color: var(--ink); }

/* Header al hacer scroll (sobre fondo crema) — invierte a oscuro */
.header.scrolled .nav a { color: rgb(100, 102, 100); opacity: 1; }
.header.scrolled .nav a:hover { color: var(--orange); }
.header.scrolled .lang { background: rgba(26,29,26,.06); border-color: transparent; }
.header.scrolled .lang button { color: var(--muted); }
.header.scrolled .lang button.active { background: var(--ink); color: #fff; }

.burger { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(12,9,6,.5), rgba(12,9,6,.15) 40%, rgba(12,9,6,.55));
  pointer-events: none;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.scroll-cue {
  position: absolute;
  z-index: 3;
  bottom: 2rem;
  right: 2.5rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
}
.scroll-cue::after { content: "⌄"; font-size: 1.1rem; animation: bob 1.6s infinite; }
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(4px)} }

/* El vídeo del hero es horizontal (16:9). En pantallas estrechas un contenedor
   a pantalla completa (100vh, muy vertical) lo recorta en exceso con object-fit:
   cover y se ve como un zoom gigante. En móvil lo convertimos en una banda de
   proporción moderada para que se vea mucho más de la escena. */
@media (max-width: 760px) {
  .hero {
    min-height: auto;
  }
  .hero__video {
    position: relative;
    inset: auto;
    height: auto;
    aspect-ratio: 4 / 5;
    max-height: 82svh;
  }
}

/* ---------- Intro ---------- */
.intro__bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.intro__cta { display: flex; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; }
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
}
.stat-row .num {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.9rem;
  line-height: 1;
  letter-spacing: -0.01em;
}
.stat-row .lbl {
  display: block;
  margin-top: .7rem;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================================
   Layout 2 columnas (título + texto)
   ============================================================ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.two-col .body p + p { margin-top: 1.2rem; }
.two-col .body p { color: #3a3f3a; font-weight: 300; font-size: 1.06rem; }

/* ============================================================
   Origen / clima
   ============================================================ */
.climate {
  background: var(--dark);
  color: #fff;
  border-radius: 22px;
  padding: clamp(2rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-image:
    linear-gradient(rgba(20,19,17,.85), rgba(20,19,17,.92)),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(255,255,255,.04) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(255,255,255,.04) 39px 40px);
}
.climate__lat {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  line-height: .9;
  display: flex;
  align-items: baseline;
  gap: .1em;
}
.climate__lat .n { color: #fff; }
.climate__lat .c { color: var(--orange); }
.climate__lat small {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-left: 1.2rem;
  line-height: 1.4;
  align-self: center;
  max-width: 12ch;
}
.climate__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem 1rem;
}
.climate__grid .k {
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: .3rem;
}
.climate__grid .v { font-family: var(--serif); font-size: 1.15rem; }
.climate__foot {
  display: flex;
  justify-content: space-between;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
  border-top: 1px solid var(--line-dark);
  padding-top: 1.2rem;
}
.live-badge {
  position: absolute;
  top: 1.4rem; right: 1.4rem;
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .65rem; letter-spacing: .2em; color: #fff;
}
.live-badge::before { content:""; width:7px; height:7px; border-radius:50%; background:#4ade80; box-shadow:0 0 0 0 rgba(74,222,128,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(74,222,128,.6)} 100%{box-shadow:0 0 0 10px rgba(74,222,128,0)} }

.mini-cards { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-top: 2.5rem; }
.mini-cards .cell { padding: 1.6rem 1.4rem; border-right: 1px solid var(--line); }
.mini-cards .cell:last-child { border-right: none; }
.mini-cards .num { font-family: var(--serif); font-size: 2rem; line-height: 1; }
.mini-cards .lbl { display:block; margin-top:.6rem; font-size:.68rem; letter-spacing:.16em; text-transform:uppercase; color:var(--muted); }

/* ============================================================
   Reel / carrusel
   ============================================================ */
.reel {
  background: var(--dark);
  border-radius: 22px;
  padding: clamp(1.8rem, 4vw, 3.5rem);
  display: flex;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  color: #fff;
}
.reel__phone {
  position: relative;
  width: clamp(240px, 26vw, 320px);
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 30px 60px -25px rgba(0,0,0,.6);
}
.reel__video { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel__tag {
  position: absolute; top: 1.2rem; left: 1.2rem; z-index: 2;
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(0,0,0,.4); backdrop-filter: blur(6px);
  padding: .4rem .9rem; border-radius: 999px;
  font-size: .66rem; letter-spacing: .18em; text-transform: uppercase;
}
.reel__tag::before { content: "▶"; color: var(--orange); font-size: .6rem; }
.reel__side { flex: 1; }
.reel__side .idx { font-size: .72rem; letter-spacing: .16em; color: rgba(255,255,255,.6); }
.reel__side h3 {
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  margin-top: .6rem;
  max-width: 16ch;
  min-height: 2.2em;
  transition: opacity .35s ease;
}
.reel__dots { display: flex; gap: .5rem; margin-top: 2rem; }
.reel__dots button { width: 30px; height: 5px; border-radius: 999px; border: none; background: rgba(255,255,255,.22); cursor: pointer; transition: background .3s; padding: 0; }
.reel__dots button.active { background: var(--orange); }

/* ============================================================
   Proceso
   ============================================================ */
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3.5rem; }
.pcard {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  background: var(--cream);
  transition: transform .3s ease, box-shadow .3s ease;
}
.pcard:hover { transform: translateY(-4px); box-shadow: 0 20px 50px -30px rgba(0,0,0,.3); }
.pcard__num {
  position: absolute; top: 1.2rem; right: 1.5rem;
  font-family: var(--serif); font-size: 3.5rem; color: var(--line); line-height:1;
}
.pcard__icon {
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--coral);
  display: grid; place-items: center;
  color: var(--coral); margin-bottom: 2.5rem;
}
.pcard__icon svg { width: 22px; height: 22px; }
.pcard h3 { font-size: 1.5rem; margin-bottom: .9rem; }
.pcard p { color: var(--muted); font-size: .95rem; }
.pcard ul { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1.5rem; display: grid; gap: .8rem; }
.pcard li { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; }
.pcard li::before { content:"✓"; color: var(--orange); font-weight: 700; }

/* ============================================================
   Producto — ficha técnica
   ============================================================ */
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top:1px solid var(--line); border-left:1px solid var(--line); }
.spec-grid .cell { border-right:1px solid var(--line); border-bottom:1px solid var(--line); padding: 1.8rem 1.6rem; }
.spec-grid .k { font-size:.68rem; letter-spacing:.16em; text-transform:uppercase; color: var(--muted); margin-bottom:.6rem; }
.spec-grid .v { font-family: var(--serif); font-size: 1.5rem; line-height:1.15; }

/* ============================================================
   Calendario de cosecha
   ============================================================ */
.calendar { margin-top: 3rem; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.cal-row { display: grid; grid-template-columns: 130px repeat(12, 1fr); align-items: center; }
.cal-row.head { background: var(--cream-2); }
.cal-row.head span { font-size:.66rem; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); padding:.9rem .2rem; text-align:center; }
.cal-row.head span:first-child { text-align:left; padding-left:1.4rem; }
.cal-row .name { font-family: var(--serif); font-size:1.05rem; padding:1rem 1.4rem; }
.cal-cell { height: 34px; margin: 3px; border-radius: 6px; background: var(--line-soft); }
.cal-cell.reg { background: #f5c9ab; }
.cal-cell.peak { background: var(--orange); }
.cal-legend { display:flex; gap:1.8rem; margin-top:1.5rem; font-size:.8rem; color:var(--muted); }
.cal-legend span { display:inline-flex; align-items:center; gap:.5rem; }
.cal-legend i { width:14px; height:14px; border-radius:4px; display:inline-block; }
.cal-legend .reg { background:#f5c9ab; }
.cal-legend .peak { background: var(--orange); }

/* ============================================================
   Capacidad
   ============================================================ */
.cap-stats { display:grid; grid-template-columns: repeat(4,1fr); border-top:1px solid var(--line); margin-top:3rem; }
.cap-stats .cell { padding:2rem 1.5rem; border-right:1px solid var(--line); }
.cap-stats .cell:last-child { border-right:none; }
.cap-stats .k { font-size:.66rem; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); margin-bottom:1rem; min-height:2.4em; }
.cap-stats .num { font-family:var(--serif); font-size: clamp(1.8rem,3vw,2.6rem); line-height:1; }
.expansion { margin-top: 3.5rem; }
.expansion .bar { height: 16px; border-radius:999px; background: var(--cream-2); overflow:hidden; border:1px solid var(--line); }
.expansion .fill { height:100%; width:40%; background: linear-gradient(90deg,var(--orange),var(--coral)); border-radius:999px; }
.expansion .labels { display:flex; justify-content:space-between; margin-top:.9rem; font-size:.72rem; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); }
.expansion .cap-title { font-family:var(--serif); font-size:clamp(1.3rem,2.4vw,1.9rem); margin-bottom:1.4rem; max-width:24ch; }
.expansion .note { margin-top:1rem; font-size:.85rem; color:var(--muted); }

/* ============================================================
   Mercados
   ============================================================ */
.markets { display:grid; grid-template-columns: repeat(5,1fr); border-top:1px solid var(--line); border-left:1px solid var(--line); margin-top:3rem; }
.markets .cell { display:flex; align-items:center; gap:.6rem; padding:1.3rem 1.4rem; border-right:1px solid var(--line); border-bottom:1px solid var(--line); font-size:.95rem; }
.markets .cell svg { width:16px; height:16px; color: var(--coral); flex-shrink:0; }
.markets .cell.soon { color: var(--muted-2); }
.markets .cell.soon span { font-size:.66rem; letter-spacing:.14em; text-transform:uppercase; }

/* ============================================================
   Sostenibilidad
   ============================================================ */
.sus-grid { display:grid; grid-template-columns: repeat(4,1fr); border-top:1px solid var(--line); border-left:1px solid var(--line); margin-top:3rem; }
.sus-grid .cell { padding:2rem 1.6rem 2.4rem; border-right:1px solid var(--line); border-bottom:1px solid var(--line); }
.sus-grid .ic { width:46px; height:46px; border-radius:50%; background: rgba(242,112,32,.1); display:grid; place-items:center; color:var(--orange); margin-bottom:2.5rem; }
.sus-grid .ic svg { width:20px; height:20px; }
.sus-grid p { font-size:.98rem; }

/* ============================================================
   Catálogo (CTA)
   ============================================================ */
.catalog { text-align:center; }
.catalog .display { margin: 1.4rem auto; max-width: 16ch; }
.catalog .lead { margin: 0 auto 2.2rem; }

/* ============================================================
   Contacto (oscuro)
   ============================================================ */
.contact { background: var(--dark); color: #fff; }
.contact .eyebrow { color: var(--orange); }
.contact .eyebrow::before { background: var(--orange); }
.contact .lead { color: var(--muted-2); }
.contact__grid { display:grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem,6vw,5rem); align-items:start; }
.contact__info { margin-top: 2.5rem; border-top:1px solid var(--line-dark); padding-top:2rem; display:grid; gap:1.8rem; }
.contact__info .k { font-size:.68rem; letter-spacing:.18em; text-transform:uppercase; color:var(--muted-2); margin-bottom:.5rem; }
.contact__info .email { font-family:var(--serif); font-size:1.3rem; }
.contact__info address { font-style:normal; color:var(--muted-2); line-height:1.7; }

.form { display:grid; grid-template-columns: 1fr 1fr; gap: 1.8rem 1.5rem; }
.field { display:flex; flex-direction:column; }
.field.full { grid-column: 1 / -1; }
.field label { font-size:.68rem; letter-spacing:.16em; text-transform:uppercase; color:var(--muted-2); margin-bottom:.7rem; }
.field input, .field select, .field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-dark);
  color: #fff;
  font-family: var(--sans);
  font-size: 1rem;
  padding: .6rem 0;
  transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field select:focus, .field textarea:focus { outline:none; border-color: var(--orange); }
.field select { appearance:none; background: transparent; }
.field select option { color:#111; }
.field ::placeholder { color: var(--muted); }
.form .btn { justify-self:start; grid-column: 1 / -1; margin-top:.5rem; }

/* ============================================================
   Footer
   ============================================================ */
.footer { background: var(--dark); color: #fff; padding-top: 3rem; border-top:1px solid var(--line-dark); }
.footer__grid { display:grid; grid-template-columns: 1.4fr 1fr 1fr; gap:3rem; padding-bottom:3rem; }
.footer__brand .brand__name { color: var(--orange); }
.footer__tag { color: var(--muted-2); margin:1.5rem 0; max-width: 30ch; }
.footer__legal-info { font-size:.85rem; color:var(--muted-2); line-height:1.7; }
.footer__legal-info strong { color:#fff; font-weight:600; display:block; margin-bottom:.4rem; }
.footer h4 { font-family:var(--sans); font-size:.68rem; letter-spacing:.18em; text-transform:uppercase; color:var(--orange); margin-bottom:1.4rem; font-weight:700; }
.footer__col a, .footer__col p { color: var(--muted-2); display:block; margin-bottom:.8rem; font-size:.95rem; transition:color .2s; }
.footer__col a:hover { color:#fff; }
.footer__bottom { border-top:1px solid var(--line-dark); padding-block:1.6rem; display:flex; justify-content:space-between; flex-wrap:wrap; gap:1rem; font-size:.8rem; color:var(--muted); }
.footer__bottom .links { display:flex; gap:1.6rem; }

/* ============================================================
   Cookies
   ============================================================ */
.cookies {
  position: fixed; left: 1.5rem; bottom: 1.5rem; z-index: 200;
  max-width: 420px;
  background: var(--dark); color: #fff;
  border-radius: 16px; padding: 1.5rem;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.5);
  transition: opacity .3s, transform .3s;
}
.cookies.hide { opacity:0; transform: translateY(10px); pointer-events:none; }
.cookies .tag { font-size:.66rem; letter-spacing:.2em; text-transform:uppercase; color:var(--orange); display:flex; align-items:center; gap:.5rem; margin-bottom:.9rem; }
.cookies .tag::before { content:""; width:6px; height:6px; border-radius:50%; background:var(--orange); }
.cookies p { color: var(--muted-2); font-size:.9rem; margin-bottom:1.2rem; }
.cookies__actions { display:flex; align-items:center; gap:1.2rem; }
.cookies a { text-decoration: underline; font-size:.85rem; color: var(--muted-2); }

/* ============================================================
   Modal catálogo
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 300; display: none; }
.modal.open { display: grid; place-items: center; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(10,8,6,.6); backdrop-filter: blur(4px); }
.modal__card {
  position: relative;
  z-index: 1;
  width: min(460px, calc(100vw - 2.5rem));
  background: var(--dark);
  color: #fff;
  border-radius: 20px;
  padding: clamp(1.8rem, 4vw, 2.6rem);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7);
  animation: modalIn .3s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.modal__close {
  position: absolute; top: 1rem; right: 1.2rem;
  background: none; border: none; color: var(--muted-2);
  font-size: 1.8rem; line-height: 1; cursor: pointer; transition: color .2s;
}
.modal__close:hover { color: #fff; }
.modal .eyebrow { color: var(--orange); }
.modal .eyebrow::before { background: var(--orange); }
.modal__title { font-family: var(--serif); font-weight: 500; font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: .6rem; }
.modal__lead { color: var(--muted-2); font-size: .96rem; margin-bottom: 1.8rem; }
.field--light { margin-bottom: 1.4rem; }
.field--light label { color: var(--muted-2); }
.modal__error { color: #f2896a; font-size: .85rem; margin: -.4rem 0 1rem; }
.modal form .btn { width: 100%; justify-content: center; margin-top: .4rem; }
.modal__note { color: var(--muted); font-size: .78rem; margin-top: 1rem; text-align: center; }
.modal__success { text-align: center; padding: 1rem 0; }
.modal__check {
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(242,112,32,.15); color: var(--orange);
  display: grid; place-items: center; font-size: 1.8rem; margin: 0 auto 1.4rem;
}
.modal__success a { color: var(--orange); text-decoration: underline; }

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

/* ============================================================
   Página de documento (Transparencia / Subvenciones)
   ============================================================ */
.doc-main { padding-top: var(--header-h); }
.doc-hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 3vw, 2.5rem); }
.doc-hero .display { margin-top: .8rem; }
.doc-hero .lead { margin-top: 1.6rem; max-width: 60ch; }
.doc-section { padding-bottom: clamp(4rem, 9vw, 7rem); }
.doc-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 60px -40px rgba(0,0,0,.25);
}
.doc-card__head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  padding: 1.4rem 1.6rem;
  border-bottom: 1px solid var(--line);
}
.doc-card__head .name { display: flex; align-items: center; gap: .8rem; }
.doc-card__head .name svg { width: 26px; height: 26px; color: var(--coral); flex: none; }
.doc-card__head .name .t { font-family: var(--serif); font-size: 1.15rem; line-height: 1.2; }
.doc-card__head .name .m { font-size: .78rem; color: var(--muted); margin-top: .2rem; }
.doc-actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.pdf-frame {
  width: 100%; height: min(80vh, 900px);
  border: none; display: block; background: var(--cream-2);
}
.doc-note { margin-top: 1.4rem; font-size: .85rem; color: var(--muted); }

/* ---------- Ayudas / subvenciones ---------- */
.grant + .grant { margin-top: clamp(3.5rem, 7vw, 6rem); padding-top: clamp(3.5rem, 7vw, 6rem); border-top: 1px solid var(--line); }
.grant__title { font-family: var(--serif); font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.2; margin-top: .9rem; max-width: 24ch; }
.grant__text { margin-top: 2rem; max-width: 68ch; }
.grant__text p { color: var(--muted); }
.grant__text p + p { margin-top: 1.1rem; }
/* Texto justificado; la partición evita ríos y huecos en columnas estrechas */
.grant__text p, .legal p, .legal li {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}
.grant__text strong { color: var(--ink); font-weight: 600; }
.grant__figures { margin-top: 2.6rem; }
.grant__figures.spec-grid { grid-template-columns: repeat(4, 1fr); }
.grant__figures .v { font-size: clamp(1.25rem, 1.9vw, 1.5rem); }
.grant .doc-card { margin-top: 2.6rem; }
.doc-card--file .doc-card__head { border-bottom: none; }

/* ---------- Texto legal ---------- */
.legal { max-width: 78ch; }
.legal h2 {
  font-family: var(--serif); font-size: clamp(1.3rem, 2vw, 1.65rem);
  line-height: 1.25; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line-soft);
}
.legal > h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.legal h3 { font-size: 1rem; font-weight: 700; margin-top: 1.8rem; }
.legal p, .legal li { color: var(--muted); }
.legal p { margin-top: 1.1rem; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal a { color: var(--coral); text-decoration: underline; text-underline-offset: 3px; }
.legal ul { margin-top: 1.1rem; padding-left: 0; }
.legal li { position: relative; padding-left: 1.4rem; margin-top: .6rem; }
.legal li::before {
  content: ""; position: absolute; left: 0; top: .7em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--coral);
}
.legal__data { margin-top: 1.6rem; border-top: 1px solid var(--line); }
.legal__data div { display: grid; grid-template-columns: 240px 1fr; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line-soft); }
.legal__data dt { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: .25rem; }
.legal__data dd { color: var(--ink); }
.legal__updated { margin-top: 3.5rem; font-size: .85rem; color: var(--muted-2); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  :root { --pad: 1.4rem; }
  .nav, .header__right .btn { display: none; }
  .burger { display:inline-flex; }
  .two-col, .contact__grid, .intro__bottom { grid-template-columns: 1fr; gap: 2.5rem; }
  .intro__bottom { align-items: start; }
  .process-grid { grid-template-columns: 1fr; }
  .cap-stats, .markets, .sus-grid, .spec-grid { grid-template-columns: repeat(2,1fr); }
  .grant__figures.spec-grid { grid-template-columns: repeat(2,1fr); }
  .form { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap:2.5rem; }
  .reel { flex-direction: column; gap: 2rem; }
  .reel__phone { width: min(280px, 80%); }
  .reel__side { text-align: center; }
  .reel__side h3 { margin-inline: auto; }
  .reel__dots { justify-content: center; }
  .cal-row { grid-template-columns: 90px repeat(12,1fr); }
  .cal-row .name { font-size:.85rem; padding:.6rem; }
}
@media (max-width: 560px) {
  .stat-row { grid-template-columns: 1fr; gap:1.8rem; }
  .mini-cards, .climate__grid { grid-template-columns: 1fr 1fr; }
  .cap-stats, .markets, .sus-grid, .spec-grid { grid-template-columns: 1fr; }
  .grant__figures.spec-grid { grid-template-columns: 1fr; }
  .calendar { overflow-x:auto; }
  .cal-row { min-width: 620px; }
  .cookies { left:1rem; right:1rem; bottom:1rem; max-width:none; }
  .pdf-frame { height: 70vh; }
  .doc-actions { width: 100%; }
  .doc-actions .btn { flex: 1; justify-content: center; }
  .legal__data div { grid-template-columns: 1fr; gap: .3rem; }
}
