/* =========================================================
   VARIABLES GLOBALES
   =========================================================
   Aquí definimos colores, tamaños y valores reutilizables.
   Esto facilita mantener el diseño y cambiarlo más adelante
   sin tener que modificar el archivo completo.
*/
:root {
  --bg-main: #060606;
  --bg-soft: #0b0b0b;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-strong: rgba(255, 255, 255, 0.07);

  --text-main: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.68);
  --text-muted: rgba(255, 255, 255, 0.45);

  --border-soft: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);

  --red: #dc2626;
  --red-soft: rgba(220, 38, 38, 0.2);

  --blue: #2563eb;
  --blue-soft: rgba(37, 99, 235, 0.2);

  --gray-soft: rgba(255, 255, 255, 0.1);

  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-lg: 32px;

  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.22);
  --shadow-strong: 0 25px 80px rgba(0, 0, 0, 0.45);

  --container-width: 1280px;

  --transition-fast: 0.22s ease;
  --transition-medium: 0.35s ease;
}

/* =========================================================
   RESET BÁSICO
   =========================================================
   Esto ayuda a partir desde una base más limpia y consistente
   entre navegadores.
*/
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-main);
  color: var(--text-main);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* =========================================================
   CONTENEDOR CENTRAL
   =========================================================
   Esta clase centra el contenido y limita el ancho máximo.
*/
.container {
  width: min(100% - 2rem, var(--container-width));
  margin-inline: auto;
}

/* =========================================================
   HEADER / CABECERA
   =========================================================
   Barra superior fija con blur y transparencia.
*/
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Marca: logo + nombre */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(220, 38, 38, 0.3);
  flex-shrink: 0;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.2rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
}

.brand-text small {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  margin-top: 0.22rem;
}

/* Menú principal escritorio */
.main-nav {
  display: flex;
  align-items: center;
  gap: 1.7rem;
}

.main-nav a {
  font-size: 0.78rem;
  color: var(--text-soft);
  transition: color var(--transition-fast);
}

.main-nav a:hover {
  color: var(--text-main);
}

/* Botón destacado del header */
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 1.2rem;
  border-radius: 999px;
  background: var(--red);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.35);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.header-cta:hover {
  transform: translateY(-1px);
  background: #ef4444;
}

/* Botón menú móvil */
.menu-toggle {
  display: none;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-radius: 14px;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
}

/* =========================================================
   BOTONES GENERALES
   =========================================================
   Se reutilizan en hero, contacto y otras zonas.
*/
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--red);
  color: var(--text-main);
  box-shadow: 0 14px 40px rgba(220, 38, 38, 0.35);
}

.btn-primary:hover {
  background: #ef4444;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
  background: #ffffff;
  color: #111111;
}

/* =========================================================
   HERO / PRIMERA PANTALLA
   =========================================================
   Sección principal con:
   - grilla técnica
   - brillos
   - línea scanner
   - layout de dos columnas
*/
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-main);
  isolation: isolate;
}

.hero-layout {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 3.5rem;
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}

/* Capas decorativas del hero */
.hero-grid,
.hero-grid-fade,
.hero-glow,
.hero-scan-line {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-grid {
  opacity: 0.6;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
}

.hero-grid-fade {
  background:
    radial-gradient(
      circle at center,
      rgba(0, 0, 0, 0) 18%,
      rgba(6, 6, 6, 0.65) 70%,
      rgba(6, 6, 6, 0.96) 100%
    );
}

.hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(70px);
}

.hero-glow-blue {
  width: 34rem;
  height: 34rem;
  left: -12%;
  top: -10%;
  background: radial-gradient(
    circle,
    rgba(37, 99, 235, 0.28) 0%,
    rgba(37, 99, 235, 0.08) 35%,
    transparent 72%
  );
  animation: floatBlue 9s ease-in-out infinite;
}

.hero-glow-red {
  width: 28rem;
  height: 28rem;
  right: -10%;
  bottom: -12%;
  background: radial-gradient(
    circle,
    rgba(220, 38, 38, 0.26) 0%,
    rgba(220, 38, 38, 0.07) 35%,
    transparent 72%
  );
  animation: floatRed 11s ease-in-out infinite;
}

