/* =============================================================
   TECNOVENTANAS — styles.css
   Estilos que Tailwind no puede resolver directamente:
   cursor custom, animaciones complejas, comparison slider,
   scroll indicator, nav scroll behavior, focus styles globales.
   ============================================================= */

/* ----- Variables CSS — Brand Tecnoventanas ----- */
:root {
  --cream:         #FAF8F4;
  --ink:           #0A0A0A;
  --midnight:      #1D649F;  /* Azul brand oficial Tecnoventanas */
  --midnight-lt:   #164D7A;  /* Azul brand oscuro — hover/profundidad */
  --midnight-deep: #0F3556;  /* Azul brand muy profundo — fondos editoriales */
  --gray-arch:     #3A3A3A;
  --gray-mid:      #6B6B6B;
  --gray-brand:    #C4C4C4;  /* Gris secundario brand */

  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:   cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================================
   RESET / BASE
   ============================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* altura del nav fijo */
  -webkit-text-size-adjust: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Inter feature settings premium: alt-1 (cv11), curves (ss03), tnum off por defecto */
  font-feature-settings: "cv11", "ss03", "ss01", "cv01";
  /* Better default line-height */
  line-height: 1.55;
}

/* =============================================================
   TIPOGRAFÍA — Refinamiento profesional
   Fraunces (display serif) + Inter (sans) + Mono (specs técnicas)
   ============================================================= */

/* Fraunces display: opsz=144 (cuts más finos a tamaños grandes) + tracking tight */
.font-serif,
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.022em;
  line-height: 1.05;
}

/* Sub-headings y h3/h4 — menos opsz para legibilidad a tamaño medio */
h3, h4 {
  font-variation-settings: "opsz" 80;
  letter-spacing: -0.012em;
  line-height: 1.18;
}

/* Hero title — display extremo, máximo opsz */
.hero-title {
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.028em;
  line-height: 0.96;
}

/* Cuerpo Inter — line-height óptimo, line-length controlada */
p, li, dd, dt {
  font-family: var(--font-sans);
}
p {
  line-height: 1.62;
  max-width: 70ch; /* line-length óptima para lectura */
}
/* Override max-width donde se necesite full bleed */
.hero-sub, .htc-model, .hts-model, .hts-specs, .max-w-md, .max-w-lg, .max-w-xl, [class*="max-w-"] p {
  max-width: none;
}

/* Specs y tablas: tabular-nums (números alineados verticalmente) */
.hts-specs,
.hts-specs strong,
table td,
table th,
.counter-value,
[class*="text-["][class*="font-serif"],
.font-mono,
#htc-dim, #htc-rw, #htc-uw {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum", "lnum";
}

/* Monospace strip técnica: ligatures + alt zero */
.hero-tech-strip,
.htc-led-group,
.hts-led-group,
.hts-state {
  font-feature-settings: "tnum", "ss01", "ss02", "calt", "zero";
}

/* Labels uppercase: tracking refinado (Inter responde bien a 0.18-0.22em) */
[class*="tracking-[0.2em]"],
[class*="tracking-[0.25em]"],
.uppercase {
  font-feature-settings: "tnum", "ss01";
}

/* Italics editoriales (Fraunces tiene cursiva exquisita) */
em {
  font-style: italic;
  font-variation-settings: "opsz" 144;
}

/* Strong en cuerpo: peso 600 (no 700) más elegante con Inter */
p strong, li strong {
  font-weight: 600;
  color: var(--ink);
}

/* Small caps para datos técnicos secundarios */
.text-\[10px\].tracking-\[0\.2em\].uppercase,
.text-\[11px\].tracking-\[0\.15em\].uppercase {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.06em; /* small-caps reduce tracking visual, compensar */
}

/* Mejor renderizado en pantalla Retina */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  body {
    -webkit-font-smoothing: subpixel-antialiased;
  }
}

/* Respetar reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =============================================================
   AUDITORÍA UX/UI — fixes críticos (v44)
   ============================================================= */

