/* Webs de ejemplo (talleres ficticios)
   Estilo propio, distinto del de ÁUREA: así se ve la web de un taller, no la del estudio.
   Base = Taller Salas (claro). Al final, .tema-arce = Talleres Arce (oscuro). */

:root {
  --bg: #f5f3ef;
  --card: #fff;
  --ink: #16181c;
  --muted: #5b6068;
  --line: #e2ddd5;
  --navy: #13284a;
  --acento: #e0531d;
  --acento-2: #c44513;
  --wa: #1d9b54;
  --f: "Barlow", system-ui, -apple-system, sans-serif;
  --f-t: "Barlow Condensed", "Barlow", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding-bottom: 76px;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--f);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
svg { flex: none; }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 2px; }

.ts-wrap { max-width: 1120px; margin-inline: auto; padding-inline: 20px; }

.ts-concepto {
  padding: 9px 16px;
  background: var(--ink); color: #d9d4ca;
  font: 600 11px/1.3 var(--f); letter-spacing: .12em; text-transform: uppercase; text-align: center;
}
.ts-concepto a { margin-left: 10px; color: #d6a54a; }

/* Cabecera con el teléfono siempre a la vista */
.ts-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.ts-header__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.ts-marca { display: grid; color: inherit; line-height: 1.1; text-decoration: none; }
.ts-marca strong { color: var(--navy); font: 700 24px/1 var(--f-t); letter-spacing: .01em; text-transform: uppercase; }
.ts-marca span { margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.ts-tel {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 10px;
  background: var(--acento); color: #fff;
  font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap;
}
.ts-tel svg { width: 18px; height: 18px; }

/* Portada */
.ts-hero { display: grid; gap: 22px; padding-block: 20px 40px; }
.ts-hero h1 { color: var(--navy); font: 700 clamp(34px, 5vw, 60px)/1.02 var(--f-t); text-wrap: balance; }
.ts-hero p { margin-top: 14px; color: var(--muted); font-size: 18px; }
.ts-acciones { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.ts-acciones .ts-btn { flex: 1 1 140px; }
.ts-hero__foto { order: -1; }

.ts-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px; border-radius: 12px;
  background: var(--navy); color: #fff;
  font-weight: 700; font-size: 17px; text-decoration: none;
}
.ts-btn svg { width: 20px; height: 20px; }
.ts-btn--llamar { background: var(--acento); }
.ts-btn--wa { background: var(--wa); }
.ts-btn--linea { background: transparent; color: var(--navy); border: 2px solid var(--navy); }

.ts-foto {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: repeating-linear-gradient(135deg, #e6e1d9 0 12px, #ece8e1 12px 24px);
}
.ts-foto img { width: 100%; height: 100%; object-fit: cover; }
.ts-foto.is-empty img { display: none; }
.ts-hueco { display: none; position: absolute; inset: 0; place-items: center; color: #8a8378; font: 600 13px var(--f); letter-spacing: .04em; }
.ts-foto.is-empty .ts-hueco { display: grid; }

/* Secciones */
.ts-sec { padding-block: 44px; }
.ts-sec h2 { margin-bottom: 20px; color: var(--navy); font: 700 34px/1 var(--f-t); letter-spacing: .02em; text-transform: uppercase; }

.ts-servicios { display: grid; gap: 12px; border-radius: 16px; }
.ts-servicios li {
  display: grid; grid-template-columns: 44px 1fr; gap: 4px 14px;
  padding: 18px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--card);
}
.ts-servicios svg { grid-row: span 2; width: 44px; height: 44px; padding: 10px; border-radius: 10px; background: #fdeee6; color: var(--acento); }
.ts-servicios h3 { color: var(--navy); font: 700 19px/1.2 var(--f); }
.ts-servicios p { color: var(--muted); font-size: 16px; }

.ts-fotos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.ts-horario { display: grid; gap: 20px; }
.ts-horario__info { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.ts-horario__info h2 { margin-bottom: 8px; }
.ts-horario dl div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ts-horario dt { font-weight: 600; }
.ts-horario dd { color: var(--navy); font-weight: 700; font-variant-numeric: tabular-nums; }
.ts-horario address { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--muted); font-style: normal; }
.ts-horario address svg { width: 20px; height: 20px; color: var(--acento); }
.ts-mapa { display: grid; gap: 12px; }
.ts-mapa svg { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 16px; }

.ts-pie { padding: 28px 20px 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; text-align: center; }
.ts-pie a { color: var(--acento-2); font-weight: 700; }

/* Barra fija de abajo: llamar o escribir a un toque */
.ts-barra {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.ts-barra a {
  display: flex; align-items: center; justify-content: center;
  min-height: 48px; border-radius: 12px;
  background: var(--acento); color: #fff;
  font-weight: 700; text-decoration: none;
}
.ts-barra a + a { background: var(--wa); }

.ts-aviso {
  position: fixed; left: 50%; bottom: 90px; z-index: 30;
  width: min(92vw, 420px); padding: 14px 18px; border-radius: 12px;
  background: var(--ink); color: #fff;
  font-size: 15px; line-height: 1.4; text-align: center;
  opacity: 0; translate: -50% 12px; pointer-events: none;
  transition: opacity .3s, translate .3s;
}
.ts-aviso.is-on { opacity: 1; translate: -50% 0; }

@media (min-width: 760px) {
  .ts-servicios { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .ts-barra { display: none; }
  .ts-hero { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; padding-block: 56px 72px; }
  .ts-hero__foto { order: 0; }
  .ts-horario { grid-template-columns: 5fr 7fr; align-items: start; }
}

/* ───────── Talleres Arce: oscuro, industrial, foto a todo lo ancho ───────── */
.tema-arce {
  --bg: #121416;
  --card: #1b1e21;
  --ink: #eef0f2;
  --muted: #9aa1a8;
  --line: #2a2e33;
  --navy: #eef0f2;
  --acento: #f5c400;
  --acento-2: #f5c400;
  --wa: #25a35a;
  --f: "Source Sans 3", system-ui, -apple-system, sans-serif;
  --f-t: "Oswald", "Source Sans 3", sans-serif;
}
.tema-arce .ts-concepto { background: #000; }
.tema-arce .ts-header { background: rgba(18, 20, 22, .94); }
.tema-arce .ts-marca strong { font-weight: 600; letter-spacing: .04em; }
.tema-arce .ts-tel, .tema-arce .ts-btn--llamar, .tema-arce .ts-barra a:first-child { color: #121416; }
.tema-arce .ts-btn--linea { color: var(--acento); border-color: var(--acento); }
.tema-arce .ts-barra { background: rgba(18, 20, 22, .96); }
.tema-arce .ts-foto { background: repeating-linear-gradient(135deg, #1b1e21 0 12px, #202428 12px 24px); }
.tema-arce .ts-hueco { color: #6c737a; }

.ts-portada { position: relative; display: grid; }
.ts-portada__foto { aspect-ratio: auto; height: min(72svh, 640px); min-height: 420px; border-radius: 0; grid-area: 1 / 1; }
.ts-portada__foto::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, #121416 4%, rgba(18, 20, 22, .55) 50%, rgba(18, 20, 22, .15));
}
.ts-portada__texto { grid-area: 1 / 1; align-self: end; position: relative; width: 100%; padding-block: 0 36px; }
.ts-etiqueta { color: var(--acento); font: 600 13px/1 var(--f-t); letter-spacing: .16em; text-transform: uppercase; }
.ts-portada h1 { max-width: 16ch; margin-top: 14px; font: 600 clamp(36px, 5.6vw, 68px)/1.04 var(--f-t); text-transform: uppercase; text-wrap: balance; }
.ts-portada p:not(.ts-etiqueta) { max-width: 46ch; margin-top: 16px; color: #c9ced3; font-size: 18px; }
.ts-portada .ts-acciones { max-width: 460px; }

.ts-lista { display: grid; gap: 0; border-top: 1px solid var(--line); }
.ts-lista li { display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.ts-lista span { color: var(--acento); font: 600 26px/1 var(--f-t); }
.ts-lista h3 { font: 600 22px/1.1 var(--f-t); letter-spacing: .02em; text-transform: uppercase; }
.ts-lista p { margin-top: 6px; color: var(--muted); }

@media (min-width: 760px) {
  .ts-lista { grid-template-columns: 1fr 1fr; column-gap: 40px; }
}
/* En móvil la barra fija de abajo ya lleva Llamar/WhatsApp: fuera los de la portada */
@media (max-width: 899px) {
  .ts-portada .ts-acciones { display: none; }
}

/* ───────── Escena de scroll (Taller Salas): el coche en el estudio y luego en la carretera ─────────
   Solo con fotogramas (html.con-escena, desde js/ejemplo.js). Sin ellos, la portada es la foto fija. */
.ts-escena__poster, .ts-escena__canvas, .ts-escena__frases { display: none; }

/* Empieza debajo de la cabecera fija (65 px), para que el vídeo ocupe toda la pantalla desde el principio */
.con-escena .ts-escena { position: relative; height: 420vh; margin-top: -65px; background: #0b0c0e; }
.con-escena .ts-escena__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.con-escena .ts-escena__poster,
.con-escena .ts-escena__canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Los textos van arriba: en el estudio y en la carretera la parte de arriba es fondo liso o cielo,
   y el coche ocupa el centro. Por eso se oscurece desde arriba. */
.con-escena .ts-escena__sticky::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 10, 14, .78) 0%, rgba(8, 10, 14, .38) 30%, rgba(8, 10, 14, 0) 52%);
}

.con-escena .ts-hero {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  grid-template-columns: 1fr;
  padding-block: calc(65px + clamp(20px, 5vh, 52px)) 0;
  opacity: var(--intro, 1);
  transform: translateY(calc((1 - var(--intro, 1)) * -30px));
}
.con-escena .sin-intro .ts-hero { pointer-events: none; }
.con-escena .ts-hero__foto { display: none; }
.con-escena .ts-hero h1 { max-width: 20ch; color: #fff; font-size: clamp(30px, 3.6vw, 52px); }
.con-escena .ts-hero p { max-width: 52ch; margin-top: 10px; color: rgba(255, 255, 255, .88); }
.con-escena .ts-hero .ts-acciones { max-width: 440px; margin-top: 18px; }

.con-escena .ts-escena__frases {
  display: grid; align-content: start;
  position: absolute; inset: 0; z-index: 2;
  padding-top: calc(65px + clamp(20px, 5vh, 52px));
  pointer-events: none;
}
.ts-frase {
  grid-area: 1 / 1;
  max-width: 20ch;
  color: #fff;
  font: 700 clamp(30px, 3.8vw, 56px)/1.04 var(--f-t);
  text-wrap: balance;
  opacity: var(--o, 0);
  transform: translateY(calc((1 - var(--o, 0)) * 20px));
}
.ts-frase:nth-child(1) { --o: var(--f1, 0); }
.ts-frase:nth-child(2) { --o: var(--f2, 0); }
.ts-frase small { display: block; max-width: 44ch; margin-top: 12px; color: rgba(255, 255, 255, .86); font: 500 18px/1.45 var(--f); }

/* En móvil la barra fija de abajo ya lleva Llamar/WhatsApp, y el hueco de arriba es más bajo:
   se quitan los botones y el párrafo de la portada (los servicios vienen justo después) */
@media (max-width: 899px) {
  .con-escena .ts-hero .ts-acciones,
  .con-escena .ts-hero p { display: none; }
  .ts-frase small { font-size: 16px; }
}

/* Modo captura (tools/capturas.mjs): la escena se queda quieta en su primer fotograma */
.captura .ts-escena { height: auto; }
.captura .ts-escena__sticky { position: relative; height: 720px; }
.captura .ts-escena__canvas, .captura .ts-escena__frases { display: none; }
