/* =========================================================
   Pro Auto Collision — sitio oficial (hecho por Novax Technology Solutions)
   Mobile-first: base = 360–375 px, después 640 / 768 / 1024 / 1280
   ========================================================= */

/* Letra temporal con las mismas medidas que Inter y Oswald: el texto no salta cuando cargan */
@font-face { font-family: "Inter Fallback"; src: local("Arial"); ascent-override: 90.44%; descent-override: 22.52%; line-gap-override: 0%; size-adjust: 107.12%; }
@font-face { font-family: "Oswald Fallback"; src: local("Arial"); ascent-override: 146.96%; descent-override: 35.53%; line-gap-override: 0%; size-adjust: 81.66%; }

:root {
  --bg: #111317;          /* carbón */
  --bg-deep: #0b0c0f;     /* footer */
  --card: #1e2229;        /* gris acero */
  --card-2: #262b33;
  --light: #f4f5f7;
  --white: #ffffff;
  --red: #d62828;         /* solo acciones e indicadores */
  --red-dark: #b51f1f;
  --silver: #b8bec6;
  --text: #f5f5f5;        /* texto en fondo oscuro */
  --muted: #a3aab4;
  --ink: #16181d;         /* texto en fondo claro */
  --ink-muted: #4a505a;
  --line: rgba(184, 190, 198, 0.16);
  --line-strong: rgba(184, 190, 198, 0.34);
  --line-light: #dadde2;
  --wa: #25d366;

  --font-head: "Oswald", "Oswald Fallback", "Arial Narrow", Arial, sans-serif;
  --font-body: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 6px;
  --radius-lg: 10px;
  --gutter: 16px;
  --header-h: 70px;
  --section-y: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure { margin: 0; }
[hidden] { display: none !important; }

.i { width: 1.25em; height: 1.25em; flex: none; }

.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;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--white); color: var(--ink); padding: 10px 14px;
  border-radius: var(--radius); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.section-dark :focus-visible,
.site-header :focus-visible,
.hero :focus-visible,
.site-footer :focus-visible { outline-color: var(--white); }

.container {
  width: min(1200px, 100% - var(--gutter) * 2);
  margin-inline: auto;
}

section[id] { scroll-margin-top: var(--header-h); }

/* ---------- Tipografía ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--red); }
.section-dark .eyebrow,
.eyebrow-on-dark { color: var(--silver); }

.section-title {
  font-family: var(--font-head);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  font-size: clamp(2rem, 4.2vw + 1rem, 3.25rem);
  line-height: 1.1;
  text-wrap: balance;
}

.section-intro {
  margin-top: 14px;
  max-width: 56ch;
  font-size: 17px;
  color: var(--ink-muted);
  text-wrap: pretty;
}
.section-dark .section-intro { color: var(--muted); }

.sub-title {
  font-family: var(--font-head); font-weight: 600; text-transform: uppercase;
  font-size: 22px; letter-spacing: 0.04em;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-family: var(--font-head); font-weight: 500; font-size: 16px;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  line-height: 1.15; text-align: center;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn .i { width: 20px; height: 20px; }

.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--silver); background: rgba(255, 255, 255, 0.06); }

.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #2a2e36; }

.btn-lg { min-height: 54px; font-size: 17px; padding: 0 24px; }
.btn-sm { min-height: 40px; padding: 0 10px; font-size: 12.5px; letter-spacing: 0.04em; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(17, 19, 23, 0.94);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 10px;
}

.brand {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; color: var(--text);
  min-width: 0;
}
/* El carro de su logo (sin fondo) al lado del nombre */
.brand-car { width: 60px; height: auto; flex: none; display: block; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
/* El nombre del negocio manda: Oswald 700, grande (mín. 20 px en el celular) */
.brand-name {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: 21px; line-height: 0.98; letter-spacing: 0.03em;
  white-space: nowrap;
}
.brand-name span { display: block; }
.brand-sub {
  margin-top: 4px; padding-top: 3px;
  border-top: 2px solid var(--red);
  font-size: 9px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--silver); line-height: 1; white-space: nowrap;
}

