/* ============================================================
   Birthday 1-pager — Fun & playful theme
   🎨 To recolor the whole site, edit the variables below.
   ============================================================ */
:root {
  /* 🌈 full pride rainbow spectrum */
  --c1: #e63946;   /* red    */
  --c2: #ff9f43;   /* orange */
  --c3: #feca57;   /* yellow */
  --c4: #2ecc71;   /* green  */
  --c5: #54a0ff;   /* blue   */
  --c6: #a55eea;   /* violet */
  /* 🧡🤍🩷 lesbian-flag accent (sunset palette) */
  --les1: #d52d00; --les2: #ff9a56; --les3: #ffffff; --les4: #d362a4; --les5: #a30262;
  --ink: #2d1b3d;  /* dark text */
  --paper: #fff;
  --radius: 22px;
  --shadow: 0 18px 50px rgba(45, 27, 61, 0.18);
  --font-display: "Fredoka", system-ui, sans-serif;
  --font-body: "Poppins", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(-45deg, var(--c1), var(--c2), var(--c3), var(--c4), var(--c5), var(--c6));
  background-size: 400% 400%;
  animation: gradientShift 22s ease infinite;
  overflow-x: hidden;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---------- floating emoji decorations ---------- */
.floaties { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.floaties span {
  position: absolute;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  opacity: 0.85;
  animation: float 14s ease-in-out infinite;
}
.floaties span:nth-child(1) { left: 6%;  top: 12%; animation-delay: 0s; }
.floaties span:nth-child(2) { left: 84%; top: 18%; animation-delay: 2s; }
.floaties span:nth-child(3) { left: 14%; top: 70%; animation-delay: 4s; }
.floaties span:nth-child(4) { left: 78%; top: 64%; animation-delay: 1s; }
.floaties span:nth-child(5) { left: 46%; top: 8%;  animation-delay: 3s; }
.floaties span:nth-child(6) { left: 90%; top: 44%; animation-delay: 5s; }
.floaties span:nth-child(7) { left: 4%;  top: 40%; animation-delay: 2.5s; }
.floaties span:nth-child(8) { left: 60%; top: 84%; animation-delay: 1.5s; }
.floaties span:nth-child(9)  { left: 28%; top: 28%; animation-delay: 3.5s; }
.floaties span:nth-child(10) { left: 70%; top: 32%; animation-delay: 0.5s; }
.floaties span:nth-child(11) { left: 38%; top: 56%; animation-delay: 4.5s; }
.floaties span:nth-child(12) { left: 22%; top: 88%; animation-delay: 2.2s; }
.floaties span:nth-child(13) { left: 92%; top: 76%; animation-delay: 3.2s; }
.floaties span:nth-child(14) { left: 52%; top: 38%; animation-delay: 1.2s; }
.floaties span:nth-child(15) { left: 12%; top: 56%; animation-delay: 5.5s; }
.floaties span:nth-child(16) { left: 84%; top: 6%;  animation-delay: 4.2s; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-28px) rotate(6deg); }
}

/* ---------- shared layout ---------- */
section { position: relative; z-index: 1; padding: 7rem 1.5rem; }
.section-title, .finale-title {
  font-family: var(--font-display);
  text-align: center;
  font-size: clamp(2.2rem, 7vw, 4rem);
  color: var(--paper);
  text-shadow: 0 6px 22px rgba(0,0,0,0.18);
}
.section-sub { text-align: center; color: rgba(255,255,255,0.92); margin-top: .6rem; font-size: 1.05rem; }

/* ---------- HERO ---------- */
.hero {
  position: relative; z-index: 1;
  min-height: 100svh;
  display: grid; place-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
}
.hero-inner { max-width: 820px; }
.hero-eyebrow {
  font-family: var(--font-display);
  color: var(--paper);
  font-size: clamp(1rem, 3vw, 1.4rem);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  font-size: clamp(2.8rem, 12vw, 7rem);
  color: var(--paper);
  text-shadow: 0 10px 30px rgba(0,0,0,0.22);
}
.hero-title .name {
  display: inline-block;
  /* lesbian-flag gradient on the name */
  background: linear-gradient(180deg, var(--les2), var(--les3) 45%, var(--les4) 70%, var(--les5));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.3));
}

/* ---------- rainbow outline on the title ---------- */
/* animatable hue offset so the spectrum slowly flows */
@property --rb {
  syntax: "<number>";
  initial-value: 0;
  inherits: true;
}
.hero-title { --rb: 0; animation: rbShift 9s linear infinite; }
@keyframes rbShift { to { --rb: 360; } }

.hero-title .char {
  /* each letter gets its own hue (Splitting.js sets --char-index) */
  -webkit-text-stroke: 2px hsl(calc(var(--char-index) * 20 + var(--rb)) 95% 60%);
  text-stroke: 2px hsl(calc(var(--char-index) * 20 + var(--rb)) 95% 60%);
  paint-order: stroke fill; /* keep the fill crisp on top of the outline */
}
@media (prefers-reduced-motion: reduce) {
  .hero-title { animation: none; }
}

/* classy lesbian-flag accent stripe under the name */
.pride-stripe {
  width: min(280px, 60%);
  height: 7px;
  margin: 1.2rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg,
    var(--les1), var(--les2), var(--les3), var(--les4), var(--les5));
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.hero-sub {
  margin: 1.4rem auto 2rem;
  max-width: 620px;
  color: rgba(255,255,255,0.95);
  font-size: clamp(1.2rem, 4.5vw, 1.7rem);
  font-weight: 500;
}

