/* ---------- Tipografía (Archivo variable: ancho 62–125 %, peso 100–900; alojada en local) ---------- */
@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
/* Figtree variable (peso 300–900): portada, parecida a la letra del perfil de Spotify */
@font-face {
  font-family: "Figtree";
  src: url("assets/fonts/figtree-var.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --accent: #ffe600;      /* color del banner y botones (el amarillo del mockup) */
  --ink: #0b0b0b;
  --paper: #ffffff;
  --font: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-display: "Figtree", "Helvetica Neue", Arial, system-ui, sans-serif;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: #111;
  color: var(--ink);
  line-height: 1.3;
}
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.hero :focus-visible, .overlay :focus-visible { outline-color: #fff; box-shadow: 0 0 0 5px var(--ink); }
.ticker :focus-visible, .card__buy:focus-visible, .sheet :focus-visible { outline-color: var(--ink); box-shadow: none; }

/* ---------- Portada ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  isolation: isolate;
  background: #1a1a1a;
}
/* Capas de la portada (de atrás a delante): foto → título → recorte del guitarrista → degradado → Spotify y banner.
   El recorte comparte encuadre con la foto (misma clase .hero__img), así que siempre coincide encima */
.hero__img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 42% 62%;
}
.hero__cutout { z-index: 2; pointer-events: none; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.32), transparent 26%, transparent 62%, rgba(0,0,0,.4));
}

/* Barra superior: solo el botón de Spotify, a la izquierda */
.topbar {
  position: relative; z-index: 4;
  display: flex; align-items: center; justify-content: flex-start; gap: 16px;
  padding: max(24px, env(safe-area-inset-top)) var(--gutter) 0;
}
/* Botón de Spotify: rectángulo blanco sencillo */
.spotify {
  flex: none;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: var(--paper); color: var(--ink);
  font-family: var(--font-display); font-size: .95rem; font-weight: 700;
  text-decoration: none; white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}
.spotify:hover { background: var(--ink); color: var(--paper); }
.spotify:hover .spotify__icon { color: #1db954; }
.spotify__icon { flex: none; width: 20px; height: 20px; transition: color .2s ease; }

/* Título */
/* Copia del mockup (slide 4 del PowerPoint): Arial Black 40 pt negrita, espaciado 4 pt, blanco.
   Posición y tamaño los calcula app.js en coordenadas de la foto; esto es solo el valor de partida */
.title {
  position: absolute; z-index: 1;
  top: 38%; left: var(--gutter);
  font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 9vw, 8.5rem);
  letter-spacing: .1em;
  line-height: 1.2;
  white-space: nowrap;
  color: #fff;
  /* borde negro fino: sombras sólidas en 8 direcciones por detrás del relleno.
     Sin -webkit-text-stroke, que en el punto de Arial Black dejaba zonas semitransparentes */
  --o: .018em;
  text-shadow:
    var(--o) 0 0 var(--ink), calc(var(--o) * -1) 0 0 var(--ink),
    0 var(--o) 0 var(--ink), 0 calc(var(--o) * -1) 0 var(--ink),
    var(--o) var(--o) 0 var(--ink), calc(var(--o) * -1) var(--o) 0 var(--ink),
    var(--o) calc(var(--o) * -1) 0 var(--ink), calc(var(--o) * -1) calc(var(--o) * -1) 0 var(--ink);
}

/* ---------- Banner: dos cintas cruzadas en movimiento ---------- */
.ticker {
  grid-row: 3;                                  /* abajo del todo (el título va aparte, posicionado) */
  position: relative; z-index: 4;
  padding: clamp(40px, 9vw, 90px) 0 calc(clamp(36px, 5vw, 60px) + env(safe-area-inset-bottom));
}
.strip {
  display: block; position: relative; cursor: pointer;
  width: 112%; margin-left: -6%;               /* se pasa de los bordes para que la inclinación no deje huecos */
  border: 0; padding: 0; color: inherit; text-align: left;
  overflow: hidden;
}
.strip__viewport { display: block; overflow: hidden; }
.strip__track {
  display: flex; width: max-content;
  animation: slide var(--dur, 30s) linear infinite;
}
@keyframes slide { to { transform: translateX(-50%); } }
/* se para con el ratón encima de una de las cintas (no del margen que las rodea)
   o con foco de teclado; un clic de ratón no la deja parada */
