/* ==================================================================
   Pb — Birthday site
   Romantic palette: blush / rose-gold / cream / plum
   ================================================================== */

:root {
  --blush: #fadadd;
  --blush-soft: #fff1f3;
  --rose-gold: #b76e79;
  --rose-gold-dark: #8d4f59;
  --cream: #fff8f0;
  --plum: #4a0e2e;
  --ink: #2b1a22;
  --muted: #7b5e68;
  --white: #ffffff;

  --font-display: 'Playfair Display', serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-script: 'Dancing Script', cursive;

  --shadow-soft: 0 10px 30px rgba(74, 14, 46, 0.1);
  --shadow-card: 0 20px 50px rgba(74, 14, 46, 0.15);
  --radius: 20px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(180deg, var(--cream) 0%, var(--blush-soft) 100%);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

/* ---------- Shared section bits ---------- */

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  text-align: center;
  color: var(--plum);
  margin-bottom: 0.4em;
  font-style: italic;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

/* Scroll reveal baseline — js toggles .is-visible */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================================================================
   HERO
   ================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse at top, rgba(250, 218, 221, 0.9), transparent 60%),
    linear-gradient(180deg, #ffe3e8 0%, #fff1f3 50%, var(--cream) 100%);
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 2;
  animation: heroIn 1.4s ease-out;
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.75rem;
  color: var(--rose-gold);
  margin-bottom: 1.5rem;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  color: var(--plum);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero__name {
  font-family: var(--font-script);
  color: var(--rose-gold);
  font-size: 1.25em;
  display: inline-block;
  padding-top: 0.2em;
}

.hero__subtitle {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--muted);
  margin-top: 1rem;
}

.hero__cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  margin-top: 3.5rem;
  text-decoration: none;
  color: var(--rose-gold);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  animation: bounce 2.2s infinite;
}
.hero__cue-arrow { font-size: 1.2rem; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

/* Balloons */
.hero__balloons {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.balloon {
  position: absolute;
  bottom: -120px;
  width: 60px;
  height: 75px;
  border-radius: 50% 50% 45% 45%;
  opacity: 0.85;
  animation: floatUp 14s linear infinite;
}
.balloon::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  width: 1px;
  height: 80px;
  background: rgba(183, 110, 121, 0.4);
}
.b1 { left: 8%;  background: #ffb3ba; animation-delay: 0s;  }
.b2 { left: 22%; background: #ffdfba; animation-delay: 3s;  width: 50px; height: 62px; }
.b3 { left: 60%; background: #ffc9de; animation-delay: 6s;  }
.b4 { left: 78%; background: #f4a7b9; animation-delay: 1.5s; width: 45px; height: 56px; }
.b5 { left: 45%; background: #ffd6e0; animation-delay: 8s;  }

@keyframes floatUp {
  0%   { transform: translateY(0) rotate(-4deg);  opacity: 0; }
  15%  { opacity: 0.85; }
  50%  { transform: translateY(-60vh) rotate(4deg); }
  100% { transform: translateY(-120vh) rotate(-4deg); opacity: 0; }
}

/* ==================================================================
   BANNER — Celebration clock
   ================================================================== */
.banner {
  padding: 4rem 1.5rem;
  text-align: center;
}
.banner__inner {
  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(183, 110, 121, 0.15);
}
.banner__label {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.banner__clock {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--plum);
  margin: 0.6rem 0;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.banner__hint { color: var(--rose-gold); font-size: 0.95rem; }

/* ==================================================================
   LETTER
   ================================================================== */
.letter {
  padding: 5rem 1.5rem;
  max-width: 780px;
  margin: 0 auto;
}
.letter__card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 3rem clamp(1.5rem, 4vw, 3.5rem);
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--rose-gold);
  position: relative;
}
.letter__card::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 20px;
  font-family: var(--font-display);
  font-size: 6rem;
  color: var(--blush);
  line-height: 1;
}
.letter__typed {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-style: italic;
  color: var(--ink);
  min-height: 7em;   /* reserve space so layout doesn't jump while typing */
  white-space: pre-wrap;
}
.letter__typed::after {
  content: '|';
  color: var(--rose-gold);
  animation: blink 0.9s infinite;
  margin-left: 2px;
}
.letter__typed.is-done::after { content: ''; }
@keyframes blink {
  0%, 50%   { opacity: 1; }
  51%, 100% { opacity: 0; }
}
.letter__sign {
  margin-top: 2rem;
  text-align: right;
  color: var(--muted);
  font-size: 0.95rem;
}
.letter__sign span {
  font-family: var(--font-script);
  font-size: 1.8rem;
  color: var(--rose-gold);
}

/* ==================================================================
   GALLERY
   ================================================================== */
.gallery { padding: 5rem 1.5rem; max-width: 1200px; margin: 0 auto; }
.gallery__grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: zoom-in;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 4 / 3;
  background: var(--blush);
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}
.gallery__item:hover img { transform: scale(1.08); }
.gallery__item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.1rem 1rem 0.9rem;
  color: var(--white);
  font-size: 0.9rem;
  background: linear-gradient(180deg, transparent, rgba(74, 14, 46, 0.75));
  transform: translateY(110%);
  transition: transform 0.4s ease;
}
.gallery__item:hover figcaption { transform: translateY(0); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 5, 15, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 2rem;
}
.lightbox.is-open { display: flex; animation: fadeIn 0.3s ease; }
.lightbox__img { max-width: 90vw; max-height: 85vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lightbox__close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  color: var(--plum);
  border: 0;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ==================================================================
   TIMELINE
   ================================================================== */
.timeline { padding: 5rem 1.5rem; max-width: 900px; margin: 0 auto; }
.timeline__track {
  position: relative;
  padding: 2rem 0;
}
.timeline__track::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--rose-gold), transparent);
  transform: translateX(-50%);
}
.timeline__item {
  position: relative;
  width: 50%;
  padding: 1rem 2rem;
}
.timeline__item:nth-child(odd)  { left: 0; text-align: right; }
.timeline__item:nth-child(even) { left: 50%; text-align: left; }
.timeline__dot {
  position: absolute;
  top: 1.8rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--rose-gold);
  box-shadow: 0 0 0 4px var(--blush);
}
.timeline__item:nth-child(odd)  .timeline__dot { right: -9px; }
.timeline__item:nth-child(even) .timeline__dot { left:  -9px; }

