:root {
  --bg: #050505;
  --bg-soft: #0c0a08;
  --gold: #d4af37;
  --gold-light: #f4e4b0;
  --gold-deep: #8b6914;
  --maroon: #3b1a1c;
  --maroon-deep: #1a0c0e;
  --cream: #f5e6c8;
  --text: #efe6d4;
  --muted: #b8a88a;
  --line: rgba(212, 175, 55, 0.35);
  --font-script: "Great Vibes", cursive;
  --font-serif: "Cormorant Garamond", "Times New Roman", serif;
  --font-display: "Cinzel", serif;
  --font-ui: "Plus Jakarta Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ui);
  background: #000;
  color: var(--text);
  overflow: hidden;
}

body.is-open {
  overflow: auto;
}

img,
video {
  max-width: 100%;
  display: block;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

a {
  color: inherit;
}

.app {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(80, 40, 20, 0.35), transparent 55%),
    var(--bg);
  overflow-x: clip;
}

@media (min-width: 780px) {
  body {
    background: #030303;
  }

  .app {
    width: 430px;
    margin: 0 auto;
    box-shadow:
      0 0 0 1px rgba(212, 175, 55, 0.12),
      0 30px 80px rgba(0, 0, 0, 0.65);
  }
}

/* ===== Cover ===== */
.cover {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 20px 28px;
  background:
    radial-gradient(circle at 50% 28%, rgba(90, 50, 20, 0.28), transparent 42%),
    linear-gradient(180deg, #070605 0%, #050505 55%, #0a0706 100%);
  overflow: hidden;
  transition: transform 1s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.8s ease;
}

.cover.is-away {
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
}

@media (min-width: 780px) {
  .cover {
    position: absolute;
    inset: 0;
    width: 100%;
    left: 0;
    transform: none;
  }

  .cover.is-away {
    transform: translateY(-110%);
  }
}

.cover-glow {
  position: absolute;
  width: 280px;
  height: 280px;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(212, 175, 55, 0.16), transparent 68%);
  pointer-events: none;
}

.ornament-top,
.ornament-bottom {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, 380px);
  pointer-events: none;
  opacity: 0.95;
}

.ornament-top {
  top: -8px;
}

.ornament-bottom {
  bottom: -20px;
}

.cover-head {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-top: 8px;
}

.cover-kicker {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold-light);
  opacity: 0.9;
}

.photo-wreath {
  position: relative;
  width: min(72vw, 280px);
  aspect-ratio: 1;
  margin: 8px auto 6px;
  z-index: 2;
}

.photo-wreath svg.wreath {
  position: absolute;
  inset: -6%;
  width: 112%;
  height: 112%;
  pointer-events: none;
}

.photo-circle {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(244, 228, 176, 0.7);
  box-shadow:
    0 0 0 6px rgba(12, 8, 4, 0.85),
    0 16px 40px rgba(0, 0, 0, 0.55);
}

.photo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: saturate(0.92) contrast(1.08) brightness(0.92);
}

.cover-names {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: 2px;
}

.cover-names h1 {
  font-family: var(--font-script);
  font-size: clamp(44px, 12vw, 58px);
  font-weight: 400;
  line-height: 0.9;
  color: var(--cream);
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.cover-names .amp {
  display: block;
  font-size: 0.55em;
  color: var(--gold);
  margin: -4px 0;
}

.cover-date {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--gold-light);
  letter-spacing: 0.04em;
}

.btn-open {
  position: relative;
  z-index: 3;
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, #efd171 0%, #c9a227 100%);
  color: #1a1206;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 12px 26px;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(201, 162, 39, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-open:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(201, 162, 39, 0.45);
}

.cover-guest {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: 16px;
}

.cover-guest span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.cover-guest strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--cream);
}

.wayang-row {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 1;
  padding: 0 2px;
}

.wayang-row svg {
  width: 118px;
  height: auto;
  opacity: 0.92;
}

.wayang-row .wayang-right {
  transform: scaleX(-1);
}

/* ===== Main invitation ===== */
.invitation {
  display: none;
  padding-bottom: 88px;
}

body.is-open .invitation {
  display: block;
}

