/* ===================================================================
   IVEST AUTO SL — Estilos
   Identidad: negro + blanco + rojo (basado en el logo)
   =================================================================== */

:root {
  --bg:      #0A0A0C;
  --bg-2:    #0F1013;
  --surface: #15161A;
  --surface-2:#1B1D22;
  --line:    rgba(255,255,255,.09);
  --line-2:  rgba(255,255,255,.16);

  --text:    #F4F4F5;
  --muted:   #9B9DA5;
  --dim:     #6C6E76;

  --red:     #C8102E;   /* rojo del logo */
  --red-2:   #E11d36;
  --red-d:   #9E0C24;

  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1200px;

  --shadow: 0 24px 60px -28px rgba(0,0,0,.8);
  --glow:   0 0 0 1px rgba(200,16,46,.35), 0 14px 40px -12px rgba(200,16,46,.45);

  --ease: cubic-bezier(.16,.84,.44,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
.hide { display: none !important; }

h1, h2, h3 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase; letter-spacing: .18em;
  font-size: .72rem; font-weight: 600; color: var(--muted);
  margin-bottom: 18px;
}
.eyebrow-line { width: 30px; height: 1.5px; background: var(--red); display: inline-block; }

.section-sub { color: var(--muted); font-size: 1.06rem; max-width: 54ch; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600; font-size: .94rem;
  padding: 13px 26px; border-radius: 8px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), color .2s, border-color .25s, box-shadow .3s;
}
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-2); transform: translateY(-2px); box-shadow: var(--glow); }

