/* ============================================================
   EMIVF — Material aislante para transformadores
   Sistema de diseño corporativo
   ------------------------------------------------------------
   Paleta:  verde industrial profundo · blanco · dorado satinado
   Tipografía: Archivo (Google Fonts)
   ============================================================ */

:root {
  /* Color */
  --green-950: #081F16;
  --green-900: #0B2A1E;
  --green-800: #103526;
  --green-700: #123B2A;          /* verde principal */
  --green-600: #1B4A36;
  --green-100: #E3EBE5;
  --green-050: #F1F5F1;

  --gold-500: #B8912F;           /* dorado satinado */
  --gold-600: #8F6E1F;           /* dorado para texto sobre claro — contraste 4.75:1 (WCAG AA) */
  --gold-100: #F3EBD8;

  --paper: #FFFFFF;
  --mist:  #F6F7F5;
  --line:  #E3E6E1;
  --ink:   #131C17;
  --ink-2: #46554D;

  /* Tipografía */
  --font: "Archivo", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Ritmo */
  --container: 1200px;
  --radius: 10px;
  --section-y: clamp(4.5rem, 9vw, 8.5rem);

  --shadow-soft: 0 1px 2px rgba(8, 31, 22, .05), 0 12px 32px -16px rgba(8, 31, 22, .14);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 92px; }  /* evita que el header fijo tape las secciones ancladas */
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -0.015em; font-weight: 700; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--green-700); color: #fff;
  padding: .75rem 1.25rem; z-index: 200; font-weight: 600;
}
.skip-link:focus { left: 0; }

.container {
  width: min(var(--container), 100% - 3rem);
  margin-inline: auto;
}

