@font-face {
    font-family: 'Brittany';
    src: url('fonts/BrittanySignature-MaZx.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Bryndan';
    src: url('fonts/BryndanWriteBook-nGPM.ttf') format('truetype');
    font-display: swap;
}

*{box-sizing:border-box}
:root{--paper:#faf6ec;--ink:#49443b;--muted:#817766;--gold:#b18b45;--gold-dark:#967238;--line:#dfd2b8;--white:#fffdf8}
html{scroll-behavior:smooth}
body{margin:0;background:#eee9de;color:var(--ink);font-family:"DM Sans",Arial,sans-serif;line-height:1.7}
.invitation{width:min(100%,1100px);margin:0 auto;background:var(--paper);background-image:linear-gradient(#faf6ecde,#faf6ecde),url("images/background.png");background-size:auto,675px 1200px;overflow:hidden;box-shadow:0 12px 50px #55452b1c}
.section{padding:clamp(3.2rem,8vw,6.5rem) clamp(1.2rem,7vw,5.5rem);text-align:center;position:relative}
.hero{min-height:min(780px,100svh);display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:2rem;padding-top:4rem;padding-bottom:5rem}
.hero-art{display:flex;justify-content:center;align-items:center}
.couple-art{width:min(100%,440px);max-height:560px;object-fit:contain;filter:drop-shadow(0 10px 18px #76664b1a)}
.hero-copy{padding:1rem}
.eyebrow{font-size:.67rem;letter-spacing:.24em;text-transform:uppercase;color:var(--gold-dark);font-weight:600;margin:0 0 .65rem}
.script-title,.script-heading{font-family:"Allura","Brush Script MT",cursive;font-weight:400;line-height:1.05;color:#b18b45}
.script-title{font-size:clamp(4.5rem,9vw,7.5rem);margin:.1rem 0}
.script-title span{color:var(--ink);font-size:.75em}
.intro{font-family:"Playfair Display",serif;font-size:1rem;margin:.8rem 0 1.5rem}
.gold-button,.outline-button{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;border:1px solid var(--gold);border-radius:99px;padding:.7rem 1.5rem;font-size:.68rem;letter-spacing:.15em;font-weight:600;cursor:pointer;transition:.2s}
.gold-button{background:var(--gold);color:white}
.gold-button:hover{background:var(--gold-dark);transform:translateY(-2px)}
.date-line{font-family:"Playfair Display",serif;letter-spacing:.18em;font-size:.78rem;color:var(--muted);margin-top:1.4rem}
.scroll-note{position:absolute;bottom:1.5rem;left:0;right:0;font-size:.58rem;letter-spacing:.2em;color:#9a8d77}
.scroll-note span{display:block;font-size:1rem}
.quote{max-width:850px;margin:auto;padding-top:4rem;padding-bottom:5rem}
.small-flower{width:95px;height:70px;object-fit:contain;margin-bottom:1rem}
.quote blockquote{font-family:"Playfair Display",serif;font-size:clamp(1rem,2vw,1.3rem);line-height:2;margin:1rem auto;max-width:700px}
.verse{font-family:"Playfair Display",serif;color:var(--gold-dark);font-size:.9rem}
.couple-section{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:2rem;padding-top:3rem;padding-bottom:3rem}
.person{max-width:360px;margin:auto}
.portrait-wrap{width:min(230px,70%);aspect-ratio:4/5;margin:0 auto 1.2rem;display:grid;place-items:center}
.portrait-wrap img{width:100%;height:100%;object-fit:contain}
.script-heading{font-size:clamp(3.2rem,6vw,5rem);margin:.15rem 0 .3rem}
.person h3{font-family:"Playfair Display",serif;font-weight:500;font-size:1rem;margin:.3rem 0}
.person p:not(.eyebrow){font-size:.85rem;color:var(--muted);margin:.5rem 0}
.social{font-size:.76rem;color:var(--gold-dark);text-decoration:none}
.ampersand{font-family:"Allura",cursive;color:var(--gold);font-size:3rem}
.garland{height:clamp(90px,16vw,180px);display:flex;align-items:center;justify-content:center;overflow:hidden}
.garland img{width:100%;height:100%;object-fit:contain;object-position:center}
.events{display:grid;grid-template-columns:1fr 1fr;gap:2rem;padding-top:4rem;padding-bottom:4rem}
.event-card{position:relative;padding:2.2rem 1.5rem;border:1px solid #e7ddc9;background:#fffdf57a;border-radius:180px 180px 18px 18px;min-width:0}
.event-flower{width:75px;height:70px;object-fit:contain;margin-bottom:.6rem}
.event-card .script-heading{font-size:4rem}
.event-card p{font-size:.84rem;margin:.3rem 0;color:var(--muted)}
.event-card .event-date{font-family:"Playfair Display",serif;color:var(--ink);font-size:1rem;margin-top:.8rem}
.event-card .venue-name{margin-top:1rem;color:var(--ink);font-weight:600}
.outline-button{color:var(--gold-dark);margin-top:1.2rem;background:transparent}
.outline-button:hover{background:var(--gold);color:white}
.countdown{padding-top:2rem;padding-bottom:4rem}
.timer{display:flex;justify-content:center;gap:clamp(.6rem,3vw,2rem);margin:1.5rem auto 0}
.timer div{min-width:70px;padding:.7rem .8rem;border:1px solid var(--line);border-radius:12px;background:#fffdf580}
.timer strong{display:block;font-family:"Playfair Display",serif;font-size:clamp(1.5rem,4vw,2.5rem);font-weight:500;color:var(--gold-dark);line-height:1.2}
.timer span{font-size:.65rem;letter-spacing:.1em;color:var(--muted)}
.venue-art{width:100%;padding:0 clamp(1rem,5vw,3rem);margin:0 auto}
.venue-art img{display:block;width:100%;max-height:360px;object-fit:contain}
.adab{padding-top:2rem;padding-bottom:4rem}
.adab-list{max-width:550px;margin:1.5rem auto 0;display:grid;grid-template-columns:1fr 1fr;gap:.8rem}
.adab-list div{font-family:"Playfair Display",serif;font-size:.9rem;padding:.85rem .5rem;border-bottom:1px solid var(--line)}
.adab-list span{color:var(--ink);margin-right:.5rem}
.rsvp-wishes{display:grid;grid-template-columns:1fr 1fr;gap:2rem;text-align:left;padding-top:4rem;padding-bottom:4rem}
.form-panel{padding:clamp(1.2rem,3vw,2rem);border:1px solid var(--line);border-radius:18px;background:#fffdf5a8;min-width:0}
.form-panel>.eyebrow,.form-panel>.script-heading,.form-intro{text-align:center}
.form-intro{font-size:.85rem;color:var(--muted);margin:.4rem 0 1.4rem}
.form-panel form{display:grid;gap:.9rem}
.form-panel label{display:grid;gap:.35rem;font-size:.76rem;font-weight:600;color:var(--ink)}
input,select,textarea{width:100%;font:inherit;font-size:.88rem;color:var(--ink);padding:.8rem .9rem;border:1px solid #d9cdb7;border-radius:10px;background:#fffefa;outline:none}
input:focus,select:focus,textarea:focus{border-color:var(--gold);box-shadow:0 0 0 3px #b18b4520}
textarea{resize:vertical;min-height:100px}
.form-panel button{width:100%;margin-top:.3rem}
.form-status{font-size:.78rem;min-height:1.2em;margin:0;color:#55764e}
.form-status.error{color:#a33d35}
.wishes-list{display:grid;gap:.7rem;margin-top:1.2rem;max-height:340px;overflow:auto}
.wish{border-left:2px solid var(--gold);padding:.5rem .8rem;background:#fffdf7;border-radius:0 8px 8px 0}
.wish strong{font-family:"Playfair Display",serif;font-size:.9rem}
.wish p{font-size:.82rem;margin:.2rem 0;color:var(--muted);overflow-wrap:anywhere}
.empty-wishes{font-size:.8rem;color:var(--muted);text-align:center}
.footer{padding-top:4rem;padding-bottom:3rem;border-top:1px solid var(--line)}
.footer .script-title{font-size:clamp(3.8rem,8vw,6rem)}
.footer>p:not(.eyebrow):not(.thanks){max-width:560px;margin:1rem auto;color:var(--muted);font-family:"Playfair Display",serif;font-size:.9rem}
.thanks{font-family:"Allura",cursive;font-size:2.3rem;color:var(--gold-dark);margin:1rem}
.footer small{font-size:.65rem;color:#9a8d77}
@media(max-width:700px){
  .hero{min-height:auto;grid-template-columns:1fr;gap:.5rem;padding:3.5rem 1.2rem 5rem}
  .couple-art{width:min(74%,300px);max-height:340px}
  .hero-copy{padding:.2rem 0}
  .script-title{font-size:clamp(4.5rem,17vw,6rem)}
  .quote{padding-top:3.5rem;padding-bottom:3.5rem}
  .quote blockquote{line-height:1.8}
  .couple-section{grid-template-columns:1fr;gap:1rem;padding-top:2rem;padding-bottom:2rem}
  .person{width:100%}
  .portrait-wrap{width:min(190px,55vw)}
  .ampersand{font-size:2rem;line-height:1}
  .garland{height:100px}
  .events{grid-template-columns:1fr;gap:1.2rem;padding-top:2.5rem;padding-bottom:2.5rem}
  .event-card{border-radius:130px 130px 16px 16px;padding:2rem 1rem}
  .event-card .script-heading{font-size:3.6rem}
  .adab-list{grid-template-columns:1fr;gap:.2rem}
  .rsvp-wishes{grid-template-columns:1fr;gap:1.2rem;padding-top:2.5rem;padding-bottom:2.5rem}
  .form-panel{padding:1.2rem}
  .venue-art{padding:0 .5rem}
}
@media(max-width:380px){
  .timer{gap:.35rem}
  .timer div{min-width:58px;padding:.55rem .35rem}
  .timer span{font-size:.58rem}
  .event-card{padding-left:.8rem;padding-right:.8rem}
  .script-heading{font-size:3rem}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* Font utama untuk seluruh elemen */
body,
body * {
    font-family: 'Bryndan', cursive !important;
}

/* Font khusus judul besar */
.script-title,
.script-heading {
    font-family: 'Brittany', cursive !important;
}



/* =========================
   WEDDING GIFT
========================= */

.wedding-gift {
    text-align: center;
    padding: 60px 20px;
}

.wedding-gift h2 {
    margin-bottom: 20px;
}

.gift-description {
    max-width: 420px;
    margin: 0 auto 35px;
    line-height: 1.8;
    color: var(--muted);
}

.bank-cards {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    width: 100%;
}

.bank-card {
    width: 100%;
    max-width: 380px;
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fffdf5a8;
    color: var(--ink);
    text-align: left;
    box-shadow: 0 5px 18px #55452b0d;
    box-sizing: border-box;
}

.bank-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

.bank-name {
    font-size: 1.25rem;
    font-weight: bold;
    letter-spacing: 1px;
    color: var(--gold-dark);
}

.bank-label {
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.account-number {
    font-size: clamp(1.35rem, 5vw, 1.7rem);
    font-weight: bold;
    letter-spacing: 2px;
    color: var(--ink);
    margin-bottom: 18px;
    overflow-wrap: anywhere;
}

.account-holder {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 25px;
}

.account-holder span {
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.account-holder strong {
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: var(--ink);
}

.copy-account-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    border: 1px solid var(--gold);
    border-radius: 99px;
    background: var(--gold);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: 0.2s;
}

.copy-account-btn:hover {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
}

.copy-account-btn:active {
    transform: scale(0.98);
}

.copy-account-btn.copied {
    background: #55764e;
    border-color: #55764e;
    color: white;
}

@media (min-width: 768px) {
    .bank-cards {
        flex-direction: row;
        justify-content: center;
        align-items: stretch;
        flex-wrap: wrap;
    }

    .bank-card {
        flex: 0 1 360px;
    }
}


/* =========================
   SCROLL REVEAL ANIMATIONS
   ========================= */

/* Elemen hanya disembunyikan setelah JavaScript siap, agar konten tetap terlihat
   jika JavaScript tidak berjalan atau browser tidak mendukung observer. */
.js-reveal .reveal,
.js-reveal .reveal-left,
.js-reveal .reveal-right,
.js-reveal .reveal-zoom {
    opacity: 0;
    transition:
        opacity 700ms ease,
        transform 700ms cubic-bezier(.2, .7, .2, 1);
    will-change: opacity, transform;
}

.js-reveal .reveal {
    transform: translate3d(0, 32px, 0);
}

.js-reveal .reveal-left {
    transform: translate3d(-42px, 0, 0);
}

.js-reveal .reveal-right {
    transform: translate3d(42px, 0, 0);
}

.js-reveal .reveal-zoom {
    transform: scale(.94);
}

.js-reveal .reveal.is-visible,
.js-reveal .reveal-left.is-visible,
.js-reveal .reveal-right.is-visible,
.js-reveal .reveal-zoom.is-visible {
    opacity: 1;
    transform: none;
}

/* Sedikit jeda agar elemen dalam satu kelompok tidak muncul serentak. */
.person:nth-child(2) { transition-delay: 120ms; }
.event-card:nth-child(2) { transition-delay: 140ms; }
.bank-card:nth-child(2) { transition-delay: 140ms; }

@media (prefers-reduced-motion: reduce) {
    .js-reveal .reveal,
    .js-reveal .reveal-left,
    .js-reveal .reveal-right,
    .js-reveal .reveal-zoom {
        opacity: 1;
        transform: none;
        transition: none;
        will-change: auto;
    }
}


/* =========================
   OPENING COVER & BACKGROUND MUSIC
   ========================= */
body.invitation-locked {
    overflow: hidden;
}

.invitation {
    opacity: 1;
    transition: opacity 700ms ease;
}

body.invitation-locked .invitation {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.invitation-cover {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    overflow-y: auto;
    padding: 28px 18px;
    text-align: center;
    color: var(--ink);
    background-color: var(--paper);
    background-image: linear-gradient(#faf6eceb, #faf6eceb), url("images/background.png");
    background-size: auto, 675px 1200px;
    opacity: 1;
    visibility: visible;
    transition: opacity 750ms ease, visibility 750ms ease;
}

.invitation-cover::before,
.invitation-cover::after {
    content: "";
    position: absolute;
    width: min(28vw, 210px);
    height: min(28vw, 210px);
    border: 1px solid #b18b4545;
    border-radius: 50%;
    pointer-events: none;
}

.invitation-cover::before { top: -95px; left: -95px; }
.invitation-cover::after { bottom: -95px; right: -95px; }

.cover-content {
    position: relative;
    z-index: 1;
    width: min(100%, 480px);
    padding: clamp(24px, 5vh, 48px) 22px;
    border: 1px solid var(--line);
    border-radius: 220px 220px 22px 22px;
    background: #fffdf5c9;
    box-shadow: 0 12px 45px #55452b12;
}

.cover-couple {
    display: block;
    width: min(48%, 190px);
    max-height: 190px;
    object-fit: contain;
    margin: 8px auto 0;
}

.cover-title {
    font-size: clamp(4rem, 12vw, 6.3rem);
    margin: 2px 0 0;
}

.cover-date {
    margin: 5px 0 18px;
    color: var(--gold-dark);
    font-size: .72rem;
    letter-spacing: .2em;
}

.cover-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    width: min(180px, 65%);
    margin: 14px auto;
    color: var(--gold);
}
.cover-divider::before, .cover-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--line);
}

.cover-recipient {
    margin: 14px 0 5px;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.8;
}
.cover-recipient strong {
    color: var(--ink);
    font-size: .95rem;
}
.cover-instruction {
    max-width: 320px;
    margin: 10px auto 20px;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.8;
}
.open-invitation-btn {
    gap: 9px;
    min-height: 46px;
    padding-inline: 24px;
}
.cover-footer {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    z-index: 1;
    margin: 0;
    color: #9a8d77;
    font-size: .65rem;
    letter-spacing: .08em;
}

body.invitation-open .invitation-cover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.music-toggle {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9998;
    width: 48px;
    height: 48px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    background: var(--paper);
    color: var(--gold-dark);
    font-size: 23px;
    cursor: pointer;
    box-shadow: 0 4px 12px #00000020;
}
.music-toggle[hidden] { display: none; }
.music-toggle.playing { animation: musicRotate 4s linear infinite; }
@keyframes musicRotate { to { transform: rotate(360deg); } }

@media (max-height: 650px) {
    .cover-content { padding-block: 18px; }
    .cover-couple { max-height: 115px; width: min(35%, 130px); }
    .cover-title { font-size: clamp(3.3rem, 10vw, 4.5rem); }
    .cover-date { margin-bottom: 8px; }
    .cover-divider { margin: 8px auto; }
    .cover-recipient { margin-top: 7px; }
    .cover-instruction { margin: 6px auto 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .invitation, .invitation-cover { transition: none; }
    .music-toggle.playing { animation: none; }
}
