
/* ==============================================
   1. TEMA DAN WARNA
   ============================================== */
:root {
  --bg: #f8f4ec;
  --paper: #fffdf8;
  --ink: #393128;
  --muted: #817669;
  --accent: #b9985e;
  --line: #e6dccb;
  --shadow: 0 18px 55px rgba(48, 37, 22, .09);
  --radius: 4px;
  --heading: "Playfair Display", Georgia, serif;
  --body: "DM Sans", sans-serif;
}

body.royal {
  --bg: #101010;
  --paper: #1a1916;
  --ink: #f5ecd8;
  --muted: #b8ad99;
  --accent: #c9a45c;
  --line: #49402e;
  --shadow: 0 18px 55px rgba(0, 0, 0, .3);
  --radius: 2px;
  --heading: "Cormorant Garamond", Georgia, serif;
}

body.botanical {
  --bg: #eef0e7;
  --paper: #fbfbf5;
  --ink: #304536;
  --muted: #748174;
  --accent: #80977c;
  --line: #d5dfd0;
  --shadow: 0 18px 50px rgba(43, 69, 48, .1);
  --radius: 18px;
  --heading: "Playfair Display", Georgia, serif;
}

body.modern {
  --bg: #f9efed;
  --paper: #fffaf8;
  --ink: #382d2d;
  --muted: #8a7474;
  --accent: #bd8e8b;
  --line: #ecd9d6;
  --shadow: 0 18px 50px rgba(94, 53, 53, .08);
  --radius: 10px;
  --heading: "Playfair Display", Georgia, serif;
}

/* ==============================================
   2. RESET DAN DASAR
   ============================================== */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.8;
  transition: background .4s ease, color .4s ease;
}

body, button, input, select, textarea { font-family: var(--body); }

button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }

button, a { touch-action: manipulation; }

img { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 {
  font-family: var(--heading);
  font-weight: 500;
  line-height: 1.2;
}

h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 28px;
}

h3 { font-size: 1.65rem; }

.eyebrow {
  color: var(--accent);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .22em;
  line-height: 1.8;
}

.script-word {
  font-family: var(--heading);
  font-style: italic;
  color: var(--accent);
  font-size: 1.55rem;
  margin-bottom: 8px;
}

.ornament {
  color: var(--accent);
  letter-spacing: .12em;
  margin: 25px 0;
}

.section {
  width: min(100% - 36px, 1050px);
  margin-inline: auto;
  padding-block: 86px;
  text-align: center;
}

.section-note {
  color: var(--muted);
  max-width: 550px;
  margin: -10px auto 30px;
}

/* ==============================================
   3. COVER / BUKA UNDANGAN
   ============================================== */
.cover {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  overflow-y: auto;
  color: var(--ink);
  background:
    linear-gradient(rgba(248,244,236,.68), rgba(248,244,236,.86)),
    url("images/cover.jpg") center / cover;
  transition: opacity .8s ease, visibility .8s ease, transform .8s ease;
}

.royal .cover {
  color: #f5ecd8;
  background:
    linear-gradient(rgba(8,8,8,.55), rgba(8,8,8,.86)),
    url("images/cover.jpg") center / cover;
}

.botanical .cover {
  background:
    linear-gradient(rgba(238,240,231,.55), rgba(238,240,231,.85)),
    url("images/cover.jpg") center / cover;
}

.modern .cover {
  background:
    linear-gradient(rgba(249,239,237,.56), rgba(249,239,237,.88)),
    url("images/cover.jpg") center / cover;
}

.cover-frame {
  width: min(100%, 570px);
  padding: clamp(32px, 8vw, 75px) 24px;
  border: 1px solid var(--accent);
  outline: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  outline-offset: 8px;
  text-align: center;
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  box-shadow: var(--shadow);
  animation: appear 1s ease both;
}

.royal .cover-frame { background: rgba(15, 14, 12, .82); }
.botanical .cover-frame { border-radius: 90px 90px 16px 16px; }
.modern .cover-frame { border: none; outline: none; }

.cover h1 {
  font-size: clamp(2.6rem, 9vw, 4.5rem);
  margin: 12px 0;
  overflow-wrap: anywhere;
}

.cover-flourish {
  color: var(--accent);
  font-size: 2rem;
  margin: 20px 0;
}

.cover-caption, .cover-note {
  color: var(--muted);
  font-size: .83rem;
}

.cover-note { margin: 28px 0 0; font-size: .68rem; }

.cover.closed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.04);
}

.invitation { opacity: 0; transition: opacity .8s ease; }
.invitation-open .invitation { opacity: 1; }

@keyframes appear {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==============================================
   4. TOMBOL DAN MUSIK
   ============================================== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.button:hover { transform: translateY(-2px); }

.button-gold {
  background: var(--accent);
  color: #fff;
  margin-top: 18px;
}

.royal .button-gold { color: #17130c; }

.button-outline {
  background: transparent;
  color: var(--ink);
}

.button-outline:hover { background: var(--accent); color: white; }

.music-button {
  position: fixed;
  z-index: 120;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 15px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: .75rem;
  cursor: pointer;
}

#musicIcon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: white;
  background: var(--accent);
}

.invitation-open ~ .music-button { display: flex; }

/* ==============================================
   5. HERO DAN COUNTDOWN
   ============================================== */
.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background:
    radial-gradient(ellipse at center, var(--paper) 0%, transparent 70%);
}

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  max-width: 900px;
  margin: 10px auto;
  overflow-wrap: anywhere;
}

