/* Palio App · portada de la web (solo index.html).
   Composición: un cartel nocturno. El palio en 3D abre la página; debajo, la franja de cifras en oro,
   Málaga en 3D con los recorridos, la app por dentro, los escudos y lo que hacemos para las hermandades. */
.v2 .lead { max-width: 58ch; }
.v-sec { padding-block: clamp(72px, 10vw, 124px); }
.v-vino { background: var(--terciopelo); }
.v-cab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 60px; align-items: end; margin-bottom: 48px; }
.v-cab .etq { grid-column: 1 / -1; }
.v2 h2 { font-size: clamp(44px, 7vw, 92px); }
@media (max-width: 860px) { .v-cab { grid-template-columns: 1fr; } }

/* Portada */
.v-portada { position: relative; overflow: hidden; background: radial-gradient(60% 70% at 78% 45%, rgba(200, 149, 62, .22), transparent 70%), radial-gradient(50% 60% at 10% 100%, var(--terciopelo-2), transparent 70%), var(--papel); border-bottom: 1px solid var(--linea); }
.v-portada .env { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 40px; align-items: center; padding-block: 64px 64px; }
.v-portada h1 { font-size: clamp(56px, 9vw, 132px); margin: 20px 0 24px; }
.v-portada h1 em { display: block; font-size: .62em; margin-top: .12em; }
.v-acc { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.v-cuenta { display: flex; gap: 6px; margin-top: 40px; align-items: stretch; flex-wrap: wrap; }
.v-cuenta .c { min-width: 82px; padding: 12px 14px 10px; background: rgba(36, 12, 21, .7); border: 1px solid var(--linea); border-radius: 12px; text-align: center; }
.v-cuenta b { display: block; font: 800 40px/1 var(--display); color: var(--tinta); font-variant-numeric: tabular-nums; }
.v-cuenta small { font: 600 11px var(--texto); letter-spacing: .16em; text-transform: uppercase; color: var(--tinta-3); }
.v-cuenta .que { align-self: center; padding-left: 10px; font-size: 14px; color: var(--tinta-2); max-width: 18ch; line-height: 1.35; }
.v-escena { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 540px; justify-self: center; touch-action: pan-y; cursor: grab; }
.v-escena:active { cursor: grabbing; }
.v-escena canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.v-escena > svg { position: absolute; inset: 14%; width: 72%; height: 72%; }
.v-escena.tres-d > svg { visibility: hidden; }
.v-escena .v-pista { position: absolute; left: 50%; bottom: 2%; translate: -50% 0; font: 700 12px var(--texto); letter-spacing: .18em; text-transform: uppercase; color: var(--tinta-3); white-space: nowrap; transition: opacity .3s; pointer-events: none; }
.v-escena.tocado .v-pista { opacity: 0; }
.v-entra > * { animation: v-sube .9s cubic-bezier(.2, .7, .2, 1) both; }
.v-entra > :nth-child(2) { animation-delay: .08s; } .v-entra > :nth-child(3) { animation-delay: .16s; } .v-entra > :nth-child(4) { animation-delay: .24s; } .v-entra > :nth-child(5) { animation-delay: .32s; }
@keyframes v-sube { from { opacity: .001; transform: translateY(18px); } }
@media (max-width: 860px) { .v-portada .env { grid-template-columns: 1fr; padding-block: 36px 56px; } .v-escena { order: -1; max-width: 330px; margin-bottom: -24px; } }
@media (max-width: 520px) { .v-cuenta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); } .v-cuenta .c { min-width: 0; padding: 10px 4px 8px; } .v-cuenta b { font-size: 32px; } .v-cuenta .que { grid-column: 1 / -1; padding: 4px 0 0; max-width: none; } }