.cta-corto { display: none; }
@media (max-width: 399px) {
  .header-cta .cta-largo { display: none; }
  .header-cta .cta-corto { display: inline; }
}

.header-cta { margin-left: auto; white-space: nowrap; }

.menu-toggle {
  width: 44px; height: 44px; flex: none;
  display: inline-grid; place-items: center;
  background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius);
  cursor: pointer;
}
.menu-bars,
.menu-bars::before,
.menu-bars::after {
  display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.menu-bars { position: relative; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -6px; }
.menu-bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Menú en celular: panel que baja debajo del header */
.main-nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
  visibility: hidden; opacity: 0; transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.25s var(--ease), visibility 0s linear 0.25s;
}
.site-header.is-open .main-nav {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity 0.2s, transform 0.25s var(--ease), visibility 0s;
}
.main-nav ul { width: min(1200px, 100% - var(--gutter) * 2); margin-inline: auto; padding: 6px 0 14px; }
.main-nav li + li { border-top: 1px solid var(--line); }
.main-nav a {
  display: flex; align-items: center; min-height: 54px;
  font-family: var(--font-head); font-weight: 500; font-size: 20px;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
}
.main-nav a[aria-current="true"] { color: var(--white); box-shadow: inset 3px 0 0 var(--red); padding-left: 12px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: min(760px, calc(100svh - var(--header-h)));
  padding: 64px 0 64px;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(17, 19, 23, 0.55) 0%, rgba(17, 19, 23, 0.72) 40%, rgba(17, 19, 23, 0.96) 100%);
}
/* franja diagonal hacia la sección clara */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 36px;
  background: var(--light);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.hero-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--silver);
  margin-bottom: 18px;
}
.hero-tag .dot { width: 8px; height: 8px; background: var(--red); border-radius: 50%; box-shadow: 0 0 0 4px rgba(214, 40, 40, 0.22); }

/* El carro de su logo arriba del nombre, como en el logo */
.hero-car {
  display: block; width: min(300px, 78vw); height: auto; object-fit: contain;
  margin: 2px 0 8px -2px;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
}

.hero-title { font-family: var(--font-head); text-transform: uppercase; margin-bottom: 18px; }
.hero-name {
  display: block; width: fit-content; max-width: 100%;
  font-weight: 700;
  font-size: clamp(42px, 11vw, 96px);
  line-height: 0.98; letter-spacing: 0.01em;
  text-wrap: balance;
}
/* línea roja debajo del nombre, como en su logo */
.hero-name::after {
  content: ""; display: block;
  height: clamp(5px, 0.7vw, 8px);
  margin-top: 0.16em;
  background: var(--red);
  transform-origin: left;
}
.hero-sub {
  display: block; margin-top: 14px;
  font-weight: 500;
  font-size: clamp(20px, 4.5vw, 34px);
  line-height: 1.15; letter-spacing: 0.02em;
  color: #d9dde2;
  text-wrap: balance;
}

.hero-lead {
  font-size: 18px; line-height: 1.5; color: #d9dde2;
  max-width: 34ch;
  text-wrap: pretty;
}
.hero-actions { display: grid; gap: 12px; margin-top: 28px; }

.hero-specs {
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  margin-top: 36px; padding-top: 18px;
  border-top: 1px solid var(--line-strong);
}
.hero-specs li {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-weight: 500; font-size: 13px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--silver);
}
.hero-specs li::before { content: ""; width: 6px; height: 6px; background: var(--red); }

