/* =========================================================
   ROIVE Automoción · Hoja de estilos
   Concepto: "orden de reparación" — retícula sobria, blanco y
   carbón, turquesa de marca solo para acciones y detalles.
   Mobile-first: los estilos base son para móvil; las media
   queries amplían a tablet (>=720px) y escritorio (>=1040px).
   ========================================================= */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat.woff") format("woff");
  font-weight: 400 700;
  font-display: swap;
}

/* ---------- 1. Tokens de diseño (colores del kit de marca) ---------- */
:root {
  --ink: #1c1c1a;          /* Carbón: textos y fondos oscuros */
  --steel: #4a4a4c;        /* Gris taller: texto secundario */
  --muted: #6b7271;        /* Texto de apoyo */
  --paper: #ffffff;        /* Fondo principal */
  --mist: #f1f4f4;         /* Fondo alterno con matiz turquesa */
  --line: #dbe2e1;         /* Filetes y bordes */
  --teal: #21a7a1;         /* Turquesa ROIVE: acentos sobre oscuro */
  --teal-deep: #167b76;    /* Turquesa accesible para texto y botones sobre blanco */
  --teal-ink: #0f5754;     /* Hover de botón */
  --plate-blue: #1f3f9a;   /* Banda europea de la matrícula */

  --font: "Montserrat", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: clamp(1.625rem, 1.2rem + 1.6vw, 2.25rem);
  --step-4: clamp(2rem, 1.3rem + 3vw, 3.5rem);

  --wrap: 1180px;
  --gutter: 20px;
  --radius: 4px;
  --section: clamp(64px, 9vw, 120px);
  color-scheme: light;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--mist { background: var(--mist); }
.section--ink { background: var(--ink); color: #e9eceb; }

/* Etiqueta superior de sección (eyebrow) */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--step--1); font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal-deep);
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; }
.section--ink .eyebrow { color: var(--teal); }

.section-head { display: grid; gap: 16px; margin-bottom: clamp(36px, 5vw, 56px); max-width: 720px; }
.section-head h2 { font-size: var(--step-4); }
.section-head p { color: var(--steel); font-size: var(--step-1); max-width: 60ch; }
.section--ink .section-head p { color: #b9c1c0; }

/* ---------- 3. Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  border-radius: var(--radius); border: 1.5px solid transparent;
  font: 600 var(--step-0)/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--teal-deep); color: #fff; }
.btn--primary:hover { background: var(--teal-ink); }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.section--ink .btn--ghost { border-color: #e9eceb; color: #e9eceb; }
.section--ink .btn--ghost:hover { background: #e9eceb; color: var(--ink); }

/* Botón de Instagram */
.ig-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px;
  border: 1.5px solid var(--ink); border-radius: var(--radius); color: var(--ink);
  font-weight: 600; text-decoration: none; transition: background-color .2s, color .2s;
}
.ig-btn svg { width: 20px; height: 20px; flex: none; }
.ig-btn:hover { background: var(--ink); color: var(--paper); }
.ig-btn--dark { border-color: #3a3a36; color: #e9eceb; justify-self: start; }
.ig-btn--dark:hover { background: #e9eceb; color: var(--ink); }
.ig-btn--icon { display: none; width: 44px; min-height: 44px; padding: 0; justify-content: center; border-color: var(--line); color: var(--steel); }
.ig-btn--icon:hover { background: var(--ink); border-color: var(--ink); }
.team__cta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; color: var(--steel); }

.nowrap { white-space: nowrap; }

/* ---------- 4. Cabecera ---------- */
.header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.2) blur(8px);
}
.header__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 32px; height: 36px; }
.brand__word { display: grid; line-height: 1; }
.brand__word b { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.06em; }
.brand__word small { font-size: 0.58rem; font-weight: 600; letter-spacing: 0.42em; color: var(--steel); margin-top: 5px; }

