/* =========================================================
   Hussain ❤ — Birthday Surprise Site
   Palette: Midnight Black / Royal Purple / Orchid / Pearl White / Champagne Gold
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;1,600&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --ink: #0a0612;
  --void: #120a1f;
  --royal: #5b1a8c;
  --royal-2: #7e22ce;
  --orchid: #b968e8;
  --lavender: #e9d5ff;
  --pearl: #fbf9ff;
  --white: #ffffff;
  --gold: #f2c879;
  --gold-soft: #f7dfa8;

  --grad-main: linear-gradient(135deg, var(--ink) 0%, var(--royal) 55%, var(--royal-2) 100%);
  --grad-radial: radial-gradient(circle at 30% 20%, rgba(185, 104, 232, 0.35), transparent 60%);
  --grad-card: linear-gradient(160deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  --grad-gold: linear-gradient(135deg, var(--gold-soft), var(--gold));
  --grad-text: linear-gradient(120deg, var(--pearl), var(--lavender) 45%, var(--gold-soft));

  --shadow-lg: 0 30px 80px rgba(20, 4, 40, 0.55);
  --shadow-glow: 0 0 60px rgba(185, 104, 232, 0.35);

  --font-display: 'Playfair Display', serif;
  --font-body: 'Poppins', sans-serif;

  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--pearl);
  background: var(--ink);
  overflow-x: hidden;
}

/* ---------- Ambient animated background used on gate screens ---------- */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--grad-main);
}
.bg-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-radial);
  animation: drift 14s ease-in-out infinite alternate;
}
.bg-scene::after{
  content:"";
  position:absolute; inset:0;
  background-image: radial-gradient(rgba(255,255,255,0.55) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity:.12;
  animation: sparkle-shift 40s linear infinite;
}
@keyframes drift {
  0%   { transform: translate3d(-3%, -2%, 0) scale(1); }
  100% { transform: translate3d(3%, 3%, 0) scale(1.08); }
}
@keyframes sparkle-shift {
  0% { background-position: 0 0; }
  100% { background-position: 600px 600px; }
}

/* floating soft orbs */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(50px);
  opacity: .55;
  z-index: -1;
  animation: floaty 10s ease-in-out infinite;
}
.orb.o1 { width: 320px; height: 320px; background: var(--orchid); top: -80px; left: -80px; animation-duration: 12s; }
.orb.o2 { width: 260px; height: 260px; background: var(--royal-2); bottom: -60px; right: -60px; animation-duration: 14s; animation-delay: 1s; }
.orb.o3 { width: 180px; height: 180px; background: var(--gold); top: 40%; right: 10%; opacity:.25; animation-duration: 16s; animation-delay: 2s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-25px) translateX(15px); }
}

/* ---------- Screen layout (login / questions / gate / celebration) ---------- */
.screen {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.screen.active {
  display: flex;
  animation: fadeUp .7s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.glass-card {
  width: 100%;
  max-width: 460px;
  background: var(--grad-card);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(18px);
  border-radius: var(--radius);
  padding: 44px 36px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.eyebrow {
  font-family: var(--font-body);
  letter-spacing: .28em;
  text-transform: uppercase;
  font-size: .72rem;
  color: var(--gold-soft);
  margin-bottom: 10px;
  display: inline-block;
}

.heading-serif {
  font-family: var(--font-display);
  font-weight: 700;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 14px;
  line-height: 1.15;
}

.sub-text {
  color: rgba(233, 213, 255, 0.85);
  font-weight: 300;
  margin-bottom: 28px;
  font-size: .98rem;
}

/* ---------- Inputs ---------- */
.love-input {
  width: 100%;
  padding: 14px 18px;
  margin-bottom: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(10, 6, 18, 0.45);
  color: var(--white);
  font-family: var(--font-body);
  font-size: .95rem;
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.love-input::placeholder { color: rgba(233,213,255,0.45); }
.love-input:focus {
  border-color: var(--orchid);
  box-shadow: 0 0 0 4px rgba(185, 104, 232, 0.18);
}

/* ---------- Buttons ---------- */
.btn-love {
  border: none;
  border-radius: 14px;
  padding: 14px 30px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.btn-love:active { transform: scale(.97); }

.btn-primary-love {
  background: linear-gradient(135deg, var(--royal-2), var(--orchid));
  color: var(--white);
  box-shadow: 0 12px 28px rgba(126, 34, 206, 0.45);
  width: 100%;
}
.btn-primary-love:hover { filter: brightness(1.1); box-shadow: 0 16px 34px rgba(126, 34, 206, 0.6); }

.btn-gold {
  background: var(--grad-gold);
  color: #2b1608;
  box-shadow: 0 12px 26px rgba(242, 200, 121, 0.45);
}
.btn-gold:hover { filter: brightness(1.06); }

.btn-row { display: flex; gap: 14px; margin-top: 6px; }
.btn-row .btn-love { flex: 1; }

.btn-outline-love {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--pearl);
}
.btn-outline-love:hover { background: rgba(255,255,255,0.08); border-color: var(--orchid); }

.error-msg {
  color: #ffb4c6;
  font-size: .85rem;
  min-height: 20px;
  margin-top: 10px;
}

/* heart icon pulse used as page signature on gate screens */
.pulse-heart {
  font-size: 2.6rem;
  display: inline-block;
  margin-bottom: 18px;
  animation: heartbeat 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(185,104,232,.7));
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.18); }
  30% { transform: scale(1); }
  45% { transform: scale(1.12); }
  60% { transform: scale(1); }
}

/* ---------- Countdown ---------- */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 30px 0 8px;
}
.time-box {
  background: rgba(10,6,18,0.55);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  padding: 14px 4px;
}
.time-box .num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.time-box .lbl {
  display: block;
  margin-top: 6px;
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(233,213,255,0.6);
}