/* ---------- Utilidades tipográficas ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .75rem;
  font-size: .78rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-600);
}
.eyebrow::before {
  content: ""; width: 2rem; height: 2px;
  background: var(--gold-500); flex: none;
}
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  margin-top: 1rem; color: var(--green-900);
}
.section-head p { margin-top: 1rem; color: var(--ink-2); font-size: 1.06rem; max-width: 40rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .95rem 1.9rem;
  font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  text-decoration: none; border-radius: 4px;
  border: 1px solid transparent;
  transition: background-color .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .25s var(--ease);
}
.btn svg { width: 1.05rem; height: 1.05rem; flex: none; }
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--green-700); color: #fff; }
.btn--primary:hover { background: var(--green-900); }

.btn--gold { background: var(--gold-500); color: var(--green-950); }
.btn--gold:hover { background: #C9A344; }

.btn--ghost { border-color: rgba(255,255,255,.45); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }

.btn--outline { border-color: var(--green-700); color: var(--green-700); }
.btn--outline:hover { background: var(--green-050); }

.btn--sm { padding: .65rem 1.2rem; font-size: .88rem; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 24px -18px rgba(8,31,22,.35); }
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; height: 76px;
}

/* Marca — logotipo horizontal oficial EMIVF */
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo { height: 48px; width: auto; display: block; }
.brand-logo--footer { height: 56px; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a {
  text-decoration: none; font-size: .92rem; font-weight: 500;
  color: var(--ink-2); transition: color .2s var(--ease);
  white-space: nowrap;
}
.nav a:hover { color: var(--green-700); }
.header .btn { flex: none; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  color: #fff;
  background: var(--green-950);   /* base oscura: nunca destella blanco al ocultar la foto */
  isolation: isolate;
  padding: 9rem 0 6rem;
}
/* Secuencia cinematográfica de escenas */
.hero__scenes { position: absolute; inset: 0; z-index: -2; overflow: hidden; background: var(--green-950); }
.hero__scenes .scene { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s var(--ease); }
.hero__scenes .scene img { width: 100%; height: 100%; object-fit: cover; }
.hero__scenes .scene.is-active { opacity: 1; }
.hero__scenes .scene.is-active img {
  animation: hero-kenburns 8s cubic-bezier(.22,.61,.36,1) forwards;
}
@keyframes hero-kenburns {
  from { transform: scale(1.03); }
  to   { transform: scale(1.12); }
}

/* Indicador de escena (etiqueta + barras de progreso) */
.hero__scenectrl {
  position: absolute; right: clamp(1.5rem, 4vw, 4rem); bottom: 2rem; z-index: 1;
  display: flex; flex-direction: column; align-items: flex-end; gap: .7rem;
  color: rgba(255,255,255,.85);
}
.hero__scenelabel {
  display: flex; gap: .7rem;
  font-size: .75rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
}
.hero__scenelabel .num { color: var(--gold-500); }
.hero__scenelabel.is-swap { animation: scene-label-in .6s var(--ease) both; }
@keyframes scene-label-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.hero__bars { display: flex; gap: .45rem; }
.hero__bars span { width: 36px; height: 2px; background: rgba(255,255,255,.25); position: relative; overflow: hidden; }
.hero__bars span i { position: absolute; inset: 0; background: var(--gold-500); transform: scaleX(0); transform-origin: left; }
.hero__bars span.is-active i { transform: scaleX(1); transition: transform 6.5s linear; }

/* Entrada del titular palabra por palabra (estilo GSAP) */
.hero h1 .w {
  display: inline-block; opacity: 0;
  transform: translateY(.55em); filter: blur(10px);
  animation: hero-word-in .9s cubic-bezier(.22,1,.36,1) forwards;
}
.hero h1 .w:nth-child(1) { animation-delay: .25s; }
.hero h1 .w:nth-child(2) { animation-delay: .32s; }
.hero h1 .w:nth-child(3) { animation-delay: .39s; }
.hero h1 .w:nth-child(4) { animation-delay: .46s; }
.hero h1 .w:nth-child(5) { animation-delay: .53s; }
.hero h1 .w:nth-child(6) { animation-delay: .6s; }
.hero h1 .w:nth-child(7) { animation-delay: .67s; }
@keyframes hero-word-in {
  to { opacity: 1; transform: none; filter: none; }
}
.hero-fade {
  opacity: 0; transform: translateY(14px);
  animation: hero-fade-in .8s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes hero-fade-in {
  to { opacity: 1; transform: none; }
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(78deg, rgba(8,31,22,.95) 0%, rgba(11,42,30,.86) 42%, rgba(11,42,30,.45) 100%);
}
.hero__content { max-width: 50rem; }
.hero__badge {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .78rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold-100);
  border: 1px solid rgba(184,145,47,.55);
  padding: .5rem 1rem; border-radius: 999px;
  margin-bottom: 2rem;
}
.hero__badge::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold-500);
}
.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.35rem);
  font-weight: 800; letter-spacing: -0.02em; color: #fff;
}
.hero__sub {
  margin-top: 1.5rem; font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: rgba(255,255,255,.82); max-width: 36rem; line-height: 1.65;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.75rem; }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 2.5rem;
  margin-top: 4.5rem; padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.18);
}
.hero__meta div { min-width: 9rem; }
.hero__meta strong {
  display: block; font-size: 1.45rem; font-weight: 700; color: #fff; letter-spacing: -.01em;
}
.hero__meta span { font-size: .85rem; color: rgba(255,255,255,.65); }

/* ---------- Sección: ¿Por qué EMIVF? ---------- */
.section { padding-block: var(--section-y); }
.section--mist { background: var(--mist); }

.value-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem;
}
.value-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.25rem 1.9rem;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.value-card:hover {
  transform: translateY(-4px);
  border-color: var(--green-100);
  box-shadow: var(--shadow-soft);
}
.value-card__icon {
  width: 52px; height: 52px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--green-050); color: var(--green-700);
  margin-bottom: 1.5rem;
}
.value-card__icon svg { width: 26px; height: 26px; }
.value-card h3 { font-size: 1.08rem; color: var(--green-900); }
.value-card p { margin-top: .6rem; font-size: .92rem; color: var(--ink-2); }

