/* Undangan Syientha & Alviansyah — gaya Model 1 */


:root {
  /* Palet Masjid Ash-Shiddiq: biru safir, putih, abu beton, emas, kayu jati */
  --terang: #F8F9FA;   /* Pure Light White: latar section */
  --abu: #E2E8F0;      /* Muted Concrete Grey: latar section selang-seling */
  --biru: #1E3A8A;     /* Deep Sapphire Blue: section Adab, tombol, footer */
  --teks: #22325C;     /* safir lebih gelap supaya paragraf nyaman dibaca */
  --kartu: #EAF0F7;    /* tint Steely Blue: kartu & kotak jam acara */
  --aksen: #4682B4;    /* Steely Blue: fokus form */
  --emas: #C9A23A;     /* Metallic Gold (sedikit diredam): ornamen, garis, bingkai */
  --jati: #8B5A2B;     /* Teak Wood: aksen kecil di bunga amplop */
  --garis: #D5DEEA;
  --putih: #FFFFFF;
  --latar: #E9EDF3;

  --f-script: 'Italianno', 'Pinyon Script', cursive; /* nama */
  --f-heading: 'Cormorant Garamond', Georgia, serif; /* judul section, dipakai italic */
  --f-label: 'Cormorant Garamond', Georgia, serif;
  --f-body: 'Lora', Georgia, serif;
  --f-arab: 'Amiri', 'Traditional Arabic', serif;

  --kolom: 480px;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--latar);
  background-image:
    radial-gradient(ellipse at 15% 20%, rgba(255,255,255,.55), transparent 55%),
    radial-gradient(ellipse at 85% 75%, rgba(226,232,240,.6), transparent 55%);
  background-attachment: fixed;
  color: var(--teks);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.75;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; height: 100%; }
[hidden] { display: none !important; }
img, svg { display: block; }
button { font: inherit; }

.page {
  max-width: var(--kolom);
  margin: 0 auto;
  background: var(--terang);
  min-height: 100vh;
  box-shadow: 0 0 48px rgba(30, 58, 138, .10);
  overflow: hidden;
}

section {
  position: relative;
  isolation: isolate;
  padding: 80px 28px;
  text-align: center;
}
.bg-terang { background: var(--terang); }
.bg-abu { background: var(--abu); }
.bg-biru { background: var(--biru); color: var(--terang); }

/* ---------- Tipografi ---------- */
.label {
  font-family: var(--f-label);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .28em;
  text-transform: uppercase;
  margin: 10px 0;
}
.label-light { font-weight: 500; letter-spacing: .22em; font-size: 13px; }
.script { font-family: var(--f-script); font-weight: 400; line-height: 1.1; }
.names { font-size: clamp(56px, 16.5vw, 72px); margin: 6px 0 4px; }
.heading { font-family: var(--f-heading); font-style: italic; font-weight: 500; line-height: 1.15; letter-spacing: .01em; }
.title { font-size: clamp(36px, 10.5vw, 44px); margin-bottom: 18px; }
.title-sub { margin-top: -12px; margin-bottom: 0; }
.subtitle { font-size: 32px; margin: 52px 0 16px; }
.body { font-size: 15.5px; margin: 14px auto; max-width: 36ch; }
.justify { text-align: justify; text-align-last: center; hyphens: auto; }
.quote { font-style: italic; font-size: 15.5px; margin: 14px auto; max-width: 34ch; }
.salam { font-style: italic; font-weight: 500; margin: 26px 0 6px; }
.closing { margin-top: 26px; }
.arab {
  font-family: var(--f-arab);
  direction: rtl;
  font-size: 27px;
  line-height: 2.1;
  margin: 10px auto 6px;
}
.muted { opacity: .7; font-size: 14px; font-style: italic; }

/* ---------- Ornamen ---------- */
.corner { position: absolute; width: 62px; height: 62px; color: var(--emas); pointer-events: none; }
.corner.tl { top: 16px; left: 16px; }
.corner.tr { top: 16px; right: 16px; transform: scaleX(-1); }
.corner.bl { bottom: 16px; left: 16px; transform: scaleY(-1); }
.corner.br { bottom: 16px; right: 16px; transform: scale(-1); }
.framed { padding-top: 96px; padding-bottom: 96px; }
.divider { width: 170px; height: 12px; margin: 30px auto; color: var(--emas); }

