:root {
  --bg: #0a0a0b;
  --surface: #16171a;
  --surface-2: #202126;
  --text: #f5f5f5;
  --text-muted: #a3a3a8;
  --accent: #fdc404;
  --accent-dark: #d9a800;
  --border: #2a2b30;
  --radius: 14px;
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: 'Quicksand', -apple-system, sans-serif;
  font-weight: 700;
  margin: 0;
}

a { color: inherit; }

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #000;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

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

.logo img {
  width: 44px;
  height: 44px;
  display: block;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

nav.main-nav a:hover { color: var(--accent); }

.social-icons {
  display: flex;
  gap: 10px;
}

.social-icons a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 1.6rem;
  cursor: pointer;
}

/* Hero con video animado por scroll */
.hero-scroll {
  --header-h: 73px;               /* el script lo ajusta a la altura real del header */
  --hero-scroll-length: 300vh;    /* cuánto hay que scrollear para "armar" el motor */
  position: relative;
  padding: 0;                     /* pisa el padding genérico de "section" */
  background: #000;
  border-bottom: 1px solid var(--border);
}

.hero-stage {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
}

/* Con JS el escenario queda fijo mientras el scroll recorre la sección */
.hero-scroll.has-scroll { height: var(--hero-scroll-length); }
.hero-scroll.has-scroll .hero-stage {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
  min-height: 0;
}

.hero-poster,
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hero-poster { object-fit: cover; }
@media (max-aspect-ratio: 23/20) {
  .hero-poster { object-fit: contain; object-position: center bottom; }
  .hero-scroll.has-scroll .hero-poster { opacity: 0; }   /* con JS, el canvas dibuja el primer cuadro enseguida */
}
.hero-canvas { opacity: 0; transition: opacity .3s; }
.hero-canvas.ready { opacity: 1; }

.hero-shade,
.hero-shade-end {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-shade {
  background: linear-gradient(90deg, rgba(10,10,11,0.96) 0%, rgba(10,10,11,0.82) 34%, rgba(10,10,11,0.35) 64%, rgba(10,10,11,0.05) 100%);
  opacity: var(--copy, 1);
}
.hero-shade-end {
  background: linear-gradient(180deg, rgba(10,10,11,0) 38%, rgba(10,10,11,0.9) 100%);
  opacity: var(--end, 0);
}

.hero-copy {
  position: relative;
  width: 100%;
  padding: 56px 20px;
  opacity: var(--copy, 1);
  transform: translateY(calc((1 - var(--copy, 1)) * -36px));
}
.hero-copy.oculto { visibility: hidden; }

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Tipografía de la bajada del hero (se cambia acá) */
.hero-scroll { --font-bajada: 'Rajdhani', 'Arial Narrow', sans-serif; }

.hero-title {
  font-size: clamp(3.4rem, 10vw, 8rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
  color: var(--accent);
  text-shadow: 0 6px 40px rgba(0,0,0,0.55);
}
/* Cada palabra sube desde una "máscara": overflow oculta lo que todavía no entró */
.hero-word {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.hero-word > span {
  display: inline-block;
  transform: translateY(110%);
  animation: hero-palabra 1s cubic-bezier(.2,.85,.2,1) 0.15s both;
}
.hero-word + .hero-word > span { animation-delay: 0.32s; }

.hero-scroll .subtitle {
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  color: var(--text);
  margin-top: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  animation: hero-aparece .8s ease-out 0.8s both;
}

.hero-scroll .tagline {
  margin: 14px 0 0;
  font-family: var(--font-bajada);
  font-weight: 600;
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  animation: hero-aparece .8s ease-out 1.05s both;
}

@keyframes hero-palabra { from { transform: translateY(110%); } to { transform: translateY(0); } }
@keyframes hero-aparece {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-word > span,
  .hero-scroll .subtitle,
  .hero-scroll .tagline { animation: none; transform: none; opacity: 1; }
}

/* Cierre de la animación: aparece con el motor ya armado */
.hero-end {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 20px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
  opacity: var(--end, 0);
  transform: translateY(calc((1 - var(--end, 0)) * 28px));
  visibility: hidden;
}
.hero-end.visible { visibility: visible; }
.hero-end-title {
  margin: 0;
  font-family: 'Quicksand', -apple-system, sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  line-height: 1.2;
  color: var(--text);
}
.hero-end-title br { display: none; }

.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px clamp(28px, 5vw, 80px);
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.hero-stat-num {
  font-family: 'Quicksand', -apple-system, sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.05;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.hero-stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-end-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  flex-wrap: wrap;
}
.hero-end-link {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-decoration: none;
}
.hero-end-link:hover { color: var(--accent); }

.hero-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: .4px;
  color: var(--text-muted);
  opacity: var(--hint, 1);
  pointer-events: none;
  display: none;
}
.hero-scroll.has-scroll .hero-hint { display: block; }
/* Sin animación (sin JS o "reducir movimiento"): el cierre queda en el flujo, debajo del texto */
.hero-scroll:not(.has-scroll) .hero-stage {
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 0 0 36px;
}
.hero-scroll:not(.has-scroll) .hero-end {
  position: relative;
  opacity: 1;
  transform: none;
  visibility: visible;
  padding-top: 8px;
}

.hero-hint span { display: inline-block; animation: hero-rebote 1.4s ease-in-out infinite; }
@keyframes hero-rebote { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

@media (prefers-reduced-motion: reduce) {
  .hero-hint span { animation: none; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 1rem;
  border: none;
  cursor: pointer;
}

.btn:hover { background: var(--accent-dark); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

/* Sections */
section { padding: 60px 20px; }

section h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 40px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
}

.card .icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  color: var(--accent);
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

#servicios { background: var(--surface); }

#ubicacion { background: var(--surface); text-align: center; }

#ubicacion .wrap { max-width: 760px; }

.map-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  line-height: 0;
}

.map-address {
  color: var(--text-muted);
  margin: 18px 0 22px;
}

/* Reseñas */
#resenas { text-align: center; }

.resenas-resumen {
  color: var(--text-muted);
  margin: 0 0 30px;
}

.resenas-rating {
  color: var(--accent);
  font-weight: 700;
}

.resenas-viewport {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  margin-bottom: 28px;
}

.resenas-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: resenas-scroll linear infinite;
}

.resenas-viewport:hover .resenas-track {
  animation-play-state: paused;
}

@keyframes resenas-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.resena-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  width: 300px;
  flex: 0 0 auto;
  text-align: left;
}

.resena-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.resena-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.resena-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #000;
  font-weight: 700;
}