/* CRÍTICO 1 · Focus rings globales (a11y WCAG 2.1 AA) */
*:focus {
  outline: none;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--midnight);
  outline-offset: 3px;
  border-radius: 4px;
  transition: outline-offset 0.15s ease;
}
/* Focus específico para inputs de formulario */
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--midnight);
  outline-offset: 0;
  border-color: var(--midnight);
  box-shadow: 0 0 0 3px rgba(29, 100, 159, 0.15);
}

/* CRÍTICO 2 · Touch target mínimo 44×44 en finish-dots (mobile) */
.finish-dot {
  position: relative;
  /* Pseudo-element invisible que extiende el área tap a 44x44 */
}
.finish-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  /* Invisible — solo extiende el hit area */
}

/* CRÍTICO 3 · Contraste sobre fondos oscuros */
.bg-ink .text-cream\/40,
.bg-midnight-deep .text-cream\/40 {
  color: rgba(250, 248, 244, 0.62) !important; /* sube de 40% a 62% → ~4.6:1 */
}
.bg-ink .text-cream\/50,
.bg-midnight-deep .text-cream\/50 {
  color: rgba(250, 248, 244, 0.68) !important;
}

/* ALTO IMPACTO · Microinteracciones cinemáticas premium */
.project-card,
.hero-model-card,
.demo-card,
.sistema-card,
.perfil-card,
button:not(.finish-dot):not(.hvc-btn):not(.hero-hotspot) {
  transition-timing-function: var(--ease-out-expo);
  transition-duration: 350ms;
}
.project-card:hover img,
.hero-model-card:hover {
  transition-duration: 500ms;
}

/* Cards con borde 1px ultra-sutil para definición premium */
.project-card,
.sistema-card,
.demo-card {
  border: 1px solid rgba(15, 53, 86, 0.05);
}
.sistema-card:hover,
.demo-card:hover {
  border-color: rgba(29, 100, 159, 0.15);
}

/* ============================================================
   SECTION DIVIDERS EDITORIALES (audit alto impacto #11)
   ============================================================ */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 auto 48px;
  max-width: 720px;
  padding: 0 24px;
}
.section-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 53, 86, 0.18) 50%, transparent);
}
.section-divider-label {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray-mid);
  white-space: nowrap;
}

/* Animaciones del project-card image más cinemáticas */
.project-card img {
  transition: transform 700ms var(--ease-out-expo);
}

/* Prevenir CLS en project images con aspect-ratio explícito */
.project-card .aspect-\[4\/3\],
[class*="aspect-"] img {
  background: linear-gradient(135deg, #F5F4F0, #E8E7E2);
}

/* Elimina tap-highlight en móvil */
a,
button,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

/* =============================================================
   CURSOR CUSTOM (solo desktop)
   ============================================================= */

@media (pointer: fine) {
  body {
    cursor: none;
  }

  a,
  button,
  [role="button"],
  input,
  textarea,
  label,
  .comparison-slider {
    cursor: none;
  }
}

/* El cursor se inyecta y posiciona desde script.js */
#cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  background: var(--midnight);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease-out-expo),
              height 0.25s var(--ease-out-expo),
              background 0.2s ease,
              opacity 0.2s ease;
  will-change: transform;
}

#cursor.cursor--hover {
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1.5px solid var(--midnight);
  mix-blend-mode: multiply;
}

#cursor.cursor--drag {
  width: 56px;
  height: 56px;
  background: var(--midnight);
  opacity: 0.15;
  border: none;
}

@media (pointer: coarse) {
  #cursor { display: none; }
}

/* =============================================================
   NAVEGACIÓN — comportamiento al scroll
   ============================================================= */

/* Estado inicial: fondo sutil sobre hero cream */
#nav {
  background: rgba(250, 248, 244, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Estado scrolled: fondo sólido con blur */
#nav.nav--scrolled {
  background: rgba(250, 248, 244, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

/* Logo: el isotipo en azul brand, wordmark en ink */
.nav-logo svg {
  color: var(--midnight);
}
.nav-logo:not(svg) {
  color: var(--ink);
}

/* Hamburger → Cruz (estado abierto) */
#menu-btn[aria-expanded="true"] .menu-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
#menu-btn[aria-expanded="true"] .menu-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#menu-btn[aria-expanded="true"] .menu-bar:nth-child(3) {
  width: 24px;
  transform: translateY(-8px) rotate(-45deg);
}

/* =============================================================
   HERO — Visualización técnica PVC
   ============================================================= */

/* Estado inicial del título: líneas ocultas (GSAP las anima) */
.hero-line > span {
  transform: translateY(110%);
  display: block;
  will-change: transform;
}

/* SVG perfil — preparado para animación */
#hero-window-svg {
  will-change: transform;
}

