/* ==========================================================================
   THEME: DESAIN 3 - AMPLOP MAWAR MUDA
   KitoNgundang Wedding Invitation
   Konsep: amplop merah muda berenda. Segel lilin retak dua, penutup renda terangkat, dan kartu bergaris
   keluar dari saku amplop menjadi bingkai foto hero. Gelombang tiga nada antar-bagian, buket peoni berumbai,
   bingkai kapsul berpucuk peoni, kartu acara merah muda berfoto. Satu momen gerak: segel retak, penutup
   terangkat, kartu naik dari saku, amplop turun ke posisi akhir.
   ========================================================================== */

: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 3
   ========================================================================== */

:root {
    --bg: #ffffff;
    --ink: #2a1a1e;
    --ink-soft: #6b4a50;
    --accent: #c9818c;
    --accent-deep: #b06c79;
    --accent-soft: #f2d5d8;
    --line: rgba(166, 124, 131, 0.45);
    --card: rgba(255, 255, 255, 0.92);
    --card-edge: #ffffff;
    --sh: 140, 70, 82;
    --btn-a: #3a2a2e;
    --btn-b: #1d1215;
    --btn-ink: #ffffff;
    --btn-hi: rgba(255, 255, 255, 0.18);
    --nav-bg: rgba(255, 255, 255, 0.95);
    --nav-line: rgba(166, 124, 131, 0.5);
    --nav-ink: #6b4a50;
    --nav-on: #2a1a1e;
    --nav-ico: #c9818c;
    --music-bg: #E6B1B4;
    --music-ink: #2a1a1e;
    --music-line: rgba(255, 255, 255, 0.9);
    --lb-bg: rgba(40, 18, 24, 0.95);
    --lb-btn: rgba(166, 124, 131, 0.95);
    --lb-line: rgba(255, 255, 255, 0.6);
    --font-display: 'Kaushan Script', 'Brush Script MT', cursive;
    --font-body: 'Assistant', 'Segoe UI', sans-serif;
    --font-label: 'Golos Text', 'Assistant', sans-serif;
    --fs: 1.1rem;
    --cover-delay: 3.1s;

    --rose: #E6B1B4;
    --cw: min(60vw, calc(var(--vh) * 28), 240px);
    --ch: calc(var(--cw) * 1.42);
    --ew: min(90vw, calc(var(--cw) * 1.58));
    --eh: calc(var(--ew) / 2);
    --top: clamp(52px, calc(var(--vh) * 8), 84px);
    --lift: calc(var(--vh) * -3);
}

body {
    font-weight: 500;
}

.btn,
.cd-label,
.rd-time,
.event-day,
.nav-item,
.story-year,
.field label {
    font-family: var(--font-label);
}

/* ---------- Permukaan ---------- */
.rose {
    background:
        radial-gradient(ellipse 80% 40% at 50% 8%, rgba(255, 255, 255, 0.5), transparent 70%),
        linear-gradient(180deg, #F2CDCF 0%, #E9B8BB 40%, #E6B1B4 100%);
}

.snow { background: #ffffff; }
.blush { background: #FBEFF0; }
.blush2 { background: #F6DDE0; }
.light { background: #F2D5D8; }

section#rundown.rose,
section#gift.rose {
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.28) 0 1.3px, transparent 1.8px) 0 0 / 20px 20px,
        var(--rose);
}

.edge {
    position: absolute;
    left: 0;
    top: -1px;
    z-index: 2;
    width: 100%;
    height: 56px;
    display: block;
}

section,
.closing {
    padding-top: 7.6rem;
}

.sec-title {
    font-weight: 400;
    font-size: clamp(2.5rem, 12vw, 3.2rem);
    line-height: 1.25;
    color: var(--accent-deep);
}

.sec-title::after {
    content: '';
    display: block;
    width: 170px;
    height: 24px;
    margin: 0.15rem auto 1.5rem;
    background: url('../images/divider.svg') center / contain no-repeat;
}

.rose .sec-title,
.rose .lead,
.rose .sec-date {
    color: #2a1a1e;
}

.rose .sec-title::after {
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

/* ==========================================================================
   PANGGUNG: amplop + kartu
   ========================================================================== */
.stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    padding-top: calc(var(--top) + var(--ch) + var(--eh) * 0.05 + 18px);
    text-align: center;
}

#home {
    padding: 0 0 3.4rem;
}

#home .stage {
    position: relative;
    height: calc(var(--vh) * 100);
    min-height: 560px;
}

.cover-stage {
    justify-content: flex-start;
}

.scene {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.bokeh {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 70%);
}

.k1 { width: 180px; height: 180px; left: -50px; top: 14%; }
.k2 { width: 130px; height: 130px; right: -30px; top: 8%; }
.k3 { width: 220px; height: 220px; left: 30%; bottom: 8%; opacity: 0.7; }

