/* Acclaim Energy México — estilos base compartidos (complementan a Tailwind CDN)
   Tipografía: Montserrat (se carga con <link> a Google Fonts en el <head> de cada página).
   Tríada de texto: Burgundy Acclaim para títulos y enlaces · gris oscuro para cuerpo · blanco solo sobre burgundy. */
:root {
  --burgundy: #A6192E;       /* Burgundy Acclaim: H1–H3, eyebrows, enlaces, CTA, footer */
  --burgundy-dark: #86131F;  /* hover de CTA */
  --ink: #1F2937;            /* cuerpo y descripciones */
  --ink-soft: #334155;
  --gray-btn: #4B5563;       /* botón gris (Subscribe / secundario) */
  --navy: #123B5D;           /* base del reproductor de video */
  --map: #E6F0F8;            /* silueta de México */
  --surface: #F8FAFC;
}

html { scroll-behavior: smooth; scroll-padding-top: 128px; overflow-x: clip; }
body { overflow-x: clip; }
img, video, svg, iframe { max-width: 100%; }
body { font-family: Montserrat, ui-sans-serif, system-ui, sans-serif; color: var(--ink); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: Montserrat, ui-sans-serif, system-ui, sans-serif; letter-spacing: -0.02em; }
button, input, select, textarea { font-family: inherit; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--burgundy); color: #fff; padding: .75rem 1rem; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 4px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.25rem; border-radius: .375rem;
  min-height: 44px; font-weight: 600; font-size: .875rem; line-height: 1.2; text-align: center; transition: background-color .2s, color .2s, transform .2s, box-shadow .2s; }
