/* ==========================================================================
   THEME: DESAIN 45 - GERBANG KETUPAT
   KitoNgundang Wedding Invitation
   Konsep: gerbang masjid di malam Ramadan. Dinding biru tua berbingkai emas, gerbang lengkung runcing
   berdaun dua berlapis kisi, ketupat dan lentera menggantung, kamboja, daun kelapa, siluet masjid,
   tepi lengkung runcing menggantung. Satu momen gerak: dua daun gerbang terbuka ke samping
   dan ketupat berayun saat undangan dibuka.
   ========================================================================== */

:root {
    --bg: #ffffff;
    --ink: #3a2a2a;
    --ink-soft: #6a5a5a;
    --accent: #b0243a;
    --accent-deep: #7a1226;
    --accent-soft: #f6dde0;
    --line: rgba(120, 60, 70, 0.35);
    --card: rgba(255, 255, 255, 0.86);
    --card-edge: #ffffff;
    --sh: 60, 30, 36;
    --btn-a: #c9384f;
    --btn-b: #a01c32;
    --btn-ink: #ffffff;
    --btn-hi: rgba(255, 255, 255, 0.4);
    --nav-bg: rgba(255, 255, 255, 0.95);
    --nav-line: rgba(120, 60, 70, 0.4);
    --nav-ink: #5a3a40;
    --nav-on: #7a1226;
    --nav-ico: #b0243a;
    --music-bg: rgba(255, 255, 255, 0.96);
    --music-ink: #7a1226;
    --music-line: rgba(176, 36, 58, 0.7);
    --lb-bg: rgba(24, 12, 14, 0.94);
    --lb-btn: rgba(122, 18, 38, 0.92);
    --lb-line: rgba(255, 255, 255, 0.55);
    --ok: #1f6a52;
    --no: #9b3a2c;

    --font-display: Georgia, serif;
    --font-body: Georgia, serif;
    --font-arab: 'Amiri', serif;
    --fs: 1.1rem;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-io: cubic-bezier(0.65, 0, 0.25, 1);
    --spring: cubic-bezier(0.34, 1.35, 0.5, 1);

    --vh: 1vh;
    --cover-delay: 2.6s;
}

@supports (height: 100dvh) {
    :root { --vh: 1dvh; }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs);
    font-weight: 500;
    background-color: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.locked {
    overflow: hidden;
    height: 100vh;
}

img {
    display: block;
    max-width: 100%;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.deco {
    pointer-events: none;
    user-select: none;
}

/* ---------- Tombol ---------- */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(180deg, var(--btn-a) 0%, var(--btn-b) 100%);
    color: var(--btn-ink);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: 0.01em;
    line-height: 1.3;
    padding: 0.62rem 1.7rem;
    border: 0;
    border-radius: 100px;
    text-decoration: none;
    cursor: pointer;
    box-shadow:
        0 10px 20px rgba(var(--sh), 0.3),
        inset 0 1px 0 var(--btn-hi);
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.07);
}

.btn:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
}

.btn-small {
    font-size: 0.98rem;
    padding: 0.4rem 1.15rem;
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   SAMPUL (cangkang bersama)
   ========================================================================== */
#cover {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100%;
    max-width: 480px;
    transform: translateX(-50%);
    z-index: 9999;
    overflow: hidden;
    transition: opacity 0.8s ease var(--cover-delay), visibility 0s linear calc(var(--cover-delay) + 0.8s);
}

.cover-stage {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

#cover.opened {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.cover-guest {
    position: relative;
    z-index: 5;
    width: 100%;
    text-align: center;
    transition: opacity 0.5s ease, transform 0.7s var(--ease);
}

.cover-to {
    font-size: 1.05rem;
    line-height: 1.3;
}

.cover-guest-name {
    max-width: 15ch;
    margin: 0 auto;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.cover-note {
    max-width: 27ch;
    margin: 0.25rem auto 0.9rem;
    font-size: 0.98rem;
    line-height: 1.4;
}

.cover-guest > * {
    animation: coverIn 1.2s var(--ease) var(--d, 0.9s) backwards;
}

.cover-guest > :nth-child(1) { --d: 0.9s; }
.cover-guest > :nth-child(2) { --d: 1.05s; }
.cover-guest > :nth-child(3) { --d: 1.2s; }
.cover-guest > :nth-child(4) { --d: 1.35s; }

#cover.opened .cover-guest {
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
}

/* ==========================================================================
   LAYOUT UMUM
   ========================================================================== */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: var(--bg);
    box-shadow: 0 0 50px rgba(var(--sh), 0.28);
}

section,
.closing {
    position: relative;
    padding: 6rem 1.75rem 4.8rem;
    text-align: center;
    overflow: hidden;
}

section > *:not(.deco),
.closing > *:not(.deco) {
    position: relative;
    z-index: 3;
}

.sec-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.6rem, 12.5vw, 3.4rem);
    line-height: 1.15;
    color: var(--accent-deep);
}

