:root {
  --bg-900: #060913;
  --bg-800: #0b1120;
  --bg-700: #111a2f;
  --surface: rgba(255, 255, 255, 0.1);
  --surface-border: rgba(255, 255, 255, 0.26);
  --text-100: #ecf1ff;
  --text-200: #cdd8f7;
  --accent: #b7d3ff;
  --accent-strong: #d9e8ff;
  --focus: #f7f8ff;
  --shadow: 0 18px 45px rgba(2, 7, 20, 0.45);
  --radius-lg: 1.3rem;
  --radius-md: 0.95rem;
  --shell: min(1120px, 92vw);
  --h1: clamp(2rem, 5.3vw, 4rem);
  --h2: clamp(1.45rem, 3.1vw, 2.3rem);
  --body: clamp(0.98rem, 1.6vw, 1.07rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--body);
  line-height: 1.6;
  color: var(--text-100);
  background:
    radial-gradient(65rem 42rem at 85% -15%, rgba(145, 188, 255, 0.14) 0%, transparent 60%),
    radial-gradient(58rem 36rem at 12% -8%, rgba(103, 147, 226, 0.17) 0%, transparent 56%),
    linear-gradient(180deg, var(--bg-900) 0%, #080e1d 45%, #050910 100%);
  overflow-x: clip;
}

h1,
h2,
h3,
.brand,
.signature,
.eyebrow,
.date-pill {
  font-family: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  letter-spacing: 0.01em;
}

a {
  color: inherit;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.section {
  padding: clamp(3.4rem, 8vw, 6rem) 0;
}

.skip-link {
  position: absolute;
  left: 0.8rem;
  top: -4rem;
  z-index: 1000;
  background: #fff;
  color: #000;
  padding: 0.6rem 0.85rem;
  border-radius: 0.45rem;
}

.skip-link:focus-visible {
  top: 0.8rem;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px) saturate(120%);
  background: rgba(7, 12, 25, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.nav {
  min-height: 3.7rem;
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 0.7rem;
  padding-block: 0.55rem;
}

.brand {
  font-size: clamp(1.3rem, 2.6vw, 1.65rem);
  font-weight: 700;
  text-decoration: none;
}

.nav-toggle {
  justify-self: end;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text-100);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font: inherit;
}

.nav-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  list-style: none;
  margin: 0;
  padding: 0.9rem 1.1rem 1rem;
  background: rgba(8, 15, 30, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  gap: 0.55rem;
}

.nav-list.is-open {
  display: grid;
}

.nav-list a {
  text-decoration: none;
  color: var(--text-200);
  font-weight: 500;
}

.nav-list a:hover {
  color: var(--accent-strong);
}

.language-toggle {
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: 0.42rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 0.2rem 0.34rem;
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--text-200);
  padding: 0.24rem 0.54rem;
  border-radius: 999px;
  font-size: 0.9rem;
}

.lang-btn.is-active {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text-100);
}

.lang-divider {
  opacity: 0.6;
  font-size: 0.9rem;
}

.hero {
  padding-top: clamp(3rem, 6vw, 5rem);
  position: relative;
  isolation: isolate;
  overflow: clip;
}

.moonlight {
  position: absolute;
  width: min(70vw, 56rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(228, 241, 255, 0.24) 0%, rgba(172, 205, 255, 0.1) 36%, transparent 70%);
  top: -35%;
  right: -18%;
  z-index: -2;
  animation: moonPulse 8s ease-in-out infinite;
}

.wind-layer,
.cloud-layer {
  position: absolute;
  inset-inline: 0;
  pointer-events: none;
}

.wind-layer {
  top: 6%;
  height: 16rem;
  z-index: -1;
}

.wind-layer path {
  fill: none;
  stroke: rgba(213, 232, 255, 0.26);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-dasharray: 18 16;
  animation: windDrift 16s linear infinite;
}

.wind-layer path:nth-child(2) {
  animation-duration: 22s;
  animation-direction: reverse;
  opacity: 0.65;
}

.cloud-layer {
  top: 0;
  height: 22rem;
  z-index: -1;
}

.cloud-layer ellipse {
  fill: rgba(228, 240, 255, 0.12);
  filter: blur(6px);
}

.cloud-layer g {
  animation: cloudDrift 30s linear infinite;
}

.particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.particles span {
  --size: 0.2rem;
  position: absolute;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: rgba(228, 236, 255, 0.8);
  box-shadow: 0 0 10px rgba(207, 224, 255, 0.66);
  animation: particleFloat 13s linear infinite;
}

.particles span:nth-child(1) { left: 12%; top: 65%; animation-duration: 10s; }
.particles span:nth-child(2) { left: 27%; top: 34%; animation-duration: 14s; animation-delay: -2s; }
.particles span:nth-child(3) { left: 44%; top: 58%; animation-duration: 17s; animation-delay: -4s; }
.particles span:nth-child(4) { left: 66%; top: 27%; animation-duration: 12s; animation-delay: -1s; }
.particles span:nth-child(5) { left: 81%; top: 60%; animation-duration: 15s; animation-delay: -5s; }
.particles span:nth-child(6) { left: 91%; top: 42%; animation-duration: 18s; animation-delay: -2s; }

.hero-shell {
  display: grid;
  gap: 1.1rem;
  align-items: center;
}

.hero-visual {
  margin: 0;
  position: relative;
  justify-self: center;
  width: min(28rem, 90vw);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 2% 10% -3%;
  border-radius: 3rem;
  background: radial-gradient(circle at 50% 24%, rgba(195, 225, 255, 0.24), transparent 68%);
  filter: blur(22px);
  z-index: -1;
}

.hero-visual img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.17);
  box-shadow: var(--shadow);
}

