/* ==========================================================================
   FOMO · ARCHIVO
   Se carga solo en /archivo/, después de fomo.css.
   Pieza central: una cinta de casete con reproductor propio.
   ========================================================================== */
.arch { position: relative; padding: calc(var(--head-h) + 30px) var(--gutter) 80px; max-width: 1100px; margin: 0 auto; overflow-x: clip; }

/* cabecera */
.arch__title { margin: 0; font-size: clamp(76px, 24vw, 220px); line-height: .82; }
.arch__title span { display: block; white-space: nowrap; }
.arch__fomo { color: transparent; -webkit-text-stroke: 2px var(--yellow); margin-left: 12%; }
.arch__sub { margin: 16px 0 0; font-size: clamp(26px, 7vw, 40px); rotate: -2deg; }

/* 1. CANCIÓN (cinta) ------------------------------------------------------------------ */
.songbox { position: relative; margin-top: 50px; }
.songbox__intro { margin: 0 0 24px; }
.songbox__intro span {
  display: inline-block;
  padding: 6px 12px 7px;
  background: var(--paper); color: var(--ink);
  font-weight: 800; font-size: clamp(15px, 4.2vw, 19px);
  rotate: -1.5deg;
  box-shadow: 0 6px 12px -6px rgba(3,20,40,.5);
}