.peony {
    position: absolute;
    right: -52px;
    bottom: calc(var(--vh) * 1);
    width: clamp(110px, 34vw, 150px);
    height: auto;
    rotate: -8deg;
    transform-origin: 80% 100%;
    animation: sway 7s ease-in-out infinite;
}

.sprig-tl {
    position: absolute;
    left: -10px;
    top: 60px;
    width: clamp(46px, 14vw, 64px);
    height: auto;
    rotate: 12deg;
    opacity: 0.95;
}

.sprig-bl {
    position: absolute;
    left: -14px;
    bottom: calc(var(--vh) * 2);
    width: clamp(54px, 17vw, 76px);
    height: auto;
    rotate: -10deg;
}

.petal {
    position: absolute;
    top: -20px;
    width: 14px;
    height: 20px;
    border-radius: 80% 20% 80% 20%;
    background: linear-gradient(135deg, #ffffff, #f8d9dc);
    opacity: 0.75;
    animation: fall 12s linear infinite;
}

.q1 { left: 18%; animation-delay: -2s; }
.q2 { left: 46%; width: 10px; height: 15px; animation-duration: 15s; animation-delay: -7s; }
.q3 { left: 72%; animation-duration: 13s; animation-delay: -4s; }
.q4 { left: 90%; width: 9px; height: 13px; animation-duration: 17s; animation-delay: -11s; }

/* amplop */
.env {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: calc(var(--top) + var(--ch) - var(--eh) * 0.95);
    width: var(--ew);
    height: var(--eh);
    margin-left: calc(var(--ew) / -2);
    perspective: 1200px;
    transition: transform 1.5s var(--ease-io) 0.95s;
    filter: drop-shadow(0 14px 16px rgba(120, 50, 64, 0.28));
}

.env > * {
    position: absolute;
}

.env-back,
.env-front {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.env-back { z-index: 1; }
.env-front { z-index: 5; }

.flap {
    left: 0;
    top: 0;
    width: 100%;
    height: calc(var(--eh) * 124 / 180);
    z-index: 2;
    transform-origin: 50% 0;
    transform-style: preserve-3d;
    transform: rotateX(180deg);
}

.flap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.flap .lining {
    transform: rotateY(180deg);
}

.card {
    left: 50%;
    top: calc(var(--eh) * 0.95 - var(--ch));
    width: var(--cw);
    height: var(--ch);
    margin-left: calc(var(--cw) / -2);
    z-index: 3;
    padding: 7px 7px 0;
    border-radius: 12px;
    background: repeating-linear-gradient(90deg, #f7dfe2 0 7px, #ffffff 7px 14px);
    box-shadow: 0 0 0 1px rgba(166, 124, 131, 0.5), 0 8px 18px rgba(120, 50, 64, 0.25);
    transform-origin: 50% 100%;
    transition: transform 1.25s var(--spring) 0.85s;
}

.card img {
    width: 100%;
    height: 74%;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid #ffffff;
    background: var(--accent-soft);
}

/* sampul: keadaan tertutup (hero = keadaan akhir) */
#cover:not(.opened) .env { transform: translateY(var(--lift)); }
#cover:not(.opened) .flap { transform: none; z-index: 6; }
#cover:not(.opened) .card { transform: scale(0.44); }
#cover:not(.opened) .names,
#cover:not(.opened) .date { opacity: 0; transform: translateY(10px); }

.names,
.date {
    transition: opacity 0.9s ease 1.6s, transform 1s var(--ease) 1.6s;
}

#cover.opened .flap {
    animation: flapOpen 1.05s var(--ease-io) 0.4s both;
}

.env-names {
    left: 0;
    right: 0;
    top: 15%;
    z-index: 7;
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 7.6vw, 2.3rem);
    line-height: 1.2;
    white-space: nowrap;
    text-align: center;
    color: #3a2228;
    transition: opacity 0.4s ease;
}

.seal {
    left: 50%;
    top: 64%;
    width: calc(var(--ew) * 0.17);
    height: auto;
    margin: calc(var(--ew) * -0.085) 0 0 calc(var(--ew) * -0.085);
    z-index: 8;
    overflow: visible;
    filter: drop-shadow(0 3px 3px rgba(80, 30, 40, 0.35));
}

.half {
    transform-box: view-box;
    transform-origin: 32px 32px;
}

#cover.opened .env-names { opacity: 0; }
#cover.opened .h-l { animation: sealL 0.75s cubic-bezier(0.5, 0, 0.9, 0.6) forwards; }
#cover.opened .h-r { animation: sealR 0.75s cubic-bezier(0.5, 0, 0.9, 0.6) forwards; }

.names {
    margin-top: 0;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.2rem, 10.4vw, 3rem);
    line-height: 1.2;
    white-space: nowrap;
    color: #3a2228;
    position: relative;
    z-index: 4;
}