/* Anotaciones empiezan invisibles, GSAP las muestra */
.hero-annotation {
  opacity: 0;
  will-change: opacity, transform;
}

/* Anotación activa (resaltada en el ciclo auto) */
.hero-annotation.is-active circle:first-of-type {
  fill: #1D649F;
  filter: drop-shadow(0 0 6px rgba(29, 100, 159, 0.6));
}

.hero-annotation.is-active circle:nth-of-type(2) {
  animation: pulse-ring 1.4s ease-out infinite;
}

@keyframes pulse-ring {
  0%   { r: 8; opacity: 0.4; }
  100% { r: 22; opacity: 0; }
}

/* Marquee infinito de specs */
.hero-marquee-track {
  animation: marquee 50s linear infinite;
  width: max-content;
}

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

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

/* Punto del cycle dot */
.hero-cycle-dot {
  animation: cycleDot 2s ease-in-out infinite;
}

@keyframes cycleDot {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.4); }
}

/* Pattern grid del fondo */
.hero-grid-bg {
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 80%);
}

/* === Selector de acabado compacto · 13 colores Renolit/Folio FX === */
.finish-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  outline: 1px solid rgba(10, 10, 10, 0.18);
  outline-offset: -1px;
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: transform 0.18s var(--ease-out-expo), outline-color 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
  /* color comes inline via style attribute */
}
.finish-dot:hover {
  transform: scale(1.18);
  outline-color: var(--midnight);
  z-index: 2;
}
.finish-dot.is-active {
  outline: 2px solid var(--midnight);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 4px 12px rgba(29, 100, 159, 0.35);
  transform: scale(1.1);
}
/* Principal: anillo sutil para indicar disponibilidad inmediata */
.finish-dot.is-primary {
  box-shadow: 0 0 0 1.5px rgba(29, 100, 159, 0.55), inset 0 0 0 1px rgba(255,255,255,0.3);
}
.finish-dot.is-primary.is-active {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 4px 12px rgba(29, 100, 159, 0.5);
}
/* Separador entre principales y especiales */
.finish-divider {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: rgba(0,0,0,0.18);
  margin: 0 4px;
}
/* Tooltip al hover */
.finish-dot::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--cream);
  font-size: 10px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  letter-spacing: 0.05em;
}
.finish-dot:hover::after {
  opacity: 1;
}

/* Palette swatch (sección Perfilería · 13 colores grandes) */
.palette-swatch {
  cursor: pointer;
  border: 0;
  transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s var(--ease-out-expo);
  position: relative;
}
.palette-swatch:hover {
  transform: scale(1.05);
  z-index: 2;
}
.palette-swatch.is-active {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  transform: scale(1.05);
}

/* === Product tabs (ventana/mampara/puerta) === */
.hero-product-tab {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(250, 248, 244, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(10, 10, 10, 0.08);
  color: var(--gray-mid);
  cursor: pointer;
  transition: all 0.25s var(--ease-out-expo);
}
.hero-product-tab:hover {
  border-color: rgba(29, 100, 159, 0.4);
  color: var(--midnight);
}
.hero-product-tab.is-active {
  background: var(--midnight);
  color: var(--cream);
  border-color: var(--midnight);
}

/* === Marcas europeas brand pills === */
.brand-pill {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  background: var(--cream);
  border: 1px solid rgba(10, 10, 10, 0.08);
  border-radius: 4px;
  color: var(--gray-arch);
  transition: all 0.2s ease;
}
.brand-pill:hover {
  border-color: rgba(29, 100, 159, 0.3);
  color: var(--midnight);
}

/* =============================================================
   HERO 3D — Canvas + hotspots
   ============================================================= */

#hero-3d-canvas {
  cursor: grab;
}
#hero-3d-canvas:active {
  cursor: grabbing;
}