.section {
  position: relative;
  padding: 56px 22px 24px;
  overflow: hidden;
  scroll-margin-top: 12px;
}

.section-kicker {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
}

.section-title {
  font-family: var(--font-script);
  font-size: 42px;
  text-align: center;
  color: var(--cream);
  line-height: 1;
  margin: 6px 0 18px;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 22px;
  color: var(--gold);
}

.divider::before,
.divider::after {
  content: "";
  width: 54px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.gold-line {
  width: 70px;
  height: 1px;
  margin: 16px auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  animation: none;
}

.reveal.in {
  animation: rise 0.9s ease forwards;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 48px;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.2), rgba(5, 5, 5, 0.88) 70%, #050505),
    url("../images/cover.jpg") center 42% / cover no-repeat;
}

.hero-inner {
  padding: 0 22px;
}

.bismillah {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--gold-light);
  margin-bottom: 12px;
}

.hero p.lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.7;
  color: var(--cream);
  max-width: 34ch;
  margin: 0 auto;
}

.hero h2 {
  font-family: var(--font-script);
  font-size: 56px;
  line-height: 0.9;
  margin: 18px 0 8px;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: min(100%, 340px);
  margin: 28px auto 0;
}

.count-box {
  background: linear-gradient(180deg, rgba(30, 20, 10, 0.85), rgba(10, 8, 6, 0.9));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 4px 10px;
}

.count-box strong {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--gold-light);
}

.count-box span {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Couple */
.couple-card {
  text-align: center;
  margin-bottom: 42px;
}

.photo-frame {
  width: 176px;
  height: 176px;
  margin: 0 auto 16px;
  position: relative;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  border-radius: 50%;
  border: 2px solid var(--gold);
  box-shadow:
    0 0 0 8px rgba(212, 175, 55, 0.12),
    0 18px 36px rgba(0, 0, 0, 0.45);
  filter: saturate(0.75) sepia(0.22) contrast(1.08);
}

.photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 36px rgba(8, 6, 2, 0.35);
  pointer-events: none;
}

.couple-card h3 {
  font-family: var(--font-script);
  font-size: 36px;
  color: var(--gold-light);
}

.couple-card .fullname {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 4px 0 10px;
  color: var(--cream);
}

.couple-card p {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

.and-mark {
  display: flex;
  justify-content: center;
  margin: -10px 0 28px;
  font-family: var(--font-script);
  font-size: 40px;
  color: var(--gold);
}

/* Ayat */
.ayat {
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(59, 26, 28, 0.35), transparent);
}

.ayat .arabic {
  font-family: "Amiri", var(--font-serif);
  font-size: 22px;
  line-height: 2;
  color: var(--gold-light);
  direction: rtl;
  margin-bottom: 16px;
}

.ayat blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.75;
  color: var(--cream);
}

.ayat .source {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--gold);
}

/* Event */
.event-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 18px 18px;
  text-align: center;
  background: linear-gradient(180deg, rgba(28, 18, 10, 0.7), rgba(8, 6, 4, 0.85));
}

.event-date-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 8px;
}

.event-date-row .day {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.2em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--gold);
}

.event-date-row .num {
  font-family: var(--font-display);
  font-size: 64px;
  line-height: 0.9;
  color: var(--cream);
}

.event-date-row .month {
  text-align: left;
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--gold-light);
}

.event-card h3 {
  font-family: var(--font-script);
  font-size: 32px;
  margin: 8px 0 6px;
}

.event-card .place {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 16px;
}

.btn-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  border: 1px solid var(--gold);
  color: var(--gold-light);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.04em;
  background: transparent;
  cursor: pointer;
}