.hero-scan-line {
  opacity: 0.5;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.02) 40%,
    rgba(120, 220, 255, 0.08) 48%,
    rgba(180, 240, 255, 0.16) 50%,
    rgba(120, 220, 255, 0.08) 52%,
    rgba(255, 255, 255, 0.02) 60%,
    transparent 100%
  );
  animation: scanMove 7s linear infinite;
}

/* Contenido izquierda */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 44rem;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-soft);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  backdrop-filter: blur(10px);
}

.hero-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--red);
}

.hero-brand {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.hero-brand-logo {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(220, 38, 38, 0.3);
  box-shadow: var(--shadow-soft);
  flex-shrink: 0;
}

.hero-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.35rem;
}

.hero-brand-text p {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.hero-brand-text span {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--text-muted);
}

.hero-title {
  margin: 1.25rem 0 0;
  font-size: clamp(2.6rem, 5vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.hero-title span {
  display: block;
  margin-top: 0.45rem;
  color: rgba(255, 255, 255, 0.65);
}

.hero-description {
  max-width: 42rem;
  margin-top: 1.2rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.96rem;
  line-height: 1.95;
}

.hero-actions {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* Columna derecha del hero */
.hero-visual {
  position: relative;
  z-index: 2;
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(16px);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.08),
      transparent 24%,
      transparent 72%,
      rgba(255, 255, 255, 0.03)
    );
  pointer-events: none;
  z-index: 1;
}

.hero-card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 3;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-soft);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  backdrop-filter: blur(10px);
}

.hero-image-wrap {
  position: relative;
  aspect-ratio: 4 / 4.5;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.hero-card:hover .hero-image {
  transform: scale(1.03);
}

/* Efectos scanner dentro de la imagen */
.hero-image-scan-line,
.hero-image-scan-shimmer,
.hero-image-pulse {
  position: absolute;
  pointer-events: none;
}

.hero-image-scan-line {
  inset-inline: 1.5rem;
  top: 0;
  height: 96px;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(110, 245, 255, 0.08) 35%,
    rgba(155, 250, 255, 0.35) 50%,
    rgba(110, 245, 255, 0.08) 65%,
    transparent 100%
  );
  filter: blur(6px);
  animation: imageScanMove 4.5s linear infinite;
}

.hero-image-scan-shimmer {
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 38%,
    rgba(170, 245, 255, 0.06) 48%,
    rgba(190, 250, 255, 0.14) 50%,
    rgba(170, 245, 255, 0.06) 52%,
    transparent 62%,
    transparent 100%
  );
  animation: shimmerMove 5.5s ease-in-out infinite;
}

.hero-image-pulse {
  top: 4.2rem;
  right: 1.25rem;
  z-index: 2;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  border: 1px solid rgba(125, 235, 255, 0.38);
  box-shadow:
    0 0 0 0 rgba(125, 235, 255, 0.24),
    0 0 28px rgba(125, 235, 255, 0.18);
  animation: radarPulse 2.6s ease-out infinite;
}

.hero-card-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  padding: 1rem;
  border-top: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, 0.35);
}

.info-box {
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 1.2rem;
  padding: 1rem;
}

.info-label {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.4);
}

.info-box p {
  margin: 0.65rem 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  word-break: break-word;
}

/* =========================================================
   TARJETAS DE LÍNEAS DE NEGOCIO
   =========================================================
   Estos son los tres botones inferiores grandes.
*/
.business-links-section {
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--border-soft);
  background: #080808;
}

.business-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.business-card {
  border-radius: 1.5rem;
  padding: 1.4rem;
  border: 1px solid var(--border-soft);
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast);
}

.business-card:hover {
  transform: translateY(-2px);
}

.business-card-label {
  display: inline-block;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  margin-bottom: 0.7rem;
}

.business-card h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
}

.business-card p {
  margin: 0.75rem 0 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.8;
}

.business-card-blue {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(96, 165, 250, 0.2);
}

.business-card-blue .business-card-label {
  color: #bfdbfe;
}

.business-card-blue:hover {
  background: rgba(37, 99, 235, 0.28);
}

.business-card-red {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(248, 113, 113, 0.2);
}

