/* ===== Agnesislove — style v0.5 =====
   Base: el CSS que subieron (con el fix del .yt-hidden que hizo
   sonar el audio) — no se tocó esa parte.
   Se agregó: fondo rotativo con links externos, cursor unicornio,
   trail de sparkles, click-burst, y un tilt sutil en el polaroid. */

:root {
  --paper: #F3E9D8;
  --ink: #3B2E26;
  --dusty-rose: #C97B84;
  --sage-teal: #4E8079;
  --ochre: #C9922B;
  --rust: #A6432E;

  --radius: 4px;
  --shadow: 0 10px 30px rgba(59, 46, 38, 0.25);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(201, 146, 43, 0.12), transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(78, 128, 121, 0.14), transparent 50%),
    radial-gradient(rgba(59, 46, 38, 0.09) 1px, transparent 1.5px);
  background-size: auto, auto, 26px 26px;
  color: var(--ink);
  font-family: 'Work Sans', sans-serif;
  overflow-x: hidden;
  padding-bottom: 96px;
  position: relative;
}

/* ---------- Fondo rotativo (links externos) ---------- */
.bg-slideshow {
  position: fixed;
  inset: 0;
  z-index: -3;
}

.bg-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.8) sepia(0.12) contrast(1.02);
  opacity: 0;
  transition: opacity 1.8s ease;
}

.bg-slide.active { opacity: 1; }

.bg-scrim {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: rgba(243, 233, 216, 0.86);
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Marca de agua ---------- */
.watermark {
  position: absolute;
  top: 4%;
  left: 50%;
  transform: translateX(-50%) rotate(-6deg);
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(4rem, 32vw, 15rem);
  color: var(--ink);
  opacity: 0.035;
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  margin: 0;
}

/* ---------- Nav ---------- */
.nav {
  display: flex;
  justify-content: center;
  padding: 28px 16px 0;
  position: relative;
  z-index: 2;
}

.logo {
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--sage-teal);
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 36px 20px 20px;
  position: relative;
  z-index: 2;
}

.title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-optical-sizing: auto;
  font-size: clamp(2.4rem, 10vw, 4.2rem);
  margin: 0;
  letter-spacing: -1px;
  color: var(--ink);
}

.title span {
  display: inline-block;
  transition: transform 0.2s ease, color 0.2s ease;
}

.title span:nth-child(3n) { color: var(--rust); }
.title span:nth-child(4n) { color: var(--ochre); }

.title span:hover {
  transform: translateY(-6px) rotate(-3deg);
  color: var(--sage-teal);
}

.tagline {
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--dusty-rose);
  margin-top: 6px;
}

/* ---------- Polaroid (con tilt 3D sutil, ver JS) ---------- */
.polaroid {
  position: relative;
  max-width: 300px;
  margin: 36px auto 0;
  background: #FBF6EC;
  padding: 14px 14px 44px;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  transform: rotate(-1.5deg) perspective(600px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.15s ease-out;
  will-change: transform;
}

.polaroid-img {
  width: 100%;
  display: block;
  filter: sepia(0.15) saturate(0.9) contrast(1.02);
  border-radius: 2px;
}

.polaroid-caption {
  font-family: 'Caveat', cursive;
  font-size: 1.3rem;
  color: var(--ink);
  text-align: center;
  margin: 10px 0 0;
}

.tape {
  position: absolute;
  width: 60px;
  height: 22px;
  background: rgba(201, 146, 43, 0.35);
  box-shadow: 0 2px 4px rgba(59, 46, 38, 0.15);
  top: -10px;
}

.tape-left { left: -14px; transform: rotate(-40deg); }
.tape-right { right: -14px; transform: rotate(40deg); }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink);
  margin-top: 44px;
  opacity: 0.65;
  position: relative;
  z-index: 2;
}