.sec-date {
    margin: 0.2rem 0 2.2rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.lead {
    max-width: 30ch;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* ---------- Hero (isi bawah) ---------- */
.hero-rest {
    position: relative;
    z-index: 3;
    padding: 0 1.5rem;
    text-align: center;
}

.ayat {
    width: min(340px, 100%);
    margin: 0 auto;
    padding: 1.3rem 1.2rem 1.1rem;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(var(--sh), 0.12);
}

.ayat-ar {
    font-family: var(--font-arab);
    font-size: 1.25rem;
    line-height: 2.1;
}

.ayat-id {
    margin-top: 0.5rem;
    font-size: 1.03rem;
    line-height: 1.55;
    font-style: italic;
}

.ayat cite {
    display: block;
    margin-top: 0.6rem;
    font-style: normal;
    font-weight: 700;
    color: var(--accent);
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin: 1.8rem 0 1.4rem;
}

.cd-item {
    width: 68px;
    padding: 0.5rem 0 0.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 12px;
    background: var(--card);
    border: 1.5px solid var(--card-edge);
    box-shadow: 0 8px 16px rgba(var(--sh), 0.14);
}

.cd-number {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.25;
    font-variant-numeric: lining-nums tabular-nums;
    color: var(--accent);
}

.cd-label {
    font-size: 0.92rem;
    line-height: 1.3;
}

/* ---------- Pembukaan ---------- */
.salam {
    font-family: var(--font-arab);
    font-size: 1.75rem;
    line-height: 1.9;
    color: var(--accent-deep);
    margin-bottom: 0.7rem;
}

.arch-photo {
    width: min(68vw, 270px);
    aspect-ratio: 3 / 4;
    margin: 2.2rem auto 0;
    padding: 7px;
    border-radius: 999px 999px 16px 16px;
    background: var(--card-edge);
    box-shadow:
        0 0 0 1px var(--line),
        0 18px 30px rgba(var(--sh), 0.24);
}

.arch-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 999px 999px 10px 10px;
    background: var(--accent-soft);
}

/* ---------- Mempelai ---------- */
.round-photo {
    position: relative;
    width: min(58vw, 224px);
    aspect-ratio: 1;
    margin: 0 auto;
}

.round-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: var(--accent-soft);
    border: 5px solid var(--card-edge);
    box-shadow: 0 0 0 1px var(--line), 0 14px 24px rgba(var(--sh), 0.26);
}

.person-name {
    margin-top: 0.8rem;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 3.2rem;
    line-height: 1.15;
    color: var(--accent-deep);
}

.person-full {
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.person-parents {
    font-size: 1.05rem;
    line-height: 1.55;
}

.person-parents strong {
    font-weight: 700;
}

.person .btn {
    margin-top: 0.9rem;
}

.amp {
    font-family: var(--font-display);
    font-size: 3.6rem;
    line-height: 1;
    color: var(--accent);
    margin: 1.8rem 0 1.5rem;
}

/* ---------- Acara ---------- */
.event-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.6rem;
}

.event-card {
    position: relative;
    width: min(88vw, 340px);
    padding: 2.4rem 1.7rem 2.2rem;
    border-radius: 18px;
    background: var(--card);
    border: 1.5px solid var(--card-edge);
    box-shadow: 0 16px 30px rgba(var(--sh), 0.2);
    text-align: center;
}

.event-emblem {
    margin: 0 auto 0.3rem;
}

.event-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 2.3rem;
    line-height: 1.2;
    color: var(--accent-deep);
}

.event-day {
    font-weight: 700;
}

.event-time i {
    margin-right: 6px;
    color: var(--accent);
}

.event-place {
    margin-top: 0.5rem;
    font-weight: 700;
}

.event-addr {
    max-width: 24ch;
    margin: 0 auto 0.95rem;
    font-size: 1rem;
    line-height: 1.4;
}

/* ---------- Susunan acara ---------- */
.rundown {
    list-style: none;
    position: relative;
    max-width: 320px;
    margin: 0 auto;
    padding-left: 1.9rem;
    text-align: left;
}

.rundown::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), rgba(0, 0, 0, 0.08));
    transform-origin: 50% 0;
}

.rundown li {
    position: relative;
    padding-bottom: 1.6rem;
}

.rundown li:last-child {
    padding-bottom: 0;
}

.rundown li::before {
    content: '';
    position: absolute;
    left: -1.9rem;
    top: 8px;
    width: 12px;
    height: 12px;
    margin: -1px 0 0 -1px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--bg);
}

.rd-time {
    display: block;
    font-weight: 700;
    font-size: 1.02rem;
    font-variant-numeric: lining-nums tabular-nums;
    color: var(--accent);
}

.rd-body h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.8rem;
    line-height: 1.15;
}

.rd-body p {
    font-size: 1.02rem;
    line-height: 1.45;
}

/* ---------- Kisah ---------- */
.story-card {
    max-width: 330px;
    margin: 0 auto 2.6rem;
    padding: 0.9rem 0.9rem 1.2rem;
    border-radius: 16px;
    background: var(--card);
    border: 1.5px solid var(--card-edge);
    box-shadow: 0 14px 28px rgba(var(--sh), 0.16);
}

.story-card:last-child {
    margin-bottom: 0;
}

.story-photo {
    position: relative;
    aspect-ratio: 7 / 5;
    border-radius: 10px;
}

