/* Mawar — ucapan hari jadi (monthsary & anniversary): mawar 3D yang mekar, satu tangkai per bulan/tahun jadi buket. */
@font-face { font-family: "Cinzel"; src: url("fonts/cinzel.woff2") format("woff2"); font-weight: 400 700; 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; }
@font-face { font-family: "Pinyon Script"; src: url("fonts/pinyon-script.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* --rose, --rose-deep, --rose-light, --leaf, --paper juga dibaca mawar.js untuk warna bunga 3D. */
:root { --bg: #fbf3ea; --bg2: #f1dfd0; --ink: #3b1a1f; --soft: #8a6a66; --accent: #b0122c; --card: #fffaf4; --line: #e6d0bd; --rose: #c8102e; --rose-deep: #6f0a1a; --rose-light: #ef5a70; --leaf: #3f7d4e; --paper: #ead7bd; --btn-ink: #fff8f0; --serif: "Cormorant Garamond", Georgia, serif; --script: "Pinyon Script", "Cormorant Garamond", cursive; --caps: "Cinzel", Georgia, serif; }

/* Tone warna (field "tone"): merah = bawaan di atas. */
:root[data-tone="pink"] { --bg: #fff0f3; --bg2: #ffdbe4; --ink: #4a1f2d; --soft: #99697a; --accent: #c93a70; --card: #ffffff; --line: #f5c6d3; --rose: #f06292; --rose-deep: #b83767; --rose-light: #ffc1d3; --leaf: #5c9a6b; --paper: #fff7e8; }
:root[data-tone="putih"] { --bg: #10231c; --bg2: #1c3b2f; --ink: #f4efe4; --soft: #a5bfb2; --accent: #e9d9b0; --card: #173328; --line: #2f5646; --rose: #f6efe2; --rose-deep: #cbbd9c; --rose-light: #ffffff; --leaf: #6fae7f; --paper: #d9c9a3; --btn-ink: #10231c; }
:root[data-tone="marun"] { --bg: #1f0a10; --bg2: #3a1019; --ink: #fbeee6; --soft: #c9a39d; --accent: #d9b36a; --card: #2b0d16; --line: #5a1d2a; --rose: #9f1239; --rose-deep: #4c0519; --rose-light: #e11d48; --leaf: #4f7a52; --paper: #d9b36a; --btn-ink: #1f0a10; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: radial-gradient(120% 70% at 50% 0%, var(--bg) 0%, var(--bg) 40%, var(--bg2) 100%) fixed; color: var(--ink); font: 500 19px/1.5 var(--serif); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 500; }
em { font-style: italic; color: var(--accent); }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.js-only { display: none; }
.js .js-only { display: block; }
.js .clock.js-only { display: flex; }

/* Adegan 3D: kanvas menempel di layar, isi halaman bergulir di atasnya. Tanpa WebGL kanvas tetap tak terlihat. */
.scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .9s ease; }
.gl .scene { opacity: 1; }
main, footer { position: relative; z-index: 1; }
main { max-width: 480px; margin: 0 auto; padding: 0 24px; }

.hero { min-height: 100vh; min-height: 100svh; padding: 46px 0 40px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.kicker { font: 500 12px/1.4 var(--caps); letter-spacing: .3em; text-transform: uppercase; color: var(--accent); }
.kicker::before, .kicker::after { content: "·"; margin: 0 .6em; opacity: .6; }
.stagebox { flex: 1 1 auto; width: 100%; min-height: 260px; display: grid; place-items: center; }
.icon { width: 150px; height: 150px; color: var(--rose); filter: drop-shadow(0 16px 24px color-mix(in srgb, var(--rose) 35%, transparent)); animation: ayun 3s ease-in-out infinite; }
.gl .icon { visibility: hidden; } /* diganti mawar 3D di kanvas */
.tease { font-size: 46px; line-height: 1.05; }
.tease em { font: 400 58px/1 var(--script); }
.count { display: flex; flex-direction: column; align-items: center; }
.count b { font: 300 138px/.82 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.count span { font: 500 26px/1.1 var(--serif); }
.count em { font: 400 40px/1 var(--script); }
.names { margin-top: 12px; display: inline-flex; align-items: center; gap: 12px; font: 400 34px/1.1 var(--script); overflow-wrap: anywhere; }
.names svg { flex: none; width: 14px; height: 13px; color: var(--rose); }
.since { margin-top: 2px; font-size: 16px; font-style: italic; color: var(--soft); }
.hint { margin-top: 16px; min-height: 48px; padding: 0 26px; border: 1px solid var(--accent); border-radius: 999px; background: transparent; color: var(--accent); font: 500 12px/1 var(--caps); letter-spacing: .2em; text-transform: uppercase; cursor: pointer; animation: napas 2.2s ease-in-out infinite; }

/* Cara dibuka "amplop": kuncup diketuk dulu. Tanpa JS sampul dilewati dan semua isi langsung tampil. */
.cover-only { display: none; }
.js body[data-opener="amplop"]:not(.opened) .cover-only { display: block; }
.js body[data-opener="amplop"]:not(.opened) .open-only,
.js body[data-opener="amplop"]:not(.opened) .content,
.js body[data-opener="amplop"]:not(.opened) footer { display: none; }
.js body[data-opener="amplop"]:not(.opened) .hero { cursor: pointer; }
.opened .open-only { animation: naik .9s cubic-bezier(.2, .7, .2, 1) both; }

.content { display: flex; flex-direction: column; gap: 28px; padding-bottom: 60px; }
.card { padding: 32px 26px; border-radius: 3px; background: color-mix(in srgb, var(--card) 95%, transparent); border: 1px solid var(--line); box-shadow: 0 18px 40px rgb(60 20 20 / .1); }
.lbl { margin-bottom: 16px; font: 500 11px/1.4 var(--caps); letter-spacing: .26em; text-transform: uppercase; color: var(--accent); }

.timer { text-align: center; }
.clock { justify-content: center; gap: 4px; }
.clock div { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.clock b { font: 400 40px/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.clock span { font: 500 10px/1.4 var(--caps); letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }
.static { font-size: 18px; color: var(--soft); }
.static b { font: 400 40px/1 var(--serif); color: var(--ink); }
.orbs { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 17px; font-style: italic; color: var(--soft); }

.letter .lbl { text-align: center; }
.msg { font: 500 22px/1.5 var(--serif); white-space: pre-line; overflow-wrap: anywhere; }
.sign { margin-top: 18px; font: 400 44px/1.1 var(--script); color: var(--accent); text-align: right; }

.album h2, .closing h2, .reply h2 { font-size: 40px; line-height: 1.05; }
.album h2 em, .closing h2 em, .reply h2 em { font: 400 48px/1 var(--script); }
.album h2 { margin: 12px 0 22px; text-align: center; }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.photos figure { margin: 0; border-radius: 999px 999px 3px 3px; overflow: hidden; border: 6px solid var(--card); box-shadow: 0 12px 28px rgb(60 20 20 / .16); }
.photos figure:first-child { grid-column: 1 / -1; justify-self: center; width: 72%; }
.photos img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }

.closing { padding: 40px 0 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.closing h2 { font: 400 52px/1.05 var(--script); color: var(--accent); }
.closing .mini { width: 22px; height: 20px; color: var(--rose); }

.reply { text-align: center; }
.reply h2 { margin-bottom: 18px; }
.note { font-size: 17px; font-style: italic; color: var(--soft); }
form { display: flex; flex-direction: column; gap: 12px; }
.quick { display: flex; flex-direction: column; gap: 8px; }
.btn { min-height: 50px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--accent); color: var(--btn-ink); font: 600 12px/1.2 var(--caps); letter-spacing: .18em; text-transform: uppercase; cursor: pointer; }
.btn.ghost { min-height: 46px; padding: 0 18px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 500 19px/1.2 var(--serif); font-style: italic; letter-spacing: 0; text-transform: none; }
.btn.ghost:hover { border-color: var(--accent); }
textarea { width: 100%; min-height: 96px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 3px; background: color-mix(in srgb, var(--ink) 3%, transparent); color: var(--ink); font: 500 19px/1.4 var(--serif); resize: vertical; }
textarea::placeholder { color: var(--soft); font-style: italic; }

.music-toggle { position: fixed; top: 14px; right: 14px; z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 88%, transparent); 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); }

footer { padding: 8px 22px 34px; text-align: center; font-size: 15px; color: var(--soft); }

/* Isi muncul saat tergulir ke layar (kelas .anim hanya dipasang bila IntersectionObserver tersedia). */
.anim .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.anim .reveal.in { opacity: 1; transform: none; }

@keyframes ayun { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes napas { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
@keyframes naik { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (max-height: 640px) { .count b { font-size: 108px; } .tease { font-size: 38px; } .stagebox { min-height: 200px; } }
@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; }