/* ---------- Productos ---------- */
.product-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem;
}
.product-card {
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.product-card__media {
  position: relative; aspect-ratio: 16 / 10;
  background: linear-gradient(160deg, #EEF1EC 0%, #E2E8E1 100%);
  display: grid; place-items: center; overflow: hidden;
}
.product-card__media svg, .product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.product-card__class {
  position: absolute; top: 1.1rem; left: 1.1rem;
  background: var(--green-700); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: .4rem .8rem; border-radius: 3px;
}
.product-card__body { display: flex; flex-direction: column; flex: 1; padding: 2rem 2rem 2.25rem; }
.product-card h3 { font-size: 1.35rem; color: var(--green-900); letter-spacing: -.01em; }
.product-card__desc { margin-top: .8rem; color: var(--ink-2); font-size: .95rem; }
.product-card__apps { margin-top: 1.4rem; }
.product-card__apps h4 {
  font-size: .72rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold-600); margin-bottom: .7rem;
}
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  font-size: .8rem; font-weight: 500; color: var(--green-700);
  background: var(--green-050); border: 1px solid var(--green-100);
  padding: .32rem .75rem; border-radius: 999px;
}
.product-card__actions {
  display: flex; flex-wrap: wrap; gap: .75rem;
  margin-top: auto; padding-top: 1.75rem;
}

/* Próximamente */
.soon {
  margin-top: 3.5rem; border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 1.75rem 2rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem;
  background: var(--mist);
}
.soon__label {
  font-size: .74rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-600); flex: none;
}
.soon ul { display: flex; flex-wrap: wrap; gap: .6rem; }
.soon li {
  font-size: .85rem; font-weight: 500; color: var(--ink-2);
  background: var(--paper); border: 1px solid var(--line);
  padding: .38rem .9rem; border-radius: 999px;
}

/* ---------- Comparativas técnicas ---------- */
.chart-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1.5rem; }
.chart-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2.25rem;
}
.chart-card--wide { grid-column: 1 / -1; }
.chart-card h3 { font-size: 1.15rem; color: var(--green-900); }
.chart-card__note { margin-top: .5rem; font-size: .86rem; color: var(--ink-2); }
.chart-card figure { margin: 2rem 0 0; }
.chart-card figcaption { margin-top: 1.25rem; font-size: .78rem; color: var(--ink-2); }
.chart-svg { width: 100%; height: auto; display: block; }

.legend { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 1.5rem; }
.legend span { display: inline-flex; align-items: center; gap: .55rem; font-size: .82rem; color: var(--ink-2); }
.legend i { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.legend .swatch-green { background: var(--green-700); }
.legend .swatch-gold { background: var(--gold-500); }
.legend .swatch-gray { background: #C9D0CA; }

/* Comparativa A vs F: números editoriales */
.versus { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem; margin-top: 2.25rem; }
.versus__col { text-align: center; padding: 1.75rem 1rem; border-radius: var(--radius); }
.versus__col--a { background: var(--mist); }
.versus__col--f { background: var(--green-700); color: #fff; }
.versus__label { font-size: .74rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; opacity: .75; }
.versus__value { display: block; font-size: clamp(2.4rem, 4vw, 3.4rem); font-weight: 800; letter-spacing: -.02em; margin-top: .35rem; }
.versus__col--f .versus__value { color: #fff; }
.versus__col--f .versus__hint { color: rgba(255,255,255,.7); }
.versus__hint { display: block; font-size: .82rem; margin-top: .3rem; color: var(--ink-2); }
.versus__vs {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--gold-600);
  font-size: .8rem; font-weight: 700; letter-spacing: .05em;
}
.versus-delta {
  margin-top: 1.5rem; display: flex; align-items: center; gap: .75rem;
  font-size: .9rem; color: var(--green-700); font-weight: 600;
}
.versus-delta svg { width: 1.1rem; height: 1.1rem; color: var(--gold-600); flex: none; }

/* ---------- Sectores ---------- */
.sector-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.sector-item {
  display: flex; align-items: center; gap: 1.25rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.75rem; background: var(--paper);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.sector-item:hover { border-color: var(--green-100); box-shadow: var(--shadow-soft); }
.sector-item__icon {
  width: 46px; height: 46px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: var(--green-700); color: var(--gold-100);
}
.sector-item__icon svg { width: 23px; height: 23px; }
.sector-item h3 { font-size: 1rem; color: var(--green-900); }
.sector-item p { font-size: .84rem; color: var(--ink-2); margin-top: .15rem; }

/* ---------- Biblioteca técnica ---------- */
.doc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.doc-card {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem 1.75rem;
  text-decoration: none;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.doc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); border-color: var(--green-100); }
.doc-card__icon {
  width: 48px; height: 48px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--green-050); color: var(--green-700);
  margin-bottom: 1.4rem;
}
.doc-card__icon svg { width: 24px; height: 24px; }
.doc-card__type {
  font-size: .68rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-600);
}
.doc-card h3 { font-size: 1.02rem; color: var(--green-900); margin-top: .45rem; }
.doc-card p { font-size: .85rem; color: var(--ink-2); margin-top: .5rem; }
.doc-card__cta {
  margin-top: auto; padding-top: 1.5rem;
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .86rem; font-weight: 600; color: var(--green-700);
}
.doc-card__cta svg { width: 1rem; height: 1rem; transition: transform .3s var(--ease); }
.doc-card:hover .doc-card__cta svg { transform: translateY(2px); }

/* ---------- FAQ ---------- */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.4rem 0; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 1.02rem; color: var(--green-900);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .faq-icon {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--green-700);
  transition: transform .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease);
}
.faq-item summary .faq-icon svg { width: 14px; height: 14px; }
.faq-item[open] summary .faq-icon { transform: rotate(45deg); background: var(--green-700); color: #fff; border-color: var(--green-700); }
.faq-item__body { padding: 0 3rem 1.5rem 0; color: var(--ink-2); font-size: .95rem; }

/* ---------- CTA banda ---------- */
.cta-band { position: relative; isolation: isolate; color: #fff; padding-block: clamp(4rem, 8vw, 7rem); }
.cta-band__media { position: absolute; inset: 0; z-index: -2; }
.cta-band__media img { width: 100%; height: 100%; object-fit: cover; }
.cta-band::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(8,31,22,.96) 0%, rgba(11,42,30,.82) 55%, rgba(11,42,30,.55) 100%);
}
.cta-band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; }
.cta-band h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); color: #fff; max-width: 30rem; }
.cta-band p { margin-top: .9rem; color: rgba(255,255,255,.78); max-width: 30rem; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 4.5vw, 4rem); align-items: start; }

