/* =============================================
   BIG BASTIAN BIRTHDAY PAGE — PREMIUM CSS
   ============================================= */

/* ── Google Fonts & Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:        #FFD700;
  --gold-light:  #FFE55C;
  --gold-dim:    #B8860B;
  --purple:      #6C2EB9;
  --purple-dark: #1A0833;
  --purple-mid:  #2D1060;
  --navy:        #0D0B2B;
  --text-light:  #F0E6FF;
  --text-dim:    #B89CC8;
  --radius:      18px;
  --shadow:      0 8px 40px rgba(108,46,185,.45);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--navy);
  color: var(--text-light);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── Confetti Canvas ── */
#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: url('hero-bg.png') center/cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(13,11,43,.85) 0%,
    rgba(26,8,51,.75) 50%,
    rgba(13,11,43,.92) 100%
  );
}

/* Floating Balloons */
.floating-balloons { position: absolute; inset: 0; pointer-events: none; }
.balloon {
  position: absolute;
  font-size: 2.5rem;
  animation: floatUp 8s ease-in-out infinite;
  opacity: .8;
}
.b1 { left:  8%; animation-delay: 0s;   animation-duration: 7s; }
.b2 { left: 20%; animation-delay: 1.2s; animation-duration: 9s; }
.b3 { left: 38%; animation-delay: 0.6s; animation-duration: 8s; font-size: 2rem; }
.b4 { left: 62%; animation-delay: 2s;   animation-duration: 7.5s; }
.b5 { left: 78%; animation-delay: 0.3s; animation-duration: 10s; font-size: 2rem; }
.b6 { left: 90%; animation-delay: 1.7s; animation-duration: 8.5s; }

@keyframes floatUp {
  0%   { transform: translateY(110vh)  rotate(-5deg); opacity: 0; }
  10%  { opacity: .85; }
  90%  { opacity: .85; }
  100% { transform: translateY(-12vh) rotate(5deg);  opacity: 0; }
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem 1.5rem;
  max-width: 820px;
  width: 100%;
}

.pre-title {
  font-size: 1.1rem;
  letter-spacing: .15em;
  color: var(--gold-light);
  margin-bottom: 1rem;
  animation: fadeDown .8s ease both;
}

.main-title {
  display: flex;
  flex-direction: column;
  gap: .15em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.main-title .happy {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 700;
  color: var(--text-light);
  animation: fadeDown .9s .1s ease both;
}
.main-title .cumple {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(3rem, 9vw, 6.5rem);
  color: var(--gold);
  text-shadow: 0 0 30px rgba(255,215,0,.6), 0 0 60px rgba(255,215,0,.3);
  animation: glow 2.5s ease-in-out infinite alternate, fadeDown .9s .2s ease both;
}
.main-title .name {
  font-size: clamp(2.8rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: .03em;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 40%, #FF8C00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  animation: fadeDown .9s .3s ease both;
}

@keyframes glow {
  from { text-shadow: 0 0 20px rgba(255,215,0,.5); }
  to   { text-shadow: 0 0 55px rgba(255,215,0,.9), 0 0 90px rgba(255,140,0,.5); }
}

/* Cake */
.cake-wrapper {
  margin: 1rem auto;
  width: 200px;
  animation: bounceIn .8s .4s cubic-bezier(.34,1.56,.64,1) both;
}
.cake-img {
  width: 100%;
  filter: drop-shadow(0 0 30px rgba(255,215,0,.7));
  animation: cakePulse 3s ease-in-out infinite;
}
@keyframes cakePulse {
  0%,100% { transform: scale(1)   rotate(-2deg); }
  50%      { transform: scale(1.06) rotate(2deg); }
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-dim);
  line-height: 1.7;
  margin: 1.2rem 0 2rem;
  animation: fadeDown .9s .5s ease both;
}

/* CTA Button */
.cta-btn {
  display: inline-block;
  padding: .9rem 2.6rem;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--gold) 0%, #FF8C00 100%);
  color: var(--navy);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  box-shadow: 0 6px 30px rgba(255,215,0,.4);
  transition: transform .25s, box-shadow .25s;
  animation: fadeDown .9s .6s ease both;
}
.cta-btn:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 12px 40px rgba(255,215,0,.6);
}
.cta-btn:active { transform: scale(.97); }

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-indicator span {
  display: block;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255,215,0,.5);
  border-radius: 13px;
  position: relative;
}
.scroll-indicator span::after {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  background: var(--gold);
  border-radius: 50%;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollBounce 1.4s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%,100% { top: 6px; opacity: 1; }
  70%      { top: 20px; opacity: .3; }
}