/* ---------- Locked screen ---------- */
.lock-icon { font-size: 2.6rem; margin-bottom: 16px; opacity:.85; }

/* ---------- Celebration screen ---------- */
.celebration-wrap {
  /*max-width: 760px;*/
  width: 100%;
  text-align: center;
  z-index: 2;
}
.video-frame {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  background: #000;
}
.video-frame video {
  width: 100%;
  max-height: 84vh;
  display: block;
  object-fit: cover;
}
.hbd-overlay-text {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(1.6rem, 5vw, 3rem);
  color: var(--white);
  text-shadow: 0 4px 30px rgba(0,0,0,.65), 0 0 40px rgba(242,200,121,.6);
  letter-spacing: .01em;
  animation: overlayIn 1.4s ease both, glow 2.4s ease-in-out infinite 1.4s;
  padding: 0 14px;
}
@keyframes overlayIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-16px) scale(.94); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes glow {
  0%, 100% { text-shadow: 0 4px 30px rgba(0,0,0,.65), 0 0 30px rgba(242,200,121,.5); }
  50% { text-shadow: 0 4px 30px rgba(0,0,0,.65), 0 0 55px rgba(242,200,121,.9); }
}

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

.next-btn-wrap { margin-top: 30px; }

/* =========================================================
   MAIN ONE-PAGE SITE
   ========================================================= */
#main-site { display: none; }
#main-site.active { display: block; animation: fadeUp .8s ease both; }

.nav-love {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 16px 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10,6,18,0.55);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-love .brand {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--gold-soft);
}
.nav-love a {
  color: var(--pearl);
  text-decoration: none;
  font-size: .85rem;
  margin-left: 22px;
  opacity: .8;
  transition: opacity .2s;
}
.nav-love a:hover { opacity: 1; color: var(--orchid); }

/* HERO */
.hero-full {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
}
.hero-full .hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: heroZoom 16s ease-in-out infinite alternate;
  filter: saturate(1.05) contrast(1.02);
}
@keyframes heroZoom {
  from { transform: scale(1.0); }
  to   { transform: scale(1.1); }
}
.hero-full::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,6,18,0.15) 0%, rgba(10,6,18,0.35) 55%, rgba(10,6,18,0.96) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 6% 80px;
  width: 100%;
}
.hero-content .eyebrow { color: var(--gold-soft); }
.hero-content h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 6px 0 16px;
  line-height: 1.05;
}
.hero-content p.lead-love {
  max-width: 560px;
  color: rgba(233,213,255,0.85);
  font-weight: 300;
  font-size: 1.05rem;
}
.scroll-cue {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--pearl);
  opacity: .7;
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-cue .line { width: 1px; height: 34px; background: linear-gradient(var(--pearl), transparent); animation: scrollLine 1.8s ease-in-out infinite; }
@keyframes scrollLine { 0%{transform:scaleY(0); transform-origin:top;} 50%{transform:scaleY(1); transform-origin:top;} 51%{transform-origin:bottom;} 100%{transform:scaleY(0); transform-origin:bottom;} }

/* generic section */
.section-love { padding: 110px 6%; position: relative; }
.section-love.dark { background: var(--ink); }
.section-love.tinted { background: linear-gradient(180deg, var(--ink), #170b28 50%, var(--ink)); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 60px; }
.section-head .eyebrow { color: var(--gold-soft); }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(2rem, 4vw, 3rem);
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 8px 0 14px;
}
.section-head p { color: rgba(233,213,255,0.75); font-weight: 300; }

/* Letter section */
.letter-card {
  max-width: 760px;
  margin: 0 auto;
  background: var(--grad-card);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 28px;
  padding: 54px 46px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.letter-card::before {
  content: "❝";
  position: absolute;
  top: 18px; left: 28px;
  font-family: var(--font-display);
  font-size: 4rem;
  color: rgba(242,200,121,0.35);
  line-height: 1;
}
.letter-card p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--lavender);
  margin-bottom: 18px;
}
.letter-signoff {
  text-align: right;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold-soft);
  font-size: 1.2rem;
}

