/* ============================================================
   FUNDACIÓN PANACA — SISTEMA DE DISEÑO (Figma oficial)
   ------------------------------------------------------------
   Reglas del Figma (comentarios de Parque PANACA):
   1. "Se conserva igual en el referente, solo cambia colores y
      tipografías, la jerarquía sigue siendo la misma."
   2. "Todas las tipografías deben de ser de la familia Euclid
      Circular. no tenemos otra."  -> UNA sola familia, sin Gill Sans.
   3. "estandarizar los botones y assets básicos del sitio"
      -> .btn con una sola forma/altura/radio; .chip, .card, .field
         y los iconos salen de aquí. No inventar variantes sueltas.
   4. "colores principales, no utilizar otros recursos que no estén
      implícitos dentro del figma" -> SOLO los 5 colores de la paleta
      + blanco/hueso/tinta derivados. Nada de dorados, teals, etc.
   ============================================================ */

/* ---------- TIPOGRAFÍA DE MARCA: Euclid Circular A (autohospedada) ---------- */
@font-face { font-family:"Euclid Circular A"; src:url("../assets/fonts/EuclidCircularA-Regular.woff2") format("woff2"); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:"Euclid Circular A"; src:url("../assets/fonts/EuclidCircularA-RegularItalic.woff2") format("woff2"); font-weight:400; font-style:italic; font-display:swap; }
@font-face { font-family:"Euclid Circular A"; src:url("../assets/fonts/EuclidCircularA-Medium.woff2") format("woff2"); font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:"Euclid Circular A"; src:url("../assets/fonts/EuclidCircularA-Semibold.woff2") format("woff2"); font-weight:600; font-style:normal; font-display:swap; }
@font-face { font-family:"Euclid Circular A"; src:url("../assets/fonts/EuclidCircularA-SemiboldItalic.woff2") format("woff2"); font-weight:600; font-style:italic; font-display:swap; }
@font-face { font-family:"Euclid Circular A"; src:url("../assets/fonts/EuclidCircularA-Bold.woff2") format("woff2"); font-weight:700; font-style:normal; font-display:swap; }

