/* ========================================
   CSS Variables - Change colors here
   ======================================== */
:root {
  /* Rose Gold Palette */
  --color-rose-dark: #B87A7D;     /* Dull Turkish Rose */
  --color-rose-darker: #9C686A;   /* 15% darker */
  --color-rose-medium: #DA9FA3;   /* Parrot Pink */
  --color-rose-soft: #E7B6B9;     /* Soft Kiss */
  --color-rose-light: #F0CCCE;    /* Blushing Pink */
  --color-rose-accent: #D2979B;   /* Parrot Pink variant */

  /* Sparkle/Water colors */
  --color-sparkle: #ffffff;
  --color-sparkle-warm: rgba(255, 255, 255, 0.9);

  /* Dark theme (default) - 15% darker */
  --color-background: #9C686A;
  --color-background-light: #A87578;
  --color-text: #ffffff;
  --color-icon: #ffffff;
}

/* Light theme (manual override) */
[data-theme="light"] {
  --color-background: #F0CCCE;
  --color-background-light: #F5D8DA;
  --color-text: #B87A7D;
  --color-icon: #B87A7D;
}

/* Dark theme (manual override) */
[data-theme="dark"] {
  --color-background: #9C686A;
  --color-background-light: #A87578;
  --color-text: #ffffff;
  --color-icon: #ffffff;
}

/* System preference: light mode (when no manual override) */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --color-background: #F0CCCE;
    --color-background-light: #F5D8DA;
    --color-text: #B87A7D;
    --color-icon: #B87A7D;
  }
}

/* ========================================
   Base Styles
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: linear-gradient(
    180deg,
    var(--color-background) 0%,
    var(--color-background-light) 50%,
    var(--color-background) 100%
  );
  background-size: 100% 200%;
  animation: wave-flow 8s ease-in-out infinite;
  color: var(--color-text);
  overflow: hidden;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Wave background animation */
@keyframes wave-flow {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 0% 100%; }
}

/* ========================================
   Theme Toggle
   ======================================== */
.theme-toggle {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 100;
  padding: 0.5rem;
  color: var(--color-icon);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.theme-toggle:hover {
  opacity: 1;
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* Icon visibility - only show one at a time */
.icon-sun {
  display: block;
}

.icon-moon {
  display: none;
}

/* Dark theme explicit rules */
[data-theme="dark"] .icon-sun {
  display: block;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

/* Light theme rules */
[data-theme="light"] .icon-sun {
  display: none;
}

[data-theme="light"] .icon-moon {
  display: block;
}

/* System light preference (no manual override) */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .icon-sun {
    display: none;
  }
  :root:not([data-theme]) .icon-moon {
    display: block;
  }
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  position: relative;
}

/* ========================================
   Title Wrapper with Glow
   ======================================== */
.title-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.title-wrapper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300%;
  height: 300%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.1) 30%,
    transparent 60%
  );
  pointer-events: none;
  z-index: 1;
}

/* ========================================
   Title with Flowing Gradient
   ======================================== */
.title {
  font-size: clamp(2rem, 8vw, 6rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-align: center;
  background: linear-gradient(
    90deg,
    var(--color-rose-dark) 0%,
    var(--color-rose-soft) 25%,
    #ffffff 50%,
    var(--color-rose-soft) 75%,
    var(--color-rose-dark) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 10;
  /* Title visibility fix */
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.8))
          drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
  animation: gradient-flow 6s ease-in-out infinite;
}

/* Flowing gradient animation inside title text (bounce with delay) */
@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  40% { background-position: 100% 50%; }
  80% { background-position: 0% 50%; }
  100% { background-position: 0% 50%; }
}

/* ========================================
   Subtitle
   ======================================== */
.subtitle {
  font-size: clamp(0.8rem, 2.5vw, 1.5rem);
  letter-spacing: 0.6em;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 0.8rem;
  text-transform: uppercase;
  position: relative;
  z-index: 10;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5));
}

/* Subtitle color for light theme */
[data-theme="light"] .subtitle {
  color: rgba(184, 122, 125, 0.7);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .subtitle {
    color: rgba(184, 122, 125, 0.7);
  }
}

/* ========================================
   Water Droplet Particles
   ======================================== */
.particles {
  position: absolute;
  top: 100%;
  left: 50%;
  margin-top: 0.5rem;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 5;
}

.particle {
  position: absolute;
  /* Teardrop/droplet shape */
  width: 4px;
  height: 7px;
  background: radial-gradient(
    ellipse at 30% 20%,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.6) 40%,
    rgba(255, 255, 255, 0.2) 100%
  );
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: 0 0 4px 1px rgba(255, 255, 255, 0.5);
  opacity: 0;
  animation: water-flow 10s infinite ease-out;
}

