/* ==========================================================================
   Undangan Digital Farinan — Elegan, Profesional, Responsif
   Tema: ivory + champagne gold + deep burgundy dengan tipografi editorial
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500&family=Tangerine:wght@400;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --cream:      #f8f4ec;
    --ivory:      #fbf7ef;
    --paper:      #ffffff;
    --ink:        #2e2424;
    --ink-soft:   #6b5b50;
    --muted:      #a59786;
    --line:       #e7dccb;
    --gold:       #b08968;
    --gold-2:     #8a6a45;
    --gold-3:     #d4b483;
    --gold-soft:  #efdfc4;
    --burgundy:   #6e2c2c;
    --plum:       #4a2c3a;
    --shadow-sm:  0 6px 18px -10px rgba(120,90,60,.25);
    --shadow:     0 30px 60px -30px rgba(120,90,60,.35);
    --shadow-lg:  0 40px 80px -30px rgba(60,40,30,.45);
    --radius:     10px;
    --maxw:       1080px;
    --maxw-narrow: 720px;
}

* { box-sizing: border-box; }
*::selection { background: var(--gold-soft); color: var(--ink); }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--cream);
    color: var(--ink);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-2); text-decoration: none; transition: color .25s; }
a:hover { color: var(--burgundy); }

h1, h2, h3, h4 {
    font-family: 'Playfair Display', 'Cormorant Garamond', serif;
    color: var(--ink);
    margin: 0;
    line-height: 1.18;
    font-weight: 600;
    letter-spacing: -.005em;
}
p { margin: 0 0 14px; }

/* ==========================================================================
   Ornament Library (SVG inline via CSS background)
   ========================================================================== */
.ornament {
    position: absolute;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: .45;
    z-index: 1;
}
.ornament.top-left,
.ornament.top-right,
.ornament.bottom-left,
.ornament.bottom-right {
    width: 220px;
    height: 220px;
}
.ornament.top-left     { top: 24px; left: 24px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g fill='none' stroke='%23b08968' stroke-width='.6'><path d='M2 50 C 2 22, 22 2, 50 2'/><path d='M2 60 C 2 80, 18 96, 38 96'/><circle cx='50' cy='2' r='1.6' fill='%23b08968'/><circle cx='2' cy='50' r='1.6' fill='%23b08968'/><path d='M14 14 C 20 8, 28 6, 36 6'/><path d='M14 14 C 8 20, 6 28, 6 36'/></g></svg>");
}
.ornament.top-right    { top: 24px; right: 24px; transform: scaleX(-1);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g fill='none' stroke='%23b08968' stroke-width='.6'><path d='M2 50 C 2 22, 22 2, 50 2'/><path d='M2 60 C 2 80, 18 96, 38 96'/><circle cx='50' cy='2' r='1.6' fill='%23b08968'/><circle cx='2' cy='50' r='1.6' fill='%23b08968'/><path d='M14 14 C 20 8, 28 6, 36 6'/><path d='M14 14 C 8 20, 6 28, 6 36'/></g></svg>");
}
.ornament.bottom-left  { bottom: 24px; left: 24px; transform: scaleY(-1);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g fill='none' stroke='%23b08968' stroke-width='.6'><path d='M2 50 C 2 22, 22 2, 50 2'/><path d='M2 60 C 2 80, 18 96, 38 96'/></g></svg>");
}
.ornament.bottom-right { bottom: 24px; right: 24px; transform: scale(-1,-1);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g fill='none' stroke='%23b08968' stroke-width='.6'><path d='M2 50 C 2 22, 22 2, 50 2'/><path d='M2 60 C 2 80, 18 96, 38 96'/></g></svg>");
}

/* Ornament flourishes untuk section dividers */
.flourish {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    margin: 26px auto; max-width: 360px; color: var(--gold);
}
.flourish::before, .flourish::after {
    content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: .5;
}
.flourish svg { flex: 0 0 auto; }

/* ==========================================================================
   Container & layout
   ========================================================================== */
