/* ==========================================================================
   GRUPO SUDCALIFORNIA · estilos.css
   Una sola hoja de estilos para todo el sitio. Escrita a mano, sin frameworks.
   Índice:
     1. Fuente y variables
     2. Base (reinicio y tipografía)
     3. Botones
     4. Encabezado, menú y barra de progreso
     5. Botones flotantes
     6. Portada (video de la estación de noche)
     7. Secciones y títulos
     8. Conócenos y carrusel
     9. Servicios y "Ver más"
    10. Facturación (banda verde)
    11. Estaciones
    12. Mapa con pestañas
    13. Contacto y formulario
    14. Pie de página
    15. Movimiento ligado al scroll (animation-timeline)
    16. Movimiento reducido
    17. Página 404
   El movimiento usa animation-timeline (Chrome/Edge 115+, Safari 26). Donde el navegador no lo
   soporta, o con "reducir movimiento" activado, todo se muestra completo y estático.
   ========================================================================== */

/* ---------- 1. Fuente y variables ---------- */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../assets/fuentes/plus-jakarta-sans-latin.woff2") format("woff2");
}
/* Fuente de respaldo con las mismas medidas, para que el texto no "salte" al cargar la tipografía */
@font-face {
  font-family: "Plus Jakarta Sans Ajuste";
  src: local(Arial);
  ascent-override: 98.88%;
  descent-override: 21.15%;
  line-gap-override: 0%;
  size-adjust: 104.98%;
}

:root {
  --verde: #0B7A43;          /* color principal: botones, bandas */
  --verde-profundo: #08502D; /* pie, títulos, pastilla del logo */
  --menta: #E8F5EE;          /* fondos suaves */
  --menta-claro: #F3FAF6;
  --vivo: #22C55E;           /* detalles y foco */
  --rojo: #D92D3A;           /* rojo del logo: Contacto y Facturar flotante */
  --rojo-oscuro: #B8222E;
  --tinta: #1B2B24;          /* texto */
  --gris: #F4F6F5;
  --linea: #E3E8E5;
  --noche: #10382A;          /* verde casi negro del video (fondos oscuros) */
  --vidrio: rgba(27, 90, 60, .82);   /* verde del video para las tarjetas de vidrio mate */
  --vidrio-borde: rgba(189, 242, 214, .18);
  --alto-encabezado: 84px;
  --ancho-contenido: 72rem;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid; }
html {
  font-family: "Plus Jakarta Sans", "Plus Jakarta Sans Ajuste", system-ui, sans-serif;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}
body {
  background: #fff;
  color: var(--tinta);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg, video, iframe { display: block; max-width: 100%; }
img, video { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; background: transparent; letter-spacing: inherit; }
button { cursor: pointer; }
textarea { resize: vertical; }
ul { list-style: none; }
h1, h2, h3, h4 { font-size: inherit; font-weight: 800; letter-spacing: -.015em; color: var(--tinta); }
h1 { letter-spacing: -.02em; line-height: 1.04; }
:focus-visible { outline: 3px solid var(--vivo); outline-offset: 3px; border-radius: 12px; }

/* ---------- 3. Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 2.75rem; padding: .72rem 1.6rem; border-radius: 999px;
  font-weight: 800; font-size: .86rem; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2;
  white-space: nowrap; color: #fff;
  transition: background .25s, transform .25s, box-shadow .25s;
}
.boton:hover, .boton:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(8, 80, 45, .7); }
.boton svg { flex: none; transition: transform .25s; }
.boton:hover svg { transform: translateX(3px); }
.boton--verde { background: var(--verde); }
.boton--verde:hover { background: var(--verde-profundo); }
.boton--rojo { background: var(--rojo); }
.boton--rojo:hover { background: var(--rojo-oscuro); }
.boton--blanco { background: #fff; color: var(--verde-profundo); }
.boton--contorno { background: #fff; color: var(--verde-profundo); box-shadow: inset 0 0 0 2px var(--verde); }
.boton--contorno:hover { background: var(--menta); }
.boton--grande { padding: .95rem 2.2rem; font-size: .95rem; }
.boton--chico { padding: .55rem 1.1rem; font-size: .76rem; min-height: 2.5rem; }
.boton--mas { background: #fff; color: var(--verde); box-shadow: inset 0 0 0 2px #fff; width: 100%; padding: .6rem 1.2rem; font-size: .8rem; }
.boton--mas:hover, .boton--mas:focus-visible { background: var(--vivo); color: var(--verde-profundo); box-shadow: inset 0 0 0 2px var(--vivo); }

/* ---------- 4. Encabezado, menú y progreso ---------- */
.encabezado { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--linea); }
.encabezado__interior {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: var(--alto-encabezado); max-width: 76rem; margin: 0 auto; padding: 0 1.25rem;
}
.logo-pastilla { display: inline-flex; align-items: center; border-radius: .75rem; background: var(--verde-profundo); padding: .375rem .625rem; }
.logo-pastilla img { height: 2.25rem; width: auto; }
@media (min-width: 640px) { .logo-pastilla img { height: 2.5rem; } }

.menu { display: none; gap: 1.5rem; align-items: center; }
.menu a {
  font-size: .8rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--verde-profundo);
  padding: .4rem 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.menu a:hover { color: var(--verde); border-color: var(--vivo); }
