/* ============================================================
   Cristafácil — Dark Automotive Theme
   Mobile-First  ·  WCAG AA  ·  CSS Custom Properties
   v3 — Flip Cards + LED Ballast Animation Ready
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  --bg-base: #0a0c10;
  --bg-surface: #12151c;
  --bg-elevated: #1a1e28;
  --bg-overlay: rgba(10, 12, 16, 0.85);

  --accent: #0072ff;
  --accent-light: #00d2ff;
  --accent-glow: rgba(0, 114, 255, 0.35);
  --gradient-accent: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);

  --text-primary: #ffffff;
  --text-secondary: #c5cad3;
  --text-muted: #7b8294;

  /* Card light theme */
  --card-light-bg: #f0f2f5;
  --card-light-text: #1a1e28;
  --card-light-muted: #555b6a;

  --ff-sans: 'Montserrat', system-ui, -apple-system, sans-serif;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-black: 900;

  --fs-display: clamp(2.8rem, 5.5vw, 4.8rem);
  --fs-h2: clamp(1.5rem, 3vw + 0.5rem, 2.75rem);
  --fs-h3: clamp(1.05rem, 1.2vw + 0.5rem, 1.25rem);
  --fs-body: clamp(0.938rem, 1vw + 0.5rem, 1.125rem);
  --fs-small: clamp(0.813rem, 0.8vw + 0.4rem, 0.938rem);

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  --container-max: 1440px;
  --header-h: 72px;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 100vmax;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 0.2s;
  --duration-med: 0.4s;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ff-sans);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-base);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

.container {
  width: 92%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hide <br class="desktop-br"> on mobile, show on desktop */
.desktop-br {
  display: none;
}


/* ===================================================================
   HEADER / NAVIGATION
   =================================================================== */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(10, 12, 16, 0.7);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background var(--duration-fast) ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.logo img,
.logo svg {
  height: 38px;
  width: auto;
}

.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links a {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  position: relative;
  transition: color var(--duration-fast) ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 1px;
  transition: width var(--duration-med) var(--ease-out-expo);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  width: 100%;
}

.btn-cta {
  display: none;
  padding: 0.625rem 1.5rem;
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  background: var(--gradient-accent);
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
  transition: box-shadow var(--duration-fast) ease, transform var(--duration-fast) ease;
}

.btn-cta:hover,
.btn-cta:focus-visible {
  box-shadow: 0 0 24px var(--accent-glow), 0 4px 12px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

.mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}

.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: transform var(--duration-fast) ease, opacity var(--duration-fast) ease;
}

/* Mobile Nav */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  background: rgba(10, 12, 16, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-med) ease, visibility var(--duration-med) ease;
}

.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav a {
  font-size: 1.25rem;
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  transition: color var(--duration-fast) ease;
}

.mobile-nav a:hover,
.mobile-nav a:focus-visible {
  color: var(--text-primary);
}

.mobile-nav .btn-mobile-cta {
  margin-top: var(--space-sm);
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  background: var(--gradient-accent);
  border-radius: var(--radius-pill);
}

.mobile-nav-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  font-size: 1.75rem;
  color: var(--text-secondary);
  background: none;
  border: none;
  line-height: 1;
  transition: color var(--duration-fast) ease;
}

.mobile-nav-close:hover {
  color: var(--text-primary);
}


/* ===================================================================
   HERO SECTION — MOBILE-FIRST
   =================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* Distribuye armónicamente */
  padding-top: var(--header-h);
  overflow: hidden;
}

/* Layer 1: Background */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
}

/* Layer 2: Car (MOBILE = sube un poco y llena el centro) */
.hero-car {
  position: relative;
  z-index: 2;
  order: 2;
  width: 100%;
  max-width: 520px;
  margin-top: auto;
  margin-bottom: 0;
  margin-inline: auto;
  padding-inline: var(--space-sm);
  pointer-events: none;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  transform: translateY(-15px);
  /* Reduce el aire entre coche y texto */
}