.contact-channels { display: grid; gap: 1rem; margin-top: 2.25rem; }
.channel {
  display: flex; align-items: center; gap: 1.1rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem 1.4rem; text-decoration: none;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.channel:hover { border-color: var(--green-100); box-shadow: var(--shadow-soft); }
.channel__icon {
  width: 44px; height: 44px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: var(--green-050); color: var(--green-700);
}
.channel__icon svg { width: 22px; height: 22px; }
.channel strong { display: block; font-size: .95rem; color: var(--green-900); }
.channel span { font-size: .85rem; color: var(--ink-2); }

.map-frame {
  margin-top: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; aspect-ratio: 16 / 8; background: var(--mist);
}
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.form-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
  box-shadow: var(--shadow-soft);
}
.form-card h3 { font-size: 1.3rem; color: var(--green-900); }
.form-card > p { margin-top: .5rem; font-size: .92rem; color: var(--ink-2); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-top: 1.75rem; }
.field { display: flex; flex-direction: column; gap: .45rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .82rem; font-weight: 600; color: var(--green-900); }
.field input, .field select, .field textarea {
  font: inherit; font-size: .95rem; color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px;
  padding: .8rem 1rem; background: var(--paper);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
  width: 100%;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(18,59,42,.12);
}
.form-footer { margin-top: 1.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-footer small { color: var(--ink-2); font-size: .78rem; }
.form-status { margin-top: 1rem; font-size: .9rem; font-weight: 600; color: var(--green-700); }

/* ---------- Footer ---------- */
.footer { background: var(--green-950); color: rgba(255,255,255,.72); }
.footer a { text-decoration: none; transition: color .2s var(--ease); }
.footer a:hover { color: #fff; }
.footer__top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem;
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.footer__about { max-width: 22rem; font-size: .9rem; margin-top: 1.25rem; }
.footer h4 {
  font-size: .74rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-500); margin-bottom: 1.1rem;
}
.footer li { margin-bottom: .6rem; font-size: .9rem; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-block: 1.5rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  font-size: .8rem; color: rgba(255,255,255,.5);
}

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green-700); color: #fff;
  box-shadow: 0 10px 30px -8px rgba(8,31,22,.5);
  transition: transform .3s var(--ease), background-color .3s var(--ease);
}
.wa-float:hover { transform: translateY(-3px) scale(1.04); background: var(--green-900); }
.wa-float svg { width: 28px; height: 28px; }
.wa-float::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid rgba(18,59,42,.35);
  animation: wa-pulse 2.6s var(--ease) infinite;
}
@keyframes wa-pulse {
  0%   { transform: scale(1); opacity: .8; }
  70%  { transform: scale(1.28); opacity: 0; }
  100% { transform: scale(1.28); opacity: 0; }
}