#hero-3d-canvas canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  outline: none;
}

/* Hotspots — botones absolutamente posicionados sobre el canvas
   v18: dots más grandes (20px) + numerados + labels SIEMPRE visibles para todos los 6 */
.hero-hotspot {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--midnight);
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  font-family: var(--font-sans);
  opacity: 0; /* JS los muestra cuando 3D está listo */
  z-index: 10;
}

.hero-hotspot .hh-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--midnight);
  color: #ffffff;
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-sans);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85),
              0 0 0 4px rgba(29, 100, 159, 0.30),
              0 4px 12px rgba(29, 100, 159, 0.30);
  transition: all 0.3s var(--ease-out-expo);
  line-height: 1;
}

.hero-hotspot .hh-dot::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px solid var(--midnight);
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.4s var(--ease-out-expo);
}

/* Labels: SIEMPRE visibles (opacity 0.85 default) — antes solo en hover */
.hero-hotspot .hh-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(6px);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(29, 100, 159, 0.18);
  white-space: nowrap;
  opacity: 0.85;
  transition: all 0.25s var(--ease-out-expo);
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Estado activo — más prominente */
.hero-hotspot.is-active .hh-dot {
  background: #ffffff;
  color: var(--midnight);
  box-shadow: 0 0 0 3px var(--midnight),
              0 0 0 8px rgba(29, 100, 159, 0.20),
              0 0 24px rgba(29, 100, 159, 0.55);
  transform: scale(1.15);
}
.hero-hotspot.is-active .hh-dot::after {
  animation: hh-ring 1.6s ease-out infinite;
}
.hero-hotspot.is-active .hh-label {
  opacity: 1;
  background: var(--midnight);
  color: var(--cream);
  border-color: var(--midnight);
  font-weight: 700;
}

.hero-hotspot:hover .hh-dot {
  transform: scale(1.2);
}
.hero-hotspot:hover .hh-label {
  opacity: 1;
}

@keyframes hh-ring {
  0%   { opacity: 0.6; transform: scale(0.6); }
  100% { opacity: 0; transform: scale(2.2); }
}

/* Panel de info — esquina superior izquierda del canvas, no tapa el modelo */
#hero-part-info {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.45s var(--ease-out-expo), transform 0.45s var(--ease-out-expo);
}
#hero-part-info.is-visible {
  opacity: 1;
  transform: translateX(0);
}
#hero-part-info .hero-part-marker {
  background: var(--midnight);
  box-shadow: 0 0 0 4px rgba(29, 100, 159, 0.18);
}

/* En móvil: panel debajo del canvas como banner */
@media (max-width: 1023px) {
  #hero-part-info {
    position: relative;
    top: auto;
    left: auto;
    max-width: 100%;
    margin: 16px 12px 0;
    transform: translateY(8px);
  }
  #hero-part-info.is-visible {
    transform: translateY(0);
  }
}

/* =============================================================
   STRIP DE INFO TÉCNICA — debajo del canvas, sutil, no invasiva
   ============================================================= */
.hero-tech-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 12px auto 0;
  padding: 8px 14px;
  max-width: 920px;
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--gray-arch);
  border-top: 1px solid rgba(15, 53, 86, 0.08);
  border-bottom: 1px solid rgba(15, 53, 86, 0.08);
  opacity: 0;
  animation: htc-fade-in 0.6s 0.4s ease-out forwards;
}
.hts-led-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--midnight);
  font-weight: 600;
}
.hts-state {
  font-size: 9.5px;
  letter-spacing: 0.15em;
}
.hts-model {
  font-family: 'Fraunces', serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0;
}
.hts-specs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--gray-arch);
}
.hts-specs strong {
  color: var(--ink);
  font-weight: 600;
}
.hts-sep {
  color: rgba(15, 53, 86, 0.28);
}
@media (max-width: 768px) {
  .hero-tech-strip {
    font-size: 9.5px;
    gap: 10px;
    padding: 7px 10px;
  }
  .hts-model { font-size: 11.5px; }
}

