/* ============================================================
   WEDDING INVITATION — Premium CSS
   Aesthetic: Romantic Luxury · Serif + Jost · Warm Cream Palette
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --cream: #faf6f0;
  --gold: #c8a97e;
  --gold-dk: #a07850;
  --rose: #c9a0a8;
  --charcoal: #3a3330;
  --muted: #8c7b72;
  --white: #ffffff;
  --border: rgba(200, 169, 126, 0.25);
  --shadow: 0 8px 40px rgba(58, 51, 48, 0.08);

  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Jost", sans-serif;

  --radius: 16px;
  --section-pad: 100px 24px;
  --max-w: 900px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.7;
}
img {
  max-width: 100%;
  display: block;
}
a {
  text-decoration: none;
  color: inherit;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ---------- Cover ---------- */
.cover {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 60px 24px;
}

.cover__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 120% 80% at 30% 50%,
      rgba(212, 184, 150, 0.3) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 80% 120% at 70% 30%,
      rgba(201, 160, 168, 0.25) 0%,
      transparent 60%
    ),
    linear-gradient(160deg, #2d2420 0%, #3e2e28 40%, #4a3830 100%);
  background-size: cover;
}

/* Decorative circles */
.cover__bg::before,
.cover__bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(200, 169, 126, 0.2);
}
.cover__bg::before {
  width: 500px;
  height: 500px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.cover__bg::after {
  width: 700px;
  height: 700px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.cover__overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 14, 12, 0.35);
}

.cover__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 0 24px;
}

.cover__label {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 0.85rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.cover__names {
  font-family: var(--font-serif);
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}
.cover__names span {
  font-style: italic;
  font-size: 0.6em;
  color: var(--gold);
  display: block;
  margin: 8px 0;
}

.cover__date {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 40px;
}

.cover__guest {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 40px;
  line-height: 1.8;
}
.cover__guest strong {
  color: rgba(255, 255, 255, 0.85);
}

.cover__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  border: 1px solid rgba(200, 169, 126, 0.5);
  padding: 14px 32px;
  border-radius: 40px;
  transition: all 0.3s ease;
  background: rgba(200, 169, 126, 0.1);
  backdrop-filter: blur(8px);
}
.cover__btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  transform: translateY(-2px);
}
.cover__btn svg {
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

/* Music Button */
.music-btn {
  position: fixed;
  bottom: 28px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 10px 14px;
  border-radius: 40px;
  background: rgba(58, 51, 48, 0.75);
  backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition:
    background 0.3s,
    color 0.3s,
    transform 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.music-btn:hover {
  transform: translateY(-2px);
  background: rgba(58, 51, 48, 0.9);
}
.music-btn .music-icon {
  font-size: 16px;
  line-height: 1;
  transition: transform 0.3s;
}
.music-btn .music-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ON state */
.music-btn.playing {
  background: rgba(200, 169, 126, 0.85);
  color: white;
  border-color: rgba(200, 169, 126, 0.4);
}
.music-btn.playing .music-icon {
  animation: musicPulse 1.2s ease infinite;
}
@keyframes musicPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.25);
  }
}

/* ---------- Reveal Animations ---------- */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  animation: revealUp 0.9s ease forwards;
}
.delay-1 {
  animation-delay: 0.15s;
}
.delay-2 {
  animation-delay: 0.3s;
}
.delay-3 {
  animation-delay: 0.45s;
}
.delay-4 {
  animation-delay: 0.6s;
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Hidden / Main ---------- */
.hidden {
  display: none !important;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 240, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
}
.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.nav__link {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 16px;
  border-radius: 20px;
  transition: all 0.25s;
}
.nav__link:hover {
  color: var(--charcoal);
  background: rgba(200, 169, 126, 0.12);
}

/* ---------- Section Base ---------- */
.section {
  padding: var(--section-pad);
}
.section__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
}
.section__tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.section__title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 300;
  color: var(--charcoal);
  line-height: 1.2;
  margin-bottom: 20px;
}
.section__sub {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto 60px;
  line-height: 1.8;
}