.timeline__card {
  background: var(--white);
  padding: 1.3rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.timeline__date {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rose-gold);
  margin-bottom: 0.4rem;
}
.timeline__card h3 {
  font-family: var(--font-display);
  color: var(--plum);
  font-size: 1.25rem;
  margin-bottom: 0.3rem;
}
.timeline__card p { color: var(--muted); font-size: 0.92rem; }

/* Stack timeline on small screens */
@media (max-width: 720px) {
  .timeline__track::before { left: 20px; }
  .timeline__item,
  .timeline__item:nth-child(odd),
  .timeline__item:nth-child(even) {
    width: 100%;
    left: 0;
    text-align: left;
    padding-left: 48px;
  }
  .timeline__item .timeline__dot,
  .timeline__item:nth-child(odd) .timeline__dot,
  .timeline__item:nth-child(even) .timeline__dot {
    left: 12px;
    right: auto;
  }
}

/* ==================================================================
   REASONS — Flip cards
   ================================================================== */
.reasons { padding: 5rem 1.5rem; max-width: 1000px; margin: 0 auto; }
.reasons__grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.flip-card {
  perspective: 1000px;
  aspect-ratio: 1 / 1;
  cursor: pointer;
}
.flip-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.flip-card:hover .flip-card__inner,
.flip-card.is-flipped .flip-card__inner {
  transform: rotateY(180deg);
}
.flip-card__front,
.flip-card__back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.flip-card__front {
  background: linear-gradient(135deg, var(--blush), var(--white));
  color: var(--rose-gold);
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
}
.flip-card__back {
  background: linear-gradient(135deg, var(--rose-gold), var(--plum));
  color: var(--white);
  transform: rotateY(180deg);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
}

/* ==================================================================
   WISH
   ================================================================== */
.wish {
  padding: 6rem 1.5rem;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.wish__text {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0 auto 2.5rem;
  max-width: 500px;
}
.wish__btn {
  font-family: var(--font-display);
  font-size: 1.15rem;
  padding: 1rem 2.5rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose-gold), var(--plum));
  color: var(--white);
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(183, 110, 121, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.wish__btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 15px 40px rgba(183, 110, 121, 0.55);
}
.wish__btn:active { transform: translateY(0) scale(0.98); }

.wish__heart {
  font-size: 3rem;
  color: var(--rose-gold);
  margin-top: 2rem;
  animation: heartbeat 1.6s ease-in-out infinite;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  25%      { transform: scale(1.15); }
  50%      { transform: scale(1); }
  75%      { transform: scale(1.08); }
}

/* ==================================================================
   FOOTER
   ================================================================== */
.footer {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid rgba(183, 110, 121, 0.15);
  margin-top: 3rem;
}
