/* Kupon — ucapan ulang tahun untuk pacar: kotak kado yang dibuka berisi surat dan buku kupon yang bisa dipakai sekali. */
@font-face { font-family: "Instrument Serif"; font-style: normal; src: url("fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; font-style: italic; src: url("fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("fonts/plus-jakarta-sans.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root { --bg: #fff1ec; --ink: #3a0f17; --soft: #96606a; --accent: #d7263d; --gold: #f4b942; --card: #ffffff; --line: #f6cdd1; --btn-ink: #ffffff; --serif: "Instrument Serif", Georgia, serif; --sans: "Plus Jakarta Sans", system-ui, sans-serif; }
/* Tone warna (field "tone"): merah = bawaan di atas. */
:root[data-tone="pink"] { --bg: #ffeef5; --ink: #44122c; --soft: #9a6480; --accent: #e0508c; --gold: #8a5cf6; --line: #f8cbdd; }
:root[data-tone="malam"] { --bg: #101a33; --ink: #f6efe0; --soft: #9aa6c4; --accent: #f4b942; --gold: #ff7a90; --card: #1a2747; --line: #2f3f6b; --btn-ink: #101a33; }

body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 500 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2 { font-family: var(--serif); font-weight: 400; }
em { font-style: italic; color: var(--accent); }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }

.cover h1 { font-size: 46px; line-height: 1.02; }
/* Kotak kado dari CSS: badan, tutup, pita emas; tutup terangkat saat dibuka. */
.gift { position: relative; width: 170px; height: 170px; margin-top: 10px; }
.gift .box { position: absolute; left: 10px; right: 10px; bottom: 0; height: 110px; border-radius: 6px 6px 12px 12px; background: linear-gradient(90deg, transparent 0 calc(50% - 13px), var(--gold) calc(50% - 13px) calc(50% + 13px), transparent calc(50% + 13px)), var(--accent); box-shadow: 0 22px 30px -10px color-mix(in srgb, var(--accent) 55%, transparent); }
.gift .lid { position: absolute; left: 0; right: 0; bottom: 104px; height: 38px; border-radius: 8px; background: linear-gradient(90deg, transparent 0 calc(50% - 13px), var(--gold) calc(50% - 13px) calc(50% + 13px), transparent calc(50% + 13px)), color-mix(in srgb, var(--accent) 86%, #000); transition: transform .8s cubic-bezier(.3, 1.3, .5, 1), opacity .6s .3s; }
.gift .bow { position: absolute; left: 50%; bottom: 138px; width: 0; height: 0; transition: transform .8s cubic-bezier(.3, 1.3, .5, 1), opacity .6s .3s; }
.gift .bow::before, .gift .bow::after { content: ""; position: absolute; bottom: 0; width: 44px; height: 30px; border: 9px solid var(--gold); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
.gift .bow::before { right: 0; transform: rotate(18deg); transform-origin: right bottom; }
.gift .bow::after { left: 0; transform: rotate(-18deg); transform-origin: left bottom; }
.cover:hover .lid, .cover:hover .bow { transform: translateY(-6px) rotate(-2deg); }
.opening .gift .lid, .opening .gift .bow { transform: translateY(-120px) rotate(-16deg); opacity: 0; }
.open { min-height: 50px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--accent); color: var(--btn-ink); font: 700 15px/1 var(--sans); cursor: pointer; animation: napas 2.2s ease-in-out infinite; }

.hero { padding: 26px 0 6px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hero h1 { font-size: 64px; line-height: .98; overflow-wrap: anywhere; }
.age { display: flex; flex-direction: column; align-items: center; }
.age b { font: 400 120px/.9 var(--serif); color: var(--accent); }
.age span { font: italic 400 22px/1.2 var(--serif); }
.card { padding: 26px 22px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); }
.msg { font: 400 22px/1.42 var(--serif); white-space: pre-line; overflow-wrap: anywhere; }
.sign { margin-top: 18px; font: italic 400 28px/1.1 var(--serif); color: var(--accent); text-align: right; }
.sign::before { content: "— "; }

.book h2, .album h2, .reply h2 { font-size: 36px; line-height: 1.05; }
.book h2, .album h2 { text-align: center; }
.hint { margin-top: 8px; font-size: 13px; color: var(--soft); text-align: center; }
.coupons { margin-top: 18px; padding: 0; list-style: none; counter-reset: kupon; display: flex; flex-direction: column; gap: 12px; }
/* Kupon: potongan tiket dengan garis sobek; setelah dipakai memudar dan dicap. */
.coupon { position: relative; width: 100%; min-height: 78px; padding: 0; border: 0; border-radius: 14px; background: var(--card); color: var(--ink); display: flex; align-items: stretch; text-align: left; font: 600 16px/1.3 var(--sans); cursor: pointer; overflow: hidden; box-shadow: 0 8px 18px rgb(0 0 0 / .08); counter-increment: kupon; transition: transform .15s; }
.coupon:active { transform: scale(.98); }
.stub { flex: none; width: 74px; padding: 10px 6px; background: var(--accent); color: var(--btn-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; border-right: 2px dashed var(--card); }
.stub::after { content: counter(kupon, decimal-leading-zero); font: 400 30px/1 var(--serif); letter-spacing: 0; }
.what { flex: 1 1 auto; padding: 14px 16px; display: flex; align-items: center; overflow-wrap: anywhere; }
.used { position: absolute; right: 12px; top: 50%; padding: 4px 10px; border: 2px solid var(--accent); border-radius: 8px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; background: var(--card); transform: translateY(-50%) rotate(-8deg) scale(0); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.coupon[aria-pressed="true"] .stub { background: var(--soft); }
.coupon[aria-pressed="true"] .what { opacity: .45; text-decoration: line-through; }
.coupon[aria-pressed="true"] .used { transform: translateY(-50%) rotate(-8deg) scale(1); }

.album h2 { margin-bottom: 18px; }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photos figure { margin: 0; border-radius: 20px; overflow: hidden; }
.photos figure:first-child { grid-column: 1 / -1; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.photos figure:first-child img { aspect-ratio: 4 / 3; }
.reply h2 { margin-bottom: 14px; }
.reply .hint { text-align: left; }
.btn { min-height: 50px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--accent); color: var(--btn-ink); font: 700 15px/1.2 var(--sans); cursor: pointer; }
.btn.ghost { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-weight: 600; font-size: 14px; }
textarea { border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--ink); font: 500 15px/1.5 var(--sans); }
textarea::placeholder { color: var(--soft); }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
img { max-width: 100%; display: block; }
h1, h2, p, ul, ol, dl, dd { margin: 0; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.js-only { display: none; }
.js .js-only { display: block; }
main { position: relative; max-width: 480px; margin: 0 auto; padding: 0 22px; }

/* Cara dibuka "amplop": sampul diketuk dulu. Tanpa JS sampul dilewati dan semua isi langsung tampil. */
.cover { display: none; min-height: 100vh; min-height: 100svh; padding: 48px 0 40px; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; cursor: pointer; }
.js body[data-opener="amplop"]:not(.opened) .cover { display: flex; }
.js body[data-opener="amplop"]:not(.opened) .content,
.js body[data-opener="amplop"]:not(.opened) .foot { display: none; }
.content { display: flex; flex-direction: column; gap: 26px; padding: 34px 0 54px; }
.opened .content { animation: masuk .7s cubic-bezier(.2, .7, .2, 1) both; }
form { display: flex; flex-direction: column; gap: 12px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
textarea { width: 100%; min-height: 96px; padding: 14px 16px; resize: vertical; }
.music-toggle { position: fixed; top: 14px; right: 14px; z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.music-toggle svg { width: 20px; height: 20px; }
.music-toggle[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--btn-ink); }
.foot { padding: 8px 22px 34px; text-align: center; font-size: 12px; color: var(--soft); }
.anim .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.anim .reveal.in { opacity: 1; transform: none; }
@keyframes masuk { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes napas { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Video unggahan (field video): ditaruh sebelum galeri, bingkai mengikuti warna teks template (currentColor). */
.vk { width: min(100%, 440px); margin: 34px auto; padding: 0 20px; text-align: center; flex-direction: column; align-items: center; justify-content: center; }
.vk-layar { width: 100%; }
.vk-judul { margin: 0 0 12px; font-weight: 700; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; opacity: .85; }
.vk-layar { position: relative; margin: 0; padding: 10px; border-radius: 20px; border: 1px solid color-mix(in srgb, currentColor 28%, transparent); background: color-mix(in srgb, currentColor 7%, transparent); box-shadow: 0 16px 34px rgba(0, 0, 0, .16); }
.vk-layar video { display: block; width: 100%; max-height: 70vh; border-radius: 12px; background: #000; }
.vk-layar figcaption { margin-top: 10px; font-size: 14px; font-style: italic; opacity: .75; }