.menu a.activo { color: var(--rojo); }
.encabezado__acciones { display: none; gap: .6rem; }
@media (min-width: 1024px) { .menu, .encabezado__acciones { display: flex; } }

/* Celular: botón Facturar + <details> */
.movil { display: flex; align-items: center; gap: .5rem; }
@media (min-width: 1024px) { .movil { display: none; } }
.menu-movil summary {
  list-style: none; cursor: pointer; display: flex; width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center;
  border-radius: 99px; background: var(--menta); color: var(--verde-profundo); font-size: 1.4rem; line-height: 1;
}
.menu-movil summary::-webkit-details-marker { display: none; }
.menu-movil__panel {
  position: absolute; right: 1rem; top: 76px; width: min(18rem, calc(100vw - 2rem));
  display: flex; flex-direction: column; gap: .1rem; padding: .6rem;
  background: #fff; border: 1px solid var(--linea); border-radius: 1.5rem; box-shadow: 0 24px 40px -20px rgba(8, 80, 45, .45);
}
.menu-movil__panel a:not(.boton) { padding: .8rem 1rem; border-radius: 1rem; font-weight: 700; color: var(--verde-profundo); }
.menu-movil__panel a:not(.boton):hover { background: var(--menta); }
.menu-movil__panel .boton { margin: .4rem .4rem 0; }

/* Barra roja de avance de lectura */
.progreso {
  position: fixed; left: 0; right: 0; top: 0; height: 4px; z-index: 70; background: var(--rojo);
  transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; display: none;
}

/* ---------- 5. Botones flotantes ---------- */
.flotante-facturar { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 55; box-shadow: 0 14px 28px -12px rgba(184, 34, 46, .7); }
.flotante-subir {
  position: fixed; right: 1.6rem; bottom: 5rem; z-index: 55; width: 3rem; height: 3rem; border-radius: 99px;
  display: flex; align-items: center; justify-content: center; background: var(--verde); color: #fff;
  box-shadow: 0 12px 24px -10px rgba(8, 80, 45, .7); transition: background .25s;
}
.flotante-subir:hover { background: var(--verde-profundo); }