@media (prefers-reduced-motion: no-preference) {
  html.js .hero-car { opacity: 0; transform: translateX(-18px); animation: car-in 1s var(--ease) 0.15s forwards; }
  html.js .hero-name::after { transform: scaleX(0); animation: draw-line 1.1s var(--ease) 0.6s forwards; }
}
@keyframes car-in { to { opacity: 1; transform: none; } }
@keyframes draw-line { to { transform: scaleX(1); } }

/* ---------- Secciones ---------- */
.section { padding: var(--section-y) 0; }
.section-tight { padding-top: 0; }
.section-light { background: var(--light); color: var(--ink); }
.section-dark { background: var(--bg); color: var(--text); }
.section-head { margin-bottom: 36px; }

/* ---------- Servicios ---------- */
.services-grid { display: grid; gap: 14px; }
.service-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: 8px;
  padding: 24px 22px 22px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.25s;
}
.service-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--red);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.service-card:hover { border-color: #c4c8cf; box-shadow: 0 10px 28px rgba(22, 24, 29, 0.08); }
.service-card:hover::before,
.service-card:focus-within::before { transform: scaleX(1); }
.service-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.service-icon { width: 40px; height: 40px; color: var(--ink); }
.service-num { font-family: var(--font-head); font-size: 14px; letter-spacing: 0.1em; color: #8a919b; }
.service-card h3 {
  font-family: var(--font-head); font-weight: 600; text-transform: uppercase;
  font-size: 21px; line-height: 1.15; letter-spacing: 0.02em;
}
.service-card p { margin-top: 8px; color: var(--ink-muted); font-size: 15.5px; }
.service-link {
  margin-top: auto; padding-top: 18px;
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  min-height: 44px;
  font-weight: 600; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
}
.service-link span { border-bottom: 2px solid var(--red); padding-bottom: 2px; }
.service-link svg { width: 16px; height: 16px; color: var(--red); transition: transform 0.2s var(--ease); }
.service-link:hover svg { transform: translateX(3px); }

/* ---------- Nuestro taller ---------- */
.taller-grid { display: grid; gap: 28px; }
.taller-main { border-radius: 8px; overflow: hidden; position: relative; }
.taller-main img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.taller-main figcaption,
.equip-card figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 16px 12px;
  background: linear-gradient(180deg, transparent, rgba(11, 12, 15, 0.85));
  font-size: 13px; font-weight: 500; color: #e3e6ea;
}
.equip-list { display: grid; gap: 14px; }
.equip-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.equip-card figure { position: relative; }
.equip-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.equip-body { padding: 18px 18px 20px; border-top: 2px solid var(--red); }
.equip-body h3 {
  font-family: var(--font-head); font-weight: 600; text-transform: uppercase;
  font-size: 20px; letter-spacing: 0.04em;
}
.equip-body p { margin-top: 6px; color: var(--muted); font-size: 15.5px; }

.ph {
  display: grid; place-items: center;
  background:
    repeating-linear-gradient(135deg, rgba(184, 190, 198, 0.07) 0 12px, transparent 12px 24px),
    linear-gradient(160deg, #2a2f37, #1a1d23);
  color: var(--silver);
  font-family: var(--font-head); font-size: 15px; letter-spacing: 0.16em; text-transform: uppercase;
}
.taller-main .ph { aspect-ratio: 4 / 3; }
.equip-card .ph { aspect-ratio: 16 / 10; }

/* ---------- Antes y después ---------- */
.ba-block { max-width: 760px; margin-inline: auto; }
.ba-tabs { display: flex; flex-wrap: wrap; gap: 6px 4px; margin-bottom: 14px; }
.ba-tab {
  min-height: 44px; padding: 0 12px;
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  font-family: var(--font-head); font-weight: 500; font-size: 15px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted);
  cursor: pointer;
}
.ba-tab:hover { color: var(--ink); }
.ba-tab[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--red); }