.btn-outline { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-outline:hover { border-color: #fff; transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(10,10,12,.55);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.site-header.scrolled { background: rgba(10,10,12,.9); border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }

.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 56px; width: auto; display: block; }
.brand-logo-lg { height: 88px; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav a { font-size: .94rem; color: var(--muted); transition: color .2s; position: relative; }
.nav a:not(.btn):hover { color: var(--text); }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: -7px; height: 1.5px; width: 0; background: var(--red); transition: width .25s var(--ease); }
.nav a:not(.btn):hover::after { width: 100%; }
.nav-cta { padding: 10px 20px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; z-index: 70; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); transition: transform .3s var(--ease), opacity .2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero / Banner ---------- */
.hero {
  position: relative; min-height: 92vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px 0 40px; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; background: #0A0A0C; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.hero-bg.img-fail { background:
  radial-gradient(900px 500px at 75% 20%, rgba(200,16,46,.22), transparent 60%),
  linear-gradient(120deg, #0A0A0C, #18181d); }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(10,10,12,.96) 0%, rgba(10,10,12,.78) 42%, rgba(10,10,12,.35) 100%),
    linear-gradient(0deg, var(--bg) 2%, transparent 35%),
    radial-gradient(700px 380px at 78% 26%, rgba(200,16,46,.25), transparent 65%);
}
.hero-content { position: relative; z-index: 2; max-width: 760px; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); font-weight: 700; margin-bottom: 22px; }
.hero h1 em { font-style: normal; color: var(--red-2); }
.hero .lead { color: #cfd0d6; font-size: 1.16rem; max-width: 50ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }

.hero-stats {
  position: relative; z-index: 2;
  display: flex; gap: 48px; flex-wrap: wrap;
  margin-top: clamp(40px, 7vw, 80px);
  padding-top: 28px; border-top: 1px solid var(--line);
}
.hero-stats dt { font-family: "Space Grotesk", sans-serif; font-size: 2.1rem; font-weight: 700; letter-spacing: -.03em; }
.hero-stats dd { color: var(--muted); font-size: .85rem; margin-top: 2px; }

/* ---------- Marquee ---------- */
.marquee { border-bottom: 1px solid var(--line); padding: 20px 0; overflow: hidden; background: var(--bg-2); }
.marquee-track { display: flex; align-items: center; gap: 40px; width: max-content; animation: scroll-x 34s linear infinite; }
.marquee span { font-family: "Space Grotesk", sans-serif; font-weight: 500; letter-spacing: .14em; color: var(--dim); font-size: 1rem; }
.marquee .sep { color: var(--red); font-size: .6rem; }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section-alt { background: var(--bg-2); }
.section-feature { background:
  radial-gradient(800px 500px at 90% 0%, rgba(200,16,46,.12), transparent 60%), var(--bg-2);
}

.section-head { max-width: 660px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(2rem, 3.8vw, 3rem); margin-bottom: 16px; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: none; flex-wrap: wrap; }

/* ---------- Cards servicios ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 30px; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  position: relative; overflow: hidden;
}
.card::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--red); transition: width .35s var(--ease); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card:hover::before { width: 100%; }
.card-num { font-family: "Space Grotesk", sans-serif; font-size: .82rem; color: var(--red-2); font-weight: 700; letter-spacing: .1em; }
.card h3 { font-size: 1.45rem; margin: 16px 0 12px; }
.card p { color: var(--muted); font-size: .97rem; }
.card-featured { background: linear-gradient(180deg, #1d1418, var(--surface)); border-color: rgba(200,16,46,.35); }
.card-featured::before { width: 100%; }

.ticks { margin-top: 22px; display: grid; gap: 11px; }
.ticks li { position: relative; padding-left: 28px; font-size: .92rem; color: #c6c7cd; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 13px; height: 7px; border-left: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(-45deg); }

/* ---------- Inventario ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter {
  font-family: "Space Grotesk", sans-serif; font-size: .88rem; font-weight: 500;
  padding: 9px 18px; border-radius: 100px; cursor: pointer;
  background: transparent; border: 1px solid var(--line-2); color: var(--muted);
  transition: all .2s var(--ease);
}
.filter:hover { border-color: #fff; color: var(--text); }
.filter.is-active { background: var(--red); color: #fff; border-color: var(--red); }

.grid-cars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.car {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s, opacity .3s;
}
.car:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--line-2); }
.car-media { position: relative; aspect-ratio: 16/11; overflow: hidden; background: linear-gradient(135deg, #1a1b20, #101116); }
.car-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.car:hover .car-media img { transform: scale(1.06); }
.car-media.img-fail::after { content: "IVEST AUTO"; position: absolute; inset: 0; display: grid; place-items: center; font-family: "Space Grotesk", sans-serif; font-weight: 700; color: var(--dim); letter-spacing: .12em; }
.car-tag { position: absolute; top: 12px; left: 12px; background: rgba(200,16,46,.92); color: #fff; font-size: .7rem; font-weight: 600; padding: 5px 12px; border-radius: 100px; text-transform: uppercase; letter-spacing: .06em; }
.car-body { padding: 22px 24px 24px; }
.car-body h3 { font-size: 1.2rem; }
.car-spec { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: .82rem; margin: 10px 0 18px; }
.car-foot { display: flex; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 16px; }
.car-price { font-family: "Space Grotesk", sans-serif; font-size: 1.35rem; font-weight: 700; }
.car-link { font-size: .85rem; color: var(--red-2); font-weight: 600; transition: gap .2s; }
.car.hide { display: none; }

/* ---------- Importación / pasos ---------- */
.import-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: start; }
.import-intro h2 { font-size: clamp(2rem, 3.8vw, 3rem); margin: 6px 0 18px; }
.import-intro .btn { margin-top: 28px; }

.steps { display: grid; gap: 16px; }
.steps li {
  display: flex; gap: 22px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; transition: transform .3s var(--ease), border-color .3s;
}
.steps li:hover { transform: translateX(8px); border-color: rgba(200,16,46,.4); }
.step-n { flex: none; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-family: "Space Grotesk", sans-serif; font-weight: 700; background: var(--red); color: #fff; }
.steps h3 { font-size: 1.18rem; margin-bottom: 4px; }
.steps p { color: var(--muted); font-size: .94rem; }

/* ---------- Nosotros ---------- */
.nosotros-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.nosotros-grid h2 { font-size: clamp(2rem, 3.8vw, 3rem); margin: 6px 0 18px; }
.values { display: grid; gap: 18px; margin-top: 32px; }
.values div { display: flex; flex-direction: column; gap: 2px; padding-left: 18px; border-left: 2px solid var(--red); }
.values strong { font-family: "Space Grotesk", sans-serif; font-weight: 600; }
.values span { color: var(--muted); font-size: .92rem; }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 26px; }
.kpi-n { display: block; font-family: "Space Grotesk", sans-serif; font-size: 3rem; font-weight: 700; letter-spacing: -.03em; color: #fff; }
.kpi-l { color: var(--muted); font-size: .85rem; }

/* ---------- CTA banda ---------- */
.cta-band { background: linear-gradient(120deg, var(--red-d), var(--red)); }
.cta-inner { text-align: center; padding: clamp(56px, 8vw, 90px) 0; }
.cta-band h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); margin: 14px auto 30px; max-width: 50ch; }
.cta-band .btn-red { background: #0A0A0C; }
.cta-band .btn-red:hover { background: #000; box-shadow: 0 14px 40px -12px rgba(0,0,0,.6); }

/* ---------- Opiniones / Testimonios ---------- */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; display: flex; flex-direction: column; gap: 14px; transition: transform .3s var(--ease), border-color .3s; }
.tcard:hover { transform: translateY(-5px); border-color: var(--line-2); }
.stars { color: #F5B301; font-size: 1rem; letter-spacing: 2px; }
.tcard blockquote { color: #d7d8dd; font-size: .98rem; line-height: 1.6; }
.tcard figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; }
.t-name { font-family: "Space Grotesk", sans-serif; font-weight: 600; }
.t-meta { color: var(--muted); font-size: .82rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--surface); overflow: hidden; transition: border-color .3s; }
.faq details[open] { border-color: var(--line-2); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 24px; font-family: "Space Grotesk", sans-serif; font-weight: 500; font-size: 1.05rem; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--red-2); font-size: 1.5rem; line-height: 1; flex: none; transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--red-2); }
.faq-body { padding: 0 24px 22px; }
.faq-body p { color: var(--muted); font-size: .97rem; }

