/* Lyra — misma estética que la app: negro cálido, blanco hueso, títulos en Instrument Serif y textos en Outfit. */

@font-face {
  font-family: "Instrument Serif";
  src: url("fuentes/instrument_serif.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("fuentes/instrument_serif_italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("fuentes/outfit.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0a0a0b;
  --surface: #141416;
  --high: #1c1c1f;
  --higher: #26262a;
  --border: rgba(243, 243, 241, 0.08);
  --text: #f3f3f1;
  --muted: #9c9c96;
  --subtle: #6e6e68;
  --accent: #e8e6df;
  --on-accent: #0a0a0b;
  --like: #c45c5c;
  --radius: 20px;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Un poco de luz cálida arriba, como el fondo difuminado del reproductor. */
body::before {
  content: "";
  position: fixed;
  inset: -20vh -10vw auto;
  height: 80vh;
  background: radial-gradient(60% 60% at 70% 30%, rgba(196, 92, 92, 0.16), transparent 70%),
    radial-gradient(50% 50% at 20% 10%, rgba(232, 230, 223, 0.07), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

a { color: var(--accent); text-underline-offset: 3px; }
strong { font-weight: 600; color: var(--text); }
em { font-style: italic; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; margin: 0; }
h1 em, h2 em { color: var(--muted); }
h3 { font-size: 18px; font-weight: 600; margin: 0 0 6px; }
p { margin: 0; }

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--accent);
  color: var(--on-accent);
  padding: 8px 14px;
  border-radius: 10px;
  z-index: 100;
}
.skip:focus { left: 16px; }

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

/* ───────────────────────────── cabecera */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  /* De lado a lado (para tapar al bajar), con el contenido alineado con el resto. */
  padding: 14px max(24px, calc((100% - 1112px) / 2));
  background: rgba(10, 10, 11, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--serif); font-size: 26px; }
.mark { width: 34px; height: 34px; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; transition: color 0.2s; }
.nav a:hover { color: var(--text); }

/* ───────────────────────────── botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font: 600 16px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s, border-color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: #fff; }
.btn.ghost { color: var(--text); border-color: rgba(243, 243, 241, 0.18); background: transparent; }
.btn.ghost:hover { border-color: rgba(243, 243, 241, 0.4); }
.btn.small { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn.wide { width: 100%; }

/* ───────────────────────────── portada */
main { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  padding: 72px 0 96px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
h1 { font-size: clamp(56px, 8vw, 104px); line-height: 0.95; }
.lead { color: var(--muted); font-size: 19px; max-width: 34em; margin-top: 24px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.cta.center { justify-content: center; }
.meta { margin-top: 18px; font-size: 14px; color: var(--subtle); }

/* Móvil de muestra con el reproductor */
.phone {
  justify-self: center;
  width: min(340px, 84vw);
  aspect-ratio: 9 / 18.5;
  border-radius: 46px;
  padding: 12px;
  background: linear-gradient(160deg, #2a2a2e, #141416);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transform: rotate(2deg);
}
.screen {
  height: 100%;
  border-radius: 36px;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(180deg, #3a1f22 0%, #1a1214 45%, #0a0a0b 100%);
  overflow: hidden;
}
.np-top { text-align: center; display: grid; gap: 2px; }
.np-label { font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.np-from { font-size: 12px; font-weight: 600; }
.cover {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #f2b07a 0%, #e0766b 45%, #6d2f45 100%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  animation: pulso 1.8s ease-in-out infinite;
}
.sun { position: absolute; width: 38%; aspect-ratio: 1; border-radius: 50%; left: 31%; top: 22%; background: #ffe3b3; box-shadow: 0 0 40px rgba(255, 227, 179, 0.7); }
.hill { position: absolute; left: -10%; right: -10%; border-radius: 50% 50% 0 0; }
.hill.one { height: 45%; bottom: -12%; background: #3d1f35; }
.hill.two { height: 30%; bottom: -14%; left: 30%; right: -30%; background: #22131f; }
.bars { display: flex; align-items: center; gap: 3px; height: 22px; }
.bars i {
  flex: 1;
  height: 30%;
  border-radius: 9px;
  background: rgba(232, 230, 223, 0.85);
  animation: barra 1.1s ease-in-out infinite alternate;
}
.bars i:nth-child(3n) { animation-duration: 0.8s; }
.bars i:nth-child(3n + 1) { animation-duration: 1.3s; animation-delay: -0.4s; }
.bars i:nth-child(4n) { animation-duration: 0.95s; animation-delay: -0.2s; }
.bars i:nth-child(5n + 2) { animation-duration: 0.7s; animation-delay: -0.6s; }
.np-title { display: flex; align-items: center; justify-content: space-between; }
.np-title strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.1; }
.np-title span { font-size: 13px; color: var(--muted); }
.heart { width: 24px; height: 24px; fill: var(--like); }
.progress { height: 4px; border-radius: 4px; background: rgba(243, 243, 241, 0.18); }
.progress span { display: block; height: 100%; width: 38%; border-radius: 4px; background: var(--accent); }
.np-lyrics {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(243, 243, 241, 0.06);
  font-size: 12px;
  line-height: 1.45;
}
.np-lyrics small { display: block; font-size: 9px; letter-spacing: 0.16em; color: var(--muted); margin-bottom: 4px; }
.np-lyrics span { display: block; color: var(--subtle); }
.np-lyrics b { display: block; font-weight: 600; color: var(--text); }
.controls { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.controls svg { width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.controls .play { width: 60px; height: 60px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.controls .play svg { fill: var(--on-accent); stroke: none; width: 24px; height: 24px; }

@keyframes barra { from { height: 18%; } to { height: 100%; } }
@keyframes pulso { 0%, 100% { transform: scale(1); } 8% { transform: scale(1.02); } 20% { transform: scale(1); } }

/* ───────────────────────────── secciones */
.section { padding: 96px 0; border-top: 1px solid var(--border); }
h2 { font-size: clamp(40px, 5.5vw, 68px); line-height: 1; }
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.25s ease, border-color 0.25s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(243, 243, 241, 0.16); }
.card svg { width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }
.card p { color: var(--muted); font-size: 15px; }

/* Android Auto */
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
.quote { color: var(--text); font-style: italic; white-space: nowrap; }
.car {
  display: grid;
  grid-template-columns: 64px 1fr;
  aspect-ratio: 16 / 9.5;
  border-radius: 26px;
  background: #0e0e10;
  border: 10px solid #1d1d20;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.car-rail { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: #151517; }
.car-rail span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.car-rail span.on { background: rgba(232, 230, 223, 0.14); }
.car-rail svg { width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.car-rail .on svg { stroke: var(--text); }
.car-main { padding: 16px 18px; display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0; }
.car-group { font-size: 12px; font-weight: 600; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tile { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; display: flex; align-items: flex-end; padding: 8px; }
.tile span { font-size: 11px; font-weight: 600; line-height: 1.1; position: relative; }
.tile.liked { background: linear-gradient(135deg, #c45c5c, #5e2626); flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.tile.liked svg { width: 34%; fill: var(--text); }
.tile.art.a { background: linear-gradient(160deg, #f2b07a, #6d2f45); }
.tile.art.b { background: linear-gradient(160deg, #6c8fd6, #1f2b52); }
.tile.art.c { background: linear-gradient(160deg, #7fc3a8, #1f4a3b); }
.tile.art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.55)); }
.tile.mood { align-items: flex-start; }
.tile.mood span { font-size: 12px; }
.tile.m1 { background: linear-gradient(135deg, #c45c95, #62254a); }
.tile.m2 { background: linear-gradient(135deg, #4e9c80, #1f4a3b); }
.tile.m3 { background: linear-gradient(135deg, #8a5cc4, #3f2763); }
.tile.m4 { background: linear-gradient(135deg, #c4955c, #6b4a22); }

/* Instalar */
.install h2 { max-width: 12em; }
.steps {
  list-style: none;
  counter-reset: paso;
  padding: 0;
  margin: 48px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.steps li {
  counter-increment: paso;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.steps li::before {
  content: counter(paso);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  margin-bottom: 16px;
}
.steps p { color: var(--muted); font-size: 15px; }
.note { margin: 28px 0 0; color: var(--subtle); font-size: 15px; text-align: center; }
.install .cta { margin-top: 28px; }
.install .subhead { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 4vw, 44px); line-height: 1.05; margin: 96px 0 0; scroll-margin-top: 96px; }
.install .subhead + .steps { margin-top: 28px; }

/* Preguntas */
.faq details { border-bottom: 1px solid var(--border); max-width: 820px; }
.faq details:first-of-type { margin-top: 40px; border-top: 1px solid var(--border); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 40px 22px 0;
  font-size: 19px;
  font-weight: 500;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 26px;
  font-weight: 300;
  color: var(--muted);
  transition: transform 0.25s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 40px 22px 0; }

/* Pie */
.foot {
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 24px 56px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  color: var(--subtle);
  font-size: 14px;
}
.foot p { max-width: 640px; text-align: right; }
.foot a { color: var(--muted); }

/* ───────────────────────────── aviso antes de descargar */
.dialog {
  width: min(460px, calc(100vw - 32px));
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--surface);
  color: var(--text);
  padding: 32px 28px 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.dialog::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); }
.dialog[open] { animation: aparece 0.28s cubic-bezier(0.2, 0, 0, 1); }
.dialog h2 { font-size: 40px; }
.dialog-lead { color: var(--muted); margin: 14px 0 18px; font-size: 16px; }
.dialog-close { position: absolute; top: 14px; right: 14px; }
.dialog-close button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--higher);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.mini-steps { margin: 0 0 24px; padding-left: 22px; color: var(--muted); font-size: 15px; display: grid; gap: 10px; }
.dialog-more { display: block; text-align: center; margin-top: 14px; font-size: 14px; color: var(--muted); }
@keyframes aparece { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 14px 20px;
  border-radius: 14px;
  background: var(--higher);
  color: var(--text);
  font-size: 15px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  z-index: 50;
}

/* Aparición suave al bajar (si se permiten animaciones) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0, 0, 1); }
.reveal.visible { opacity: 1; transform: none; }

/* ───────────────────────────── móvil */
@media (max-width: 960px) {
  .hero, .split { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 72px; gap: 56px; text-align: left; }
  .grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .top .btn { margin-left: auto; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  main, .top, .foot { padding-left: 16px; padding-right: 16px; }
  .grid, .steps { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .lead { font-size: 17px; }
  .cta .btn { width: 100%; }
  .phone { transform: none; }
  .car { grid-template-columns: 48px 1fr; border-width: 7px; aspect-ratio: auto; }
  .car-rail { gap: 12px; padding: 12px 0; }
  .car-rail span { width: 32px; height: 32px; }
  .car-main { padding: 12px; }
  .tiles { gap: 7px; }
  .tile span { font-size: 9.5px; }
  .foot { flex-direction: column; align-items: flex-start; }
  .foot p { text-align: left; }
  .quote { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ───────────────────────────── playlist compartida (/p/…) */
.compartida { max-width: 868px; padding-top: 64px; padding-bottom: 96px; }
.compartida h1 { font-size: clamp(48px, 8vw, 84px); line-height: 1; overflow-wrap: anywhere; }
.note.left { text-align: left; }
.canciones { list-style: none; counter-reset: cancion; padding: 0; margin: 40px 0 0; border-top: 1px solid var(--border); }
.canciones li {
  counter-increment: cancion;
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.canciones li::before { content: counter(cancion); grid-row: span 2; align-self: center; color: var(--subtle); font-size: 14px; text-align: right; padding-right: 8px; }
.canciones strong { font-weight: 600; overflow-wrap: anywhere; }
.canciones span { color: var(--muted); font-size: 14px; }

/* ───────────────────────────── términos y condiciones (/terminos) */
.dialog-legal { margin-top: 12px; text-align: center; font-size: 13px; color: var(--subtle); }
.dialog-legal a { color: var(--muted); }
.legal { max-width: 808px; padding-top: 64px; padding-bottom: 96px; }
.legal h1 { font-size: clamp(48px, 8vw, 84px); line-height: 1; }
.legal section { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--border); scroll-margin-top: 84px; }
.legal h2 { font-size: clamp(28px, 3.6vw, 36px); line-height: 1.1; margin-bottom: 14px; }
.legal section p, .legal section li { color: var(--muted); }
.legal section p + p { margin-top: 12px; }
.legal ul { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.legal li::marker { color: var(--subtle); }
.indice { margin-top: 40px; padding: 20px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.indice ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 32px; }
.indice li { padding: 3px 0; break-inside: avoid; color: var(--subtle); }
.indice a { color: var(--text); text-decoration: none; }
.indice a:hover { text-decoration: underline; }
@media (max-width: 560px) {
  .legal { padding-top: 40px; }
  .indice ol { columns: 1; }
}