.btn.solid {
  background: linear-gradient(180deg, #efd171, #c9a227);
  color: #1a1206;
  border-color: transparent;
  font-weight: 600;
}

.map-wrap {
  margin-top: 16px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  height: 180px;
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(0.35) sepia(0.25) contrast(1.05);
}

/* Story */
.story-text {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.8;
  text-align: center;
  color: var(--cream);
  margin-bottom: 18px;
}

.video-frame {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
}

.video-frame video {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.gallery-grid button {
  border: 0;
  padding: 0;
  background: #111;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  min-height: 140px;
}

.gallery-grid img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.gallery-grid button:hover img {
  transform: scale(1.06);
}

.gallery-grid .wide {
  grid-column: span 2;
}

.gallery-grid .wide img {
  height: 220px;
}

/* Gift */
.gift-note {
  font-family: var(--font-serif);
  text-align: center;
  font-size: 16px;
  line-height: 1.75;
  color: var(--cream);
}

.account-card {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: rgba(20, 14, 8, 0.6);
  text-align: center;
}

.account-card h4 {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 8px;
}

.account-card p {
  font-size: 14px;
  color: var(--muted);
}

.account-card .acc-name {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--cream);
}

.account-card .acc-no {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.12em;
  color: var(--gold-light);
  margin: 8px 0 14px;
}

.account-card .btn {
  width: 100%;
  justify-content: center;
}

/* RSVP */
.form {
  display: grid;
  gap: 12px;
}

.form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.form input,
.form textarea,
.form select {
  width: 100%;
  background: rgba(12, 10, 8, 0.8);
  border: 1px solid var(--line);
  color: var(--cream);
  border-radius: 10px;
  padding: 12px 12px;
  font-size: 14px;
  outline: none;
}

.form textarea {
  min-height: 90px;
  resize: vertical;
}

.form .row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wishes {
  margin-top: 28px;
  display: grid;
  gap: 12px;
  max-height: 420px;
  overflow: auto;
}

.wish {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(18, 12, 8, 0.55);
}

.wish strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--gold-light);
}

.wish .meta {
  font-size: 11px;
  color: var(--gold);
  margin: 2px 0 8px;
}

.wish p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}

.form-status {
  min-height: 20px;
  font-size: 13px;
  text-align: center;
  color: var(--gold-light);
}

/* Thanks */
.thanks {
  text-align: center;
  padding-bottom: 40px;
}

.thanks h2 {
  font-family: var(--font-script);
  font-size: 48px;
}

.thanks p {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 8px;
}

/* Bottom nav & music */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 40;
  display: none;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(12, 10, 8, 0.86);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

@media (min-width: 780px) {
  .bottom-nav {
    width: max-content;
  }

  .music-btn {
    right: calc(50vw - 199px);
  }
}

body.is-open .bottom-nav {
  display: flex;
}

.bottom-nav a,
.music-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--gold-light);
  text-decoration: none;
  border-radius: 50%;
}

.bottom-nav a.active {
  background: rgba(212, 175, 55, 0.18);
  color: var(--gold);
}

.music-btn {
  position: fixed;
  right: 16px;
  top: 16px;
  z-index: 45;
  display: none;
  border: 1px solid var(--line);
  background: rgba(12, 10, 8, 0.86);
  cursor: pointer;
}

body.is-open .music-btn {
  display: grid;
}

.music-btn .icon-play {
  display: none;
}

.music-btn:not(.is-on) .icon-pause {
  display: none;
}

.music-btn:not(.is-on) .icon-play {
  display: block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.is-on {
  display: flex;
}

.lightbox img {
  max-width: min(100%, 720px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox button {
  position: absolute;
  background: transparent;
  border: 0;
  color: var(--gold-light);
  font-size: 28px;
  cursor: pointer;
}

.lightbox .close {
  top: 16px;
  right: 20px;
}

.lightbox .prev {
  left: 10px;
}

.lightbox .next {
  right: 10px;
}

/* Petals */
.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 70;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -20px;
  width: 8px;
  height: 12px;
  background: radial-gradient(circle at 30% 30%, #f4e4b0, #d4af37);
  border-radius: 80% 0 80% 0;
  opacity: 0.75;
  animation: fall linear infinite;
}

@keyframes fall {
  to {
    transform: translateY(110vh) rotate(240deg);
    opacity: 0.15;
  }
}

.petal:nth-child(odd) {
  border-radius: 0 80% 0 80%;
}

@media (max-width: 360px) {
  .wayang-row svg {
    width: 92px;
  }

  .cover-names h1 {
    font-size: 42px;
  }
}