.story-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    background: var(--accent-soft);
}

.story-year {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 0.05rem 0.85rem;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.6;
}

.story-card h3 {
    margin-top: 0.8rem;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 2rem;
    line-height: 1.15;
    color: var(--accent-deep);
}

.story-card p {
    margin-top: 0.2rem;
    font-size: 1.03rem;
    line-height: 1.5;
}

/* ---------- Galeri + lightbox ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
    gap: 10px;
    max-width: 360px;
    margin: 0 auto;
}

.g-item {
    padding: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 0;
    border-radius: 12px;
    background: var(--card-edge);
    box-shadow: 0 10px 18px rgba(var(--sh), 0.24);
}

.g-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 9px;
    transition: transform 0.7s var(--ease);
}

.g-item:hover img {
    transform: scale(1.06);
}

.g-tall {
    grid-row: span 2;
}

.g-wide {
    grid-column: span 2;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lb-bg);
}

.lightbox[hidden] {
    display: none;
}

.lb-img {
    max-width: 92vw;
    max-height: 82dvh;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lb-img.swap {
    animation: lbImg 0.45s var(--ease);
}

.lightbox button {
    position: absolute;
    width: 46px;
    height: 46px;
    border: 1px solid var(--lb-line);
    border-radius: 50%;
    background: var(--lb-btn);
    color: #ffffff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.25s ease;
}

.lightbox button:hover {
    transform: scale(1.08);
}

.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 12px; top: 50%; margin-top: -23px; }
.lb-next { right: 12px; top: 50%; margin-top: -23px; }

/* ---------- Tanda kasih ---------- */
.bank-list {
    display: grid;
    gap: 1.2rem;
    max-width: 330px;
    margin: 2rem auto 0;
}

.bank-card {
    padding: 1.3rem 1.2rem 1.4rem;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(var(--sh), 0.16);
}

.bank-name {
    font-weight: 700;
}

.bank-name i {
    margin-right: 6px;
    color: var(--accent);
}

.bank-number {
    margin-top: 0.15rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    font-variant-numeric: lining-nums tabular-nums;
    color: var(--accent-deep);
}

.bank-address {
    margin: 0.3rem auto 0;
    max-width: 22ch;
    line-height: 1.4;
}

.bank-holder {
    margin-bottom: 0.85rem;
    font-size: 1.02rem;
}

/* ---------- RSVP & ucapan ---------- */
.rsvp-form {
    max-width: 330px;
    margin: 0 auto;
    padding: 1.3rem 1.2rem 1.4rem;
    border-radius: 18px;
    background: var(--card);
    border: 1.5px solid var(--card-edge);
    box-shadow: 0 12px 24px rgba(var(--sh), 0.18);
    text-align: left;
}

.field {
    margin-bottom: 1rem;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.field label {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.98rem;
    font-weight: 700;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.02rem;
    color: var(--ink);
}

.field input::placeholder,
.field textarea::placeholder {
    color: #8a7a7a;
}

.field textarea {
    resize: vertical;
}

.wishes-feed {
    max-width: 330px;
    max-height: 380px;
    margin: 2rem auto 0;
    padding: 0.2rem;
    overflow-y: auto;
    display: grid;
    gap: 0.8rem;
    text-align: left;
}

.wish-card {
    padding: 0.8rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    color: var(--ink);
}

.wish-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.6rem;
}

.wish-author {
    font-weight: 700;
    color: var(--accent-deep);
}

.wish-status {
    flex-shrink: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ok);
}

.wish-status-no {
    color: var(--no);
}

.wish-text {
    margin-top: 0.15rem;
    font-size: 1.02rem;
    line-height: 1.45;
}

.wish-new {
    animation: newWish 0.8s var(--ease);
}

/* ---------- Penutup ---------- */
.closing {
    padding: 6rem 1.75rem 11rem;
}

.closing-text {
    max-width: 28ch;
    margin: 0 auto;
}

.closing-salam {
    margin-top: 1rem;
    font-family: var(--font-arab);
    font-size: 1.5rem;
    line-height: 1.9;
    color: var(--accent-deep);
}

.closing-regards {
    margin-top: 0.9rem;
}

.closing-names {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 13vw, 3.6rem);
    line-height: 1.2;
    white-space: nowrap;
    color: var(--accent-deep);
}

.footer-credit {
    margin-top: 1.2rem;
    font-size: 0.96rem;
    line-height: 1.4;
}

.footer-credit .fa-heart {
    color: var(--accent);
}

.footer-credit a {
    color: var(--accent-deep);
    font-weight: 700;
    text-decoration: none;
}

/* ==========================================================================
   MUSIK & NAVIGASI BAWAH (gaya sama dengan desain 16-35)
   ========================================================================== */
#music-btn {
    position: fixed;
    top: 18px;
    right: max(18px, calc(50% - 240px + 18px));
    width: 42px;
    height: 42px;
    border: 1px solid var(--music-line);
    border-radius: 50%;
    background: var(--music-bg);
    color: var(--music-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 14px rgba(var(--sh), 0.32);
    animation: rotateMusic 4s linear infinite;
}

