
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
  --lavender: #eee9ff;
  --purple: #8976c5;
  --deep-purple: #554577;
  --blue: #a8d9ef;
  --pale-blue: #e8f7ff;
  --white: #ffffff;
  --text: #514b68;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse at top left, #fff 0%, transparent 45%),
    linear-gradient(135deg, var(--lavender), var(--pale-blue));
  overflow-x: hidden;
}

button {
  font: inherit;
  cursor: pointer;
}

button:focus-visible {
  outline: 3px solid var(--deep-purple);
  outline-offset: 4px;
}

button:disabled {
  cursor: default;
  opacity: 0.75;
}

.sparkles {
  position: fixed;
  top: 18px;
  left: 0;
  width: 100%;
  text-align: center;
  color: var(--purple);
  opacity: 0.65;
  letter-spacing: 12px;
  pointer-events: none;
  z-index: 10;
}

.page {
  display: none;
  min-height: 90vh;
  padding: 70px 20px 45px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.page.active {
  display: flex;
  animation: fadeIn 0.65s ease both;
}

h1,
h2 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--deep-purple);
}

h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin: 12px 0;
}

h2 {
  font-size: 1.8rem;
}

p {
  line-height: 1.85;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--purple);
}

.subtitle,
.hint {
  max-width: 440px;
  color: #77718d;
}

/* ENVELOPE */

.envelope-button {
  background: transparent;
  border: 0;
  padding: 20px;
  margin: 20px;
}

.envelope {
  position: relative;
  display: block;
  width: 190px;
  height: 130px;
  background: #9ccde8;
  border-radius: 8px;
  box-shadow: 0 18px 35px #8d84b644;
  animation: float 2.5s ease-in-out infinite;
}

.envelope::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #c6b8ef;
  clip-path: polygon(0 0, 50% 56%, 100% 0);
  border-radius: 8px 8px 0 0;
  z-index: 2;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #b7a5e4;
  clip-path: polygon(0 0, 100% 0, 50% 57%);
  transform-origin: top center;
  transition: transform 0.65s ease;
  z-index: 3;
}

.envelope.open .envelope-flap {
  transform: rotateX(180deg);
}

.envelope-heart {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  top: 40px;
  color: white;
  font-size: 32px;
}

/* BUTTONS */

.primary,
.secondary {
  border: 0;
  border-radius: 30px;
  padding: 13px 22px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.primary {
  background: var(--purple);
  color: white;
  margin-top: 24px;
  box-shadow: 0 7px 16px #8976c533;
}

.secondary {
  background: var(--pale-blue);
  color: var(--deep-purple);
  font-size: 1.3rem;
  min-width: 45px;
}

.primary:hover,
.secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px #8976c533;
}

/* CARDS */

.glass-card,
.album-card,
.letter-card {
  background: #ffffffd9;
  border: 1px solid #ffffff;
  border-radius: 24px;
  padding: 25px;
  width: min(100%, 520px);
  box-shadow: 0 15px 40px #8174a51c;
}

.album-card {
  max-width: 390px;
}

.album-card img {
  display: block;
  width: 100%;
  height: 340px;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
  background: var(--lavender);
}

#photoCaption {
  min-height: 30px;
}

.album-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

#photoCounter {
  font-size: 0.9rem;
  color: var(--purple);
}

/* REASONS */

.reasons-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: min(100%, 560px);
  margin-top: 20px;
}

.reason-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  border: 1px solid #fff;
  border-radius: 18px;
  padding: 20px;
  min-height: 155px;
  background: #ffffffb8;
  color: var(--text);
  box-shadow: 0 8px 22px #8174a512;
  transition: transform 0.2s, background 0.2s;
}

.reason-card > span:first-child {
  color: var(--purple);
  font-size: 0.8rem;
}

.reason-card strong {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  color: var(--deep-purple);
}

.reason-detail {
  display: none;
  line-height: 1.6;
  font-size: 0.9rem;
}

.reason-card.revealed {
  background: #e5f5ff;
  transform: translateY(-2px);
}