/* =============================================================
   CONSOLA DE CONTROL DE VISTA — botones para dirigir la cámara del render
   ============================================================= */
.hero-view-controls {
  position: absolute;
  top: 36px;
  right: 10px;
  z-index: 22;
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  border: 1px solid rgba(15, 53, 86, 0.12);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transform: translateY(-4px);
  animation: htc-fade-in 0.5s 0.6s ease-out forwards;
}
.hvc-btn {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  color: var(--gray-arch);
  transition: background 0.18s ease, color 0.18s ease;
  padding: 0;
}
.hvc-btn:hover {
  background: rgba(29, 100, 159, 0.08);
  color: var(--midnight);
}
.hvc-btn.is-active {
  background: var(--midnight);
  color: var(--cream);
}
.hvc-btn svg {
  width: 14px;
  height: 14px;
}
@media (max-width: 768px) {
  .hero-view-controls {
    top: 30px;
    right: 6px;
    padding: 3px;
  }
  .hvc-btn {
    width: 22px;
    height: 22px;
  }
  .hvc-btn svg { width: 12px; height: 12px; }
}
@keyframes htc-fade-in {
  to { opacity: 1; transform: translateY(0); }
}
.htc-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 8px;
  margin-bottom: 9px;
  border-bottom: 1px solid rgba(255,255,255,0.09);
}
.htc-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 6px #4ADE80;
  animation: htc-pulse 1.6s ease-in-out infinite;
}
@keyframes htc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.htc-title {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(232, 238, 243, 0.65);
}
.htc-model {
  font-family: 'Fraunces', serif;
  font-size: 12.5px;
  font-weight: 300;
  letter-spacing: 0;
  color: #FFFFFF;
  margin-bottom: 8px;
  line-height: 1.12;
}
.htc-specs {
  display: grid;
  gap: 5px;
  margin: 0 0 10px;
}
.htc-specs > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.htc-specs dt {
  color: rgba(232, 238, 243, 0.5);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.htc-specs dd {
  color: #FFFFFF;
  font-weight: 500;
  text-align: right;
  font-size: 10px;
}
.htc-state {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.09);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: rgba(232, 238, 243, 0.75);
  text-transform: uppercase;
  font-weight: 500;
}
.htc-state-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(232, 238, 243, 0.45);
  transition: background 0.3s ease;
}
.htc-state-dot.is-active {
  background: #60A5FA;
  box-shadow: 0 0 6px #60A5FA;
}
@media (max-width: 768px) {
  .hero-tech-console {
    width: 168px;
    font-size: 8.5px;
    right: 10px;
    bottom: 54px;
    padding: 9px 10px;
  }
  .htc-model { font-size: 11px; }
}

/* =============================================================
   SISTEMA EN ACCIÓN — Demos interactivos
   ============================================================= */

/* Card hover lift */
.demo-card {
  transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-out-expo);
}
.demo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px -20px rgba(14, 27, 44, 0.15);
}

/* === Slider acústico custom === */
.acoustic-range {
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, #1D649F 0%, #1D649F 50%, #E5E5E5 50%, #E5E5E5 100%);
  outline: none;
}
.acoustic-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #1D649F;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(29, 100, 159, 0.4);
  transition: transform 0.2s ease;
}
.acoustic-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
.acoustic-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #1D649F;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(29, 100, 159, 0.4);
}

/* === Animación ondas acústicas === */
#acoustic-waves-ext path {
  animation: wave-pulse 1.4s ease-in-out infinite;
  transform-origin: center;
}
#wave-ext-2 { animation-delay: -0.3s; }
#wave-ext-3 { animation-delay: -0.6s; }

#acoustic-waves-int path {
  animation: wave-pulse-soft 1.6s ease-in-out infinite;
}

@keyframes wave-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
  50%      { opacity: 1; transform: scaleY(1); }
}
@keyframes wave-pulse-soft {
  0%, 100% { opacity: 0.2; transform: scaleY(0.3); }
  50%      { opacity: 0.7; transform: scaleY(0.6); }
}

