/* ============================================
   WOMAN'S DAY — LOVE LETTER WEBSITE
   Design: "Warm Bloom" Palette
   For: Hà Vy 🌸
   ============================================ */

/* === DESIGN TOKENS === */
:root {
  /* Colors */
  --rose: #FFB5C2;
  --rose-light: #FFD4DC;
  --rose-dark: #E89AAB;
  --rose-deep: #D4728A;
  --cream: #FFF8F0;
  --cream-dark: #FFF0E5;
  --gold: #D4A574;
  --gold-light: #E8C9A0;
  --coral: #FF8C7C;
  --text-primary: #6B2040;
  --text-secondary: #8B4060;
  --text-light: #A66080;
  --white: #FFFFFF;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-script: 'Dancing Script', cursive;

  /* Spacing */
  --section-pad: clamp(60px, 10vw, 120px);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* === RESET & BASE === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--cream);
  overflow-x: hidden;
  line-height: 1.6;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* === LOADING SCREEN === */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cream) 0%, var(--rose-light) 100%);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-flower {
  font-size: 48px;
  animation: loadingSpin 2s ease-in-out infinite;
}

@keyframes loadingSpin {

  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }

  50% {
    transform: scale(1.2) rotate(180deg);
  }
}

.loading-text {
  margin-top: 20px;
  font-family: var(--font-script);
  font-size: 1.2rem;
  color: var(--text-secondary);
  animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

.loading-enter {
  font-family: var(--font-script);
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-top: 32px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  cursor: pointer;
}

.loading-screen.ready {
  cursor: pointer;
}

.loading-screen.ready .loading-enter {
  opacity: 1;
  transform: translateY(0);
  animation: loadingPulse 1.5s ease-in-out infinite;
}

.loading-screen.ready .loading-text {
  display: none;
}

/* === PETAL PARTICLES === */
.petals-container {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -40px;
  width: var(--size, 14px);
  height: var(--size, 14px);
  background: var(--petal-color, var(--rose));
  border-radius: 50% 0 50% 50%;
  opacity: 0.6;
  animation: petalFall var(--duration, 8s) linear var(--delay, 0s) infinite;
  filter: blur(0.5px);
}

@keyframes petalFall {
  0% {
    transform: translateX(0) translateY(0) rotate(0deg) scale(1);
    opacity: 0;
  }

  10% {
    opacity: 0.7;
  }

  90% {
    opacity: 0.5;
  }

  100% {
    transform: translateX(var(--drift, 100px)) translateY(110vh) rotate(var(--spin, 720deg)) scale(0.6);
    opacity: 0;
  }
}

/* === HERO SECTION === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, var(--cream) 0%, #FFE8ED 40%, var(--rose-light) 100%);
  overflow: hidden;
  text-align: center;
  padding: 40px 24px;
}

.hero-bg-circles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
}

.circle-1 {
  width: clamp(300px, 50vw, 600px);
  height: clamp(300px, 50vw, 600px);
  background: var(--rose);
  top: -10%;
  right: -10%;
  animation: circleFloat 15s ease-in-out infinite;
}

.circle-2 {
  width: clamp(200px, 35vw, 400px);
  height: clamp(200px, 35vw, 400px);
  background: var(--gold);
  bottom: 10%;
  left: -5%;
  animation: circleFloat 20s ease-in-out infinite reverse;
}

.circle-3 {
  width: clamp(150px, 25vw, 300px);
  height: clamp(150px, 25vw, 300px);
  background: var(--coral);
  top: 40%;
  left: 50%;
  animation: circleFloat 12s ease-in-out infinite 3s;
}

@keyframes circleFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -20px) scale(1.05);
  }

  66% {
    transform: translate(-20px, 15px) scale(0.95);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-date {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.1em;
  line-height: 1;
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(40px);
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1rem, 3vw, 1.5rem);
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(30px);
}

.hero-divider {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto 24px;
  opacity: 0;
  transform: scaleX(0);
}

.hero-divider.active {
  transform: scaleX(1);
  opacity: 1;
  transition: transform 0.8s var(--ease-out), opacity 0.6s ease;
}

.hero-to {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 300;
  color: var(--text-light);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(20px);
}

.hero-name {
  font-family: var(--font-script);
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(30px) scale(0.9);
}

.hero-name.active {
  text-shadow: 0 0 40px rgba(212, 165, 116, 0.3);
}

.hero-flower {
  font-size: 2.5rem;
  opacity: 0;
  transform: translateY(20px) scale(0.5);
}

/* Hero reveal animation */
.reveal-hero.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.8s var(--ease-out), transform 1s var(--ease-spring);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards 3.5s;
}