/* ---------- Página de producto (ficha) ---------- */
.page-hero {
  background: var(--green-950); color: #fff;
  padding: 10rem 0 4.5rem;
}
.breadcrumb { font-size: .82rem; color: rgba(255,255,255,.55); margin-bottom: 1.5rem; }
.breadcrumb a { color: rgba(255,255,255,.75); text-decoration: none; }
.breadcrumb a:hover { color: #fff; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); color: #fff; max-width: 40rem; }
.page-hero p { margin-top: 1.2rem; color: rgba(255,255,255,.75); max-width: 36rem; }
.page-hero .chip-row { margin-top: 1.75rem; }
.page-hero .chip { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; }

.spec-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
.spec-table th, .spec-table td {
  text-align: left; padding: .9rem 1rem; font-size: .92rem;
  border-bottom: 1px solid var(--line);
}
.spec-table th { width: 44%; color: var(--green-900); font-weight: 600; }
.spec-table td { color: var(--ink-2); }
.spec-note { margin-top: 1rem; font-size: .8rem; color: var(--ink-2); }
.spec-aside { position: sticky; top: 100px; display: grid; gap: 1.25rem; }
.spec-aside .product-card__media { border: 1px solid var(--line); border-radius: var(--radius); }

.feature-list { display: grid; gap: .9rem; margin-top: 1.5rem; }
.feature-list li {
  display: flex; gap: .8rem; align-items: flex-start;
  font-size: .95rem; color: var(--ink-2);
}
.feature-list svg { width: 1.15rem; height: 1.15rem; flex: none; color: var(--gold-600); margin-top: .2rem; }

/* ---------- Animación de aparición ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal-stagger.is-visible > * { opacity: 1; transform: none; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: .08s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: .16s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: .24s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: .32s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: .4s; }

/* ============================================================
   Capa de experiencia: tilt 3D, luz de cursor, letras, glass
   ============================================================ */

/* Titular letra por letra (activado por JS) */
.hero h1.letras .w { animation: none; opacity: 1; transform: none; filter: none; }
.hero h1 .ch {
  display: inline-block; opacity: 0;
  transform: translateY(.5em); filter: blur(8px);
  animation: hero-word-in .7s cubic-bezier(.22,1,.36,1) forwards;
  animation-delay: calc(.2s + var(--i, 0) * 20ms);
}

/* Glassmorphism discreto en el hero */
.hero__badge {
  background: rgba(8, 31, 22, .35);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.hero__scenectrl {
  background: rgba(8, 31, 22, .32);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  padding: .7rem .9rem;
}

/* Tarjetas con inclinación 3D y brillo que sigue al cursor */
.tilt {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(0);
  transition: transform .18s ease-out, box-shadow .35s var(--ease), border-color .35s var(--ease);
  position: relative;
}
.tilt:hover { box-shadow: 0 18px 44px -20px rgba(8, 31, 22, .28); }
.tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(340px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .38), transparent 55%);
  opacity: 0; transition: opacity .3s var(--ease);
  pointer-events: none; mix-blend-mode: soft-light;
}
.tilt:hover::after { opacity: 1; }

/* Luz ambiental que sigue al cursor (hero y banda CTA) */
.cursor-glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(440px circle at var(--gx, 50%) var(--gy, 40%), rgba(255, 240, 200, .07), transparent 62%);
  opacity: 0; transition: opacity .5s var(--ease);
}
.hero .container, .cta-band__inner { position: relative; z-index: 1; }

/* Microinteracción de botones: barrido de luz */
.btn { position: relative; overflow: hidden; }
.btn::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .22), transparent);
  transform: skewX(-18deg);
  transition: left .55s var(--ease);
  pointer-events: none;
}
.btn:hover::before { left: 125%; }