/* ---------- Cover ---------- */
.cover {
  position: fixed;
  top: 0; bottom: 0; left: 50%;
  width: 100%;
  max-width: var(--kolom);
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  padding: 28px 24px calc(32px + env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 50% 50%, #E9EFF6 0%, #D8E1EC 55%, #C5D1E0 100%); /* ash blue: bunga putih tetap kontras */
  transition: transform 1s cubic-bezier(.7, 0, .3, 1), opacity 1s ease;
}
.cover > :first-child { margin-top: auto; }
.cover > :last-child { margin-bottom: auto; }
.cover.opened { transform: translate(-50%, -100%); opacity: 0; }

.cover-title { text-align: center; }
.cover-caps {
  font-family: var(--f-label);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .3em;
  text-transform: uppercase;
  line-height: 1.4;
  margin-right: -.3em; /* imbangi letter-spacing huruf terakhir */
}
.cover-names {
  font-size: clamp(40px, 12.6vw, 56px);
  font-weight: 400;
  line-height: 1.05;
  margin: 10px 0 6px;
  white-space: nowrap;
  text-shadow: 0 2px 3px rgba(30, 58, 138, .15);
}
.cover-amp { font-size: .75em; }
.cover-date {
  font-family: var(--f-label);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .26em;
  text-transform: uppercase;
  font-variant-numeric: lining-nums;
  margin-right: -.26em;
}
.envelope { width: min(108%, 400px); max-width: none; height: auto; margin: 4px -4% 2px; }
.guest { margin-bottom: 22px; text-align: center; }
.cover-dear { font-family: var(--f-label); font-weight: 500; font-size: 18px; margin-bottom: 2px; }
.guest-name {
  font-family: var(--f-label);
  font-weight: 700;
  font-size: 25px;
  line-height: 1.3;
  max-width: 30ch;
  margin: 0 auto;
}
.guest-note { font-size: 11.5px; font-style: italic; opacity: .75; margin-top: 8px; }
.btn.btn-biru { background: var(--biru); border-color: var(--biru); color: var(--putih); box-shadow: 0 6px 14px rgba(30, 58, 138, .25); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-height: 720px) {
  .envelope { width: min(80%, 290px); }
}

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--biru);
  color: var(--terang);
  font-family: var(--f-label);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 22px;
  border: 1px solid var(--biru);
  border-radius: 999px;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.btn-outline { background: transparent; color: var(--biru); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 12px; }

/* ---------- Pembuka ---------- */
.arch {
  position: relative;
  max-width: 310px;
  margin: 0 auto 38px;
  padding: 74px 18px 34px;
  border: 1px solid var(--emas);
  border-radius: 155px 155px 6px 6px;
}
.arch::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--garis);
  border-radius: 148px 148px 3px 3px;
  pointer-events: none;
}
.arch .bismillah { width: 200px; margin: 0 auto 18px; }
.salam-script { font-size: clamp(22px, 6.6vw, 26px); line-height: 1.35; margin: 0; }
.divider-sm { width: 120px; margin: 18px auto 8px; }
.intro { font-size: 15px; line-height: 1.7; margin: 12px auto 0; max-width: 30ch; }

/* ---------- Mempelai ---------- */
.bismillah { width: min(78%, 300px); height: auto; margin: 0 auto 30px; }
.person { font-size: clamp(56px, 16vw, 68px); }
.fullname { font-family: var(--f-label); font-weight: 700; font-size: 20px; letter-spacing: .04em; margin-top: 4px; }
.parents { font-size: 14.5px; margin: 4px auto 0; max-width: 100%; }
.amp { font-size: 58px; margin: 14px 0 6px; }

/* ---------- Ayat ---------- */
.verse-card {
  position: relative;
  background: var(--kartu);
  border-radius: 6px;
  padding: 54px 30px;
  outline: 1px solid var(--garis);
  outline-offset: -10px;
  box-shadow: 0 10px 30px rgba(30, 58, 138, .07);
}
.verse-card .arab { font-size: 23px; line-height: 2.2; }
.verse-card .quote { font-size: 14.5px; }
.verse-card .corner { width: 44px; height: 44px; }
.verse-card .corner.tl { top: 16px; left: 16px; }
.verse-card .corner.tr { top: 16px; right: 16px; }
.verse-card .corner.bl { bottom: 16px; left: 16px; }
.verse-card .corner.br { bottom: 16px; right: 16px; }