/* Gallery grid — mosaic */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 130px;
  gap: 14px;
}
.gallery-grid .g-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.08);
}
.gallery-grid .g-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .55s ease, filter .4s ease;
}
.gallery-grid .g-item:hover img { transform: scale(1.09); filter: brightness(1.05); }
.gallery-grid .g-item::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(10,6,18,0.75));
  opacity: 0;
  transition: opacity .35s ease;
}
.gallery-grid .g-item:hover::after { opacity: 1; }
.gallery-grid .g-item .g-num {
  position: absolute; bottom: 10px; left: 12px;
  color: var(--pearl); font-size: .78rem; letter-spacing: .1em;
  opacity: 0; transform: translateY(6px);
  transition: all .35s ease;
}
.gallery-grid .g-item:hover .g-num { opacity: 1; transform: translateY(0); }

/* mosaic sizing pattern */
.gallery-grid .g-item.full { grid-column: span 4; grid-row: span 6; }
.gallery-grid .g-item.large { grid-column: span 6; grid-row: span 6; }
.gallery-grid .g-item.big { grid-column: span 3; grid-row: span 2; }
.gallery-grid .g-item.med { grid-column: span 2; grid-row: span 3; }
.gallery-grid .g-item.tall { grid-column: span 2; grid-row: span 2; }
.gallery-grid .g-item.wide { grid-column: span 3; grid-row: span 1; }
.gallery-grid .g-item.sq { grid-column: span 2; grid-row: span 1; }

/* reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* Video moments */
.video-love-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.video-love-card {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  background: #000;
  box-shadow: var(--shadow-lg);
}
.video-love-card video { width: 100%; display: block; max-height: 320px; object-fit: cover; }
.video-love-card .cap {
  padding: 14px 16px;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--lavender);
  font-size: .95rem;
  background: rgba(255,255,255,0.03);
}

/* Timeline of memories */
.timeline-love {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  padding-left: 34px;
}
.timeline-love::before {
  content: "";
  position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--orchid), var(--gold));
  opacity: .5;
}
.tl-item { position: relative; margin-bottom: 42px; }
.tl-item::before {
  content: "";
  position: absolute; left: -34px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--grad-gold);
  box-shadow: 0 0 0 5px rgba(242,200,121,0.18);
}
.tl-item .tl-date { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft); }
.tl-item h4 { font-family: var(--font-display); font-style: italic; margin: 6px 0 6px; color: var(--pearl); }
.tl-item p { color: rgba(233,213,255,0.75); font-weight: 300; margin: 0; font-size: .95rem; }

/* Reasons chips / love notes */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.note-card {
  background: var(--grad-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 26px 22px;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.note-card:hover {
  transform: translateY(-6px);
  border-color: rgba(185,104,232,0.5);
  box-shadow: var(--shadow-glow);
}
.note-card .n-icon { font-size: 1.4rem; margin-bottom: 10px; }
.note-card p { color: rgba(233,213,255,0.85); font-size: .92rem; margin: 0; font-weight: 300; line-height: 1.6; }

/* Floating hearts ambient (main site) */
.floating-hearts { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.floating-hearts span {
  position: absolute;
  bottom: -40px;
  font-size: 1.1rem;
  opacity: .35;
  animation: floatUp linear infinite;
  color: var(--orchid);
}
@keyframes floatUp {
  to { transform: translateY(-110vh) translateX(20px) rotate(20deg); opacity: 0; }
}

/* Footer */
.footer-love {
  text-align: center;
  padding: 60px 6% 50px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-love .pulse-heart { font-size: 1.6rem; margin-bottom: 10px; }
.footer-love p { color: rgba(233,213,255,0.6); font-size: .85rem; font-weight: 300; }

/* Lightbox */
.lightbox-love {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6,3,12,0.92);
  display: none;
  align-items: center; justify-content: center;
  padding: 30px;
  backdrop-filter: blur(6px);
}
.lightbox-love.active { display: flex; animation: fadeUp .3s ease both; }
.lightbox-love img { max-width: min(90vw, 900px); max-height: 85vh; border-radius: 14px; box-shadow: var(--shadow-lg); }
.lightbox-close {
  position: absolute; top: 24px; right: 30px;
  color: var(--pearl); font-size: 2rem; cursor: pointer;
  opacity: .8; transition: opacity .2s;
}
.lightbox-close:hover { opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 110px; }
  .gallery-grid .g-item.big { grid-column: span 4; grid-row: span 2; }
  .gallery-grid .g-item.wide { grid-column: span 4; }
  .video-love-grid { grid-template-columns: 1fr; }
  .notes-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .glass-card { padding: 32px 22px; }
  .countdown-grid { gap: 8px; }
  .time-box .num { font-size: 1.4rem; }
  .section-love { padding: 80px 6%; }
  .letter-card { padding: 38px 22px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
  .gallery-grid .g-item.big, .gallery-grid .g-item.wide, .gallery-grid .g-item.tall, .gallery-grid .g-item.med, .gallery-grid .g-item.sq {
    grid-column: span 2; grid-row: span 1;
  }
  .notes-grid { grid-template-columns: 1fr; }
  .nav-love a { margin-left: 12px; font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