.hero-car img {
  max-height: 48dvh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

@media (min-width: 1024px) {
  .hero-car img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center bottom;
    transform: translateX(-5%) translateY(10%);
  }
}

/* Layer 3: Text (MOBILE = centrado verticalmente con respiro) */
.hero-content {
  position: relative;
  z-index: 3;
  order: 1;
  flex: 0 0 auto;
  width: 92%;
  max-width: var(--container-max);
  margin-top: clamp(2rem, 8vh, 6rem);
  /* Baja el texto proporcionalmente en pantallas altas */
  margin-inline: auto;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-content h1 {
  font-size: var(--fs-display);
  font-weight: var(--fw-black);
  line-height: 1.0;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-align: left;
}

.hero-content h1 .accent {
  color: var(--accent-light);
}

.hero-content .hero-desc {
  margin-top: var(--space-sm);
  max-width: 44ch;
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.65;
}

/* CTA Button (hero) */
.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--space-lg);
  padding: 0.875rem 2rem;
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  background: transparent;
  border: 2px solid var(--accent);
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
  transition: background var(--duration-fast) ease, border-color var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease, transform var(--duration-fast) ease;
}

.btn-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity var(--duration-med) ease;
  z-index: -1;
}

.btn-hero:hover,
.btn-hero:focus-visible {
  border-color: var(--accent-light);
  box-shadow: 0 0 28px var(--accent-glow), 0 4px 16px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

.btn-hero:hover::before,
.btn-hero:focus-visible::before {
  opacity: 1;
}

.btn-hero svg {
  width: 18px;
  height: 18px;
  transition: transform var(--duration-fast) ease;
}

.btn-hero:hover svg {
  transform: translateX(3px);
}


/* ===================================================================
   SHARED SECTION STYLES
   =================================================================== */
.section-header {
  margin-bottom: var(--space-lg);
}

.section-header--center {
  text-align: center;
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-black);
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.section-title .accent {
  color: var(--accent-light);
  display: block;
}

.section-title--center .accent {
  display: inline;
}

.section-subtitle {
  margin-top: var(--space-xs);
  font-size: var(--fs-body);
  color: var(--text-secondary);
  font-weight: var(--fw-regular);
}


/* ===================================================================
   ¿QUIÉNES SOMOS?
   =================================================================== */
.about {
  padding: var(--space-3xl) 0 var(--space-2xl);
  background: var(--bg-base);
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  line-height: 1.75;
}

.about-text p strong {
  color: var(--text-primary);
  font-weight: var(--fw-semibold);
}

/* Trust card */
.trust-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--accent);
}

.trust-card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-accent);
  border-radius: var(--radius-sm);
}

.trust-card-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--text-primary);
}

.trust-card-body strong {
  display: block;
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  margin-bottom: 0.25rem;
}

.trust-card-body p {
  font-size: var(--fs-small);
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.5;
}

/* About images */
.about-images {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
}

.about-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.about-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-med) var(--ease-out-expo);
}

.about-img:hover img {
  transform: scale(1.03);
}

.about-img--secondary {
  aspect-ratio: 16 / 9;
}


/* ===================================================================
   SERVICES — 3D FLIP CARDS
   =================================================================== */
.services {
  padding: var(--space-2xl) 0 var(--space-3xl);
  background: var(--bg-surface);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

/* Flip card container */
.flip-card {
  perspective: 1200px;
  height: 520px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card.is-flipped .flip-card-inner {
  transform: rotateY(180deg);
}

/* Shared face styles */
.flip-front,
.flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* === FRONT FACE (light) === */
.flip-front {
  background: var(--card-light-bg);
  color: var(--card-light-text);
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease;
}

.flip-card:hover .flip-front {
  background: #e4e7ec;
}

.flip-front-img {
  flex: 1 1 55%;
  min-height: 0;
  overflow: hidden;
}

.flip-front-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-med) var(--ease-out-expo);
}

.flip-card:hover .flip-front-img img {
  transform: scale(1.05);
}

.flip-front-body {
  flex: 0 0 auto;
  padding: var(--space-md);
}