/* Cifras */
.v-cifras { background: var(--oro); color: #10070B; }
.v-cifras .env { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-block: 26px; }
.v-cifra { display: flex; align-items: baseline; gap: 12px; padding: 4px 20px; border-left: 1px solid rgba(16, 7, 11, .2); }
.v-cifra:first-child { border-left: 0; padding-left: 0; }
.v-cifra b { font: 900 clamp(46px, 6vw, 76px)/1 var(--display); font-variant-numeric: tabular-nums; }
.v-cifra span { font: 700 14px/1.2 var(--texto); text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 760px) { .v-cifras .env { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; } .v-cifra:nth-child(3) { border-left: 0; padding-left: 0; } }

/* Mapa 3D de recorridos */
.v-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.v-chip { all: unset; cursor: pointer; font: 600 14px var(--texto); padding: 9px 16px; border-radius: 999px; border: 1px solid var(--linea); color: var(--tinta-2); transition: background .2s, color .2s; }
.v-chip:hover { color: var(--tinta); }
.v-chip[aria-pressed="true"] { background: var(--oro); color: #10070B; border-color: var(--oro); }
.v-chip:focus-visible { outline: 2px solid var(--oro); outline-offset: 2px; }
.v-mapa { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; }
.v-lienzo { position: relative; aspect-ratio: 16 / 11; max-width: 100%; border-radius: 22px; overflow: hidden; background: #0b0508; border: 1px solid var(--linea); touch-action: pan-y; cursor: grab; }
.v-lienzo:active { cursor: grabbing; }
.v-lienzo canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.v-globo { position: absolute; left: 0; top: 0; pointer-events: none; padding: 7px 12px; border-radius: 10px; background: rgba(16, 7, 11, .92); border: 1px solid var(--linea); font: 600 14px var(--texto); white-space: nowrap; translate: -50% calc(-100% - 14px); }
.v-zoom { position: absolute; right: 12px; top: 12px; display: grid; gap: 6px; }
.v-zoom button { all: unset; cursor: pointer; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: rgba(16, 7, 11, .8); border: 1px solid var(--linea); color: var(--tinta); font: 600 20px var(--texto); }
.v-zoom button:focus-visible { outline: 2px solid var(--oro); }
.v-cred { position: absolute; left: 12px; bottom: 8px; font-size: 11px; color: var(--tinta-3); }
.v-ficha { display: grid; gap: 14px; align-content: start; padding: 26px; border-radius: 22px; background: var(--papel); border: 1px solid var(--linea); min-width: 0; }
.v-ficha h3 { font-size: 46px; }
.v-ficha p { color: var(--tinta-2); font-size: 15px; }
.v-ficha dl { margin: 0; display: grid; gap: 10px; }
.v-ficha dl div { display: flex; justify-content: space-between; gap: 14px; border-top: 1px solid var(--linea); padding-top: 10px; }
.v-ficha dt { color: var(--tinta-3); font-size: 14px; }
.v-ficha dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.v-ficha ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; color: var(--tinta-2); }
.v-ficha li::before { content: "✦"; color: var(--oro); margin-right: 8px; font-size: 10px; }
@media (max-width: 960px) { .v-mapa { grid-template-columns: 1fr; } .v-lienzo { aspect-ratio: 4 / 5; } }

/* Móvil y pestañas de la app */
.v-movil { position: relative; width: min(300px, 78vw); aspect-ratio: 9 / 19.3; max-width: 100%; margin: 0 auto; border-radius: 46px; padding: 11px; background: linear-gradient(145deg, #3a2a2c, #120a0c 40%, #2a1d1f); box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(242, 199, 107, .25), inset 0 0 0 1px rgba(255, 255, 255, .06); transition: transform .25s ease-out; }
.v-movil .v-pant { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: var(--terciopelo); }
.v-movil .v-pant img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transform: scale(1.03); transition: opacity .55s, transform .8s cubic-bezier(.2, .7, .2, 1); }
.v-movil .v-pant img.ver { opacity: 1; transform: none; }
.v-movil::before { content: ""; position: absolute; top: 22px; left: 50%; translate: -50% 0; width: 92px; height: 26px; border-radius: 20px; background: #000; z-index: 2; }
.v-app { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 60px; align-items: center; }
.v-tabs { display: grid; gap: 4px; }
.v-tab { all: unset; position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 24px; align-items: baseline; padding: 20px 4px; border-top: 1px solid var(--linea); cursor: pointer; }
.v-tab:focus-visible { outline: 2px solid var(--oro); outline-offset: 2px; }
.v-tab-n { font: 800 32px/1 var(--display); text-transform: uppercase; color: var(--tinta-3); transition: color .3s; }
.v-tab-d { color: var(--tinta-3); font-size: 16px; transition: color .3s; }
.v-tab[aria-selected="true"] .v-tab-n { color: var(--oro); }
.v-tab[aria-selected="true"] .v-tab-d { color: var(--tinta); }
.v-tab .bar { position: absolute; left: 0; top: -1px; height: 1px; width: 0; background: var(--oro); }
.v-tab[aria-selected="true"] .bar { width: 100%; transition: width var(--dur, 5s) linear; }
.parado .v-tab[aria-selected="true"] .bar { transition: none; }
@media (max-width: 860px) { .v-app { grid-template-columns: 1fr; } .v-app .v-movil { order: -1; } .v-tab { grid-template-columns: 1fr; padding: 14px 4px; } .v-tab-d { font-size: 15px; } }

/* Escudos en movimiento */
.v-muro { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.v-muro > div { min-width: 0; }
.v-fila-t { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.v-fila-t b { font: 800 22px var(--display); text-transform: uppercase; letter-spacing: .04em; }
.v-fila-t span { color: var(--tinta-3); font-size: 14px; font-variant-numeric: tabular-nums; }
.v-marq { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); padding-block: 6px; }
.v-cinta { display: flex; gap: 44px; width: max-content; animation: v-corre 70s linear infinite; }
.v-rev .v-cinta { animation-direction: reverse; animation-duration: 60s; }
.v-marq:hover .v-cinta { animation-play-state: paused; }
.v-cinta img { height: 92px; width: auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .5)); transition: transform .35s cubic-bezier(.2, .7, .2, 1), filter .35s; }
.v-cinta img:hover { transform: perspective(400px) rotateY(18deg) scale(1.15); filter: drop-shadow(0 10px 18px rgba(242, 199, 107, .35)); }
@keyframes v-corre { to { transform: translateX(-50%); } }

/* Servicios */
.v-servs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--linea); }
.v-s { padding: 34px 26px 8px 0; display: grid; gap: 14px; align-content: start; text-decoration: none; }
.v-s + .v-s { padding-left: 26px; border-left: 1px solid var(--linea); }
.v-s h3 { font-size: 36px; }
.v-s p { color: var(--tinta-2); font-size: 16px; }
.v-s .mas { color: var(--oro); font-weight: 700; font-size: 14px; }
.v-gratis { margin-top: 56px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; padding: 28px 32px; border: 1px solid var(--linea); border-radius: 20px; background: linear-gradient(120deg, var(--terciopelo-2), transparent 70%); }
.v-gratis b { font: 900 54px/1 var(--display); color: var(--oro); text-transform: uppercase; }
@media (max-width: 1000px) { .v-servs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .v-s:nth-child(3) { padding-left: 0; border-left: 0; } .v-s:nth-child(n+3) { border-top: 1px solid var(--linea); } }
@media (max-width: 600px) { .v-servs { grid-template-columns: 1fr; } .v-s, .v-s + .v-s { padding: 26px 0; border-left: 0; } .v-s + .v-s { border-top: 1px solid var(--linea); } .v-gratis { grid-template-columns: 1fr; gap: 10px; } }

/* Contacto */
.v-contacto .env { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.v-vias { display: grid; gap: 10px; }
.v-via { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-radius: 16px; background: var(--papel); border: 1px solid var(--linea); }
.v-via small { display: block; font: 700 11px var(--texto); letter-spacing: .18em; text-transform: uppercase; color: var(--tinta-3); margin-bottom: 2px; }
.v-via strong { font-size: 19px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.v-copiar { all: unset; cursor: pointer; font: 700 13px var(--texto); color: var(--oro); padding: 8px 14px; border: 1px solid var(--linea); border-radius: 999px; white-space: nowrap; }
.v-copiar:focus-visible { outline: 2px solid var(--oro); }
@media (max-width: 860px) { .v-contacto .env { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { .v2 *, .v2 *::before, .v2 *::after { animation: none !important; transition: none !important; } }
