/*
 * La web pública del taller. Hoja APARTE de `app.css` a propósito: esto no es
 * una pantalla de Garage, es la vitrina de un taller, y un cambio en el
 * armazón de la aplicación no puede mover la página que ve un cliente.
 *
 * Oscura, a sangre, con un solo color del taller (`--acento`, lo pone la
 * plantilla desde `sitio.color_acento`). Todo el movimiento respeta
 * `prefers-reduced-motion`, y sin JavaScript todo se ve: el estado oculto de
 * `.sw-revela` sólo existe bajo `.sw-js`, que pone el propio guion.
 */

:root {
  --acento: #e10600;
  --fondo: #0b0b0d;
  --fondo-2: #141417;
  --fondo-3: #1d1d21;
  --texto: #f4f4f5;
  --suave: #a1a1aa;
  --linea: rgba(255, 255, 255, 0.1);
  --radio: 14px;
  --ancho: 1180px;
  --fuente: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

.sw {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--fuente);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.sw a { color: inherit; }

.sw img { max-width: 100%; display: block; }

.sw-contenedor {
  width: 100%;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 20px;
}

.sw-estrecho { max-width: 780px; }

.sw-centrado { text-align: center; }

/* --- vista previa dentro de Garage ---------------------------------------- */

.sw-previa {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: #fde047;
  color: #111;
  font-size: 14px;
}

.sw-previa a { color: #111; font-weight: 700; }

/* --- cabecera ------------------------------------------------------------- */

.sw-cabecera {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 28px;
  transition: background 0.3s, padding 0.3s, box-shadow 0.3s;
}

/* Fondo casi opaco y SIN `backdrop-filter`: el desenfoque obliga a
   recomponer lo que pasa por debajo en cada fotograma de desplazamiento, y
   esta página la abre sobre todo un teléfono. No está medido; es la opción
   barata y se ve igual sobre un fondo casi negro. */
.sw-cabecera--solida {
  background: rgba(11, 11, 13, 0.96);
  padding-top: 10px;
  padding-bottom: 10px;
  box-shadow: 0 1px 0 var(--linea);
}

.sw-marca { text-decoration: none; display: flex; align-items: center; }

.sw-marca__logo { height: 44px; width: auto; }

.sw-marca__nombre {
  white-space: nowrap;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sw-nav { display: flex; gap: 26px; margin-left: auto; }

.sw-nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--suave);
  transition: color 0.2s;
}

.sw-nav a:hover { color: var(--texto); }

.sw-cabecera__cta { padding: 10px 18px; font-size: 14px; }

/* --- botones -------------------------------------------------------------- */

.sw-boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.sw-boton:hover { transform: translateY(-2px); }

.sw-boton--acento {
  background: var(--acento);
  color: #fff;
  box-shadow: 0 10px 30px -10px var(--acento);
}

.sw-boton--borde { border-color: rgba(255, 255, 255, 0.35); color: var(--texto); }

.sw-boton--borde:hover { border-color: var(--texto); background: rgba(255, 255, 255, 0.06); }

.sw-boton--waze { background: #33ccff; color: #0b0b0d; }

.sw-boton--grande { padding: 16px 30px; font-size: 16px; }

.sw-enlace-flecha {
  display: inline-block;
  margin-top: 8px;
  font-weight: 700;
  text-decoration: none;
  color: var(--acento);
  border-bottom: 2px solid currentColor;
}

.sw-enlace-flecha::after { content: " →"; }

/* --- portada -------------------------------------------------------------- */

.sw-portada {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 140px 0 110px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(1200px 600px at 80% 20%, color-mix(in srgb, var(--acento) 35%, transparent), transparent 60%),
    linear-gradient(160deg, #19191d, var(--fondo));
}

.sw-portada__fondo { position: absolute; inset: 0; z-index: -2; }

/* Un iframe no tiene `object-fit`: se agranda por encima de la pantalla y se
   centra, para que el vídeo cubra entero en cualquier proporción. */
.sw-portada__video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100vw, 177.78vh);
  height: max(56.25vw, 100vh);
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
}

.sw-portada__imagen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: sw-acercar 18s ease-out both;
}

.sw-portada__velo {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(11, 11, 13, 0.55) 0%, rgba(11, 11, 13, 0.25) 40%, rgba(11, 11, 13, 0.95) 100%);
}

.sw-portada__texto { position: relative; }