.flip-front-body h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  line-height: 1.3;
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--card-light-text);
}

.service-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  stroke: var(--accent);
  margin-top: 2px;
}

.flip-front-body p {
  font-size: var(--fs-small);
  color: var(--card-light-muted);
  line-height: 1.55;
  margin-bottom: var(--space-sm);
}

.flip-trigger {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  background: var(--accent);
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: background var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}

.flip-trigger:hover {
  background: var(--accent-light);
  box-shadow: 0 4px 16px var(--accent-glow);
}


/* === BACK FACE (dark + neon border) === */
.flip-back {
  transform: rotateY(180deg);
  background: var(--bg-elevated);
  border: 2px solid var(--accent);
  box-shadow: 0 0 20px rgba(0, 114, 255, 0.15), inset 0 0 30px rgba(0, 114, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg) var(--space-md);
  text-align: center;
}

.flip-close {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 1.5rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  transition: color var(--duration-fast) ease;
}

.flip-close:hover {
  color: var(--text-primary);
}

.flip-back h4 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

/* Flip form */
.flip-form {
  width: 100%;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.flip-form input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-size: var(--fs-small);
  font-family: var(--ff-sans);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}

.flip-form input::placeholder {
  color: var(--text-muted);
}

.flip-form input:focus,
.flip-form select:focus {
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.15);
}

.flip-form select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-size: var(--fs-small);
  font-family: var(--ff-sans);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%237b8294' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 12px 8px;
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}

.flip-form select option {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.flip-form select:valid {
  color: var(--text-primary);
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: #fff;
  background: #25D366;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}

.btn-whatsapp svg {
  width: 18px;
  height: 18px;
}

.btn-whatsapp:hover {
  background: #1ebe5c;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
}


/* ===================================================================
   THERMAL BANNER — CONFORT TÉRMICO
   =================================================================== */
.thermal-banner {
  position: relative;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  background: var(--bg-base);
}

.thermal-banner-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.thermal-banner-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.thermal-banner-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg,
      rgba(10, 12, 16, 0.15) 0%,
      rgba(10, 12, 16, 0.5) 55%,
      rgba(10, 12, 16, 0.92) 100%);
}

/* Mobile: darken overlay & hide badge card */
@media (max-width: 768px) {
  .thermal-banner-overlay {
    background: linear-gradient(180deg,
        rgba(10, 12, 16, 0.45) 0%,
        rgba(10, 12, 16, 0.78) 50%,
        rgba(10, 12, 16, 0.96) 100%);
  }

  .thermal-badge-card {
    display: none;
  }
}

/* Badge card flotante */
.thermal-badge-card {
  position: absolute;
  z-index: 3;
  top: auto;
  bottom: 25%;
  right: 5%;
  width: clamp(160px, 18vw, 220px);
  background: #11151c;
  border: 1px solid rgba(0, 114, 255, 0.35);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 28px rgba(0, 114, 255, 0.15),
    0 8px 24px rgba(0, 0, 0, 0.5);
}

.thermal-badge-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.thermal-badge-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thermal-badge-info {
  padding: 0.75rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.thermal-badge-label {
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

.thermal-badge-value {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: var(--fw-black);
  color: var(--accent-light);
  letter-spacing: 0.05em;
}

/* Text block at the bottom */
.thermal-text {
  position: relative;
  z-index: 3;
  width: 92%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: var(--space-xl) 0 var(--space-2xl);
  text-align: center;
}

.thermal-text h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-black);
  line-height: 1.15;
  text-transform: none;
  margin-bottom: var(--space-sm);
}

.thermal-text h2 .accent {
  color: var(--accent-light);
  display: inline;
}

.thermal-text p {
  max-width: 68ch;
  margin-inline: auto;
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.7;
  font-style: italic;
}


/* ===================================================================
   SIMULATOR — PELÍCULA DE SEGURIDAD
   =================================================================== */
.simulator {
  padding: var(--space-2xl) 0 var(--space-3xl);
  background: var(--bg-surface);
}

