/* ===== SL Taller · estilos ===== */
/* Fuentes alojadas en la propia web (antes, Google Fonts): Archivo y Manrope variables, solo alfabeto latino */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400 800; font-stretch: 100% 125%; font-display: swap; src: url(fonts/archivo-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/manrope-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #0a0a0b;
  --bg-2: #111113;
  --bg-3: #17171a;
  --line: rgba(255, 255, 255, 0.09);
  --fg: #f3f1ec;
  --muted: #a09d96;
  --accent: #d4b06a;
  --accent-2: #f0d9a0;
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --radius: 4px;
  --header-h: 72px;
  --container: 1200px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 700; line-height: 1.02; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container { width: min(var(--container), 100% - 48px); margin-inline: auto; }
.container.narrow { max-width: 760px; }
.eyebrow {
  font-family: var(--font-display); font-stretch: 120%; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.22em; font-size: 12px; color: var(--accent); margin-bottom: 18px;
}
.h2 { font-size: clamp(32px, 4.4vw, 56px); max-width: 16ch; margin-bottom: 36px; font-stretch: 105%; }
.lead { font-size: clamp(16px, 1.3vw, 19px); color: var(--muted); max-width: 54ch; }

/* ---- botones ---- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 22px;
  font-family: var(--font-display); font-stretch: 110%; font-weight: 600; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #141006; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { background: transparent; color: var(--fg); border-color: rgba(255,255,255,.22); }
.btn-ghost:hover { border-color: var(--fg); }
.btn-cta { background: rgba(255,255,255,.06); color: var(--fg); backdrop-filter: blur(10px); }
.btn-cta:hover { background: rgba(255,255,255,.12); }

/* ---- cabecera ---- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 clamp(20px, 3vw, 44px);
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { background: rgba(10,10,11,.72); backdrop-filter: blur(14px); border-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid; place-items: center; width: 40px; height: 40px; border: 1.5px solid var(--accent); border-radius: var(--radius);
  font-family: var(--font-display); font-stretch: 125%; font-weight: 800; font-size: 15px; color: var(--accent); letter-spacing: 0.02em;
}
.brand-logo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.brand-text { display: flex; flex-direction: column; font-family: var(--font-display); font-stretch: 120%; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; font-size: 15px; line-height: 1; }
.brand-text small { margin-top: 5px; font-family: var(--font-body); font-weight: 500; text-transform: none; letter-spacing: 0.04em; font-size: 11px; color: var(--muted); }
.site-nav { display: flex; gap: 30px; }
.site-nav a { font-size: 14px; font-weight: 600; color: var(--muted); transition: color .2s; }
.site-nav a:hover { color: var(--fg); }

/* ---- escena: el coche en fotos ---- */
#scene { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: var(--bg) url(img/recorrido/frente.webp?v=2) 28% center / cover no-repeat; }
/* Mientras carga la foto en el lienzo se ve la misma foto de fondo; el lienzo aparece encima con un fundido */
.canvas-wrap::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; transition: opacity .6s ease;
  background:
    linear-gradient(90deg, rgba(10,10,11,.88) 0%, rgba(10,10,11,.55) 34%, rgba(10,10,11,0) 62%),
    linear-gradient(180deg, rgba(10,10,11,.55) 0%, rgba(10,10,11,0) 18%, rgba(10,10,11,0) 78%, rgba(10,10,11,.9) 100%);
}
#scene.in-stages .canvas-wrap::after { opacity: .55; }
.canvas-wrap { position: absolute; inset: 0; }
#car-canvas { width: 100% !important; height: 100% !important; display: block; transition: opacity 1.1s ease; }
#scene.is-loading #car-canvas { opacity: 0; }
.leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.leaders .lead { stroke: var(--accent); stroke-width: 1.2; opacity: .8; }
.leaders .dot { fill: var(--accent); }
.leaders .ring { fill: none; stroke: var(--accent); stroke-width: 1.2; opacity: .55; }
.leaders g { transition: opacity .15s linear; }

