*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #EDE3D2; }
html.is-locked, html.is-locked body { overflow: hidden; height: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--c-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: none; user-select: none; -webkit-user-drag: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p, figure, blockquote { margin: 0; }
.ar { font-family: var(--f-ar); direction: rtl; }
[hidden] { display: none !important; }

/* Latar desktop di luar kolom undangan */
.backdrop {
  position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(rgba(248, 240, 228, .55), rgba(238, 226, 208, .75)),
    url('../assets/img/garden-mosque.webp') center / cover no-repeat;
  filter: blur(14px) saturate(.9);
  transform: scale(1.08);
}

/* Kolom undangan (mobile-first, max 480px di layar besar) */
.invite {
  position: relative;
  width: 100%;
  max-width: var(--col-max);
  margin: 0 auto;
  background: var(--c-bg);
  overflow: clip;
  box-shadow: 0 0 60px rgba(90, 70, 40, .18);
}

/* Preloader */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-content: center; justify-items: center; gap: 18px;
  background: radial-gradient(circle at 50% 45%, #FFFBF2 0%, #F8F2E4 60%, #F1E8D6 100%);
  color: var(--c-gold);
  transition: opacity .9s var(--ease-lux), visibility .9s;
}
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__icon { width: 56px; height: 50px; animation: pl-pulse 2.2s ease-in-out infinite; }
.preloader__bar { width: 110px; height: 1px; background: rgba(197, 161, 91, .25); overflow: hidden; }
.preloader__bar i { display: block; height: 100%; width: 0; background: var(--c-gold); transition: width .4s ease; }
@keyframes pl-pulse { 50% { opacity: .45; transform: scale(.96); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
