/* ============================================================
   UNDERTONE — capa de producción y polish (carga tras undertone.css)
   1) Componentes de producción  2) Micro-interacciones y estados
   3) Entrada del hero  4) Grids y móvil 375px
   ============================================================ */

:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1); /* quint */
}

/* ---------- Robustez móvil ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* Fallback para navegadores sin svh (el hero colapsaba) */
.hero { min-height: 100vh; min-height: 100svh; }

/* En táctil: grain estático (la animación de una capa 200% fija cuesta
   composición) y sin backdrop-blur (muy caro junto al WebGL; el veil y un
   fondo más opaco mantienen la legibilidad). */
@media (pointer: coarse) {
  .grain { animation: none !important; }

  .card, .next-strip, .footer, .nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .card { background: rgba(20, 24, 13, 0.78); }
  .next-strip { background: rgba(20, 24, 13, 0.7); }
  .footer { background: rgba(20, 24, 13, 0.88); }
  .nav { background: linear-gradient(180deg, rgba(20, 24, 13, 0.88), rgba(20, 24, 13, 0)); }
}

/* ---------- Accesibilidad: foco visible y skip-link ---------- */
:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}

.btn:focus-visible, .next-strip:focus-visible { outline-offset: 4px; border-radius: 100px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 10px;
  z-index: 100;
  background: var(--lime);
  color: var(--night);
  padding: 10px 18px;
  border-radius: 100px;
  font-size: 13px;
  letter-spacing: 0.1em;
}

.skip-link:focus { left: 10px; }

/* ---------- Botones: peso físico ---------- */
.btn {
  transition: transform 0.3s var(--ease-out), background 0.3s, box-shadow 0.3s, border-color 0.3s, color 0.3s;
  will-change: transform;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.985); transition-duration: 0.1s; }

/* ---------- Nav: subrayado vivo ---------- */
.nav-links a { position: relative; padding-bottom: 3px; border-bottom: none !important; }

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--lime); }

/* ---------- Chip del próximo evento ---------- */
.next-strip { transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-out); }
.next-strip:hover { box-shadow: 0 0 28px rgba(201, 229, 150, 0.12); transform: translateY(-1px); }

/* ---------- Releases: filas que responden ---------- */
.release-row { transition: background 0.25s; }
.release-row:hover { background: rgba(201, 229, 150, 0.04); }

/* ---------- Formularios: foco con halo ---------- */
.field input:focus, .field textarea:focus, .field select:focus,
.newsletter-row input:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(201, 229, 150, 0.12);
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 16'%3E%3Cpath fill='none' stroke='%23c9e596' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M3.2 5.3 8.5 10.7 13.8 5.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 14px;
  padding-right: 44px;
}

.field input:disabled, .field textarea:disabled, .field select:disabled { opacity: 0.55; }

.newsletter-row input {
  font-family: var(--body);
  font-weight: 300;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--sand);
  background: rgba(20, 24, 13, 0.5);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 14px 22px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.newsletter-row input::placeholder { color: var(--sand-faint); }
.newsletter-row input:disabled { opacity: 0.55; }

/* ============================================================
   ENTRADA DEL HERO (solo carga inicial; respeta reduced-motion)
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  @keyframes hero-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
  }

  .hero-a .logo-mark        { animation: hero-in 0.9s 0.05s var(--ease-out) both; }
  .hero-a .hero-wordmark-img{ animation: hero-in 0.9s 0.18s var(--ease-out) both; }
  .hero-a .hero-tagline     { animation: hero-in 0.9s 0.32s var(--ease-out) both; }
  .hero-a .hero-meta        { animation: hero-in 0.9s 0.46s var(--ease-out) both; }
  .hero-a .next-strip       { animation: hero-in 0.9s 0.60s var(--ease-out) both; }
  .hero-a .hero-cta         { animation: hero-in 0.9s 0.74s var(--ease-out) both; }
  .hero-a + .hero-foot, .hero-a .hero-foot { animation: hero-in 0.9s 0.9s var(--ease-out) both; }
}

/* ---------- Reveal escalonado en grids ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.reveal-armed .reveal.stagger > * {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  }
  html.reveal-armed .reveal.stagger.in > * { opacity: 1; transform: none; }
  html.reveal-armed .reveal.stagger.in > *:nth-child(2) { transition-delay: 0.08s; }
  html.reveal-armed .reveal.stagger.in > *:nth-child(3) { transition-delay: 0.16s; }
  html.reveal-armed .reveal.stagger.in > *:nth-child(4) { transition-delay: 0.24s; }
  html.reveal-armed .reveal.stagger.in > *:nth-child(5) { transition-delay: 0.32s; }
  html.reveal-armed .reveal.stagger.in > *:nth-child(6) { transition-delay: 0.40s; }
  html.reveal-armed .reveal.stagger.in > *:nth-child(n+7) { transition-delay: 0.48s; }
}

/* ============================================================
   EVENTOS — archivo
   ============================================================ */
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.event-card {
  display: flex;
  flex-direction: column;
  color: var(--sand);
  overflow: hidden;
  transition: border-color 0.35s, transform 0.35s var(--ease-out), box-shadow 0.35s;
}

.event-card:hover {
  border-color: rgba(201, 229, 150, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.event-card .ec-media {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.event-card .ec-media img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease-out);
}

.event-card:hover .ec-media img { transform: scale(1.045); }

.event-card .ec-go {
  margin-top: auto;
  padding-top: 18px;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sand-faint);
  font-weight: 400;
  transition: color 0.3s;
}