/* ---------- Couple ---------- */
.couple {
  background: var(--cream);
}

.couple__cards {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: center;
  margin-top: 20px;
}

.couple__card {
  padding: 40px 24px;
}

.couple__photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin: 0 auto 24px;
  padding: 4px;
  background: linear-gradient(135deg, var(--gold), var(--rose));
}
.couple__photo-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.couple__initial {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 300;
  color: white;
  font-style: italic;
}

.couple__name {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 6px;
}
.couple__role {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.couple__parents {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.social-link {
  font-size: 0.8rem;
  color: var(--gold);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.2s;
}
.social-link:hover {
  color: var(--gold-dk);
}

.couple__divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 40px;
}
.divider__line {
  flex: 1;
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--gold), transparent);
}
.divider__heart {
  font-size: 1.5rem;
  color: var(--gold);
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

/* ---------- Event ---------- */
.event {
  background: #f5ede3;
}

.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}
.countdown__item {
  text-align: center;
}
.countdown__num {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 300;
  color: var(--charcoal);
  line-height: 1;
  min-width: 80px;
}
.countdown__label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.countdown__sep {
  font-size: 2rem;
  color: var(--gold);
  align-self: flex-start;
  padding-top: 10px;
}

.event__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 60px;
}
.event__card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
}
.event__card:hover {
  transform: translateY(-4px);
}

.event__icon {
  font-size: 2rem;
  margin-bottom: 16px;
}
.event__name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--charcoal);
  margin-bottom: 16px;
}
.event__detail {
  margin-bottom: 16px;
  color: var(--charcoal);
  font-size: 0.95rem;
}
.event__place {
  color: var(--muted);
  font-size: 0.9rem;
}
.event__place p:first-child {
  color: var(--charcoal);
  font-weight: 500;
}
.event__address {
  font-size: 0.85rem;
  margin-top: 4px;
}

/* Map */
.map-wrap {
  text-align: center;
}
.map__title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--charcoal);
  margin-bottom: 20px;
}
.map__embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 13px 28px;
  border-radius: 40px;
  transition: all 0.3s ease;
  font-weight: 500;
}
.btn--primary {
  background: var(--gold);
  color: var(--white);
  border: 1px solid var(--gold);
}
.btn--primary:hover {
  background: var(--gold-dk);
  border-color: var(--gold-dk);
  transform: translateY(-2px);
}
.btn--outline {
  background: transparent;
  color: var(--gold-dk);
  border: 1px solid var(--gold);
}
.btn--outline:hover {
  background: var(--gold);
  color: white;
  transform: translateY(-2px);
}
.btn--wa {
  background: #25d366;
  color: white;
  border: none;
  padding: 14px 30px;
  border-radius: 40px;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  transition: all 0.3s;
}
.btn--wa:hover {
  background: #1eaf57;
  transform: translateY(-2px);
}

/* ---------- Story / Timeline ---------- */
.story {
  background: var(--cream);
}