/* Particle sizes */
.particle.size-sm {
  width: 3px;
  height: 5px;
  box-shadow: 0 0 3px 1px rgba(255, 255, 255, 0.4);
}

.particle.size-md {
  width: 4px;
  height: 7px;
}

.particle.size-lg {
  width: 6px;
  height: 10px;
  box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.6);
}

/* Particle positions - flowing downward with spread */
.particle:nth-child(1)  { --tx: -80px;  --ty: 350px; --sway: 15px;  animation-delay: 0s; animation-duration: 9s; }
.particle:nth-child(2)  { --tx: 120px;  --ty: 400px; --sway: -20px; animation-delay: 0.3s; animation-duration: 11s; }
.particle:nth-child(3)  { --tx: -200px; --ty: 320px; --sway: 25px;  animation-delay: 0.6s; animation-duration: 10s; }
.particle:nth-child(4)  { --tx: 50px;   --ty: 380px; --sway: -15px; animation-delay: 0.9s; animation-duration: 12s; }
.particle:nth-child(5)  { --tx: -150px; --ty: 420px; --sway: 30px;  animation-delay: 1.2s; animation-duration: 9s; }
.particle:nth-child(6)  { --tx: 180px;  --ty: 350px; --sway: -25px; animation-delay: 1.5s; animation-duration: 11s; }
.particle:nth-child(7)  { --tx: -30px;  --ty: 400px; --sway: 20px;  animation-delay: 1.8s; animation-duration: 10s; }
.particle:nth-child(8)  { --tx: 250px;  --ty: 380px; --sway: -30px; animation-delay: 2.1s; animation-duration: 13s; }
.particle:nth-child(9)  { --tx: -280px; --ty: 360px; --sway: 35px;  animation-delay: 2.4s; animation-duration: 9s; }
.particle:nth-child(10) { --tx: 100px;  --ty: 420px; --sway: -18px; animation-delay: 2.7s; animation-duration: 11s; }
.particle:nth-child(11) { --tx: -120px; --ty: 340px; --sway: 22px;  animation-delay: 3s; animation-duration: 10s; }
.particle:nth-child(12) { --tx: 200px;  --ty: 400px; --sway: -28px; animation-delay: 3.3s; animation-duration: 12s; }
.particle:nth-child(13) { --tx: -220px; --ty: 380px; --sway: 18px;  animation-delay: 3.6s; animation-duration: 9s; }
.particle:nth-child(14) { --tx: 70px;   --ty: 360px; --sway: -22px; animation-delay: 3.9s; animation-duration: 11s; }
.particle:nth-child(15) { --tx: -60px;  --ty: 440px; --sway: 28px;  animation-delay: 4.2s; animation-duration: 10s; }
.particle:nth-child(16) { --tx: 300px;  --ty: 350px; --sway: -35px; animation-delay: 4.5s; animation-duration: 13s; }
.particle:nth-child(17) { --tx: -300px; --ty: 400px; --sway: 40px;  animation-delay: 4.8s; animation-duration: 9s; }
.particle:nth-child(18) { --tx: 150px;  --ty: 370px; --sway: -20px; animation-delay: 5.1s; animation-duration: 11s; }
.particle:nth-child(19) { --tx: -180px; --ty: 390px; --sway: 25px;  animation-delay: 5.4s; animation-duration: 10s; }
.particle:nth-child(20) { --tx: 30px;   --ty: 410px; --sway: -15px; animation-delay: 5.7s; animation-duration: 12s; }
.particle:nth-child(21) { --tx: -250px; --ty: 360px; --sway: 32px;  animation-delay: 6s; animation-duration: 9s; }
.particle:nth-child(22) { --tx: 220px;  --ty: 380px; --sway: -25px; animation-delay: 6.3s; animation-duration: 11s; }
.particle:nth-child(23) { --tx: -100px; --ty: 420px; --sway: 20px;  animation-delay: 6.6s; animation-duration: 10s; }
.particle:nth-child(24) { --tx: 80px;   --ty: 350px; --sway: -30px; animation-delay: 6.9s; animation-duration: 13s; }
.particle:nth-child(25) { --tx: -40px;  --ty: 400px; --sway: 18px;  animation-delay: 7.2s; animation-duration: 9s; }
.particle:nth-child(26) { --tx: 280px;  --ty: 370px; --sway: -22px; animation-delay: 7.5s; animation-duration: 11s; }
.particle:nth-child(27) { --tx: -320px; --ty: 390px; --sway: 35px;  animation-delay: 7.8s; animation-duration: 10s; }
.particle:nth-child(28) { --tx: 160px;  --ty: 430px; --sway: -28px; animation-delay: 0.2s; animation-duration: 12s; }
.particle:nth-child(29) { --tx: -140px; --ty: 360px; --sway: 22px;  animation-delay: 0.5s; animation-duration: 9s; }
.particle:nth-child(30) { --tx: 40px;   --ty: 400px; --sway: -18px; animation-delay: 0.8s; animation-duration: 11s; }
.particle:nth-child(31) { --tx: -200px; --ty: 380px; --sway: 28px;  animation-delay: 1.1s; animation-duration: 10s; }
.particle:nth-child(32) { --tx: 240px;  --ty: 350px; --sway: -32px; animation-delay: 1.4s; animation-duration: 13s; }
.particle:nth-child(33) { --tx: -70px;  --ty: 410px; --sway: 20px;  animation-delay: 1.7s; animation-duration: 9s; }
.particle:nth-child(34) { --tx: 110px;  --ty: 370px; --sway: -25px; animation-delay: 2s; animation-duration: 11s; }
.particle:nth-child(35) { --tx: -260px; --ty: 390px; --sway: 30px;  animation-delay: 2.3s; animation-duration: 10s; }
.particle:nth-child(36) { --tx: 190px;  --ty: 420px; --sway: -20px; animation-delay: 2.6s; animation-duration: 12s; }
.particle:nth-child(37) { --tx: -110px; --ty: 360px; --sway: 25px;  animation-delay: 2.9s; animation-duration: 9s; }
.particle:nth-child(38) { --tx: 60px;   --ty: 400px; --sway: -28px; animation-delay: 3.2s; animation-duration: 11s; }
.particle:nth-child(39) { --tx: -230px; --ty: 380px; --sway: 35px;  animation-delay: 3.5s; animation-duration: 10s; }
.particle:nth-child(40) { --tx: 270px;  --ty: 350px; --sway: -22px; animation-delay: 3.8s; animation-duration: 13s; }
.particle:nth-child(41) { --tx: -50px;  --ty: 430px; --sway: 18px;  animation-delay: 4.1s; animation-duration: 9s; }
.particle:nth-child(42) { --tx: 130px;  --ty: 370px; --sway: -30px; animation-delay: 4.4s; animation-duration: 11s; }
.particle:nth-child(43) { --tx: -290px; --ty: 400px; --sway: 28px;  animation-delay: 4.7s; animation-duration: 10s; }
.particle:nth-child(44) { --tx: 210px;  --ty: 360px; --sway: -25px; animation-delay: 5s; animation-duration: 12s; }
.particle:nth-child(45) { --tx: -160px; --ty: 410px; --sway: 32px;  animation-delay: 5.3s; animation-duration: 9s; }
.particle:nth-child(46) { --tx: 90px;   --ty: 380px; --sway: -18px; animation-delay: 5.6s; animation-duration: 11s; }
.particle:nth-child(47) { --tx: -20px;  --ty: 390px; --sway: 22px;  animation-delay: 5.9s; animation-duration: 10s; }
.particle:nth-child(48) { --tx: 320px;  --ty: 350px; --sway: -35px; animation-delay: 6.2s; animation-duration: 13s; }
.particle:nth-child(49) { --tx: -240px; --ty: 420px; --sway: 25px;  animation-delay: 6.5s; animation-duration: 9s; }
.particle:nth-child(50) { --tx: 170px;  --ty: 400px; --sway: -20px; animation-delay: 6.8s; animation-duration: 11s; }

/* ========================================
   Water Flow Animation
   ======================================== */
@keyframes water-flow {
  0% {
    transform: translate(0, 0) scale(0);
    opacity: 0;
  }
  5% {
    transform: translate(0, 10px) scale(1);
    opacity: 0.9;
  }
  25% {
    transform: translate(calc(var(--sway) * 0.3), calc(var(--ty) * 0.25)) scale(0.9);
    opacity: 0.8;
  }
  50% {
    transform: translate(calc(var(--sway) * -0.2), calc(var(--ty) * 0.5)) scale(0.8);
    opacity: 0.6;
  }
  75% {
    transform: translate(calc(var(--sway) * 0.4), calc(var(--ty) * 0.75)) scale(0.6);
    opacity: 0.4;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0.3);
    opacity: 0;
  }
}

/* ========================================
   Footer
   ======================================== */
.footer {
  position: fixed;
  bottom: 1rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.05em;
  z-index: 50;
}

.footer p {
  margin: 0;
}

[data-theme="light"] .footer {
  color: rgba(184, 122, 125, 0.5);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .footer {
    color: rgba(184, 122, 125, 0.5);
  }
}