/* ---------- TOKENS ---------- */
:root {
  /* === PALETA PRINCIPAL (los 5 swatches del Figma) === */
  --vino:    #6B1512;   /* 1 · vinotinto / tierra */
  --naranja: #D8842C;   /* 2 · naranja cosecha */
  --rojo:    #E90A2D;   /* 3 · rojo PANACA (color primario / CTA) */
  --verde:   #106049;   /* 4 · verde campo */
  --azul:    #0B2538;   /* 5 · azul noche (fondos oscuros) */

  /* Escalas derivadas de la paleta (mismos tonos, no colores nuevos) */
  --rojo-hover:    #C50824;
  --rojo-suave:    #FDE7EB;
  --naranja-hover: #BC6F1F;
  --naranja-suave: #FAF0E3;
  --verde-hover:   #0B4536;
  --verde-claro:   #17936A;   /* mismo verde, aclarado: marcadores sobre fondo oscuro */
  --verde-suave:   #E7F0ED;
  --azul-2:        #123249;   /* superficie oscura elevada */
  --azul-3:        #1B4260;   /* bordes/divisores sobre oscuro */
  --vino-suave:    #F3E6E5;

  /* Neutros (blanco + hueso + tinta derivada del azul) */
  --blanco: #FFFFFF;
  --hueso:  #F7F2E9;   /* fondo cálido de secciones alternas */
  --hueso-2:#EFE8DB;
  --tinta:  #14293B;   /* texto principal */
  --tinta-2:#4A5B6A;   /* texto secundario */
  --tinta-3:#7C8B98;   /* apoyo / captions */
  --linea:  #E2DDD3;   /* bordes suaves */

  /* Semánticos */
  --bg:    var(--blanco);
  --fg:    var(--tinta);
  --brand: var(--rojo);

  /* Tipografía: UNA sola familia (regla 2 del Figma) */
  --font: "Euclid Circular A", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: var(--font);
  --font-sans: var(--font);

  /* Escala fluida */
  --step--1: clamp(0.82rem, 0.78rem + 0.18vw, 0.92rem);
  --step-0:  clamp(0.98rem, 0.93rem + 0.26vw, 1.12rem);
  --step-1:  clamp(1.18rem, 1.08rem + 0.48vw, 1.5rem);
  --step-2:  clamp(1.45rem, 1.28rem + 0.86vw, 2.1rem);
  --step-3:  clamp(1.85rem, 1.55rem + 1.45vw, 3rem);
  --step-4:  clamp(1.95rem, 1.6rem + 1.6vw, 3.2rem);
  --step-5:  clamp(2.5rem, 1.95rem + 2.95vw, 4.7rem);
  --step-6:  clamp(3.2rem, 2.2rem + 5.6vw, 7.6rem);

  /* Espaciado / radios / sombras */
  --sp: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  --gutter: clamp(1.2rem, 3vw, 3rem);
  --maxw: 1280px;
  --maxw-narrow: 820px;

  /* ---------- SELLO DE FORMA DE LA MARCA ----------
     El Figma NO usa esquinas redondeadas: son BORDES RECTOS con formas
     levemente irregulares (paralelogramo apenas inclinado). Por eso todos
     los radios valen 0 y la "irregularidad" se consigue recortando la
     silueta con clip-path.
     Los recortes usan calc() en px (no %) para que la inclinación sea
     CONSTANTE: con porcentajes, un chip estrecho y un botón ancho se
     inclinarían de forma distinta. */
  --r-sm: 0;
  --r-md: 0;
  --r-lg: 0;
  --r-xl: 0;
  --r-pill: 0;
  --r-btn: 0;

  /* Botones y etiquetas: paralelogramo leve, esquinas afiladas. */
  --corte-btn:  polygon(0 0, calc(100% - 7px) 0, 100% 100%, 7px 100%);
  --corte-chip: polygon(0 0, calc(100% - 5px) 0, 100% 100%, 5px 100%);
  /* Medios y bloques sólidos: esquinas apenas desplazadas. */
  --corte-suave: polygon(0 7px, 100% 0, 100% calc(100% - 7px), 0 100%);

  --shadow-sm: 0 2px 10px rgba(11,37,56,.06);
  --shadow-md: 0 18px 45px -22px rgba(11,37,56,.35);
  --shadow-lg: 0 40px 90px -35px rgba(11,37,56,.45);

  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

/* ---------- RESET ---------- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { animation-duration:.001ms !important; transition-duration:.001ms !important; }
}
body {
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.62;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img,svg,video { display:block; max-width:100%; height:auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
::selection { background: var(--rojo); color: #fff; }
:focus-visible { outline: 3px solid var(--rojo); outline-offset: 2px; }

/* ---------- TIPOGRAFÍA ---------- */
h1,h2,h3,h4,h5 {
  font-family: var(--font); font-weight: 600; line-height: 1.1;
  letter-spacing: -0.02em; color: var(--tinta);
  overflow-wrap: normal; word-break: normal; hyphens: none; text-wrap: balance;
}
@media (max-width: 640px){ h1,h2,h3,h4 { overflow-wrap: break-word; } }
.display { font-size: var(--step-6); font-weight: 600; line-height: .96; letter-spacing: -0.035em; }
h1,.h1 { font-size: var(--step-5); }
h2,.h2 { font-size: var(--step-4); }
h3,.h3 { font-size: var(--step-2); }
h4,.h4 { font-size: var(--step-1); }
.italic { font-style: italic; }

/* Antetítulo: línea corta + versalita (mismo patrón en todo el sitio) */
.eyebrow {
  font-size: var(--step--1); font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--rojo);
  display: inline-flex; align-items: center; gap: .6em;
}
.eyebrow::before { content:""; width: 26px; height: 2px; background: currentColor; display:inline-block; border-radius:0; }
.eyebrow--verde   { color: var(--verde); }
.eyebrow--naranja { color: var(--naranja); }
.eyebrow--claro   { color: #fff; opacity:.9; }

.lead { font-size: var(--step-1); line-height: 1.5; color: var(--tinta-2); font-weight: 400; }
.muted { color: var(--tinta-3); }
.balance { text-wrap: balance; }

/* Acentos de color en titulares */
.tx-rojo    { color: var(--rojo); }
.tx-verde   { color: var(--verde); }
.tx-naranja { color: var(--naranja); }
.tx-vino    { color: var(--vino); }
.tx-blanco  { color: #fff; }
/* Resaltado "caja blanca" del hero del Figma (la palabra "vidas") */
.hl { background: #fff; color: var(--azul); padding: 0 .12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* ---------- LAYOUT ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: var(--maxw-narrow); }
.section { padding-block: clamp(3.5rem, 7vw, 8rem); position: relative; }
.section--tight { padding-block: clamp(2.5rem, 5vw, 5rem); }
.section--azul { background: var(--azul); color: #E4ECF2; }
.section--azul h1,.section--azul h2,.section--azul h3,.section--azul h4 { color: #fff; }
.section--verde { background: var(--verde); color: #E2EFEA; }
.section--verde h1,.section--verde h2,.section--verde h3,.section--verde h4 { color: #fff; }
.section--hueso { background: var(--hueso); }
.section--hueso2 { background: var(--hueso-2); }
.grid { display: grid; gap: var(--gutter); }
.stack > * + * { margin-top: 1rem; }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }

/* ============================================================
   BOTONES ESTANDARIZADOS  (un solo componente, 4 variantes)
   .btn            -> primario ROJO
   .btn--naranja   -> secundario NARANJA
   .btn--verde     -> terciario VERDE
   .btn--ghost     -> contorno (con .btn--on-dark sobre fondos oscuros)
   Tamaños: .btn--sm / (base) / .btn--lg
   ============================================================ */
.btn {
  --btn-bg: var(--rojo);
  --btn-bg-hover: var(--rojo-hover);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 3rem; padding: .8em 1.75em;
  background: var(--btn-bg); color: var(--btn-fg);
  clip-path: var(--corte-btn);   /* sello de marca: recto e inclinado, NO redondeado */
  font-family: var(--font); font-weight: 600; font-size: var(--step-0);
  letter-spacing: -.005em; line-height: 1.1; text-align: center;
  /* La sombra va con filter, no box-shadow: clip-path recorta box-shadow y
     dejaría el botón sin sombra al inclinar la silueta. */
  transition: background .25s var(--ease), transform .25s var(--ease-out), filter .25s var(--ease-out);
}
.btn:hover { background: var(--btn-bg-hover); transform: translateY(-2px); filter: drop-shadow(0 10px 14px rgba(11,37,56,.3)); }
.btn:active { transform: translateY(0); }
.btn .btn__ico { transition: transform .3s var(--ease-out); }
.btn:hover .btn__ico { transform: translateX(4px); }
/* clip-path también recorta el outline del foco: se retira el recorte
   mientras el botón tiene foco de teclado para no perder accesibilidad. */
.btn:focus-visible { clip-path: none; }

.btn--naranja { --btn-bg: var(--naranja); --btn-bg-hover: var(--naranja-hover); --btn-fg:#fff; }
.btn--verde   { --btn-bg: var(--verde);   --btn-bg-hover: var(--verde-hover);   --btn-fg:#fff; }
.btn--vino    { --btn-bg: var(--vino);    --btn-bg-hover: #501008;              --btn-fg:#fff; }
/* Secundario: relleno suave en vez de contorno. Un `border` quedaría cortado
   por el clip-path en los lados inclinados; además el Figma muestra el botón
   secundario del hero RELLENO en blanco, no perfilado. */
.btn--ghost { --btn-bg: rgba(20,41,59,.07); --btn-bg-hover: rgba(20,41,59,.14); --btn-fg: var(--tinta); }
.btn--on-dark.btn--ghost { --btn-bg:#fff; --btn-bg-hover: var(--hueso); --btn-fg: var(--azul); }
.btn--blanco { --btn-bg:#fff; --btn-bg-hover:var(--hueso); --btn-fg: var(--azul); }
.btn--lg { min-height: 3.4rem; padding: .95em 2em; font-size: var(--step-1); }
.btn--sm { min-height: 2.5rem; padding: .6em 1.1em; font-size: var(--step--1); }
.btn--block { width: 100%; }

/* Enlace con flecha (asset básico del sitio) */
.link-arrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-weight: 600; color: var(--rojo);
  border-bottom: 2px solid transparent; padding-bottom: 2px;
  transition: gap .3s var(--ease-out), border-color .3s ease;
}
.link-arrow:hover { gap: .85em; border-color: currentColor; }
.link-arrow--verde { color: var(--verde); }
.link-arrow--naranja { color: var(--naranja); }
.link-arrow--claro { color: #fff; }

/* ---------- CHIPS / ETIQUETAS ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .42em .9em; border-radius: var(--r-pill);
  background: var(--verde-suave); color: var(--verde);
  font-size: var(--step--1); font-weight: 600; line-height: 1.3;
  border: 1px solid rgba(16,96,73,.18);
}
.chip--rojo    { background: var(--rojo-suave); color: var(--rojo); border-color: rgba(233,10,45,.2); }
.chip--naranja { background: var(--naranja-suave); color: var(--naranja-hover); border-color: rgba(216,132,44,.28); }
.chip--vino    { background: var(--vino-suave); color: var(--vino); border-color: rgba(107,21,18,.2); }
.chip--azul    { background: #E7EDF2; color: var(--azul); border-color: rgba(11,37,56,.16); }
.chip--on-dark { background: rgba(255,255,255,.1); color: #E4ECF2; border-color: rgba(255,255,255,.2); }
.chip--solid-rojo { background: var(--rojo); color:#fff; border-color: var(--rojo); }

/* ---------- CARDS ---------- */
.card {
  background: var(--blanco); border-radius: var(--r-lg);
  border: 1px solid var(--linea);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), border-color .35s ease;
  position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: rgba(233,10,45,.28); }

/* ============================================================
   SELLO DE FORMA — medios y bloques sólidos
   Esquinas rectas apenas desplazadas (nunca redondeadas).
   Sólo se recortan elementos SIN borde: clip-path recorta también el
   borde y en los lados inclinados quedaría partido. Los bloques con
   borde (tarjetas claras, formularios, paneles del mapa) se quedan
   con esquinas rectas a 90°, que también cumplen el diseño.
   Tampoco se recortan medios EMBEBIDOS dentro de una tarjeta con borde
   (p. ej. .course__img): el corte dejaría una muesca diagonal contra la
   esquina recta de la tarjeta y se leería como un fallo, no como sello.
   ============================================================ */
.vfeature, .path, .ser, .b2b__card, .vtesti, .finbanner,
.s-split__media, .mode, .mega__feature {
  clip-path: var(--corte-suave);
}

/* ---------- UTILIDADES ---------- */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.divider { display:flex; align-items:center; justify-content:center; gap:1rem; color:var(--linea); }
.divider::before,.divider::after { content:""; height:1px; width:min(120px,20vw); background: currentColor; }

/* ---------- REVEAL (animación al scroll, con fallback sin JS) ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); }
.js [data-reveal] { transition: opacity .85s var(--ease-out), transform .85s var(--ease-out); }
[data-reveal].is-in { opacity: 1; transform: none; }
html:not(.js) [data-reveal] { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal-delay="3"] { transition-delay: .24s; }
[data-reveal-delay="4"] { transition-delay: .32s; }
[data-reveal-delay="5"] { transition-delay: .40s; }
