/* ========================================
   PREMIUM WEDDING INVITATION
   Elegant Gold + Dark Theme
   ======================================== */

:root {
  --gold: #d4a853;
  --gold-light: #f0d78c;
  --gold-dim: #8a7235;
  --cream: #f5efe0;
  --bg: #08080f;
  --bg2: #0c0c18;
  --text: #ece6d8;
  --dim: #6b6580;
  --glass: rgba(212, 168, 83, 0.04);
  --glass-border: rgba(212, 168, 83, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y proximity; }

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===== BACKGROUND LAYER ===== */
.bg-layer {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}

.bg-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: none;
}

.bg-image {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: none;
}

.bg-overlay {
  position: absolute; inset: 0;
  background: rgba(8, 8, 15, 0.55);
  backdrop-filter: blur(2px);
}

.bg-layer.has-video .bg-overlay {
  background: rgba(8, 8, 15, 0.45);
}

.bg-layer.has-image .bg-overlay {
  background: rgba(8, 8, 15, 0.6);
}

/* ===== CANVAS BG ===== */
#bgCanvas {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}

/* ===== BOKEH OVERLAY ===== */
.bokeh-layer {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  overflow: hidden;
}
.bokeh {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0;
  animation: bokehFloat linear infinite;
}
@keyframes bokehFloat {
  0% { transform: translateY(100vh) scale(0.5); opacity: 0; }
  15% { opacity: 0.15; }
  85% { opacity: 0.15; }
  100% { transform: translateY(-100vh) scale(1.2); opacity: 0; }
}

/* ===== COVER ===== */
.cover {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.cover-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(212, 168, 83, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(212, 168, 83, 0.04) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(12, 12, 24, 0.5) 0%, var(--bg) 100%);
}

/* Elegant corner ornaments */
.ornament-corner {
  position: absolute;
  width: 120px; height: 120px;
  opacity: 0.25;
}
.ornament-corner svg { width: 100%; height: 100%; }
.ornament-corner.tl { top: 25px; left: 25px; }
.ornament-corner.tr { top: 25px; right: 25px; transform: scaleX(-1); }
.ornament-corner.bl { bottom: 25px; left: 25px; transform: scaleY(-1); }
.ornament-corner.br { bottom: 25px; right: 25px; transform: scale(-1); }

.cover-content {
  text-align: center;
  z-index: 2;
  position: relative;
  padding: 2rem;
  animation: coverReveal 2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes coverReveal {
  0% { opacity: 0; transform: translateY(60px) scale(0.95); filter: blur(10px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.cover-label {
  font-size: 0.7rem;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 2rem;
  font-weight: 400;
}

.cover-names {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(3rem, 10vw, 6rem);
  color: var(--gold);
  line-height: 1.2;
  margin-bottom: 0.5rem;
  text-shadow:
    0 0 60px rgba(212, 168, 83, 0.3),
    0 0 120px rgba(212, 168, 83, 0.1);
}

.cover-amp {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--gold-dim);
  display: block;
  margin: 0.3rem 0;
}

.cover-line {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 1.5rem auto;
}

.cover-date {
  font-size: 0.8rem;
  letter-spacing: 4px;
  color: var(--dim);
  margin-bottom: 3rem;
}

.cover-guest {
  margin-bottom: 2.5rem;
  animation: fadeInUp 1.5s ease 0.5s both;
}

.cover-guest-label {
  font-size: 0.65rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 0.5rem;
}

.cover-guest-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--cream);
  font-style: italic;
}

.cover-btn {
  background: transparent;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  padding: 0.9rem 2.5rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.5s ease;
  animation: fadeInUp 1.5s ease 1s both;
  position: relative;
  overflow: hidden;
}

.cover-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  opacity: 0;
  transition: opacity 0.5s ease;
  border-radius: 50px;
}

.cover-btn:hover {
  border-color: var(--gold);
  color: var(--bg);
  box-shadow: 0 0 40px rgba(212, 168, 83, 0.3);
}

.cover-btn:hover::before { opacity: 1; }
.cover-btn span { position: relative; z-index: 1; }

/* ===== MAIN CONTENT ===== */
.main-content {
  display: none;
  position: relative;
  z-index: 1;
}
.main-content.visible { display: block; }

/* ===== SECTIONS ===== */
.section {
  padding: 6rem 1.5rem;
  position: relative;
  scroll-snap-align: start;
}

.container {
  max-width: 580px;
  margin: 0 auto;
}

.section-line {
  width: 40px;
  height: 1px;
  background: var(--gold-dim);
  margin: 0 auto 1rem;
}

.section-label {
  text-align: center;
  font-size: 0.65rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 0.5rem;
}