.ba {
  --pos: 50%;
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: #2a2f37;
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
  cursor: ew-resize;
}
.ba-layer { position: absolute; inset: 0; }
.ba-layer img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-layer .ph { width: 100%; height: 100%; font-size: 18px; }
.ba-after .ph { background: repeating-linear-gradient(135deg, rgba(22, 24, 29, 0.05) 0 12px, transparent 12px 24px), linear-gradient(160deg, #cfd3d9, #b7bcc4); color: #3d434c; }

.ba-label {
  position: absolute; top: 12px; z-index: 2;
  padding: 6px 10px; border-radius: 4px;
  background: rgba(11, 12, 15, 0.78); color: var(--white);
  font-family: var(--font-head); font-weight: 500; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  pointer-events: none;
}
.ba-label-before { left: 12px; }
.ba-label-after { right: 12px; }
.ba-label-after::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; background: var(--red); vertical-align: 1px; }

.ba-handle {
  position: absolute; top: 0; bottom: 0; z-index: 3;
  left: var(--pos);
  width: 48px; margin-left: -24px;
  display: grid; place-items: center;
  outline: none;
  cursor: ew-resize;
}
.ba-handle::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; margin-left: -1px; background: var(--white);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.ba-knob {
  position: relative;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--red); color: var(--white);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), 0 0 0 3px var(--white);
  transition: transform 0.2s var(--ease);
}
.ba-knob .i { width: 22px; height: 22px; }
.ba.is-dragging .ba-knob { transform: scale(1.08); }
.ba-handle:focus-visible .ba-knob { box-shadow: 0 0 0 3px var(--white), 0 0 0 6px var(--ink); }

.ba-caption {
  margin-top: 14px;
  font-family: var(--font-head); font-weight: 500; font-size: 17px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink);
}
.ba-caption:empty { display: none; }

/* ---------- Galería ---------- */
.gallery-head { margin: 64px 0 18px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.gallery-head p { color: var(--ink-muted); font-size: 15px; }
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: calc((min(1200px, 100vw - var(--gutter) * 2) - 8px) / 2);
  grid-auto-flow: dense;
  gap: 8px;
}
.gallery li { position: relative; min-width: 0; }
.gallery li.span-m { grid-column: span 2; }
.gallery-btn {
  position: relative; display: block; width: 100%; height: 100%;
  padding: 0; border: 0; border-radius: 6px; overflow: hidden;
  background: #d9dce1; cursor: zoom-in;
}
.gallery-btn img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.gallery-btn:hover img { transform: scale(1.04); }
.gallery-btn .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 10px 9px;
  background: linear-gradient(180deg, transparent, rgba(11, 12, 15, 0.82));
  color: var(--white); font-size: 12.5px; font-weight: 500; line-height: 1.3; text-align: left;
}
.center-cta { margin-top: 28px; display: flex; justify-content: center; }

/* ---------- Seguros ---------- */
.insurance {
  display: grid;
  background: var(--bg);
  color: var(--text);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}