/* ---------- ripple / wave text ---------- */
.ripple-text .char {
  display: inline-block;
  animation: ripple 2.2s ease-in-out infinite;
  /* Splitting.js sets --char-index on each letter for the staggered wave */
  animation-delay: calc(var(--char-index) * 0.06s);
}
@keyframes ripple {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}
@media (prefers-reduced-motion: reduce) {
  .ripple-text .char { animation: none; }
}

/* ---------- buttons ---------- */
.celebrate-btn {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--c1);
  background: var(--paper);
  border: none;
  padding: 0.95rem 2.2rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.celebrate-btn:hover { transform: translateY(-4px) scale(1.04); box-shadow: 0 24px 60px rgba(45,27,61,.28); }
.celebrate-btn:active { transform: translateY(0) scale(.98); }
.celebrate-btn.big { font-size: 1.35rem; padding: 1.1rem 2.6rem; margin-top: 2rem; }

.scroll-hint {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.9); font-size: .95rem; letter-spacing: .12em;
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 0%,100%{ transform: translateX(-50%) translateY(0);} 50%{ transform: translateX(-50%) translateY(8px);} }

/* ---------- MESSAGE card ---------- */
.message { display: grid; place-items: center; }
/* poem stays hidden until the quiz is aced */
.message.locked { display: none; }
.card {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 3rem 2.2rem;
  max-width: 640px;
  text-align: center;
  box-shadow: var(--shadow);
}
.card h2 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 1rem; color: var(--c4); }
.card p { font-size: 1.15rem; line-height: 1.8; }

/* ---------- POEM ---------- */
.poem-card {
  max-width: 680px;
  background: linear-gradient(135deg,
    #ffd9e3, #ffe8c9, #fbfac3, #d4f5d6, #d3ecff, #e6d9ff);
}
.poem p {
  font-size: 1.12rem;
  line-height: 1.7;
  margin-bottom: 1.3rem;
}
.poem p:last-child { margin-bottom: 0; }
.poem-finale {
  display: inline-block;
  margin-top: 0.4rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  background: linear-gradient(90deg, var(--les1), var(--les2), var(--les4), var(--les5));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* full rainbow gradient text (animated) */
.rainbow-text {
  font-weight: 600;
  background: linear-gradient(90deg, #e63946, #ff9f43, #feca57, #2ecc71, #54a0ff, #a55eea, #e63946);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbowSlide 6s linear infinite;
}
@keyframes rainbowSlide { to { background-position: 200% center; } }
@media (prefers-reduced-motion: reduce) { .rainbow-text { animation: none; } }

/* ---------- GALLERY ---------- */
.gallery {
  margin: 2.5rem auto 0;
  max-width: 1000px;
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* fills left-to-right, row by row */
  gap: 1rem;
}
.gallery a {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 1 / 1;            /* uniform square tiles */
  transition: transform .25s ease;
}
.gallery a:hover { transform: scale(1.03) rotate(-1deg); }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- QUIZ ---------- */
.quiz-section { display: block; }
.quiz { max-width: 640px; margin: 2.5rem auto 0; display: grid; gap: 1.4rem; }
.quiz-card {
  background: linear-gradient(135deg,
    #ffd9e3, #ffe8c9, #fbfac3, #d4f5d6, #d3ecff, #e6d9ff);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow);
}
.quiz-q {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--c6);
  margin-bottom: 1.1rem;
}
.quiz-options { display: grid; gap: 0.6rem; }
.quiz-opt {
  font-family: var(--font-body);
  font-size: 1rem;
  text-align: left;
  padding: 0.85rem 1.1rem;
  border: 2px solid rgba(45,27,61,0.12);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: transform .12s ease, border-color .15s ease, background .15s ease;
}
.quiz-opt:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--c4); }
.quiz-opt:disabled { cursor: default; }
.quiz-opt.correct { background: #e7f9ef; border-color: #2ecc71; color: #1e8a4c; font-weight: 600; }
.quiz-opt.wrong   { background: #fdecec; border-color: #e63946; color: #c0392b; }
.quiz-feedback {
  margin-top: 1rem;
  font-size: 1.05rem;
  font-weight: 500;
  min-height: 1.4em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s ease, transform .3s ease;
}
.quiz-feedback.show { opacity: 1; transform: translateY(0); }
.quiz-feedback.good { color: #1e8a4c; }
.quiz-feedback.bad  { color: #c0392b; }
.quiz-score {
  text-align: center;
  margin-top: 2rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--paper);
  text-shadow: 0 4px 16px rgba(0,0,0,.2);
  min-height: 1.4em;
}

/* ---------- FINALE + FOOTER ---------- */
.finale { text-align: center; display: grid; place-items: center; }
.footer {
  position: relative; z-index: 1;
  text-align: center;
  padding: 2.5rem 1rem 3rem;
  color: rgba(255,255,255,0.95);
  font-size: 1.05rem;
}

/* ---------- scroll-reveal initial state (GSAP animates these in) ---------- */
[data-reveal] { opacity: 0; }

/* ---------- accessibility: respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
  .floaties span, .scroll-hint { animation: none; }
  [data-reveal] { opacity: 1 !important; }
  html { scroll-behavior: auto; }
}

/* ---------- mobile tweaks ---------- */
@media (max-width: 600px) {
  section { padding: 4.5rem 1.2rem; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 2.2rem 1.4rem; }
}