.resena-autor {
  font-weight: 600;
  font-size: 0.95rem;
}

.resena-stars {
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.resena-texto {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.resena-cuando {
  color: var(--text-muted);
  font-size: 0.78rem;
  opacity: 0.8;
}

#pagos { background: var(--bg); }

/* CTA */
.cta {
  background: linear-gradient(135deg, #1a1a1d, #0a0a0b);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.cta .wrap { max-width: 640px; }

.cta h2 { margin-bottom: 14px; }

.cta p { color: var(--text-muted); margin-bottom: 28px; }

/* Instagram CTA */
#redes {
  text-align: center;
}

#redes .wrap { max-width: 560px; }

#redes p { color: var(--text-muted); margin: 12px 0 26px; }

/* Footer */
footer.site-footer {
  background: #000;
  padding: 48px 20px 28px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner h3 {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.footer-inner p, .footer-inner a {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--accent); }

/* WhatsApp floating button */
.wa-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
  z-index: 60;
  text-decoration: none;
}

.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* Mobile */
@media (max-width: 760px) {
  .hero-scroll { --hero-scroll-length: 260vh; }
  .hero-shade { background: linear-gradient(180deg, rgba(10,10,11,0.95) 0%, rgba(10,10,11,0.8) 26%, rgba(10,10,11,0) 44%); }
  .hero-copy { align-self: flex-start; padding: 36px 20px; }
  .hero-title { font-size: min(17vw, 4.4rem); }
  .hero-scroll .tagline { letter-spacing: 0.12em; }
  .hero-end { padding-bottom: 24px; gap: 18px; }
  .hero-end-title br { display: inline; }
  /* En celular los tres números van apilados: número a la izquierda, descripción a la derecha */
  .hero-stats { flex-direction: column; gap: 8px; }
  .hero-stat {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: baseline;
    gap: 14px;
    width: min(100%, 320px);
  }
  .hero-stat-num { text-align: right; font-size: 2rem; }
  .hero-stat-label { text-align: left; }

  nav.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #000;
    border-bottom: 1px solid var(--border);
  }
  nav.main-nav.open { display: block; }
  nav.main-nav ul {
    flex-direction: column;
    gap: 0;
  }
  nav.main-nav li { border-top: 1px solid var(--border); }
  nav.main-nav a { display: block; padding: 16px 20px; }
  .menu-toggle { display: block; }
  header.site-header { position: relative; }
  .social-icons { display: none; }
}

/* SEO: texto accesible, "Sobre el taller" y preguntas frecuentes */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.about p { max-width: 720px; margin: 0 auto; text-align: center; color: var(--text-muted); font-size: 1.05rem; }
address.map-address { font-style: normal; }
address.map-address a { color: var(--accent); text-decoration: none; }
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 18px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 1.4rem; line-height: 1; flex-shrink: 0; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0 0 16px; color: var(--text-muted); }

/* Entrada animada de las tarjetas (js/reveal.js): aparecen subiendo y, en Servicios, el ícono "salta" un instante después */
.card.reveal {
  opacity: 0;
  transform: translateY(36px) scale(0.96);
  transition: opacity 0.7s ease var(--d, 0ms), transform 0.8s cubic-bezier(.2, .85, .2, 1) var(--d, 0ms);
}
.card.reveal.visible { opacity: 1; transform: none; }
.card.reveal .icon {
  opacity: 0;
  transform: scale(0.4) rotate(-12deg);
  transition: opacity 0.5s ease calc(var(--d, 0ms) + 0.25s), transform 0.7s cubic-bezier(.34, 1.56, .64, 1) calc(var(--d, 0ms) + 0.25s);
}
.card.reveal.visible .icon { opacity: 1; transform: none; }