/* === Toggle térmico === */
.thermal-tab {
  color: var(--gray-mid);
  background: transparent;
}
.thermal-tab.is-active {
  background: var(--midnight);
  color: var(--cream);
  box-shadow: 0 2px 8px rgba(29, 100, 159, 0.3);
}

/* === Indicadores galería estética === */
.aesthetic-dot {
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  border: none;
  padding: 0;
}
.aesthetic-dot.is-active {
  width: 24px !important;
  background: rgba(250, 248, 244, 1) !important;
}

/* =============================================================
   SECCIONES — FADE-UP (base para GSAP)
   ============================================================= */

/* Estado inicial antes de que GSAP anime */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
}

/* GSAP aplica: opacity:1, translateY:0 */

/* =============================================================
   COMPARADOR ANTES / DESPUÉS
   ============================================================= */

.comparison-slider {
  touch-action: none; /* Previene scroll accidental en móvil */
  user-select: none;
  -webkit-user-select: none;
}

/* El clip-path se actualiza desde JS */
.comp-before {
  clip-path: inset(0 50% 0 0);
  transition: none; /* animación fluida en drag, no CSS */
}

.comp-handle {
  will-change: left;
}

.comp-handle-btn {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

/* Ocultar hint tras primer drag */
.comp-hint {
  transition: opacity 0.4s ease;
}
.comparison-slider.dragged .comp-hint {
  opacity: 0;
  pointer-events: none;
}

/* =============================================================
   CALCULADORA — radio buttons custom
   ============================================================= */

/* Cuando el radio está checked, muestra el dot */
.zona-opcion input[type="radio"]:checked ~ span .zona-dot-wrap {
  border-color: var(--midnight);
}
.zona-opcion input[type="radio"]:checked ~ span .zona-dot-wrap .zona-dot {
  transform: scale(1);
}

/* Focus visible en radio */
.zona-opcion input[type="radio"]:focus-visible ~ span {
  outline: 2px solid var(--midnight);
  outline-offset: 2px;
  border-radius: 12px;
}

/* =============================================================
   FORMULARIO — estados de validación
   ============================================================= */

.field-error {
  display: none;
}

input.invalid,
textarea.invalid {
  border-color: #ef4444 !important;
  background-color: #fef2f2;
}

input.valid,
textarea.valid {
  border-color: #22c55e !important;
}

/* =============================================================
   BARRAS DE PROGRESO (comparación técnica)
   ============================================================= */

.barra-progreso {
  transition: width 1.2s var(--ease-out-expo);
  will-change: width;
}

/* =============================================================
   PASO PROGRESS LINES (sección proceso)
   ============================================================= */

.paso-progress {
  transition: width 0.9s var(--ease-out-expo);
  will-change: width;
}

/* =============================================================
   BOTÓN WHATSAPP FLOTANTE
   ============================================================= */

.whatsapp-fab {
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.35);
  will-change: transform;
}

/* Pulso sutil de atención */
@keyframes waPulse {
  0%   { box-shadow: 0 8px 32px rgba(37, 211, 102, 0.35); }
  50%  { box-shadow: 0 8px 48px rgba(37, 211, 102, 0.55); }
  100% { box-shadow: 0 8px 32px rgba(37, 211, 102, 0.35); }
}

.whatsapp-fab {
  animation: waPulse 3s ease-in-out infinite;
}

.whatsapp-fab:hover {
  animation: none;
  box-shadow: 0 12px 40px rgba(37, 211, 102, 0.5);
}

/* =============================================================
   CARDS DE PROBLEMA — hover line izquierda
   ============================================================= */

.problema-card {
  position: relative;
  transition: background-color 0.5s ease;
}

.problema-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--midnight);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease-out-expo);
}

.problema-card:hover::before {
  transform: scaleY(1);
}

/* =============================================================
   TABLA COMPARATIVA — highlight PVC
   ============================================================= */

table thead th:nth-child(2) {
  border-radius: 8px 8px 0 0;
}

/* =============================================================
   BADGES DE CONFIANZA
   ============================================================= */

.confianza-badge {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.confianza-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(14, 27, 44, 0.08);
}

