/* ---------------------------------------------------------------
   Ishika's birthday: theme tokens
   --------------------------------------------------------------- */
:root {
  --night: #14062a;
  --plum: #2b0f4d;
  --rose: #ff5fa2;
  --gold: #ffd166;
  --aqua: #5ee7df;
  --lilac: #b38cff;
  --ink: #fff7fb;
  --muted: #d9c9f0;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.16);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

/* ---------------------------------------------------------------
   Base
   --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1200px 700px at 50% -10%, #4b1a7a 0%, transparent 60%),
    radial-gradient(900px 600px at 100% 100%, #0f4a55 0%, transparent 55%),
    var(--night);
  background-attachment: fixed;
}

h1, h2, h3, p { margin: 0; }

/* ---------------------------------------------------------------
   Floating light orbs in the background
   --------------------------------------------------------------- */
.bokeh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.bokeh span {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.35;
  animation: drift 18s ease-in-out infinite alternate;
}
.bokeh span:nth-child(1) { width: 320px; height: 320px; background: var(--rose);   top: -80px;  left: -60px; }
.bokeh span:nth-child(2) { width: 260px; height: 260px; background: var(--gold);   top: 30%;   right: -80px; animation-delay: -4s; }
.bokeh span:nth-child(3) { width: 300px; height: 300px; background: var(--aqua);   bottom: -100px; left: 20%; animation-delay: -8s; }
.bokeh span:nth-child(4) { width: 200px; height: 200px; background: var(--lilac);  top: 60%;   left: -60px; animation-delay: -12s; }
.bokeh span:nth-child(5) { width: 180px; height: 180px; background: var(--rose);   top: 10%;   right: 20%; animation-delay: -6s; }

@keyframes drift {
  to { transform: translate(40px, -30px) scale(1.15); }
}

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 72px 16px 96px;
}

.balloons {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
}
.balloon {
  position: relative;
  width: 46px;
  height: 56px;
  border-radius: 50% 50% 46% 46%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.75), transparent 22%),
    var(--c);
  box-shadow: inset -6px -8px 14px rgba(0, 0, 0, 0.18), 0 10px 24px rgba(0, 0, 0, 0.3);
  animation: float 5s ease-in-out infinite;
}
.balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -20px;
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.5);
}
.balloon:nth-child(2) { width: 52px; height: 62px; animation-delay: -1.5s; }
.balloon:nth-child(3) { animation-delay: -3s; }
.balloon:nth-child(4) { width: 52px; height: 62px; animation-delay: -4.2s; }

@keyframes float {
  50% { transform: translateY(-14px) rotate(3deg); }
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--aqua);
}

.name {
  margin: 8px 0 0;
  font-family: "Great Vibes", "Brush Script MT", cursive;
  font-weight: 400;
  font-size: clamp(5rem, 22vw, 11rem);
  line-height: 1;
  background: linear-gradient(90deg, var(--gold), var(--rose), var(--lilac), var(--gold));
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 30px rgba(255, 95, 162, 0.35));
  animation: shimmer 7s linear infinite;
}
@keyframes shimmer {
  to { background-position: 300% center; }
}

.subtitle {
  margin-top: 8px;
  font-size: clamp(1.05rem, 3vw, 1.4rem);
  color: var(--muted);
}
.subtitle strong { color: var(--gold); font-weight: 800; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-block;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  color: var(--plum);
  background: linear-gradient(90deg, var(--gold), var(--rose));
  padding: 14px 28px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(255, 95, 162, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover,
.btn:focus-visible {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 16px 40px rgba(255, 95, 162, 0.55);
  outline: none;
}
.btn-ghost {
  color: var(--ink);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: none;
  backdrop-filter: blur(8px);
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  box-shadow: 0 10px 30px rgba(179, 140, 255, 0.35);
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--gold);
  text-decoration: none;
  font-size: 1.3rem;
  border: 1px solid var(--glass-border);
  animation: bounce 2.4s ease-in-out infinite;
}
@keyframes bounce {
  50% { transform: translate(-50%, 8px); }
}

/* Intro animation for hero items. Staggered via the --d inline variable. */
.fade-up {
  animation: rise 1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: var(--d, 0s);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* ---------------------------------------------------------------
   Sections and glass cards
   --------------------------------------------------------------- */
main {
  position: relative;
  z-index: 1;
}

.section {
  max-width: 1040px;
  margin: 0 auto;
  padding: 56px 16px;
  text-align: center;
}

.section-title {
  font-family: "Great Vibes", "Brush Script MT", cursive;
  font-weight: 400;
  font-size: clamp(2.8rem, 9vw, 4.2rem);
  line-height: 1.1;
  color: var(--gold);
  margin-bottom: 28px;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 28px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.grid-3 {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.info {
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.info:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 209, 102, 0.5);
}
.info-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--rose));
  box-shadow: 0 8px 24px rgba(255, 95, 162, 0.35);
}
.info h3 {
  margin: 16px 0 6px;
  font-size: 1.15rem;
  font-weight: 600;
}
.info p {
  color: var(--muted);
  font-size: 0.97rem;
}

