/* ============================================
   🌼 Festa delle Donne 2026 — Shared Styles
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Playfair Display', 'Georgia', serif;
  -webkit-font-smoothing: antialiased;
}

/* --- Full-screen background photo --- */
/* Per-person overrides: set --bg-pos in inline <style> (default: center center) */
.background-photo {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: var(--bg-pos, center center);
  background-repeat: no-repeat;
  filter: brightness(0.75) saturate(1.15) contrast(1.05);
  transition: filter 0.5s ease;
}

/* Gradient overlay — dark at bottom to make text readable, clear on top to show face */
.background-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 30%,
    rgba(0,0,0,0.08) 45%,
    rgba(0,0,0,0.25) 55%,
    rgba(0,0,0,0.55) 70%,
    rgba(0,0,0,0.78) 85%,
    rgba(0,0,0,0.88) 100%
  );
  pointer-events: none;
}

/* Subtle vignette for extra cinematic feel */
.background-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 50%,
    rgba(0,0,0,0.3) 100%
  );
}

/* Golden shimmer light leak on top */
.background-overlay::after {
  content: '';
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 60%;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(255,215,0,0.06) 0%,
    transparent 70%
  );
  animation: lightLeak 8s ease-in-out infinite alternate;
}

@keyframes lightLeak {
  0%   { opacity: 0.4; transform: translateX(-5%); }
  100% { opacity: 0.8; transform: translateX(5%); }
}

/* --- Animated floating mimosas --- */
.mimosa-particles {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.mimosa-particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  will-change: transform, opacity;
}

/* Mimosa ball (yellow fuzzy circle) */
.mimosa-particle__ball {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%,
    #fff5b3 0%,
    #ffe066 20%,
    #ffd633 45%,
    #f5c518 70%,
    #cc9900 100%
  );
  box-shadow:
    inset -1px -1px 3px rgba(180,130,20,0.25),
    0 0 10px rgba(255,215,0,0.5),
    0 0 25px rgba(255,215,0,0.2),
    0 0 50px rgba(255,215,0,0.08);
  position: relative;
}

/* Fuzzy highlight */
.mimosa-particle__ball::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%,
    rgba(255,255,255,0.4) 0%,
    transparent 50%
  );
}

/* Little leaf attached to some particles */
.mimosa-particle__leaf {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(-15deg);
  width: 14px;
  height: 6px;
  background: linear-gradient(135deg, #7ba33e 0%, #4a7a2e 100%);
  border-radius: 50% 50% 50% 50% / 80% 80% 20% 20%;
  opacity: 0.85;
}

/* Golden sparkle dots */
.mimosa-particle__sparkle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 6px 2px rgba(255,215,0,0.6);
  animation: sparkle 1.5s ease-in-out infinite;
}

/* Floating animation variants */
@keyframes float-1 {
  0%   { transform: translateY(110vh) translateX(0) rotate(0deg) scale(0.6); opacity: 0; }
  8%   { opacity: 0.95; transform: translateY(95vh) translateX(10px) rotate(30deg) scale(1); }
  50%  { transform: translateY(50vh) translateX(35px) rotate(180deg) scale(1.05); opacity: 0.85; }
  92%  { opacity: 0.5; }
  100% { transform: translateY(-10vh) translateX(-25px) rotate(360deg) scale(0.8); opacity: 0; }
}

@keyframes float-2 {
  0%   { transform: translateY(110vh) translateX(0) rotate(0deg) scale(0.5); opacity: 0; }
  7%   { opacity: 0.9; }
  35%  { transform: translateY(65vh) translateX(-45px) rotate(110deg) scale(1.1); }
  65%  { transform: translateY(35vh) translateX(30px) rotate(230deg) scale(0.95); opacity: 0.8; }
  100% { transform: translateY(-10vh) translateX(-15px) rotate(360deg) scale(0.7); opacity: 0; }
}

@keyframes float-3 {
  0%   { transform: translateY(110vh) translateX(0) rotate(0deg) scale(0.7); opacity: 0; }
  10%  { opacity: 0.8; }
  30%  { transform: translateY(70vh) translateX(55px) rotate(80deg) scale(1); }
  60%  { transform: translateY(40vh) translateX(-40px) rotate(200deg) scale(1.08); opacity: 0.75; }
  100% { transform: translateY(-10vh) translateX(15px) rotate(360deg) scale(0.6); opacity: 0; }
}