.reason-card.revealed .reason-detail {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* LETTER */

.letter-card {
  text-align: left;
}

.signature {
  color: var(--purple);
  font-weight: 600;
}

.text-button {
  background: transparent;
  border: 0;
  color: var(--purple);
  margin-top: 18px;
  padding: 12px;
}

.hidden {
  display: none !important;
}

.final-message {
  margin-top: 25px;
  padding: 20px;
  max-width: 520px;
  animation: fadeIn 0.7s ease;
}

/* FOOTER */

footer {
  padding: 18px;
  text-align: center;
  color: #81779c;
  font-size: 0.8rem;
}

/* ANIMATIONS */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* MOBILE */

@media (max-width: 480px) {
  .page {
    padding: 65px 16px 35px;
  }

  .reasons-grid {
    gap: 10px;
  }

  .reason-card {
    padding: 15px;
    min-height: 140px;
  }

  .album-card img {
    height: 300px;
  }

  .glass-card,
  .letter-card {
    padding: 20px;
  }
}

/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* PAGE VISIBILITY */
.page {
  display: none;
}

.page.active {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* PHOTO ALBUM */
.album-card {
  width: min(90%, 420px);
  margin: 20px auto;
  padding: 16px;
  border-radius: 20px;
  background: white;
  text-align: center;
  box-sizing: border-box;
}

#albumPhoto {
  display: block;
  width: 100%;
  height: 350px;
  object-fit: contain;
  border-radius: 12px;
  background: #f0eaff;
}

#photoCaption {
  margin: 16px 0;
}

.album-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

.hidden {
  display: none !important;
}

.reason-detail {
  display: block;
  margin-top: 10px;
}

.reason-card[aria-expanded="false"] .reason-detail {
  display: none;
}

#albumPhoto {
  display: block !important;
  width: 100%;
  max-width: 400px;
  height: 350px;
  object-fit: contain;
  opacity: 1;
  visibility: visible;
  margin: 0 auto;
}

.album-card {
  display: block;
  width: 90%;
  max-width: 450px;
  margin: 20px auto;
  padding: 16px;
  box-sizing: border-box;
  background: white;
  border-radius: 20px;
}

/* Force Photo 2 to display */
#albumPhoto[src*="memory2.jpeg"] {
  display: block !important;
  width: 100%;
  max-width: 400px;
  height: 350px;
  object-fit: contain;
  opacity: 1;
  visibility: visible;
  margin: 0 auto;
}

/* Force Photo 3 to display */
#albumPhoto[src*="memory3.jpeg"] {
  display: block !important;
  width: 100%;
  max-width: 400px;
  height: 350px;
  object-fit: contain;
  opacity: 1;
  visibility: visible;
  margin: 0 auto;
}

/* Force Photo 4 to display */
#albumPhoto[src*="memory4.jpeg"] {
  display: block !important;
  width: 100%;
  max-width: 400px;
  height: 350px;
  object-fit: contain;
  opacity: 1;
  visibility: visible;
  margin: 0 auto;
}

/* Force Photo 5 to display */
#albumPhoto[src*="memory5.jpeg"] {
  display: block !important;
  width: 100%;
  max-width: 400px;
  height: 350px;
  object-fit: contain;
  opacity: 1;
  visibility: visible;
  margin: 0 auto;
}

/* ==========================================
   H A L A ' S   B I R T H D A Y
   Dreamy Lavender + Baby Blue Upgrade
   ========================================== */

:root {
  --lavender: #eee9ff;
  --purple: #8976c5;
  --deep-purple: #554577;
  --blue: #a8d9ef;
  --pale-blue: #e8f7ff;
  --pink: #f8e5f5;
  --white: #ffffff;
  --text: #514765;
  --muted: #857c99;
  --glass: rgba(255, 255, 255, 0.68);
  --soft-shadow: 0 18px 50px rgba(93, 76, 139, 0.13);
}

/* ---------- THE WHOLE WEBSITE ---------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(ellipse at 10% 10%, #f8e8ff 0, transparent 35%),
    radial-gradient(ellipse at 90% 15%, #d9f2ff 0, transparent 38%),
    radial-gradient(ellipse at 80% 90%, #e5ddff 0, transparent 35%),
    linear-gradient(135deg, #fbf8ff, #edf8ff 55%, #f6edff);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Subtle dreamy sparkle texture */

body::before {
  content: "✦     ·          ✧         ·      ✦";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  color: rgba(137, 118, 197, 0.13);
  font-size: 28px;
  letter-spacing: 28px;
  line-height: 100px;
  overflow: hidden;
  overflow-wrap: anywhere;
  padding: 12px;
}

/* Keep the actual website above the decoration */

body > * {
  position: relative;
  z-index: 1;
}

h1,
h2,
h3 {
  font-family: "Playfair Display", Georgia, serif;
  color: var(--deep-purple);
  letter-spacing: -0.5px;
  line-height: 1.25;
}

