*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }
body { font-family: 'Inter', sans-serif; background: #060606; color: #E0E0E0; overflow-x: hidden; }

/* ===== SELECTS NATIVOS =====
   El <select> cerrado hereda nuestros estilos, pero el listado desplegable
   lo dibuja el navegador con sus propios colores por defecto (fondo claro),
   sin heredar el texto claro del sitio => texto blanco sobre fondo blanco.
   color-scheme ya lo corrige en Chrome/Edge; esto es refuerzo explícito. */
select { color-scheme: dark; }
select option {
  background-color: #0d0d0d;
  color: #E0E0E0;
}
select option:checked,
select option:hover {
  background-color: #C20500;
  color: #fff;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #060606; }
::-webkit-scrollbar-thumb { background: #C20500; border-radius: 2px; }

/* ===== PRELOADER ===== */
#preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: #060606;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-bar {
  width: 200px; height: 2px; background: #1a1a1a; border-radius: 1px; overflow: hidden; position: relative;
}
.preloader-bar::after {
  content: ''; position: absolute; left: -50%; top: 0; height: 100%; width: 50%;
  background: linear-gradient(90deg, transparent, #C20500, transparent);
  animation: preloader-slide 1s ease-in-out infinite;
}
@keyframes preloader-slide {
  0% { left: -50%; }
  100% { left: 100%; }
}
.preloader-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.3em; color: #C20500;
  margin-bottom: 16px; text-transform: uppercase;
}

/* ===== ANIMATED GRID BACKGROUND ===== */
.tech-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(194,5,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(194,5,0,0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%);
}
.tech-grid::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(194,5,0,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(194,5,0,0.015) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* ===== GLOW EFFECTS ===== */
.glow-red { box-shadow: 0 0 30px rgba(194,5,0,0.15), inset 0 0 30px rgba(194,5,0,0.03); }
.glow-red-strong { box-shadow: 0 0 60px rgba(194,5,0,0.2), 0 0 120px rgba(194,5,0,0.05); }

/* ===== GLASS PANELS ===== */
.glass {
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
}
.glass-strong {
  background: rgba(10,10,10,0.8);
  backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255,255,255,0.08);
}

/* ===== SCAN LINE ===== */
@keyframes scan-line {
  0% { top: -2px; opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
.scan-line::after {
  content: ''; position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(194,5,0,0.4), transparent);
  animation: scan-line 4s linear infinite;
}

/* ===== BORDER ANIMATION ===== */
@keyframes border-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.animated-border {
  position: relative;
}
.animated-border::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(194,5,0,0.3), rgba(194,5,0,0.5), rgba(194,5,0,0.3), transparent);
  background-size: 300% 100%;
  animation: border-flow 6s ease infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.animated-border:hover::before { opacity: 1; }

/* ===== SERVICE CARDS ===== */
.service-card {
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(194,5,0,0.06), transparent 70%);
  opacity: 0; transition: opacity 0.5s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(194,5,0,0.2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(194,5,0,0.07);
}
.service-card:hover::before { opacity: 1; }
.service-card:hover .card-icon-wrap {
  border-color: rgba(194,5,0,0.5);
  background: rgba(194,5,0,0.08);
  box-shadow: 0 0 20px rgba(194,5,0,0.15);
}
.service-card:hover .card-icon-wrap .iconify { color: #C20500; }
.service-card:hover .card-price-tag {
  background: #C20500; color: #fff;
  box-shadow: 0 0 20px rgba(194,5,0,0.3);
}
.service-card:hover .card-number { color: rgba(194,5,0,0.12); }

/* Card top accent line — brillo recorrente sutil que invita a leer la card */
.card-accent-line {
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(194,5,0,0.32), transparent);
  background-size: 45% 100%;
  animation: accent-shimmer 3.4s ease-in-out infinite;
}
.service-card:hover .card-accent-line {
  background: linear-gradient(90deg, transparent, rgba(194,5,0,0.7), transparent);
  background-size: 45% 100%;
}
@keyframes accent-shimmer {
  0% { background-position: -120% 0; }
  100% { background-position: 220% 0; }
}

/* Respiración sutil del ícono + pulso del número de fondo — llaman la atención sin ser invasivos */
.card-icon-wrap { animation: icon-breathe 3.6s ease-in-out infinite; }
.card-number { animation: number-pulse 4.2s ease-in-out infinite; }
@keyframes icon-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
@keyframes number-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
/* Desfase por tarjeta para que el brillo "recorra" la fila en vez de parpadear todas juntas */
.service-card:nth-child(1) .card-accent-line, .service-card:nth-child(1) .card-icon-wrap, .service-card:nth-child(1) .card-number { animation-delay: 0s; }
.service-card:nth-child(2) .card-accent-line, .service-card:nth-child(2) .card-icon-wrap, .service-card:nth-child(2) .card-number { animation-delay: 0.35s; }
.service-card:nth-child(3) .card-accent-line, .service-card:nth-child(3) .card-icon-wrap, .service-card:nth-child(3) .card-number { animation-delay: 0.7s; }
.service-card:nth-child(4) .card-accent-line, .service-card:nth-child(4) .card-icon-wrap, .service-card:nth-child(4) .card-number { animation-delay: 1.05s; }
.service-card:nth-child(5) .card-accent-line, .service-card:nth-child(5) .card-icon-wrap, .service-card:nth-child(5) .card-number { animation-delay: 1.4s; }
.service-card:nth-child(6) .card-accent-line, .service-card:nth-child(6) .card-icon-wrap, .service-card:nth-child(6) .card-number { animation-delay: 1.75s; }

/* ===== DATA READOUT STYLE ===== */
.data-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: 0.25em; font-weight: 700;
  text-transform: uppercase; color: rgba(194,5,0,0.5);
}
.data-value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; color: #C20500;
}