.glass {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(12px) saturate(125%);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
}

.invite-card {
  padding: clamp(1.3rem, 3.2vw, 2.3rem);
}

.eyebrow {
  margin: 0 0 0.25rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: 0.95;
}

h1 {
  margin: 0;
  font-size: var(--h1);
  line-height: 0.98;
  text-wrap: balance;
}

.name-meanings {
  margin: 0.68rem 0 0;
  color: var(--text-200);
}

.lead {
  margin: 0.8rem 0 1rem;
  color: #f1f6ff;
}

.date-pill {
  margin: 0;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.38rem 0.88rem;
  font-size: clamp(1.06rem, 2.3vw, 1.34rem);
}

.cta-row {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  --btn-border: rgba(255, 255, 255, 0.24);
  border: 1px solid var(--btn-border);
  border-radius: 0.86rem;
  padding: 0.62rem 1rem;
  color: var(--text-100);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 160ms ease, background-color 160ms ease;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-125%);
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.22), transparent 75%);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:hover::before {
  animation: sheen 1.4s ease;
}

.btn-primary {
  background: linear-gradient(140deg, rgba(197, 220, 255, 0.35), rgba(176, 200, 241, 0.16));
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.11);
}

.btn-ghost {
  background: transparent;
}

.btn-large {
  padding-inline: 1.25rem;
  min-width: 13.2rem;
}

.action-status {
  margin: 0.65rem 0 0;
  min-height: 1.35em;
  color: var(--accent);
}

h2 {
  margin: 0;
  font-size: var(--h2);
  line-height: 1.1;
}

.divider {
  width: min(15.5rem, 72%);
  height: 1px;
  margin: 0.6rem 0 1.2rem;
  background: linear-gradient(90deg, transparent, rgba(208, 224, 255, 0.88), transparent);
  position: relative;
}

.divider::after {
  content: "✦";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -53%);
  font-size: 0.7rem;
  color: rgba(224, 235, 255, 0.92);
}

.timeline {
  display: grid;
  gap: 0.95rem;
}

.timeline-card,
.venue-card,
.family-card,
.rsvp-card {
  padding: 1rem;
  transition: transform 180ms ease;
}

.timeline-card:hover,
.venue-card:hover,
.family-card:hover,
.rsvp-card:hover {
  transform: translateY(-3px);
}

.timeline-card h3,
.family-card h3 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.28rem, 2.7vw, 1.6rem);
}

.timeline-card p,
.family-card p,
.venue-card p,
.rsvp-card p {
  margin: 0.15rem 0;
  color: var(--text-200);
}

.venue-name {
  font-weight: 700;
  color: var(--text-100);
  margin-bottom: 0.35rem;
}

address {
  font-style: normal;
  color: var(--text-200);
  margin-bottom: 0.8rem;
}

.family-grid {
  display: grid;
  gap: 0.95rem;
}

.site-footer {
  text-align: center;
  padding-top: 2rem;
  padding-bottom: 7rem;
}

.site-footer p {
  margin: 0.2rem 0;
}

.signature {
  font-size: clamp(1.55rem, 3.3vw, 2.1rem);
}

.foot-note {
  color: var(--text-200);
}

.music-panel {
  position: fixed;
  right: 0.95rem;
  bottom: 0.95rem;
  z-index: 60;
  display: grid;
  grid-template-columns: auto auto minmax(4.4rem, 7.8rem);
  align-items: center;
  gap: 0.45rem;
  padding: 0.52rem;
  border-radius: 1rem;
}

.icon-btn {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-100);
  border-radius: 0.72rem;
  padding: 0.46rem 0.58rem;
  font: inherit;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.eq {
  width: 1rem;
  height: 0.95rem;
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
}

.eq span {
  width: 2px;
  border-radius: 999px;
  background: var(--accent-strong);
  animation: equalize 1.15s ease-in-out infinite;
  animation-play-state: paused;
}

.eq span:nth-child(1) { height: 38%; animation-delay: -0.2s; }
.eq span:nth-child(2) { height: 72%; animation-delay: -0.6s; }
.eq span:nth-child(3) { height: 52%; animation-delay: -0.12s; }
.eq span:nth-child(4) { height: 86%; animation-delay: -0.42s; }

.music-panel.is-playing .eq span {
  animation-play-state: running;
}

.volume-wrap {
  display: grid;
}

#volumeRange {
  width: 100%;
  accent-color: var(--accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes moonPulse {
  0%,
  100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 0.64; transform: scale(1.04); }
}

@keyframes windDrift {
  0% { transform: translateX(0); }
  100% { transform: translateX(80px); }
}

@keyframes cloudDrift {
  0% { transform: translateX(-40px); }
  100% { transform: translateX(70px); }
}

@keyframes particleFloat {
  0% { transform: translate3d(0, 0, 0); opacity: 0.3; }
  35% { opacity: 0.9; }
  100% { transform: translate3d(-60px, -30px, 0); opacity: 0; }
}

@keyframes equalize {
  0%,
  100% { transform: scaleY(0.42); }
  50% { transform: scaleY(1.02); }
}

@keyframes sheen {
  to { transform: translateX(130%); }
}

@media (min-width: 860px) {
  .nav {
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
  }

  .nav-toggle {
    display: none;
  }

  .nav-list {
    position: static;
    display: flex;
    background: transparent;
    border: 0;
    padding: 0;
    gap: 1rem;
    justify-self: start;
  }

  .hero-shell {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.2rem;
  }

  .invite-card {
    margin-left: -2rem;
    position: relative;
    z-index: 2;
  }

  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .family-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

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

  .music-panel .eq span {
    animation: none !important;
  }
}