/* Ulos - Undangan Pernikahan Digital Adat Batak · edisi lukisan
   Warna utama ada di :root. Gambar lukisan ada di folder images. */

:root {
  --bg: #1a0f0d;
  --bg-2: #22130f;
  --card: rgba(36, 19, 15, .82);
  --ink: #f8efe4;
  --muted: #e2cfbf;
  --gold: #d9a85a;
  --gold-2: #f3d99c;
  --accent: #c0322a;
  --line: rgba(222, 176, 104, .42);
  --btn-ink: #1a0f0d;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html.ready { scroll-behavior: smooth; }
body {
  background: linear-gradient(rgba(16, 9, 7, .74), rgba(16, 9, 7, .74)), #120a08 url("images/dinding.webp") center / cover fixed;
  color: var(--ink);
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: "Playfair Display", Georgia, serif; font-weight: 400; line-height: 1.2; }
h2 { font-size: clamp(1.7rem, 7.2vw, 2.15rem); color: var(--gold-2); margin-bottom: .75rem; overflow-wrap: break-word; }
h3 { font-size: 1.45rem; }
strong { font-weight: 600; }
.center { text-align: center; }

.invitation {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  box-shadow: 0 0 80px rgba(0, 0, 0, .6);
}

.eyebrow {
  font-size: .78rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: .6rem;
}
.role { font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: .35rem; }
.names {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: "Great Vibes", "Playfair Display", serif;
  font-weight: 400;
  font-size: 4.2rem;
  line-height: 1.05;
  color: var(--gold-2);
}
.names .and { font-family: "Playfair Display", serif; font-size: .42em; margin: .1em 0; color: var(--ink); }
.names.small { flex-direction: row; gap: .3em; align-items: baseline; justify-content: center; font-size: 2.4rem; }
.date { font-family: "Playfair Display", serif; font-size: 1.15rem; letter-spacing: .06em; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 46px;
  padding: .7rem 1.6rem;
  border: 1px solid var(--gold-2);
  border-radius: 999px;
  background: linear-gradient(180deg, #f1d996, #c9a24a);
  color: var(--btn-ink);
  font: 700 .95rem/1 "Source Sans 3", sans-serif;
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
  transition: transform .2s ease, filter .2s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.98); }
.btn-ghost { background: rgba(30, 16, 13, .5); color: var(--gold-2); box-shadow: none; }

/* ===== Sampul: foto penuh ===== */
.cover {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  padding: calc(3.2rem + env(safe-area-inset-top)) 1.6rem calc(2.4rem + env(safe-area-inset-bottom));
  overflow: hidden;
  isolation: isolate;
  background: #120a08;
}
.cover-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; z-index: -3; }
.cover-shade {
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(180deg, rgba(20, 11, 9, .82) 0%, rgba(20, 11, 9, .25) 30%, rgba(20, 11, 9, 0) 48%, rgba(20, 11, 9, .35) 62%, rgba(20, 11, 9, .92) 86%, rgba(20, 11, 9, .96) 100%);
}
.cover-frame { position: absolute; inset: 14px; border: 1px solid var(--line); border-radius: 14px; z-index: -1; pointer-events: none; }
.cover-frame::before, .cover-frame::after { content: ""; position: absolute; left: 50%; width: 10px; height: 10px; border: 1px solid var(--gold-2); transform: translateX(-50%) rotate(45deg); background: #1a0f0d; }
.cover-frame::before { top: -6px; }
.cover-frame::after { bottom: -6px; }
.cover .names { text-shadow: 0 3px 22px rgba(0, 0, 0, .6); }
.cover .date, .cover .eyebrow { text-shadow: 0 2px 12px rgba(0, 0, 0, .7); }
.guest { margin: 0 auto 1.3rem; max-width: 330px; }
.guest-label { font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-2); }
.guest-name { font-family: "Playfair Display", serif; font-size: 1.6rem; font-weight: 400; margin: .15rem 0 .35rem; }
.guest-note { font-size: .86rem; color: var(--muted); }
.js .cover-photo { transform: scale(1.12); }
.js .cover-top > *, .js .cover-bottom > * { opacity: 0; transform: translateY(16px); }
.ready .cover-photo { transform: none; transition: transform 3.2s cubic-bezier(.2, .7, .2, 1); }
.ready .cover-top > *, .ready .cover-bottom > * {
  opacity: 1; transform: none;
  transition: opacity .9s ease, transform .9s cubic-bezier(.2, .8, .2, 1);
  transition-delay: calc(.5s + var(--i, 0) * .15s);
}
.cover.leaving .cover-top, .cover.leaving .cover-bottom { opacity: 0; transform: translateY(-30px); transition: opacity .4s ease, transform .4s ease; }

