:root {
  --ink: #060914;
  --ink-2: #0d1428;
  --ink-3: #1a2547;
  --ice: #e8efff;
  --frost: #93a3c8;
  --sapphire: #2f6bff;
  --sapphire-hover: #4f84ff;
  --sapphire-deep: #1b3f9e;
  --glint: #bcd4ff;
  --danger: #ff8f85;
  --ok: #86e3b4;

  --font-ui: 'Jost', system-ui, sans-serif;
  --font-note: 'Cormorant Garamond', Georgia, serif;

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(90% 55% at 50% -8%, rgba(47,107,255,.28) 0%, transparent 70%),
    radial-gradient(60% 40% at 100% 100%, rgba(27,63,158,.18) 0%, transparent 70%),
    var(--ink);
  background-attachment: fixed;
  color: var(--ice);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: var(--glint); }

:focus-visible {
  outline: 2px solid var(--glint);
  outline-offset: 3px;
  border-radius: 6px;
}

[hidden] { display: none !important; }

.wrap {
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

/* ---------- Marca ---------- */
.brand { display: block; width: fit-content; margin: 0 auto; }
.brand img { display: block; height: 3.25rem; width: auto; }
.brand--small img { height: 2.4rem; }

.footer-brand {
  margin-top: 4rem;
  text-align: center;
  color: var(--frost);
  font-size: .85rem;
}
.footer-brand img { display: block; margin: 0 auto .5rem; height: 1.6rem; width: auto; opacity: .75; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .6rem 1.25rem;
  border: 1px solid var(--ink-3);
  border-radius: 999px;
  background: var(--ink-2);
  color: var(--ice);
  font: inherit;
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.btn:hover { border-color: var(--frost); }
.btn:disabled { opacity: .5; cursor: wait; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn--primary {
  background: var(--sapphire);
  border-color: var(--sapphire);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(47,107,255,.8);
}
.btn--primary:hover { background: var(--sapphire-hover); border-color: var(--sapphire-hover); }
.btn--large { min-height: 3.25rem; padding: .8rem 1.75rem; font-size: 1.05rem; }
.btn--danger { color: var(--danger); }
.btn--small { min-height: 2.25rem; padding: .35rem .9rem; font-size: .85rem; }

/* ---------- Vinilo ---------- */
.vinyl {
  position: relative;
  width: min(76vw, 20rem);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 31%, rgba(188,212,255,.12) 31.5% 32%, transparent 32.5%),
    repeating-radial-gradient(circle, #070a16 0 2px, #0e1426 2px 4px);
  box-shadow:
    0 40px 80px -30px rgba(47,107,255,.55),
    0 0 0 1px rgba(188,212,255,.08),
    inset 0 0 0 6px #04060d;
  animation: spin 3.2s linear infinite;
  animation-play-state: paused;
}
/* Destellos de diamante sobre los surcos */
.vinyl::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 25deg,
    transparent 0 9%, rgba(120,170,255,.22) 14%, transparent 20% 46%,
    rgba(188,212,255,.12) 52%, transparent 58% 74%, rgba(47,107,255,.2) 80%, transparent 86%);
  -webkit-mask: radial-gradient(circle, transparent 32%, #000 33%);
          mask: radial-gradient(circle, transparent 32%, #000 33%);
  pointer-events: none;
}
.vinyl.is-playing { animation-play-state: running; }
.vinyl__label {
  animation-play-state: inherit;
  position: absolute;
  inset: 31%;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, #1d3c8f, #0b1638 75%);
}
.vinyl__label img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* El diamante gira al revés que el disco, así se mantiene derecho */
.vinyl__label .vinyl__gem {
  width: 52%; height: auto; object-fit: contain;
  animation: spin 3.2s linear infinite reverse;
  animation-play-state: inherit;
}
.vinyl__label:has(.vinyl__gem:not([hidden])) + .vinyl__hole { display: none; }
.vinyl__hole {
  position: absolute;
  top: 50%; left: 50%;
  width: 4%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 2px rgba(188,212,255,.25);
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .vinyl, .vinyl__label .vinyl__gem { animation: none; }
  .btn { transition: none; }
}

/* ---------- Página de la canción ---------- */
.song { text-align: center; }
.song .brand { margin-bottom: 2.25rem; }
.song .vinyl { margin-bottom: 2.25rem; }

.song__for {
  margin: 0 0 .35rem;
  color: var(--glint);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .02em;
}
.song__title {
  margin: 0 0 1.75rem;
  font-size: clamp(2.1rem, 8.5vw, 2.9rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.player {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: .7rem 1.4rem .7rem .7rem;
  border: 1px solid var(--ink-3);
  border-radius: 999px;
  background: rgba(13,20,40,.75);
  backdrop-filter: blur(10px);
  text-align: left;
}
.player__play {
  width: 3.6rem; height: 3.6rem;
  border: 0;
  border-radius: 50%;
  background: var(--sapphire);
  color: #fff;
  cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px -8px rgba(47,107,255,.9);
}
.player__play:hover { background: var(--sapphire-hover); }
.player__play svg { width: 1.5rem; height: 1.5rem; }
.player__bar { display: grid; gap: .25rem; }
.player__times {
  display: flex; justify-content: space-between;
  color: var(--frost);
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
}
.player input[type=range] {
  width: 100%;
  margin: 0;
  accent-color: var(--sapphire);
}

.song__download { margin-top: 1rem; }

.note {
  margin: 3rem 0 0;
  padding: 0 .5rem;
  font-family: var(--font-note);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.6rem, 6.5vw, 2rem);
  line-height: 1.3;
  color: var(--ice);
  white-space: pre-line;
  text-wrap: pretty;
}

.lyrics {
  margin-top: 3rem;
  padding: 2rem 1.5rem;
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-l);
  background: rgba(13,20,40,.55);
}
.lyrics h2 {
  margin: 0 0 1rem;
  font-size: .95rem;
  font-weight: 500;
  color: var(--frost);
}
.lyrics__text {
  margin: 0;
  white-space: pre-line;
  font-size: 1.05rem;
  line-height: 1.8;
}

.state { padding-top: 22vh; text-align: center; color: var(--frost); }
.state .brand { margin-bottom: 3rem; }
.state h1 { color: var(--ice); font-size: 1.5rem; font-weight: 500; margin: 0 0 .5rem; }

/* ---------- Portada ---------- */
.home { max-width: 64rem; padding-top: 1.5rem; }
.home__nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  margin-bottom: 3rem;
}
.home__nav .brand { margin: 0; }

.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 3rem;
  min-height: 70vh;
}
.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero p { margin: 0 0 2rem; max-width: 30rem; color: var(--frost); font-size: 1.15rem; }
.hero .vinyl { width: min(80vw, 26rem); }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 2.5rem; min-height: 0; text-align: center; }
  .hero p { margin-inline: auto; }
  .hero__art { order: -1; }
  .hero .vinyl { width: min(70vw, 18rem); }
}