.insurance::before {
  content: ""; position: absolute; left: 0; top: 0; width: 72px; height: 3px; background: var(--red); z-index: 1;
}
.insurance-copy { padding: 36px 22px 32px; }
.insurance-lead { margin-top: 8px; font-size: 19px; color: #d9dde2; }
.steps { margin: 26px 0 28px; display: grid; gap: 12px; counter-reset: none; }
.steps li {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step-n {
  flex: none; width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-left: 2px solid var(--red);
  border-radius: 4px;
  font-family: var(--font-head); font-weight: 600; font-size: 18px;
}
.steps p { font-size: 16px; line-height: 1.4; }
.insurance-media img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 62%; }

/* ---------- Pedir estimado ---------- */
.quote-grid { display: grid; gap: 32px; }
.quote-points { margin-top: 24px; display: grid; gap: 12px; }
.quote-points li {
  display: flex; gap: 12px; align-items: baseline;
  color: #d9dde2; font-size: 16px;
}
.quote-points li::before { content: ""; flex: none; width: 6px; height: 6px; background: var(--red); transform: translateY(-2px); }
.quote-points a { color: var(--white); font-weight: 600; text-underline-offset: 3px; }
.nowrap { white-space: nowrap; }

.quote-form {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px;
  background: var(--white); color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 24px 18px;
  scroll-margin-top: calc(var(--header-h) + 12px);
}
.field { display: grid; gap: 6px; min-width: 0; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.field label,
.field legend { font-size: 14.5px; font-weight: 600; padding: 0; }
.field .req { color: var(--red-dark); }
.field .opt { font-weight: 400; color: var(--ink-muted); }

.field input[type="text"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid #c3c7ce;
  border-radius: var(--radius);
  font-size: 16px; color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field ::placeholder { color: #7d838d; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(22, 24, 29, 0.14); }
.field input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 3px rgba(214, 40, 40, 0.14); }
.field-error { color: var(--red-dark); font-size: 13.5px; font-weight: 500; line-height: 1.35; }
.field-error:empty { display: none; }

.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; right: 16px; top: 50%;
  width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: rotate(45deg); pointer-events: none;
}
.field select { appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer; }
.field select.flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 0%, 60% { border-color: var(--red); box-shadow: 0 0 0 4px rgba(214, 40, 40, 0.2); } }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: grid; place-items: center; min-height: 50px;
  border: 1px solid #c3c7ce; border-radius: var(--radius);
  font-weight: 600; font-size: 16px;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.segmented input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--white); }
.segmented input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }

.form-note {
  font-size: 14.5px; line-height: 1.5; color: var(--ink-muted);
  background: var(--light); border-radius: var(--radius); padding: 12px 14px;
}
.form-done {
  font-size: 15px; line-height: 1.5;
  border-left: 3px solid var(--wa); background: #eef8f2; color: #173d27;
  border-radius: 0 var(--radius) var(--radius) 0; padding: 12px 14px;
}
.form-done a { font-weight: 600; color: inherit; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; gap: 4px; }
.faq { border-top: 1px solid var(--line-light); }
.faq-item { border-bottom: 1px solid var(--line-light); }
.faq-q {
  width: 100%; min-height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 0;
  background: none; border: 0; text-align: left; cursor: pointer;
  font-size: 17px; font-weight: 600; line-height: 1.35; color: var(--ink);
}
.faq-q .i { width: 22px; height: 22px; color: var(--red); transition: transform 0.3s var(--ease); }
.faq-q[aria-expanded="true"] .i { transform: rotate(45deg); }
.faq-a {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s var(--ease);
}
.faq-a > div { overflow: hidden; }
.faq-a p { padding: 0 36px 20px 0; color: var(--ink-muted); }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }

/* ---------- Ubicación ---------- */
.section-white { background: var(--white); color: var(--ink); border-top: 1px solid var(--line-light); }
.map-grid { display: grid; gap: 16px; }
.map-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--silver);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #e8eaed;
}
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.map-side {
  background: var(--light);
  border: 1px solid var(--line-light);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.map-side h3 {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; text-transform: uppercase;
  font-size: 18px; letter-spacing: 0.04em; margin-bottom: 10px;
}
.map-side h3 .i { color: var(--red); }
.map-side li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line-light); font-size: 15px; }
.map-side li:first-child { border-top: 0; }
.map-side li span:first-child { font-weight: 600; }
.map-actions { display: grid; gap: 10px; margin-top: 16px; }
.btn-line { background: var(--white); color: var(--ink); border-color: #c3c7ce; }
.btn-line:hover { border-color: var(--ink); }
.faq-a p a { color: var(--ink); font-weight: 600; text-decoration-color: var(--red); text-underline-offset: 3px; white-space: nowrap; }

/* ---------- Contacto ---------- */
.contact {
  position: relative;
  text-align: center;
  padding-top: calc(var(--section-y) + 36px);
}
.contact::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 36px;
  background: var(--white);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.contact-rule { display: block; width: 56px; height: 4px; margin: 0 auto 22px; background: var(--red); }
.contact-title {
  font-family: var(--font-head); font-weight: 600; text-transform: uppercase;
  font-size: clamp(2.1rem, 6vw + 0.6rem, 4rem); line-height: 1.12; letter-spacing: 0.01em;
  max-width: 16ch; margin-inline: auto;
  text-wrap: balance;
}
.contact-title span { display: block; margin-top: 0.14em; }
.contact-actions { display: grid; gap: 12px; margin: 32px auto 0; max-width: 420px; }
.contact-actions .btn { min-height: 58px; font-size: 18px; }
.contact-info {
  margin-top: 32px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 28px;
  color: var(--silver); font-size: 15.5px;
}
.contact-info > div { display: inline-flex; align-items: flex-start; gap: 10px; text-align: left; }
.contact-info .i { color: var(--red); margin-top: 2px; }
.contact-info ul { display: grid; gap: 2px; }
.contact-info strong { color: var(--text); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
  padding: 48px 0 104px;
  text-align: center;
}
.footer-inner { display: grid; justify-items: center; gap: 16px; }
.footer-brand { display: grid; justify-items: center; gap: 6px; }
.footer-car { width: 170px; height: auto; object-fit: contain; }
.footer-name {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: 22px; letter-spacing: 0.04em; line-height: 1.1;
  padding-bottom: 6px; border-bottom: 3px solid var(--red);
}
.footer-sub { font-size: 12.5px; color: var(--silver); letter-spacing: 0.02em; }
.footer-line { color: var(--silver); font-size: 14.5px; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
.footer-nav a {
  display: inline-flex; align-items: center; min-height: 40px;
  color: #d4d8dd; text-decoration: none; font-size: 14px;
}
.footer-nav a:hover { color: var(--white); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }
.footer-credit { margin-top: 8px; font-size: 12px; color: #7f8690; }

/* ---------- Botón flotante WhatsApp ---------- */
.wa-float {
  position: fixed; z-index: 45;
  right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wa); color: var(--white);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s var(--ease), opacity 0.25s, visibility 0s;
}
.wa-float .i { width: 30px; height: 30px; }
.wa-float:hover { transform: scale(1.06); }
.wa-float.is-hidden {
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(0.9);
  transition: transform 0.25s var(--ease), opacity 0.25s, visibility 0s linear 0.25s;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(8, 9, 11, 0.95);
  display: grid; place-items: center;
  padding: 64px 12px 84px;
}
.lb-figure { max-width: min(1100px, 100%); display: grid; gap: 12px; justify-items: center; }
.lb-figure img {
  max-width: 100%; max-height: calc(100svh - 190px);
  width: auto; height: auto; object-fit: contain; border-radius: 4px;
}
.lb-figure figcaption { color: #dde1e6; font-size: 15px; text-align: center; }
.lb-btn {
  position: absolute;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.1); color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.2); }
.lb-btn .i { width: 22px; height: 22px; }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: calc(50% - 60px); bottom: 20px; }
.lb-next { right: calc(50% - 60px); bottom: 20px; }

/* ---------- Animación al hacer scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
  html.js .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* =========================================================
   Tablet (640+)
   ========================================================= */
@media (min-width: 640px) {
  :root { --gutter: 24px; --section-y: 88px; }

  .hero-actions { display: flex; flex-wrap: wrap; }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .equip-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .quote-form { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 30px 28px; gap: 18px; }
  .quote-form > .field-full,
  .quote-form > .btn,
  .quote-form > .form-note,
  .quote-form > .form-done { grid-column: 1 / -1; }
  .contact-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; }
  .contact-actions .btn:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
  .ba-label { top: 16px; font-size: 14px; }
  .ba-label-before { left: 16px; }
  .ba-label-after { right: 16px; }
  .gallery-btn .cap { font-size: 13.5px; padding: 30px 14px 12px; }
  .lb-prev { left: 16px; bottom: auto; top: 50%; margin-top: -24px; }
  .lb-next { right: 16px; bottom: auto; top: 50%; margin-top: -24px; }
  .lightbox { padding: 64px 80px; }
  .lb-figure img { max-height: calc(100svh - 150px); }
}