/* ===== Halaman utama: lukisan berlapis ===== */
.scene {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  background: #1a0f0d;
}
.sc { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; will-change: transform; }
.sc-sky { background: linear-gradient(180deg, rgba(20, 11, 9, .55), rgba(20, 11, 9, .18) 38%, rgba(20, 11, 9, 0) 55%), url("images/lapis-langit.webp?v=6") 50% 100% / cover no-repeat; }
.sc-danau { object-position: 50% 100%; }
.sc-rumah { object-position: 50% 100%; }
.sc-pinus { object-position: 50% 50%; }
.sc-ulos-atas { object-position: 50% 0; }
.sc-title {
  position: absolute;
  left: 0; right: 0;
  top: 19%;
  text-align: center;
  padding: 0 1.4rem;
  z-index: 1;
}
.scene .sc-danau { z-index: 2; }
.scene .sc-rumah { z-index: 3; }
.scene .sc-pinus { z-index: 4; }
.scene .sc-ulos-atas { z-index: 5; transform-origin: 50% 0; animation: sway 6s ease-in-out infinite alternate; }
.sc-title .names { font-size: 4rem; color: #f6dea6; text-shadow: 0 2px 4px rgba(16, 9, 7, .55), 0 4px 26px rgba(16, 9, 7, .8); }
.sc-title .eyebrow, .sc-title .date { color: #fbf3dd; text-shadow: 0 1px 3px rgba(16, 9, 7, .7), 0 2px 16px rgba(16, 9, 7, .9); }
@keyframes sway { from { rotate: -.6deg; } to { rotate: .6deg; } }
.scroll-hint {
  position: absolute; left: 50%; bottom: calc(5.4rem + env(safe-area-inset-bottom)); z-index: 6;
  width: 26px; height: 42px; margin-left: -13px; border: 1.5px solid var(--gold-2); border-radius: 14px;
}
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold-2); animation: hint 1.8s ease-in-out infinite; }
@keyframes hint { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* Masuknya halaman utama (dipakai animasi pembuka) */
.js .scene .h-anim { opacity: 0; transform: translateY(22px); }
.scene.hero-in .h-anim {
  opacity: 1; transform: none;
  transition: opacity 1s ease, transform 1.1s cubic-bezier(.2, .8, .2, 1);
  transition-delay: calc(var(--d, 0) * .22s);
}
.scene.pre .sc { transition: none !important; }
.scene.pre .sc-sky { transform: scale(1.18) translateY(4%); }
.scene.pre .sc-danau { transform: translateY(16%); }
.scene.pre .sc-rumah { transform: translateY(28%) scale(.86); }
.scene.pre .sc-pinus { transform: scale(1.32); }
.scene.pre .sc-ulos-atas { transform: translateY(-44%); animation: none; }
.scene.go .sc { transition: transform 3.4s cubic-bezier(.16, .74, .22, 1); }
.scene.go .sc-sky { transition-duration: 4s; }
.scene.go .sc-rumah { transition-duration: 3.2s; }
.scene.go .sc-pinus { transition-duration: 3.6s; }

/* ===== Bagian isi ===== */
.section { position: relative; padding: 4.6rem 1.6rem; isolation: isolate; }
.section p { max-width: 36ch; margin-left: auto; margin-right: auto; }
.batik {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(44, 20, 15, .72), rgba(20, 11, 9, .94) 70%),
    url("images/dinding.webp") center / 100% auto repeat-y;
}
.sky {
  background:
    linear-gradient(180deg, rgba(30, 16, 13, .55), rgba(30, 16, 13, .82) 45%, rgba(30, 16, 13, .9)),
    url("images/lapis-langit.webp?v=6") 50% 30% / cover no-repeat;
}
.landscape {
  background:
    linear-gradient(180deg, rgba(30, 16, 13, .92), rgba(30, 16, 13, .55) 50%, rgba(30, 16, 13, .25)),
    url("images/lapis-langit.webp?v=6") 50% 100% / cover no-repeat;
  padding-bottom: 6rem;
}
.landscape::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%; z-index: -1;
  background: url("images/lapis-danau.webp") 50% 100% / cover no-repeat;
  opacity: .9;
}
.garland {
  position: absolute; left: 0; right: 0; top: 0; height: 120px; z-index: 0; pointer-events: none;
  background: url("images/lapis-ulos-atas.webp?v=6") 50% 0 / 100% auto no-repeat;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35));
}
.with-garland { padding-top: 7.6rem; }
.divider { display: block; width: 180px; height: 22px; margin: .4rem auto 1.4rem; color: var(--gold); }
.quote { font-family: "Source Sans 3", sans-serif; font-style: italic; font-size: 1.05rem; line-height: 1.55; max-width: 32ch; margin: 0 auto; }
.cite { margin-top: .9rem; color: var(--gold); font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; }
.lead { margin-bottom: 2rem !important; color: var(--muted); }