/* ===== TRUST CARD ===== */
.trust-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  transition: all 0.4s ease;
  position: relative;
}
.trust-card:hover {
  border-color: rgba(194,5,0,0.15);
  background: rgba(194,5,0,0.03);
}
.trust-card:hover .trust-icon {
  border-color: rgba(194,5,0,0.4);
  box-shadow: 0 0 15px rgba(194,5,0,0.1);
}

/* ===== REVIEW CARD ===== */
.review-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  transition: all 0.4s ease;
}
.review-card:hover {
  border-color: rgba(194,5,0,0.15);
  background: rgba(194,5,0,0.03);
}

/* ===== INSTAGRAM PANELS ===== */
.ig-panel { overflow: hidden; transition: border-color 0.4s ease; }
.ig-panel:hover { border-color: rgba(194,5,0,0.2); }
.ig-panel-header { background: rgba(255,255,255,0.02); border-bottom: 1px solid rgba(255,255,255,0.05); }
.ig-cta { background: rgba(255,255,255,0.015); transition: background 0.3s ease; }
.ig-cta:hover { background: rgba(217,70,239,0.04); }

.ig-embed-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  overflow: hidden;
  max-height: 460px;
  background: #060606;
}
/* El contenido del post (foto, franja "Ver perfil") lo pinta Instagram dentro de su
   propio iframe — no se puede recolorear desde aquí. Se atenúa con un filtro parejo
   y se difumina el borde inferior hacia el negro del sitio para que no resalte tanto. */
.ig-embed-wrap iframe {
  border: none !important;
  filter: brightness(0.72) contrast(1.05) saturate(0.85);
  transition: filter 0.4s ease;
}
.ig-embed-wrap:hover iframe { filter: brightness(0.85) contrast(1.02) saturate(0.95); }
.ig-embed-wrap::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 46px;
  background: linear-gradient(to top, #060606, transparent);
  pointer-events: none;
}
/* Por si el navegador no llega a montar el iframe (ej. abierto como archivo local)
   y queda visible el bloque de reserva de Instagram: se fuerza oscuro también. */