.container       { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container.narrow{ max-width: var(--maxw-narrow); }
.center { text-align: center; }

/* Reveal animation (IntersectionObserver toggles .is-visible) */
.reveal { opacity: 1; transform: none; transition: opacity .9s ease, transform .9s ease; will-change: opacity, transform; }
.js-anim .reveal:not(.is-visible) { opacity: 0; transform: translateY(28px); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.reveal[data-delay="4"] { transition-delay: .4s; }

/* ==========================================================================
   COVER / HERO
   ========================================================================== */
.cover-page { min-height: 100vh; display: grid; place-items: center;
    background:
        radial-gradient(ellipse at top, #fff8e8 0%, transparent 55%),
        radial-gradient(ellipse at bottom, #f5e7d0 0%, transparent 50%),
        linear-gradient(180deg, var(--ivory), var(--cream));
    position: relative;
}
.cover-page::before {
    content: ""; position: absolute; inset: 12px; border: 1px solid rgba(176,137,104,.25);
    pointer-events: none; z-index: 1;
}
.cover-page::after {
    content: ""; position: absolute; inset: 22px; border: 1px solid rgba(176,137,104,.12);
    pointer-events: none; z-index: 1;
}

.cover, .hero {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 110px 24px 80px;
    position: relative;
    background:
        radial-gradient(ellipse at top, #fff8e8 0%, transparent 55%),
        radial-gradient(ellipse at bottom, #f5e7d0 0%, transparent 50%),
        linear-gradient(180deg, var(--ivory), var(--cream));
}
.cover::before, .hero::before {
    content: ""; position: absolute; inset: 14px; border: 1px solid rgba(176,137,104,.25);
    pointer-events: none;
}
.cover::after, .hero::after {
    content: ""; position: absolute; inset: 26px; border: 1px solid rgba(176,137,104,.12);
    pointer-events: none;
}

.cover-inner, .hero-inner {
    max-width: 760px; text-align: center; position: relative; z-index: 2;
}

.monogram {
    font-family: 'Tangerine', cursive;
    font-size: clamp(60px, 9vw, 96px);
    line-height: 1;
    color: var(--gold-2);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.monogram .amp { font-family: 'Playfair Display', serif; font-size: .55em; color: var(--gold); font-style: italic; font-weight: 400; padding: 0 6px; }

.kicker {
    letter-spacing: .42em; text-transform: uppercase;
    font-size: 11px; color: var(--gold-2);
    margin: 14px 0 12px; font-weight: 500;
}
.kicker.small { font-size: 10px; margin-bottom: 6px; }

.couple {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 6vw, 64px);
    color: var(--ink);
    margin: 0 0 10px;
    font-weight: 600;
    letter-spacing: -.01em;
    /* Pastikan nama muat di dalam amplop di semua layar */
    word-break: keep-all;
    overflow-wrap: break-word;
}
.couple .amp { color: var(--gold); font-style: italic; padding: 0 10px; font-weight: 400; }

/* Override font-size di dalam env-letter agar nama tidak terpotong */
.env-letter .couple {
    font-size: clamp(28px, 5.5vw, 52px);
}

.date {
    color: var(--ink-soft);
    letter-spacing: .28em;
    text-transform: uppercase;
    font-size: 12px;
    margin-bottom: 32px;
}

.guest-card {
    display: block;
    width: 100%;
    background: rgba(255,255,255,.6);
    backdrop-filter: blur(6px);
    border: 1px solid var(--gold);
    border-radius: 4px;
    padding: 14px 20px;
    margin: 14px 0 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
    box-sizing: border-box;
}
.guest-card::before, .guest-card::after {
    content: ""; position: absolute; left: 6px; right: 6px; height: 1px; background: var(--gold);
}
.guest-card::before { top: 6px; opacity: .35; }
.guest-card::after  { bottom: 6px; opacity: .35; }
.guest-name {
    font-family: 'Playfair Display', serif;
    font-size: clamp(16px, 2.8vw, 22px);
    color: var(--ink);
    margin: 4px 0 4px;
    font-weight: 600;
    /* Nama panjang: biarkan wrap, tidak terpotong */
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
}
.slot { color: var(--ink-soft); font-size: 12px; margin: 0; letter-spacing: .14em; text-transform: uppercase; }

/* Buttons */
.btn-primary {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: fit-content; margin-left: auto; margin-right: auto;
    padding: 14px 36px;
    background: linear-gradient(180deg, var(--gold), var(--gold-2));
    color: #fff; border: 0; cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 12px; letter-spacing: .32em; text-transform: uppercase; font-weight: 500;
    border-radius: 2px;
    box-shadow: 0 14px 28px -10px rgba(138,106,69,.55);
    transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
    position: relative;
}
/* RSVP submit meng-overrides jadi full-width */
.rsvp-form .btn-primary { width: 100%; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -12px rgba(110,44,44,.45); filter: brightness(1.05); color: #fff; }
.btn-primary::after {
    content: ""; position: absolute; inset: -6px; border: 1px solid var(--gold); border-radius: 4px;
    opacity: .35; pointer-events: none;
}
.btn-outline {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 24px;
    border: 1px solid var(--gold-2); color: var(--gold-2);
    background: transparent; border-radius: 2px;
    font-size: 11px; letter-spacing: .28em; text-transform: uppercase; font-weight: 500;
    transition: all .25s ease; cursor: pointer;
}
.btn-outline:hover { background: var(--gold-2); color: #fff; transform: translateY(-1px); }

/* ==========================================================================
   ENVELOPE
   ========================================================================== */
.envelope-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 4/3;
    margin: 0 auto 30px;
    box-shadow: var(--shadow);
    perspective: 1200px;
    z-index: 2;
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.8s ease;
}

@media (max-width: 580px) {
    .envelope-wrapper {
        aspect-ratio: 3/4; /* Taller on mobile to fit content */
        max-width: 380px;
    }
}

.env-back {
    position: absolute;
    inset: 0;
    background: #cba884; /* Darker inside */
    border-radius: 4px;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.1);
}

.env-letter {
    position: absolute;
    inset: 10px;
    background: var(--ivory);
    border: 1px solid var(--gold);
    border-radius: 4px;
    padding: 24px;
    z-index: 2;
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.env-letter::before {
    content: ""; position: absolute; inset: 6px; border: 1px solid rgba(176,137,104,.25);
    pointer-events: none;
}

.env-flaps {
    position: absolute;
    inset: 0;
    border-radius: 4px;
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
}

/* We need the top flap to overflow to rotate properly, so we take it out of overflow:hidden */
.env-flap {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.env-flap.left {
    background: #dfc2a1;
    clip-path: polygon(0 0, 50% 50%, 0 100%);
    filter: drop-shadow(4px 0 6px rgba(0,0,0,0.08));
}
.env-flap.right {
    background: #dfc2a1;
    clip-path: polygon(100% 0, 50% 50%, 100% 100%);
    filter: drop-shadow(-4px 0 6px rgba(0,0,0,0.08));
}
.env-flap.bottom {
    background: #e6cdb1;
    clip-path: polygon(0 100%, 50% 50%, 100% 100%);
    filter: drop-shadow(0 -4px 6px rgba(0,0,0,0.08));
}

/* Move top flap out of .env-flaps to allow 3D rotation without being clipped */
.envelope-wrapper > .env-flap.top {
    position: absolute;
    inset: 0;
    background: #e9d3b9;
    clip-path: polygon(0 0, 50% 50%, 100% 0);
    transform-origin: top;
    transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 4;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12));
    border-radius: 4px 4px 0 0;
}

/* Envelope Open Animation State */
.envelope-wrapper.is-open .env-flap.top {
    transform: rotateX(180deg);
    z-index: 1; /* Go behind letter */
}

.envelope-wrapper.is-open .env-letter {
    transform: translateY(-80px) scale(1.05);
    z-index: 5;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.envelope-wrapper.is-open-full {
    transform: translateY(100vh) scale(0.8);
    opacity: 0;
}

.btn-open-env {
    z-index: 10;
    transition: opacity 0.3s, transform 0.3s;
}
.btn-open-env.hide {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

/* ==========================================================================
   SECTIONS (Main content)
   ========================================================================== */
.section {
    padding: 80px 24px;
    position: relative;
    overflow: hidden;
}
.section + .section { border-top: 1px solid var(--line); }
.section.alt { background: var(--ivory); }
.section.dark {
    background: linear-gradient(135deg, #2b2326 0%, #3d2a30 60%, #2b2326 100%);
    color: #f0e3d0;
}

.eyebrow {
    display: block;
    text-align: center;
    letter-spacing: .35em; text-transform: uppercase;
    font-size: 11px; color: var(--gold-2);
    margin-bottom: 8px;
}
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(28px, 4vw, 42px);
    color: var(--ink);
    text-align: center; margin: 0;
    font-weight: 600;
}
.section-title .script { font-family: 'Tangerine', cursive; font-weight: 400; color: var(--gold-2); font-size: 1.2em; display: block; line-height: 1; margin-bottom: 4px; }
.section.dark .section-title { color: var(--gold-3); }
.section.dark .eyebrow  { color: var(--gold-3); }
.section.dark .flourish { color: var(--gold-3); }

.muted { color: var(--ink-soft); }
.section.dark .muted { color: #d8c8b3; }

/* ==========================================================================
   QUOTE / BISMILLAH
   ========================================================================== */
.section-quote {
    background:
        radial-gradient(circle at 50% 30%, #fff8e8 0%, transparent 60%),
        linear-gradient(180deg, var(--ivory), var(--cream));
    text-align: center;
}
.section-quote .arab {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(28px, 4.5vw, 40px);
    color: var(--gold-2);
    margin: 0 0 24px;
    line-height: 1.6;
}
.quote-frame {
    max-width: 680px; margin: 0 auto;
    background: rgba(255,255,255,.5);
    padding: 36px 40px;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    position: relative;
}
.quote-frame::before, .quote-frame::after {
    content: ""; position: absolute; left: 12px; right: 12px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.quote-frame::before { top: 10px; }
.quote-frame::after  { bottom: 10px; }
.section-quote .quote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(16px, 2.2vw, 19px);
    color: var(--ink);
    line-height: 1.9;
    margin: 0;
}
.section-quote .quote-src {
    color: var(--gold-2);
    margin-top: 18px;
    font-size: 12px;
    letter-spacing: .22em;
    text-transform: uppercase;
}

/* ==========================================================================
   COUPLE
   ========================================================================== */
.couple-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 36px;
    align-items: center;
    margin-top: 40px;
}
.couple-photo {
    width: clamp(160px, 22vw, 220px);
    height: clamp(160px, 22vw, 220px);
    border-radius: 50%;
    margin: 0 auto 22px;
    background: linear-gradient(135deg, #f3e9dd, #efe1d0);
    border: 1px solid var(--gold);
    display: grid; place-items: center;
    position: relative;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.couple-photo::before, .couple-photo::after {
    content: ""; position: absolute; inset: -8px; border: 1px solid var(--gold);
    border-radius: 50%; opacity: .35;
}
.couple-photo::after { inset: -16px; opacity: .15; }
.couple-photo span {
    font-family: 'Playfair Display', serif;
    font-size: clamp(60px, 8vw, 84px);
    color: var(--gold-2);
    line-height: 1;
}
.person { text-align: center; padding: 0 12px; }
.person .role {
    color: var(--gold-2);
    letter-spacing: .35em;
    text-transform: uppercase;
    font-size: 10px;
    margin-bottom: 8px;
}
.person h3 { font-size: clamp(20px, 2.4vw, 26px); margin-bottom: 6px; font-weight: 600; }
.person .parent { color: var(--ink-soft); font-size: 14px; margin-bottom: 12px; }
.person .ig {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--gold-2);
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 99px;
    transition: all .2s;
}
.person .ig:hover { background: var(--gold-2); color: #fff; border-color: var(--gold-2); }
.amp-big {
    font-family: 'Tangerine', cursive;
    font-size: clamp(60px, 8vw, 96px);
    color: var(--gold);
    font-weight: 400;
    line-height: 1;
    text-align: center;
    justify-self: center;
    align-self: center;
}
@media (max-width: 720px) {
    .couple-grid { grid-template-columns: 1fr; gap: 28px; }
    .amp-big { font-size: 56px; justify-self: center; }
    .person { padding: 0; }
}

/* ==========================================================================
   SAVE THE DATE (floating card)
   ========================================================================== */
.std-wrap {
    display: flex; justify-content: center;
    margin-top: 40px;
}
.std-card {
    background: linear-gradient(160deg, #fff8e8, #f7e9d0);
    border: 1px solid var(--gold);
    padding: 36px 48px;
    border-radius: 6px;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    max-width: 520px;
}
.std-card::before, .std-card::after {
    content: ""; position: absolute; left: 10px; right: 10px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.std-card::before { top: 10px; }
.std-card::after  { bottom: 10px; }
.std-card .save {
    font-family: 'Tangerine', cursive;
    font-size: 44px;
    color: var(--gold-2);
    line-height: 1;
}
.std-card .date-big {
    font-family: 'Playfair Display', serif;
    font-size: clamp(36px, 5vw, 56px);
    color: var(--ink);
    margin: 6px 0;
    font-weight: 700;
    letter-spacing: .02em;
}
.std-card .month { color: var(--ink-soft); letter-spacing: .4em; text-transform: uppercase; font-size: 13px; }
.std-card .year  { color: var(--gold-2); letter-spacing: .4em; font-size: 12px; margin-top: 4px; }

/* ==========================================================================
   COUNTDOWN
   ========================================================================== */
.section-countdown {
    background:
        radial-gradient(circle at 20% 20%, rgba(212,180,131,.12) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(176,137,104,.15) 0%, transparent 40%),
        linear-gradient(135deg, #2b2326 0%, #3d2a30 60%, #2b2326 100%);
    color: #f0e3d0;
    position: relative;
}
.section-countdown::before {
    content: ""; position: absolute; inset: 16px; border: 1px solid rgba(212,180,131,.18);
    pointer-events: none;
}
.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    max-width: 640px;
    margin: 36px auto 0;
    text-align: center;
}
.countdown > div {
    padding: 22px 8px;
    border: 1px solid rgba(212,180,131,.35);
    border-radius: 6px;
    background: rgba(255,255,255,.04);
    backdrop-filter: blur(4px);
    position: relative;
}
.countdown > div::before, .countdown > div::after {
    content: ""; position: absolute; left: 8px; right: 8px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-3), transparent);
    opacity: .5;
}
.countdown > div::before { top: 6px; }
.countdown > div::after  { bottom: 6px; }
.countdown .num {
    font-family: 'Playfair Display', serif;
    font-size: clamp(40px, 6vw, 64px);
    color: var(--gold-3);
    display: block;
    line-height: 1;
    font-weight: 600;
}
.countdown small {
    color: #d8c8b3;
    letter-spacing: .3em;
    text-transform: uppercase;
    font-size: 10px;
    margin-top: 8px;
    display: block;
}
@media (max-width: 520px) { .countdown { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   EVENT DETAILS
   ========================================================================== */
.event-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-top: 40px;
}
.event-card {
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 40px 28px;
    border-radius: 6px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform .3s ease, box-shadow .3s ease;
    position: relative;
    overflow: hidden;
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.event-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--gold-3), var(--gold), var(--gold-3));
}
.event-card .event-label {
    color: var(--gold-2);
    letter-spacing: .35em;
    text-transform: uppercase;
    font-size: 11px;
    margin-bottom: 12px;
}
.event-card h3 {
    font-size: 20px;
    margin: 8px 0 6px;
    font-weight: 600;
}
.event-card .time {
    color: var(--ink);
    font-weight: 500;
    margin-bottom: 14px;
    font-family: 'Playfair Display', serif;
    font-size: 17px;
}
.event-card .venue { font-weight: 600; margin-bottom: 6px; font-size: 15px; }
.event-card .address { color: var(--ink-soft); font-size: 14px; margin-bottom: 20px; line-height: 1.6; }
@media (max-width: 720px) { 
    .event-grid { grid-template-columns: 1fr; gap: 20px; }
    .event-card { padding: 32px 16px; }
}

/* ==========================================================================
   LOVE STORY TIMELINE
   ========================================================================== */
.story {
    max-width: 760px;
    margin: 40px auto 0;
    position: relative;
}
.story::before {
    content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
    background: linear-gradient(180deg, transparent, var(--gold) 10%, var(--gold) 90%, transparent);
    transform: translateX(-50%);
    opacity: .35;
}
.story-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    position: relative;
    align-items: center;
}
.story-item::before {
    content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--gold);
    border: 3px solid var(--cream);
    box-shadow: 0 0 0 1px var(--gold);
    z-index: 1;
}
.story-item .when {
    font-family: 'Playfair Display', serif;
    color: var(--gold-2);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .15em;
    text-transform: uppercase;
}
.story-item h4 {
    font-size: 22px;
    margin: 6px 0 8px;
    font-weight: 600;
}
.story-item p { color: var(--ink-soft); font-size: 14px; margin: 0; line-height: 1.7; }
.story-item .story-text { background: var(--paper); padding: 24px 26px; border-radius: 6px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.story-item .story-side { padding: 0 8px; }
.story-item:nth-child(odd) .story-side.left { text-align: right; }
.story-item:nth-child(even) .story-side.left { visibility: hidden; }
.story-item:nth-child(odd) .story-side.right { visibility: hidden; }
.story-item:nth-child(even) .story-side.right { text-align: left; }
@media (max-width: 720px) {
    .story::before { left: 18px; }
    .story-item { grid-template-columns: 1fr; gap: 14px; padding-left: 44px; }
    .story-item::before { left: 18px; top: 24px; transform: translate(-50%, 0); }
    .story-item .story-side { visibility: visible !important; text-align: left !important; }
}

/* ==========================================================================
  GALLERY (placeholder masonry)
  ========================================================================== */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 36px;
}

/* Staggered entrance: tiap item naik dengan delay berjenjang */
.gallery .g-item.reveal { transition-delay: 0s; }
.gallery .g-item.reveal:nth-child(1) { transition-delay: .05s; }
.gallery .g-item.reveal:nth-child(2) { transition-delay: .15s; }
.gallery .g-item.reveal:nth-child(3) { transition-delay: .25s; }
.gallery .g-item.reveal:nth-child(4) { transition-delay: .35s; }
.gallery .g-item.reveal:nth-child(5) { transition-delay: .45s; }
.gallery .g-item.reveal:nth-child(6) { transition-delay: .55s; }
.gallery .g-item.reveal:nth-child(7) { transition-delay: .65s; }
.gallery .g-item.reveal:nth-child(8) { transition-delay: .75s; }

.gallery .g-item {
    border-radius: 6px;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 30%, #fbeed7 0%, transparent 60%),
        radial-gradient(circle at 70% 70%, #f5e1c0 0%, transparent 60%),
        linear-gradient(135deg, #f3e9dd, #efe1d0);
    aspect-ratio: 3 / 4;
    display: grid; place-items: center;
    box-shadow: var(--shadow-sm);
    transition: transform .55s cubic-bezier(.2,.7,.3,1),
                box-shadow .55s ease,
                border-color .55s ease;
    position: relative;
    border: 1px solid var(--gold);
    cursor: pointer;
    isolation: isolate;
}

/* Shimmer sweep: kilau cahaya diagonal melintas saat hover */
.gallery .g-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg,
        transparent 30%,
        rgba(255, 255, 255, .55) 45%,
        rgba(255, 248, 224, .85) 50%,
        rgba(255, 255, 255, .55) 55%,
        transparent 70%);
    transform: translateX(-120%);
    transition: transform .9s cubic-bezier(.2,.7,.3,1);
    pointer-events: none;
    z-index: 2;
}

/* Label slide-up + gold gradient overlay */
.gallery .g-item::after {
    content: attr(data-label);
    position: absolute; inset: auto 0 0 0; padding: 12px 14px;
    background: linear-gradient(180deg, transparent, rgba(46,36,36,.85));
    color: var(--gold-3); font-size: 11px; letter-spacing: .25em; text-transform: uppercase; font-weight: 500;
    transform: translateY(100%);
    transition: transform .45s cubic-bezier(.2,.7,.3,1);
    z-index: 3;
}

/* Hover state: angkat + border emas menyala + bayangan lembut + inner scale + shimmer */
.gallery .g-item:hover {
    transform: translateY(-8px) scale(1.015);
    box-shadow: 0 30px 50px -18px rgba(110,44,44,.45), 0 0 0 1px var(--gold-2);
    border-color: var(--gold-2);
}
.gallery .g-item:hover::before { transform: translateX(120%); }
.gallery .g-item:hover::after  { transform: translateY(0); }

/* Keyframes entrance saat .is-visible ditambahkan */
@keyframes galleryRise {
    from { opacity: 0; transform: translateY(36px) scale(.94); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.gallery .g-item.reveal.is-visible {
    animation: galleryRise .9s cubic-bezier(.2,.7,.3,1) both;
}

/* Inner content: angka kaligrafi, transisi scale halus */
.gallery .g-item span {
    font-family: 'Tangerine', cursive;
    font-size: 56px;
    color: var(--gold-2);
    line-height: 1;
    transition: transform .6s cubic-bezier(.2,.7,.3,1), color .45s ease;
    z-index: 1;
}
.gallery .g-item:hover span {
    transform: scale(1.15) rotate(-2deg);
    color: var(--burgundy);
}

/* Foto mengisi penuh frame potrait */
.gallery .g-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Semua item sama: portrait 3/4 */

@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
@media (max-width: 540px) {
    .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .gallery .g-item:hover { transform: translateY(-4px) scale(1.005); }
}

/* Honor prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .gallery .g-item,
    .gallery .g-item span,
    .gallery .g-item::before,
    .gallery .g-item::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   GIFT
   ========================================================================== */
.gift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
    margin-top: 36px;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}
.gift-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 32px 26px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform .3s ease, box-shadow .3s ease;
    position: relative;
}
.gift-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gift-card::before, .gift-card::after {
    content: ""; position: absolute; left: 10px; right: 10px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.gift-card::before { top: 10px; opacity: .4; }
.gift-card::after  { bottom: 10px; opacity: .4; }
.gift-card .gift-icon {
    width: 48px; height: 48px;
    margin: 0 auto 12px;
    color: var(--gold-2);
}
.gift-card .bank { color: var(--gold-2); letter-spacing: .28em; text-transform: uppercase; font-size: 11px; margin-bottom: 6px; }
.gift-card .account { font-family: 'Playfair Display', serif; font-size: 26px; margin: 6px 0; letter-spacing: .04em; }
.gift-card .holder { color: var(--ink-soft); font-size: 13px; margin-bottom: 16px; }
.gift-card .btn-outline { margin-top: 6px; }

/* ==========================================================================
   RSVP FORM
   ========================================================================== */
.rsvp-form {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 36px;
    box-shadow: var(--shadow);
    margin: 36px auto 0;
    max-width: 640px;
    position: relative;
}
.rsvp-form::before, .rsvp-form::after {
    content: ""; position: absolute; left: 10px; right: 10px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.rsvp-form::before { top: 10px; opacity: .4; }
.rsvp-form::after  { bottom: 10px; opacity: .4; }
.rsvp-form label { display: block; margin-bottom: 18px; font-size: 11px; color: var(--gold-2); letter-spacing: .2em; text-transform: uppercase; font-weight: 500; }
.rsvp-form input, .rsvp-form select, .rsvp-form textarea {
    width: 100%; margin-top: 8px; padding: 12px 14px;
    border: 1px solid var(--line); border-radius: 4px;
    font-family: 'Inter', sans-serif; font-size: 14px; color: var(--ink);
    background: var(--ivory); text-transform: none; letter-spacing: 0;
    transition: border-color .2s, background .2s;
}
.rsvp-form input:focus, .rsvp-form select:focus, .rsvp-form textarea:focus {
    outline: none; border-color: var(--gold); background: #fff;
    box-shadow: 0 0 0 3px rgba(176,137,104,.15);
}
.rsvp-form textarea { min-height: 110px; resize: vertical; line-height: 1.6; }

/* ==========================================================================
   WISHES
   ========================================================================== */
.wishes-wrap { max-width: 720px; margin: 36px auto 0; }
.wishes {
    list-style: none; padding: 0; margin: 0;
    max-height: 560px; overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin; scrollbar-color: var(--gold) transparent;
}
.wishes::-webkit-scrollbar { width: 6px; }
.wishes::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }
.wish {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 18px 22px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease;
    position: relative;
}
.wish:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.wish::before {
    content: ""; position: absolute; top: 18px; left: -1px; width: 3px; height: 28px;
    background: var(--gold); border-radius: 0 2px 2px 0;
}
.wish .who { font-weight: 600; margin: 0 0 6px; font-family: 'Playfair Display', serif; font-size: 16px; }
.wish .who .badge {
    display: inline-block; margin-left: 8px; padding: 2px 10px;
    border-radius: 99px; font-size: 10px; letter-spacing: .15em; text-transform: uppercase; font-weight: 500;
    font-family: 'Inter', sans-serif;
}
.wish .who .badge.hadir { background: #e6f1ea; color: #2f6f3f; }
.wish .who .badge.tidak { background: #f5e2e2; color: #b03030; }
.wish .msg { color: var(--ink); margin: 6px 0 8px; line-height: 1.7; }
.wish .when { color: var(--muted); font-size: 11px; margin: 0; letter-spacing: .1em; }
.wishes .empty {
    text-align: center; color: var(--muted); padding: 36px;
    background: var(--paper); border: 1px dashed var(--line); border-radius: 6px;
}

/* ==========================================================================
   CLOSING
   ========================================================================== */
.section-closing { text-align: center; padding: 110px 24px; }
.section-closing .closing {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(17px, 2.4vw, 20px);
    color: var(--ink-soft);
    max-width: 620px;
    margin: 16px auto 32px;
    line-height: 1.8;
}
.section-closing .sign {
    font-family: 'Tangerine', cursive;
    font-size: clamp(40px, 6vw, 64px);
    color: var(--ink);
    font-weight: 400;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background: #2b2326;
    color: #d8c8b3;
    text-align: center;
    padding: 28px 16px;
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
}

/* ==========================================================================
  MUSIC BUTTON (vinyl disc)
  ========================================================================== */
/* FAB musik dihapus - musik auto-play tanpa kontrol UI */

/* ==========================================================================
   FLASH MESSAGES
   ========================================================================== */
.flash {
    position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 80;
    padding: 12px 22px; border-radius: 4px;
    box-shadow: var(--shadow); font-size: 14px;
    border: 1px solid;
    animation: slideDown .35s ease;
}
.flash.success { background: #e6f1ea; color: #2f6f3f; border-color: #b9d8c1; }
.flash.error   { background: #f5e2e2; color: #b03030; border-color: #e8b9b9; }
@keyframes slideDown {
    from { transform: translate(-50%, -20px); opacity: 0; }
    to   { transform: translate(-50%, 0); opacity: 1; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 720px) {
    .section { padding: 70px 18px; }
    .cover, .hero { padding: 90px 18px 60px; }
    .event-card { padding: 32px 22px; }
    .rsvp-form { padding: 26px 20px; }
    .ornament.top-left, .ornament.top-right,
    .ornament.bottom-left, .ornament.bottom-right { width: 120px; height: 120px; }
    .quote-frame { padding: 28px 22px; }
    .std-card { padding: 30px 28px; }
    .couple-photo { width: 160px; height: 160px; }
    .guest-card { padding: 14px 22px; }
}
@media (max-width: 420px) {
    .couple { font-size: 38px; }
    .kicker { letter-spacing: .3em; }
    .monogram { font-size: 56px; }
    .btn-primary { padding: 13px 28px; font-size: 11px; letter-spacing: .25em; }
}
/* ==========================================================================
   BOTTOM NAVBAR (sticky, glass morphism, elegan)
   ========================================================================== */
.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 14px;
    transform: translate(-50%, 30px);
    z-index: 70;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px;
    background: rgba(255, 252, 244, .78);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid var(--gold);
    border-radius: 999px;
    box-shadow: 0 18px 40px -16px rgba(60, 40, 20, .35), 0 0 0 1px rgba(255,255,255,.5) inset;
    opacity: 0;
    pointer-events: none;
    transition: opacity .45s ease, transform .55s cubic-bezier(.2,.7,.3,1);
    max-width: calc(100vw - 28px);
    overflow-x: auto;
    scrollbar-width: none;
}
.bottom-nav::-webkit-scrollbar { display: none; }
body.nav-ready .bottom-nav {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}
.bottom-nav::before {
    content: "";
    position: absolute;
    top: -1px; left: 18px; right: 18px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent);
    opacity: .55;
}
.bn-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 56px;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 10px;
    letter-spacing: .08em;
    transition: color .25s ease, background .35s ease, transform .25s ease;
    position: relative;
}
.bn-item svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    transition: transform .35s cubic-bezier(.2,.7,.3,1), color .25s ease;
}
.bn-item span { font-weight: 500; line-height: 1; white-space: nowrap; }
.bn-item:hover { color: var(--gold-2); background: rgba(176, 137, 104, .08); }
.bn-item:hover svg { transform: translateY(-2px); }
.bn-item.active {
    color: #fff;
    background: linear-gradient(180deg, var(--gold), var(--gold-2));
    box-shadow: 0 8px 18px -8px rgba(138, 106, 69, .55);
}
.bn-item.active svg { color: #fff; }
.bn-item.active::after {
    content: "";
    position: absolute;
    top: -4px;
    left: 50%;
    width: 4px; height: 4px;
    background: var(--gold-2);
    border-radius: 50%;
    transform: translateX(-50%);
}
body.nav-ready .content { padding-bottom: 96px; }
body:not(.nav-ready) .bottom-nav { display: none; }

/* Bottom nav hanya untuk mobile */
@media (min-width: 769px) {
    .bottom-nav { display: none !important; }
    body.nav-ready .content { padding-bottom: 0; }
}

@media (max-width: 768px) {
    .bottom-nav { bottom: 10px; gap: 0; padding: 4px; max-width: calc(100vw - 18px); }
    .bn-item { min-width: 46px; padding: 7px 8px; font-size: 9px; letter-spacing: .04em; }
    .bn-item svg { width: 16px; height: 16px; }
    body.nav-ready .content { padding-bottom: 84px; }
}
@media (prefers-reduced-motion: reduce) {
    .bottom-nav { transition: opacity .001ms !important; transform: none !important; }
    .bn-item svg { transition: none !important; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
}
.btn-location svg { flex: 0 0 auto; }