.date {
    position: relative;
    z-index: 4;
    font-family: var(--font-label);
    font-weight: 600;
    font-size: 1rem;
    color: #3a2228;
}

.hero-chev {
    position: relative;
    z-index: 4;
    margin-top: auto;
    margin-bottom: clamp(18px, calc(var(--vh) * 3), 30px);
    color: #3a2228;
    animation: nudge 1.9s ease-in-out infinite;
}

/* ---------- Sampul ---------- */
.cover-guest {
    margin-top: auto;
    margin-bottom: clamp(26px, calc(var(--vh) * 4), 50px);
    padding: 0 1rem;
}

.cover-to {
    color: #3a2228;
    font-family: var(--font-label);
    font-weight: 600;
}

.cover-guest-name {
    font-family: var(--font-display);
    font-size: clamp(2rem, 9.4vw, 2.5rem);
    color: #2a1a1e;
}

.cover-note {
    color: #3a2228;
    font-size: 0.95rem;
}

#cover .btn {
    width: min(100%, 280px);
    background: #efeaea;
    color: #2a1a1e;
    box-shadow: 0 8px 18px rgba(120, 50, 64, 0.28), inset 0 1px 0 #ffffff;
}

/* ---------- Hero (isi bawah) ---------- */
.hero-rest {
    margin-top: 1.6rem;
}

.ayat {
    border: 0;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.45), 0 14px 24px rgba(120, 50, 64, 0.2);
}

.ayat cite {
    color: var(--accent-deep);
    font-family: var(--font-label);
}

.cd-item {
    width: 66px;
    border-radius: 14px;
    background: #1d1215;
    border: 0;
    box-shadow: 0 10px 18px rgba(80, 30, 40, 0.3);
}

.cd-number {
    color: #ffffff;
}

.cd-label {
    color: var(--rose);
    font-weight: 600;
}

/* ---------- Pembukaan ---------- */
.salam {
    color: var(--accent-deep);
}

.arch-photo {
    position: relative;
    width: min(54vw, 214px);
    aspect-ratio: 3 / 4.2;
    padding: 6px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 0 0 1.5px var(--rose), 0 0 0 7px #ffffff, 0 0 0 8.5px var(--rose), 0 18px 28px rgba(120, 50, 64, 0.24);
}

.arch-photo img {
    border-radius: 999px;
}

.arch-photo::before,
.arch-photo::after,
.round-photo::before,
.round-photo::after {
    content: '';
    position: absolute;
    bottom: 6%;
    width: clamp(42px, 13vw, 58px);
    aspect-ratio: 100 / 176;
    background: url('../images/sprig.svg') center / contain no-repeat;
    pointer-events: none;
}

.arch-photo::before,
.round-photo::before { left: calc(clamp(42px, 13vw, 58px) * -1.05); }

.arch-photo::after,
.round-photo::after { right: calc(clamp(42px, 13vw, 58px) * -1.05); scale: -1 1; }

/* ---------- Mempelai ---------- */
.round-photo {
    width: min(46vw, 178px);
    aspect-ratio: 3 / 4.1;
}

.round-photo img {
    border-radius: 999px;
    border: 5px solid #ffffff;
    box-shadow: 0 0 0 1.5px var(--rose), 0 0 0 7px #ffffff, 0 0 0 8.5px var(--rose), 0 16px 24px rgba(120, 50, 64, 0.24);
}

.person-name {
    margin-top: 1.4rem;
    font-weight: 400;
    font-size: 3rem;
    color: var(--accent-deep);
}

.person-full {
    font-family: var(--font-label);
    font-weight: 600;
}

.amp {
    font-size: 3.2rem;
    color: var(--rose);
}

/* ---------- Acara: kartu merah muda berfoto ---------- */
.event-card {
    width: min(100%, 320px);
    padding: 150px 1.5rem 1.7rem;
    border: 0;
    border-radius: 16px;
    background: var(--rose);
    color: #2a1a1e;
    box-shadow: 0 16px 28px rgba(120, 50, 64, 0.22);
    overflow: hidden;
}

.event-card::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 128px;
    background: var(--ph) center / cover no-repeat;
    border-radius: 16px 16px 0 0;
}

.event-card:nth-child(1) { --ph: url('https://images.unsplash.com/photo-1522673607200-164d1b6ce486?q=80&w=640&h=300&auto=format&fit=crop'); }
.event-card:nth-child(2) { --ph: url('https://images.unsplash.com/photo-1519225421980-715cb0215aed?q=80&w=640&h=300&auto=format&fit=crop'); }
.event-card:nth-child(3) { --ph: url('https://images.unsplash.com/photo-1511285560929-80b456fea0bc?q=80&w=640&h=300&auto=format&fit=crop'); }