.timeline {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  text-align: left;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--gold), transparent);
}
.timeline__item {
  display: flex;
  gap: 32px;
  margin-bottom: 48px;
  position: relative;
}
.timeline__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--gold);
  flex-shrink: 0;
  margin-top: 6px;
  position: relative;
  left: 15px;
  z-index: 1;
}
.timeline__dot.active {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(200, 169, 126, 0.25);
}
.timeline__content {
  padding-left: 8px;
}
.timeline__year {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}
.timeline__title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--charcoal);
  margin-bottom: 10px;
}
.timeline__text {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.8;
}
.timeline__content.highlight {
  background: linear-gradient(
    135deg,
    rgba(200, 169, 126, 0.1),
    rgba(201, 160, 168, 0.1)
  );
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

/* ---------- Gallery ---------- */
.gallery-section {
  background: #f5ede3;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.gallery__item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/5;
}
.gallery__img {
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease;
}
.gallery__overlay {
  position: absolute;
  inset: 0;
  background: rgba(58, 51, 48, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}
.gallery__overlay span {
  color: white;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.3s;
}
.gallery__item:hover .gallery__img {
  transform: scale(1.05);
}
.gallery__item:hover .gallery__overlay {
  background: rgba(58, 51, 48, 0.45);
}
.gallery__item:hover .gallery__overlay span {
  opacity: 1;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 14, 12, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.lightbox.open {
  display: flex;
}
.lightbox__content {
  max-width: 600px;
  width: 90%;
}
.lightbox__img {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  max-height: 70vh;
}
.lightbox__caption {
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  font-size: 0.85rem;
  margin-top: 16px;
}
.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: white;
  font-size: 1.5rem;
  padding: 8px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.lightbox__close:hover {
  opacity: 1;
}
.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 3rem;
  padding: 16px;
  opacity: 0.5;
  transition: opacity 0.2s;
  font-weight: 300;
}
.lightbox__prev {
  left: 12px;
}
.lightbox__next {
  right: 12px;
}
.lightbox__prev:hover,
.lightbox__next:hover {
  opacity: 1;
}

/* ---------- RSVP ---------- */
.rsvp-section {
  background: var(--cream);
}

.rsvp-form {
  max-width: 520px;
  margin: 0 auto;
  text-align: left;
}
.form__group {
  margin-bottom: 24px;
}
.form__label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.form__input,
.form__select,
.form__textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--charcoal);
  transition:
    border-color 0.25s,
    box-shadow 0.25s;
  outline: none;
  -webkit-appearance: none;
}
.form__input:focus,
.form__select:focus,
.form__textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 169, 126, 0.15);
}
.form__input.error,
.form__select.error {
  border-color: #e07070;
}
.form__textarea {
  resize: vertical;
}
.form__error {
  display: block;
  font-size: 0.78rem;
  color: #c05050;
  margin-top: 6px;
  min-height: 18px;
}
.form__submit {
  width: 100%;
  justify-content: center;
  font-size: 0.85rem;
  padding: 16px;
}
.form__success {
  display: none;
  margin-top: 20px;
  padding: 16px 24px;
  background: rgba(100, 180, 120, 0.1);
  border: 1px solid rgba(100, 180, 120, 0.3);
  border-radius: 10px;
  color: #3a7050;
  font-size: 0.9rem;
  text-align: center;
}

/* ---------- Wishes ---------- */
.wishes-section {
  background: #f5ede3;
}
.wishes__list {
  max-width: 560px;
  margin: 0 auto;
}
.wish__item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border);
  text-align: left;
}
.wish__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--rose));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  flex-shrink: 0;
}
.wish__body strong {
  font-size: 0.9rem;
  color: var(--charcoal);
  display: block;
  margin-bottom: 6px;
}
.wish__body p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.7);
  padding: 80px 24px;
  text-align: center;
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.footer__names {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 300;
  color: var(--gold);
  margin-bottom: 12px;
}
.footer__date {
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 40px;
  color: rgba(255, 255, 255, 0.4);
}
.footer__quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.9;
  max-width: 500px;
  margin: 0 auto 40px;
  color: rgba(255, 255, 255, 0.55);
}
.footer__copy {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 32px;
  letter-spacing: 0.1em;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  :root {
    --section-pad: 70px 20px;
  }

  .couple__cards {
    grid-template-columns: 1fr;
  }
  .couple__divider {
    flex-direction: row;
    padding: 0 20px;
  }
  .divider__line {
    width: 60px;
    height: 1px;
  }

  .event__cards {
    grid-template-columns: 1fr;
  }
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .countdown__num {
    min-width: 60px;
    font-size: 2.5rem;
  }

  .timeline::before {
    left: 16px;
  }
  .timeline__dot {
    left: 11px;
  }
  .timeline__item {
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav__inner {
    gap: 4px;
  }
  .nav__link {
    padding: 6px 10px;
    font-size: 0.7rem;
  }
}
