/* ============================================================
   style.css — Undangan Pernikahan: Izul & Aulia (Dark & Gold)
   Mobile-first + Desktop side nav
   ============================================================ */

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

html {
  color-scheme: dark;
}

body {
  background-color: #151311;
  color: #e8e1dd;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

section[id] {
  scroll-margin-top: 2rem;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(231, 200, 168, 0.2);
}

.arched-portrait {
  border-radius: 50% 50% 0 0;
  border: 2px solid #e7c8a8;
  overflow: hidden;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* ── Reveal Animations ────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.slide-left {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.zoom-in {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.is-visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

@keyframes pulse-gold {
  0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(231, 200, 168, 0.7); }
  70%  { transform: scale(1);    box-shadow: 0 0 0 15px rgba(231, 200, 168, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(231, 200, 168, 0); }
}

.animate-pulse-gold {
  animation: pulse-gold 3s infinite;
}

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

.animate-spin-slow {
  animation: spin-slow 12s linear infinite;
}

#cover-overlay {
  transition: transform 0.9s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.9s;
}

.hide-cover {
  transform: translateY(-100%);
  visibility: hidden;
  pointer-events: none;
}

/* ── Guestbook Feed ───────────────────────────────────────── */
#guest-feed::-webkit-scrollbar        { width: 4px; }
#guest-feed::-webkit-scrollbar-track  { background: transparent; }
#guest-feed::-webkit-scrollbar-thumb  {
  background: rgba(231, 200, 168, 0.25);
  border-radius: 999px;
}

/* ── Attendance Badges (Dark Mode Gold Theme) ─────────────── */
.attendance-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.4;
}
.badge-hadir {
  background-color: rgba(52, 211, 153, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(110, 231, 183, 0.28);
}
.badge-mungkin {
  background-color: rgba(251, 191, 36, 0.14);
  color: #fcd34d;
  border: 1px solid rgba(252, 211, 77, 0.28);
}
.badge-tidak-hadir {
  background-color: rgba(232, 225, 221, 0.08);
  color: #d1c4b9;
  border: 1px solid rgba(209, 196, 185, 0.22);
}

/* ── Toast Notification ───────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 5.75rem;
  left: 50%;
  transform: translate(-50%, 16px);
  z-index: 200;
  max-width: min(90vw, 420px);
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  background: rgba(34, 31, 29, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(231, 200, 168, 0.35);
  color: #ffe5cc;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease-out, transform 0.25s ease-out, visibility 0.25s ease-out;
}
#toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
#toast.toast-error {
  border-color: rgba(255, 180, 171, 0.5);
  color: #ffb4ab;
}

/* ── Accessibility & Touch ────────────────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #ffe5cc;
  outline-offset: 2px;
}

a, button, label {
  touch-action: manipulation;
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .pb-safe { padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .fade-up, .slide-left, .zoom-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .animate-pulse-gold, .animate-spin-slow {
    animation: none;
  }
  #cover-overlay, #toast {
    transition: none;
  }
}