@media (min-width: 640px) {
  .map-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .brand-name span { display: inline; }
  .brand-name { font-size: 24px; letter-spacing: 0.035em; }
  .brand-car { width: 84px; }
  .hero-car { width: 380px; }
  .brand-sub { font-size: 10px; letter-spacing: 0.16em; }
  .hero { padding: 96px 0 72px; }
  .hero::after, .contact::before { height: 56px; }

  .insurance { grid-template-columns: 7fr 5fr; }
  .insurance-copy { padding: 48px 44px; }
  .insurance-media img { aspect-ratio: auto; min-height: 100%; }
}

/* =========================================================
   Desktop (1024+)
   ========================================================= */
@media (min-width: 1024px) {
  :root { --gutter: 32px; --header-h: 76px; --section-y: 112px; }

  .header-inner { gap: 28px; }
  .hero-car { width: 440px; margin-bottom: 10px; }
  .map-grid.has-side { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); align-items: start; gap: 24px; }
  .map-frame { aspect-ratio: 16 / 9; }
  .map-actions { display: flex; flex-wrap: wrap; }
  .map-actions .btn { min-width: 200px; }


  .hero { min-height: min(820px, calc(100svh - var(--header-h))); padding: 120px 0 80px; }
  .hero::before {
    background:
      linear-gradient(90deg, rgba(17, 19, 23, 0.94) 0%, rgba(17, 19, 23, 0.78) 42%, rgba(17, 19, 23, 0.25) 78%, rgba(17, 19, 23, 0.35) 100%),
      linear-gradient(180deg, transparent 55%, rgba(17, 19, 23, 0.85) 100%);
  }
  .hero-media img { object-position: 50% 45%; }
  .hero-lead { font-size: 20px; }
  .hero-specs { gap: 12px 40px; margin-top: 56px; }
  .hero::after, .contact::before { height: 72px; }

  .section-head { margin-bottom: 48px; }
  .services-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .service-card { padding: 30px 28px 26px; }

  .taller-grid { grid-template-columns: 5fr 7fr; gap: 28px 56px; align-items: center; }
  .equip-list { grid-column: 1 / -1; }
  .equip-card { display: grid; grid-template-columns: 1fr 1fr; }
  .equip-card figure, .equip-card .ph { height: 100%; }
  .equip-card img { height: 100%; aspect-ratio: auto; min-height: 220px; }
  .equip-body { border-top: 0; border-left: 2px solid var(--red); padding: 26px 24px; align-self: center; }

  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 270px; gap: 12px; }
  .gallery li.span-m { grid-column: auto; }
  .gallery li.span-d { grid-column: span 2; }

  .quote-grid { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
  .quote-copy { position: sticky; top: calc(var(--header-h) + 40px); }
  .quote-form { padding: 36px 36px 32px; }

  .faq-grid { grid-template-columns: 4fr 8fr; gap: 64px; align-items: start; }

  .contact-actions { display: flex; flex-wrap: wrap; justify-content: center; max-width: none; }
  .contact-actions .btn { min-width: 220px; }

  .wa-float { right: 24px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  .site-footer { padding-bottom: 56px; }
}

/* Menú completo en el header (desde 1240 px) */
@media (min-width: 1240px) {
  .menu-toggle { display: none; }
  .main-nav {
    position: static; visibility: visible; opacity: 1; transform: none;
    background: none; border: 0; box-shadow: none; transition: none;
    margin-left: auto;
  }
  .main-nav ul { width: auto; display: flex; gap: 22px; padding: 0; }
  .main-nav li + li { border: 0; }
  .main-nav a {
    position: relative; min-height: 44px;
    font-family: var(--font-body); font-size: 13px; font-weight: 500; letter-spacing: 0.12em;
    color: #c9ced5;
  }
  .main-nav a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 2px;
    background: var(--red); transform: scaleX(0); transform-origin: left;
    transition: transform 0.25s var(--ease);
  }
  .main-nav a:hover { color: var(--white); }
  .main-nav a:hover::after,
  .main-nav a[aria-current="true"]::after { transform: scaleX(1); }
  .main-nav a[aria-current="true"] { color: var(--white); box-shadow: none; padding-left: 0; }
  .header-cta { margin-left: 0; }
  .btn-sm { min-height: 44px; padding: 0 18px; font-size: 14px; }
  .brand-name { font-size: 25px; }
  .brand-car { width: 96px; }
}

