/* ==========================================================================
   LAYOUT & MOBILE-FIRST PHONE SHELL
   Menampilkan tampilan layar HP di tengah pada desktop & full-bleed di mobile
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-desktop);
  min-height: 100dvh;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
  height: 100dvh;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font-family: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Latar Belakang Desktop di Luar Layar HP */
.desktop-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--bg-desktop);
  overflow: hidden;
}

.desktop-backdrop__image {
  position: absolute;
  inset: -24px;
  background-size: cover;
  background-position: center;
  opacity: 0.24;
  filter: blur(14px) sepia(42%) saturate(65%) brightness(0.65);
  transform: scale(1.06);
}

.desktop-backdrop__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(115, 85, 66, 0.16) 0%, rgba(28, 18, 13, 0.88) 72%),
    linear-gradient(180deg, rgba(35, 24, 19, 0.72) 0%, rgba(26, 17, 13, 0.92) 100%);
}

/* Frame Utama Layar HP di Tengah */
.phone-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--phone-max-width);
  min-height: 100dvh;
  margin: 0 auto;
  background-color: var(--bg-cream);
  box-shadow: var(--shadow-phone);
  overflow-x: clip;
}

/* Tekstur Kertas Vintage (assets/theme/frame-watermark.jpg) */
.paper-texture-layer {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--phone-max-width);
  height: 100dvh;
  pointer-events: none;
  z-index: 5;
  opacity: 0.24;
  mix-blend-mode: multiply;
  background-size: 420px auto;
  background-repeat: repeat;
}

/* Konten Undangan */
.invitation-main {
  position: relative;
  z-index: 2;
  padding-bottom: 92px; /* Ruang untuk floating bottom nav */
}

/* Struktur Section Umum */
.section {
  position: relative;
  padding: var(--section-pad-y) var(--section-pad-x);
  overflow: hidden;
}

.section--cream {
  background-color: var(--bg-cream);
}

.section--deep {
  background-color: var(--bg-cream-deep);
}

.section--dark-vintage {
  background-color: #36221A;
  color: var(--text-on-dark);
}

.section--dark-vintage .section-bg-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center bottom;
  opacity: 0.22;
  filter: sepia(35%) saturate(75%);
  pointer-events: none;
  z-index: 0;
}

.section--dark-vintage::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(54, 34, 26, 0.92) 0%,
    rgba(54, 34, 26, 0.78) 50%,
    rgba(42, 25, 19, 0.94) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.section__inner {
  position: relative;
  z-index: 2;
}

/* Header Section Tipografi Vintage */
.section-header {
  text-align: center;
  margin-bottom: 32px;
}

.section-kicker {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brown-medium);
  margin-bottom: 8px;
}

.section--dark-vintage .section-kicker {
  color: var(--gold-soft);
}

.section-title {
  font-family: var(--font-script);
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1.15;
  color: var(--brown-espresso);
  margin-bottom: 10px;
}

.section--dark-vintage .section-title {
  color: var(--bg-cream);
}

.section-subtitle {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 340px;
  margin: 0 auto;
}

.section--dark-vintage .section-subtitle {
  color: var(--text-on-dark-muted);
}

/* Pembatas Ornamen Vintage */
.vintage-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px auto 0;
  width: 190px;
  color: var(--gold-antique);
}

.vintage-divider::before,
.vintage-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-antique), transparent);
}

.vintage-divider svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Responsif untuk Mobile Asli */
@media (max-width: 480px) {
  body {
    background-color: var(--bg-cream);
  }

  .desktop-backdrop {
    display: none;
  }

  .phone-shell {
    max-width: 100%;
    box-shadow: none;
  }

  .paper-texture-layer {
    max-width: 100%;
  }
}

/* Sentuhan Frame Desktop Lebar */
@media (min-width: 481px) {
  .phone-shell {
    border-left: 1px solid rgba(214, 185, 135, 0.25);
    border-right: 1px solid rgba(214, 185, 135, 0.25);
  }
}