@keyframes float-4 {
  0%   { transform: translateY(110vh) translateX(0) rotate(0deg) scale(0.6); opacity: 0; }
  12%  { opacity: 0.92; }
  40%  { transform: translateY(60vh) translateX(-30px) rotate(140deg) scale(1.15); }
  75%  { transform: translateY(25vh) translateX(45px) rotate(270deg) scale(0.9); opacity: 0.6; }
  100% { transform: translateY(-10vh) translateX(-10px) rotate(360deg) scale(0.5); opacity: 0; }
}

@keyframes float-5 {
  0%   { transform: translateY(110vh) translateX(0) rotate(0deg) scale(0.8); opacity: 0; }
  6%   { opacity: 0.88; }
  25%  { transform: translateY(75vh) translateX(20px) rotate(60deg) scale(1.05); }
  50%  { transform: translateY(50vh) translateX(-50px) rotate(160deg) scale(1.12); opacity: 0.82; }
  80%  { transform: translateY(20vh) translateX(30px) rotate(280deg) scale(0.85); opacity: 0.55; }
  100% { transform: translateY(-10vh) translateX(5px) rotate(360deg) scale(0.6); opacity: 0; }
}

@keyframes shimmer {
  0%, 100% { filter: brightness(1) drop-shadow(0 0 8px rgba(255,215,0,0.35)); }
  50%      { filter: brightness(1.35) drop-shadow(0 0 16px rgba(255,215,0,0.65)); }
}

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50%      { opacity: 1; transform: scale(1.2); }
}

/* --- Content overlay — BOTTOM ALIGNED --- */
.content {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 2rem 3.5rem;
}

/* --- Person name — BIG, hero-style --- */
.person-name {
  color: #fff;
  font-size: clamp(3.5rem, 14vw, 8rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 0.95;
  text-shadow:
    0 2px 10px rgba(0,0,0,0.5),
    0 0 80px rgba(255,215,0,0.15),
    0 4px 40px rgba(0,0,0,0.4);
  margin-bottom: 0.6rem;
  opacity: 0;
  animation: nameReveal 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
  font-family: 'Playfair Display', 'Georgia', serif;
  font-style: italic;
  position: relative;
}

/* Golden underline glow under name */
.person-name::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 10%;
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,215,0,0.5) 15%,
    rgba(255,215,0,0.8) 50%,
    rgba(255,215,0,0.5) 85%,
    transparent 100%
  );
  opacity: 0;
  animation: fadeIn 1s ease-out 1.8s forwards;
  box-shadow: 0 0 15px rgba(255,215,0,0.3);
}

/* --- Main greeting text --- */
.greeting {
  color: rgba(255,255,255,0.9);
  font-size: clamp(0.85rem, 2.5vw, 1.3rem);
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 2px 15px rgba(0,0,0,0.6);
  margin-bottom: 0.6rem;
  opacity: 0;
  animation: fadeInUp 1.2s ease-out 1.5s forwards;
  font-family: 'Cormorant Garamond', 'Playfair Display', serif;
}

/* --- Decorative divider --- */
.divider {
  width: clamp(50px, 18vw, 140px);
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,215,0,0.6) 20%,
    rgba(255,215,0,0.9) 50%,
    rgba(255,215,0,0.6) 80%,
    transparent 100%
  );
  margin: 0.5rem auto;
  opacity: 0;
  animation: fadeIn 1s ease-out 2s forwards;
  position: relative;
  box-shadow: 0 0 10px rgba(255,215,0,0.2);
}

.divider::before {
  content: '✿';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffd700;
  font-size: 0.9rem;
  text-shadow: 0 0 12px rgba(255,215,0,0.5);
}

/* --- Subtitle --- */
.subtitle {
  color: rgba(255,255,255,0.7);
  font-size: clamp(0.75rem, 1.8vw, 1rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
  opacity: 0;
  animation: fadeInUp 1.2s ease-out 2.2s forwards;
  font-family: 'Cormorant Garamond', serif;
  text-transform: uppercase;
}

/* --- Subtle light sweep across name --- */
.person-name {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.45) 0%,
    rgba(255,255,255,0.45) 30%,
    rgba(255,255,255,1) 45%,
    rgba(255,255,255,1) 55%,
    rgba(255,255,255,0.45) 70%,
    rgba(255,255,255,0.45) 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation:
    nameReveal 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards,
    textShimmer 8s linear 3s infinite;
}

@keyframes textShimmer {
  0%   { background-position: 200% 50%; }
  100% { background-position: -100% 50%; }
}