.btn-primary { background: var(--burgundy); color: #fff; box-shadow: 0 6px 16px -6px rgba(166,25,46,.6); }
.btn-primary:hover { background: var(--burgundy-dark); transform: translateY(-1px); }
.btn-secondary { background: var(--gray-btn); color: #fff; }
.btn-secondary:hover { background: #6B7280; transform: translateY(-1px); }
.btn-outline { border: 1.5px solid var(--burgundy); color: var(--burgundy); background: transparent; }
.btn-outline:hover { background: var(--burgundy); color: #fff; }
/* Sobre fondo burgundy el CTA principal se invierte para conservar contraste */
.on-burgundy .btn-primary { background: #fff; color: var(--burgundy); box-shadow: none; }
.on-burgundy .btn-primary:hover { background: #F3F4F6; }

/* ---------- Navbar ---------- */
.nav-link { position: relative; padding: .15rem 0; white-space: nowrap; color: var(--burgundy); transition: color .2s; }
.nav-link:hover { color: var(--gray-btn); }
.nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.15rem; height: 2px; background: var(--burgundy); }
.dropdown-panel { position: absolute; left: 0; top: calc(100% + .5rem); min-width: 14rem; padding: .5rem; background: #fff; border: 1px solid #e2e8f0; border-radius: .5rem; box-shadow: 0 16px 40px -16px rgba(31,41,55,.35); }
.dropdown-link { display: block; padding: .6rem .75rem; border-radius: .375rem; color: var(--burgundy); }
.dropdown-link:hover { background: var(--surface); color: var(--gray-btn); }
.mobile-link { display: flex; align-items: center; min-height: 44px; padding: .5rem .5rem; border-radius: .375rem; color: var(--burgundy); }
.mobile-link:hover, .mobile-link[aria-current="page"] { background: var(--surface); color: var(--ink); }

/* ---------- Footer ---------- */
.footer-link { color: #fff; }
.footer-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.social-link { display: inline-flex; height: 2.75rem; width: 2.75rem; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid rgba(255,255,255,.6); color: #fff; transition: background-color .2s, color .2s; }
.social-link:hover { background: #fff; color: var(--burgundy); }

/* ---------- Tarjetas y eyebrows ---------- */
.card { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid #e2e8f0; border-radius: .5rem; transition: transform .25s, box-shadow .25s, border-color .25s; }
a.card:hover { transform: translateY(-4px); box-shadow: 0 1px 2px rgba(31,41,55,.06), 0 18px 36px -14px rgba(31,41,55,.28); border-color: #cbd5e1; }
.card-media { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--surface); }
.eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--burgundy); }
.eyebrow-lined { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.eyebrow-lined::before, .eyebrow-lined::after { content: ""; height: 1px; width: 3.5rem; background: #CBD5E1; }

/* ---------- Hero con video (Home) ---------- */
.hero-video { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: cover; }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.9) 38%, rgba(255,255,255,.35) 68%, rgba(255,255,255,0) 100%); }
@media (max-width: 1023px) { .hero-scrim { background: rgba(255,255,255,.88); } }

/* ---------- Franja de portada de páginas interiores ---------- */
.banner { position: relative; overflow: hidden; background: var(--burgundy); }
.banner-visual { position: relative; height: 170px; }
.banner-media { display: block; height: 100%; width: 100%; object-fit: cover; object-position: right center; }
@media (min-width: 1024px) {
  .banner-visual { position: absolute; top: 0; right: 0; bottom: 0; height: auto; width: min(52%, 820px); }
  .banner-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #A6192E 0%, rgba(166,25,46,.55) 22%, rgba(166,25,46,0) 50%); }
}

/* ---------- Video editorial (carga diferida de YouTube) ---------- */
.yt-lite { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: .8rem; background: var(--navy) center / cover no-repeat; }
.yt-lite::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,59,93,.15), rgba(18,59,93,.6)); }
.yt-lite .yt-play { position: absolute; left: 50%; top: 50%; height: 84px; width: 84px; transform: translate(-50%, -50%); border-radius: 999px; background: var(--burgundy); display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 30px -8px rgba(0,0,0,.5); transition: transform .2s; }
.yt-lite:hover .yt-play, .yt-lite:focus-visible .yt-play { transform: translate(-50%, -50%) scale(1.08); }
.yt-lite iframe { position: absolute; inset: 0; height: 100%; width: 100%; border: 0; }

/* ---------- Mapa de hubs ---------- */
.hub-map-svg { display: block; width: 100%; height: auto; max-height: 420px; }
.hub { cursor: pointer; }
.hub-hit { fill: transparent; }
.mx-states path { transition: fill .2s; }
.mx-states path.is-active { fill: #E2E8F0; }
.hub-dot { fill: var(--burgundy); stroke: #fff; stroke-width: 2.5; transform-box: fill-box; transform-origin: center; transition: transform .2s; }
.hub--minor .hub-dot { fill: #64748B; stroke-width: 1.5; }
.hub-ring { fill: none; stroke: var(--burgundy); stroke-width: 1.5; opacity: .45; pointer-events: none; }
.hub-ring--pulse { stroke-width: 2; opacity: .55; transform-box: fill-box; transform-origin: center; animation: hub-pulse 2.4s ease-out infinite; }
.hub.is-active .hub-dot, .hub:hover .hub-dot { transform: scale(1.45); }
.hub--minor.is-active .hub-dot, .hub--minor:hover .hub-dot { transform: scale(1.9); fill: var(--burgundy); }
.hub:focus-visible { outline: none; }
.hub:focus-visible .hub-dot { stroke: var(--ink); stroke-width: 3.5; }
@keyframes hub-pulse { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(2.4); opacity: 0; } }
.hub-btn { display: inline-flex; align-items: center; min-height: 44px; text-align: left; padding: .5rem 1rem; border: 1px solid #E2E8F0; border-radius: .375rem; background: #fff; font-weight: 500; color: var(--ink); transition: border-color .2s, background-color .2s, color .2s; }
.hub-btn--major { border-left: 4px solid var(--burgundy); font-weight: 600; box-shadow: 0 1px 2px rgba(31,41,55,.06); }
.hub-btn--chip { padding: .4rem .95rem; border-radius: 999px; font-size: .8125rem; }
.hub-btn:hover, .hub-btn.is-active { border-color: var(--burgundy); color: var(--burgundy); }
.hub-btn--chip:hover, .hub-btn--chip.is-active { background: var(--burgundy); color: #fff; }

/* ---------- Carrusel (Industry Perspectives) ---------- */
.carousel-viewport { overflow: hidden; border-radius: .75rem; touch-action: pan-y; }
.carousel-track { display: flex; transition: transform .6s cubic-bezier(.22,.61,.36,1); will-change: transform; }
.carousel-slide { flex: 0 0 100%; min-width: 0; }
.carousel-arrow { display: inline-flex; height: 2.75rem; width: 2.75rem; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid #CBD5E1; background: #fff; color: var(--burgundy); transition: background-color .2s, color .2s, border-color .2s; }
.carousel-arrow:hover { background: var(--burgundy); border-color: var(--burgundy); color: #fff; }
/* Área táctil de 44 px; el punto visible es el ::before */
.carousel-dot { display: inline-flex; height: 44px; min-width: 28px; align-items: center; justify-content: center; padding: 0 4px; }
.carousel-dot::before { content: ""; height: .625rem; width: .625rem; border-radius: 999px; background: #CBD5E1; transition: width .3s, background-color .3s; }
.carousel-dot[aria-current="true"]::before { width: 1.75rem; background: var(--burgundy); }
.no-js .carousel-track { flex-direction: column; gap: 1.5rem; }

/* ---------- Chips de navegación ---------- */
.tab-btn { display: inline-flex; align-items: center; min-height: 44px; padding: .6rem 1rem; border-radius: 999px; border: 1px solid #cbd5e1; font-size: .8rem; font-weight: 600; color: var(--ink); background: #fff; white-space: nowrap; transition: all .2s; }
.tab-btn:hover { border-color: var(--burgundy); color: var(--burgundy); }

/* ---------- FAQ ---------- */
.faq { margin-bottom: 1rem; padding: .75rem 1.5rem; border: 1px solid #e2e8f0; border-radius: .75rem; background: #fff; }
.faq summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; list-style: none; font-weight: 600; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; display: flex; flex: none; height: 1.75rem; width: 1.75rem; margin-right: 1rem; align-items: center; justify-content: center; border-radius: 999px; background: var(--burgundy); color: #fff; font-size: .875rem; font-weight: 700; line-height: 1; }
.faq[open] summary::before { content: "–"; }
.faq summary h3 { color: var(--ink); }
.faq-answer { padding: .75rem 0 .25rem 2.75rem; color: var(--ink-soft); line-height: 1.65; }

/* ---------- Formularios ---------- */
.form-label { display: block; margin-bottom: .4rem; font-size: .875rem; font-weight: 600; color: var(--ink); }
.form-input { display: block; width: 100%; min-width: 0; height: 3rem; padding: 0 .9rem; border: 1px solid #cbd5e1; border-radius: .375rem; background: #fff; color: #0f172a; transition: border-color .2s, box-shadow .2s; }
.form-input:focus { outline: none; border-color: var(--burgundy); box-shadow: 0 0 0 3px rgba(166,25,46,.18); }

/* ---------- Texto legal ---------- */
.legal { overflow-wrap: anywhere; }
.legal h2 { margin-top: 2.75rem; font-size: 1.5rem; font-weight: 700; color: var(--burgundy); }
.legal h2:first-child { margin-top: 0; }
.legal p { margin-top: 1rem; line-height: 1.75; color: var(--ink-soft); }
.legal ol { margin: 1rem 0 0 1.25rem; list-style: decimal; color: var(--ink-soft); line-height: 1.7; }
.legal ol li { margin-top: .5rem; padding-left: .25rem; }
.legal-updated { margin-top: 2.5rem !important; font-weight: 600; color: var(--ink) !important; }

/* ---------- Ajustes para teléfonos (360–640 px) ---------- */
@media (max-width: 639px) {
  html { scroll-padding-top: 96px; }
  .faq { padding: .6rem 1rem; }
  .faq-answer { padding-left: 0; }
  .yt-lite .yt-play { height: 64px; width: 64px; }
}

/* ---------- Aparición al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hub-ring--pulse { animation: none; }
  .carousel-track { transition: none; }
  .btn, .card { transition: none; }
}

/* ---------- Fase 3 · Formulario de contacto: errores y confirmación ---------- */
.form-input[aria-invalid="true"] { border-color: #B42318; box-shadow: 0 0 0 3px rgba(180,35,24,.14); }
.form-error { margin-top: .35rem; font-size: .8125rem; font-weight: 500; color: #B42318; }
.form-alert { border-radius: .5rem; border: 1px solid transparent; border-left-width: 4px; padding: 1rem 1.15rem; font-size: .9375rem; line-height: 1.5; color: var(--ink); }
.form-alert[hidden] { display: none; }
.form-alert-title { margin-bottom: .2rem; font-weight: 700; }
.form-alert-success { background: #EEF6E9; border-color: #B7D3A8; border-left-color: #4E7F3A; }
.form-alert-success .form-alert-title { color: var(--burgundy); }
.form-alert-warning { background: #FFF8E6; border-color: #EBD08A; border-left-color: #B7791F; }
.form-alert-error { background: #FDF0EF; border-color: #EDB7B2; border-left-color: #B42318; }
.form-alert-error .form-alert-title { color: #B42318; }