/* ============================================================
   FADE ANIMATIONS
   ============================================================ */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounceIn {
  from { opacity: 0; transform: scale(.3); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SHARED CONTAINER
   ============================================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================================
   MESSAGE SECTION
   ============================================================ */
.message-section {
  padding: 6rem 1.5rem;
  background: linear-gradient(180deg, var(--navy) 0%, var(--purple-dark) 100%);
}

.message-card {
  background: linear-gradient(135deg, rgba(108,46,185,.2) 0%, rgba(45,16,96,.35) 100%);
  border: 1px solid rgba(255,215,0,.15);
  border-radius: var(--radius);
  padding: 3rem 3.5rem;
  text-align: center;
  position: relative;
  max-width: 750px;
  margin: 0 auto;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .7s ease, transform .7s ease;
}
.message-card.visible { opacity: 1; transform: translateY(0); }

.quote-icon {
  font-family: 'Dancing Script', cursive;
  font-size: 7rem;
  color: var(--gold);
  line-height: .5;
  opacity: .35;
  position: absolute;
  top: 1rem;
  left: 2rem;
}

.message-text {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.9;
  color: var(--text-light);
  position: relative;
  z-index: 1;
}
.message-text strong { color: var(--gold); }
.message-text em { color: var(--gold-light); font-style: italic; }

.message-author {
  margin-top: 1.8rem;
  font-family: 'Dancing Script', cursive;
  font-size: 1.5rem;
  color: var(--gold);
}

/* ============================================================
   GALLERY SECTION
   ============================================================ */
.gallery-section {
  padding: 5rem 1.5rem 7rem;
  background: var(--purple-dark);
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--text-light);
  margin-bottom: .5rem;
}
.section-title .highlight {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-subtitle {
  color: var(--text-dim);
  font-size: 1.1rem;
}

/* Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 1.25rem;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(255,215,0,.1);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .35s;
  opacity: 0;
  transform: scale(.92) translateY(20px);
}
.gallery-item.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.gallery-item:hover {
  transform: scale(1.04) translateY(-4px);
  box-shadow: 0 16px 50px rgba(255,215,0,.25), 0 0 0 2px rgba(255,215,0,.4);
  z-index: 2;
}

/* Featured item spans 2 cols */
.gallery-item.featured { grid-column: span 2; }

/* Placeholder */
.photo-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, rgba(108,46,185,.3) 0%, rgba(26,8,51,.6) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-item.featured .photo-placeholder { aspect-ratio: 16/9; }

.placeholder-inner {
  text-align: center;
  color: rgba(255,215,0,.5);
  padding: 1rem;
}
.placeholder-icon { font-size: 3rem; display: block; margin-bottom: .5rem; }
.placeholder-inner p { font-size: 1rem; font-weight: 600; margin-bottom: .25rem; }
.placeholder-inner small { font-size: .75rem; color: rgba(255,230,150,.4); }

/* When real photos are added */
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Photo label */
.photo-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: .7rem 1rem;
  background: linear-gradient(0deg, rgba(13,11,43,.95) 0%, transparent 100%);
  font-size: .85rem;
  font-weight: 600;
  color: var(--gold-light);
  transform: translateY(100%);
  transition: transform .3s ease;
}
.gallery-item:hover .photo-label { transform: translateY(0); }

/* Instructions box */
.photo-instructions {
  margin-top: 2.5rem;
  background: rgba(108,46,185,.15);
  border: 1px dashed rgba(255,215,0,.3);
  border-radius: var(--radius);
  padding: 1.25rem 1.75rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  color: var(--text-dim);
  font-size: .9rem;
  line-height: 1.7;
}
.instr-icon { font-size: 1.6rem; flex-shrink: 0; }
.photo-instructions code {
  background: rgba(255,215,0,.12);
  color: var(--gold-light);
  padding: .1em .4em;
  border-radius: 5px;
  font-size: .85em;
}
.photo-instructions strong { color: var(--text-light); }

/* ============================================================
   WISHES SECTION
   ============================================================ */
.wishes-section {
  padding: 5rem 1.5rem 7rem;
  background: linear-gradient(180deg, var(--purple-dark) 0%, var(--navy) 100%);
}

.wishes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 950px;
  margin: 0 auto;
}

.wish-card {
  background: linear-gradient(135deg, rgba(108,46,185,.18) 0%, rgba(26,8,51,.4) 100%);
  border: 1px solid rgba(255,215,0,.12);
  border-radius: var(--radius);
  padding: 2.2rem 1.5rem;
  text-align: center;
  transition: transform .3s, box-shadow .3s, border-color .3s;
  opacity: 0;
  transform: translateY(30px);
}
.wish-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.wish-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(108,46,185,.4);
  border-color: rgba(255,215,0,.3);
}

.wish-emoji { font-size: 2.8rem; margin-bottom: .8rem; }
.wish-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: .6rem;
}
.wish-card p {
  font-size: .92rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--navy);
  border-top: 1px solid rgba(255,215,0,.1);
}
.footer-stars { font-size: 1.5rem; margin-bottom: .8rem; }
.footer-text {
  color: var(--text-dim);
  font-size: 1rem;
  margin-bottom: .4rem;
}
.footer-text strong { color: var(--gold); }
.footer-year {
  font-size: 1.4rem;
  font-family: 'Dancing Script', cursive;
  color: var(--gold);
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.lightbox.open { display: flex; animation: fadeIn .25s ease; }
.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: var(--radius);
  box-shadow: 0 0 60px rgba(255,215,0,.3);
  object-fit: contain;
}
.lightbox-close {
  position: fixed;
  top: 1.2rem;
  right: 1.5rem;
  background: rgba(255,215,0,.15);
  border: 1px solid rgba(255,215,0,.3);
  color: var(--gold);
  font-size: 1.5rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.lightbox-close:hover { background: rgba(255,215,0,.3); }
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
  .gallery-item.featured { grid-column: 1 / -1; }
  .message-card { padding: 2rem 1.75rem; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item.featured { grid-column: 1; }
  .main-title .cumple { font-size: clamp(2.4rem, 13vw, 4rem); }
  .main-title .name   { font-size: clamp(2rem, 11vw, 3.5rem); }
}
