/* ==========================================================================
   tweetyy-bday — dreamy romantic dark theme
   ========================================================================== */

:root {
  --bg-void: #0b0714;
  --bg-deep: #150c28;
  --bg-plum: #23133f;
  --plum-soft: #2f1b52;
  --pink: #ff9fce;
  --pink-soft: #ffc3e0;
  --pink-hot: #ff5fa2;
  --gold: #f4c95d;
  --gold-soft: #ffe4a3;
  --lilac: #c8a6ff;
  --ink: #f6ecff;
  --ink-dim: #cbb9e8;
  --ink-faint: #9d89bd;
  --shadow-glow: 0 0 60px rgba(255, 95, 162, 0.25);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font-display: "Playfair Display", "Georgia", serif;
  --font-script: "Dancing Script", cursive;
  --font-body: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse 120% 80% at 50% -10%, var(--bg-plum) 0%, var(--bg-deep) 45%, var(--bg-void) 100%);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
  position: relative;
}

::selection {
  background: var(--pink-hot);
  color: var(--bg-void);
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-void);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--pink), var(--lilac));
  border-radius: 10px;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.section {
  position: relative;
  z-index: 1;
  padding: 8rem 6vw 7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (max-width: 640px) {
  .section {
    padding: 6rem 6vw 5rem;
  }
}

/* ---------- reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- section headers ---------- */
.section-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 0.9rem;
  font-weight: 500;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  margin: 0 0 0.6rem;
  background: linear-gradient(120deg, var(--ink) 20%, var(--pink-soft) 55%, var(--lilac) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-sub {
  color: var(--ink-dim);
  font-size: 1rem;
  max-width: 540px;
  margin: 0 auto 1rem;
  line-height: 1.6;
}

/* ---------- dot nav ---------- */
.dot-nav {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.dot-nav .dot {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(246, 236, 255, 0.25);
  transition: all 0.35s var(--ease-out);
  display: block;
}

.dot-nav .dot::after {
  content: attr(data-label);
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.dot-nav .dot:hover::after {
  opacity: 1;
}

.dot-nav .dot.active {
  background: var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 159, 206, 0.2), 0 0 14px rgba(255, 95, 162, 0.7);
  transform: scale(1.3);
}

@media (max-width: 780px) {
  .dot-nav {
    display: none;
  }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  min-height: 100vh;
  justify-content: center;
  padding-top: 6rem;
}

.hero-glow {
  position: absolute;
  top: 8%;
  left: 50%;
  translate: -50% 0;
  width: min(900px, 140vw);
  height: 600px;
  background: radial-gradient(closest-side, rgba(255, 95, 162, 0.28), rgba(200, 166, 255, 0.14) 55%, transparent 75%);
  filter: blur(10px);
  z-index: -1;
  animation: glow-breathe 7s ease-in-out infinite;
}

@keyframes glow-breathe {
  0%, 100% { opacity: 0.75; scale: 1; }
  50% { opacity: 1; scale: 1.08; }
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.6rem;
}

.hero-title {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.hero-title .script {
  font-family: var(--font-script);
  font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 4.6rem);
  color: var(--pink-soft);
  text-shadow: 0 0 40px rgba(255, 159, 206, 0.5);
}

.hero-title .name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(3.6rem, 14vw, 8.5rem);
  margin-top: 0.1em;
  background: linear-gradient(135deg, var(--gold-soft) 0%, var(--pink) 35%, var(--lilac) 70%, var(--pink-hot) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s ease infinite;
}

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

.hero-nicknames {
  margin-top: 1.6rem;
  color: var(--ink-dim);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.hero-sub {
  margin-top: 0.6rem;
  color: var(--ink-faint);
  font-size: 0.95rem;
  max-width: 460px;
}

.scroll-cue {
  position: absolute;
  bottom: 2.6rem;
  left: 50%;
  translate: -50% 0;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(246, 236, 255, 0.35);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.scroll-cue span {
  width: 4px;
  height: 8px;
  border-radius: 3px;
  background: var(--pink-soft);
  animation: scroll-bounce 1.8s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(16px); }
}

/* ==========================================================================
   TICKER
   ========================================================================== */
.ticker-section {
  padding-left: 0;
  padding-right: 0;
}

.ticker-wrap {
  width: 100%;
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  transform: rotate(-1.4deg);
}

.ticker-row {
  width: 100%;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(255, 95, 162, 0.14), rgba(200, 166, 255, 0.14));
  border-top: 1px solid rgba(255, 195, 224, 0.18);
  border-bottom: 1px solid rgba(255, 195, 224, 0.18);
  padding: 0.9rem 0;
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 2.4rem;
  white-space: nowrap;
  will-change: transform;
}

.ticker-row--right .ticker-track {
  animation: ticker-scroll-right 40s linear infinite;
}
.ticker-row--left .ticker-track {
  animation: ticker-scroll-left 40s linear infinite;
}

.ticker-track .phrase {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 2.4rem;
}

.ticker-track .phrase::after {
  content: "✦";
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.9rem;
  color: var(--gold);
  opacity: 0.7;
}

@keyframes ticker-scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes ticker-scroll-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

/* ==========================================================================
   GALLERY
   ========================================================================== */
.gallery-grid {
  margin-top: 2.5rem;
  width: 100%;
  max-width: 1100px;
  columns: 4 220px;
  column-gap: 1rem;
}

@media (max-width: 700px) {
  .gallery-grid {
    columns: 2 160px;
  }
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
  background: var(--plum-soft);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transform: translateY(0) rotate(0deg);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}

.gallery-item:nth-child(3n+1) { rotate: -1.4deg; }
.gallery-item:nth-child(3n+2) { rotate: 1.1deg; }
.gallery-item:nth-child(3n) { rotate: -0.6deg; }

.gallery-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 45px rgba(255, 95, 162, 0.28);
  z-index: 2;
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.6s var(--ease-out), filter 0.6s ease;
  filter: saturate(0.92) brightness(0.94);
}

.gallery-item:hover img {
  transform: scale(1.06);
  filter: saturate(1.05) brightness(1);
}

.gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(11, 7, 20, 0.75) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.gallery-item:hover::before {
  opacity: 1;
}

.gallery-empty {
  margin-top: 3rem;
  color: var(--ink-faint);
  font-style: italic;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 5, 15, 0.92);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in 0.25s ease;
}
.lightbox[hidden] { display: none; }

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox img {
  max-width: min(90vw, 900px);
  max-height: 85vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--ink);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, transform 0.25s ease;
}
.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 159, 206, 0.25);
  transform: scale(1.08);
}