#music-btn.paused {
    animation-play-state: paused;
    opacity: 0.94;
}

#music-btn::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    border: 1px solid var(--music-line);
    opacity: 0;
    pointer-events: none;
}

#music-btn:not(.paused)::after {
    animation: ripple 2.4s var(--ease) infinite;
}

.bottom-nav {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--nav-line);
    border-radius: 50px;
    padding: 0.5rem 1.2rem;
    display: flex;
    gap: clamp(0.7rem, 3.6vw, 1.5rem);
    z-index: 998;
    box-shadow: 0 8px 25px rgba(var(--sh), 0.3);
}

.nav-item {
    color: var(--nav-ink);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.84rem;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    opacity: 0.84;
    transition: color 0.3s, transform 0.3s, opacity 0.3s;
}

.nav-item i {
    font-size: 1.1rem;
}

.nav-item.active,
.nav-item:hover {
    color: var(--nav-on);
    opacity: 1;
    transform: translateY(-2px);
}

.nav-item.active i {
    color: var(--nav-ico);
    animation: navPop 0.55s cubic-bezier(0.34, 1.8, 0.64, 1);
}

body.opened .bottom-nav {
    animation: navIn 1.2s cubic-bezier(0.34, 1.45, 0.64, 1) calc(var(--cover-delay) - 0.4s) backwards;
}

/* ==========================================================================
   ANIMASI
   ========================================================================== */
@keyframes coverIn {
    from { opacity: 0; transform: translateY(18px); filter: blur(5px); }
    to   { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes popIn {
    from { opacity: 0; transform: translateY(22px) scale(0.82); }
    to   { opacity: 1; transform: none; }
}

@keyframes lbImg {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: none; }
}

@keyframes newWish {
    from { opacity: 0; transform: translateY(-14px); background: var(--accent-soft); }
    to   { opacity: 1; transform: none; }
}

@keyframes tick {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: none; }
}