/* ---------- Contacto ---------- */
.contacto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contacto-grid h2 { font-size: clamp(2rem, 3.8vw, 3rem); margin: 6px 0 18px; }
.contact-list { margin-top: 32px; display: grid; gap: 16px; }
.contact-list li { display: flex; gap: 16px; align-items: baseline; border-top: 1px solid var(--line); padding-top: 16px; }
.contact-list a:hover { color: var(--red-2); }
.c-label { font-family: "Space Grotesk", sans-serif; font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); width: 84px; flex: none; }

.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { font-family: "Space Grotesk", sans-serif; font-size: .85rem; font-weight: 500; }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: .95rem; color: var(--text);
  padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--bg-2); transition: border-color .2s, box-shadow .2s; resize: vertical;
}
.field select option { background: var(--surface); }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(200,16,46,.18);
}
.field input.invalid, .field textarea.invalid { border-color: var(--red-2); box-shadow: 0 0 0 3px rgba(225,29,54,.16); }
.error { color: #ff6b78; font-size: .8rem; min-height: 1em; }
.form-ok { margin-top: 16px; color: #4ade80; font-weight: 500; text-align: center; }

/* ---------- Footer ---------- */
.site-footer { background: #060608; border-top: 1px solid var(--line); padding-top: 64px; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 44px; border-bottom: 1px solid var(--line); }
.footer-brand .brand-logo-lg { margin-left: -2px; }
.footer-brand p { color: var(--muted); margin-top: 14px; max-width: 34ch; font-size: .92rem; }
.social { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--muted); font-family: "Space Grotesk", sans-serif; font-size: .9rem; transition: color .2s; }
.social:hover { color: var(--red-2); }
.social svg { width: 20px; height: 20px; }
.footer-nav { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; }
.footer-nav a { color: var(--muted); font-size: .92rem; transition: color .2s; }
.footer-nav a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px 0 32px; color: var(--dim); font-size: .82rem; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .import-grid, .nosotros-grid, .contacto-grid { grid-template-columns: 1fr; }
  .cards-3, .grid-cars, .testimonials { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav {
    position: fixed; inset: 76px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(10,10,12,.98); border-bottom: 1px solid var(--line);
    padding: 10px 24px 24px; box-shadow: var(--shadow);
    transform: translateY(-120%); transition: transform .35s var(--ease); visibility: hidden;
  }
  .nav.open { transform: translateY(0); visibility: visible; }
  .nav a { padding: 15px 0; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav-cta { margin-top: 12px; text-align: center; border-bottom: 0 !important; }
  .nav-toggle { display: flex; }

  .cards-3, .grid-cars, .testimonials { grid-template-columns: 1fr; }
  .hero-stats { gap: 28px; }
  .hero-stats dt { font-size: 1.7rem; }
  .section-head-row { align-items: flex-start; }
}

/* ===================================================================
   Refinamientos (skill ui-ux-pro-max): tipografía display + accesibilidad
   =================================================================== */

/* Titulares con Bebas Neue — impacto deportivo/automotriz */
h1, h2 {
  font-family: "Bebas Neue", "Space Grotesk", sans-serif;
  font-weight: 400;
  line-height: .92;
  letter-spacing: .01em;
}
.hero h1 { font-size: clamp(3.4rem, 8.5vw, 6.6rem); font-weight: 400; margin-bottom: 20px; }
.section-head h2,
.import-intro h2,
.nosotros-grid h2,
.contacto-grid h2 { font-size: clamp(2.8rem, 5.2vw, 4.2rem); }
.cta-band h2 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); }

/* Números grandes en Bebas — estética de marcador */
.hero-stats dt,
.kpi-n,
.car-price { font-family: "Bebas Neue", "Space Grotesk", sans-serif; font-weight: 400; letter-spacing: .02em; }
.hero-stats dt { font-size: clamp(2.6rem, 4vw, 3.2rem); }
.kpi-n { font-size: 3.8rem; }
.car-price { font-size: 1.8rem; }

/* Skip link — navegación por teclado */
.skip-link {
  position: fixed; top: 10px; left: 50%; transform: translate(-50%, -200%);
  z-index: 100; background: var(--red); color: #fff;
  padding: 12px 22px; border-radius: 8px;
  font-family: "Space Grotesk", sans-serif; font-weight: 600;
  transition: transform .25s var(--ease);
}
.skip-link:focus { transform: translateX(-50%); outline: none; }

/* Focus visible en todos los elementos interactivos */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.filter:focus-visible,
.nav-toggle:focus-visible,
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--red-2);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Iconos de las tarjetas de servicio (SVG en vez de caracteres) */
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.card-icon {
  display: inline-flex; width: 48px; height: 48px; border-radius: 12px;
  align-items: center; justify-content: center;
  background: rgba(200,16,46,.12); color: var(--red-2);
  border: 1px solid rgba(200,16,46,.25);
}
.card-icon svg { width: 24px; height: 24px; }
.card-featured .card-icon { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.18); }
.card h3 { margin-top: 0; }

/* Botón de menú: touch target ≥ 44px */
.nav-toggle { width: 44px; height: 44px; align-items: center; justify-content: center; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