.cassette { position: relative; max-width: 620px; margin: 0 auto; rotate: -2deg; }
.tape-strip {
  position: absolute; z-index: 3; top: -12px;
  width: 90px; height: 26px;
  background: rgba(243, 240, 231, .75);
  clip-path: polygon(0 6%, 100% 0, 97% 22%, 100% 46%, 96% 70%, 100% 100%, 0 96%, 3% 74%, 0 50%, 4% 26%);
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.tape-strip--l { left: 8%; rotate: -10deg; }
.tape-strip--r { right: 8%; rotate: 8deg; background: rgba(211, 228, 0, .8); }

.cassette__body {
  position: relative;
  aspect-ratio: 100 / 63;
  padding: 5.5% 6% 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), transparent 30%),
    #141c2b;
  border-radius: 14px;
  box-shadow: inset 0 0 0 2px #26324a, 0 22px 40px -14px rgba(3, 20, 40, .8);
  container-type: inline-size;
}
.cassette__screw { position: absolute; width: 3cqw; height: 3cqw; border-radius: 50%; background: radial-gradient(circle, #6b7384 30%, #3b4356 32%); }
.cassette__screw::after { content: ""; position: absolute; left: 20%; right: 20%; top: 46%; height: 8%; background: #1b2231; rotate: 30deg; }
.s1 { left: 2%; top: 3%; } .s2 { right: 2%; top: 3%; } .s3 { left: 2%; bottom: 3%; } .s4 { right: 2%; bottom: 3%; }

.cassette__label {
  position: relative;
  height: 74%;
  padding: 3cqw 4cqw 0;
  background:
    linear-gradient(180deg, var(--yellow) 0 30%, var(--paper) 30%);
  border-radius: 6px 6px 3px 3px;
  color: var(--ink);
}
.cassette__side {
  position: absolute; left: 3cqw; top: 2.4cqw;
  font-family: var(--f-display); font-weight: 900; font-stretch: 70%;
  font-size: 7cqw; line-height: 1;
}
.cassette__title { margin: 0 0 0 9cqw; font-weight: 400; line-height: 1; }
.cassette__title .display { display: block; font-size: 7.4cqw; line-height: .95; white-space: nowrap; letter-spacing: 0; }
.cassette__artist { display: block; margin-top: 1.5cqw; font-size: 5.4cqw; color: #0B5D9D; rotate: -2deg; transform-origin: left; }
.cassette__ul { position: absolute; left: 9cqw; top: 18.6cqw; width: 36cqw; height: 2.6cqw; color: #C8102E; }
.cassette__ul path { stroke-width: 3px; }

.cassette__window {
  position: absolute; left: 16%; right: 16%; bottom: 10%;
  height: 34%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4%;
  background: #0d121c;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px #3b4356;
}
.cassette__glass {
  position: absolute; left: 30%; right: 30%; top: 22%; bottom: 22%;
  background: linear-gradient(90deg, #5b3b24, #7a5033 50%, #5b3b24);
  border-radius: 2px;
  opacity: .9;
}
.cassette__brand {
  position: absolute; right: 4cqw; top: 16.5cqw;
  font-weight: 900; font-size: 2.2cqw; letter-spacing: .2em; color: #0B5D9D;
}

/* bobinas: el tamaño de la cinta enrollada sigue el progreso (--p de 0 a 1) */
.cassette { --p: 0; }
.reel { position: relative; z-index: 1; width: 13.5cqw; aspect-ratio: 1; display: grid; place-items: center; }
.reel__tape {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, #3a2616 0 55%, #5a3a22 56% 70%, #3a2616 71%);
  transition: width .25s linear, height .25s linear;
}
.reel--l .reel__tape { width: calc(100% - var(--p) * 45%); height: calc(100% - var(--p) * 45%); }
.reel--r .reel__tape { width: calc(55% + var(--p) * 45%); height: calc(55% + var(--p) * 45%); }
.reel__hub {
  position: relative; width: 48%; aspect-ratio: 1; border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 2px #c9c3b3;
}
.reel__hub i { position: absolute; left: 44%; top: 6%; width: 12%; height: 22%; background: #141c2b; border-radius: 2px; transform-origin: 50% 200%; }
.reel__hub i:nth-child(2) { rotate: 60deg; } .reel__hub i:nth-child(3) { rotate: 120deg; }
.reel__hub i:nth-child(4) { rotate: 180deg; } .reel__hub i:nth-child(5) { rotate: 240deg; } .reel__hub i:nth-child(6) { rotate: 300deg; }
.cassette.is-playing .reel__hub { animation: reel-spin 1.8s linear infinite; }
@keyframes reel-spin { to { rotate: -360deg; } }

.cassette__bottom {
  position: absolute; left: 22%; right: 22%; bottom: 0; height: 16%;
  background: #1d2638;
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
  display: flex; justify-content: space-around; align-items: center;
}
.cassette__bottom i { width: 5%; aspect-ratio: 1; border-radius: 50%; background: #0d121c; }

.cassette__note {
  position: absolute; z-index: 4;
  left: 0; right: 0; bottom: -50px;
  margin: 0;
  text-align: center;
  font-size: clamp(24px, 6.4vw, 36px);
  rotate: -5deg;
  text-shadow: 0 2px 10px rgba(6,52,92,.7);
}
.cassette__arrow { position: absolute; width: 44px; left: 4%; top: -34px; color: var(--yellow); rotate: -100deg; scale: -1 1; }

/* 2. REPRODUCTOR ---------------------------------------------------------------- */
.deck {
  position: relative;
  max-width: 620px;
  margin: 80px auto 0;
  padding: 16px 16px 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "play track" "vol vol" "status status";
  align-items: center;
  gap: 12px 16px;
  background: var(--paper);
  color: var(--ink);
  rotate: 1deg;
  box-shadow: 0 16px 30px -12px rgba(3, 20, 40, .65);
  clip-path: polygon(0 2%, 8% 0, 30% 2%, 55% 0, 80% 2%, 100% 0, 100% 100%, 70% 98%, 40% 100%, 15% 98%, 0 100%);
}
.deck audio { display: none; }

.deck__play {
  grid-area: play;
  width: 72px; height: 72px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--ink); color: var(--yellow);
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 4px 0 #000, 0 8px 14px -6px rgba(0,0,0,.5);
  transition: transform .12s var(--ease), box-shadow .12s;
}
.deck__play svg { width: 36px; height: 36px; }
.deck__play path { fill: currentColor; stroke: none; }
.deck__play .i-pause { display: none; }
.deck.is-playing .deck__play .i-play { display: none; }
.deck.is-playing .deck__play .i-pause { display: block; }
.deck__play:active { transform: translateY(3px); box-shadow: 0 1px 0 #000; }
.deck__play:disabled { opacity: .5; cursor: progress; }
.deck__play:focus-visible, .deck__mute:focus-visible { outline: 3px dashed #0B5D9D; outline-offset: 3px; }

.deck__track { grid-area: track; min-width: 0; }
.deck__bar { position: relative; height: 44px; display: flex; align-items: center; }
.deck__bar::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 12px; translate: 0 -50%;
  background: repeating-linear-gradient(90deg, #5a3a22 0 6px, #4a2f1b 6px 8px);
  border-radius: 2px;
}
.deck__fill {
  position: absolute; left: 0; top: 50%; height: 12px; translate: 0 -50%;
  width: calc(var(--prog, 0) * 100%);
  background: var(--yellow);
  box-shadow: inset 0 0 0 2px var(--ink);
  border-radius: 2px;
  pointer-events: none;
}
/* barras de rango: se ve el diseño propio, el input nativo es invisible salvo el tirador */
.deck input[type="range"] {
  -webkit-appearance: none; appearance: none;
  position: relative; z-index: 2;
  width: 100%; height: 44px; margin: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}
.deck input[type="range"]:disabled { cursor: progress; }
.deck input[type="range"]::-webkit-slider-runnable-track { height: 44px; background: transparent; }
.deck input[type="range"]::-moz-range-track { height: 44px; background: transparent; }
.deck input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 34px; margin-top: 5px;
  background: var(--ink);
  border: 3px solid var(--yellow);
  border-radius: 6px;
  box-shadow: 0 3px 6px rgba(0,0,0,.35);
}
.deck input[type="range"]::-moz-range-thumb {
  width: 20px; height: 28px;
  background: var(--ink);
  border: 3px solid var(--yellow);
  border-radius: 6px;
}
.deck input[type="range"]:focus-visible { outline: 3px dashed #0B5D9D; outline-offset: 2px; }

.deck__time {
  margin: 2px 0 0;
  display: flex; gap: 6px; justify-content: flex-end;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 15px; font-weight: 700; letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.deck__sep { opacity: .45; }

.deck__vol { grid-area: vol; display: flex; align-items: center; gap: 10px; }
.deck__mute {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 0; background: none; color: var(--ink);
  cursor: pointer; touch-action: manipulation;
}
.deck__mute svg { width: 30px; height: 30px; }
.deck__mute path { fill: none; stroke: currentColor; stroke-width: 3px; stroke-linecap: round; stroke-linejoin: round; }
.deck__mute .spk { fill: currentColor; }
.deck__mute .x { display: none; }
.deck__mute[aria-pressed="true"] .w1, .deck__mute[aria-pressed="true"] .w2 { display: none; }
.deck__mute[aria-pressed="true"] .x { display: block; stroke: #C8102E; }
.deck__volume { flex: 1; max-width: 200px; }
.deck__vol .deck__volume { background:
  linear-gradient(90deg, var(--ink) calc(var(--vol, 1) * 100%), #c9c3b3 0) center / 100% 6px no-repeat !important; }

.deck__status { grid-area: status; margin: 0; font-size: 13px; font-weight: 700; color: #C8102E; }
.deck__status:empty { display: none; }

/* En móviles táctiles el volumen lo manda el propio teléfono: solo silenciar */
@media (hover: none) and (pointer: coarse) {
  .deck__volume { display: none; }
  .deck { grid-template-areas: "play track" "status status"; grid-template-columns: auto minmax(0, 1fr); }
  .deck__vol { position: absolute; right: 8px; top: 6px; }
  .deck__time { justify-content: flex-start; }
}

/* 3. PRÓXIMAMENTE MÁS ---------------------------------------------------------- */
.soonmore { position: relative; margin: 110px 0 0; }
.soonmore__rec {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 10px;
  font-weight: 900; font-size: 14px; letter-spacing: .2em;
  color: var(--white);
}
.soonmore__dot { width: 12px; height: 12px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 10px #ff3b30; animation: rec 1.4s steps(1) infinite; }
@keyframes rec { 50% { opacity: .2; box-shadow: none; } }
.soonmore__title { margin: 0; font-size: clamp(56px, 17vw, 160px); line-height: .86; }
.soonmore__title span { display: block; white-space: nowrap; }
.soonmore__mas { color: var(--yellow); }
.soonmore__text { margin: 20px 0 0; max-width: 24em; font-size: clamp(18px, 4.8vw, 24px); line-height: 1.35; font-weight: 600; }
.soonmore__side { margin: 20px 0 0; text-align: right; font-size: clamp(28px, 7vw, 40px); rotate: -3deg; }

/* 4. ESCRITORIO -------------------------------------------------------------- */
@media (min-width: 901px) {
  .arch { padding-top: calc(var(--head-h) + 50px); }
  .arch__title { font-size: clamp(120px, 13vw, 190px); }
  .arch__sub { margin: -10px 4% 0 auto; width: fit-content; }
  .songbox { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 50px; align-items: center; margin-top: 70px; }
  .songbox__intro { grid-column: 1 / -1; }
  .cassette { grid-column: 1; margin: 0; }
  .deck { grid-column: 2; margin: 0; grid-template-columns: auto minmax(0, 1fr); padding: 22px 22px 18px; }
  .deck__play { width: 84px; height: 84px; }
  .cassette__note { left: 30%; right: auto; bottom: -60px; }
  .cassette__arrow { left: -50px; top: -30px; width: 54px; }
  .soonmore { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 50px; align-items: end; margin-top: 150px; }
  .soonmore__rec { grid-column: 1 / -1; }
  .soonmore__title { font-size: clamp(90px, 9vw, 140px); }
  .soonmore__text { margin: 0 0 10px; }
  .soonmore__side { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .cassette.is-playing .reel__hub, .soonmore__dot { animation: none !important; }
  .reel__tape { transition: none; }
}