/* =============================================================
   FOCUS VISIBLE GLOBAL — accesibilidad
   ============================================================= */

:focus-visible {
  outline: 2px solid var(--midnight);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Resetear outline por defecto (solo para teclado, via :focus-visible) */
:focus:not(:focus-visible) {
  outline: none;
}

/* =============================================================
   SELECTION COLOR
   ============================================================= */

::selection {
  background: var(--midnight);
  color: var(--cream);
}

/* =============================================================
   SCROLLBAR CUSTOM (Chrome / Edge)
   ============================================================= */

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--cream);
}
::-webkit-scrollbar-thumb {
  background: var(--midnight);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--midnight-lt);
}

/* =============================================================
   UTILIDADES
   ============================================================= */

/* Evita FOUC en imágenes lazy */
img[loading="lazy"] {
  background: #e8e6e2;
}

/* Ocultar visualmente pero mantener accesible */
.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;
}

/* =============================================================
   RESPONSIVE TWEAKS
   ============================================================= */

/* En móvil el cursor custom no aplica; aseguramos pointer normal */
@media (max-width: 1023px) {
  html, body, a, button {
    cursor: auto;
  }
}

/* Tabla overflow en móvil */
@media (max-width: 639px) {
  table {
    font-size: 0.8rem;
  }
  table th,
  table td {
    padding: 12px 10px;
  }
}

/* Ajuste de espaciado en pantallas muy pequeñas (iPhone SE) */
@media (max-width: 375px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* =============================================================
   PRINT — simplificado sin fondo ni animaciones
   ============================================================= */

@media print {
  #nav,
  .whatsapp-fab,
  #cursor {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
}

/* =============================================================
   PREMIUM RETOUCH — showroom tecnico, no portfolio puro
   ============================================================= */

#hero {
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.72) 0%, rgba(250, 248, 244, 0.98) 42%, rgba(241, 244, 244, 0.86) 100%),
    var(--cream);
}

#hero .container {
  max-width: 1380px;
}

.hero-grid-bg {
  opacity: 0.018 !important;
}

.hero-light-plane {
  position: absolute;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.68), rgba(29, 100, 159, 0.08));
  border: 1px solid rgba(29, 100, 159, 0.05);
  transform: skewX(-12deg);
}

.hero-light-plane--main {
  top: 104px;
  right: -12vw;
  width: 48vw;
  height: 64vh;
}

.hero-light-plane--base {
  left: -18vw;
  bottom: 44px;
  width: 42vw;
  height: 28vh;
  opacity: 0.55;
}

.hero-label > span {
  border-radius: 6px !important;
  background: rgba(29, 100, 159, 0.08) !important;
}

.hero-title {
  max-width: 620px;
  font-size: clamp(3rem, 6.2vw, 5.25rem) !important;
  margin-bottom: 1.55rem !important;
}

.hero-sub {
  max-width: 560px !important;
  margin-bottom: 1.55rem !important;
}

.hero-product-list,
.hero-models {
  margin-bottom: 1.55rem !important;
}

.hero-models-label {
  margin-bottom: 9px;
  color: var(--gray-mid);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1;
  text-transform: uppercase;
}

.hero-model-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(10, 10, 10, 0.08);
  border-left: 1px solid rgba(10, 10, 10, 0.08);
  background: rgba(255, 255, 255, 0.34);
}

.hero-product-card,
.hero-model-card {
  min-height: 70px;
  padding: 10px 10px;
  border: 1px solid rgba(10, 10, 10, 0.09);
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink);
  border-radius: 8px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s var(--ease-out-expo);
}

.hero-model-card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border-top: 0;
  border-left: 0;
  border-right-color: rgba(10, 10, 10, 0.08);
  border-bottom-color: rgba(10, 10, 10, 0.08);
  border-radius: 0;
  text-align: left;
}

.hero-product-card:hover,
.hero-model-card:hover {
  border-color: rgba(29, 100, 159, 0.32);
  background: rgba(255, 255, 255, 0.78);
  transform: translateY(-2px);
}

