/* ============================================
   Becca & Shawn — Wedding Website
   Global styles
   ============================================ */

:root {
  --midnight: #14191f;
  --midnight-soft: #1c232b;
  --champagne: #e8d5a3;
  --champagne-bright: #f5e6bf;
  --gold: #c9a84c;
  --cream: #f7f2e7;
  --muted: #9aa3ad;
}

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

html, body { height: 100%; }

body {
  background: radial-gradient(ellipse 120% 90% at 50% 110%, #2a3340 0%, var(--midnight-soft) 45%, var(--midnight) 100%);
  color: var(--cream);
  font-family: "Cormorant Garamond", serif;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

/* grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main {
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 42rem;
  position: relative;
  z-index: 1;
}

.names {
  font-family: "Pinyon Script", cursive;
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 400;
  color: var(--champagne-bright);
  line-height: 1.1;
  margin: 0.5rem 0 0.25rem;
  text-shadow: 0 0 40px rgba(232, 213, 163, 0.25);
  animation: rise 1.6s 0s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.glasses {
  width: min(320px, 70vw);
  margin: 1.25rem auto 1rem;
  display: block;
  animation: rise 1.6s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

h1 {
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  animation: rise 1.6s 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

/* glasses gently sway toward each other (base tilt is baked into the SVG) */
.glass-left, .glass-right {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.glass-left  { animation: clink-l 5s ease-in-out 1.8s infinite; }
.glass-right { animation: clink-r 5s ease-in-out 1.8s infinite; }
@keyframes clink-l {
  0%, 100% { transform: rotate(0deg); }
  50%      { transform: rotate(2deg); }
}
@keyframes clink-r {
  0%, 100% { transform: rotate(0deg); }
  50%      { transform: rotate(-2deg); }
}

.sparkle {
  animation: sparkle 2.4s ease-in-out 2s infinite;
  transform-origin: center;
}
@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  50%      { opacity: 1; transform: scale(1); }
}

/* bubbles inside the SVG */
.bubble { animation: bubble-up 4s linear infinite; }
.bubble:nth-of-type(2) { animation-delay: 1.1s; }
.bubble:nth-of-type(3) { animation-delay: 2.3s; }
.bubble:nth-of-type(4) { animation-delay: 0.6s; }
.bubble:nth-of-type(5) { animation-delay: 1.8s; }
.bubble:nth-of-type(6) { animation-delay: 3s; }
@keyframes bubble-up {
  0%   { transform: translateY(0); opacity: 0; }
  15%  { opacity: 0.9; }
  85%  { opacity: 0.6; }
  100% { transform: translateY(-46px); opacity: 0; }
}

/* ambient floating bubbles in the background */
.ambient {
  position: fixed;
  bottom: -20px;
  border-radius: 50%;
  border: 1px solid rgba(232, 213, 163, 0.35);
  background: radial-gradient(circle at 35% 30%, rgba(245, 230, 191, 0.25), transparent 60%);
  animation: float-up linear infinite;
  pointer-events: none;
}
@keyframes float-up {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(-110vh) translateX(30px); opacity: 0; }
}
