@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600;1,700&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&family=Great+Vibes&display=swap');

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

:root {
  --gold: hsl(43, 60%, 45%);
  --gold-light: hsl(43, 50%, 70%);
  --gold-dark: hsl(43, 65%, 30%);
  --cream: hsl(40, 33%, 96%);
  --cream-dark: hsl(40, 25%, 90%);
  --foreground: hsl(30, 10%, 25%);
  --muted: hsl(30, 8%, 50%);
  --dusty-rose: hsl(350, 30%, 76%);
  --dusty-rose-dark: hsl(350, 35%, 60%);
  --champagne: hsl(35, 40%, 88%);
  --sage: hsl(140, 20%, 55%);
  --purple-soft: hsl(270, 25%, 70%);
}

html {
  font-size: 106%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Cormorant Garamond', serif;
  background: var(--cream);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
}

.font-script {
  font-family: 'Great Vibes', cursive;
}

/* ── Navigation ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: hsla(40, 33%, 96%, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gold-light);
  transition: transform 0.3s ease;
}

nav.hidden-nav {
  transform: translateY(-100%);
}

nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  padding: 0.75rem 1rem;
  flex-wrap: wrap;
}

/* nav 3x3 */
@media (max-width: 600px) {
  nav ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.15rem 0;
    text-align: center;
    padding: 0.6rem 0.5rem;
  }

  nav a {
    padding: 0.35rem 0.25rem;
    font-size: 0.65rem;
  }
}

nav a {
  font-family: 'Playfair Display', serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  transition: color 0.3s;
}

nav a:hover, nav a.active {
  color: var(--gold);
  font-weight: 700;
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 7rem 1rem;
  background: var(--cream);
}

.hero-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.18;
  pointer-events: none;
}

.hero-bg img {
  width: 100%;
  max-width: 56rem;
  object-fit: contain;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 40rem;
}

.hero-invite {
  font-size: 2rem;
  color: var(--gold);
}

.hero-name {
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.95;
  margin-top: 0.75rem;
}