/* Visor 3D en fichas de producto */
#visor3d { position: relative; }
.visor3d-canvas {
  position: absolute; inset: 0; width: 100% !important; height: 100% !important;
  opacity: 0; pointer-events: none; transition: opacity .45s var(--ease);
  cursor: grab; z-index: 2;
}
.visor3d-activo .visor3d-canvas { opacity: 1; pointer-events: auto; }
.visor3d-canvas:active { cursor: grabbing; }
.visor3d-hint {
  position: absolute; left: 50%; bottom: .7rem; transform: translateX(-50%);
  z-index: 3; pointer-events: none;
  font-size: .72rem; font-weight: 600; letter-spacing: .08em;
  color: var(--green-700);
  background: rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: .3rem .8rem; border-radius: 999px;
  opacity: 0; transition: opacity .4s var(--ease);
}
.visor3d-activo .visor3d-hint { opacity: 1; }

/* ============================================================
   Hero 3D cinematográfico (aparece en fundido sobre la fotografía)
   ============================================================ */
.hero3d { position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 1.6s var(--ease); }
.hero3d canvas { width: 100%; height: 100%; display: block; }
.hero3d.on { opacity: 1; }
/* Mientras se arma o ya corre el 3D, se oculta el hero fotográfico.
   El fondo verde base del hero evita cualquier destello blanco. */
body.hero3d-arming .hero__scenes, body.hero3d-on .hero__scenes { display: none; }
body.hero3d-arming .hero__scenectrl,
body.hero3d-on .hero__scenectrl { opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility .5s; }

/* ============================================================
   Animaciones únicas por sección (60 fps: solo transform/opacity)
   ============================================================ */
/* Estado inicial de cada entrada, scopeado a :not(.is-visible) para que al
   revelarse el reset (transform: none) siempre gane sin importar la especificidad */
.reveal-left:not(.is-visible) { transform: translateX(-32px); }
.reveal-right:not(.is-visible) { transform: translateX(32px); }

/* Productos: entrada con giro de perspectiva */
.anim-flip:not(.is-visible) > * { transform: perspective(900px) rotateX(9deg) translateY(28px); transform-origin: top center; }
/* Sectores: entrada alternada izquierda/derecha */
.anim-alt:not(.is-visible) > *:nth-child(odd) { transform: translateX(-34px); }
.anim-alt:not(.is-visible) > *:nth-child(even) { transform: translateX(34px); }
/* Biblioteca: acercamiento suave */
.anim-zoom:not(.is-visible) > * { transform: scale(.93); }

/* Comparativas: las barras crecen al entrar en pantalla */
.anim-v rect, .anim-h rect { transform-box: fill-box; transition: transform 1s var(--ease); }
.anim-v rect { transform: scaleY(0); transform-origin: bottom; }
.anim-h rect { transform: scaleX(0); transform-origin: left; }
.chart-card.is-visible .anim-v rect, .chart-card.is-visible .anim-h rect { transform: none; }
.anim-v rect:nth-of-type(2), .anim-h rect:nth-of-type(2) { transition-delay: .08s; }
.anim-v rect:nth-of-type(3), .anim-h rect:nth-of-type(3) { transition-delay: .16s; }
.anim-v rect:nth-of-type(4), .anim-h rect:nth-of-type(4) { transition-delay: .24s; }
.anim-v rect:nth-of-type(5), .anim-h rect:nth-of-type(5) { transition-delay: .32s; }
.anim-v rect:nth-of-type(6), .anim-h rect:nth-of-type(6) { transition-delay: .4s; }
.anim-v rect:nth-of-type(7) { transition-delay: .48s; }

/* ============================================================
   Productos: zoom suave y vista rápida
   ============================================================ */
.product-card__media img { transition: transform .9s var(--ease); }
.product-card:hover .product-card__media img { transform: scale(1.05); }

.vista-btn {
  position: absolute; right: .9rem; bottom: .9rem; z-index: 2;
  display: inline-flex; align-items: center; gap: .45rem;
  font: inherit; font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  color: #fff; cursor: pointer;
  background: rgba(8, 31, 22, .45);
  border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px;
  padding: .45rem .95rem;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background-color .3s var(--ease), transform .3s var(--ease);
}
.vista-btn:hover { background: var(--green-700); transform: translateY(-2px); }
.vista-btn svg { width: .95rem; height: .95rem; }