.couple { display: grid; gap: .6rem; justify-items: center; }
.person { max-width: 300px; }
.arch {
  width: 220px; aspect-ratio: 3 / 4; margin: 0 auto 1.1rem; padding: 7px;
  border-radius: 999px 999px 18px 18px;
  background: linear-gradient(160deg, #f3dc9a, #a9822f 45%, #f0d48a 70%, #8e6a22);
  box-shadow: var(--shadow);
  position: relative;
}
.arch img { width: 100%; height: 100%; object-fit: cover; border-radius: 999px 999px 12px 12px; }
.arch::after {
  content: ""; position: absolute; left: -26px; right: -26px; top: -30px; height: 76px; pointer-events: none;
  background: url("images/lapis-ulos-atas.webp?v=6") 50% 0 / 200% auto no-repeat;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .4));
}
.person-name { font-size: 2rem; margin-bottom: .3rem; }
.parents { color: var(--muted); font-size: .95rem; }
.siger-icon { display: block; color: var(--gold-2); }
.siger-icon.amp { width: 90px; height: 44px; margin: 1.6rem auto; }
.siger-icon.tiny { width: 64px; height: 31px; margin: 0 auto .6rem; }
.footer .siger-icon { width: 120px; height: 58px; margin: 0 auto 1rem; }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin: 1.4rem auto 0; max-width: 360px; }
.countdown div {
  padding: 1rem .2rem .8rem; border: 1px solid var(--line); border-radius: 999px 999px 12px 12px;
  background: rgba(30, 16, 13, .72); box-shadow: inset 0 0 0 4px rgba(30, 16, 13, .8), inset 0 0 0 5px rgba(216, 180, 94, .25);
}
.countdown strong { display: block; font-family: "Playfair Display", serif; font-size: 2.1rem; line-height: 1; color: var(--gold-2); }
.countdown span { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.countdown-done { margin-top: 1rem; color: var(--gold-2); }

.events { display: grid; gap: 1rem; margin: 1.8rem auto 0; max-width: 380px; }
.event {
  position: relative; text-align: center; padding: 2rem 1.3rem 1.6rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px 999px 18px 18px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: var(--shadow);
}
.event::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(216, 180, 94, .25); border-radius: inherit; pointer-events: none; }
.event h3 { color: var(--gold-2); margin-bottom: .2rem; }
.time { color: var(--muted); margin-bottom: .8rem; }
.place { margin-bottom: 1.2rem; }
.event-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; position: relative; }
.dress { text-align: center; margin: 1.8rem auto 0; max-width: 32ch; padding: 1rem 1.2rem; border-radius: 14px; background: rgba(30, 16, 13, .72); border: 1px solid var(--line); }

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: 1.5rem; }
.gallery figure { padding: 4px; border-radius: 10px; background: linear-gradient(160deg, #f3dc9a, #a9822f 50%, #f0d48a); box-shadow: 0 10px 26px rgba(0, 0, 0, .4); }
.gallery { align-items: start; }
.gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 7px; }
.gallery .g-arch { border-radius: 999px 999px 10px 10px; }
.gallery .g-arch img { aspect-ratio: 3 / 4; border-radius: 999px 999px 7px 7px; }

.rsvp-form { display: grid; gap: .9rem; text-align: left; margin: 1.5rem auto 0; max-width: 380px; padding: 1.4rem; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.rsvp-form label { display: grid; gap: .35rem; font-size: .85rem; color: var(--muted); }
.rsvp-form input, .rsvp-form select, .rsvp-form textarea {
  width: 100%; min-height: 44px; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(20, 11, 9, .65); color: var(--ink); font: inherit;
}
.rsvp-form textarea { resize: vertical; }
.rsvp-form input:focus, .rsvp-form select:focus, .rsvp-form textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.rsvp-form .btn { justify-self: center; margin-top: .4rem; }
.form-error { color: #f0a08f; font-size: .85rem; min-height: 1em; }

.gift-list { display: grid; gap: .9rem; margin: 1.5rem auto 0; max-width: 360px; }
.gift { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.3rem; box-shadow: var(--shadow); }
.bank { color: var(--gold); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; }
.number { font-family: "Playfair Display", serif; font-size: 1.7rem; font-weight: 600; letter-spacing: .04em; margin: .2rem 0; }
.holder { color: var(--muted); font-size: .9rem; margin-bottom: .8rem; }
.copy { min-height: 40px; padding: .5rem 1.1rem; border: 1px solid var(--gold); border-radius: 999px; background: transparent; color: var(--gold-2); font: 600 .85rem "Source Sans 3", sans-serif; cursor: pointer; }

.footer { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-start; padding: 4.6rem 1.6rem 9rem; isolation: isolate; overflow: hidden;
  background: linear-gradient(180deg, rgba(30, 16, 13, .9), rgba(30, 16, 13, .55) 55%, rgba(30, 16, 13, .2)), url("images/lapis-langit.webp?v=6") 50% 100% / cover no-repeat; }
.footer-scene { position: absolute; inset: 0; z-index: -1; }
.footer-text { position: relative; }
.footer .sc-danau, .footer .sc-rumah { object-position: 50% 100%; }
.signoff { margin: 1.2rem auto .6rem; font-size: .95rem; }
.tag { margin-top: .6rem; letter-spacing: .08em; color: var(--muted); }

/* ===== Pembuka: helai kain ulos ditenun lalu terurai ===== */
.gate { position: fixed; inset: 0; z-index: 60; display: none; pointer-events: none; overflow: hidden; }
.gate.show { display: block; pointer-events: auto; animation: gateIn .4s ease both; }
.g-base { position: absolute; inset: 0; background: radial-gradient(80% 60% at 50% 45%, rgba(40, 18, 14, .4), rgba(10, 5, 4, .85)), url("images/dinding.webp") center / cover; transition: opacity .7s ease; }
.g-loom { position: absolute; inset: 0; }
.g-loom span {
  position: absolute; left: 0; right: 0; top: calc(var(--i) * 100% / 9); height: calc(100% / 9 + 1px); overflow: hidden;
  transform: translateX(-104%); box-shadow: 0 6px 12px rgba(0, 0, 0, .45);
  border-bottom: 1px solid rgba(243, 217, 156, .55);
}
.g-loom span:nth-child(even) { transform: translateX(104%); }
.g-loom span::before { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--i) * -100%); height: 900%; background: url("images/kain-ulos.webp") center / cover; }
.g-band { position: absolute; left: 0; right: 0; top: 33%; height: 30%; background: linear-gradient(180deg, rgba(14, 7, 5, 0), rgba(14, 7, 5, .86) 22%, rgba(14, 7, 5, .86) 78%, rgba(14, 7, 5, 0)); opacity: 0; transition: opacity .7s ease; }
.g-mark { position: absolute; left: 50%; top: 37%; width: 170px; height: 85px; margin-left: -85px; color: var(--gold-2); opacity: 0; transform: translateY(14px) scale(.9); transition: opacity .7s ease, transform .9s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .6)); }
.g-word { position: absolute; left: 0; right: 0; top: calc(37% + 100px); text-align: center; font: 600 1.9rem/1 "Playfair Display", serif; letter-spacing: .32em; padding-left: .32em; text-transform: uppercase; color: var(--gold-2); opacity: 0; transition: opacity .7s ease .15s; text-shadow: 0 2px 14px rgba(0, 0, 0, .7); }
.gate.s0 .g-loom span { transform: none; transition: transform .95s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i) * 70ms); }
.gate.s1 .g-band, .gate.s1 .g-mark, .gate.s1 .g-word { opacity: 1; transform: none; }
.gate.s2 .g-band, .gate.s2 .g-mark, .gate.s2 .g-word { opacity: 0; transition-duration: .45s; transition-delay: 0s; }
.gate.s2 .g-base { opacity: 0; }
.gate.s3 .g-loom span { transition: transform 1.5s cubic-bezier(.6, 0, .3, 1); transition-delay: calc(var(--i) * 55ms); transform: translateX(104%); }
.gate.s3 .g-loom span:nth-child(even) { transform: translateX(-104%); }