/* --- Viewer / Showroom --- */
.sim-viewer {
  margin-top: var(--space-lg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.sim-display {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(145deg, #181c24 0%, #0e1017 100%);
}

.sim-display img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Sin filtros CSS — la imagen se carga ya con el color correcto */
  transition: opacity 0.2s ease;
}



/* --- Thumbnails strip --- */
.sim-thumbnails {
  display: flex;
  gap: 0.5rem;
  padding: var(--space-sm);
  background: var(--bg-elevated);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sim-thumb {
  flex: 0 0 auto;
  position: relative;
  width: 100px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: none;
  padding: 0;
}

.sim-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sim-thumb.active,
.sim-thumb:hover {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(0, 114, 255, 0.3);
}


/* --- Control Panel --- */
.sim-controls {
  margin-top: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.sim-controls-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sim-controls-header h3 {
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sim-controls-header p {
  font-size: var(--fs-small);
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.sim-guarantee {
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  padding: 0.35rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.sim-controls-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
}

.sim-control-group label {
  display: block;
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
  letter-spacing: 0.02em;
}

/* Model / Tint text buttons */
.sim-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sim-btn {
  padding: 0.45rem 1.1rem;
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  font-family: var(--ff-sans);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sim-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.sim-btn.active {
  color: var(--text-primary);
  border-color: var(--accent);
  background: rgba(0, 114, 255, 0.12);
  box-shadow: 0 0 10px rgba(0, 114, 255, 0.2);
}

/* Color swatch buttons */
.sim-colors {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.sim-color-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--swatch);
  border: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.sim-color-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

.sim-color-btn.active {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(0, 114, 255, 0.35);
  transform: scale(1.1);
}

/* Footer title */
.sim-footer-title {
  margin-top: var(--space-xl);
  margin-bottom: 0;
}

/* ===================================================================
   RESPONSIVE BREAKPOINTS
   =================================================================== */

/* ≥ 768px — Tablet */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
    gap: var(--space-md);
  }

  .btn-cta {
    display: inline-flex;
  }

  .mobile-menu-toggle {
    display: none;
  }

  .logo img,
  .logo svg {
    height: 44px;
  }

  .desktop-br {
    display: inline;
  }

  /* Hero: positioned layout */
  .hero {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }

  .hero-car {
    position: absolute;
    order: unset;
    width: 58%;
    max-width: 740px;
    right: 0;
    bottom: 5%;
    margin: 0;
    padding: 0;
    transform: translateX(4%);
  }

  .hero-content {
    order: unset;
    padding: var(--space-xl) 0;
    width: 92%;
    max-width: var(--container-max);
    margin-inline: auto;
  }

  .hero-content h1 {
    max-width: 14ch;
  }

  /* About 2-column */
  .about-grid {
    grid-template-columns: 45fr 55fr;
    gap: var(--space-xl);
    align-items: start;
  }

  .about-images {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
  }

  .about-img--main {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 10;
  }

  .about-img--secondary {
    aspect-ratio: auto;
  }

  /* Services 2-column */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .flip-card {
    height: 560px;
  }

  /* Thermal banner */
  .thermal-banner {
    min-height: 500px;
  }

  .thermal-badge-card {
    bottom: 45%;
    right: 6%;
  }

  /* Simulator controls 3-col */
  .sim-controls-body {
    grid-template-columns: repeat(3, 1fr);
  }

  .sim-thumb {
    width: 120px;
    height: 72px;
  }
}


/* ≥ 992px — Desktop */
@media (min-width: 992px) {
  :root {
    --header-h: 80px;
  }

  .header-inner {
    padding-inline: var(--space-lg);
  }

  .hero-car {
    width: 55%;
    max-width: 820px;
    right: 2%;
    bottom: 5%;
    transform: translateX(2%);
  }

  .hero-content {
    width: 92%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding: var(--space-xl) 0;
  }

  .hero-content h1 {
    max-width: 16ch;
  }

  .hero-content .hero-desc {
    max-width: 40ch;
  }

  /* Services 3-column */
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .flip-card {
    height: 570px;
  }

  /* Thermal banner */
  .thermal-banner {
    min-height: 560px;
  }

  /* Simulator thumbnails */
  .sim-thumb {
    width: 140px;
    height: 80px;
  }

  .sim-thumbnails {
    justify-content: center;
  }
}


/* ≥ 1024px — Desktop */
@media (min-width: 1024px) {
  .hero-car {
    width: 55vw;
    max-width: 820px;
    position: absolute;
    right: 2%;
    bottom: 2%;
    margin: 0;
  }

  .hero-car img {
    max-height: none;
  }
}


/* ≥ 1200px — Large */
@media (min-width: 1200px) {
  .hero-car {
    width: 52%;
    max-width: 900px;
    right: 3%;
    bottom: 5%;
    transform: translateX(0);
  }

  .container {
    padding-inline: var(--space-lg);
  }
}


/* ===================================================================
   ASEGURADORAS (CINTA INFINITA)
   =================================================================== */
.insurances-section {
  padding: 4.5rem 0;
  background: #0a0d14;
  overflow: hidden;
}

.insurances-section .text-center {
  text-align: center;
}

.insurances-section .section-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--accent-light);
  background: rgba(0, 114, 255, 0.1);
  border: 1px solid rgba(0, 114, 255, 0.2);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.marquee-wrapper {
  width: 100%;
  overflow: hidden;
  margin-top: 2.5rem;
  padding: 1.2rem 0;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  width: max-content;
  padding: 0.5rem 0;
  animation: scrollMarquee 35s linear infinite;
}

.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes scrollMarquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.insurance-item {
  flex: 0 0 auto;
  width: 150px;
  height: 70px;
  background: #121722;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem;
  transform-origin: center center;
  transition: all 0.3s ease;
}

.insurance-item img {
  max-width: 100%;
  max-height: 40px;
  object-fit: contain;
  filter: grayscale(100%) brightness(1.2) opacity(0.7);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.insurance-item:hover {
  border-color: rgba(0, 210, 255, 0.4);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 12px rgba(0, 210, 255, 0.25);
}

.insurance-item:hover img {
  filter: grayscale(0%) brightness(1) opacity(1);
  transform: scale(1.08);
}


/* ===================================================================
   FAQ ACCORDION
   =================================================================== */
.faq-section {
  padding: 5rem 1.5rem;
  background: #0a0d14;
}

.faq-container {
  max-width: 860px;
  margin: 0 auto;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 3rem;
}

.faq-item {
  background: #121722;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.faq-item[open] {
  border-color: rgba(0, 210, 255, 0.35);
  background: #141b28;
}

.faq-question {
  padding: 1.25rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #f0f4f8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-icon {
  font-size: 1.4rem;
  color: var(--accent-light, #00d2ff);
  transition: transform 0.3s ease;
  line-height: 1;
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.5rem 1.4rem 1.5rem;
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-answer p {
  margin: 0;
}


/* ===================================================================
   FOOTER
   =================================================================== */
.site-footer {
  position: relative;
  background: radial-gradient(35% 128px at 50% 0%, rgba(255, 255, 255, 0.08), transparent), #0a0c10;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4rem 1.5rem 3rem;
  margin-top: var(--space-3xl);
}

.footer-glow-line {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: 33%;
  height: 2px;
  background: var(--accent-light, #00d2ff);
  filter: blur(4px);
  border-radius: 9999px;
  pointer-events: none;
}

.footer-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.footer-brand .logo {
  display: inline-block;
  margin-bottom: var(--space-sm);
}

.footer-desc {
  color: var(--text-muted);
  font-size: var(--fs-small);
  line-height: 1.6;
  max-width: 400px;
  margin-bottom: var(--space-md);
}

.footer-copyright {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.footer-col h4 {
  color: var(--text-primary);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col a {
  color: #8b949e;
  font-size: var(--fs-small);
  transition: color var(--duration-fast) ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-col a:hover,
.footer-col a:focus-visible {
  color: var(--text-primary);
}

.footer-contact svg {
  color: var(--accent-light);
}

/* Tablet & Desktop Layouts for Footer */
@media (min-width: 768px) {
  .footer-links-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .site-footer {
    border-radius: 40px 40px 0 0;
    padding: 5rem 1.5rem 3rem;
  }

  .footer-container {
    grid-template-columns: 3fr 7fr;
    gap: var(--space-2xl);
  }

  .footer-links-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===================================================================
   LEGAL MODALS
   =================================================================== */
.legal-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.legal-modal-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.legal-modal {
  position: relative;
  width: 92%;
  max-width: 650px;
  max-height: 80vh;
  background: #111622;
  border: 1px solid rgba(0, 210, 255, 0.3);
  border-radius: 16px;
  padding: 2rem;
  overflow-y: auto;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6), 0 0 24px rgba(0, 114, 255, 0.1);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
}

.legal-modal-overlay.is-visible .legal-modal {
  transform: translateY(0) scale(1);
}

.legal-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.75rem;
  color: var(--text-muted, #7b8294);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
  z-index: 1;
}

.legal-modal-close:hover {
  color: var(--text-primary, #ffffff);
}

.legal-modal h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-light, #00d2ff);
  margin-bottom: 1.5rem;
  padding-right: 2rem;
}

.legal-modal-body h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.legal-modal-body p {
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.legal-modal-body p:last-child {
  margin-bottom: 0;
}

/* Custom scrollbar inside modal */
.legal-modal::-webkit-scrollbar {
  width: 6px;
}

.legal-modal::-webkit-scrollbar-track {
  background: transparent;
}

.legal-modal::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.legal-modal::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}


/* ===================================================================
   ACCESSIBILITY: Reduced Motion
   =================================================================== */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-bg,
  .hero-bg img,
  .hero-car,
  .hero-car img,
  .hero-content h1,
  .hero-content .hero-desc,
  .hero-content .btn-hero {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .flip-card-inner {
    transition-duration: 0.01ms !important;
  }
}


/* ===================================================================
   FOCUS VISIBLE
   =================================================================== */
:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* ===================================================================
   SCROLLBAR
   =================================================================== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ---------- Legal Opt-in Text ---------- */
.legal-opt-in {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.5rem;
  display: block;
  text-align: center;
}

.legal-opt-in a {
  color: var(--accent);
  text-decoration: underline;
}

/* ---------- WhatsApp CTA Button (forms & simulator) ---------- */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: var(--radius-pill);
  background: #25D366;
  color: #fff;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-small);
  cursor: pointer;
  transition: background var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}

.btn-whatsapp svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-whatsapp:hover {
  background: #1ebe5d;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.4);
}

/* ---------- WhatsApp Floating Button ---------- */
.whatsapp-float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  text-decoration: none;
  transition: transform var(--duration-fast) var(--ease-out-expo),
    box-shadow var(--duration-fast) ease;
  animation: pulseWhatsApp 2.5s infinite;
}

.whatsapp-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6);
  animation: none;
}

.whatsapp-float-btn svg {
  pointer-events: none;
}

/* Tooltip */
.whatsapp-tooltip {
  position: absolute;
  right: 72px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 0.813rem;
  font-weight: var(--fw-medium);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-fast) ease;
}

.whatsapp-float-btn:hover .whatsapp-tooltip {
  opacity: 1;
}

@keyframes pulseWhatsApp {
  0% {
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  }

  50% {
    box-shadow: 0 4px 28px rgba(37, 211, 102, 0.7), 0 0 0 12px rgba(37, 211, 102, 0.1);
  }

  100% {
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  }
}

/* Hide tooltip on mobile */
@media (max-width: 767px) {
  .whatsapp-tooltip {
    display: none;
  }

  .whatsapp-float-btn {
    bottom: 16px;
    right: 16px;
    width: 54px;
    height: 54px;
  }

  .whatsapp-float-btn svg {
    width: 28px;
    height: 28px;
  }
}