/* Eropa — pernikahan gaya Eropa klasik: biru malam & emas, lengkung dan daun laurel. */
@font-face { font-family: "Italiana"; src: url("fonts/italiana.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@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: "Cormorant Garamond"; src: url("fonts/cormorant-garamond-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --navy: #16233a;
  --navy-2: #1d2d49;
  --navy-3: #24375a;
  --line: #2d4064;
  --gold: #c9a85c;
  --gold-hi: #e3c77f;
  --gold-lo: #a8873e;
  --ivory: #f3ecdd;
  --sand: #d9cfbb;
  --muted: #b9b1a0;
  --display: "Italiana", "Cormorant Garamond", Georgia, serif;
  --serif: "Cormorant Garamond", Georgia, serif;
}

/* Tone warna (field "tone"): biru-malam = bawaan di atas. */
:root[data-tone="cokelat-sogan"] { --navy: #3a2516; --navy-2: #492f1d; --navy-3: #5a3b24; --line: #64442d; }
:root[data-tone="hijau-zamrud"] { --navy: #163a2b; --navy-2: #1d4936; --navy-3: #245a44; --line: #2d644e; }
:root[data-tone="marun"] { --navy: #3a161c; --navy-2: #491d25; --navy-3: #5a242d; --line: #642d36; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--navy); }
body { margin: 0; background: var(--navy); color: var(--ivory); font: 400 19px/1.55 var(--serif); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
h1, h2, p { margin: 0; }
a { color: var(--gold-hi); }
a:hover { color: #f3e2b0; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.page { max-width: 480px; margin: 0 auto; background: var(--navy); min-height: 100vh; overflow: hidden; }
@media (min-width: 560px) { .page { box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(0, 0, 0, .5); } }

.caps { font: 400 14px/1.4 var(--display); letter-spacing: .42em; text-transform: uppercase; color: var(--gold-hi); }
.caps.ink { color: #7a5f24; }
.lead { font-size: 19px; line-height: 1.6; color: var(--sand); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 24px;
  border: 1px solid var(--gold); background: transparent; color: var(--ivory); text-decoration: none; cursor: pointer;
  font: 400 13px/1 var(--display); letter-spacing: .24em; text-transform: uppercase;
}
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-hi); color: var(--navy); }
.btn-line:hover { background: rgba(201, 168, 92, .12); color: var(--ivory); }
.btn-ink { background: var(--navy); border-color: var(--navy); color: var(--ivory); }
.btn-ink:hover { background: var(--navy-3); color: var(--ivory); }
.btn.copied { background: var(--gold); color: var(--navy); }

/* Sampul */
.cover { min-height: 100vh; min-height: 100svh; padding: 36px 24px 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; text-align: center; background: var(--navy); }
.cover[hidden] { display: none; }
.arch { width: 100%; border: 1px solid var(--gold); border-radius: 172px 172px 0 0; padding: 7px; }
.arch-in { border: 1px solid var(--gold); border-radius: 165px 165px 0 0; padding: 54px 22px 40px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.laurel { position: relative; width: 200px; height: 170px; color: var(--gold); }
.laurel svg { width: 100%; height: 100%; overflow: visible; }
.laurel .mono { position: absolute; left: 0; right: 0; top: 56px; font: 400 44px/1 var(--display); color: var(--ivory); letter-spacing: .04em; }
.cover .names { font: 400 46px/1.05 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.names .amp { display: block; font: italic 400 34px/1.2 var(--serif); text-transform: none; letter-spacing: 0; color: var(--gold-hi); }
.rule { display: block; width: 60px; height: 1px; background: var(--gold); }
.cover-date { font: 400 18px/1.4 var(--display); letter-spacing: .14em; }
.cover-city { font-size: 18px; font-style: italic; color: var(--sand); }
.guest { width: 100%; padding: 18px; border: 1px solid var(--gold); border-top: 0; background: var(--navy-2); display: flex; flex-direction: column; gap: 4px; }
.guest p:first-child { font-size: 15px; font-style: italic; color: var(--sand); }
.guest-name { font-size: 22px; font-weight: 600; overflow-wrap: anywhere; }
.cover .open { margin-top: 28px; }

/* Dengan JS: sampul menjadi gerbang sampai tamu menekan "Buka undangan". */
.js .cover { position: fixed; inset: 0; z-index: 40; overflow-y: auto; transition: transform 1s cubic-bezier(.7, 0, .2, 1), opacity 1s ease; }
.js:not(.is-open) body { overflow: hidden; }
.js.is-open .cover { transform: translateY(-100%); opacity: .6; }
.js.no-anim .cover { transition: none; }
html:not(.js) .cover .open { display: none; }

/* Isi */
.intro { padding: 20px 28px 44px; display: flex; flex-direction: column; align-items: center; gap: 26px; text-align: center; }
.couple { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; width: 100%; }
.person { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.portrait { width: 128px; height: 164px; border-radius: 50%; border: 1px solid var(--gold); padding: 5px; display: flex; }
.portrait > * { flex: 1; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.portrait span { display: flex; align-items: center; justify-content: center; background: var(--navy-3); font: 400 40px/1 var(--display); color: var(--gold-hi); }
.person h2 { font: 400 22px/1.2 var(--display); letter-spacing: .04em; overflow-wrap: anywhere; }
.parents { font-size: 15px; line-height: 1.4; color: var(--sand); }
.ig { font-size: 15px; font-weight: 600; color: var(--gold-hi); overflow-wrap: anywhere; }

.count { padding: 0 24px 44px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; }
.countdown div { border: 1px solid var(--gold); padding: 14px 0; display: flex; flex-direction: column; gap: 2px; }
.countdown b { font: 400 30px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.countdown span { font-size: 15px; font-style: italic; color: var(--sand); }
html:not(.js) .countdown { display: none; }

.programme { margin: 0 24px; background: var(--ivory); color: var(--navy); padding: 8px; }
.paper { border: 1px solid var(--gold-lo); padding: 30px 22px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.pdate { font: 400 26px/1.2 var(--display); }
.rows { width: 100%; display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid #d8c9a4; text-align: left; }
.row:last-child { border-bottom: 1px solid #d8c9a4; }
.row .t { font: 400 22px/1.2 var(--display); }
.row .d { font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
.row strong { font-weight: 600; }
.dress { font-size: 16px; font-style: italic; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.gallery { padding: 48px 24px 24px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
.grid img { width: 100%; height: 150px; object-fit: cover; border: 1px solid var(--gold); border-radius: 60px 60px 0 0; background: var(--navy-2); }
.grid img:nth-child(4n) { grid-column: 1 / -1; height: 200px; border-radius: 0; }

.gifts { margin-top: 24px; padding: 44px 24px; background: var(--navy-2); display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.gift-card { width: 100%; border: 1px solid var(--gold); padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
.bank { font: 400 14px/1.3 var(--display); letter-spacing: .24em; text-transform: uppercase; color: var(--gold-hi); }
.number { font-size: 22px; font-weight: 600; letter-spacing: .06em; overflow-wrap: anywhere; }
.holder { font-size: 15px; color: var(--sand); }
.gift-card .btn { flex-shrink: 0; padding: 0 16px; min-height: 44px; }
.address { width: 100%; padding: 14px; border: 1px solid var(--line); font-size: 16px; line-height: 1.5; color: var(--sand); text-align: left; }

.rsvp { padding: 48px 24px 28px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.note { width: 100%; padding: 14px 16px; border: 1px dashed var(--gold); font-size: 16px; color: var(--sand); }
.thanks { width: 100%; padding: 26px 18px; border: 1px solid var(--gold); display: flex; flex-direction: column; gap: 8px; color: var(--sand); }
.thanks .big { font: 400 30px/1.2 var(--display); color: var(--ivory); }
.form { width: 100%; display: flex; flex-direction: column; gap: 16px; text-align: left; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; font-size: 16px; font-weight: 600; }
.field legend { padding: 0 0 6px; }
.field input, .field textarea { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--gold); border-radius: 0; background: var(--navy-2); color: var(--ivory); font: 400 18px/1.4 var(--serif); }
.field textarea { padding: 12px 14px; min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; box-shadow: 0 0 0 2px var(--gold-hi); }
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opt { position: relative; }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.opt span { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--gold); font: 400 14px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; text-align: center; }
.opt input:checked + span { background: var(--gold); color: var(--navy); }
.opt input:focus-visible + span { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.form .btn { min-height: 50px; }

.wishes-box { padding: 20px 24px 44px; }
.wishes-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.wishes-head h2 { font: 400 28px/1.2 var(--display); letter-spacing: .02em; }
.wishes-head span { font-size: 15px; color: var(--sand); white-space: nowrap; }
.wishes { list-style: none; margin: 12px 0 0; padding: 0; max-height: 560px; overflow-y: auto; }
.wishes li { padding: 14px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.wish-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wish-head b { font-size: 18px; font-weight: 600; }
.tag { padding: 2px 8px; border: 1px solid var(--gold); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-hi); }
.status { font-size: 14px; font-weight: 600; color: var(--gold-hi); }
.wish-text { font-size: 17px; line-height: 1.5; color: var(--sand); overflow-wrap: anywhere; }
.wish-reply { margin-top: 6px; padding: 8px 12px; border-left: 2px solid var(--gold); font-style: italic; color: var(--muted); }

.closing { padding: 40px 24px 36px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.merci { font: 400 40px/1.2 var(--display); letter-spacing: .06em; color: var(--gold-hi); }
.thanks-line { font-size: 17px; font-style: italic; color: var(--sand); }
footer { padding: 18px 16px 26px; text-align: center; font-size: 14px; color: var(--muted); }
footer a { color: var(--gold-hi); }

.music-toggle { position: fixed; bottom: 16px; right: max(14px, calc(50% - 226px)); z-index: 50; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--gold); border-radius: 50%; background: var(--navy); color: var(--gold-hi); cursor: pointer; }
.music-toggle svg { width: 18px; height: 18px; }
.music-toggle[aria-pressed="false"]::after { content: ""; position: absolute; width: 24px; height: 1.5px; background: var(--gold-hi); transform: rotate(-45deg); }
html:not(.js) .music-toggle { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .cover { transition: opacity .3s ease; }
  .js.is-open .cover { transform: none; opacity: 0; }
}

/* Tombol musik muncul setelah undangan dibuka */
.js:not(.is-open) .music-toggle { display: none; }

/* Amplop: beberapa rekening/e-wallet */
.gift-list { display: grid; gap: 14px; width: 100%; }

/* ---------- Animasi ---------- */
.rv { opacity: 0; translate: 0 26px; scale: .96; }
.rv.in { opacity: 1; translate: 0 0; scale: 1; rotate: 0deg; transition: opacity .9s cubic-bezier(.2, .7, .2, 1) calc(var(--d, 0) * 1ms), translate .9s cubic-bezier(.2, .7, .2, 1) calc(var(--d, 0) * 1ms), scale .9s cubic-bezier(.2, .7, .2, 1) calc(var(--d, 0) * 1ms), rotate .9s cubic-bezier(.2, .7, .2, 1) calc(var(--d, 0) * 1ms), clip-path .9s cubic-bezier(.2, .7, .2, 1) calc(var(--d, 0) * 1ms); }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; translate: none; scale: none; rotate: none; clip-path: none; } }

@media (prefers-reduced-motion: no-preference) {
  .laurel { animation: tumbuh 1.4s cubic-bezier(.2, .7, .2, 1) both; }
  .cover .caps { animation: muncul 1.2s .4s both; }
  .cover .names { animation: rapat 1.8s .5s cubic-bezier(.2, .7, .2, 1) both; }
  .rule { animation: garis 1.2s 1s both; }
  .cover-date, .cover-city, .guest { animation: muncul 1.1s 1.2s both; }
  .cover .open { animation: muncul 1s 1.5s both, kilau 3.2s 3s ease-in-out infinite; }
  .btn-gold:hover { transform: translateY(-2px); }
  .countdown b { transition: opacity .3s; }
}
@keyframes tumbuh { from { opacity: 0; scale: .8; rotate: -6deg; } to { opacity: 1; scale: 1; rotate: 0deg; } }
@keyframes rapat { from { opacity: 0; letter-spacing: .4em; } to { opacity: 1; letter-spacing: .08em; } }
@keyframes garis { from { width: 0; } to { width: 60px; } }
@keyframes muncul { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@keyframes kilau { 0%, 100% { box-shadow: 0 0 0 0 rgba(227, 199, 127, 0); } 50% { box-shadow: 0 0 0 8px rgba(227, 199, 127, .18); } }

/* Foto sampul (opsional): lengkung seperti jendela; tinggi menyesuaikan layar supaya tombol "Buka undangan" tetap terjangkau. */
.cover-photo { position: relative; z-index: 1; flex: none; display: block; width: auto; height: clamp(96px, 17svh, 150px); aspect-ratio: 4 / 5; margin: 8px auto 6px; border-radius: 999px 999px 16px 16px; overflow: hidden; border: 3px solid rgba(255, 255, 255, 0.85); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22); }
.cover-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Cover lebih tinggi dari layar (foto sampul + layar pendek): tetap bisa digulir ke tombol "Buka undangan". */
.js body.locked { overflow: visible; }
/* Bentuk foto sampul khas Eropa: lengkung klasik dengan bingkai garis emas ganda. */
.cover-photo { margin: 12px auto 10px; padding: 5px; border: 1px solid var(--gold); border-radius: 999px 999px 4px 4px; background: transparent; box-shadow: none; }
.cover-photo img { border-radius: 999px 999px 2px 2px; }
@media (max-height: 700px) { .cover-photo { display: none; } } /* layar pendek: sampul seperti semula supaya tombol tetap terlihat */