.section-heading {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2rem, 6vw, 3.2rem);
  color: var(--gold);
  text-align: center;
  margin-bottom: 2rem;
  text-shadow: 0 0 40px rgba(212, 168, 83, 0.15);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== BISMILLAH ===== */
.bismillah {
  background: var(--bg2);
  text-align: center;
}

.bismillah-card {
  padding: 3rem 2rem;
  position: relative;
}

.bismillah-card::before,
.bismillah-card::after {
  content: '✦';
  color: var(--gold-dim);
  opacity: 0.4;
  font-size: 0.6rem;
  display: block;
}

.bismillah-card::before { margin-bottom: 1.5rem; letter-spacing: 15px; }
.bismillah-card::after { margin-top: 1.5rem; letter-spacing: 15px; }

.arabic {
  font-size: 2rem;
  color: var(--gold);
  line-height: 2;
  margin-bottom: 2rem;
  font-weight: 300;
}

.ayah-text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1rem;
  line-height: 2;
  color: var(--dim);
  max-width: 420px;
  margin: 0 auto 1rem;
}

.ayah-source {
  color: var(--gold-dim);
  font-size: 0.8rem;
}

/* ===== COUPLE ===== */
.couple {
  background: var(--bg);
  text-align: center;
}

.couple-intro {
  color: var(--dim);
  font-size: 0.85rem;
  max-width: 380px;
  margin: 0 auto 3rem;
  line-height: 1.8;
}

.person {
  margin-bottom: 2.5rem;
}

.person-frame {
  width: 180px; height: 180px;
  margin: 0 auto 1.5rem;
  position: relative;
}

/* Rotating ornamental rings */
.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--gold-dim);
}

.ring-1 {
  inset: -8px;
  opacity: 0.3;
  border-style: dashed;
  animation: spin 30s linear infinite;
}

.ring-2 {
  inset: -20px;
  opacity: 0.12;
  animation: spin 45s linear infinite reverse;
}

.ring-3 {
  inset: -35px;
  opacity: 0.06;
  border-style: dotted;
  animation: spin 60s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.person-photo {
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(212, 168, 83, 0.3);
  background: linear-gradient(135deg, #151530, #08080f);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.person-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.photo-placeholder {
  font-size: 3.5rem;
  opacity: 0.15;
}

.person-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  color: var(--gold-light);
  margin-bottom: 0.3rem;
  font-weight: 400;
}

.person-subtitle {
  font-size: 0.65rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 0.8rem;
}

.person-parents {
  font-size: 0.8rem;
  color: var(--dim);
  line-height: 1.7;
  max-width: 260px;
  margin: 0 auto;
}

.ampersand {
  font-family: 'Great Vibes', cursive;
  font-size: 3.5rem;
  color: var(--gold);
  display: block;
  margin: 0.5rem 0;
  text-shadow: 0 0 40px rgba(212, 168, 83, 0.2);
}

/* ===== COUNTDOWN ===== */
.countdown-section {
  background: var(--bg2);
  text-align: center;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cd-item { text-align: center; }

.cd-ring {
  width: 85px; height: 85px;
  border-radius: 50%;
  border: 1px solid rgba(212, 168, 83, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.6rem;
  position: relative;
  background: rgba(212, 168, 83, 0.03);
  backdrop-filter: blur(5px);
}

.cd-ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(212, 168, 83, 0.08);
}

.cd-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--gold);
}

.cd-label {
  font-size: 0.65rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--dim);
}

/* ===== EVENTS ===== */
.events-section {
  background: var(--bg);
}

.event-card {
  background: linear-gradient(145deg, rgba(212, 168, 83, 0.04), rgba(212, 168, 83, 0.01));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.event-card::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 50px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.event-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  filter: grayscale(0.3);
}

.event-name {
  font-family: 'Great Vibes', cursive;
  font-size: 2.2rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.event-when {
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.event-time {
  font-size: 0.85rem;
  color: var(--dim);
  margin-bottom: 1rem;
}

.event-place {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--cream);
  margin-bottom: 0.3rem;
}

.event-addr {
  font-size: 0.8rem;
  color: var(--dim);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.map-link {
  display: inline-block;
  border: 1px solid rgba(212, 168, 83, 0.35);
  color: var(--gold);
  padding: 0.5rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 2px;
  transition: all 0.3s;
}

.map-link:hover {
  background: var(--gold);
  color: var(--bg);
}

/* ===== TIMELINE ===== */
.story-section { background: var(--bg2); }

.timeline { position: relative; padding-left: 2rem; }

.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--gold-dim), rgba(212, 168, 83, 0.08), transparent);
}

.tl-item {
  position: relative;
  margin-bottom: 2.5rem;
  padding-left: 1.5rem;
}

.tl-dot {
  position: absolute;
  left: -2rem; top: 4px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--bg2);
  border: 2px solid var(--gold-dim);
  box-shadow: 0 0 12px rgba(212, 168, 83, 0.2);
}