@media (min-width: 1280px) {
  .main-nav ul { gap: 28px; }
  .brand-name { font-size: 26px; }
}

/* Laptops con pantalla bajita (ej. 1280x720): que los botones del hero se vean sin bajar */
@media (min-width: 1024px) and (max-height: 820px) {
  .hero { padding: 40px 0 48px; }
  .hero-car { width: 300px; margin-bottom: 6px; }
  .hero-tag { margin-bottom: 12px; }
  .hero-title { margin-bottom: 12px; }
  .hero-name { font-size: clamp(54px, 10.5vh, 84px); }
  .hero-sub { font-size: clamp(22px, 3.6vh, 30px); margin-top: 10px; }
  .hero-lead { font-size: 18px; }
  .hero-actions { margin-top: 20px; }
  .hero-specs { margin-top: 28px; }
}

/* =========================================================
   Footer legal + páginas de términos, privacidad y 404
   ========================================================= */
.footer-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 18px; }
.footer-legal a {
  display: inline-flex; align-items: center; min-height: 40px;
  color: var(--silver); font-size: 13px; text-decoration: underline;
  text-decoration-color: rgba(184, 190, 198, 0.4); text-underline-offset: 4px;
}
.footer-legal a:hover, .footer-legal a[aria-current="page"] { color: var(--white); text-decoration-color: var(--red); }

.legal { padding-top: 48px; }
.legal-inner { max-width: 760px; }
.legal .section-title { font-size: clamp(2rem, 4vw + 1rem, 3rem); }
.legal-fecha { margin-top: 10px; color: var(--ink-muted); font-size: 14.5px; }
.legal h2 {
  margin: 34px 0 10px;
  font-family: var(--font-head); font-weight: 600; text-transform: uppercase;
  font-size: 21px; letter-spacing: 0.03em; line-height: 1.2; color: var(--ink);
}
.legal p { margin: 0 0 12px; color: #2b3038; font-size: 16.5px; line-height: 1.65; max-width: 68ch; }
.legal a:not(.btn) { color: var(--ink); font-weight: 600; text-decoration-color: var(--red); text-underline-offset: 3px; }
.legal-volver { margin-top: 36px !important; }

.error-404 { min-height: calc(100svh - var(--header-h) - 1px); display: grid; align-items: center; }
.error-inner { text-align: center; display: grid; justify-items: center; }
.error-code {
  font-family: var(--font-head); font-weight: 700; line-height: 0.9;
  font-size: clamp(96px, 26vw, 200px); color: var(--white);
  padding-bottom: 10px; margin-bottom: 18px; border-bottom: 6px solid var(--red);
}
.error-404 .section-intro { margin-inline: auto; text-align: center; }
.error-actions { display: grid; gap: 12px; margin-top: 28px; width: min(420px, 100%); }
@media (min-width: 640px) {
  .error-actions { display: flex; justify-content: center; width: auto; }
}
@media (min-width: 1024px) {
  .legal { padding-top: 72px; }
}