/* ---------- 6. Portada ---------- */
.portada {
  position: relative; height: clamp(560px, calc(100svh - var(--alto-encabezado)), 820px);
  overflow: hidden; background: var(--verde-profundo); container-type: size;
}
.portada__video { position: absolute; left: 50%; top: 50%; width: max(100cqw, calc(100cqh * 1.7778)); aspect-ratio: 16 / 9; translate: -50% -50%; }
.portada__poster, .portada__video video, .portada__fundido { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portada__fundido { background: #06120C; opacity: 0; transition: opacity .5s ease; pointer-events: none; }
.portada__fundido.encendido { opacity: 1; }
/* En celular el video es vertical: llena la portada tal cual */
@media (max-width: 768px) { .portada__video { left: 0; top: 0; width: 100%; height: 100%; aspect-ratio: auto; translate: none; } }
.portada__velo { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(to bottom, rgba(6, 24, 16, .55), rgba(6, 24, 16, .22) 45%, rgba(6, 24, 16, .5)); }
.portada__contenido {
  position: relative; z-index: 3; height: 100%; padding: 0 1.25rem; color: #fff; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.portada h1 { color: #fff; font-size: clamp(2.5rem, 6.4vw, 5.6rem); text-shadow: 0 4px 30px rgba(4, 40, 22, .55); }
.linea { display: block; }
.linea--fina { font-weight: 300; }
.linea--gruesa { font-weight: 800; }
.portada .boton { margin-top: 2.25rem; }
@keyframes subir { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .entrada { opacity: 0; animation: subir .8s cubic-bezier(.2, .7, .2, 1) var(--retraso, .3s) forwards; }
}

/* ---------- 7. Secciones y títulos ---------- */
.seccion { padding: 5.5rem 1.25rem; }
.seccion--menta { background: var(--menta-claro); }
.seccion--gris { background: var(--gris); }
.contenedor { max-width: var(--ancho-contenido); margin: 0 auto; }
.titulo-seccion { text-align: center; margin-bottom: 3rem; }
.titulo-seccion h2 { color: var(--verde-profundo); font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.1; }
.subtitulo { margin: .8rem auto 0; max-width: 42rem; color: #4a5d54; font-size: 1.05rem; }
.subrayado { display: block; width: 4.5rem; height: 4px; margin: 1.1rem auto 0; border-radius: 99px; background: var(--vivo); transform-origin: center; }
.sobretitulo { display: inline-block; margin-bottom: .6rem; font-size: .74rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--verde); }
.aparece { min-width: 0; }
.tres-columnas { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .tres-columnas { grid-template-columns: repeat(3, 1fr); } }
.tres-columnas > * { min-width: 0; }
.tres-columnas article { height: 100%; }
.clave-es { font-size: .72rem; font-weight: 800; letter-spacing: .22em; color: var(--verde); font-variant-numeric: tabular-nums; }
.foto { position: relative; aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden; background: var(--menta); }
.foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }

/* Las secciones largas se pintan solo cuando se acercan (más fluido al desplazarse) */
#servicios, #estaciones, #contacto { content-visibility: auto; contain-intrinsic-size: auto 900px; }

/* ---------- 8. Conócenos y carrusel ---------- */
.conocenos { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .conocenos { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.conocenos h2 { color: var(--verde-profundo); font-size: clamp(2rem, 4vw, 2.9rem); }
.conocenos__texto { margin-top: 1.25rem; font-size: 1.125rem; line-height: 1.5556; color: #33473d; }
.conocenos__texto2 { margin-top: 1rem; color: #33473d; }
.cifras { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.cifra { background: var(--menta); border-radius: 1.25rem; padding: .8rem 1.2rem; min-width: 8rem; }
.cifra b { display: block; font-size: 1.9rem; font-weight: 800; line-height: 1.1; color: var(--verde); font-variant-numeric: tabular-nums; }
.cifra span { font-size: .8rem; font-weight: 700; color: #4a5d54; letter-spacing: .04em; }
/* Contador: el número viene de --n; se anima con @property cuando hay soporte, y si no, se ve completo */
@property --n { syntax: "<integer>"; inherits: true; initial-value: 0; }
.contador { font-variant-numeric: tabular-nums; }
.contador::after { counter-reset: cuenta var(--n); content: counter(cuenta); }

.carrusel { position: relative; aspect-ratio: 16 / 10; border-radius: 24px; overflow: hidden; background: var(--menta); box-shadow: 0 30px 60px -34px rgba(8, 80, 45, .55); }
.carrusel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.carrusel__2, .carrusel__3 { opacity: 0; }
.carrusel__nombres {
  position: absolute; left: 1rem; bottom: 1rem; z-index: 2; display: grid; padding: .45rem .9rem; border-radius: 99px;
  background: rgba(8, 80, 45, .82); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
}
.carrusel__nombres span { grid-area: 1 / 1; opacity: 0; white-space: nowrap; }
.carrusel__nombres .n1 { opacity: 1; }
.carrusel__puntos { position: absolute; right: 1rem; bottom: 1.3rem; z-index: 2; display: flex; gap: .5rem; }
.carrusel__puntos i { position: relative; width: .6rem; height: .6rem; border-radius: 99px; background: rgba(255, 255, 255, .6); }
.carrusel__puntos b { position: absolute; inset: 0; border-radius: 99px; background: var(--rojo); opacity: 0; }
.carrusel__puntos .p1 { opacity: 1; }
@keyframes turno-1 { 0%, 28% { opacity: 1; } 33%, 95% { opacity: 0; } 100% { opacity: 1; } }
@keyframes turno-2 { 0%, 28% { opacity: 0; } 33%, 61% { opacity: 1; } 66%, 100% { opacity: 0; } }
@keyframes turno-3 { 0%, 61% { opacity: 0; } 66%, 94% { opacity: 1; } 99%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .carrusel__2, .carrusel__nombres .n2, .carrusel__puntos .p2 { animation: turno-2 18s linear infinite; }
  .carrusel__3, .carrusel__nombres .n3, .carrusel__puntos .p3 { animation: turno-3 18s linear infinite; }
  .carrusel__nombres .n1, .carrusel__puntos .p1 { animation: turno-1 18s linear infinite; }
}

/* ---------- 9. Servicios y "Ver más" ---------- */
.servicios__rejilla { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .servicios__rejilla { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .servicios__rejilla { grid-template-columns: repeat(4, 1fr); } }
.servicios__rejilla > .aparece { min-width: 0; }
.servicio {
  position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 28px; padding: 1.4rem 1.4rem 1.7rem;
  color: #fff; background: var(--vidrio); border: 1px solid var(--vidrio-borde);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);   /* vidrio esmerilado, sin brillos: mate */
  box-shadow: 0 22px 44px -30px rgba(8, 40, 26, .6);
}
.servicio__arte { position: relative; aspect-ratio: 16 / 10; margin: -.2rem -.4rem .6rem; }
.servicio__arte img { width: 100%; height: 100%; object-fit: contain; }
.servicio__num { position: relative; font-size: .74rem; font-weight: 800; letter-spacing: .2em; color: #BDF2D6; }
.servicio h3 { position: relative; display: flex; align-items: flex-start; min-height: 2.45em; margin-top: .35rem; font-size: 1.25rem; line-height: 1.2; text-transform: uppercase; letter-spacing: .01em; color: #fff; }
.servicio__sub { position: relative; min-height: 1.4em; margin-top: .35rem; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #7FE3B0; white-space: nowrap; }
@media (min-width: 1024px) and (max-width: 1279px) {
  .servicio__sub { height: 2.8em; min-height: 0; overflow: hidden; white-space: normal; font-size: .68rem; letter-spacing: .05em; }
}
.servicio__extracto {
  position: relative; margin: .8rem 0 1.2rem; min-height: calc(4 * 1.55em); font-size: .9rem; line-height: 1.55; color: rgba(255, 255, 255, .92);
  display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.servicio__pie { position: relative; margin-top: auto; }

/* Ventana "Ver más": popover nativo, sin JavaScript. Si el navegador no lo soporta, el texto completo se ve en la tarjeta. */
.detalle { position: static; margin-top: 1rem; padding: 1.2rem; border-radius: 20px; background: #fff; color: var(--tinta); }
@supports selector(:popover-open) {
  .detalle {
    display: none; position: fixed; inset: 0; margin: auto; width: min(34rem, calc(100vw - 2rem)); height: fit-content; max-height: calc(100dvh - 2rem);
    overflow: auto; padding: 1.8rem; border-radius: 28px; box-shadow: 0 40px 80px -30px rgba(4, 40, 22, .7);
    opacity: 0; transform: translateY(16px) scale(.97);
    transition: opacity .25s, transform .25s, display .25s allow-discrete, overlay .25s allow-discrete;
  }
  .detalle:popover-open { display: block; opacity: 1; transform: none; }
  @starting-style { .detalle:popover-open { opacity: 0; transform: translateY(16px) scale(.97); } }
  .detalle::backdrop { background: rgba(8, 80, 45, .55); }
}
.detalle h3 { margin-top: .2rem; font-size: 1.5rem; line-height: 1.2; text-transform: uppercase; color: var(--verde-profundo); }
.detalle__sub { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--verde); }
.detalle__arte { aspect-ratio: 16 / 10; max-height: 12rem; margin: 0 auto .6rem; padding: .6rem; border-radius: 20px; background: linear-gradient(165deg, #0F9457, #08502D); }
.detalle__arte img { width: 100%; height: 100%; object-fit: contain; }
.detalle__texto { margin: .9rem 0 1.4rem; color: #33473d; line-height: 1.65; }
.detalle__cerrar { position: absolute; right: .9rem; top: .7rem; z-index: 2; width: 2.4rem; height: 2.4rem; border-radius: 99px; background: var(--menta); color: var(--verde-profundo); font-size: 1.5rem; line-height: 1; }
.detalle__cerrar:hover { background: var(--vivo); }

/* ---------- 10. Facturación (banda verde) ---------- */
.banda-verde { position: relative; overflow: hidden; background: var(--verde); }
.banda-verde::before { content: ""; position: absolute; left: -10%; top: -30%; width: 42%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 70%); }
.banda-verde__interior { position: relative; }
.banda-verde .titulo-seccion h2 { color: #fff; }
.banda-verde .subtitulo { color: #fff; opacity: .9; }
.banda-verde .subrayado { background: #fff; }
.banda-verde .sobretitulo { color: #BDF2D6; }
.tarjeta-factura { display: flex; flex-direction: column; padding: 1rem; border-radius: 28px; background: #fff; box-shadow: 0 24px 40px -28px rgba(4, 40, 22, .6); }
.tarjeta-factura:hover .foto img, .tarjeta-estacion:hover .foto img { transform: scale(1.05); }
.tarjeta-factura__cuerpo { display: flex; flex: 1; flex-direction: column; align-items: center; padding: 1.2rem .6rem .6rem; text-align: center; }
.tarjeta-factura h3, .tarjeta-estacion h3 { margin-top: .3rem; font-size: 1.45rem; text-transform: uppercase; letter-spacing: .01em; }
.tarjeta-factura h3 { line-height: 1.2; }
.razon { flex: 1; margin-top: .2rem; font-size: .92rem; color: #4a5d54; }
.tarjeta-factura .boton { width: 100%; margin-top: 1.2rem; }

/* ---------- 11. Estaciones ---------- */
.tarjeta-estacion { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1.5px solid var(--linea); border-radius: 28px; transition: border-color .25s, box-shadow .25s; }
.tarjeta-estacion:hover { border-color: var(--verde); box-shadow: 0 26px 44px -30px rgba(8, 80, 45, .55); }
.tarjeta-estacion .foto { border-radius: 0; }
.tarjeta-estacion__colgante { position: relative; z-index: 2; display: flex; justify-content: center; margin-top: -1.4rem; }
.tarjeta-estacion__cuerpo { display: flex; flex: 1; flex-direction: column; align-items: center; padding: 1rem 1.4rem 1.6rem; text-align: center; }
.direccion { margin-top: .6rem; min-height: 3.2em; color: #33473d; font-size: .98rem; }
.marca-pemex { margin-top: .5rem; font-size: .95rem; font-weight: 700; color: var(--verde-profundo); }
.telefono { margin-top: auto; padding-top: 1rem; font-weight: 800; color: var(--verde); font-variant-numeric: tabular-nums; }
@media (min-width: 640px) and (max-width: 1023px) { .tarjeta-estacion .direccion { min-height: 6.4em; } }

/* ---------- 12. Mapa con pestañas (sin JavaScript) ---------- */
.mapa { padding-bottom: 0; padding-inline: 0; background: #fff; }
.mapa .contenedor { padding-inline: 1.25rem; }
.mapa__pestanas { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-bottom: 1.2rem; }
.mapa__pestanas input { position: absolute; opacity: 0; pointer-events: none; }
.mapa__pestanas label {
  cursor: pointer; padding: .6rem 1.3rem; border-radius: 99px; background: var(--menta); color: var(--verde-profundo);
  font-weight: 800; font-size: .8rem; letter-spacing: .07em; text-transform: uppercase; transition: background .2s, color .2s;
}
.mapa__pestanas input:checked + label { background: var(--verde); color: #fff; }
.mapa__pestanas input:focus-visible + label { outline: 3px solid var(--vivo); outline-offset: 2px; }
.mapa__caja { position: relative; height: min(30rem, 70vw); min-height: 22rem; background: var(--menta); }
.mapa__caja iframe { position: absolute; inset: 0; display: none; width: 100%; height: 100%; border: 0; }
.mapa:has(#mapa-1:checked) .mapa__1, .mapa:has(#mapa-2:checked) .mapa__2, .mapa:has(#mapa-3:checked) .mapa__3 { display: block; }
.abrir-mapa { position: absolute; left: 1rem; top: 1rem; z-index: 3; padding: .6rem 1rem; border-radius: .7rem; background: #fff; color: var(--verde-profundo); font-weight: 800; font-size: .8rem; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .4); }
.abrir-mapa:hover { background: var(--menta); }

/* ---------- 13. Contacto y formulario ---------- */
.tarjeta-contacto { display: flex; flex-direction: column; padding: 1.6rem; text-align: center; background: #fff; border: 1.5px solid var(--linea); border-radius: 28px; }
.tarjeta-contacto h3 { display: flex; align-items: center; justify-content: center; min-height: 2.6em; margin-top: .25rem; font-size: 1.25rem; line-height: 1.25; }
.tarjeta-contacto .direccion { min-height: 3.2em; margin-top: .5rem; font-size: .92rem; color: #4a5d54; }
.tarjeta-contacto__acciones { display: flex; flex-direction: column; gap: .6rem; margin-top: auto; padding-top: 1.2rem; }
.tarjeta-contacto .boton { padding-inline: 1rem; font-size: .78rem; letter-spacing: .03em; text-transform: none; white-space: normal; word-break: break-all; }
@media (min-width: 640px) and (max-width: 1023px) {
  .tarjeta-contacto h3 { font-size: 1.02rem; }
  .tarjeta-contacto .direccion { min-height: 4.8em; }
}
.formulario { display: grid; gap: 1rem; max-width: 48rem; margin: 2.5rem auto 0; padding: 2rem; background: #fff; border: 1.5px solid var(--linea); border-radius: 28px; }
@media (min-width: 768px) { .formulario { grid-template-columns: 1fr 1fr; } .formulario .completo, .formulario h3 { grid-column: 1 / -1; } }
.formulario h3 { font-size: 1.5rem; line-height: 2rem; }
.formulario label { display: grid; gap: .3rem; font-size: .85rem; font-weight: 700; }
.formulario .boton { margin-inline: auto; }
.campo { width: 100%; padding: .8rem 1rem; border: 1.5px solid #cfd9d3; border-radius: 1rem; background: #fff; color: var(--tinta); }
.campo:focus-visible { outline: 3px solid var(--vivo); outline-offset: 1px; border-color: var(--verde); }
.trampa { display: none; }
/* Avisos que devuelve contacto.php (redirige a #gracias, #error o #sin-destino) */
.ancla { display: block; height: 0; scroll-margin-top: 120px; }
.aviso { display: none; max-width: 48rem; margin: 2rem auto 0; padding: 1rem 1.4rem; border-radius: 1rem; font-weight: 700; text-align: center; }
.aviso--ok { background: var(--menta); color: var(--verde-profundo); border: 1.5px solid var(--verde); }
.aviso--mal { background: #fdecee; color: #7a1620; border: 1.5px solid var(--rojo); }
.contacto:has(#gracias:target) .aviso--ok,
.contacto:has(#error:target) .aviso--mal:nth-of-type(2),
.contacto:has(#sin-destino:target) .aviso--mal:nth-of-type(3) { display: block; }

/* ---------- 14. Pie de página ---------- */
.pie { padding: 3.5rem 1.25rem 2.5rem; background: var(--verde-profundo); color: #fff; }
.pie a:hover { color: #7FE3B0; }
.pie__columnas { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); max-width: var(--ancho-contenido); margin: 0 auto; }
@media (min-width: 768px) { .pie__columnas { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pie__lema { margin-top: 1rem; font-size: .875rem; line-height: 1.4286; opacity: .9; }
.pie h4 { margin-bottom: .8rem; font-size: .74rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: #7FE3B0; }
.pie li { padding: .15rem 0; font-size: .95rem; overflow-wrap: anywhere; }
.pie__legal { max-width: var(--ancho-contenido); margin: 2.5rem auto 0; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .15); text-align: center; font-size: .75rem; line-height: 1.3333; opacity: .7; }

/* ---------- 15. Movimiento ligado al scroll ---------- */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    /* barra de progreso y botón de subir */
    .progreso { display: block; animation: avance linear both; animation-timeline: scroll(root); }
    .flotante-subir { opacity: 0; pointer-events: none; animation: aparecer-subir linear both; animation-timeline: scroll(root); animation-range: 0 600px; }
  }
}
@keyframes avance { to { transform: scaleX(1); } }
@keyframes aparecer-subir { to { opacity: 1; pointer-events: auto; } }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .contador { animation: contar linear both; animation-timeline: view(); animation-range: entry 20% cover 35%; }
  }
}
@keyframes contar { from { --n: 0; } }

@supports ((animation-timeline: view()) and (animation-range: entry 0% cover 30%)) {
  @media (prefers-reduced-motion: no-preference) {
    .aparece, .revela-foto, .subrayado, .banda-verde::before {
      animation-timeline: view(); animation-fill-mode: both; animation-timing-function: linear; animation-range: cover 0% cover 100%;
    }
    /* bloques: entran subiendo con un leve zoom (terminan en opacidad 1) */
    .aparece { animation-name: subir-bloque; animation-range: entry 0% entry 85%; }
    @keyframes subir-bloque { from { opacity: 0; transform: translateY(34px) scale(.96); } to { opacity: 1; transform: none; } }
    /* tarjetas: salida sutil */
    .servicio, .tarjeta-factura, .tarjeta-estacion, .tarjeta-contacto, .formulario {
      animation: salida-tarjeta linear both; animation-timeline: view(); animation-range: exit 10% exit 100%;
    }
    @keyframes salida-tarjeta { from { opacity: 1; transform: none; } to { opacity: .55; transform: translateY(-18px) scale(.98); } }
    /* fotos: barrido suave */
    .revela-foto { animation-name: barrido; animation-range: cover 0% cover 45%; }
    @keyframes barrido { from { clip-path: inset(0 0 100% 0 round 20px); } to { clip-path: inset(0 0 0 0 round 20px); } }
    .tarjeta-estacion .revela-foto { animation-name: barrido-recto; }
    @keyframes barrido-recto { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
    .carrusel.revela-foto { animation-name: barrido-carrusel; }
    @keyframes barrido-carrusel { from { clip-path: inset(0 0 100% 0 round 24px); } to { clip-path: inset(0 0 0 0 round 24px); } }
    /* títulos: la línea se dibuja */
    .subrayado { animation-name: dibujar; animation-range: entry 30% entry 100%; }
    @keyframes dibujar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
    /* banda verde: el halo se desplaza un poco */
    .banda-verde::before { animation-name: paralaje; }
    @keyframes paralaje { from { transform: translateY(40px); } to { transform: translateY(-40px); } }
  }
}

/* ---------- 16. Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .portada__video video, .portada__fundido { display: none; }
}

/* ---------- 17. Página 404 ---------- */
.pagina-404 { display: grid; place-items: center; min-height: 100svh; padding: 2rem 1.25rem; text-align: center; background: var(--menta-claro); }
.pagina-404 h1 { margin: .6rem 0 1rem; color: var(--verde-profundo); font-size: clamp(2rem, 5vw, 3.2rem); }
.pagina-404 p { margin-bottom: 1.6rem; color: #4a5d54; }

/* ---------- 14. Vidrio mate: el verde del video en las tarjetas ---------- */
/* Manchas suaves (sin brillo) detrás de las tarjetas para que el vidrio tenga color que difuminar */
#servicios { position: relative; overflow: hidden; background:
  radial-gradient(40rem 28rem at 8% 18%, rgba(34, 104, 70, .42), transparent 70%),
  radial-gradient(36rem 26rem at 92% 82%, rgba(21, 128, 120, .34), transparent 70%),
  var(--menta-claro); }
#servicios .contenedor { position: relative; }
.detalle__arte { background: var(--vidrio); border: 1px solid var(--vidrio-borde); }
.banda-verde { background: linear-gradient(160deg, #1B5A3F 0%, #164A33 55%, var(--noche) 100%); }
.banda-verde::before { background: radial-gradient(circle, rgba(189, 242, 214, .10), rgba(189, 242, 214, 0) 70%); }
.pie { background: var(--noche); }
@media (prefers-reduced-transparency: reduce) { .servicio { backdrop-filter: none; -webkit-backdrop-filter: none; background: #1F5C40; } }

/* ==========================================================================
   18. DISEÑO AMPLIADO: hero con presencia, cinta, cifras, paneles de estaciones,
       bordes inclinados y detalles de movimiento. Todo con CSS.
   ========================================================================== */

/* ---------- 18.1 Portada ---------- */
.portada__sobre {
  display: flex; align-items: center; gap: .9rem; margin-bottom: 1.2rem;
  font-size: .76rem; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; color: #BDF2D6;
}
.portada__sobre::before, .portada__sobre::after { content: ""; width: 2.6rem; height: 1px; background: currentColor; opacity: .55; }
@media (max-width: 640px) { .portada__sobre { font-size: .62rem; letter-spacing: .18em; } .portada__sobre::before, .portada__sobre::after { width: 1.2rem; } }
.portada h1 { font-size: clamp(2.7rem, 7.2vw, 6.4rem); }
.portada__datos { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 2.4rem; }
.portada__datos li {
  padding: .55rem 1.15rem; border-radius: 99px; background: rgba(14, 52, 36, .6); border: 1px solid rgba(189, 242, 214, .24);
  font-size: .74rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #E8FFF3;
}
.portada__datos b { margin-right: .3em; font-size: 1.05em; color: #7FE3B0; font-variant-numeric: tabular-nums; }
/* "24/7" gigante, solo contorno, detrás del texto */
.portada__fantasma {
  position: absolute; left: 50%; bottom: -.12em; z-index: 2; translate: -50% 0; pointer-events: none; user-select: none;
  font-size: clamp(9rem, 30vw, 27rem); font-weight: 800; line-height: .85; letter-spacing: -.05em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 2px rgba(189, 242, 214, .13);
}
.portada__bajar {
  position: absolute; left: 50%; bottom: 1.4rem; z-index: 4; translate: -50% 0; width: 1.7rem; height: 2.8rem;
  border: 2px solid rgba(255, 255, 255, .55); border-radius: 99px;
}
.portada__bajar span { position: absolute; left: 50%; top: .5rem; width: .3rem; height: .6rem; margin-left: -.15rem; border-radius: 99px; background: #fff; }
@media (prefers-reduced-motion: no-preference) { .portada__bajar span { animation: rueda 1.8s ease-in-out infinite; } }
@keyframes rueda { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(.9rem); } }
@media (max-height: 560px) { .portada__bajar, .portada__fantasma { display: none; } }

/* ---------- 18.2 Cinta ---------- */
.cinta { overflow: hidden; background: var(--noche); border-block: 1px solid rgba(189, 242, 214, .14); padding: .95rem 0; color: #CFF7E2; }
.cinta__pista { display: flex; width: max-content; }
.cinta__pista span { display: flex; align-items: center; gap: 2.2rem; padding-right: 2.2rem; white-space: nowrap; font-size: .82rem; font-weight: 800; letter-spacing: .28em; text-transform: uppercase; }
.cinta__pista i { width: .5rem; height: .5rem; flex: none; background: var(--vivo); transform: rotate(45deg); }
@media (prefers-reduced-motion: no-preference) { .cinta__pista { animation: cinta 46s linear infinite; } }
@keyframes cinta { to { transform: translateX(-50%); } }

/* ---------- 18.3 Conócenos: marco desplazado y sello ---------- */
.conocenos__media { position: relative; }
.conocenos__media::before {
  content: ""; position: absolute; inset: 1.1rem -1.1rem -1.1rem 1.1rem; border: 2px solid rgba(11, 122, 67, .35); border-radius: 28px; z-index: 0;
}
.conocenos__media .carrusel { position: relative; z-index: 1; }
@media (max-width: 899px) { .conocenos__media::before { inset: .7rem -.5rem -.7rem .5rem; } }
.carrusel__sello {
  position: absolute; left: 1rem; top: 1rem; z-index: 3; display: grid; gap: .1rem; padding: .6rem .95rem; border-radius: 14px;
  background: rgba(14, 52, 36, .78); border: 1px solid rgba(189, 242, 214, .22); color: #fff;
}
.carrusel__sello b { font-size: 1.05rem; font-weight: 800; letter-spacing: .14em; }
.carrusel__sello span { font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #BDF2D6; }

/* ---------- 18.4 Cifras gigantes ---------- */
.cifras-grandes {
  position: relative; overflow: hidden; padding: 4.5rem 1.25rem; color: #fff;
  background:
    radial-gradient(34rem 20rem at 85% 0%, rgba(34, 197, 94, .20), transparent 70%),
    radial-gradient(30rem 20rem at 5% 100%, rgba(21, 128, 120, .30), transparent 70%),
    linear-gradient(160deg, #164A33, var(--noche));
}
.cifras-grandes::before {   /* rejilla muy tenue */
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: linear-gradient(rgba(189, 242, 214, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(189, 242, 214, .06) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse 80% 90% at 50% 50%, #000 30%, transparent 100%);
}
.cifras-grandes ul { position: relative; display: grid; gap: 2.5rem; }
.cifras-grandes li { display: grid; gap: .6rem; text-align: center; }
.cifras-grandes b {
  display: block; font-size: clamp(4.6rem, 12vw, 9rem); font-weight: 800; line-height: .95; letter-spacing: -.05em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 20%, #7FE3B0 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cifras-grandes li > span { font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; line-height: 1.5; color: #BDF2D6; }
@media (min-width: 768px) {
  .cifras-grandes ul { grid-template-columns: repeat(3, 1fr); gap: 0; }
  .cifras-grandes li + li { border-left: 1px solid rgba(189, 242, 214, .18); }
}

/* ---------- 18.5 Servicios y facturación: detalles ---------- */
.servicio { transition: translate .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s; }
.servicio:hover { translate: 0 -8px; box-shadow: 0 34px 56px -30px rgba(8, 40, 26, .75); }
.servicio__arte img { transition: transform .55s cubic-bezier(.2, .7, .2, 1); }
.servicio:hover .servicio__arte img { transform: translateY(-6px) scale(1.05) rotate(-1.5deg); }
.tarjeta-factura { transition: translate .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s; }
.tarjeta-factura:hover { translate: 0 -8px; box-shadow: 0 38px 54px -28px rgba(4, 40, 22, .8); }
.boton svg { transition: transform .25s; }
.boton:hover svg { transform: translateX(4px); }
.boton--verde, .boton--blanco { position: relative; overflow: hidden; isolation: isolate; }
.boton--verde::after, .boton--blanco::after {
  content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%);
  transform: translateX(-120%); transition: transform .7s;
}
.boton--verde:hover::after, .boton--blanco:hover::after { transform: translateX(120%); }
.pasos-factura { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-top: 1.6rem; }
.pasos-factura li {
  display: inline-flex; align-items: center; gap: .6rem; padding: .5rem 1.1rem .5rem .5rem; border-radius: 99px;
  background: rgba(14, 52, 36, .45); border: 1px solid rgba(189, 242, 214, .25); font-size: .86rem; font-weight: 700; color: #fff;
}
.pasos-factura li span { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: #BDF2D6; color: var(--verde-profundo); font-weight: 800; }
/* Bordes inclinados de la banda de facturación */
.banda-verde { padding-block: 9rem; margin-block: -3.5rem; z-index: 1; clip-path: polygon(0 3.5rem, 100% 0, 100% calc(100% - 3.5rem), 0 100%); }
@media (max-width: 640px) { .banda-verde { padding-block: 7rem; margin-block: -2rem; clip-path: polygon(0 2rem, 100% 0, 100% calc(100% - 2rem), 0 100%); } }

/* ---------- 18.6 Estaciones: tres paneles que se expanden ---------- */
.seccion--noche {
  position: relative; overflow: hidden; padding-top: 9rem; padding-bottom: 6rem; color: #fff;
  background:
    radial-gradient(40rem 24rem at 12% 0%, rgba(34, 197, 94, .14), transparent 70%),
    radial-gradient(36rem 24rem at 95% 100%, rgba(21, 128, 120, .26), transparent 70%),
    var(--noche);
}
.seccion--noche .titulo-seccion h2 { color: #fff; }
.seccion--noche .sobretitulo { color: #7FE3B0; }
.seccion--noche .subtitulo { color: #BDF2D6; }
.seccion--noche .subrayado { background: var(--vivo); }
.paneles { display: flex; gap: 1rem; height: 34rem; }
.panel {
  position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; border-radius: 28px; outline-offset: 4px;
  border: 1px solid rgba(189, 242, 214, .16); background: #0A2A1E;
  transition: flex-grow .65s cubic-bezier(.2, .7, .2, 1), border-color .3s;
}
.panel__foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.panel__velo { position: absolute; inset: 0; background: linear-gradient(to top, rgba(6, 24, 16, .94) 0%, rgba(6, 24, 16, .35) 48%, rgba(6, 24, 16, .1) 100%); }
/* Nombre y datos van en una columna: el espacio de los datos se abre solo (grid 0fr -> 1fr), así nunca se encima */
.panel__info { position: absolute; left: 1.4rem; right: 1.4rem; bottom: 1.4rem; display: flex; flex-direction: column; }
.panel .clave-es { color: #7FE3B0; }
.panel h3 { margin-top: .25rem; color: #fff; font-size: clamp(1.5rem, 2.4vw, 2.2rem); line-height: 1.05; text-transform: uppercase; white-space: nowrap; }
.panel__detalle { display: grid; grid-template-rows: 0fr; opacity: 0; pointer-events: none; transition: grid-template-rows .55s cubic-bezier(.2, .7, .2, 1), opacity .4s .1s; }
.panel__tarjeta {
  min-height: 0; overflow: hidden; margin-top: 0; border-radius: 20px; padding: 0 1.2rem;
  background: rgba(14, 52, 36, .86); border: 0 solid rgba(189, 242, 214, .22);
  transition: margin-top .55s, padding .55s;
}
.panel__tarjeta .direccion { min-height: 0; margin-top: 0; color: #E8FFF3; font-size: .95rem; }
.panel__tarjeta .marca-pemex { margin-top: .35rem; color: #BDF2D6; }
.panel__acciones { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.panel__acciones .boton { min-height: 2.5rem; padding: .55rem 1.1rem; font-size: .76rem; }
/* El panel "abierto" muestra los datos */
.paneles:not(:hover):not(:focus-within) .panel:first-child,
.panel:hover, .panel:focus-within { flex-grow: 2.6; border-color: rgba(189, 242, 214, .4); }
.paneles:not(:hover):not(:focus-within) .panel:first-child .panel__foto,
.panel:hover .panel__foto, .panel:focus-within .panel__foto { transform: scale(1.06); }
.paneles:not(:hover):not(:focus-within) .panel:first-child .panel__detalle,
.panel:hover .panel__detalle, .panel:focus-within .panel__detalle { grid-template-rows: 1fr; opacity: 1; pointer-events: auto; }
.paneles:not(:hover):not(:focus-within) .panel:first-child .panel__tarjeta,
.panel:hover .panel__tarjeta, .panel:focus-within .panel__tarjeta { margin-top: .9rem; padding: 1.1rem 1.2rem 1.25rem; border-width: 1px; }
/* Pantallas táctiles y celulares: tarjetas apiladas con todo visible */
@media (max-width: 899px), (hover: none) {
  .paneles { flex-direction: column; height: auto; }
  .panel, .panel:hover, .panel:focus-within, .paneles:not(:hover):not(:focus-within) .panel:first-child { flex: none; height: 32rem; }
  .panel__detalle { grid-template-rows: 1fr; opacity: 1; pointer-events: auto; }
  .panel__tarjeta { margin-top: .9rem; padding: 1.1rem 1.2rem 1.25rem; border-width: 1px; }
}

/* ---------- 18.7 Pie: marca gigante de fondo ---------- */
.pie { position: relative; overflow: hidden; padding-bottom: 6rem; }
.pie::after {
  content: "SUDCALIFORNIA"; position: absolute; left: 50%; bottom: -.3em; translate: -50% 0; pointer-events: none; white-space: nowrap;
  font-size: clamp(3rem, 11.6vw, 11.5rem); font-weight: 800; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1.5px rgba(189, 242, 214, .13);
}
.pie__columnas, .pie__legal { position: relative; z-index: 1; }

/* ---------- 18.8 Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  .cinta { overflow-x: auto; }
  .panel, .panel__foto, .panel__detalle, .panel__tarjeta, .servicio, .tarjeta-factura { transition: none; }
}