.hero-model-card.is-active {
  background: rgba(29, 100, 159, 0.08);
  border-color: rgba(29, 100, 159, 0.36);
  box-shadow: inset 0 2px 0 var(--midnight);
}

.hero-product-card span,
.hero-product-card small {
  display: block;
}

.hero-model-card svg {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  color: var(--midnight);
  fill: rgba(29, 100, 159, 0.08);
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(2px 2px 0 rgba(29, 100, 159, 0.12));
}

.hero-product-card span {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 8px;
}

.hero-product-card small {
  color: var(--gray-mid);
  font-size: 0.68rem;
  font-weight: 400;
  line-height: 1.35;
}

.hero-model-card span {
  min-width: 0;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.15;
}

.hero-profile-vision {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(10, 10, 10, 0.08);
  background: rgba(255, 255, 255, 0.42);
}

.hero-profile-label {
  flex: 0 0 auto;
  color: var(--gray-mid);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.5;
  text-transform: uppercase;
}

.hero-profile-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.hero-profile-lines span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid rgba(10, 10, 10, 0.08);
  background: rgba(255, 255, 255, 0.72);
  color: var(--gray-mid);
  font-size: 0.68rem;
  line-height: 1.2;
}

.hero-profile-lines strong {
  color: var(--ink);
  font-weight: 600;
  margin-right: 4px;
}

.hero-primary-cta,
.hero-secondary-cta {
  border-radius: 8px !important;
}

.hero-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid rgba(10, 10, 10, 0.08) !important;
  background: rgba(255, 255, 255, 0.45);
  padding: 0 !important;
}

.hero-stats > div {
  min-height: 78px;
  padding: 14px 16px;
  border-right: 1px solid rgba(10, 10, 10, 0.07);
  border-bottom: 1px solid rgba(10, 10, 10, 0.07);
}

.hero-stats > div:nth-child(3n) {
  border-right: 0;
}

.hero-stats > div:nth-last-child(-n + 3) {
  border-bottom: 0;
}

#hero-viz {
  max-width: 860px;
  border: 1px solid rgba(10, 10, 10, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.08));
  box-shadow: 0 36px 90px -60px rgba(10, 10, 10, 0.45);
}

.hero-viz-top,
.hero-viz-bottom {
  padding-left: 14px !important;
  padding-right: 14px !important;
}

.hero-viz-top {
  top: 10px !important;
}

.hero-viz-bottom {
  bottom: 10px !important;
}

.hero-product-tab {
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
}

.hero-product-tab.is-active {
  box-shadow: 0 8px 20px rgba(29, 100, 159, 0.16);
}

#hero-part-info {
  max-width: 190px !important;
  border-radius: 8px !important;
  background: rgba(250, 248, 244, 0.78) !important;
  box-shadow: 0 18px 44px rgba(10, 10, 10, 0.08) !important;
}

.hero-hotspot .hh-label {
  border-radius: 6px;
  opacity: 0.62;
}

.hero-hotspot.is-active .hh-label,
.hero-hotspot:hover .hh-label {
  opacity: 1;
}

.hero-marquee {
  background: var(--ink) !important;
  border-top: 1px solid rgba(250, 248, 244, 0.14) !important;
}

@media (max-width: 1023px) {
  .hero-product-list {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .hero-model-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-product-card,
  .hero-model-card {
    min-height: 0;
    padding: 10px 8px;
  }

  .hero-product-card span {
    font-size: 0.78rem;
  }

  .hero-product-card small {
    font-size: 0.66rem;
  }

  .hero-model-card svg {
    width: 24px;
    height: 24px;
  }

  .hero-model-card span {
    font-size: 0.68rem;
  }

  .hero-profile-vision {
    flex-direction: column;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-stats > div,
  .hero-stats > div:nth-child(3n),
  .hero-stats > div:nth-last-child(-n + 3) {
    border-right: 1px solid rgba(10, 10, 10, 0.07);
    border-bottom: 1px solid rgba(10, 10, 10, 0.07);
  }

  .hero-stats > div:nth-child(2n) {
    border-right: 0;
  }

  .hero-stats > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  #hero-viz {
    margin-top: 12px;
  }
}