.business-card-red .business-card-label {
  color: #fecaca;
}

.business-card-red:hover {
  background: rgba(220, 38, 38, 0.28);
}

.business-card-gray {
  background: rgba(255, 255, 255, 0.1);
}

.business-card-gray .business-card-label {
  color: rgba(255, 255, 255, 0.6);
}

.business-card-gray:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* =========================================================
   SECCIONES GENERALES DE GALERÍA
   =========================================================
*/
.gallery-section {
  padding: 4rem 0 1rem;
  background: #080808;
}

.section-heading {
  max-width: 52rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin: 1rem 0 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.section-heading p {
  margin: 1rem 0 0;
  color: var(--text-soft);
  font-size: 0.96rem;
  line-height: 1.9;
}

.section-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border-soft);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-weight: 700;
}

.section-chip-blue {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(96, 165, 250, 0.2);
  color: #bfdbfe;
}

.section-chip-red {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(248, 113, 113, 0.2);
  color: #fecaca;
}

.section-chip-gray {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.82);
}

/* =========================================================
   TREN DE IMÁGENES
   =========================================================
   Este contenedor:
   - se desplaza horizontalmente
   - mostrará tarjetas creadas por JavaScript
*/
.image-rail {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.image-rail::-webkit-scrollbar {
  height: 10px;
}

.image-rail::-webkit-scrollbar-track {
  background: transparent;
}

.image-rail::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

/* 
   Tarjeta individual del tren.
   JavaScript la va a crear con esta estructura.
*/
.rail-card {
  width: 600px; /* Ancho estándar para todas las tarjetas */
  height: 500px; /* Alto estándar para todas las tarjetas */
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 1.8rem;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  flex-shrink: 0;
  transition:
    transform var(--transition-fast),
    border-color var(--transition-fast);
}

.rail-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.rail-card-image {
  width: 100%;
  height: 80%; /* La imagen ocupará el 80% de la tarjeta */
  overflow: hidden;
}

.rail-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ajusta la imagen para llenar el espacio */
  object-position: center; /* Centra la imagen dentro del contenedor */
}

.rail-card-footer {
  height: 20%; /* El pie de la tarjeta ocupará el 20% restante */
  padding: 0.9rem 1rem 1rem;
  background: rgba(0, 0, 0, 0.22);
  border-top: 1px solid var(--border-soft);
}

.rail-card-footer p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.82rem;
}

/* =========================================================
   CONTACTO
   =========================================================
*/
.contact-section {
  position: relative;
  overflow: hidden;
  background: var(--bg-main);
  padding: 4.5rem 0 5rem;
}

.contact-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(70px);
  pointer-events: none;
}

.contact-glow-blue {
  width: 20rem;
  height: 20rem;
  left: -10%;
  top: 0;
  opacity: 0.4;
  background: radial-gradient(
    circle,
    rgba(37, 99, 235, 0.28) 0%,
    rgba(37, 99, 235, 0.08) 35%,
    transparent 72%
  );
}

.contact-glow-red {
  width: 18rem;
  height: 18rem;
  right: -8%;
  bottom: -10%;
  opacity: 0.4;
  background: radial-gradient(
    circle,
    rgba(220, 38, 38, 0.26) 0%,
    rgba(220, 38, 38, 0.07) 35%,
    transparent 72%
  );
}

.contact-card {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  padding: 1.8rem;
  border-radius: 2rem;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
}

.contact-content h2 {
  margin: 1rem 0 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.contact-content p {
  margin: 1rem 0 0;
  max-width: 42rem;
  color: var(--text-soft);
  font-size: 0.96rem;
  line-height: 1.9;
}

.contact-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.contact-data {
  display: grid;
  gap: 1rem;
}

.contact-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-soft);
  border-radius: 1.5rem;
  padding: 1.15rem 1.2rem;
}

.contact-box p {
  margin: 0.65rem 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  word-break: break-word;
}

/* =========================================================
   FOOTER
   =========================================================
*/
.site-footer {
  border-top: 1px solid var(--border-soft);
  background: #050505;
}

.site-footer .container {
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
}

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
}

