/* Studio — undangan pernikahan tema foto serba putih: foto pasangan memudar ke putih, blok abu bertulisan tangan,
   kartu putih, acara berlatar foto, navigasi bawah. */
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-garamond.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("fonts/montserrat.woff2") format("woff2"); font-weight: 300 600; font-display: swap; }
@font-face { font-family: "Parisienne"; src: url("fonts/parisienne.woff2") format("woff2"); font-display: swap; }

:root {
  --page: #d9d9d9;
  --light: #f1f1f1;
  --card: #f4f4f4;
  --grey: #8b8b8b;
  --grey-2: #7e7e7e;
  --grey-btn: #9a9a9a;
  --ink: #1f1f1f;
  --text: #5f5f5f;
  --on-grey: #ffffff;
  --accent: #000000;
  --line: #d9d9d9;
  --shadow: rgba(0, 0, 0, 0.22);
  --serif: "Cormorant Garamond", Georgia, serif;
  --script: "Parisienne", "Snell Roundhand", cursive;
  --body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Tone warna (field "tone"): putih = bawaan di atas. */
:root[data-tone="krem"] { --page: #dfd3c2; --light: #f5efe6; --card: #faf5ec; --grey: #a08f7c; --grey-2: #917f6c; --grey-btn: #ad9c89; --ink: #3a2c22; --text: #6f5f50; --accent: #3a2c22; --line: #e3d7c6; --shadow: rgba(58, 44, 34, 0.24); }
:root[data-tone="abu"] { --page: #cdd5dd; --light: #eef1f4; --card: #f5f7f9; --grey: #7c8997; --grey-2: #6d7a88; --grey-btn: #8c98a5; --ink: #1c2836; --text: #55616e; --accent: #1c2836; --line: #d5dce3; --shadow: rgba(28, 40, 54, 0.24); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--page); }
body { margin: 0; min-height: 100vh; font-family: var(--body); font-size: 13px; font-weight: 400; line-height: 1.6; color: var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
svg { display: block; }
a { color: inherit; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
main { position: relative; max-width: 480px; margin: 0 auto; min-height: 100vh; overflow: hidden; background: var(--light); }
@media (min-width: 560px) { main { box-shadow: 0 30px 90px var(--shadow); } }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.15; margin: 0; }
p { margin: 0 0 0.9em; }
.kecil { font-size: 14px; letter-spacing: 0.06em; margin: 0; }
.tulis { font-family: var(--script); font-weight: 400; }
.serif { font-family: var(--serif); }

/* ---------- Sampul ---------- */
.cover { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; text-align: center; color: var(--ink); background: var(--light); }
.cover-photo { position: absolute; inset: 0 0 26% 0; }
.cover-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; }
.cover-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 52%, color-mix(in srgb, var(--light) 75%, transparent) 80%, var(--light) 97%); }
.cover-photo.kosong { display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, #fff, var(--light) 70%); }
.cover-photo.kosong span { font: 400 120px/1 var(--serif); color: var(--ink); opacity: 0.12; }
.cover-photo.kosong i { font-style: normal; font-size: 0.5em; margin: 0 0.1em; }
.cover-teks { position: relative; padding: 0 26px 90px; display: flex; flex-direction: column; align-items: center; }
.cover h1 { font: 500 clamp(38px, 11.5vw, 48px)/1.15 var(--serif); margin: 4px 0 6px; overflow-wrap: anywhere; text-wrap: balance; }
.kepada { font: 400 15px/1.4 var(--serif); margin: 0 0 8px; }
.guest { font: 700 22px/1.3 var(--serif); margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 22px; border: 0; border-radius: 6px; font: 500 13px/1 var(--body); color: #fff; background: var(--accent); text-decoration: none; cursor: pointer; transition: opacity 0.15s ease, transform 0.15s ease; }
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.putih { background: #fff; color: var(--ink); box-shadow: 0 6px 14px -8px var(--shadow); }
.btn.garis { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85); }
.btn.abu-btn { background: var(--grey-btn); color: #fff; border-radius: 3px; min-height: 36px; padding: 6px 18px; letter-spacing: 0.08em; }
.btn.done { opacity: 0.75; }
.btn:focus-visible, .isian:focus-visible, .grid img:focus-visible { outline: 3px solid color-mix(in srgb, var(--ink) 40%, transparent); outline-offset: 2px; }
.btn.open { margin-top: 26px; min-height: 44px; border-radius: 8px; }

/* Gerbang "Buka undangan": tanpa JS semua isi langsung tampil. */
.js body:not(.opened) .isi, .js body:not(.opened) .tabbar { display: none; }
.opened .cover { display: none; }

/* ---------- Isi ---------- */
.isi { padding-bottom: 0; }
.isi section { position: relative; text-align: center; }
.abu { background: var(--grey); color: var(--on-grey); padding: 46px 26px; }
.abu.tua { background: var(--grey-2); }
.terang { background: var(--light); padding: 46px 22px; }
.abu h3.tulis, .acara h3.tulis { font-size: 34px; line-height: 1.2; margin-bottom: 18px; color: #fff; }
.kartu { background: var(--card); color: var(--text); border-radius: 3px; box-shadow: 0 10px 24px -10px var(--shadow); }

/* Hero: foto memudar ke putih, ranting di kedua sisi, nama tulisan tangan */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; background: var(--light); color: var(--ink); }
.hero-foto { position: absolute; inset: 0 0 20% 0; }
.hero-foto img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; }
.hero-foto::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 34% at 50% 100%, var(--light) 44%, color-mix(in srgb, var(--light) 70%, transparent) 70%, transparent 100%); }
.ranting { position: absolute; width: 74px; height: 148px; color: var(--grey); opacity: 0.6; }
.ranting.kiri { left: -14px; bottom: 6%; rotate: 24deg; }
.ranting.kanan { right: -12px; top: 2%; rotate: 200deg; }
.hero-teks { position: relative; padding: 0 24px 78px; }
.hero h2 { font-size: clamp(46px, 14vw, 60px); line-height: 1.15; margin: 6px 0 8px; overflow-wrap: anywhere; }
.tgl { font-size: 14px; letter-spacing: 0.04em; margin: 0; }

.salam { padding-top: 40px; padding-bottom: 26px; }
.ranting.kecil-r { position: static; width: 26px; height: 52px; margin: 0 auto 14px; color: #fff; opacity: 0.85; }
.salam .opening { font-weight: 500; font-size: 14px; letter-spacing: 0.04em; margin-bottom: 10px; }
.renggang { letter-spacing: 0.14em; font-size: 11.5px; line-height: 1.75; margin: 0; }

/* Mempelai: kartu putih, potret bulat bercincin */
.mempelai { padding-top: 16px; padding-bottom: 34px; display: flex; flex-direction: column; gap: 26px; }
.orang { padding: 44px 22px 40px; }
.bulat { width: 170px; height: 170px; margin: 0 auto 44px; padding: 5px; border-radius: 50%; box-shadow: inset 0 0 0 4px #d3d3d3; display: flex; align-items: center; justify-content: center; background: #fff; }
.bulat img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 16%; border-radius: 50%; }
.bulat span { font: 400 84px/1 var(--script); color: var(--grey); opacity: 0.6; }
.abu .orang h3.tulis { font-size: 34px; color: var(--grey-2); margin-bottom: 22px; overflow-wrap: anywhere; }
.ortu { font-size: 12px; letter-spacing: 0.02em; margin: 0 0 34px; color: var(--ink); }

/* Doa & hitung mundur */
.doa { padding-top: 28px; padding-bottom: 40px; }
.doa p { font-size: 12px; line-height: 1.7; margin: 0; }
.doa .sumber { margin-top: 6px; font-size: 13px; }
.hitung { padding-top: 26px; padding-bottom: 34px; box-shadow: 0 -6px 0 var(--light); }
.hitung h3.tulis { margin-bottom: 14px; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; max-width: 320px; margin: 0 auto; }
.countdown div { padding: 9px 4px 7px; border-radius: 2px; background: rgba(255, 255, 255, 0.16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5); }
.countdown b { display: block; font: 500 16px/1.2 var(--body); font-variant-numeric: tabular-nums; }
.countdown span { font-size: 11px; }

/* Acara: foto pasangan di balik lapisan abu */
.acara { min-height: 460px; padding: 58px 40px 54px; display: flex; align-items: center; background: var(--grey); color: #fff; box-shadow: 0 -6px 0 var(--light); overflow: hidden; }
.acara .latar { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; opacity: 0.42; filter: grayscale(0.35); }
.acara::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--grey) 55%, transparent); }
.acara-isi { position: relative; z-index: 1; width: 100%; }
.kiri-teks .acara-isi { text-align: left; }
.kanan-teks .acara-isi { text-align: right; }
.acara h3.tulis { font-size: 40px; margin-bottom: 18px; }
.when { font-size: 13px; margin: 0 0 24px; }
.pin { width: 38px; height: 38px; margin: 0 0 22px; }
.kanan-teks .pin { margin-left: auto; }
.place { font-size: 12px; line-height: 1.6; max-width: 230px; margin: 0 0 20px; }
.kanan-teks .place { margin-left: auto; }
.time { font-weight: 600; font-size: 13px; margin: 0 0 22px; }
.aksi { display: flex; flex-wrap: wrap; gap: 8px; }
.kanan-teks .aksi { justify-content: flex-end; }