.section { margin-top: 6rem; }
.section > h2 {
  margin: 0 0 2rem;
  font-size: clamp(1.7rem, 4.5vw, 2.3rem);
  font-weight: 400;
  letter-spacing: -0.015em;
}

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-m);
  background: linear-gradient(180deg, rgba(13,20,40,.9), rgba(13,20,40,.4));
}
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 2.25rem; height: 2.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--sapphire);
  border-radius: 50%;
  color: var(--glint);
  font-size: .95rem;
}
.steps h3 { margin: 0 0 .4rem; font-size: 1.15rem; font-weight: 500; }
.steps p { margin: 0; color: var(--frost); font-size: .98rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.delivery {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr 1fr;
}
.delivery article {
  display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: center;
  padding: 1.5rem;
  border-radius: var(--radius-m);
  background: var(--ink-2);
}
.delivery svg { width: 3.5rem; height: 3.5rem; color: var(--glint); }
.delivery h3 { margin: 0 0 .25rem; font-size: 1.1rem; font-weight: 500; }
.delivery p { margin: 0; color: var(--frost); font-size: .95rem; }
@media (max-width: 760px) { .delivery { grid-template-columns: 1fr; } }

.occasions {
  margin: 0;
  font-family: var(--font-note);
  font-style: italic;
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  line-height: 1.3;
  color: var(--frost);
  text-wrap: balance;
}
.occasions strong { color: var(--ice); font-weight: 500; }

.cta {
  margin-top: 6rem;
  padding: 3rem 1.5rem;
  border-radius: var(--radius-l);
  text-align: center;
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(47,107,255,.35), transparent 70%),
    var(--ink-2);
  border: 1px solid var(--ink-3);
}
.cta img { height: 3rem; width: auto; margin-bottom: 1rem; }
.cta h2 { margin: 0 0 .75rem; font-size: clamp(1.7rem, 4.5vw, 2.3rem); font-weight: 400; }
.cta p { margin: 0 auto 1.75rem; max-width: 28rem; color: var(--frost); }

