/* ==========================================================================
   CS Gadol — estilos base
   Look oscuro y premium para audio para coche.
   Tailwind hace el grueso; aquí van fuentes, tokens y componentes a medida.
   ========================================================================== */

:root {
  --bg:        #0a0a0c;
  --bg-2:      #111114;
  --surface:   #16161b;
  --surface-2: #1d1d23;
  --line:      #2a2a31;
  --text:      #f4f4f6;
  --muted:     #9a9aa4;
  --red:       #e3001b; /* rojo italiano / STEG */
  --red-dark:  #b80016;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Titulares condensados, estilo automoción */
.font-display { font-family: 'Oswald', 'Inter', sans-serif; letter-spacing: .01em; }

/* Scrollbar discreto */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2f2f37; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #3c3c45; }

/* Header: transparente sobre el hero, con fondo al hacer scroll */
[data-header] {
  transition: background-color .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  background-color: transparent;
  border-bottom: 1px solid transparent;
}
[data-header].is-scrolled {
  background-color: rgba(10,10,12,.85);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}

/* Enlaces de navegación con subrayado animado */
.nav-link {
  position: relative;
  color: var(--text);
  transition: color .2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--red);
  transition: width .25s ease;
}
.nav-link:hover { color: #fff; }
.nav-link:hover::after { width: 100%; }

/* Tarjeta de marca con overlay */
.brand-tile {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.brand-tile img {
  transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .4s ease;
}
.brand-tile:hover img { transform: scale(1.06); }
.brand-tile::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,12,0) 35%, rgba(10,10,12,.85) 100%);
  pointer-events: none;
}
.brand-tile .brand-tile__cta {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 1.25rem 1.5rem;
}

/* Tarjeta de producto */
.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .75rem;
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: #3a3a44;
  box-shadow: 0 18px 40px -20px rgba(0,0,0,.8);
}

/* Botón primario */
.btn-red {
  background: var(--red);
  color: #fff;
  transition: background .2s ease, transform .15s ease;
}
.btn-red:hover { background: var(--red-dark); }
.btn-red:active { transform: scale(.98); }

/* Botón secundario (outline) */
.btn-ghost {
  border: 1px solid #3a3a44;
  color: var(--text);
  transition: border-color .2s ease, background .2s ease;
}
.btn-ghost:hover { border-color: var(--red); background: rgba(227,0,27,.08); }

/* Línea/eyebrow roja antes de los titulares */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .75rem;
  font-weight: 600;
}
.eyebrow::before {
  content: ''; width: 28px; height: 2px; background: var(--red);
}

/* Hero overlay */
.hero-overlay {
  background:
    linear-gradient(90deg, rgba(10,10,12,.92) 0%, rgba(10,10,12,.6) 45%, rgba(10,10,12,.25) 100%),
    linear-gradient(0deg, rgba(10,10,12,.9) 0%, rgba(10,10,12,0) 40%);
}

/* Aparición al hacer scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* Pin del mapa de distribuidores */
.map-pin {
  cursor: pointer;
  transition: transform .2s ease, fill .2s ease;
  transform-origin: center bottom;
}
.map-pin:hover, .map-pin.active { transform: scale(1.35); }

.distri-item.active {
  border-color: var(--red);
  background: var(--surface-2);
}