/* ---------- Motas decorativas ---------- */
.motes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.mote {
  position: absolute;
  width: 16px;
  height: 16px;
  fill: none;
  stroke-width: 1.4;
  opacity: 0.45;
  animation: drift 9s ease-in-out infinite;
}

.mote.star { stroke: var(--ochre); }
.mote.heart { stroke: none; fill: var(--dusty-rose); opacity: 0.3; }
.mote.sparkle { stroke: none; fill: var(--sage-teal); opacity: 0.35; }

.m1 { top: 12%; left: 8%; }
.m2 { top: 20%; right: 10%; width: 14px; height: 14px; animation-delay: 1s; }
.m3 { top: 6%; left: 30%; animation-delay: 2s; width: 12px; height: 12px; }
.m4 { top: 42%; left: 4%; animation-delay: 0.5s; }
.m5 { top: 55%; right: 6%; width: 18px; height: 18px; animation-delay: 3s; }
.m6 { top: 30%; right: 24%; animation-delay: 1.5s; width: 12px; height: 12px; }
.m7 { bottom: 16%; left: 12%; animation-delay: 2.5s; }
.m8 { bottom: 24%; right: 14%; width: 14px; height: 14px; animation-delay: 4s; }
.m9 { bottom: 6%; left: 42%; animation-delay: 1.2s; width: 12px; height: 12px; }

@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(90deg); }
}

/* ---------- Floating player ---------- */
.player {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(92%, 380px);
  background: rgba(59, 46, 38, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.player-btn {
  border: none;
  background: var(--ochre);
  color: var(--ink);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.player-btn:hover { transform: scale(1.08); }
.player-btn-sm { width: 30px; height: 30px; background: var(--dusty-rose); font-size: 0.8rem; color: #fff; }

.player-info { flex: 1; min-width: 0; }

.player-track {
  display: block;
  font-family: 'Work Sans', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  color: #F3E9D8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-bar {
  height: 3px;
  background: rgba(243, 233, 216, 0.2);
  border-radius: 4px;
  margin-top: 5px;
  overflow: hidden;
}

.player-progress {
  height: 100%;
  width: 0%;
  background: var(--ochre);
}

/* El fix que hicieron para que YouTube reproduzca audio — sin tocar */
.yt-hidden {
  position: absolute;
  top: -9999px;
  left: -9999px;
  width: 300px;
  height: 300px;
  opacity: 1;
  pointer-events: none;
}

/* ---------- Cursor unicornio ---------- */
.cursor-unicorn {
  position: fixed;
  top: 0;
  left: 0;
  font-size: 22px;
  line-height: 1;
  pointer-events: none;
  z-index: 999;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0);
  transition: opacity 0.2s ease;
  filter: drop-shadow(0 2px 4px rgba(59, 46, 38, 0.35));
}

.cursor-unicorn.visible { opacity: 1; }

/* Oculta el cursor del sistema solo cuando hay mouse (no en touch) */
@media (hover: hover) and (pointer: fine) {
  body.has-unicorn-cursor { cursor: none; }
  body.has-unicorn-cursor a,
  body.has-unicorn-cursor button { cursor: none; }
}

/* ---------- Sparkles (trail + click burst) ---------- */
.sparkle-particle {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ochre);
  pointer-events: none;
  z-index: 998;
  animation: sparkle-fade 0.7s ease-out forwards;
}

@keyframes sparkle-fade {
  0% { opacity: 0.9; transform: translate3d(0, 0, 0) scale(1); }
  100% { opacity: 0; transform: translate3d(var(--dx, 0px), var(--dy, -18px), 0) scale(0.3); }
}

/* ---------- Responsive ---------- */
@media (max-width: 420px) {
  .polaroid { max-width: 82vw; }
}

@media (prefers-reduced-motion: reduce) {
  .mote { animation: none; }
  .title span { transition: none; }
  .bg-slide { transition: none; }
  .polaroid { transition: none; }
  .sparkle-particle { display: none; }
}