.sw-portada__taller {
  margin: 0 0 12px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--acento);
}

.sw-portada__titular {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(42px, 8vw, 104px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.sw-portada__bajada {
  max-width: 560px;
  margin: 22px 0 0;
  font-size: clamp(17px, 2vw, 21px);
  color: #d4d4d8;
}

.sw-portada__acciones { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.sw-portada__bajar {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
}

.sw-portada__bajar::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: #fff;
  animation: sw-rueda 1.8s ease-in-out infinite;
}

/* --- la cinta ------------------------------------------------------------- */

.sw-cinta {
  overflow: hidden;
  background: var(--acento);
  color: #fff;
  padding: 14px 0;
  transform: rotate(-1.2deg);
  margin: -14px -10px 0;
}

.sw-cinta__pista {
  display: flex;
  width: max-content;
  animation: sw-desfile 32s linear infinite;
}

.sw-cinta__item {
  padding: 0 28px;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sw-cinta__item::after { content: "✦"; margin-left: 56px; opacity: 0.7; }

/* --- secciones ------------------------------------------------------------ */

.sw-seccion { padding: 110px 0; }

.sw-seccion--oscura { background: var(--fondo-2); }

.sw-antetitulo {
  margin: 0 0 10px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--acento);
}

.sw-titulo {
  margin: 0 0 48px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.sw-prosa { color: #d4d4d8; font-size: 18px; }

.sw-prosa p { margin: 0 0 16px; }

/* --- servicios ------------------------------------------------------------ */

.sw-servicio { padding: 40px 0 60px; }

.sw-servicio__rejilla {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}

.sw-servicio--par .sw-servicio__media { order: 2; }

.sw-servicio__media {
  position: relative;
  border-radius: var(--radio);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--fondo-3);
}

.sw-servicio__imagen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.sw-servicio__media:hover .sw-servicio__imagen { transform: scale(1.06); }

.sw-servicio__sin-imagen {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 160px;
  font-weight: 900;
  color: var(--acento);
  background:
    radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--acento) 30%, transparent), transparent 60%),
    var(--fondo-3);
}

.sw-servicio__numero {
  position: absolute;
  left: 18px;
  bottom: 10px;
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

.sw-servicio__texto { max-width: 560px; }

.sw-servicio__titulo {
  margin: 0 0 16px;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.05;
  font-weight: 900;
  text-transform: uppercase;
}

.sw-servicio__descripcion { color: #d4d4d8; }

.sw-servicio__descripcion p { margin: 0 0 14px; }

/* --- carrusel de vídeos --------------------------------------------------- */

.sw-carrusel {
  display: flex;
  gap: 18px;
  margin-top: 36px;
  padding-bottom: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--acento) transparent;
}

.sw-video {
  flex: 0 0 300px;
  margin: 0;
  scroll-snap-align: start;
}

.sw-video__marco {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  border: 0;
  border-radius: var(--radio);
  background: var(--fondo-3);
}

/* El embebido de Instagram lleva su cabecera y su pie: necesita más alto que
   el vídeo solo, o corta justo el vídeo. */
.sw-video__marco--instagram { aspect-ratio: auto; height: 620px; background: #fff; }

.sw-video__pie { margin-top: 10px; font-size: 14px; color: var(--suave); }

/* --- ubicación ------------------------------------------------------------ */

.sw-ubicacion {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: stretch;
}

.sw-ubicacion__mapa {
  min-height: 380px;
  border-radius: var(--radio);
  overflow: hidden;
  background: var(--fondo-3);
}

.sw-ubicacion__mapa iframe {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border: 0;
  filter: grayscale(0.4) contrast(1.05);
}

.sw-ubicacion__datos {
  padding: 32px;
  border-radius: var(--radio);
  background: var(--fondo-3);
  border: 1px solid var(--linea);
}

.sw-dato__titulo {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--acento);
}

.sw-dato { margin: 0 0 24px; font-size: 18px; }

.sw-llegar { display: flex; flex-wrap: wrap; gap: 12px; }

/* --- contacto ------------------------------------------------------------- */

.sw-contacto {
  background:
    radial-gradient(900px 400px at 50% 0%, color-mix(in srgb, var(--acento) 25%, transparent), transparent 70%),
    var(--fondo);
}

.sw-contacto__rejilla {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}

.sw-contacto__acciones {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 28px;
}

/* --- formulario ----------------------------------------------------------- */

.sw-formulario {
  padding: 32px;
  border-radius: var(--radio);
  background: var(--fondo-2);
  border: 1px solid var(--linea);
}

.sw-formulario__campos { border: 0; margin: 0; padding: 0; display: grid; gap: 18px; }

.sw-formulario__par { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.sw-formulario__aviso,
.sw-formulario__error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
}

.sw-formulario__aviso { background: rgba(253, 224, 71, 0.12); color: #fde047; }

.sw-formulario__error { background: rgba(239, 68, 68, 0.14); color: #fca5a5; }

.sw-formulario__gracias h3 { margin: 0 0 8px; font-size: 26px; text-transform: uppercase; }

.sw-formulario__gracias p { margin: 0; color: #d4d4d8; }

.sw-campo { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--suave); }

.sw-campo input,
.sw-campo select,
.sw-campo textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--fondo);
  color: var(--texto);
  font: inherit;
  font-weight: 400;
  font-size: 16px;
}

.sw-campo input:focus,
.sw-campo select:focus,
.sw-campo textarea:focus { outline: 2px solid var(--acento); outline-offset: 1px; }

.sw-campo__error { font-style: normal; font-weight: 600; color: #fca5a5; }

.sw-opciones { display: flex; flex-wrap: wrap; gap: 10px; }

.sw-opcion {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--texto);
  font-weight: 600;
  cursor: pointer;
}

.sw-opcion input { accent-color: var(--acento); }

.sw-consentimiento { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--suave); }