.nav { display: none; }
.nav a { white-space: nowrap; text-decoration: none; font-size: 0.9375rem; font-weight: 500; color: var(--steel); padding: 8px 0; }
.nav a:hover { color: var(--ink); }
.nav .nav__ext { display: inline-flex; align-items: center; gap: 4px; color: var(--teal-deep); font-weight: 600; padding-left: 24px; border-left: 1px solid var(--line); }
.nav .nav__ext:hover { color: var(--teal-ink); }
.footer li a svg { vertical-align: -2px; margin-left: 2px; }
.header__sister { display: none; align-items: center; gap: 4px; color: var(--teal); text-decoration: none; padding-left: 20px; border-left: 1px solid var(--line); margin-right: auto; transition: opacity .2s; }
.header__sister img { height: 30px; width: auto; }
.header__sister svg { width: 14px; height: 14px; align-self: flex-start; }
.header__sister:hover { opacity: .75; }
@media (min-width: 480px) { .header__sister { display: inline-flex; } }
@media (min-width: 1040px) { .header__sister { margin-right: 0; } }
.header__actions { display: flex; align-items: center; gap: 20px; }
.header__phone { display: none; font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; }
.header__phone span { display: block; font-size: 0.6875rem; font-weight: 500; color: var(--muted); letter-spacing: .04em; }
.header .btn { min-height: 44px; padding: 0 18px; font-size: 0.9375rem; }