/* ---------------------------------------------------------------
   Countdown
   --------------------------------------------------------------- */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 16px;
}
.unit {
  padding: 14px 6px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
}
.unit b {
  display: block;
  font-size: clamp(2rem, 7vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.unit small {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------------------------------------------------------------
   Quote
   --------------------------------------------------------------- */
.quote {
  max-width: 820px;
  margin: 0 auto;
  font-family: "Great Vibes", "Brush Script MT", cursive;
  font-size: clamp(1.9rem, 5.5vw, 2.8rem);
  line-height: 1.35;
  color: var(--ink);
  text-shadow: 0 4px 24px rgba(255, 95, 162, 0.35);
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 48px 16px 64px;
  color: var(--muted);
}
.footer-name {
  font-family: "Great Vibes", "Brush Script MT", cursive;
  font-size: 2.6rem;
  color: var(--gold);
  margin-bottom: 8px;
}

/* ---------------------------------------------------------------
   Scroll reveal. Only hidden when JS is running (html.js),
   so the page still shows everything if scripts are blocked.
   --------------------------------------------------------------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.9s ease var(--delay, 0s),
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) var(--delay, 0s);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
/* Keep the hover lift working on cards after they reveal. */
.js .info[data-reveal].is-visible:hover {
  transform: translateY(-6px);
}

/* ---------------------------------------------------------------
   Phones: slightly tighter spacing, no horizontal scroll.
   --------------------------------------------------------------- */
@media (max-width: 480px) {
  .hero { padding-top: 56px; padding-bottom: 110px; }
  .section { padding: 44px 16px; }
  .glass { padding: 24px 18px; }
  .countdown { gap: 8px; padding: 22px 12px; }
  .unit { padding: 12px 4px; border-radius: 16px; }
  .btn { padding: 13px 24px; }
}

/* ---------------------------------------------------------------
   Respect users who ask for less motion.
   --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ===================================================================
   THEME: 3D realistic (body.theme-3d-realistic)
   Real WebGL balloons behind the hero (assets/js/scene.js), plus
   layered shadows, bevels and tilt on cards so everything has depth.
   =================================================================== */
body.theme-3d-realistic {
  background:
    radial-gradient(ellipse 60% 40% at 50% 18%, rgba(255, 209, 102, 0.18), transparent 70%),
    radial-gradient(1000px 700px at 50% -10%, #5a2190 0%, transparent 60%),
    radial-gradient(900px 600px at 100% 100%, #0c4a57 0%, transparent 55%),
    linear-gradient(180deg, #1c0a3a 0%, #14062a 60%, #0b0320 100%);
  background-attachment: fixed;
}
body.theme-3d-realistic .bokeh span { opacity: 0.22; }

/* 3D balloon canvas fills the hero, sitting behind the text. */
.scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.scene canvas { display: block; }
/* Once WebGL is running, hide the flat CSS balloons. */
.scene.is-live ~ .balloons { display: none; }

/* Soft fade at the bottom of the hero into the page. */
.theme-3d-realistic .hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 160px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(transparent, var(--night));
}

.theme-3d-realistic .name {
  filter:
    drop-shadow(0 4px 0 rgba(60, 10, 80, 0.6))
    drop-shadow(0 20px 40px rgba(255, 95, 162, 0.45));
}

.theme-3d-realistic .section-title {
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), 0 0 40px rgba(255, 209, 102, 0.3);
}

/* Glass cards: lit top edge, shaded bottom edge, deep drop shadow. */
.theme-3d-realistic .glass {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04) 45%, rgba(255, 255, 255, 0.08));
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 0 rgba(0, 0, 0, 0.22),
    0 2px 0 rgba(0, 0, 0, 0.2),
    0 40px 70px -24px rgba(0, 0, 0, 0.75);
}

/* Cards tilt in 3D on hover (only after they have revealed). */
.theme-3d-realistic.js .info[data-reveal].is-visible {
  transition:
    opacity 0.9s ease var(--delay, 0s),
    transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.5s ease,
    border-color 0.3s ease;
}
.theme-3d-realistic.js .info[data-reveal].is-visible:hover {
  transform: perspective(900px) rotateX(7deg) rotateY(-7deg) translateY(-10px);
  border-color: rgba(255, 209, 102, 0.6);
}
.theme-3d-realistic .info-icon {
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset 0 -3px 0 rgba(0, 0, 0, 0.2),
    0 10px 0 -2px rgba(0, 0, 0, 0.25),
    0 18px 30px rgba(255, 95, 162, 0.4);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.theme-3d-realistic.js .info[data-reveal].is-visible:hover .info-icon {
  transform: translateY(-6px) scale(1.08) rotate(-6deg);
}

/* Countdown tiles look like raised, glossy keys. */
.theme-3d-realistic .unit {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.03));
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -3px 0 rgba(0, 0, 0, 0.25),
    0 8px 0 rgba(0, 0, 0, 0.3),
    0 20px 30px -10px rgba(0, 0, 0, 0.6);
}
.theme-3d-realistic .unit b {
  text-shadow: 0 3px 0 #b5762a, 0 12px 28px rgba(255, 209, 102, 0.45);
}

/* Buttons get a physical press: a solid lower edge that squashes on click. */
.theme-3d-realistic .btn {
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    0 6px 0 #b8336f,
    0 18px 30px rgba(255, 95, 162, 0.45);
}
.theme-3d-realistic .btn:hover,
.theme-3d-realistic .btn:focus-visible {
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    0 8px 0 #b8336f,
    0 24px 40px rgba(255, 95, 162, 0.55);
}
.theme-3d-realistic .btn:active {
  transform: translateY(4px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    0 2px 0 #b8336f,
    0 8px 16px rgba(255, 95, 162, 0.3);
}
.theme-3d-realistic .btn-ghost {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 6px 0 rgba(0, 0, 0, 0.35);
}

/* Reduced motion: the 3D scene renders once, and the card tilt stops. */
@media (prefers-reduced-motion: reduce) {
  .theme-3d-realistic.js .info[data-reveal].is-visible:hover {
    transform: none;
  }
}