.sw-consentimiento input { margin-top: 3px; accent-color: var(--acento); }

/* Fuera de la pantalla y fuera del orden de tabulación: una persona no lo ve;
   un robot que rellena todo lo que encuentra, sí. */
.sw-cebo { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* --- pie ------------------------------------------------------------------ */

.sw-pie { padding: 56px 0 90px; border-top: 1px solid var(--linea); background: var(--fondo); }

.sw-pie__rejilla { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }

.sw-pie__nombre { margin: 0; font-weight: 900; text-transform: uppercase; letter-spacing: 0.05em; }

.sw-pie__dato { margin: 4px 0 0; color: var(--suave); }

.sw-redes { display: flex; flex-wrap: wrap; gap: 20px; }

.sw-redes a { color: var(--suave); text-decoration: none; font-weight: 600; }

.sw-redes a:hover { color: var(--texto); }

.sw-pie__firma { margin-top: 32px; font-size: 13px; color: #71717a; }

/* --- WhatsApp flotante ---------------------------------------------------- */

.sw-flotante {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 55;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 12px 30px -8px rgba(37, 211, 102, 0.7);
  animation: sw-latido 2.6s ease-in-out infinite;
}

.sw-flotante svg { width: 32px; height: 32px; }

/* --- movimiento ----------------------------------------------------------- */

.sw-js .sw-revela {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.sw-js .sw-revela.sw-visible { opacity: 1; transform: none; }

@keyframes sw-desfile { to { transform: translateX(-50%); } }

@keyframes sw-acercar { from { transform: scale(1.12); } to { transform: scale(1); } }

@keyframes sw-rueda {
  0% { opacity: 0; transform: translateY(0); }
  40% { opacity: 1; }
  80% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 0; }
}

@keyframes sw-latido {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sw-cinta__pista, .sw-portada__imagen, .sw-flotante, .sw-portada__bajar::after { animation: none; }
  .sw-js .sw-revela { opacity: 1; transform: none; transition: none; }
}

/* --- teléfono ------------------------------------------------------------- */

@media (max-width: 860px) {
  .sw-nav { display: none; }
  .sw-cabecera { padding: 14px 16px; }
  /* En el teléfono ya está el botón flotante de WhatsApp: el de la cabecera
     sólo empujaría el nombre del taller a dos líneas. */
  .sw-cabecera__cta { display: none; }
  .sw-marca__logo { height: 36px; }
  .sw-seccion { padding: 76px 0; }
  .sw-servicio__rejilla, .sw-ubicacion, .sw-contacto__rejilla { grid-template-columns: 1fr; gap: 28px; }
  .sw-formulario { padding: 22px; }
  .sw-formulario__par { grid-template-columns: 1fr; }
  .sw-servicio--par .sw-servicio__media { order: 0; }
  .sw-video { flex-basis: 78vw; }
  .sw-portada { padding: 120px 0 96px; }
  .sw-contenedor { padding: 0 16px; }
}