/* ---------- 5. Hero: fachada a pantalla completa ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--ink); color: #fff;
  min-height: clamp(560px, 86vh, 820px);
  display: flex; align-items: flex-end;
  padding-block: 300px 96px;
}
.hero__bg { position: absolute; inset: 0 0 auto 0; height: 400px; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; max-width: none; }
/* Velo para que el texto se lea sobre la foto */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, rgba(18,18,17,.05) 0, rgba(18,18,17,.15) 200px, rgba(18,18,17,.92) 330px, #121211 400px);
}
.hero__inner { position: relative; }
.hero__text { display: grid; gap: 22px; max-width: 640px; min-width: 0; }
.hero .eyebrow { color: var(--teal); }
.hero h1 { font-size: clamp(2.125rem, 1.4rem + 3.4vw, 4rem); line-height: 1.06; letter-spacing: -0.03em; max-width: 14ch; color: #fff; }
.hero h1 em { font-style: normal; color: var(--teal); }
.hero__lead { font-size: var(--step-1); color: #d6dcdb; max-width: 52ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn--light { border-color: rgba(255,255,255,.7); color: #fff; background: rgba(255,255,255,.06); backdrop-filter: blur(6px); }
.btn--light:hover { background: #fff; color: var(--ink); }
.hero__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--step--1); color: #b9c1c0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.16); }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--teal); font-weight: 600; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(33,167,161,.2); }
.status.is-closed { color: #d6dcdb; }
.status.is-closed::before { box-shadow: none; }
@media (prefers-reduced-motion: no-preference) {
  .hero__bg img { animation: hero-zoom 14s ease-out both; }
  @keyframes hero-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
}

/* ---------- 6. Franja de datos ---------- */
.facts { --lift: 48px; position: relative; z-index: 2; margin-top: calc(-1 * var(--lift)); padding-bottom: 8px;
  background: linear-gradient(to bottom, transparent var(--lift), var(--mist) var(--lift)); }
/* Tarjeta blanca que se monta sobre el borde inferior de la foto */
.facts__grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0,1fr);
  background: var(--paper); border-radius: var(--radius);
  padding: 4px 22px; box-shadow: 0 24px 60px -30px rgba(18,18,17,.5);
}
.facts__item { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; align-content: start; }
.facts__item:last-child { border-bottom: 0; }
.facts__item svg { width: 22px; height: 22px; color: var(--teal-deep); margin-bottom: 4px; }
.facts__item b { font-size: var(--step-1); color: var(--ink); font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.facts__item span { font-size: 0.875rem; color: var(--steel); line-height: 1.5; }

/* ---------- 7. Especialidades ---------- */
.services { display: grid; gap: 24px; }
.service { display: grid; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.service__img { aspect-ratio: 16 / 10; overflow: hidden; }
.service__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.service:hover .service__img img { transform: scale(1.03); }
.service__body { display: grid; gap: 14px; padding: 24px; align-content: start; }
.service__tag { font-size: var(--step--1); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.service h3 { font-size: var(--step-2); }
.service__body p { flex: 1; }
.service p { color: var(--steel); }
.service ul { display: grid; gap: 0; border-top: 1px solid var(--line); }
.service li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.service li::before { content: ""; width: 6px; height: 6px; margin-top: 9px; background: var(--teal); flex: none; }
.service__link { font-weight: 600; color: var(--teal-deep); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; margin-top: 4px; }
.service__link svg { width: 16px; height: 16px; transition: transform .2s; }
.service__link:hover svg { transform: translateX(4px); }

/* Banda DF Varilleros: marca hermana */
.sister {
  margin-top: 24px; display: grid; gap: 24px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
  padding: 24px;
}
.sister__img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; object-position: 50% 35%; border-radius: 2px; }
.sister__text { display: grid; gap: 12px; min-width: 0; }
.sister__text h3 { font-size: var(--step-2); }
.sister__text p { color: var(--steel); }
.sister__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.sister__tags li { font-size: var(--step--1); font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--mist); color: var(--ink); }
.sister__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.sister__cta .btn svg, .nav__ext svg, .footer svg { width: 16px; height: 16px; }
.sister__logo { justify-self: start; display: block; }
.sister__logo img { width: 150px; height: auto; }
.footer__sister { display: inline-block; margin-top: 16px; opacity: .85; transition: opacity .2s; }
.footer__sister:hover { opacity: 1; }
.footer__sister img { width: 120px; height: auto; }
.sister__badge { justify-self: start; font-size: var(--step--1); font-weight: 600; padding: 4px 10px; border: 1px solid var(--line); border-radius: 2px; color: var(--steel); }

/* ---------- 8. Siniestros / aseguradora ---------- */
.claim { display: grid; gap: 40px; }
.claim__media img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); }
.claim__body { display: grid; gap: 28px; align-content: start; min-width: 0; }
.steps { display: grid; gap: 0; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 20px 0; border-top: 1px solid #34342f; counter-increment: step; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-weight: 700; color: var(--teal); font-size: var(--step-1); font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: var(--step-1); color: #fff; margin-bottom: 4px; letter-spacing: -0.01em; }
.steps p { color: #b9c1c0; font-size: 0.9375rem; }
.note { font-size: var(--step--1); color: #9aa3a2; border-left: 2px solid var(--teal); padding-left: 14px; }

/* ---------- 9. Método de trabajo ---------- */
.method { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.method li { display: grid; gap: 8px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.method__n { font-size: var(--step--1); font-weight: 700; letter-spacing: .12em; color: var(--teal-deep); font-variant-numeric: tabular-nums; }
.method h3 { font-size: var(--step-2); }
.method p { color: var(--steel); max-width: 46ch; }

/* ---------- 10. Instalaciones ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--line); }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3/4; }
.gallery figure.wide { grid-column: span 2; }
.gallery figure.wide img { aspect-ratio: 16/9; }
/* Con 6 fotos: en móvil la última ocupa el ancho completo */
.gallery figure:last-child { grid-column: span 2; }
.gallery figure:last-child img { aspect-ratio: 16/9; }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 14px 12px; font-size: var(--step--1); font-weight: 500; color: #fff;
  background: linear-gradient(to top, rgba(28,28,26,.82), rgba(28,28,26,0));
}

/* ---------- 11. Equipo ---------- */
.team { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.team img { width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: top; border-radius: var(--radius); filter: grayscale(.15); }

/* ---------- 12. Opiniones ---------- */
.reviews { display: grid; gap: 16px; }
.review { margin: 0; padding: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 18px; align-content: space-between; }
.review blockquote { margin: 0; font-size: var(--step-1); font-weight: 500; line-height: 1.5; }
.review blockquote { font-size: 1.0625rem; }
.stars { color: #e3a008; letter-spacing: 2px; font-size: 1.125rem; }
.review figcaption { display: grid; gap: 2px; font-size: var(--step--1); color: var(--muted); }
.review figcaption b { color: var(--ink); font-size: 0.9375rem; }
.reviews__cta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; color: var(--steel); }

/* ---------- 13. Preguntas frecuentes ---------- */
.faq { display: grid; gap: 40px; }
.faq__list { border-top: 2px solid var(--ink); min-width: 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 22px 40px 22px 0; position: relative;
  font-weight: 600; font-size: var(--step-1);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: translateY(-75%) rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq details p { padding: 0 0 22px; color: var(--steel); max-width: 64ch; }

/* ---------- 14. Cita (formulario tipo orden de reparación) ---------- */
.booking { display: grid; gap: 40px; }
.booking__info { display: grid; gap: 28px; align-content: start; min-width: 0; }
.booking__info h2 { font-size: var(--step-4); }
.booking__info > p { color: #b9c1c0; font-size: var(--step-1); }
.contact-list { display: grid; border-top: 1px solid #34342f; }
.contact-list li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid #34342f; font-size: 0.9375rem; }
.contact-list dt, .contact-list .k { color: #9aa3a2; font-size: var(--step--1); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; padding-top: 2px; }
.contact-list a { color: #fff; text-decoration-color: var(--teal); text-underline-offset: 4px; }
.contact-list .big { font-size: var(--step-2); font-weight: 700; color: #fff; text-decoration: none; font-variant-numeric: tabular-nums; }

.order {
  background: var(--paper); color: var(--ink); border-radius: var(--radius);
  padding: clamp(20px, 4vw, 40px); display: grid; gap: 22px; min-width: 0;
}
.order__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); flex-wrap: wrap; }
.order__head h3 { font-size: var(--step-2); }
.order__head span { font-size: var(--step--1); color: var(--muted); letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.fields { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field legend { font-size: var(--step--1); font-weight: 600; color: var(--steel); letter-spacing: .02em; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: 500 var(--step-0) var(--font); color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal-deep); box-shadow: 0 0 0 3px rgba(33,167,161,.18); }
.field .hint { font-size: 0.75rem; color: var(--muted); }
.field.is-invalid input, .field.is-invalid select { border-color: #b3261e; }
.field .error { font-size: 0.75rem; color: #b3261e; font-weight: 600; }

/* Campo matrícula con aspecto de placa europea */
.plate { display: flex; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; background: var(--paper); }
.plate__eu { background: var(--plate-blue); color: #fff; width: 36px; flex: none; display: grid; place-items: end center; padding-bottom: 6px; font-size: 0.75rem; font-weight: 700; }
.plate input { border: 0; border-radius: 0; text-transform: uppercase; font-weight: 700; font-size: 1.375rem; letter-spacing: .14em; font-variant-numeric: tabular-nums; min-height: 52px; }
.plate input::placeholder { color: #b8bfbe; letter-spacing: .14em; }
.plate:focus-within { box-shadow: 0 0 0 3px rgba(33,167,161,.25); }
.plate input:focus { box-shadow: none; }

/* Selector de servicio en chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.chips legend { margin-bottom: 8px; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 999px; font-size: 0.875rem; font-weight: 500; cursor: pointer;
  transition: all .15s;
}
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: var(--step--1); color: var(--steel); }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--teal-deep); flex: none; }
.order .btn { width: 100%; }
.order__foot { font-size: var(--step--1); color: var(--muted); text-align: center; }
.hp { position: absolute; left: -9999px; }

.form-done { display: grid; gap: 14px; text-align: left; padding: 8px 0; }
.form-done svg { width: 44px; height: 44px; color: var(--teal-deep); }
.form-done h3 { font-size: var(--step-3); }
.form-done p { color: var(--steel); }
.form-error { font-size: 0.875rem; color: #b3261e; font-weight: 600; }

/* ---------- 15. Pie ---------- */
.footer { background: #121211; color: #aab3b2; padding-block: 56px calc(96px + env(safe-area-inset-bottom, 0px)); font-size: 0.9375rem; }
.footer__grid { display: grid; gap: 36px; }
.footer .brand__word b { color: #fff; }
.footer .brand__word small { color: #8b9392; }
.footer h4 { color: #fff; font-size: var(--step--1); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.footer li { padding: 4px 0; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; }
.footer__bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid #2a2a27; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: var(--step--1); }
.footer__bottom ul { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ---------- 16. Barra fija móvil ---------- */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--paper); border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px -16px rgba(0,0,0,.4);
}
.mobile-bar .btn { min-height: 48px; padding: 0 8px; font-size: 0.875rem; gap: 6px; }

/* ---------- 17. Páginas legales ---------- */
.legal .prose { max-width: 760px; display: grid; gap: 14px; }
.legal h1 { font-size: var(--step-4); margin-bottom: 8px; }
.legal h2 { font-size: var(--step-2); margin-top: 18px; }
.legal p, .legal li { color: var(--steel); }
.legal ul { list-style: disc; padding-left: 20px; display: grid; gap: 6px; }
.todo-mark { background: #fff3c4; padding: 0 4px; }

/* ---------- 18. Animación de entrada (estado visible por defecto) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { transition: opacity .7s ease, transform .7s ease; }
  .js .reveal.is-pending { opacity: 0; transform: translateY(18px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* =========================================================
   Tablet
   ========================================================= */
@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .hero { padding-block: 360px 120px; }
  .hero__bg { height: 520px; }
  .hero::before { background: linear-gradient(to bottom, rgba(18,18,17,.05) 0, rgba(18,18,17,.2) 260px, rgba(18,18,17,.92) 440px, #121211 520px); }
  .facts { --lift: 64px; }
  .facts__grid { grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 32px; padding: 8px 32px; }
  .facts__item { padding: 24px 0; }
  .facts__item:nth-last-child(2) { border-bottom: 0; }
  .sister { grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: 40px; padding: 28px; }
  .sister__img img { aspect-ratio: 4/5; object-position: 50% 50%; }
  .method { grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 40px; }
  .gallery { grid-template-columns: repeat(4, minmax(0,1fr)); }
  /* Segunda fila: fachada en 3 columnas + última foto en 1 */
  .gallery figure.wide { grid-column: span 3; }
  .gallery figure.wide img { position: absolute; inset: 0; aspect-ratio: auto; }
  .gallery figure:last-child { grid-column: span 1; }
  .gallery figure:last-child img { aspect-ratio: 3/4; }
  .team { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
  .reviews { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .fields--2 { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   Escritorio
   ========================================================= */
@media (min-width: 1040px) {
  .nav { display: flex; align-items: center; gap: 22px; }
  .header__phone { display: none; }
  .ig-btn--icon { display: inline-flex; }
  .mobile-bar { display: none; }
  .footer { padding-bottom: 56px; }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .facts__grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .facts { --lift: 80px; }
  .facts__grid { column-gap: 0; padding: 0 8px; }
  .facts__item { border-bottom: 0; border-left: 1px solid var(--line); padding: 30px 26px; }
  .facts__item:first-child { border-left: 0; }
  .services { grid-template-columns: repeat(3, minmax(0,1fr)); }
  /* Escritorio: velo lateral, la fachada queda visible a la derecha */
  .hero { align-items: center; padding-block: 120px 150px; }
  .hero__bg { inset: 0; height: auto; }
  .hero::before { background: linear-gradient(90deg, rgba(18,18,17,.92) 0%, rgba(18,18,17,.78) 38%, rgba(18,18,17,.25) 68%, rgba(18,18,17,.1) 100%); }
  .hero__bg img { object-position: 50% 50%; }
  .claim { grid-template-columns: 0.9fr 1.1fr; gap: 72px; align-items: center; }
  .method { grid-template-columns: repeat(4, minmax(0,1fr)); column-gap: 32px; }
  .method li { border-bottom: 0; padding-top: 28px; }
  .faq { grid-template-columns: 0.8fr 1.2fr; gap: 72px; }
  .faq .section-head { position: sticky; top: 100px; align-self: start; }
  .booking { grid-template-columns: 0.85fr 1.15fr; gap: 72px; }
}

/* ---------- 19. Zonas táctiles cómodas en móvil (mín. 44px) ---------- */
@media (max-width: 1039px) {
  .service__link, .reviews__cta .service__link { min-height: 44px; }
  .footer li a { display: inline-flex; align-items: center; min-height: 40px; }
  .footer li { padding: 0; }
  .footer__bottom a { display: inline-flex; align-items: center; min-height: 40px; }
  .contact-list a:not(.big) { display: inline-flex; align-items: center; min-height: 40px; }
  .consent input { width: 22px; height: 22px; }
}

/* El teléfono de la cabecera solo cuando hay espacio suficiente */
@media (min-width: 1200px) { .header__phone { display: block; white-space: nowrap; } }

/* ---------- 20. Menú desplegable (móvil y tablet) ---------- */
.nav-toggle {
  display: inline-grid; place-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0; flex: none;
  background: transparent; border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--paper); border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 40px -24px rgba(18,18,17,.35);
  max-height: calc(100dvh - 68px); overflow-y: auto;
}
.mobile-menu__inner { display: grid; gap: 20px; padding-block: 8px 24px; }
.mobile-menu__links li { border-bottom: 1px solid var(--line); }
.mobile-menu__links a {
  display: flex; align-items: center; justify-content: space-between; min-height: 54px;
  font-size: var(--step-1); font-weight: 600; text-decoration: none; color: var(--ink);
}
.mobile-menu__links a::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--teal-deep); border-top: 2px solid var(--teal-deep); transform: rotate(45deg); }
.mobile-menu__sister {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--mist); border-radius: var(--radius); text-decoration: none; color: var(--steel); font-size: 0.875rem; font-weight: 500;
}
.mobile-menu__sister img { height: 32px; width: auto; }
.mobile-menu__sister svg { width: 14px; height: 14px; vertical-align: -2px; color: var(--teal-deep); }
.mobile-menu__contact { display: flex; flex-wrap: wrap; gap: 10px; }
.mobile-menu__contact .btn { flex: 1 1 220px; }
.mobile-menu__contact .ig-btn { flex: 1 1 180px; justify-content: center; }
.mobile-menu__hours { font-size: var(--step--1); color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .mobile-menu:not([hidden]) { animation: menu-in .22s ease-out; }
  @keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
}
body.menu-open { overflow: hidden; }
@media (max-width: 479px) { .header .btn { padding: 0 14px; } .header__actions { gap: 10px; } }
@media (min-width: 1040px) { .nav-toggle, .mobile-menu { display: none !important; } }
body.menu-open .mobile-bar { display: none; }
/* Que la cabecera fija no tape el título al saltar a una sección */
section[id] { scroll-margin-top: 68px; }

/* ---------- 21. Fase 1 del briefing ---------- */
/* Botón de WhatsApp */
.btn--wa { background: #1f8f4e; color: #fff; }
.btn--wa:hover { background: #17733e; }
.btn--wa svg { width: 18px; height: 18px; }

/* Datos rápidos bajo los botones del hero */
.hero__meta { align-items: center; gap: 10px 22px; }
.hero__phone { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 600; text-decoration: none; }
.hero__phone svg { width: 15px; height: 15px; }
.hero__bmw { display: inline-flex; align-items: center; gap: 8px; color: #e9eceb; text-decoration: none; font-weight: 500; }
.hero__bmw img { width: 24px; height: 24px; }

/* Red BMW */
.bmw { background: var(--paper); border-bottom: 1px solid var(--line); padding-block: clamp(40px, 6vw, 64px); }
.bmw__inner { display: grid; grid-template-columns: auto minmax(0,1fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.bmw__logo { width: clamp(72px, 12vw, 120px); height: auto; }
.bmw__text { display: grid; gap: 10px; max-width: 720px; }
.bmw__text h2 { font-size: var(--step-3); }
.bmw__text p { color: var(--steel); }
.bmw__legal { font-size: var(--step--1); color: var(--muted) !important; }

/* Tecnología PPG */
.tech { display: grid; gap: 40px; align-items: center; }
.tech__text { display: grid; gap: 28px; min-width: 0; }
.tech__list { display: grid; border-top: 1px solid #34342f; }
.tech__list li { display: grid; gap: 4px; padding: 18px 0 18px 28px; border-bottom: 1px solid #34342f; position: relative; }
.tech__list li::before { content: ""; position: absolute; left: 0; top: 24px; width: 12px; height: 12px; border: 2px solid var(--teal); transform: rotate(45deg); }
.tech__list b { color: #fff; font-size: var(--step-1); }
.tech__list span { color: #b9c1c0; font-size: 0.9375rem; }
.tech__media { margin: 0; position: relative; }
.tech__media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); }
.tech__media figcaption { margin-top: 10px; font-size: var(--step--1); color: #9aa3a2; }

/* Antes y después */
.cases { display: grid; gap: 24px; }
.case { display: grid; gap: 16px; }
.case__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.case__pair figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); }
.case__pair img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.case__tag { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 4px 10px; border-radius: 999px; background: rgba(18,18,17,.82); color: #fff; font-size: var(--step--1); font-weight: 600; }
.case__tag--after { background: var(--teal-deep); }
.case__text h3 { font-size: var(--step-2); }
.case__text h3 span { color: var(--muted); font-weight: 500; }
.case__text p { color: var(--steel); margin-top: 6px; }

/* Cita: accesos rápidos y datos opcionales del vehículo */
.booking__quick { display: flex; flex-wrap: wrap; gap: 10px; }
.order__more { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 12px 14px; }
.order__more summary { cursor: pointer; font-size: var(--step--1); font-weight: 600; color: var(--teal-deep); }
.order__more[open] summary { margin-bottom: 14px; }

@media (min-width: 720px) {
  .services { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .case { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); align-items: center; gap: 32px; }
}
@media (min-width: 1040px) {
  .services { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .tech { grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); gap: 72px; }
}
@media (max-width: 559px) {
  .bmw__inner { grid-template-columns: minmax(0,1fr); }
  .bmw__logo { width: 64px; }
}

/* ---------- 22. Optimización para móvil ---------- */
html { -webkit-tap-highlight-color: rgba(33,167,161,.18); }
a, button, summary, label { touch-action: manipulation; }
/* Zonas táctiles de al menos 44px */
.hero__phone, .hero__bmw { min-height: 44px; }
.order__more summary { display: flex; align-items: center; min-height: 44px; }
.consent { min-height: 44px; align-items: center; }
.consent input { width: 24px; height: 24px; }
.consent a { display: inline-block; padding-block: 6px; }
.faq summary { min-height: 56px; }
@media (max-width: 719px) {
  /* Primera pantalla del móvil: foto algo más baja para que el texto y los botones suban */
  .hero { padding-block: 250px 88px; }
  .hero__bg { height: 340px; }
  .hero::before { background: linear-gradient(to bottom, rgba(18,18,17,.05) 0, rgba(18,18,17,.15) 170px, rgba(18,18,17,.92) 285px, #121211 340px); }
  .hero h1 { font-size: 2rem; }
  .hero__text { gap: 18px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .section { padding-block: 56px; }
  .section-head { margin-bottom: 28px; }
  /* El texto de las tarjetas no se queda pegado a la barra fija */
  .mobile-bar .btn { font-size: 0.875rem; }
}
@media (max-width: 1039px) {
  /* En móvil la cita ya está en la barra fija inferior: la cabecera queda más limpia */
  .header__actions .btn--primary { display: none; }
}
@media (min-width: 360px) { .header__sister { display: inline-flex; } }
@media (max-width: 719px) {
  .header__sister { padding-left: 14px; margin-left: 4px; }
  .header__sister img { height: 26px; }
  /* Siniestros: primero el mensaje, después la foto */
  .claim__media { order: 2; }
  .claim__media img { aspect-ratio: 4 / 3; }
}
/* Móviles muy estrechos: que el email y los datos de contacto no ensanchen la página */
.contact-list li { grid-template-columns: 96px minmax(0,1fr); }
.contact-list a, .contact-list span, .footer li { overflow-wrap: anywhere; }
.booking > * { min-width: 0; }

/* ---------- 23. Vídeo de fondo en la portada ---------- */
.hero__video { width: 100%; height: 100%; object-fit: cover; object-position: 55% 50%; display: block; background: #121211; }
@media (max-width: 719px) { .hero__video { object-position: 62% 50%; } }
/* Ningún control ni botón de play sobre el vídeo de fondo */
.hero__video { pointer-events: none; }
.hero__video::-webkit-media-controls, .hero__video::-webkit-media-controls-start-playback-button,
.hero__video::-webkit-media-controls-overlay-play-button { display: none !important; -webkit-appearance: none; }

/* ---------- 24. Vídeo de portada en móvil: a lo ancho, sin recortar ---------- */
@media (max-width: 719px) {
  .hero { padding-block: calc(56.25vw + 20px) 88px; }
  .hero__bg { inset: 0 0 auto 0; height: auto; aspect-ratio: 16 / 9; }
  .hero__video { object-fit: cover; object-position: 50% 50%; }
  .hero::before {
    background: linear-gradient(to bottom, rgba(18,18,17,0) 0, rgba(18,18,17,0) 38vw, rgba(18,18,17,.85) 50vw, #121211 56.25vw, #121211 100%);
  }
}