.hero h1 span { color: var(--accent); font-style: italic; }

.hero-date { color: var(--muted); letter-spacing: .12em; }

.intro {
  max-width: 570px;
  color: var(--muted);
  margin: 0 auto 16px;
}

.countdown-section {
  background: var(--paper);
  border-block: 1px solid var(--line);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 620px;
  margin: 28px auto 0;
}

.count-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.count-item strong {
  font-family: var(--heading);
  color: var(--accent);
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: 500;
}

.count-item span { color: var(--muted); font-size: .75rem; }

/* ==============================================
   6. MEMPELAI DAN ACARA
   ============================================== */
.couple-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 30px;
  align-items: center;
  max-width: 850px;
  margin: auto;
}

.person img {
  width: min(100%, 320px);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  margin: 0 auto 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.botanical .person img { border-radius: 180px 180px 16px 16px; }
.royal .person img { border: 1px solid var(--accent); padding: 5px; }
.modern .person img { border-radius: 4px; }

.person-label {
  color: var(--accent);
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.person h3 { margin-bottom: 10px; }
.person p:last-child { color: var(--muted); font-size: .83rem; }
.ampersand { font-family: var(--heading); font-size: 3rem; color: var(--accent); }

.event-section { max-width: none; background: var(--paper); }
.event-grid {
  width: min(100%, 850px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: auto;
}

.event-card {
  padding: 35px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.event-symbol { color: var(--accent); font-size: 2rem; }
.event-card h3 { margin: 8px 0 20px; }
.event-card p { margin-bottom: 8px; }
.venue { font-weight: 600; }
.text-link { display: inline-block; margin-top: 15px; color: var(--accent); font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* ==============================================
   7. GALERI
   ============================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 35px;
}

.gallery-item {
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform .45s ease, filter .45s ease;
}

.gallery-item:hover img { transform: scale(1.05); filter: brightness(.92); }
.botanical .gallery-item:first-child { border-radius: 100px 100px 10px 10px; }
.modern .gallery-item:nth-child(2) { transform: translateY(18px); }

/* ==============================================
   8. RSVP DAN HADIAH
   ============================================== */
.rsvp-section { background: var(--paper); }

.rsvp-form {
  display: grid;
  gap: 10px;
  max-width: 550px;
  margin: 30px auto 0;
  text-align: left;
}

.rsvp-form label { margin-top: 8px; font-size: .8rem; font-weight: 700; }

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font-size: .9rem;
}

.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.rsvp-form .button { width: 100%; margin-top: 14px; }

.gift-card {
  max-width: 430px;
  margin: 30px auto 0;
  padding: 35px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.gift-card > p:first-child {
  font-size: .75rem;
  letter-spacing: .15em;
  color: var(--accent);
  font-weight: 700;
}

.gift-card strong {
  display: block;
  margin: 12px 0;
  font-size: clamp(1.2rem, 5vw, 1.8rem);
  overflow-wrap: anywhere;
}

.gift-card .button { margin-top: 12px; }
.copy-status { min-height: 1.5em; color: var(--accent); font-size: .8rem; }

/* ==============================================
   9. PENUTUP, FOOTER, LIGHTBOX
   ============================================== */
.closing {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.closing h2 { margin: 0 0 18px; }
.closing > p:not(.eyebrow):not(.script-word) { max-width: 550px; color: var(--muted); }

.footer {
  padding: 24px 18px;
  text-align: center;
  color: var(--muted);
  font-size: .75rem;
  border-top: 1px solid var(--line);
}

.footer strong { color: var(--accent); letter-spacing: .12em; }

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  padding: 60px 60px;
  border: 0;
  background: rgba(8, 8, 8, .95);
  color: white;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.lightbox[open] { display: flex; }

.lightbox img {
  max-width: min(78vw, 900px);
  max-height: 82vh;
  object-fit: contain;
}

.lightbox-close,
.lightbox-nav {
  border: 1px solid rgba(255,255,255,.35);
  color: white;
  background: rgba(0,0,0,.35);
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 2rem;
}

.lightbox-nav {
  flex: 0 0 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.8rem;
}

.lightbox::backdrop { background: rgba(0,0,0,.88); }

/* ==============================================
   10. RESPONSIVE
   ============================================== */
@media (max-width: 680px) {
  .section {
    width: min(100% - 28px, 1050px);
    padding-block: 64px;
  }

  .hero { min-height: 70vh; }
  .couple-grid { grid-template-columns: 1fr; gap: 16px; }
  .person img { width: min(80%, 300px); }
  .ampersand { font-size: 2.2rem; line-height: 1; }
  .event-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-item:last-child { grid-column: 1 / -1; }
  .gallery-item:last-child img { aspect-ratio: 16 / 9; }
  .mod​ern .gallery-item:nth-child(2) { transform: none; }
  .countdown { gap: 7px; }
  .count-item { padding: 15px 4px; }
  .count-item span { font-size: .67rem; }
  .music-button { right: 12px; bottom: 12px; }
  .lightbox { padding: 55px 10px; gap: 8px; }
  .lightbox img { max-width: calc(100vw - 110px); max-height: 75vh; }
  .lightbox-nav { flex-basis: 34px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}


/* =====================================
   NEOLENS PHOTO — PREMIUM BACKGROUND
===================================== */

/* Latar dasar undangan */
body {
  background: #f6f0e7;
  color: #30271f;
}

/* Setiap bagian memiliki latar dan tekstur */
main section {
  position: relative;
  isolation: isolate;
  padding: clamp(64px, 9vw, 110px) 22px;
  overflow: hidden;
}

main section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at 15% 15%,
      rgba(198, 164, 111, 0.13),
      transparent 48%
    ),
    radial-gradient(
      ellipse at 85% 85%,
      rgba(226, 208, 177, 0.20),
      transparent 45%
    );
}

/* Garis dekorasi emas yang tipis */
main section::after {
  content: "";
  position: absolute;
  bottom: 22px;
  left: 50%;
  width: 52px;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    90deg,
    transparent,
    #b79a65,
    transparent
  );
  opacity: 0.8;
  pointer-events: none;
}

/* Tema Ivory Elegance */
body.ivory {
  background: #f6f0e7;
  color: #30271f;
}

body.ivory main section:nth-of-type(even) {
  background-color: #eee4d6;
}

/* Tema Royal Gold */
body.royal {
  background: #0c0b0a;
  color: #f5ead5;
}

body.royal main section {
  background-color: #11100e;
}

body.royal main section:nth-of-type(even) {
  background-color: #19150f;
}

body.royal main section::before {
  background:
    radial-gradient(
      ellipse at 50% 0%,
      rgba(190, 151, 78, 0.15),
      transparent 60%
    );
}

/* Tema Botanical Romance */
body.botanical {
  background: #edf0e6;
  color: #344236;
}

body.botanical main section:nth-of-type(even) {
  background-color: #e1e8d9;
}

body.botanical main section::before {
  background:
    radial-gradient(
      ellipse at 10% 20%,
      rgba(102, 129, 91, 0.12),
      transparent 48%
    );
}

/* Tema Modern Romance */
body.modern {
  background: #fbf0ed;
  color: #49343b;
}

body.modern main section:nth-of-type(even) {
  background-color: #f4e2df;
}

body.modern main section::before {
  background:
    radial-gradient(
      ellipse at 80% 10%,
      rgba(211, 154, 163, 0.16),
      transparent 48%
    );
}

/* Foto hero menjadi latar utama */
.hero {
  position: relative;
  background-image:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.10),
      rgba(0, 0, 0, 0.60)
    ),
    url("images/cover.jpg");
  background-size: cover;
  background-position: center;
  color: #fff;
}

/* Panel konten elegan */
.event-card,
.couple-card,
.gift-card {
  border: 1px solid rgba(183, 154, 101, 0.30);
  border-radius: 18px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 14px 45px rgba(48, 39, 31, 0.06);
  backdrop-filter: blur(8px);
}

body.royal .event-card,
body.royal .couple-card,
body.royal .gift-card {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(201, 169, 104, 0.30);
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.18);
}