@keyframes gateIn { from { opacity: 0; } to { opacity: 1; } }
.gate-lock { overflow: hidden; }

/* Upacara adat */
.adat { list-style: none; counter-reset: adat; margin: 1.2rem auto 0; max-width: 400px; text-align: left; }
.adat li { counter-increment: adat; position: relative; padding: 1rem 1.1rem 1rem 4rem; margin-bottom: .7rem; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.adat li::before { content: counter(adat); position: absolute; left: 1rem; top: 1rem; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold-2); font-family: "Playfair Display", serif; }
.adat h3 { color: var(--gold-2); font-size: 1.12rem; margin-bottom: .2rem; }
.adat p { color: var(--muted); font-size: .92rem; margin: 0; }
.salam { font: 400 3.4rem/1 "Great Vibes", serif; color: var(--gold-2); margin: .3rem 0 .2rem; }
.salam-reply { font-family: "Playfair Display", serif; letter-spacing: .3em; text-transform: uppercase; font-size: .85rem; color: var(--gold); }
.salam-mean { color: var(--muted); font-size: .92rem; margin-top: .8rem !important; }
.opening { font-family: "Playfair Display", serif; font-size: 1.05rem; margin: 1.6rem auto 1rem !important; color: var(--gold-2); }
.siger-mark { display: block; width: 120px; height: 58px; margin: 0 auto 1rem; color: var(--gold-2); }