.scroll-indicator span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.scroll-arrow {
  color: var(--text-light);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(8px);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* === WAVE DIVIDERS === */
.wave-divider {
  position: relative;
  margin-top: -2px;
  line-height: 0;
  z-index: 5;
}

.wave-divider svg {
  width: 100%;
  height: clamp(60px, 8vw, 120px);
  display: block;
}

.wave-1 svg path {
  fill: #FFF3F5;
}

.wave-2 svg path {
  fill: var(--cream);
}

.wave-3 svg path {
  fill: #FFE8ED;
}

.wave-4 svg path {
  fill: #FFF0E8;
}

/* === SECTION SHARED === */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.section-title em {
  font-style: italic;
  color: var(--rose-deep);
}

.section-subtitle {
  text-align: center;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-secondary);
  margin-bottom: 48px;
}

/* === TRIBUTE SECTION === */
.tribute {
  background: #FFF3F5;
  padding: var(--section-pad) 0;
}

.tribute-portrait {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
  position: relative;
}

.portrait-frame {
  position: relative;
  width: clamp(140px, 25vw, 200px);
  height: clamp(140px, 25vw, 200px);
  border-radius: 50%;
  overflow: visible;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--white);
  box-shadow: 0 8px 32px rgba(107, 32, 64, 0.15);
  position: relative;
  z-index: 2;
}

.portrait-ring {
  position: absolute;
  inset: -8px;
  border: 2px solid var(--rose);
  border-radius: 50%;
  animation: ringPulse 3s ease-in-out infinite;
  z-index: 1;
}

.portrait-ring-outer {
  inset: -16px;
  border-color: var(--rose-light);
  animation-delay: 0.5s;
}

@keyframes ringPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }

  50% {
    transform: scale(1.08);
    opacity: 0;
  }
}

.portrait-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 44px;
  height: 44px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 12px rgba(107, 32, 64, 0.12);
  z-index: 3;
}

.tribute .container {
  text-align: center;
}

.tribute-body {
  max-width: 600px;
  margin: 32px auto 0;
}

.tribute-body p {
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.8;
}

.tribute-highlight {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.35rem) !important;
  font-style: italic;
  color: var(--text-primary) !important;
  padding-top: 16px;
  border-top: 1px solid var(--rose-light);
}

/* === REASONS SECTION === */
.reasons {
  background: var(--cream);
  padding: var(--section-pad) 0;
}

.reasons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.reason-card {
  background: var(--white);
  border-radius: 20px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(107, 32, 64, 0.06);
  border: 1px solid rgba(255, 181, 194, 0.2);
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s ease;
  cursor: default;
}

.reason-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 40px rgba(107, 32, 64, 0.12);
}

.reason-emoji {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 12px;
}

.reason-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.reason-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.reason-card strong {
  color: var(--rose-deep);
  font-weight: 600;
}

/* === GALLERY SECTION === */
.gallery {
  background: #FFE8ED;
  padding: var(--section-pad) 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.gallery-item {
  border-radius: 20px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 4px 24px rgba(107, 32, 64, 0.08);
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s ease;
}

.gallery-item:hover {
  transform: translateY(-8px) rotate(-1deg);
  box-shadow: 0 16px 48px rgba(107, 32, 64, 0.15);
}

.gallery-item:nth-child(even):hover {
  transform: translateY(-8px) rotate(1deg);
}

.gallery-img-wrapper {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--rose-light);
}

.gallery-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.gallery-item:hover .gallery-img-wrapper img {
  transform: scale(1.08);
}

.gallery-caption {
  padding: 16px 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
}