.tl-date {
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 0.3rem;
}

.tl-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--cream);
  margin-bottom: 0.4rem;
}

.tl-desc {
  font-size: 0.85rem;
  color: var(--dim);
  line-height: 1.7;
}

/* ===== GALLERY ===== */
.gallery-section { background: var(--bg); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.gallery-item::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.4));
  opacity: 0;
  transition: opacity 0.4s;
}

.gallery-item:hover::after { opacity: 1; }

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover img { transform: scale(1.08); }

/* ===== GIFTS ===== */
.gifts-section {
  background: var(--bg2);
  text-align: center;
}

.gifts-note {
  color: var(--dim);
  font-size: 0.85rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.gift-card {
  background: linear-gradient(145deg, rgba(212, 168, 83, 0.04), rgba(212, 168, 83, 0.01));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(5px);
}

.gift-bank {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.gift-name {
  color: var(--dim);
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}

.gift-num {
  color: var(--gold-light);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 3px;
  margin-bottom: 0.8rem;
  font-family: 'Playfair Display', serif;
}

.copy-btn {
  background: transparent;
  border: 1px solid rgba(212, 168, 83, 0.35);
  color: var(--gold);
  padding: 0.4rem 1.3rem;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.75rem;
  letter-spacing: 1px;
  transition: all 0.3s;
}

.copy-btn:hover {
  background: var(--gold);
  color: var(--bg);
}

/* ===== RSVP ===== */
.rsvp-section { background: var(--bg); }

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  background: rgba(212, 168, 83, 0.03);
  border: 1px solid rgba(212, 168, 83, 0.15);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  color: var(--text);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  transition: all 0.3s;
}

.rsvp-form input::placeholder,
.rsvp-form textarea::placeholder { color: var(--dim); }

.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  outline: none;
  border-color: var(--gold-dim);
  box-shadow: 0 0 25px rgba(212, 168, 83, 0.08);
}

.rsvp-form select option { background: var(--bg); }

.rsvp-form button {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: var(--bg);
  border: none;
  padding: 0.9rem;
  border-radius: 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.4s;
}

.rsvp-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(212, 168, 83, 0.25);
}

.rsvp-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.rsvp-item {
  background: rgba(212, 168, 83, 0.02);
  border: 1px solid rgba(212, 168, 83, 0.08);
  border-radius: 12px;
  padding: 1rem;
}

.rsvp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.rsvp-name {
  font-weight: 500;
  color: var(--gold-light);
  font-size: 0.9rem;
}

.rsvp-status {
  font-size: 0.7rem;
  padding: 0.15rem 0.6rem;
  border-radius: 15px;
}

.rsvp-status.hadir { background: rgba(76,175,80,0.12); color: #81c784; }
.rsvp-status.tidak_hadir { background: rgba(244,67,54,0.12); color: #e57373; }
.rsvp-status.masih_ragu { background: rgba(255,193,7,0.12); color: #ffd54f; }

.rsvp-msg {
  font-size: 0.8rem;
  color: var(--dim);
  line-height: 1.6;
}

/* ===== FOOTER ===== */
.footer-section {
  background: linear-gradient(180deg, var(--bg), var(--bg2));
  text-align: center;
  padding: 5rem 1.5rem 3rem;
}

.footer-orn {
  color: var(--gold-dim);
  opacity: 0.4;
  margin: 1.5rem 0;
  letter-spacing: 10px;
  font-size: 0.6rem;
}

.footer-names {
  font-family: 'Great Vibes', cursive;
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.footer-text {
  font-size: 0.85rem;
  color: var(--dim);
  line-height: 1.9;
  max-width: 400px;
  margin: 0 auto 1.5rem;
}

.footer-salam {
  font-style: italic;
  color: var(--dim);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

.footer-credit {
  font-size: 0.65rem;
  color: var(--dim);
  opacity: 0.3;
  margin-top: 2rem;
  letter-spacing: 2px;
}

/* ===== MUSIC BTN ===== */
.music-btn {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(212, 168, 83, 0.08);
  border: 1px solid rgba(212, 168, 83, 0.25);
  color: var(--gold);
  font-size: 0.9rem;
  cursor: pointer;
  z-index: 100;
  backdrop-filter: blur(10px);
  transition: all 0.3s;
}

.music-btn:hover {
  background: rgba(212, 168, 83, 0.15);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .ornament-corner { width: 60px; height: 60px; }
  .cover-names { font-size: 2.8rem; }
  .section { padding: 4rem 1rem; }
  .cd-ring { width: 70px; height: 70px; }
  .cd-num { font-size: 1.5rem; }
  .person-frame { width: 140px; height: 140px; }
  .arabic { font-size: 1.5rem; }
}