/* ===== Menu bawah, musik, pesan ===== */
.botnav {
  position: fixed; left: 50%; bottom: 0; z-index: 25; width: 100%; max-width: 480px;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px;
  padding: .35rem .35rem calc(.35rem + env(safe-area-inset-bottom));
  background: rgba(30, 16, 13, .92); border-top: 1px solid var(--line); box-shadow: 0 -10px 28px rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transform: translate(-50%, 110%); transition: transform .55s cubic-bezier(.2, .8, .2, 1);
}
.botnav.show { transform: translate(-50%, 0); }
.botnav a { display: grid; justify-items: center; gap: 2px; padding: .35rem 0; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: .62rem; letter-spacing: .06em; }
.botnav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.botnav a.active { color: var(--gold-2); background: rgba(216, 180, 94, .12); }
.has-nav .music-btn { bottom: calc(5rem + env(safe-area-inset-bottom)); }
.music-btn {
  position: fixed; right: max(14px, calc(50% - 226px)); bottom: calc(1.2rem + env(safe-area-inset-bottom)); z-index: 26;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gold); background: rgba(30, 16, 13, .85); color: var(--gold-2);
  font-size: 1.1rem; cursor: pointer; transition: bottom .4s ease;
}
.music-btn.playing { animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; left: 50%; bottom: calc(6rem + env(safe-area-inset-bottom)); z-index: 70;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  padding: .6rem 1.1rem; border-radius: 999px; background: #f1d996; color: #1a0f0d; font-size: .88rem;
  transition: opacity .3s ease, transform .3s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Animasi saat digulir ===== */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
.js .reveal.zoom { transform: scale(.86); }
.js .reveal.left { transform: translateX(-40px); }
.js .reveal.right { transform: translateX(40px); }
.js .reveal.in { opacity: 1; transform: none; }

@media (min-width: 520px) {
  .names { font-size: 4rem; }
  .couple { grid-template-columns: 1fr auto 1fr; align-items: start; gap: .4rem; }
  .arch { width: 180px; }
  .siger-icon.amp { margin-top: 8rem; }
}
@media (prefers-reduced-motion: reduce) {
  html.ready { scroll-behavior: auto; }
  .js .reveal, .js .scene .h-anim { opacity: 1; transform: none; transition: none; }
  .scene .sc-ulos-atas, .music-btn.playing, .scroll-hint span { animation: none; }
}


.muted { color: var(--muted); }
.scene .sc-title { z-index: 6; }

/* Galeri Ulos: foto cetak miring dengan pita kain ulos */
.gallery-polaroid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.2rem 1rem; max-width: 400px; margin: 2.4rem auto 0; padding: 0 .3rem; }
.polaroid { position: relative; padding: 8px 8px 0; background: #f7f0e3; border-radius: 3px; rotate: var(--r, 0deg); box-shadow: 0 16px 30px rgba(0, 0, 0, .55), 0 2px 4px rgba(0, 0, 0, .3); }
.polaroid.big { grid-column: 1 / -1; width: 82%; justify-self: center; padding: 10px 10px 0; }
.polaroid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 1px; }
.polaroid figcaption { padding: .5rem .2rem .7rem; text-align: center; font: 400 1.35rem/1.1 "Great Vibes", cursive; color: #4a2219; }
.polaroid.big figcaption { font-size: 1.7rem; padding: .6rem .2rem .85rem; }
.polaroid::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 58%; height: 22px; margin-left: -29%;
  background: url("images/kain-ulos.webp") 50% 38% / 190% auto; rotate: calc(var(--r, 0deg) * -1.4);
  box-shadow: 0 3px 6px rgba(0, 0, 0, .4); clip-path: polygon(0 0, 100% 0, 97% 50%, 100% 100%, 0 100%, 3% 50%);
}
.polaroid.big::before { width: 46%; margin-left: -23%; height: 26px; top: -14px; }