h1 {
  font-size: clamp(2.3rem, 6vw, 4.3rem);
  margin: 15px 0;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

p {
  line-height: 1.85;
}

::selection {
  background: #dcd0ff;
  color: var(--deep-purple);
}

/* ---------- PAGE TRANSITIONS ---------- */
/* Preserve the website's page navigation */

.page {
  display: none;
  min-height: 85vh;
  width: 100%;
  padding: 55px 22px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.page.active {
  display: flex;
  flex-direction: column;
  animation: pageEnter 0.65s ease both;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- SOFT GLASS CARDS ---------- */

.card,
.glass-card,
.album-card,
.letter-card {
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.card,
.glass-card,
.letter-card {
  width: min(100%, 760px);
  padding: clamp(24px, 5vw, 48px);
  margin: 18px auto;
}

/* ---------- BEAUTIFUL BUTTONS ---------- */

button {
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

button.primary,
.primary {
  border: 0;
  border-radius: 999px;
  padding: 15px 27px;
  margin: 10px 5px;
  color: white;
  background: linear-gradient(120deg, #8c78c9, #719fcf);
  box-shadow: 0 8px 22px rgba(113, 112, 187, 0.25);
}

button.primary:hover,
.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 13px 28px rgba(113, 112, 187, 0.35);
}

button.secondary,
.secondary {
  width: 46px;
  height: 46px;
  border: 1px solid #e1d9f7;
  border-radius: 50%;
  color: var(--deep-purple);
  background: linear-gradient(135deg, white, #f1f6ff);
  box-shadow: 0 5px 15px rgba(93, 76, 139, 0.09);
}

button.secondary:hover,
.secondary:hover {
  transform: scale(1.08);
  background: #e9e4ff;
}

button:focus-visible {
  outline: 3px solid #9b8bd6;
  outline-offset: 4px;
}

/* ---------- THE ENVELOPE ---------- */

#openEnvelope {
  border: none;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 18px 22px rgba(98, 79, 151, 0.19));
  animation: envelopeFloat 3.5s ease-in-out infinite;
  transition: filter 0.3s ease, transform 0.3s ease;
}

#openEnvelope:hover {
  filter: drop-shadow(0 22px 26px rgba(98, 79, 151, 0.27));
}

@keyframes envelopeFloat {
  0%, 100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-12px) rotate(1deg);
  }
}

/* ---------- THE PHOTO SCRAPBOOK ---------- */

.album-card {
  position: relative;
  isolation: isolate;
  width: min(92%, 490px);
  margin: 28px auto;
  padding: 18px 18px 22px;
  overflow: hidden;
  transform: rotate(-0.5deg);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.album-card::before {
  content: "♡   LITTLE MOMENT, BIG MEMORY   ♡";
  display: block;
  padding: 9px 5px 18px;
  color: var(--purple);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 2px;
}

.album-card:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 25px 65px rgba(93, 76, 139, 0.19);
}

/* Works for all five photos as JavaScript changes the src */

#albumPhoto {
  display: block !important;
  width: 100%;
  max-width: 100%;
  height: clamp(260px, 58vw, 430px);
  object-fit: contain;
  object-position: center;
  padding: 7px;
  margin: 0 auto;
  border-radius: 17px;
  background: linear-gradient(135deg, #eee8ff, #e4f5ff);
  border: 1px solid rgba(137, 118, 197, 0.12);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, transform 0.4s ease;
}

#albumPhoto:hover {
  transform: scale(1.015);
}

#photoCaption {
  margin: 19px 0 14px;
  color: var(--deep-purple);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.2rem;
  font-style: italic;
}

.album-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  padding-top: 6px;
}

#photoCounter {
  min-width: 55px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------- REASONS SHE DESERVES THE WORLD ---------- */

.reason-card {
  position: relative;
  padding: 23px;
  margin: 10px 0;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 23px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.85),
    rgba(239, 234, 255, 0.76)
  );
  box-shadow: 0 9px 25px rgba(93, 76, 139, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.reason-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 32px rgba(93, 76, 139, 0.14);
}

.reason-card::after {
  content: "♡";
  position: absolute;
  top: 18px;
  right: 20px;
  color: #9a88cf;
  font-size: 1.2rem;
}

.reason-detail {
  display: block;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 12px;
}

.reason-card[aria-expanded="false"] .reason-detail {
  display: none;
}