.hero-birthday {
  font-size: clamp(3rem, 7vw, 5rem);
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

.gold-shimmer {
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.ornament-line {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2.5rem;
  justify-content: center;
}

.ornament-line::before,
.ornament-line::after {
  content: '';
  flex: 1;
  max-width: 6rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
}

/* ── Countdown ── */
.countdown {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .countdown { gap: 2.5rem; }
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-number {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
}

.countdown-label {
  font-family: 'Playfair Display', serif;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.35rem;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .details-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}

.detail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.detail-label {
  font-family: 'Playfair Display', serif;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.detail-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 600;
}

.detail-sub {
  font-size: 1rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.cta-button {
  display: inline-block;
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 1rem 2.5rem;
  border: 1px solid var(--gold-light);
  color: var(--gold-dark);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 3rem;
}

.cta-button:hover {
  background: var(--gold);
  color: var(--cream);
  border-color: var(--gold);
}

.cta-button:active {
  transform: scale(0.97);
}

/* ── Sections ── */
section {
  padding: 7rem 1rem;
}

@media (min-width: 768px) {
  section { padding: 8rem 1rem; }
}

.section-cream { background: var(--cream); }
.section-cream-dark { background: var(--cream-dark); }

.section-header {
  text-align: center;
  margin-bottom: 1rem;
}

.section-script {
  font-size: 2rem;
  color: var(--gold);
}

.section-script.rose { color: var(--dusty-rose-dark); }
.section-script.sage { color: var(--sage); }
.section-script.purple { color: var(--purple-soft); }

.section-title {
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-desc {
  color: var(--muted);
  font-size: 1.2rem;
  max-width: 32rem;
  margin: 0.75rem auto 0;
}

/* ── Floral Divider ── */
.floral-divider {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
  margin-bottom: 3rem;
}

.floral-divider img {
  width: 12rem;
  opacity: 0.8;
}

@media (min-width: 768px) {
  .floral-divider img { width: 16rem; }
}

/* ── Gallery ── */
.gallery-hint {
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 0.5rem;
}

@media (min-width: 768px) {
  .gallery-grid { gap: 1.5rem; }
}

.gallery-item {
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid var(--gold-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px hsla(30, 10%, 25%, 0.1);
}

.gallery-placeholder {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, var(--champagne) 0%, var(--cream) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-placeholder span {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold-light);
  opacity: 0.7;
}

.gallery-item {
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: hsla(0, 0%, 0%, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 85vh;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px hsla(0, 0%, 0%, 0.5);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.lightbox.active .lightbox-content img {
  animation: lightbox-zoom 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lightbox-zoom {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 2001;
  line-height: 1;
  opacity: 0.75;
  transition: opacity 0.3s, transform 0.3s;
}

.lightbox-close:hover {
  opacity: 1;
  transform: scale(1.15);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: hsla(0, 0%, 100%, 0.1);
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  z-index: 2001;
  padding: 0.75rem 1rem;
  border-radius: 50%;
  opacity: 0.7;
  transition: opacity 0.3s, background 0.3s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
  background: hsla(0, 0%, 100%, 0.2);
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-counter {
  color: hsla(0, 0%, 100%, 0.6);
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  margin-top: 1rem;
}

@media (max-width: 600px) {
  .lightbox-prev,
  .lightbox-next {
    font-size: 1.4rem;
    padding: 0.5rem 0.75rem;
  }

  .lightbox-close {
    font-size: 2rem;
    top: 0.5rem;
    right: 1rem;
  }
}

/* ── Grid ── */
.items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 72rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .items-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .items-grid { grid-template-columns: repeat(6, 1fr); }
}

.grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 1rem;
  border-radius: 4px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.35s ease,
              box-shadow 0.35s ease;
  cursor: default;
}

.grid-item:hover {
  transform: translateY(-6px);
  background: hsla(40, 33%, 96%, 0.7);
  box-shadow: 0 8px 24px hsla(30, 10%, 25%, 0.08);
}

.grid-item img {
  width: 3rem;
  height: 3.5rem;
  object-fit: contain;
  margin-bottom: 0.75rem;
  opacity: 0.7;
  transition: opacity 0.35s ease, transform 0.35s ease, filter 0.35s ease;
}

.grid-item.rose-item img,
.grid-item.gift-item img {
  width: 3.5rem;
  height: 3.5rem;
}

.grid-item.thought-item img {
  width: 3rem;
  height: 3rem;
}

.grid-item.bill-item img {
  width: 3.5rem;
  height: 3rem;
}

.grid-item:hover img {
  opacity: 1;
  transform: scale(1.15);
  filter: drop-shadow(0 2px 4px hsla(30, 10%, 25%, 0.15));
}

.grid-item:hover .grid-name {
  color: var(--gold-dark);
}

.grid-item:hover .grid-number {
  transform: scale(1.1);
}

.grid-name {
  transition: color 0.3s ease;
}

.grid-number {
  transition: transform 0.3s ease;
}

.grid-number {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.grid-number.rose { color: var(--dusty-rose-dark); }
.grid-number.sage { color: var(--sage); }
.grid-number.purple { color: var(--purple-soft); }

.grid-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
}

.grid-role {
  font-size: 0.95rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 0.25rem;
}

/* ── RSVP ── */
.rsvp-note {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 2rem;
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.8;
  font-style: italic;
}

.rsvp-embed {
  max-width: 40rem;
  margin: 0 auto;
}

.rsvp-embed iframe {
  border: none;
  border-radius: 2px;
}

.hidden { display: none; }

/* ── Thank You ── */
.thank-you {
  text-align: center;
  padding: 4rem 1rem;
}

/* ── Footer ── */
footer {
  padding: 3rem 1rem;
  text-align: center;
  background: var(--cream);
}

footer .footer-name {
  font-size: 1.75rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

footer .footer-detail {
  font-family: 'Playfair Display', serif;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  filter: blur(4px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--gold-dark);
  color: var(--cream);
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  padding: 0.75rem 2rem;
  border-radius: 2px;
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 200;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Dress Code ── */
.dresscode-grid {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: 56rem;
  margin: 0 auto 3rem;
}

.dresscode-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s ease;
}

.dresscode-swatch:hover {
  transform: translateY(-4px);
}

.swatch-color {
  width: 7rem;
  height: 7rem;
  border-radius: 4px;
  border: 1px solid hsla(30, 10%, 25%, 0.08);
  box-shadow: 0 2px 8px hsla(30, 10%, 25%, 0.06);
}

@media (min-width: 768px) {
  .swatch-color { width: 9rem; height: 9rem; }
}

.swatch-label {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
}

.swatch-hex {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.dresscode-note {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto;
  font-size: 1.2rem;
  color: var(--muted);
  line-height: 1.8;
  font-style: italic;
}