/* Bagian khas Batak */
.horas { font-family: "Playfair Display", serif; font-weight: 600; font-size: 1.35rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-2); margin-bottom: .5rem; }
.horas.small { font-size: .95rem; margin: 1.4rem 0 0; color: var(--gold); }
.cover .horas { text-shadow: 0 2px 12px rgba(0, 0, 0, .7); }
.salam { font: 400 3rem/1.1 "Great Vibes", serif; color: var(--gold-2); margin: .2rem 0 .4rem; }
.salam-mark { display: block; width: 46px; height: 46px; margin: 0 auto 1rem; color: var(--gold-2); }
.tolu { list-style: none; display: grid; gap: .65rem; max-width: 340px; margin: 1.2rem auto 0; text-align: left; }
.tolu li { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: .8rem 1rem; }
.tolu b { display: block; font-family: "Playfair Display", serif; font-weight: 600; color: var(--gold-2); font-size: 1.05rem; }
.tolu span { color: var(--muted); font-size: .9rem; }
.ulos-strip { display: block; width: 120px; height: 12px; margin: .3rem auto 1.3rem; background: url("images/kain-ulos.webp") 50% 40% / 300% auto; border: 1px solid var(--line); border-radius: 2px; }
.ketupat { display: block; width: 34px; height: 34px; margin: 1.6rem auto; color: var(--gold-2); }
.badge { display: block; width: 28px; height: 28px; margin: 0 auto .6rem; color: var(--gold-2); }
.bolon-mark { display: block; width: 150px; height: 75px; margin: 0 auto 1.1rem; color: var(--gold-2); }
.bolon-mark.small { width: 120px; height: 60px; }
.js .reveal.spin-in { transform: scale(.3) rotate(-90deg); }
.js .reveal.spin-in.in { transform: none; }
.person .muted { font-size: .95rem; }
.sc-rumah { scale: .8; transform-origin: 50% 96%; }
.footer { padding-bottom: calc(40svh + 2.5rem); }
@media (min-width: 520px) { .ketupat { margin-top: 8rem; } }
@media (prefers-reduced-motion: reduce) { .js .reveal.spin-in { transform: none; } }

