/* =====================================================================
   for aubby — shared site styles
   Soft pastel-pink, rounded, bubbly. Mobile-first.
   Every page (hub + each mini-site) links this file so the look stays
   consistent. Tweak the variables below to re-skin the whole site.
   ===================================================================== */

:root {
  /* ---- palette ---- */
  --blush:        #ffeef4;  /* lightest pink, page bg */
  --bubblegum:    #ffc2dd;  /* mid pink */
  --rose:         #ff8fbf;  /* stronger pink, accents */
  --deep-rose:    #f25f9b;  /* text accent / buttons */
  --cream:        #fff8f0;  /* warm off-white */
  --white:        #ffffff;
  --ink:          #6b3a52;  /* soft warm "near-black" for text */
  --ink-soft:     #a16b86;  /* muted label text */
  --lock-pink:    #f3dbe6;  /* faded locked tile */

  /* ---- shape ---- */
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;

  /* ---- shadow ---- */
  --shadow-soft: 0 6px 18px rgba(242, 95, 155, 0.18);
  --shadow-lift: 0 14px 30px rgba(242, 95, 155, 0.28);

  /* quirky sticker-vibe type: bouncy body + chunky display headers */
  --font: "Grandstander", "Baloo 2", system-ui, -apple-system, sans-serif;
  --font-display: "Chewy", "Grandstander", cursive;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  /* soft pink wash + faint scrapbook "paper" dot texture */
  background-color: #ffe7f1;
  background-image:
    radial-gradient(120% 90% at 50% -10%, var(--white) 0%, var(--blush) 50%, #ffdcec 100%),
    radial-gradient(rgba(255, 143, 191, 0.10) 1.4px, transparent 1.5px),
    radial-gradient(rgba(255, 143, 191, 0.08) 1.4px, transparent 1.5px);
  background-size: 100% 100%, 22px 22px, 22px 22px;
  background-position: 0 0, 0 0, 11px 11px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Living ambient glow — two soft pink lights that slowly drift, so the
   background feels alive instead of flat. Site-wide, no markup needed. */
body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 38% at 22% 28%, rgba(255, 140, 190, 0.22), transparent 60%),
    radial-gradient(44% 44% at 80% 72%, rgba(255, 175, 210, 0.22), transparent 60%);
  filter: blur(22px);
  animation: glowDrift 17s ease-in-out infinite alternate;
}
@keyframes glowDrift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(4%, 3%) scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
}

/* Scattered low-opacity decorative accents (hearts / sparkles / stars).
   Pure CSS layer behind content; pointer-events off so it never blocks taps. */