/* Love story: kolase dua foto + cerita */
.kisah { padding-top: 54px; box-shadow: 0 -6px 0 var(--light); }
.kolase { position: relative; height: 330px; margin: 0 6px 40px; }
.kolase img { position: absolute; width: 52%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 16%; border: 4px solid #f3f3f3; box-shadow: 0 14px 26px -12px var(--shadow); }
.kolase .k1 { left: 2%; top: 0; }
.kolase .k2 { right: 2%; bottom: 0; }
.kisah h3.tulis { text-align: left; margin: 0 0 24px 26px; }
.cerita-list { text-align: left; padding: 0 22px; }
.cerita-list article { margin-bottom: 20px; }
.cerita-list h4 { font: 400 22px/1.3 var(--serif); letter-spacing: 0.02em; margin-bottom: 8px; padding-left: 12px; }
.cerita-list h4 small { font: 400 11px/1 var(--body); letter-spacing: 0.08em; opacity: 0.85; margin-left: 6px; }
.cerita-list p { font-size: 11.5px; line-height: 1.6; margin: 0; white-space: pre-line; }

/* Galeri: bingkai putih berisi foto utama + deret foto kecil (tanpa JS: kisi dua kolom) */
.galeri h3 { font-size: 34px; color: var(--ink); margin-bottom: 4px; }
.galeri .sub { font-size: 13px; margin: 0 0 20px; }
.bingkai { padding: 8px; background: #fff; box-shadow: 0 10px 26px -10px var(--shadow); }
.viewer img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; object-position: 50% 16%; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.grid img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 16%; }
.grid.strip { display: flex; gap: 6px; overflow-x: auto; padding-top: 8px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.grid.strip img { flex: none; width: calc((100% - 24px) / 5); aspect-ratio: 1; cursor: pointer; opacity: 0.6; scroll-snap-align: start; transition: opacity 0.2s ease; }
.grid.strip img.on { opacity: 1; }

/* Wedding live & gift */
.siaran { padding-top: 54px; padding-bottom: 10px; }
.kotak { padding: 34px 22px 30px; border: 3px solid #fff; }
.kotak p { font-size: 12px; margin-bottom: 26px; }
.kotak .btn { margin-bottom: 26px; border-radius: 3px; }
.kotak .catatan { margin: 0; }
.kado { padding-top: 60px; padding-bottom: 60px; }
.kado > p { font-size: 12px; margin-bottom: 30px; }
.gift-list { display: grid; gap: 34px; }
.rek { padding: 30px 24px 34px; }
.rek p { margin: 0; }
.bank { font: 700 34px/1.1 var(--serif); letter-spacing: 0.02em; color: var(--ink); text-transform: uppercase; overflow-wrap: anywhere; }
.garis-rek { display: block; height: 2px; margin: 18px 6px 22px; background: var(--grey-2); }
.number { font-size: 12px; font-weight: 500; color: var(--ink); margin-bottom: 14px !important; }
.number b { font-weight: 600; letter-spacing: 0.04em; }
.holder { font-size: 12px; font-weight: 500; color: var(--ink); margin-top: 16px !important; }

/* RSVP: panel abu di atas foto */
.rsvp { padding: 90px 16px; background: var(--light); overflow: hidden; }
.rsvp .latar { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 16%; }
.panel-abu { position: relative; padding: 14px 16px 20px; border-radius: 8px; background: color-mix(in srgb, var(--grey) 94%, transparent); color: #fff; box-shadow: 0 16px 30px -14px var(--shadow); }
.jumlah { font-weight: 600; font-size: 14px; margin: 0 0 10px; }
.hitungan { display: grid; grid-template-columns: repeat(3, 82px); justify-content: center; gap: 16px; margin-bottom: 30px; }
.hitungan div { padding: 9px 4px 8px; border: 1px solid #fff; border-radius: 4px; }
.hitungan b { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; }
.hitungan span { font-size: 9px; }
.rsvp form { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.isian { width: 100%; font: 400 14px/1.4 var(--body); color: var(--ink); background: #fff; border: 0; border-radius: 6px; padding: 9px 14px; min-height: 36px; }
textarea.isian { resize: vertical; min-height: 70px; }
.isian::placeholder { color: #9b9b9b; }
select.isian { color: #7d7d7d; }
.btn.kirim { align-self: flex-start; background: rgba(255, 255, 255, 0.32); border-radius: 3px; min-height: 30px; padding: 6px 24px; font-weight: 600; }
.note { border-radius: 6px; padding: 10px 14px; background: rgba(255, 255, 255, 0.2); font-size: 13px; margin: 0 0 12px; }
.wishes { list-style: none; padding: 0; margin: 18px 0 0; text-align: left; max-height: 380px; overflow-y: auto; }
.wishes li { padding: 10px 12px; margin-bottom: 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.92); color: var(--text); }
.wishes li.pinned { box-shadow: inset 3px 0 0 var(--ink); }
.wishes p { margin: 0; font-size: 12.5px; }
.wishes .who { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; color: var(--ink); }
.hadir { font-size: 9px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
.wish-reply { font-style: italic; margin-top: 4px !important; }

/* Penutup: tiga foto kecil, foto besar memudar, nama tulisan tangan */
.penutup { padding: 20px 0 44px; }
.tiga { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 0 36px 22px; }
.tiga img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 16%; }
.penutup-bg { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 14%; -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 60%, transparent 98%); mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 60%, transparent 98%); }
.penutup-teks { position: relative; padding: 0 34px; }
.penutup-bg + .penutup-teks { margin-top: -26px; }
.penutup p { font-size: 12px; color: var(--text); margin-bottom: 16px; }
.pemisah { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 8px 30px 22px; color: #d94a4a; }
.pemisah::before, .pemisah::after { content: ""; flex: 1; height: 1px; background: var(--ink); opacity: 0.7; }
.pemisah svg { width: 16px; height: 16px; }
.nama { font-size: 36px !important; line-height: 1.2; color: var(--grey-2) !important; margin: 0 !important; overflow-wrap: anywhere; }

footer { text-align: center; font-size: 12px; color: #fff; background: var(--grey); padding: 34px 16px 96px; }
footer a { font-weight: 600; }

/* Navigasi bawah & tombol musik */
.tabbar { position: fixed; left: 50%; bottom: 8px; z-index: 15; transform: translateX(-50%); width: min(456px, calc(100% - 20px)); display: flex; justify-content: space-around; padding: 6px 4px 5px; border-radius: 10px; background: color-mix(in srgb, var(--card) 96%, transparent); box-shadow: 0 6px 18px -6px var(--shadow), 0 0 0 1px rgba(0, 0, 0, 0.05); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 2px 2px; font-size: 10.5px; font-weight: 500; color: var(--grey-2); text-decoration: none; }
.tabbar svg { width: 20px; height: 20px; }
.tabbar a.on { color: var(--ink); }
.music-toggle { position: fixed; right: max(14px, calc(50% - 240px + 14px)); bottom: 68px; z-index: 20; width: 30px; height: 30px; border-radius: 50%; border: 0; background: #fff; color: var(--grey-2); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 12px -4px var(--shadow); }
.music-toggle svg { width: 15px; height: 15px; }
.music-toggle[aria-pressed="true"] svg { animation: putar 4s linear infinite; }
.js body:not(.opened) .music-toggle { bottom: 18px; }

/* ---------- Animasi ---------- */
@keyframes putar { to { transform: rotate(360deg); } }
@keyframes naik { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
@keyframes pudar { from { opacity: 0; } to { opacity: 1; } }
@keyframes zum { from { scale: 1.1; } to { scale: 1; } }

@media (prefers-reduced-motion: no-preference) {
  .cover-photo img { animation: zum 2.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .cover .kecil { animation: naik 0.9s ease 0.3s both; }
  .cover h1 { animation: naik 1s ease 0.45s both; }
  .cover .kepada, .cover .guest { animation: naik 0.9s ease 0.65s both; }
  .cover .btn.open { animation: naik 0.9s ease 0.85s both; }
  .opened .isi { animation: pudar 0.9s ease both; }
  .opened .hero-foto img { animation: zum 2.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .opened .hero-teks > * { animation: naik 0.9s ease 0.4s both; }
  .opened .tabbar { animation: naik 0.7s ease 0.8s both; }
  .rv { opacity: 0; translate: 0 24px; }
  .rv.in { opacity: 1; translate: 0 0; transition: opacity 0.9s ease calc(var(--d, 0) * 1ms), translate 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--d, 0) * 1ms); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Foto tiap kisah cinta (opsional, sub-field stories.photo): polaroid kecil di atas judul, miring bergantian. */
.kisah-foto { margin: 2px 0 14px; padding: 6px 6px 20px; background: #fff; border-radius: 3px; box-shadow: 0 10px 22px rgba(30, 20, 20, .16); rotate: -1.4deg; }
:nth-child(even) > .kisah-foto { rotate: 1.4deg; }
.kisah-foto img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