.vista-dialog {
  border: 0; border-radius: 14px; padding: 0;
  width: min(880px, calc(100% - 2.5rem));
  box-shadow: 0 40px 90px -30px rgba(8, 31, 22, .5);
  overflow: hidden;
}
.vista-dialog::backdrop { background: rgba(8, 31, 22, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.vista-dialog[open] { animation: vista-in .5s cubic-bezier(.22, 1, .36, 1); }
@keyframes vista-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.vista-grid { display: grid; grid-template-columns: 1fr 1.05fr; }
.vista-media { position: relative; background: var(--mist); min-height: 340px; overflow: hidden; }
.vista-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: vista-zoom 1.3s var(--ease); }
@keyframes vista-zoom { from { transform: scale(1.07); } }
.vista-body { padding: clamp(1.5rem, 3vw, 2.25rem); }
.vista-body h3 { font-size: 1.35rem; color: var(--green-900); margin-top: .4rem; }
.vista-body > p { margin-top: .6rem; font-size: .9rem; color: var(--ink-2); }
.vista-specs { margin-top: 1.1rem; }
.vista-specs li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .86rem;
}
.vista-specs li span:first-child { color: var(--ink-2); font-weight: 600; }
.vista-specs li span:last-child { color: var(--ink); text-align: right; }
.vista-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.vista-close {
  position: absolute; top: .8rem; right: .8rem; z-index: 3;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, .85); border: 1px solid var(--line); color: var(--green-900);
  transition: background-color .25s var(--ease), transform .25s var(--ease);
}
.vista-close:hover { background: #fff; transform: rotate(90deg); }
.vista-close svg { width: 16px; height: 16px; }
@media (max-width: 700px) {
  .vista-grid { grid-template-columns: 1fr; }
  .vista-media { min-height: 210px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; transition: none; }
  .wa-float::after { animation: none; }
  .hero h1 .w, .hero h1 .ch, .hero-fade { animation: none; opacity: 1; transform: none; filter: none; }
  .hero__scenes .scene.is-active img { animation: none; }
  .hero__scenectrl { display: none; }
  .tilt { transform: none; transition: none; }
  .tilt::after, .cursor-glow, .btn::before { display: none; }
  .anim-v rect, .anim-h rect { transform: none; transition: none; }
  .vista-dialog[open], .vista-media img { animation: none; }
  .product-card:hover .product-card__media img { transform: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1080px) {
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .sector-grid { grid-template-columns: repeat(2, 1fr); }
  .doc-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav {
    position: fixed; inset: 76px 0 auto 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start;
    gap: 0; padding: .5rem 1.5rem 1.5rem;
    transform: translateY(-115%);
    transition: transform .35s var(--ease);
    box-shadow: 0 24px 40px -24px rgba(8,31,22,.25);
  }
  .nav.is-open { transform: none; }
  .nav a { padding: .9rem 0; width: 100%; font-size: 1rem; border-bottom: 1px solid var(--mist); }
  .nav-toggle {
    display: grid; place-items: center;
    width: 44px; height: 44px;
    background: none; border: 1px solid var(--line); border-radius: 6px;
    color: var(--green-700);
  }
  .nav-toggle svg { width: 22px; height: 22px; }
  .header .btn--primary { display: none; }

  .chart-grid, .product-grid, .faq-wrap, .contact-grid, .spec-layout { grid-template-columns: 1fr; }
  .spec-aside { position: static; }
  .hero__meta { gap: 1.5rem 2.5rem; }
}

/* Pantallas grandes / 4K: el contenido escala en vez de quedar angosto */
@media (min-width: 1800px) {
  :root { --container: 1440px; }
  html { font-size: 18px; }
}
@media (min-width: 2600px) {
  :root { --container: 1680px; }
  html { font-size: 20px; }
}

@media (max-width: 600px) {
  .value-grid, .sector-grid, .doc-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 8rem; }
  .hero__badge { font-size: .64rem; letter-spacing: .13em; padding: .45rem .8rem; }
  .hero__cta .btn { width: 100%; }
  .versus { grid-template-columns: 1fr; }
  .versus__vs { margin-inline: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; gap: 2rem; }
  .brand-logo { height: 38px; }
  .brand-logo--footer { height: 46px; }
  .faq-item__body { padding-right: 0; }
}