.event-card .btn {
    position: absolute;
    top: 102px;
    right: 14px;
    padding: 0.3rem 0.95rem;
    background: rgba(255, 255, 255, 0.74);
    color: #2a1a1e;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 10px rgba(80, 30, 40, 0.25);
    font-size: 0.92rem;
}

.event-title {
    font-weight: 400;
    font-size: 2.3rem;
    color: #2a1a1e;
}

.event-day {
    font-weight: 600;
}

.event-time i {
    color: #2a1a1e;
}

.event-addr {
    margin-bottom: 0;
}

/* ---------- Susunan acara ---------- */
.rundown::before {
    left: 5px;
    width: 2px;
    background: #2a1a1e;
}

.rundown li::before {
    left: calc(-1.9rem - 2px);
    top: 5px;
    width: 14px;
    height: 14px;
    background: #2a1a1e;
    box-shadow: 0 0 0 3px #ffffff, 0 0 0 4.5px #2a1a1e;
}

.rd-time {
    color: #2a1a1e;
    font-weight: 700;
}

.rd-body h3 {
    font-size: 1.75rem;
    color: #2a1a1e;
}

.rd-body p {
    color: #3a2228;
}

/* ---------- Kisah ---------- */
.story-card {
    border: 0;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 26px rgba(120, 50, 64, 0.16);
}

.story-photo,
.story-photo img {
    border-radius: 16px;
}

.story-year {
    background: #1d1215;
    color: #ffffff;
}

.story-card h3 {
    font-size: 1.95rem;
}

/* ---------- Galeri ---------- */
.g-item {
    border-radius: 18px;
    padding: 4px;
    box-shadow: 0 0 0 1.5px var(--rose), 0 10px 18px rgba(120, 50, 64, 0.2);
}

.g-item img {
    border-radius: 14px;
}

.g-tall,
.g-tall img {
    border-radius: 999px 999px 18px 18px;
}

/* ---------- Tanda kasih ---------- */
.rose .lead { color: #2a1a1e; }

.bank-card {
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.58);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 24px rgba(120, 50, 64, 0.16);
    color: #2a1a1e;
}

.bank-name i {
    color: #2a1a1e;
}

.bank-number {
    color: #2a1a1e;
}

/* ---------- RSVP ---------- */
.rsvp-form {
    border: 0;
    border-radius: 20px;
    background: var(--rose);
    color: #2a1a1e;
    box-shadow: 0 14px 26px rgba(120, 50, 64, 0.2);
}

.field input,
.field select,
.field textarea {
    border: 0;
    border-radius: 12px;
}

.wish-card {
    border: 0;
    border-radius: 16px;
    background: #ffffff;
}

.wish-author {
    color: var(--accent-deep);
}

/* ---------- Penutup ---------- */
.closing {
    padding-top: 7.4rem;
    padding-bottom: 7.5rem;
    color: #2a1a1e;
}

.env-mini {
    width: 130px;
    height: auto;
    margin: 0 auto 1.2rem;
    filter: drop-shadow(0 10px 12px rgba(120, 50, 64, 0.24));
}

.closing-names {
    font-weight: 400;
    font-size: clamp(2.8rem, 13vw, 3.5rem);
    color: var(--accent-deep);
}

/* ==========================================================================
   GERAK
   ========================================================================== */
@keyframes flapOpen {
    0%   { transform: rotateX(0deg); z-index: 6; }
    46%  { transform: rotateX(84deg); z-index: 6; }
    47%  { z-index: 2; }
    100% { transform: rotateX(180deg); z-index: 2; }
}

@keyframes sealL {
    0%   { transform: none; opacity: 1; }
    35%  { transform: translate(-3px, 1px) rotate(-8deg); opacity: 1; }
    100% { transform: translate(-16px, 70px) rotate(-38deg); opacity: 0; }
}

@keyframes sealR {
    0%   { transform: none; opacity: 1; }
    35%  { transform: translate(3px, 1px) rotate(8deg); opacity: 1; }
    100% { transform: translate(18px, 64px) rotate(34deg); opacity: 0; }
}

@keyframes sway {
    0%, 100% { transform: rotate(-1.5deg); }
    50%      { transform: rotate(2deg); }
}

@keyframes fall {
    from { transform: translate(0, -20px) rotate(0deg); }
    to   { transform: translate(-40px, 110vh) rotate(420deg); }
}

@keyframes nudge {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(6px); }
}

@media (max-width: 360px) {
    .cd-item { width: 58px; }
    .event-card { padding-left: 1.2rem; padding-right: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
    .petal { display: 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;
    }
}