.bg-accents {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-accents span {
  position: absolute;
  width: var(--s, 22px);
  height: var(--s, 22px);
  animation: bob 7s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  user-select: none;
}
.bg-accents span svg {
  width: 100%;
  height: 100%;
  display: block;
  transform: rotate(var(--r, 0deg));
}

/* die-cut sticker look: white outline + soft drop shadow, like a real
   sticker stuck onto a scrapbook page */
.sticker-cut {
  filter:
    drop-shadow(1.4px 0 0 #fff)
    drop-shadow(-1.4px 0 0 #fff)
    drop-shadow(0 1.4px 0 #fff)
    drop-shadow(0 -1.4px 0 #fff)
    drop-shadow(0 4px 4px rgba(180, 90, 130, 0.28));
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-9px) rotate(3deg); }
}
/* scattered stickers gently twinkle in opacity */
.bg-accents span svg { animation: twinkle 3.5s ease-in-out infinite; animation-delay: inherit; }
@keyframes twinkle { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; } }

/* little hearts drifting up the page */
.floaty {
  position: absolute;
  bottom: -34px;
  opacity: 0;
  pointer-events: none;
  animation-name: floatUp;
  animation-timing-function: ease-in;
  animation-iteration-count: 1;
}
.floaty svg { width: 100%; height: 100%; display: block; }
@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0); opacity: 0; }
  15%  { opacity: 0.6; }
  85%  { opacity: 0.45; }
  100% { transform: translateY(-82vh) rotate(22deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bg-accents span svg { animation: none; }
}
/* reusable entrance + idle motions used across pages */
@keyframes popIn {
  0%   { opacity: 0; transform: scale(0.6) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes fadeUp {
  0%   { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes sway {
  0%, 100% { transform: rotate(-2deg); }
  50%      { transform: rotate(2deg); }
}
@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  30%      { transform: scale(1.18); }
  45%      { transform: scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  .bg-accents span { animation: none; }
}

/* small inline sticker that sits in a line of text */
.inline-sticker {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  vertical-align: -0.12em;
  margin: 0 0.05em;
}
.inline-sticker svg { width: 100%; height: 100%; display: block; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-14px) rotate(8deg); }
}
@media (prefers-reduced-motion: reduce) {
  .bg-accents span { animation: none; }
}

/* Content sits above the accent layer */
.page {
  position: relative;
  z-index: 1;
}

/* ---- shared headings ---- */
.site-title {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--deep-rose);
  margin: 0;
}

/* ---- floating music player (shared, injected by player.js) ---- */
.music {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 50;
  font-family: var(--font);
}
.music__toggle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: linear-gradient(180deg, var(--rose), var(--deep-rose));
  color: #fff;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.music__toggle svg { width: 22px; height: 22px; }
.music.playing .music__toggle { animation: spin 4.5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .music.playing .music__toggle { animation: none; } }

.music__panel {
  position: absolute;
  top: 56px;
  right: 0;
  width: 232px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid var(--bubblegum);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  padding: 14px;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.music.open .music__panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.music__title {
  font-weight: 700;
  color: var(--deep-rose);
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music__artist { color: var(--ink-soft); font-size: 0.8rem; margin: 1px 0 9px; }
.music__bar {
  height: 7px;
  background: var(--blush);
  border-radius: 99px;
  cursor: pointer;
  overflow: hidden;
}
.music__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--rose), var(--deep-rose));
  border-radius: 99px;
}
.music__controls { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 11px 0 4px; }
.music__controls button {
  border: none;
  background: var(--blush);
  color: var(--deep-rose);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}
.music__controls button:hover { transform: scale(1.08); }
.music__controls button svg { width: 18px; height: 18px; }
.music__controls .music__play {
  width: 44px;
  height: 44px;
  background: linear-gradient(180deg, var(--rose), var(--deep-rose));
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.music__controls .music__play svg { width: 22px; height: 22px; }
.music__list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 132px; overflow-y: auto; }
.music__list li {
  font-size: 0.82rem;
  padding: 7px 9px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music__list li:hover { background: #fff2f8; }
.music__list li.active { background: var(--blush); color: var(--deep-rose); font-weight: 700; }

/* first-visit "tap for music" nudge */
.music__hint {
  position: absolute;
  top: 56px;
  right: 2px;
  white-space: nowrap;
  background: linear-gradient(180deg, var(--rose), var(--deep-rose));
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 13px;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  animation: hintBounce 1.5s ease-in-out infinite;
}
.music__hint .inline-sticker { width: 0.9em; height: 0.9em; }
.music__hint::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 16px;
  width: 0; height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 8px solid var(--rose);
}
@keyframes hintBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) { .music__hint { animation: none; } }

/* ---- first-visit intro overlay ---- */
.intro-screen {
  display: none; /* shown via JS only on first visit */
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, rgba(255,238,244,0.92), rgba(255,216,232,0.92));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.intro-screen.hiding {
  animation: introOut 0.5s ease forwards;
  pointer-events: none;
}
@keyframes introOut {
  to { opacity: 0; transform: scale(1.05); }
}
.intro-card {
  position: relative;
  background: var(--white);
  border: 3px solid var(--bubblegum);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 56px rgba(242,95,155,0.30), inset 0 0 0 1px rgba(255,255,255,0.9);
  padding: 46px 36px 40px;
  text-align: center;
  max-width: 340px;
  width: 100%;
  animation: popIn 0.55s ease 0.05s backwards;
}
/* washi-tape strips crossing the top corners, matching the hub title card */
.intro-card::before,
.intro-card::after {
  content: "";
  position: absolute;
  top: -12px;
  width: 60px;
  height: 24px;
  background: repeating-linear-gradient(
    45deg, rgba(255,160,200,0.85) 0 7px, rgba(255,200,224,0.85) 7px 14px);
  box-shadow: 0 2px 4px rgba(180,90,130,0.18);
  border-radius: 2px;
}
.intro-card::before { left: 18px;  transform: rotate(-20deg); }
.intro-card::after  { right: 18px; transform: rotate(20deg); }

.intro-heart {
  width: 86px;
  height: 80px;
  color: var(--rose);
  margin: 0 auto 20px;
  animation: heartPulse 2.2s ease-in-out infinite;
  filter: drop-shadow(0 6px 14px rgba(242,95,155,0.40));
}
.intro-heart svg { width: 100%; height: 100%; display: block; }
.intro-title {
  font-family: var(--font-display);
  font-size: 2.9rem;
  color: var(--deep-rose);
  margin: 0 0 16px;
  font-weight: 400;
  line-height: 1;
}
.intro-msg {
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.75;
  margin: 0 0 30px;
  font-weight: 500;
}
.intro-btn {
  font-size: 1.1rem;
  padding: 0.75em 2.2em;
  letter-spacing: 0.2px;
}

/* ---- shared button ---- */
.btn {
  font-family: var(--font);
  font-weight: 600;
  font-size: 1rem;
  color: var(--white);
  background: linear-gradient(180deg, var(--rose), var(--deep-rose));
  border: none;
  border-radius: var(--radius-lg);
  padding: 0.7em 1.4em;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
}
.btn:hover  { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn.ghost {
  background: var(--white);
  color: var(--deep-rose);
  border: 2px solid var(--bubblegum);
}