.hero-copy {
  position: absolute; left: clamp(20px, 5vw, 80px); bottom: clamp(70px, 12vh, 140px); z-index: 3; max-width: 640px;
}
.hero-copy h1 { font-size: clamp(38px, 5.6vw, 76px); font-stretch: 105%; max-width: 12ch; margin-bottom: 22px; text-wrap: balance; }
.hero-copy .lead { margin-bottom: 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.scroll-hint {
  margin: 26px 0 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  color: var(--muted); font: 500 11px/1.4 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
  transition: opacity .3s;
}
.scroll-hint { cursor: pointer; }
.scroll-hint svg { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
#scene.in-stages .scroll-hint { opacity: 0; pointer-events: none; }

.stage-nav {
  position: absolute; right: clamp(18px, 3vw, 44px); bottom: 30px; z-index: 4;
  display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 14px 26px;
}
.stage-nav a { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-stretch: 115%; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.62); transition: color .25s; }
.stage-nav a i { font-style: normal; font-size: 11px; color: var(--accent); opacity: .9; }
.stage-nav a::before { content: ""; width: 22px; height: 1px; background: currentColor; transition: width .3s; }
.stage-nav a.active { color: var(--fg); }
.stage-nav a.active::before { width: 40px; background: var(--accent); }

.stage { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.stage .cards { display: contents; }
.stage-title {
  position: absolute; left: var(--x); top: var(--y); opacity: 0;
  display: flex; align-items: baseline; gap: 14px; font-size: clamp(24px, 2.6vw, 36px); font-stretch: 110%;
}
.stage-title i { font-style: normal; font-size: 14px; color: var(--accent); letter-spacing: .2em; }
.callout {
  position: absolute; left: var(--x); top: var(--y); width: min(300px, 26vw); opacity: 0; pointer-events: auto;
  padding: 16px 18px; background: rgba(14,14,16,.74); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.callout.low { top: auto; bottom: var(--b); }   /* bocadillos anclados por abajo (lateral) */
.callout::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; background: var(--accent); }
.callout h3 { font-size: 17px; font-stretch: 108%; margin-bottom: 6px; }
.callout p { font-size: 13.5px; color: var(--muted); line-height: 1.45; }

/* ---- secciones ---- */
.section { padding: clamp(80px, 10vw, 140px) 0; }
.section-dark { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.services-lead { margin: -16px 0 40px; }   /* bajo el título de Servicios */
.grid.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); transition: border-color .25s, transform .25s; }
.card:hover { border-color: rgba(212,176,106,.5); transform: translateY(-3px); }
.card svg { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 20px; }
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.split-media { align-items: center; }
.media-card { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); box-shadow: 0 30px 60px rgba(0,0,0,.4); }
.media-card img { display: block; width: 100%; height: auto; aspect-ratio: 1800 / 1005; object-fit: cover; }
.checks { list-style: none; padding: 0; margin: 28px 0 32px; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 28px; color: var(--fg); }
.checks li::before { content: ""; position: absolute; left: 0; top: 9px; width: 14px; height: 7px; border-left: 1.6px solid var(--accent); border-bottom: 1.6px solid var(--accent); transform: rotate(-45deg); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.section-head .h2 { margin-bottom: 0; }
.ig-profile { display: inline-flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; border: 1px solid var(--line); border-radius: 999px; transition: border-color .2s; }
.ig-profile:hover { border-color: rgba(212,176,106,.5); }
.ig-profile img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.ig-profile span { display: flex; flex-direction: column; line-height: 1.2; }
.ig-profile strong { font-family: var(--font-display); font-stretch: 108%; font-size: 14px; }
.ig-profile small { font-size: 12px; color: var(--muted); }
.ig-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ig-tile { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.ig-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.ig-tile:hover img { transform: scale(1.05); }
.ig-tile span { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 14px 12px; font-size: 13px; color: var(--fg); background: linear-gradient(transparent, rgba(0,0,0,.8)); opacity: 0; transition: opacity .3s; }
.ig-tile:hover span, .ig-tile:focus-visible span { opacity: 1; }
.ig-foot { margin-top: 28px; display: flex; justify-content: center; }

.info { margin: 32px 0 0; display: grid; gap: 18px; }
.info div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: baseline; }
.info dt { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-family: var(--font-display); font-stretch: 115%; }
.info dd { margin: 0; font-size: 16px; }
.info dd a:hover { color: var(--accent); }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.field { display: grid; gap: 7px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-family: var(--font-display); font-stretch: 115%; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; background: var(--bg-2); color: var(--fg); border: 1px solid var(--line); border-radius: var(--radius);
  font: 500 16px/1.4 var(--font-body); transition: border-color .2s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.form .btn { grid-column: 1 / -1; justify-content: center; }
.form-error { grid-column: 1 / -1; color: #ff8a80; font-size: 14px; }
.form-ok { grid-column: 1 / -1; color: var(--accent-2); font-size: 14px; }
.form-note { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }

/* ---- mapa ---- */
.map-block { position: relative; margin-top: clamp(36px, 5vw, 64px); }
.map { height: clamp(340px, 46vw, 460px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); overflow: hidden; z-index: 0; }
.map.map-invert .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.92) saturate(.35); }   /* OSM claro → oscuro */
.map.leaflet-container { background: #0d0d0f; font-family: var(--font-body); }
.map .leaflet-control-zoom a { background: #17171a; color: var(--fg); border-color: rgba(255,255,255,.12); }
.map .leaflet-control-zoom a:hover { background: #222226; }
.map .leaflet-control-attribution { background: rgba(10,10,11,.7); color: var(--muted); font-size: 10px; }
.map .leaflet-control-attribution a { color: var(--fg); }
.map .leaflet-popup-content-wrapper, .map .leaflet-popup-tip { background: #17171a; color: var(--fg); box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.map .leaflet-popup-content-wrapper { border-radius: var(--radius); border: 1px solid rgba(212,176,106,.4); }
.map .leaflet-popup-content { margin: 12px 16px; font-size: 13px; line-height: 1.45; }
.map .leaflet-popup-content strong { font-family: var(--font-display); font-stretch: 108%; }
.map .leaflet-popup-close-button { color: var(--muted); }
.map-pin span { display: block; width: 26px; height: 26px; margin: 2px 4px; border-radius: 50% 50% 50% 0; background: var(--accent); transform: rotate(-45deg); box-shadow: 0 0 0 4px rgba(212,176,106,.25), 0 8px 18px rgba(0,0,0,.6); position: relative; }
.map-pin span::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #141006; }
.map-card { position: absolute; left: 24px; bottom: 24px; z-index: 2; max-width: 380px; padding: 22px 24px; background: rgba(14,14,16,.9); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.map-card .eyebrow { margin-bottom: 10px; }
.map-card h3 { font-size: 22px; margin-bottom: 8px; }
.map-card p { color: var(--muted); font-size: 15px; }
.map-card .map-meta { font-size: 13.5px; margin-top: 4px; }
.map-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.map-actions .btn { min-height: 42px; padding: 0 16px; font-size: 13px; }

.site-footer { padding: 48px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.site-footer .brand-logo { width: 60px; height: 60px; }
.site-footer .brand-text { font-size: 19px; }
.site-footer .brand-text small { font-size: 13px; }
.credits { margin-top: 24px; font-size: 13px; color: var(--muted); }
.credits a { text-decoration: underline; text-underline-offset: 3px; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 22px; }
.site-footer a:hover { color: var(--fg); }

/* ---- revelado ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.grid.services .reveal:nth-child(2) { transition-delay: .08s; }
.grid.services .reveal:nth-child(3) { transition-delay: .16s; }
.grid.services .reveal:nth-child(4) { transition-delay: .24s; }
.grid.services .reveal:nth-child(5) { transition-delay: .32s; }
.grid.services .reveal:nth-child(6) { transition-delay: .4s; }

/* ---- movimiento reducido ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint svg { animation: none; }
  body.reduced #scene { height: auto; min-height: 100vh; }
  body.reduced .canvas-wrap { position: relative; height: 70vh; }
  body.reduced .hero-copy { position: relative; left: auto; bottom: auto; padding: 32px clamp(20px, 5vw, 80px); }
  body.reduced .stage { position: relative; inset: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; padding: 24px clamp(20px, 5vw, 80px); }
  body.reduced .stage-title, body.reduced .callout { position: static; width: auto; opacity: 1; }
  body.reduced .stage-title { grid-column: 1 / -1; }
  body.reduced .leaders, body.reduced .stage-nav, body.reduced .scroll-hint { display: none; }
}

@media (max-width: 1180px) {
  .stage-nav { gap: 12px 18px; }
  .stage-nav a i { display: none; }
  .stage-nav a::before { width: 14px; }
}

/* ---- tablet ---- */
@media (max-width: 1024px) {
  .grid.services { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .callout { width: min(280px, 30vw); }
}

/* ---- móvil ---- */
@media (max-width: 768px) {
  :root { --header-h: 62px; }
  .site-nav { display: none; }
  .btn-cta { min-height: 40px; padding: 0 14px; font-size: 12px; }
  .brand-text { font-size: 13px; }
  .canvas-wrap { height: 56%; }
  .canvas-wrap::after { background: linear-gradient(180deg, rgba(10,10,11,.6) 0%, rgba(10,10,11,0) 22%, rgba(10,10,11,0) 70%, rgba(10,10,11,1) 100%); }
  #scene { background-position: 72% 0; background-size: auto 56%; }   /* la foto de espera queda justo detrás del lienzo, no del texto */
  .hero-copy { left: 20px; right: 20px; bottom: 70px; max-width: none; }
  .hero-actions .btn { min-height: 42px; padding: 0 16px; font-size: 13px; }
  .hero-copy h1 { font-size: clamp(32px, 9.5vw, 44px); }
  .hero-copy .lead { font-size: 15px; margin-bottom: 20px; }
  .scroll-hint { display: none; }
  .stage-nav { right: auto; left: 20px; bottom: auto; top: calc(var(--header-h) + 10px); gap: 8px 12px; justify-content: flex-start; }
  .stage-nav a { font-size: 10px; gap: 5px; letter-spacing: .08em; }
  .stage-nav a i { display: none; }
  .stage-nav a::before { width: 12px; }
  .stage-nav a.active::before { width: 20px; }
  .stage { top: auto; bottom: 0; height: 44%; display: flex; flex-direction: column; justify-content: center; padding: 0 0 20px; pointer-events: auto; }
  .stage-title { position: static; margin: 0 20px 12px; font-size: 22px; }
  .stage .cards { display: flex; gap: 10px; padding: 0 20px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .stage .cards::-webkit-scrollbar { display: none; }
  .callout { position: relative; left: auto !important; top: auto !important; bottom: auto !important; width: 78vw; flex: 0 0 auto; scroll-snap-align: start; }
  .callout h3 { font-size: 16px; }
  .callout p { font-size: 13px; }
  .section { padding: 64px 0; }
  .container { width: calc(100% - 40px); }
  .grid.services { grid-template-columns: 1fr; }
  .ig-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .ig-tile span { opacity: 1; font-size: 12px; padding: 28px 10px 10px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .form { grid-template-columns: 1fr; padding: 20px; }
  .info div { grid-template-columns: 1fr; gap: 4px; }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .map { height: 320px; }
  .map-card { position: static; max-width: none; margin-top: 12px; }
}

/* ---- páginas legales ---- */
.legal { padding: calc(var(--header-h) + 56px) 0 88px; }
.legal h1 { font-size: clamp(32px, 4vw, 48px); font-stretch: 105%; margin-bottom: 28px; }
.legal h2 { font-size: 22px; font-stretch: 105%; margin: 44px 0 12px; }
.legal h3 { font-size: 18px; margin: 30px 0 10px; }
.legal p, .legal li { color: var(--muted); font-size: 16px; line-height: 1.7; }
.legal p + p { margin-top: 12px; }
.legal ul { margin: 12px 0 16px; padding-left: 20px; display: grid; gap: 6px; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal .updated { margin-top: 48px; font-size: 14px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* ---- móvil: enlaces pequeños con 44 px de zona táctil, sin mover nada (el relleno se compensa con margen negativo) ---- */
@media (max-width: 768px) {
  .stage-nav a { padding: 16px 0; margin: -16px 0; }
  .info dd a, .site-footer p a, .site-footer nav a, .credits a { display: inline-block; padding: 11px 0; margin: -11px 0; }
}