/* Sampul: foto sedikit turun supaya nama dan tanggal tidak menimpa wajah (bagian kaki tersembunyi di bawah) */
.cover-photo { top: 15%; bottom: auto; height: 100%; object-position: 50% 0; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14%); mask-image: linear-gradient(180deg, transparent 0, #000 14%); }

/* Mempelai: hiasan di atas bingkai memudar di kedua sisi, dan dua kolom tidak melebihi layar di laptop */
.arch::after { left: -14px; right: -14px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%), linear-gradient(180deg, #000 68%, transparent 100%); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%), linear-gradient(180deg, #000 68%, transparent 100%); mask-composite: intersect; }
@media (min-width: 520px) {
  .couple { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: .5rem; }
  .couple > .person { width: 100%; min-width: 0; }
  .couple > svg { max-width: 56px; }
  .arch { width: 100%; max-width: 170px; }
  .arch::after { left: -8px; right: -8px; top: -24px; height: 62px; }
  .person-name { font-size: 1.45rem; }
}

/* Foto mempelai tidak tertutup hiasan: tirai di atas bingkai dihilangkan */
.arch::after { display: none; }

/* Halaman utama: foto pemandangan asli (rumah adat sudah ada di dalam foto) */
.sc-sky { background-position: 50% 100%; }
.scene.pre .sc-sky { transform: scale(1.2); }
.scene.go .sc-sky { transition-duration: 4.2s; }
.landscape::after { display: none; }

/* Penutup: foto pemandangan di bawah teks, ukurannya tetap mengikuti lebar layar */
.footer { background: var(--bg); padding-bottom: calc(min(100vw, 480px) * 1); }
.footer-scene::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; aspect-ratio: 1080 / 1910; background: linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 88%, transparent) 22%, color-mix(in srgb, var(--bg) 45%, transparent) 42%, transparent 58%), url("images/lapis-langit.webp?v=6") 50% 100% / cover no-repeat; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 20%); mask-image: linear-gradient(180deg, transparent 0, #000 20%); }

/* Sampul memenuhi seluruh layar HP, termasuk area di balik bilah Safari iPhone yang melayang,
   sementara nama tamu dan tombol tetap di atas bilah */
.cover { min-height: 100lvh; padding-bottom: calc(2.4rem + env(safe-area-inset-bottom) + 100lvh - 100svh); }

/* Safari iPhone: area di balik bilah bawah ikut gelap seperti sampul (sampul diperpanjang 100px,
   bingkai, foto, dan tombol tetap di posisinya) */
.cover { min-height: calc(100lvh + 100px); padding-bottom: calc(2.4rem + env(safe-area-inset-bottom) + 100lvh - 100svh + 100px); }
.cover-frame { bottom: 114px; }
.cover-photo { height: calc(100% - 100px); }