/* ---------- BIRTHDAY LETTER ---------- */

.letter-card {
  position: relative;
  text-align: left;
  padding: clamp(28px, 6vw, 55px);
  background:
    linear-gradient(rgba(255, 255, 255, 0.89),
                    rgba(255, 255, 255, 0.89)),
    linear-gradient(135deg, #e8ddff, #dff5ff);
  border-radius: 8px 28px 28px 8px;
  border-left: 5px solid #b7a4e7;
}

.letter-card p {
  color: #625773;
  font-size: 1.02rem;
  line-height: 2;
}

.letter-card h2 {
  text-align: center;
}

/* ---------- FINAL SURPRISE ---------- */

#finalMessage {
  width: min(100%, 700px);
  padding: 25px;
  margin: 20px auto;
  border-radius: 25px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.85),
    rgba(231, 242, 255, 0.9)
  );
  box-shadow: var(--soft-shadow);
  animation: revealMessage 0.7s ease both;
}

#finalMessage.hidden,
.hidden {
  display: none !important;
}

@keyframes revealMessage {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ---------- FOOTER ---------- */

footer {
  padding: 25px 15px;
  text-align: center;
  color: #9185a8;
  font-size: 0.85rem;
  letter-spacing: 0.4px;
}

/* ---------- MOBILE EXPERIENCE ---------- */

@media (max-width: 600px) {
  .page {
    padding: 38px 15px;
    min-height: 80vh;
  }

  h1 {
    font-size: clamp(2.1rem, 10vw, 3.2rem);
  }

  .card,
  .glass-card,
  .letter-card {
    padding: 24px 19px;
    border-radius: 23px;
  }

  .album-card {
    width: 100%;
    padding: 13px 13px 18px;
    border-radius: 22px;
  }

  #albumPhoto {
    height: min(105vw, 390px);
  }

  .reason-card {
    padding: 20px;
  }

  button.primary,
  .primary {
    max-width: 100%;
    line-height: 1.5;
  }
}

/* Respect reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
/* ===================================
   DREAMY GALAXY BACKGROUND 💜🩵
   =================================== */

html {
  min-height: 100%;
  background: #dcd5ff;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: #514765;

  background:
    radial-gradient(
      ellipse at 15% 20%,
      rgba(255, 218, 250, 0.95) 0%,
      transparent 35%
    ),
    radial-gradient(
      ellipse at 85% 15%,
      rgba(160, 220, 255, 0.9) 0%,
      transparent 38%
    ),
    radial-gradient(
      ellipse at 75% 75%,
      rgba(192, 166, 255, 0.75) 0%,
      transparent 40%
    ),
    radial-gradient(
      ellipse at 15% 85%,
      rgba(178, 230, 255, 0.8) 0%,
      transparent 35%
    ),
    linear-gradient(
      135deg,
      #f8eaff 0%,
      #e4dcff 30%,
      #d9edff 65%,
      #f5e5ff 100%
    );

  background-attachment: fixed;
}

/* Magical floating sparkle layer */

body::before {
  content: "✧     ✦       ♡       ✧      ·      ✦";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  font-size: 25px;
  line-height: 115px;
  letter-spacing: 23px;
  overflow-wrap: anywhere;

  color: rgba(255, 255, 255, 0.85);
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.95),
    0 0 20px rgba(177, 150, 255, 0.6);

  animation: starDrift 12s ease-in-out infinite alternate;
}

/* Extra dreamy pink-purple glow */

body::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;

  background:
    radial-gradient(
      circle at 25% 35%,
      rgba(255, 255, 255, 0.45),
      transparent 18%
    ),
    radial-gradient(
      circle at 75% 60%,
      rgba(255, 205, 245, 0.3),
      transparent 22%
    ),
    radial-gradient(
      circle at 50% 85%,
      rgba(157, 206, 255, 0.3),
      transparent 25%
    );

  filter: blur(25px);
  animation: glowFloat 10s ease-in-out infinite alternate;
}

@keyframes starDrift {
  from {
    transform: translateY(-8px);
    opacity: 0.65;
  }

  to {
    transform: translateY(12px);
    opacity: 1;
  }
}

@keyframes glowFloat {
  from {
    transform: translate3d(-1%, -1%, 0) scale(1);
  }

  to {
    transform: translate3d(1%, 2%, 0) scale(1.06);
  }
}

/* Keep website content above the background */

.page,
footer {
  position: relative;
  z-index: 1;
}