/* === WISHES SECTION === */
.wishes {
  background: linear-gradient(170deg, #FFF0E8 0%, var(--rose-light) 40%, var(--rose) 100%);
  padding: var(--section-pad) 0;
  position: relative;
  overflow: hidden;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hearts-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.floating-heart {
  position: absolute;
  bottom: -30px;
  font-size: var(--heart-size, 18px);
  opacity: 0;
  animation: heartFloat var(--float-duration, 6s) ease-in var(--float-delay, 0s) infinite;
}

@keyframes heartFloat {
  0% {
    transform: translateY(0) translateX(0) scale(0.5) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 0.7;
  }

  80% {
    opacity: 0.4;
  }

  100% {
    transform: translateY(-100vh) translateX(var(--heart-drift, 50px)) scale(1) rotate(var(--heart-spin, 45deg));
    opacity: 0;
  }
}

.wishes .container {
  position: relative;
  z-index: 2;
}

.wishes-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 32px;
  padding: clamp(32px, 6vw, 56px) clamp(24px, 5vw, 48px);
  max-width: 580px;
  margin: 0 auto;
  text-align: center;
  box-shadow: 0 8px 40px rgba(107, 32, 64, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.wishes-flower-top,
.wishes-flower-bottom {
  font-size: 2rem;
  line-height: 1;
}

.wishes-flower-top {
  margin-bottom: 16px;
}

.wishes-flower-bottom {
  margin-top: 24px;
}

.wishes-name {
  font-family: var(--font-script);
  font-size: clamp(2rem, 6vw, 3rem);
  color: var(--text-primary);
  margin-bottom: 24px;
}

.wishes-body p {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.wishes-highlight {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.2vw, 1.2rem) !important;
  font-weight: 600;
  color: var(--text-primary) !important;
  padding: 16px 0 8px;
  line-height: 1.7 !important;
}

.wishes-sign {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rose-light);
}

.wishes-sign p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.wishes-from {
  font-family: var(--font-script);
  font-size: 1.2rem !important;
  color: var(--text-primary) !important;
  font-weight: 600;
}

/* === FOOTER === */
.site-footer {
  background: var(--text-primary);
  padding: 32px 24px;
  text-align: center;
}

.site-footer p {
  color: var(--rose-light);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.footer-date {
  color: var(--text-light) !important;
  font-size: 0.75rem !important;
}

/* === MUSIC PLAYER === */
.music-player {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
}

.music-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--white);
  box-shadow: 0 4px 20px rgba(107, 32, 64, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.music-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(107, 32, 64, 0.2);
}

.music-btn:active {
  transform: scale(0.95);
}

.music-icon {
  font-size: 1.4rem;
  color: var(--text-primary);
  z-index: 2;
  position: relative;
}

.music-waves {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.music-player.playing .music-waves {
  opacity: 1;
}

.music-player.playing .music-icon {
  opacity: 0;
}

.music-waves span {
  width: 3px;
  background: var(--rose-deep);
  border-radius: 2px;
  animation: musicWave 0.8s ease-in-out infinite alternate;
}

.music-waves span:nth-child(1) {
  height: 6px;
  animation-delay: 0s;
}

.music-waves span:nth-child(2) {
  height: 12px;
  animation-delay: 0.15s;
}

.music-waves span:nth-child(3) {
  height: 8px;
  animation-delay: 0.3s;
}

@keyframes musicWave {
  0% {
    height: 4px;
  }

  100% {
    height: 16px;
  }
}

.music-player.playing .music-btn {
  box-shadow: 0 4px 20px rgba(255, 181, 194, 0.4);
}

/* === SCROLL REVEAL === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger reason cards */
.reason-card.reveal.active {
  transition-delay: calc(var(--stagger, 0) * 80ms);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .reasons-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .reason-card {
    padding: 24px 20px;
  }

  .hero-date {
    letter-spacing: 0.05em;
  }

  .music-player {
    bottom: 16px;
    right: 16px;
  }

  .music-btn {
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 480px) {
  .wishes-card {
    border-radius: 24px;
  }

  .hero-subtitle {
    letter-spacing: 0.15em;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .petal {
    display: none;
  }

  .floating-heart {
    display: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .reveal-hero {
    opacity: 1;
    transform: none;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--cream);
}

::-webkit-scrollbar-thumb {
  background: var(--rose);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--rose-dark);
}

/* Selection */
::selection {
  background: var(--rose-light);
  color: var(--text-primary);
}