.lightbox-close {
  top: 1.6rem;
  right: 1.6rem;
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
}

.lightbox-nav {
  top: 50%;
  translate: 0 -50%;
  width: 54px;
  height: 54px;
  font-size: 1.8rem;
}
.lightbox-prev { left: 1.6rem; }
.lightbox-next { right: 1.6rem; }

@media (max-width: 640px) {
  .lightbox-nav { width: 42px; height: 42px; font-size: 1.4rem; }
  .lightbox-prev { left: 0.6rem; }
  .lightbox-next { right: 0.6rem; }
}

/* ==========================================================================
   VIDEOS
   ========================================================================== */
.video-grid {
  margin-top: 2.5rem;
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.4rem;
}

.video-item {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--plum-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.video-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(255, 95, 162, 0.24);
}

.video-item video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

/* ==========================================================================
   WISHLIST
   ========================================================================== */
.wishlist-section {
  max-width: 720px;
  margin: 0 auto;
}

.wishlist-form {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2.2rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 1rem;
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
}

.wishlist-form input {
  flex: 1 1 220px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.wishlist-form input::placeholder {
  color: var(--ink-faint);
}

.wishlist-form input:focus {
  border-color: var(--pink);
  background: rgba(0, 0, 0, 0.32);
}

.btn-primary {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--pink-hot), var(--lilac));
  color: #1a0e2e;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.5rem;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 95, 162, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.wishlist-error {
  color: #ff8fa3;
  font-size: 0.85rem;
  margin-top: 0.8rem;
}

.wishlist-items {
  list-style: none;
  margin: 2.2rem 0 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.wishlist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  text-align: left;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  animation: item-in 0.5s var(--ease-out) both;
}

@keyframes item-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.wishlist-item.is-elephant {
  background: linear-gradient(120deg, rgba(244, 201, 93, 0.14), rgba(255, 95, 162, 0.1));
  border-color: rgba(244, 201, 93, 0.35);
  box-shadow: 0 0 0 1px rgba(244, 201, 93, 0.12) inset;
}

.item-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-top: 0.1rem;
}

.item-body {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
  word-break: break-word;
}

.item-note {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-top: 0.2rem;
  word-break: break-word;
}

.item-badge {
  display: inline-block;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-soft);
  background: rgba(244, 201, 93, 0.15);
  border: 1px solid rgba(244, 201, 93, 0.3);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  margin-top: 0.4rem;
}

.item-remove {
  flex: 0 0 auto;
  background: transparent;
  border: none;
  color: var(--ink-faint);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 50%;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.item-remove:hover {
  color: #ff5f7a;
  background: rgba(255, 95, 122, 0.12);
  transform: scale(1.1) rotate(90deg);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 4rem 6vw 5rem;
  color: var(--ink-faint);
  font-size: 0.85rem;
  line-height: 1.8;
}

.footer-elephant {
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
  opacity: 0.85;
}

.footer-small {
  font-family: var(--font-script);
  font-size: 1.3rem;
  color: var(--pink-soft);
}

#confetti-canvas-wrap {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 300;
}