.ticker:has(.strip:hover) .strip__track,
.ticker:has(:focus-visible) .strip__track { animation-play-state: paused; }

/* cinta negra: la frase */
.strip--head {
  z-index: 1;
  background: var(--ink); color: var(--accent);
  transform: rotate(2.2deg);
  margin-bottom: -14px;
  box-shadow: 0 6px 0 rgba(0,0,0,.25);
  animation: enterL .7s cubic-bezier(.2,.8,.2,1) both;
}
.strip--head .strip__viewport { padding: 9px 0; }
/* avanza muy despacio hacia la derecha (la velocidad está en app.js) */
.strip--head .strip__track { animation-direction: reverse; }
.shout {
  flex: none; display: flex; align-items: center; gap: .9em;
  padding-right: .9em;
  font-weight: 900; font-stretch: 70%;
  font-size: clamp(1.05rem, 4.2vw, 1.5rem);
  text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
}

/* cinta amarilla: los conciertos */
.strip--shows {
  z-index: 2;
  background: var(--accent); color: var(--ink);
  transform: rotate(-2.6deg);
  border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
  box-shadow: 0 10px 26px rgba(0,0,0,.35);
  animation: enterR .7s .1s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes enterL { from { transform: translateX(-60%) rotate(2.2deg); opacity: 0; } }
@keyframes enterR { from { transform: translateX(60%) rotate(-2.6deg); opacity: 0; } }

.strip--shows .strip__track { font-size: clamp(1.5rem, 6.4vw, 2.3rem); }
/* las estrellas van entre conciertos (fuera del recuadro que se pone negro al pasar el ratón) */
.strip--shows .strip__track > .star { align-self: center; margin: 0 .45em; }

.chip {
  flex: none; display: flex; align-items: center; gap: .7em;
  padding: 16px .5em;
  background: none; border: 0;
  font-weight: 900; font-stretch: 70%;
  font-size: 1em; line-height: 1;
  text-transform: uppercase; letter-spacing: .02em; white-space: nowrap;
  transition: color .15s ease, background .15s ease;
}
.chip__date { font-weight: 500; font-stretch: 100%; letter-spacing: .04em; font-size: .62em; }
/* el recuadro negro ocupa justo el alto de la cinta, sin crecer ni girar */
.chip:hover { background: var(--ink); color: var(--accent); }
.chip.is-soldout .chip__venue { text-decoration: line-through; text-decoration-thickness: .12em; opacity: .55; }
.chip__tag {
  font-size: .38em; font-weight: 800; letter-spacing: .06em;
  padding: .35em .6em; background: var(--ink); color: var(--accent);
  transform: rotate(-4deg);
}
.chip:hover .chip__tag { background: var(--accent); color: var(--ink); }

/* estrellita separadora (se dibuja con CSS) */
.star {
  flex: none; display: inline-block; width: .8em; height: .8em; margin-left: .9em;
  background: currentColor;
  clip-path: polygon(50.0% 0.0%, 59.2% 27.8%, 85.4% 14.6%, 72.2% 40.8%, 100.0% 50.0%, 72.2% 59.2%, 85.4% 85.4%, 59.2% 72.2%, 50.0% 100.0%, 40.8% 72.2%, 14.6% 85.4%, 27.8% 59.2%, 0.0% 50.0%, 27.8% 40.8%, 14.6% 14.6%, 40.8% 27.8%);
  animation: spin 6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* «Próximas fechas pendientes de anuncio» dentro de la cinta amarilla */
.pending {
  flex: none; display: flex; align-items: center;
  padding: 16px 0 16px .5em;
  font-weight: 600; font-stretch: 85%; font-style: italic;
  font-size: clamp(1rem, 3.6vw, 1.35rem); line-height: 1;
  text-transform: uppercase; letter-spacing: .03em; white-space: nowrap;
}
.pending .star { font-size: 1.6em; }

@media (prefers-reduced-motion: reduce) {
  .strip__track, .star, .strip--head, .strip--shows { animation: none; }
  .strip--head { transform: rotate(2.2deg); }
  .strip--shows { transform: rotate(-2.6deg); }
  .strip__viewport { overflow-x: auto; }
}

/* ---------- Capas modales ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  padding: var(--gutter);
  background: rgba(0,0,0,.55);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  animation: fade .2s ease;
}
.overlay[hidden] { display: none; }
.overlay--center { z-index: 11; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }

.close {
  flex: none; width: 52px; align-self: stretch;
  background: var(--paper); border: 0; border-left: 2px solid var(--ink);
  font-size: 1.8rem; line-height: 1;
}
.close:hover { background: var(--ink); color: var(--paper); }

/* Modal 1 */
.sheet {
  position: relative;
  width: 100%; max-width: 560px; max-height: 100%;
  display: flex; flex-direction: column;
  background: var(--accent);
  animation: rise .25s ease;
  outline: none;
}
.sheet__top {
  display: flex; align-items: stretch; justify-content: space-between;
  border-bottom: 2px solid var(--ink);
}
.sheet__title {
  padding: 12px var(--gutter);
  font-size: 1.5rem; font-weight: 900; font-stretch: 70%; text-transform: uppercase; letter-spacing: .03em;
}
.sheet__list { list-style: none; padding: 0; overflow-y: auto; }
.sheet__list li { border-bottom: 2px solid var(--ink); }
.sheet__item {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px var(--gutter);
  background: none; border: 0; text-align: left;
  font-size: 1.7rem; font-weight: 900; font-stretch: 70%; text-transform: uppercase; letter-spacing: .02em; line-height: 1.1;
  transition: background .15s ease, padding-left .15s ease;
}
.sheet__item:hover { background: var(--ink); color: var(--accent); padding-left: calc(var(--gutter) + 8px); }
.sheet__item .arrow { font-weight: 800; }
.sheet__list li.sheet__pending { border-bottom: 0; padding: 20px var(--gutter); font-size: 1.1rem; font-style: italic; }
.badge {
  font-size: .72rem; font-weight: 800; text-transform: uppercase;
  padding: 2px 6px; background: var(--ink); color: var(--accent); margin-left: .5em;
}

/* Modal 2 */
.card {
  width: 100%; max-width: 520px; max-height: 100%; overflow-y: auto;
  display: flex; flex-direction: column;
  background: var(--paper); border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--accent);
  animation: rise .25s ease;
  outline: none;
}
.card__top { display: flex; align-items: stretch; border-bottom: 2px solid var(--ink); }
.card__title { flex: 1; padding: 12px var(--gutter); font-size: 1.6rem; font-weight: 900; font-stretch: 70%; text-transform: uppercase; letter-spacing: .02em; }
.card__photo { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-bottom: 2px solid var(--ink); }
.card__row { padding: 14px var(--gutter); border-bottom: 2px solid var(--ink); font-size: 1.05rem; }
.card__venue {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-decoration: none; transition: background .15s ease;
}
.card__venue:hover { background: var(--accent); }
.card__venue svg { flex: none; width: 22px; height: 22px; }
.card__venue span { text-decoration: underline; text-underline-offset: 4px; }
.card__when strong { display: block; font-size: 1.15rem; }
.card__when ul { list-style: none; padding: 6px 0 0 1.4rem; }
.card__buy {
  display: block; padding: 24px var(--gutter);
  background: var(--accent); color: var(--ink);
  font-weight: 900; font-stretch: 75%; font-size: 1.6rem; text-transform: uppercase; letter-spacing: .03em;
  text-decoration: none; text-align: left;
  transition: background .15s ease, color .15s ease;
}
.card__buy:hover { background: var(--ink); color: var(--accent); }
.card__buy.is-soldout { background: #d8d8d8; color: #555; pointer-events: none; }

/* ---------- Pantallas anchas ---------- */
@media (min-width: 900px) {
  :root { --gutter: 32px; }
  .spotify { padding: 14px 22px; font-size: 1rem; }
  .hero__img { object-position: 50% 40%; }
}

/* ---------- Página de compra provisional (compra.html) ---------- */
.stub { min-height: 100vh; display: grid; place-items: center; padding: var(--gutter); background: #111; }
.stub__card {
  max-width: 480px; padding: 28px; background: var(--paper);
  border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--accent);
}
.stub__card h1 { font-size: 1.4rem; margin-bottom: 10px; }
.stub__card p { margin-bottom: 14px; }
.stub__card a { font-weight: 700; }