/* Soft glow pulse behind name */
.person-name::before {
  content: attr(data-name);
  position: absolute;
  inset: 0;
  z-index: -1;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow:
    0 0 40px rgba(255,255,255,0.25),
    0 0 80px rgba(255,255,255,0.12),
    0 0 120px rgba(255,255,255,0.06);
  animation: glowPulse 4s ease-in-out 2s infinite;
  filter: blur(3px);
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 0.9; }
}

/* Greeting soft breathing light */
.greeting {
  animation:
    fadeInUp 1.2s ease-out 1.5s forwards,
    greetingGlow 4s ease-in-out 3s infinite;
}

@keyframes greetingGlow {
  0%, 100% {
    text-shadow: 0 2px 15px rgba(0,0,0,0.6), 0 0 20px rgba(255,215,0,0);
    letter-spacing: 0.18em;
  }
  50% {
    text-shadow: 0 2px 15px rgba(0,0,0,0.6), 0 0 30px rgba(255,215,0,0.15);
    letter-spacing: 0.22em;
  }
}

/* Divider golden pulse */
.divider {
  animation:
    fadeIn 1s ease-out 2s forwards,
    dividerPulse 3s ease-in-out 2.8s infinite;
}

@keyframes dividerPulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(255,215,0,0.2);
    width: clamp(50px, 18vw, 140px);
  }
  50% {
    box-shadow: 0 0 25px rgba(255,215,0,0.45), 0 0 50px rgba(255,215,0,0.15);
    width: clamp(60px, 22vw, 170px);
  }
}

/* --- Lens flare light rays --- */
.content::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(
    circle,
    rgba(255,215,0,0.12) 0%,
    rgba(255,215,0,0.04) 40%,
    transparent 70%
  );
  pointer-events: none;
  animation: lensFlare 5s ease-in-out 2s infinite alternate;
}

@keyframes lensFlare {
  0%   { opacity: 0.3; transform: translateX(-50%) scale(0.8); }
  50%  { opacity: 0.7; transform: translateX(-50%) scale(1.3); }
  100% { opacity: 0.4; transform: translateX(-50%) scale(1); }
}

/* Ambient side light streaks */
.content::after {
  content: '';
  position: absolute;
  bottom: 20%;
  right: -10%;
  width: 1px;
  height: 80px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255,215,0,0.3),
    transparent
  );
  transform: rotate(-20deg);
  animation: lightStreak 6s ease-in-out 3s infinite alternate;
  pointer-events: none;
}

@keyframes lightStreak {
  0%, 100% { opacity: 0; height: 80px; }
  50%      { opacity: 0.6; height: 120px; }
}

/* --- Mimosa frame corners --- */
.mimosa-corner {
  position: absolute;
  width: clamp(100px, 18vw, 200px);
  height: clamp(100px, 18vw, 200px);
}

.mimosa-corner svg, .mimosa-corner img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 15px rgba(255,215,0,0.15));
}

.mimosa-corner--tl { top: 0; left: 0; }
.mimosa-corner--tr { top: 0; right: 0; transform: scaleX(-1); }
.mimosa-corner--bl { bottom: 0; left: 0; transform: scaleY(-1); opacity: 0.4; }
.mimosa-corner--br { bottom: 0; right: 0; transform: scale(-1); opacity: 0.4; }

/* --- Animations --- */
@keyframes nameReveal {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.92);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .content {
    padding: 0 1.5rem 2.5rem;
  }

  .person-name {
    font-size: clamp(2.8rem, 16vw, 5rem);
  }

  .greeting {
    font-size: clamp(0.7rem, 3.5vw, 1rem);
    letter-spacing: 0.12em;
  }

  .mimosa-corner {
    width: clamp(70px, 25vw, 120px);
    height: clamp(70px, 25vw, 120px);
  }

  .mimosa-corner--bl,
  .mimosa-corner--br {
    display: none;
  }
}

@media (max-width: 360px) {
  .person-name {
    font-size: 2.5rem;
  }
}

@media (min-width: 1200px) {
  .background-photo {
    filter: brightness(0.7) saturate(1.2) contrast(1.05);
  }

  .person-name {
    font-size: 7rem;
  }
}

/* Landscape phone */
@media (max-height: 500px) and (orientation: landscape) {
  .content {
    padding: 0 2rem 1.5rem;
  }

  .person-name {
    font-size: 2.8rem;
    margin-bottom: 0.3rem;
  }

  .greeting {
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
  }

  .divider {
    margin: 0.2rem auto;
  }

  .subtitle {
    font-size: 0.7rem;
  }

  .mimosa-corner {
    width: 70px;
    height: 70px;
  }

  .mimosa-corner--bl,
  .mimosa-corner--br {
    display: none;
  }
}