/* Galeri dengan sudut halus */
.gallery-item img {
  border-radius: 12px;
}

/* Hindari transisi warna yang mengganggu */
@media (max-width: 600px) {
  main section {
    padding: 64px 18px;
  }

  .event-card,
  .couple-card,
  .gift-card {
    padding: 20px;
  }
}


/* =========================================
   ROYAL GOLD — HERO TEXT CONTRAST FIX
========================================= */

.royal .hero {
  position: relative;
  background-image:
    linear-gradient(
      to bottom,
      rgba(12, 10, 8, 0.38) 0%,
      rgba(12, 10, 8, 0.55) 50%,
      rgba(8, 7, 6, 0.82) 100%
    ),
    url("images/cover.jpg");
  background-size: cover;
  background-position: center;
  color: #fffaf0;
}

/* Nama pasangan */
.royal .hero h1,
.royal .hero h1 span {
  color: #fffaf0;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.8);
}

/* Label dan tanggal */
.royal .hero .eyebrow,
.royal .hero .hero-date {
  color: #dfbd78;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

/* Paragraf pembuka */
.royal .hero .intro,
.royal .hero p {
  color: #fffaf0;
  text-shadow: 0 2px 9px rgba(0, 0, 0, 0.95);
}

/* Tombol Simpan Tanggal */
.royal .hero button,
.royal .hero a {
  color: #fffaf0;
  border: 1px solid #c9a45c;
  text-shadow: none;
}

/* Hover tombol */
.royal .hero button:hover,
.royal .hero a:hover {
  background-color: #c9a45c;
  color: #17130c;
}