@keyframes rotateMusic {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes ripple {
    from { transform: scale(1); opacity: 0.7; }
    to   { transform: scale(1.9); opacity: 0; }
}

@keyframes navIn {
    from { transform: translate(-50%, 160%); opacity: 0; }
    to   { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes navPop {
    0%   { transform: scale(0.7); }
    60%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* ---------- muncul saat digulir ---------- */
.js [data-reveal] {
    opacity: 0;
    transition:
        opacity 1.2s var(--ease) var(--d, 0s),
        transform 1.4s var(--ease) var(--d, 0s),
        filter 1.2s var(--ease) var(--d, 0s),
        clip-path 1.8s var(--ease) var(--d, 0s);
}

.js [data-reveal="up"] {
    transform: translateY(28px);
    filter: blur(6px);
}

.js [data-reveal="slide"] {
    transform: translateX(-22px);
    filter: blur(4px);
}

.js [data-reveal="card"] {
    transform: translateY(46px) scale(0.95);
    filter: blur(4px);
}

.js [data-reveal="pop"] {
    transform: translateY(22px) scale(0.9);
}

/* irisan awal 1px agar IntersectionObserver selalu menganggapnya berpotongan */
.js [data-reveal="oval"] {
    clip-path: inset(calc(100% - 1px) 0 0 0 round 50%);
}

.js [data-reveal="oval"] img {
    transform: scale(1.18);
    transition: transform 2.4s var(--ease) var(--d, 0s);
}

.js [data-reveal="arch"] {
    clip-path: inset(calc(100% - 1px) 0 0 0 round 999px 999px 16px 16px);
}

.js [data-reveal="arch"] img {
    transform: scale(1.14);
    transition: transform 2.4s var(--ease) var(--d, 0s);
}

.js [data-reveal="write"] {
    clip-path: inset(-30% calc(100% - 1px) -30% -6%);
    transition-duration: 1.2s, 1.4s, 1.2s, 2.2s;
    transition-timing-function: var(--ease), var(--ease), var(--ease), cubic-bezier(0.45, 0.05, 0.25, 1);
}

.js [data-reveal="line"] {
    opacity: 1;
}

.js [data-reveal="line"]::before {
    transform: scaleY(0);
    transition: transform 2.8s var(--ease) var(--d, 0s);
}

.js [data-reveal].in {
    opacity: 1;
}

.js [data-reveal="up"].in,
.js [data-reveal="slide"].in,
.js [data-reveal="card"].in,
.js [data-reveal="pop"].in {
    transform: none;
    filter: none;
}

.js [data-reveal="oval"].in {
    clip-path: inset(0 0 0 0 round 50%);
}

.js [data-reveal="arch"].in {
    clip-path: inset(0 0 0 0 round 999px 999px 16px 16px);
}

.js [data-reveal="oval"].in img,
.js [data-reveal="arch"].in img {
    transform: none;
}

.js [data-reveal="write"].in {
    clip-path: inset(-30% -6% -30% -6%);
}

.js [data-reveal="line"].in::before {
    transform: none;
}

.cd-number.tick {
    animation: tick 0.55s var(--ease);
}

/* ==========================================================================
   KHUSUS DESAIN 45
   ========================================================================== */

:root {
    --bg: #f6f0e4;
    --ink: #1d2d6b;
    --ink-soft: #4a5a8e;
    --accent: #c9a867;
    --accent-deep: #1d2d6b;
    --accent-soft: #e9e2cf;
    --line: rgba(201, 168, 103, 0.8);
    --card: #fffaf0;
    --card-edge: #fffaf0;
    --sh: 8, 14, 44;
    --btn-a: #2c3f8c;
    --btn-b: #14214f;
    --btn-ink: #f6e9b8;
    --btn-hi: rgba(255, 240, 190, 0.45);
    --nav-bg: rgba(252, 247, 236, 0.96);
    --nav-line: rgba(201, 168, 103, 0.9);
    --nav-ink: #4a5a8e;
    --nav-on: #1d2d6b;
    --nav-ico: #b8923f;
    --music-bg: #1d2d6b;
    --music-ink: #f0d489;
    --music-line: rgba(201, 168, 103, 0.95);
    --lb-bg: rgba(8, 12, 36, 0.96);
    --lb-btn: rgba(29, 45, 107, 0.96);
    --lb-line: rgba(201, 168, 103, 0.8);
    --font-display: 'Pinyon Script', 'Brush Script MT', cursive;
    --font-body: 'Lora', Georgia, serif;
    --fs: 1.08rem;
    --cover-delay: 3.2s;

    --navy: #1d2d6b;
    --navy-deep: #12204e;
    --gold: #c9a867;
    --gold-lt: #ecd69a;
    --cream: #f6f0e4;
    --gate-w: min(88vw, 404px);
}

body {
    font-weight: 500;
}

/* ---------- Permukaan ---------- */
.wall {
    background: url('../images/wall.svg') 0 0 / 200px 200px repeat, var(--navy);
    color: #f6efdc;
}

.hall {
    background: url('../images/arabesque.svg') 0 0 / 80px 80px repeat, var(--cream);
    color: var(--navy);
}

.wall .sec-title,
.wall .lead,
.wall .sec-date {
    color: var(--gold-lt);
}

.wall .lead {
    color: #f6efdc;
}

/* tepi: deretan lengkung runcing menggantung */
.edge {
    position: absolute;
    left: 0;
    right: 0;
    top: -1px;
    z-index: 4;
    width: 100%;
    aspect-ratio: 480 / 40;
    -webkit-mask: url('../images/arcade-mask.svg') 0 0 / 100% 100% no-repeat;
    mask: url('../images/arcade-mask.svg') 0 0 / 100% 100% no-repeat;
    filter: drop-shadow(0 1.5px 0 #c9a867);
}

#opening .edge { background: #1d2d6b; }
#couple .edge { background: var(--cream); }
#event .edge { background: #1d2d6b; }
#rundown .edge { background: var(--cream); }
#story .edge { background: #1d2d6b; }
#gallery .edge { background: var(--cream); }
#gift .edge { background: #1d2d6b; }
#wishes .edge { background: var(--cream); }
.closing .edge { background: #1d2d6b; }

section,
.closing {
    padding-top: 6.6rem;
}

/* ---------- Judul ---------- */
.sec-title {
    font-weight: 400;
    font-size: clamp(2.8rem, 13vw, 3.5rem);
    line-height: 1.15;
    color: var(--navy);
}

.sec-title::after {
    content: '';
    display: block;
    width: 190px;
    height: 28px;
    margin: 0.3rem auto 1.7rem;
    background: url('../images/divider.svg') center / contain no-repeat;
}

/* ==========================================================================
   PANGGUNG: gerbang dengan dua daun
   ========================================================================== */
.stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

#home {
    padding: 0 0 3.4rem;
}

#home .stage {
    position: relative;
    height: calc(var(--vh) * 100);
    min-height: 580px;
}

.scene,
.closing-scene {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.palm {
    position: absolute;
    width: clamp(120px, 38vw, 170px);
    height: auto;
}

.palm-tr { top: -10px; right: -12px; transform: scale(-1, -1); transform-origin: 50% 50%; width: clamp(110px, 34vw, 150px); }
.palm-tl { top: -18px; left: -22px; transform: rotate(180deg) scaleX(-1); width: clamp(90px, 28vw, 124px); opacity: 0.9; }
.palm-bl { bottom: -8px; left: -10px; }
.palm-br { bottom: -8px; right: -10px; transform: scaleX(-1); }

.hang {
    position: absolute;
    top: 0;
    transform-origin: 50% 0;
    animation: swing 6s ease-in-out infinite;
    z-index: 3;
}

.lantern { left: 5%; width: clamp(40px, 12vw, 54px); }
.k1 { right: 8%; width: clamp(40px, 12vw, 54px); animation-delay: -2s; }
.k2 { left: 20%; top: -6px; width: clamp(30px, 9vw, 40px); animation-delay: -3.6s; }

.mosque {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: auto;
    opacity: 0.32;
}

.bloom {
    position: absolute;
    width: clamp(34px, 10vw, 46px);
    animation: bloomTurn 14s linear infinite;
}

.b1 { bottom: 4%; left: 10%; }
.b2 { bottom: 9%; right: 8%; width: clamp(28px, 8vw, 38px); animation-direction: reverse; }
.b3 { top: 30%; right: 5%; width: clamp(26px, 8vw, 34px); }

/* gerbang */
.gate {
    position: relative;
    z-index: 3;
    flex: none;
    width: var(--gate-w);
    height: calc(var(--vh) * 61);
    min-height: 400px;
    margin-top: calc(var(--vh) * 4);
    perspective: 1400px;
}

.gate-glow {
    position: absolute;
    inset: 0;
    filter: drop-shadow(0 0 1.2px #e6c878) drop-shadow(0 0 1.2px #e6c878) drop-shadow(0 12px 18px rgba(0, 0, 0, 0.45));
}

.gate-in {
    position: absolute;
    inset: 0;
    clip-path: polygon(0% 100%, 0% 27%, 2.78% 19.7%, 5.56% 16.75%, 8.33% 14.54%, 11.11% 12.72%, 13.89% 11.15%, 16.67% 9.77%, 19.44% 8.53%, 22.22% 7.4%, 25% 6.38%, 27.78% 5.44%, 30.56% 4.57%, 33.33% 3.76%, 36.11% 3.02%, 38.89% 2.32%, 41.67% 1.68%, 44.44% 1.08%, 47.22% 0.52%, 50% 0%, 52.78% 0.52%, 55.56% 1.08%, 58.33% 1.68%, 61.11% 2.32%, 63.89% 3.02%, 66.67% 3.76%, 69.44% 4.57%, 72.22% 5.44%, 75% 6.38%, 77.78% 7.4%, 80.56% 8.53%, 83.33% 9.77%, 86.11% 11.15%, 88.89% 12.72%, 91.67% 14.54%, 94.44% 16.75%, 97.22% 19.7%, 100% 27%, 100% 100%);
    background:
        radial-gradient(ellipse 70% 50% at 50% 30%, rgba(255, 255, 255, 0.7), transparent 70%),
        url('../images/arabesque.svg') 0 0 / 80px 80px repeat,
        var(--cream);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 19%;
}

.in-photo {
    width: 55%;
    aspect-ratio: 3 / 4;
    padding: 4px;
    border-radius: 999px 999px 8px 8px;
    background: #fffaf0;
    box-shadow: 0 0 0 2px #c9a867, 0 10px 18px rgba(8, 14, 44, 0.3);
}

.in-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 999px 999px 4px 4px;
}

.in-names {
    margin-top: 0.7rem;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.5rem, 12vw, 3.2rem);
    line-height: 1.1;
    white-space: nowrap;
    color: var(--navy);
}

.in-date {
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--ink-soft);
}

/* daun gerbang */
.leaves {
    position: absolute;
    inset: 0;
    z-index: 4;
}

.leaf-wrap {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    filter: drop-shadow(0 0 1.2px #e6c878) drop-shadow(0 0 1.2px #e6c878);
}

.leaf-wrap-l { left: 0; transform-origin: 0 50%; }
.leaf-wrap-r { right: 0; transform-origin: 100% 50%; }

.leaf {
    display: block;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 50% 100%, #f0d489 0 5px, transparent 6px),
        url('../images/lattice.svg') 0 0 / 40px 40px repeat,
        var(--navy);
    box-shadow: inset 0 0 0 5px var(--navy), inset 0 0 0 6.5px rgba(201, 168, 103, 0.75);
}

.leaf-l { clip-path: polygon(0% 100%, 0% 27%, 6.25% 19.27%, 12.5% 16.15%, 18.75% 13.82%, 25% 11.91%, 31.25% 10.27%, 37.5% 8.83%, 43.75% 7.54%, 50% 6.38%, 56.25% 5.32%, 62.5% 4.36%, 68.75% 3.48%, 75% 2.66%, 81.25% 1.91%, 87.5% 1.22%, 93.75% 0.59%, 100% 0%, 100% 100%); }
.leaf-r { clip-path: polygon(0% 100%, 0% 0%, 0% 0%, 6.25% 0.59%, 12.5% 1.22%, 18.75% 1.91%, 25% 2.66%, 31.25% 3.48%, 37.5% 4.36%, 43.75% 5.32%, 50% 6.38%, 56.25% 7.54%, 62.5% 8.83%, 68.75% 10.27%, 75% 11.91%, 81.25% 13.82%, 87.5% 16.15%, 93.75% 19.27%, 100% 27%, 100% 100%); }

.leaf-wrap {
    transition: transform 2.2s cubic-bezier(0.55, 0.05, 0.25, 1) 0.5s;
}

#cover.opened .leaf-wrap-l { transform: rotateY(-78deg); }
#cover.opened .leaf-wrap-r { transform: rotateY(78deg); }

/* nama di atas daun, memudar saat daun terbuka */
.seal-names {
    position: absolute;
    left: 0;
    right: 0;
    top: 60%;
    z-index: 6;
    text-align: center;
    transition: opacity 0.7s ease, transform 0.9s var(--ease);
}

#cover.opened .seal-names {
    opacity: 0;
    transform: translateY(-10px);
}

.tag {
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.3em;
    color: #f6efdc;
}

.names {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.5rem, 12vw, 3.2rem);
    line-height: 1.1;
    white-space: nowrap;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.date-banner {
    display: inline-block;
    min-width: 230px;
    margin-top: 0.4rem;
    padding: 0.55rem 1.4rem 0.6rem;
    background: url('../images/banner.svg') center / 100% 100% no-repeat;
    color: #1d2d6b;
    font-weight: 700;
    font-size: 0.92rem;
}

/* ---------- Sampul ---------- */
.cover-stage {
    justify-content: flex-start;
}

.cover-guest {
    margin-top: auto;
    margin-bottom: clamp(36px, calc(var(--vh) * 5), 64px);
    padding: 0 1rem;
}

.cover-to {
    color: #f6efdc;
}

.cover-guest-name {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.4rem, 11vw, 3rem);
    color: var(--gold-lt);
}

.cover-note {
    color: #f6efdc;
    font-size: 0.94rem;
    max-width: 25ch;
}

.btn {
    border: 1px solid var(--gold);
}

/* ---------- Hero ---------- */
.hero-date {
    margin-top: auto;
    margin-bottom: clamp(70px, calc(var(--vh) * 11), 110px);
    position: relative;
    z-index: 5;
    color: var(--gold-lt);
}

.hero-date i {
    animation: nudge 1.9s ease-in-out infinite;
}

.hero-rest {
    margin-top: 2.2rem;
}

.ayat {
    border: 1px solid var(--gold);
    border-radius: 120px 120px 14px 14px;
    background: var(--cream);
    color: var(--navy);
    padding: 2.6rem 1.4rem 1.3rem;
    box-shadow: 0 0 0 4px var(--navy), 0 0 0 5.5px var(--gold);
}

.ayat-id {
    font-size: 1rem;
}

.ayat cite {
    color: #8a6a22;
}

.cd-item {
    border-radius: 40px 40px 8px 8px;
    background: var(--navy-deep);
    border: 1px solid var(--gold);
    color: #f6efdc;
}

.cd-number {
    color: var(--gold-lt);
}

/* ---------- Pembukaan ---------- */
#opening {
    color: var(--navy);
}

.salam {
    color: var(--navy);
}

.arch-photo {
    width: min(58vw, 236px);
    padding: 6px;
    border-radius: 999px 999px 8px 8px;
    background: #fffaf0;
    box-shadow: 0 0 0 3px var(--navy), 0 0 0 4.5px var(--gold), 0 18px 28px rgba(8, 14, 44, 0.35);
}

/* ---------- Mempelai ---------- */
.round-photo {
    width: min(52vw, 204px);
}

.round-photo img {
    border: 4px solid #fffaf0;
    box-shadow: 0 0 0 2px var(--navy), 0 0 0 4px var(--gold), 0 14px 24px rgba(0, 0, 0, 0.4);
}

.person-name {
    font-weight: 400;
    font-size: 3.4rem;
    line-height: 1.05;
    color: var(--gold-lt);
}

.person-full {
    color: #ffffff;
}

.person-parents {
    color: #f6efdc;
}

.amp {
    font-size: 3.6rem;
    color: var(--gold);
}

/* ---------- Acara: gerbang kecil ---------- */
.event-list {
    filter: drop-shadow(0 0 1px #c9a867) drop-shadow(0 14px 14px rgba(0, 0, 0, 0.35));
}

.event-card {
    width: min(100%, 320px);
    padding: 4.4rem 1.7rem 2.3rem;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background:
        url('../images/arabesque.svg') 0 0 / 80px 80px repeat,
        var(--cream);
    color: var(--navy);
    clip-path: polygon(0% 100%, 0% 24%, 2.78% 17.51%, 5.56% 14.89%, 8.33% 12.92%, 11.11% 11.3%, 13.89% 9.91%, 16.67% 8.68%, 19.44% 7.58%, 22.22% 6.58%, 25% 5.67%, 27.78% 4.83%, 30.56% 4.06%, 33.33% 3.34%, 36.11% 2.68%, 38.89% 2.06%, 41.67% 1.49%, 44.44% 0.96%, 47.22% 0.46%, 50% 0%, 52.78% 0.46%, 55.56% 0.96%, 58.33% 1.49%, 61.11% 2.06%, 63.89% 2.68%, 66.67% 3.34%, 69.44% 4.06%, 72.22% 4.83%, 75% 5.67%, 77.78% 6.58%, 80.56% 7.58%, 83.33% 8.68%, 86.11% 9.91%, 88.89% 11.3%, 91.67% 12.92%, 94.44% 14.89%, 97.22% 17.51%, 100% 24%, 100% 100%);
}

.event-emblem {
    width: 50px;
    height: 45px;
    margin: 0 auto 0.2rem;
}

.event-title {
    font-size: 2.5rem;
    line-height: 1.15;
    color: var(--navy);
}

.event-day {
    color: #8a6a22;
}

/* kartu navy di atas bagian krem */
.hall .event-card,
.hall .story-card,
.hall .bank-card {
    background: url('../images/lattice.svg') 0 0 / 40px 40px repeat, var(--navy);
    color: #f6efdc;
}

.hall .event-title,
.hall .story-card h3,
.hall .bank-name,
.hall .bank-number {
    color: var(--gold-lt);
}

.hall .event-day {
    color: var(--gold-lt);
}

.hall .event-card .btn,
.hall .bank-card .btn {
    background: linear-gradient(180deg, #f4de9c, #c19a43);
    color: #1d2d6b;
}

.hall .story-year {
    background: var(--gold);
    color: var(--navy);
}

.hall .story-card {
    box-shadow: 0 0 0 3px var(--cream), 0 0 0 4.5px var(--gold), 0 16px 24px rgba(8, 14, 44, 0.3);
}

/* ---------- Susunan acara ---------- */
.rundown::before {
    width: 1.5px;
    background: linear-gradient(180deg, var(--gold), rgba(201, 168, 103, 0.2));
}

.rundown li::before {
    left: calc(-1.9rem - 3px);
    top: 5px;
    width: 14px;
    height: 14px;
    margin: 0;
    border-radius: 0;
    background: var(--gold);
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
    box-shadow: none;
    outline: none;
}

.rd-time {
    color: var(--gold-lt);
}

.rd-body h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 2.1rem;
    line-height: 1.15;
    color: #ffffff;
}

.rd-body p {
    color: #f6efdc;
}

/* ---------- Kisah ---------- */
.story-card {
    border-radius: 120px 120px 12px 12px;
    padding: 1.6rem 1rem 1.3rem;
    background: var(--cream);
    border: 0;
    box-shadow: 0 0 0 3px var(--navy), 0 0 0 4.5px var(--gold), 0 16px 24px rgba(8, 14, 44, 0.3);
    color: var(--navy);
}

.story-photo,
.story-photo img {
    border-radius: 80px 80px 8px 8px;
}

.story-year {
    left: 50%;
    translate: -50% 0;
    bottom: 10px;
    border-radius: 6px;
    background: var(--navy);
    color: var(--gold-lt);
}

.story-card h3 {
    font-size: 2.3rem;
    line-height: 1.15;
}

/* ---------- Galeri ---------- */
.g-item {
    border-radius: 60px 60px 10px 10px;
    padding: 4px;
    background: #fffaf0;
    box-shadow: 0 0 0 1.5px var(--gold), 0 10px 18px rgba(0, 0, 0, 0.4);
}

.g-item img {
    border-radius: 56px 56px 6px 6px;
}

.g-wide,
.g-wide img {
    border-radius: 12px;
}

/* ---------- Tanda kasih ---------- */
.bank-card {
    border: 0;
    border-radius: 14px;
    background: var(--cream);
    color: var(--navy);
    box-shadow: 0 0 0 3px var(--navy), 0 0 0 4.5px var(--gold), 0 14px 22px rgba(8, 14, 44, 0.3);
}

.bank-name,
.bank-number {
    color: var(--navy);
}

/* ---------- RSVP ---------- */
.rsvp-form {
    border: 0;
    border-radius: 14px;
    background: var(--cream);
    color: var(--navy);
    box-shadow: 0 0 0 3px var(--navy), 0 0 0 4.5px var(--gold);
}

.wish-card {
    border-radius: 12px;
    border: 1px solid var(--gold);
    background: var(--cream);
    color: var(--navy);
}

/* ---------- Penutup ---------- */
.closing {
    padding-bottom: 14rem;
    color: #f6efdc;
}

.closing-scene .mosque {
    opacity: 0.28;
}

.closing-names {
    font-weight: 400;
    font-size: clamp(3rem, 14vw, 3.8rem);
    color: var(--gold-lt);
}

.closing-text,
.closing-regards,
.footer-credit,
.footer-credit a {
    color: #f6efdc;
}

.closing-salam {
    color: var(--gold-lt);
}

.footer-credit .fa-heart {
    color: var(--gold-lt);
}

/* ==========================================================================
   GERAK
   ========================================================================== */
@keyframes swing {
    0%, 100% { transform: rotate(-4deg); }
    50%      { transform: rotate(4deg); }
}

@keyframes bloomTurn {
    to { transform: rotate(360deg); }
}

@keyframes nudge {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
    .leaf-wrap {
        transition: none;
    }
}

/* ==========================================================================
   RESPONSIF & AKSESIBILITAS
   ========================================================================== */
@media (max-height: 700px) {
    .cover-note {
        display: none;
    }
}

@media (max-width: 360px) {
    section,
    .closing {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .bottom-nav {
        padding: 0.45rem 0.9rem;
    }

    .nav-item {
        font-size: 0.78rem;
    }

    .cd-item {
        width: 60px;
    }

    .cd-number {
        font-size: 1.4rem;
    }

    .event-card {
        padding-left: 1.3rem;
        padding-right: 1.3rem;
    }

    .bank-number {
        font-size: 1.3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    #cover.opened {
        display: none;
    }

    .js [data-reveal] {
        opacity: 1;
        clip-path: none;
        transform: none;
        filter: none;
    }

    .js [data-reveal="oval"] img,
    .js [data-reveal="arch"] img,
    .js [data-reveal="line"]::before {
        transform: none;
    }
}