/* =========================================================
   ANIMACIONES
   =========================================================
*/
@keyframes floatBlue {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(22px, 18px, 0) scale(1.06);
  }
}

@keyframes floatRed {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-18px, -12px, 0) scale(1.05);
  }
}

@keyframes scanMove {
  0% {
    transform: translateY(-110%);
  }
  100% {
    transform: translateY(110%);
  }
}

@keyframes imageScanMove {
  0% {
    transform: translateY(-140%);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(420%);
    opacity: 0;
  }
}

@keyframes shimmerMove {
  0% {
    transform: translateX(-40%);
    opacity: 0.2;
  }
  50% {
    transform: translateX(15%);
    opacity: 0.8;
  }
  100% {
    transform: translateX(55%);
    opacity: 0.2;
  }
}

@keyframes radarPulse {
  0% {
    transform: scale(0.7);
    opacity: 0.95;
    box-shadow:
      0 0 0 0 rgba(125, 235, 255, 0.26),
      0 0 25px rgba(125, 235, 255, 0.22);
  }
  70% {
    transform: scale(1.35);
    opacity: 0.2;
    box-shadow:
      0 0 0 18px rgba(125, 235, 255, 0),
      0 0 42px rgba(125, 235, 255, 0.1);
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
    box-shadow:
      0 0 0 24px rgba(125, 235, 255, 0),
      0 0 48px rgba(125, 235, 255, 0);
  }
}

/* =========================================================
   RESPONSIVE
   =========================================================
   Aquí ajustamos el diseño para tablets y celulares.
*/
@media (max-width: 1080px) {
  .hero-layout,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .business-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .main-nav,
  .header-cta {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* 
     Cuando JavaScript agregue la clase .is-open al menú,
     esta será la apariencia en móviles.
  */
  .main-nav.is-open {
    position: absolute;
    top: calc(100% + 1px);
    left: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(0, 0, 0, 0.92);
    border: 1px solid var(--border-soft);
    border-radius: 1rem;
    overflow: hidden;
    backdrop-filter: blur(16px);
  }

  .main-nav.is-open a {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.82);
  }

  .main-nav.is-open a:last-child {
    border-bottom: 0;
  }

  .hero-title {
    font-size: clamp(2.3rem, 9vw, 4rem);
  }

  .hero-description,
  .section-heading p,
  .contact-content p {
    font-size: 0.92rem;
  }

  .hero-card-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 1.2rem, var(--container-width));
  }

  .header-inner {
    min-height: 66px;
  }

  .brand-text strong {
    font-size: 0.9rem;
  }

  .hero-layout {
    min-height: auto;
    padding-top: 1.8rem;
    padding-bottom: 2.6rem;
    gap: 1.8rem;
  }

  .hero-chip {
    font-size: 0.56rem;
    letter-spacing: 0.22em;
  }

  .hero-brand-logo {
    width: 54px;
    height: 54px;
  }

  .hero-description {
    line-height: 1.8;
  }

  .hero-actions,
  .contact-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .business-card {
    padding: 1.15rem;
  }

  .business-card h3 {
    font-size: 1.18rem;
  }

  .section-heading h2,
  .contact-content h2 {
    font-size: clamp(1.9rem, 9vw, 3rem);
  }

  .rail-card {
    min-width: 84%;
  }

  .contact-card {
    padding: 1.2rem;
    border-radius: 1.5rem;
  }

  .hero-card {
    border-radius: 1.6rem;
  }

  .hero-grid {
    background-size: 28px 28px;
  }

  .hero-image-scan-line {
    inset-inline: 1rem;
    filter: blur(4px);
  }

  .hero-image-pulse {
    width: 76px;
    height: 76px;
  }
}

/* =========================================================
   ACCESIBILIDAD BÁSICA
   =========================================================
   Si el usuario prefiere menos movimiento, reducimos animaciones.
*/
@media (prefers-reduced-motion: reduce) {
  .hero-glow-blue,
  .hero-glow-red,
  .hero-scan-line,
  .hero-image-scan-line,
  .hero-image-scan-shimmer,
  .hero-image-pulse {
    animation: none;
  }

  .hero-image,
  .business-card,
  .rail-card,
  .btn,
  .header-cta {
    transition: none;
  }
}