.event-card:hover .ec-go { color: var(--lime); }

/* miga de pan en fichas */
.crumb {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--sand-faint);
  margin-bottom: 22px;
  transition: color 0.25s, transform 0.3s var(--ease-out);
}

.crumb:hover { color: var(--lime); transform: translateX(-3px); }

/* chips de line-up */
.tag.chip { transition: border-color 0.25s, color 0.25s; }
.tag.chip:hover { border-color: var(--lime); color: var(--lime); }

/* ============================================================
   ARTISTAS — tiles ligeros (no cajas repetidas)
   ============================================================ */
.lineup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(28px, 4.5vw, 44px) 18px;
  text-align: center;
}

.artist-tile { display: grid; justify-items: center; gap: 0; }

.artist-tile .at-photo {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: 0 0 0 0 rgba(201, 229, 150, 0);
  transition: box-shadow 0.4s var(--ease-out), border-color 0.4s, transform 0.4s var(--ease-out);
}

.artist-tile:hover .at-photo {
  border-color: var(--lime);
  box-shadow: 0 0 0 5px rgba(201, 229, 150, 0.12);
  transform: translateY(-3px);
}

.artist-tile .at-ph {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(201, 229, 150, 0.05);
  border: 1px solid var(--line);
  color: var(--olive-400);
  transition: border-color 0.4s, color 0.4s, box-shadow 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.artist-tile:hover .at-ph {
  border-color: var(--lime);
  color: var(--lime);
  box-shadow: 0 0 0 5px rgba(201, 229, 150, 0.1);
  transform: translateY(-3px);
}

.artist-tile .at-ph svg { width: 30px; height: auto; }

.artist-tile .at-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 18px;
  line-height: 1.5;
}

.artist-tile .at-rol {
  font-size: 10px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 400;
  margin-top: 7px;
}

/* ============================================================
   SOUND SYSTEM — momento tipográfico + firma EQ
   ============================================================ */
.ss-spec {
  text-align: center;
  padding: clamp(28px, 6vh, 64px) 0 0;
  user-select: none;
}

.ss-spec .ghost-line {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(30px, 7.5vw, 96px);
  line-height: 1.06;
  color: transparent;
  -webkit-text-stroke: 1px rgba(201, 229, 150, 0.4);
}

.ss-spec .solid-line {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(30px, 7.5vw, 96px);
  line-height: 1.06;
  color: var(--lime);
  text-shadow: 0 0 60px rgba(201, 229, 150, 0.25);
}

.eq {
  display: flex;
  gap: 5px;
  align-items: flex-end;
  justify-content: center;
  height: 26px;
  margin: 30px auto 0;
}

.eq span {
  width: 3px;
  border-radius: 2px;
  background: var(--lime);
  opacity: 0.65;
  height: 30%;
}

@media (prefers-reduced-motion: no-preference) {
  .eq span { animation: eq-pulse 1.1s ease-in-out infinite alternate; }
  .eq span:nth-child(1) { animation-delay: 0s; }
  .eq span:nth-child(2) { animation-delay: 0.18s; }
  .eq span:nth-child(3) { animation-delay: 0.36s; }
  .eq span:nth-child(4) { animation-delay: 0.1s; }
  .eq span:nth-child(5) { animation-delay: 0.28s; }

  @keyframes eq-pulse {
    from { height: 22%; }
    to   { height: 100%; }
  }
}

/* ============================================================
   MEDIOS / ESTADOS (producción)
   ============================================================ */
.media-ph {
  display: grid;
  place-items: center;
  text-align: center;
  background: rgba(201, 229, 150, 0.04);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  color: var(--sand-faint);
  font-family: var(--display);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

.media-ph.circle { border-radius: 50%; }
.media-ph svg { width: 30px; height: auto; color: var(--olive-400); }

.empty-state {
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(40px, 8vw, 80px) clamp(24px, 5vw, 56px);
  background: var(--card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.gal-img {
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.gal-img img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease-out);
}

.gal-img:hover img { transform: scale(1.05); }

/* pósters: aro al pasar */
.poster-frame { transition: border-color 0.4s, box-shadow 0.4s; }
.poster-frame:hover { border-color: rgba(201, 229, 150, 0.4); }

/* ---------- Páginas legales ---------- */
.legal-body h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 34px 0 12px;
}

.legal-body p { color: var(--sand-dim); font-size: 16px; max-width: 70ch; margin-bottom: 12px; }
.legal-body strong { color: var(--sand); font-weight: 500; }

/* ============================================================
   MÓVIL — 375px primero
   ============================================================ */
@media (max-width: 520px) {
  .hero-cta { width: 100%; }
  .hero-cta .btn { width: 100%; }

  .newsletter-row { flex-direction: column; }
  .newsletter-row .btn { width: 100%; }

  .release-row { gap: 12px; padding: 16px 2px; }
  .release-row .num { width: 30px; font-size: 18px; }
  .release-row .name { font-size: 12px; letter-spacing: 0.12em; }
  .release-row .price { font-size: 15px; }
  .tag { padding: 5px 10px; font-size: 9px; letter-spacing: 0.22em; }

  .event-card .ec-media img { height: 170px; }

  .lineup-grid { grid-template-columns: repeat(2, 1fr); gap: 30px 12px; }
  .artist-tile .at-photo, .artist-tile .at-ph { width: 96px; height: 96px; }
}