.instagram-media {
  background: #060606 !important;
  border: none !important;
  box-shadow: none !important;
}
.instagram-media a { color: #C20500 !important; }
.instagram-media [style*="3897f0"] { color: #C20500 !important; }
.instagram-media [style*="background-color: #F4F4F4"],
.instagram-media [style*="background-color:#F4F4F4"] { background-color: rgba(255,255,255,0.08) !important; }

/* ===== INDICADOR DE PASOS ===== */
.paso-indicador { display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1; }
.paso-punto {
  width: 44px; height: 44px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
  color: rgba(255,255,255,0.3);
  transition: all 0.3s ease;
}
.paso-linea { flex: 1; height: 1px; background: rgba(255,255,255,0.08); margin: 0 4px; margin-bottom: 24px; }
.paso-indicador--activo .paso-punto {
  background: linear-gradient(135deg, #C20500, #A10400);
  border-color: transparent; color: #fff;
  box-shadow: 0 0 20px rgba(194,5,0,0.35);
  transform: scale(1.08);
}
.paso-indicador--activo span { color: rgba(194,5,0,0.7) !important; }
.paso-indicador--completo .paso-punto {
  border-color: rgba(194,5,0,0.4); color: #C20500; background: rgba(194,5,0,0.06);
}
@media (min-width: 640px) {
  .paso-punto { width: 56px; height: 56px; border-radius: 8px; font-size: 24px; }
  .paso-linea { margin: 0 8px; margin-bottom: 30px; }
}

/* ===== LISTA DE RESERVAS (olvidé mi número) ===== */
.reserva-item { background: rgba(255,255,255,0.015); border: 1px solid rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.reserva-item-header { cursor: pointer; transition: background 0.2s ease; }
.reserva-item-header:hover { background: rgba(194,5,0,0.04); }
.reserva-item-chevron { transition: transform 0.25s ease; }
.reserva-item--abierto .reserva-item-chevron { transform: rotate(180deg); }
.reserva-item-body { border-top: 1px solid rgba(255,255,255,0.06); }

/* ===== CALENDARIO DE RESERVAS ===== */
.calendar-box {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
}
.cal-weekday {
  display: block; text-align: center;
  font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4); padding: 4px 0;
}
.cal-day {
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  border-radius: 3px; border: 1px solid transparent;
  color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.015);
  cursor: pointer;
  transition: all 0.2s ease;
}
.cal-day:hover:not(.cal-day--disabled) {
  border-color: rgba(194,5,0,0.4); color: #fff;
}
.cal-day--disabled {
  color: rgba(255,255,255,0.08);
  cursor: not-allowed;
  text-decoration: line-through;
}
.cal-day--today { border-color: rgba(194,5,0,0.3); color: rgba(194,5,0,0.8); }
.cal-day--selected {
  background: linear-gradient(135deg, #C20500, #A10400);
  color: #fff; border-color: transparent;
  box-shadow: 0 0 16px rgba(194,5,0,0.3);
}
.cal-day--empty { visibility: hidden; }

.horario-slot {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700;
  padding: 8px 14px; border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.2s ease;
}
.horario-slot:hover { border-color: rgba(194,5,0,0.4); color: #fff; }
.horario-slot--selected {
  background: linear-gradient(135deg, #C20500, #A10400);
  color: #fff; border-color: transparent;
  box-shadow: 0 0 16px rgba(194,5,0,0.3);
}

/* ===== GALLERY ===== */
.gallery-item { overflow: hidden; position: relative; cursor: pointer; }
.gallery-item img {
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  filter: grayscale(100%) brightness(0.4) contrast(1.1);
}
.gallery-item:hover img {
  transform: scale(1.05);
  filter: grayscale(0%) brightness(0.9) contrast(1);
}
.gallery-item .g-overlay {
  opacity: 0; transition: all 0.4s ease;
  background: linear-gradient(to top, rgba(6,6,6,0.9) 0%, rgba(6,6,6,0.3) 50%, transparent 100%);
}
.gallery-item:hover .g-overlay { opacity: 1; }
.gallery-item::after {
  content: ''; position: absolute; inset: 0;
  border: 1px solid rgba(194,5,0,0); transition: border-color 0.4s ease;
  pointer-events: none;
}
.gallery-item:hover::after { border-color: rgba(194,5,0,0.3); }

/* ===== REVEAL ANIMATIONS ===== */
.reveal { opacity: 0; transform: translateY(20px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-24px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-left.active { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(24px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-right.active { opacity: 1; transform: translateX(0); }

/* ===== HERO ===== */
.hero-bg { background-attachment: fixed; background-size: cover; background-position: center; }
@media (max-width: 768px) { .hero-bg { background-attachment: scroll; } }

/* Hero diagonal speed lines */
.speed-line-1, .speed-line-2, .speed-line-3 {
  position: absolute; height: 1px; transform: skewY(-1.5deg); pointer-events: none;
}
.speed-line-1 {
  top: 35%; left: 0; width: 40%;
  background: linear-gradient(90deg, rgba(194,5,0,0.15), transparent);
}
.speed-line-2 {
  top: 50%; right: 0; width: 30%;
  background: linear-gradient(270deg, rgba(194,5,0,0.1), transparent);
}
.speed-line-3 {
  top: 65%; left: 10%; width: 25%;
  background: linear-gradient(90deg, rgba(194,5,0,0.08), transparent);
}

/* ===== CTA BUTTON ===== */
.btn-race {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #C20500, #A10400);
  color: #fff; transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(194,5,0,0.2);
}
.btn-race::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.5s ease;
}
.btn-race:hover::after { left: 100%; }
.btn-race:hover {
  box-shadow: 0 8px 40px rgba(194,5,0,0.35);
  transform: translateY(-1px);
}

.btn-ghost {
  border: 1px solid rgba(255,255,255,0.1);
  color: #999; transition: all 0.3s ease;
}
.btn-ghost:hover {
  border-color: rgba(194,5,0,0.4);
  color: #C20500;
  box-shadow: 0 0 20px rgba(194,5,0,0.08);
}

/* ===== NAV ===== */
.nav-scrolled {
  background: rgba(6,6,6,0.9) !important;
  backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(194,5,0,0.1) !important;
}

/* ===== MOBILE MENU ===== */
.mobile-menu { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.mobile-menu.open { max-height: 400px; }

/* ===== WHATSAPP ===== */
@keyframes wa-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.35); }
  70% { box-shadow: 0 0 0 12px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}
.wa-pulse { animation: wa-pulse 2.5s infinite; }

/* ===== FLOATING PARTICLES ===== */
@keyframes float-particle {
  0%, 100% { transform: translateY(0px) translateX(0px); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100vh) translateX(20px); opacity: 0; }
}
.particle {
  position: fixed; width: 1px; height: 1px;
  background: #C20500; border-radius: 50%;
  pointer-events: none; z-index: 1;
}

/* ===== SECTION DIVIDER ===== */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(194,5,0,0.2), transparent);
}

/* ===== LOGO ===== */
.logo-tbr { color: #C0C0C0; font-weight: 900; letter-spacing: 0.1em; }
.logo-aut { color: #C20500; font-weight: 700; letter-spacing: 0.3em; font-size: 0.55em; }

/* ===== TYPING CURSOR ===== */
@keyframes blink-cursor {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
.cursor-blink::after {
  content: '|'; color: #C20500; font-weight: 300;
  animation: blink-cursor 1s step-end infinite; margin-left: 2px;
}

/* ===== COUNTER ===== */
.counter { font-family: 'JetBrains Mono', monospace; }

/* ===== NOISE TEXTURE OVERLAY ===== */
.noise::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== QUOTE MARK ===== */
.quote-red {
  font-family: Georgia, serif; font-size: 90px; line-height: 1;
  color: rgba(194,5,0,0.08); position: absolute;
  top: -10px; left: -5px; user-select: none;
}

/* Corner tech detail */
.corner-tech::after {
  content: ''; position: absolute; bottom: 0; right: 0;
  width: 40px; height: 40px;
  border-bottom: 1px solid rgba(194,5,0,0.15);
  border-right: 1px solid rgba(194,5,0,0.15);
}
.corner-tech::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 40px; height: 40px;
  border-top: 1px solid rgba(194,5,0,0.08);
  border-left: 1px solid rgba(194,5,0,0.08);
}

/* Map filter */
.map-dark { filter: grayscale(100%) invert(93%) contrast(85%) brightness(70%); }

/* Red dot indicator */
@keyframes ping-dot {
  75%, 100% { transform: scale(2.5); opacity: 0; }
}
.ping-dot::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: #C20500; animation: ping-dot 2s cubic-bezier(0,0,0.2,1) infinite;
}

/* ===== CHECKLIST DE REQUISITOS DE CONTRASEÑA (OWASP) ===== */
.req-list { display: flex; flex-direction: column; gap: 8px; }
.req-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 400; color: rgba(255,255,255,0.4);
  transition: color 0.25s ease;
}
.req-item .iconify { font-size: 15px; color: rgba(255,255,255,0.18); transition: color 0.25s ease; flex-shrink: 0; }
.req-item--ok { color: rgba(255,255,255,0.85); }
.req-item--ok .iconify { color: #22C55E; }

/* ===== BADGE DE ESTADO (vehículos en taller) ===== */
.badge-estado {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.15em; font-weight: 700;
  text-transform: uppercase;
  padding: 6px 12px; border-radius: 4px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-estado .iconify { font-size: 13px; }
.badge-estado--recepcionado { color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); }
.badge-estado--ejecutando-servicio { color: #C20500; background: rgba(194,5,0,0.1); border-color: rgba(194,5,0,0.3); }
.badge-estado--ejecutando-pruebas { color: #22D3EE; background: rgba(34,211,238,0.1); border-color: rgba(34,211,238,0.3); }
.badge-estado--espera-repuesto { color: #F59E0B; background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.3); }
.badge-estado--correcciones { color: #F97316; background: rgba(249,115,22,0.1); border-color: rgba(249,115,22,0.3); }
.badge-estado--listo { color: #22C55E; background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.3); }