/* ---------- Acara ---------- */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 330px;
  margin: 0 auto 30px;
}
.countdown div { background: var(--terang); border: 1px solid var(--garis); border-radius: 6px; padding: 10px 4px 8px; }
.countdown b { display: block; font-family: var(--f-label); font-weight: 600; font-size: 28px; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.countdown span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.event-card {
  background: var(--putih);
  border-radius: 6px;
  padding: 34px 22px 28px;
  outline: 1px solid var(--garis);
  outline-offset: -8px;
  box-shadow: 0 10px 30px rgba(30, 58, 138, .07);
}
.event-day { font-family: var(--f-label); font-weight: 700; font-size: 21px; letter-spacing: .06em; }
.events { display: grid; gap: 10px; margin: 20px 0 8px; }
.event { background: var(--kartu); border-radius: 6px; padding: 14px 10px 13px; }
.event .label { margin: 0 0 2px; font-size: 13px; letter-spacing: .26em; }
.event-time {
  font-family: var(--f-label);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.15;
  font-variant-numeric: lining-nums;
  color: var(--teks);
}
.event-ket { font-size: 13px; font-style: italic; margin-top: 2px; opacity: .85; }
.mosque { width: 170px; height: auto; margin: 18px auto 8px; }
.venue { font-family: var(--f-label); font-weight: 700; font-size: 22px; }
.address { font-size: 14px; max-width: 32ch; margin: 2px auto 0; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.map { margin-top: 20px; border-radius: 6px; overflow: hidden; border: 1px solid var(--garis); }
.map iframe { display: block; width: 100%; height: 230px; border: 0; }

/* ---------- Adab ---------- */
.lace {
  position: relative;
  background: var(--terang);
  color: var(--teks);
  margin: 34px 12px 0;
  padding: 36px 16px 30px;
  border-radius: 4px;
  outline: 1.5px dashed var(--emas);
  outline-offset: -11px;
}
.lace::before {
  content: "";
  position: absolute;
  inset: -9px;
  z-index: -1;
  border-radius: 10px;
  background: radial-gradient(circle, var(--terang) 5.5px, transparent 6px) 0 0 / 14px 14px;
}
.adab { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 12px; }
.adab li { font-size: 12.5px; line-height: 1.45; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ico { width: 58px; height: 58px; border-radius: 50%; background: var(--biru); display: grid; place-items: center; }
.ico svg { width: 30px; height: 30px; fill: none; stroke: var(--terang); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- RSVP ---------- */
.card {
  background: var(--putih);
  border-radius: 10px;
  padding: 24px 20px;
  box-shadow: 0 10px 30px rgba(30, 58, 138, .07);
  text-align: left;
  margin-top: 24px;
}
.notice {
  margin-top: 24px;
  background: var(--terang);
  border: 1px dashed var(--emas);
  border-radius: 10px;
  padding: 18px;
  font-size: 14.5px;
  font-style: italic;
}
.preview-note { background: var(--kartu); border-radius: 6px; padding: 8px 12px; font-size: 13px; margin-bottom: 16px; }
.field { border: 0; margin-bottom: 18px; }
.field > label, .field legend { display: block; font-family: var(--f-label); font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.field em { text-transform: none; font-weight: 500; letter-spacing: 0; }
input[type=text], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* cegah zoom otomatis di iPhone */
  color: var(--teks);
  background: #fff;
  border: 1px solid var(--garis);
  border-radius: 8px;
  padding: 11px 13px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--biru) 50%), linear-gradient(135deg, var(--biru) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
textarea { resize: vertical; min-height: 110px; }
input:focus, select:focus, textarea:focus { border-color: var(--aksen); box-shadow: 0 0 0 3px rgba(70, 130, 180, .25); }
.locked-input { position: relative; }
.locked-input input { background: #EEF2F7; padding-right: 42px; cursor: not-allowed; font-weight: 500; }
.locked-input svg { position: absolute; right: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--biru); stroke-width: 1.7; stroke-linecap: round; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: block; text-align: center; border: 1px solid var(--garis); border-radius: 8px; padding: 11px 8px; background: #fff; transition: all .2s; }
.choice input:checked + span { background: var(--biru); border-color: var(--biru); color: var(--terang); }
.choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(70, 130, 180, .4); }
.count { display: block; text-align: right; font-size: 12px; opacity: .7; margin-top: 4px; }
.form-status { font-size: 14px; text-align: center; margin-top: 12px; min-height: 1em; }
.form-status.err { color: #B03A48; }

.wishes { max-height: 440px; overflow-y: auto; text-align: left; display: grid; gap: 12px; padding: 2px; overscroll-behavior: contain; }
.wish { background: var(--terang); border-radius: 10px; padding: 14px 16px; border: 1px solid var(--garis); }
.wish-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.wish-name { font-family: var(--f-label); font-weight: 700; font-size: 17px; }
.badge { font-size: 11px; letter-spacing: .06em; padding: 1px 9px; border-radius: 999px; background: var(--kartu); }
.badge.no { background: var(--abu); }
.wish-text { font-size: 14.5px; margin-top: 4px; white-space: pre-line; overflow-wrap: anywhere; }
.wish-date { font-size: 11.5px; opacity: .65; margin-top: 6px; }

/* ---------- Amplop digital ---------- */
.gifts { display: grid; gap: 16px; margin-top: 26px; }
.gift {
  background: var(--kartu);
  border-radius: 10px;
  padding: 24px 18px;
  outline: 1px solid var(--garis);
  outline-offset: -7px;
}
.gift-bank { font-family: var(--f-label); font-weight: 700; font-size: 16px; letter-spacing: .2em; text-transform: uppercase; }
.gift-number { font-family: var(--f-label); font-weight: 600; font-size: 27px; letter-spacing: .08em; margin: 4px 0 0; user-select: all; overflow-wrap: anywhere; }
.gift-name { font-size: 14px; margin-bottom: 14px; }

/* ---------- Penutup & footer ---------- */
.back-top { display: inline-block; margin-top: 34px; color: var(--teks); font-size: 14px; text-underline-offset: 4px; }
.footer { background: var(--biru); color: var(--terang); text-align: center; font-family: var(--f-label); letter-spacing: .18em; font-size: 13px; padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); } /* ruang untuk menu bawah */

/* ---------- Menu navigasi bawah ---------- */
.nav {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 40;
  width: min(calc(100% - 24px), calc(var(--kolom) - 24px));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 162, 58, .45);
  box-shadow: 0 8px 24px rgba(30, 58, 138, .16);
  transform: translate(-50%, 0);
  animation: nav-in .6s ease both;
}
@keyframes nav-in { from { opacity: 0; transform: translate(-50%, 20px); } }
.nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 2px 6px;
  border-radius: 14px;
  color: var(--teks);
  text-decoration: none;
  font-family: var(--f-label);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: .04em;
  line-height: 1.2;
  opacity: .7;
  transition: background .25s, color .25s, opacity .25s;
  -webkit-tap-highlight-color: transparent;
}
.nav svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav a.aktif { background: var(--biru); color: var(--putih); opacity: 1; }
.nav a:focus-visible { outline: 2px solid var(--aksen); outline-offset: 1px; }

/* ---------- Musik & toast ---------- */
.music {
  position: fixed;
  right: max(16px, calc(50% - var(--kolom) / 2 + 16px));
  bottom: calc(92px + env(safe-area-inset-bottom)); /* di atas menu bawah */
  z-index: 40;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--biru);
  color: var(--terang);
  display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(30, 58, 138, .25);
  cursor: pointer;
  opacity: .9;
}
.music[hidden] { display: none; }
.music svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.music.on svg { animation: spin 4s linear infinite; }
.music:not(.on)::after { content: ""; position: absolute; width: 26px; height: 1.7px; background: currentColor; transform: rotate(-45deg); border-radius: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed;
  left: 50%; bottom: calc(150px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  background: var(--teks);
  color: var(--terang);
  font-size: 14px;
  padding: 9px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Animasi muncul ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .cover { transition: opacity .4s; }
  .music.on svg { animation: none; }
  .nav { animation: none; }
}

@media (max-width: 360px) {
  section { padding-left: 20px; padding-right: 20px; }
  .label { letter-spacing: .2em; }
  .event-time { font-size: 27px; }
}