/* ---------- Panel ---------- */
.admin { max-width: 54rem; }
.admin__head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.admin__head .brand { margin: 0; }
.admin__user { color: var(--frost); font-size: .85rem; }

.panel {
  padding: 1.75rem;
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-l);
  background: rgba(13,20,40,.8);
  margin-bottom: 2rem;
}
.panel h2 { margin: 0 0 1.25rem; font-size: 1.25rem; font-weight: 500; }

.field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.field label { font-size: .9rem; font-weight: 500; }
.field small { color: var(--frost); font-size: .8rem; }
.field input[type=text],
.field input[type=email],
.field input[type=password],
.field textarea {
  width: 100%;
  padding: .75rem .9rem;
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-s);
  background: var(--ink);
  color: var(--ice);
  font: inherit;
  font-size: 1rem;
}
.field input:focus, .field textarea:focus { border-color: var(--sapphire); outline: none; box-shadow: 0 0 0 3px rgba(47,107,255,.25); }
.field textarea { min-height: 6rem; resize: vertical; }
.field input[type=file] { font: inherit; font-size: .9rem; color: var(--frost); }
.field input[type=file]::file-selector-button {
  margin-right: .75rem;
  padding: .45rem .9rem;
  border: 1px solid var(--ink-3);
  border-radius: 999px;
  background: var(--ink-2);
  color: var(--ice);
  font: inherit;
  cursor: pointer;
}
.grid-2 { display: grid; gap: 0 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }

.actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }

.msg { margin: 1rem 0 0; font-size: .95rem; }
.msg--error { color: var(--danger); }
.msg--ok { color: var(--ok); }

.usage { margin-bottom: 1.5rem; font-size: .9rem; color: var(--frost); }
.usage__bar {
  height: 6px; margin-top: .4rem;
  border-radius: 99px;
  background: var(--ink-3);
  overflow: hidden;
}
.usage__bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--sapphire), var(--glint)); }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.item {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  padding: 1.1rem;
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-m);
  background: rgba(13,20,40,.7);
}
.item__cover {
  width: 3.5rem; height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
  background: radial-gradient(circle at 30% 30%, #1d3c8f, #0b1638 75%);
}
.item__title { margin: 0; font-size: 1.1rem; font-weight: 500; }
.item__meta { margin: .1rem 0 .75rem; color: var(--frost); font-size: .85rem; word-break: break-all; }
.item .actions { gap: .5rem; }

.qr-box {
  margin-top: 1rem;
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
}
.qr-box img { width: 9rem; height: 9rem; border-radius: var(--radius-s); background: #fff; }

.login { max-width: 24rem; margin: 12vh auto 0; }
.login .brand { margin-bottom: 2rem; }

.empty { color: var(--frost); padding: 1rem 0; }
