:root {
    --wine: #5b0e1d;
    --wine-2: #210409;
    --gold: #d6a832;
    --gold-pale: #f3d88a;
    --minang-red: #8f1424;
    --parallax-y: 0px;
}

.cover {
    isolation: isolate;
    transition: opacity .7s ease, transform .9s cubic-bezier(.65, 0, .35, 1), filter .8s ease;
}

.cover::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: 0;
    right: 0;
    bottom: 0;
    height: 9px;
    background: linear-gradient(90deg, #1b1714 0 33.3%, #a51628 33.3% 66.6%, #d5a72d 66.6%);
}

.cover.is-opening {
    opacity: 0;
    transform: scale(1.08);
    filter: blur(7px);
    pointer-events: none;
}

.cover__panel {
    animation: cover-arrive 1.15s cubic-bezier(.2, .8, .2, 1) both;
}

.cover__panel::before,
.cover__panel::after {
    content: "";
    position: absolute;
    inset: 9px;
    border: 1px solid rgba(214, 168, 50, .27);
    pointer-events: none;
}

.cover__panel::after {
    inset: 15px;
    border-color: rgba(214, 168, 50, .12);
}

.cover-flower,
.section-flower {
    position: absolute;
    width: clamp(180px, 34vw, 420px);
    z-index: -1;
    pointer-events: none;
    filter: sepia(.8) saturate(1.25) brightness(.8);
    opacity: .5;
}

.cover-flower--left,
.section-flower--left { left: -7%; bottom: -8%; transform-origin: left bottom; animation: flower-sway 7s ease-in-out infinite; }
.cover-flower--right,
.section-flower--right { right: -7%; top: -8%; transform: rotate(180deg); transform-origin: right top; animation: flower-sway-right 8s ease-in-out infinite; }
.section-flower { z-index: 0; opacity: .16; }
.section-flower--dark { opacity: .13; filter: sepia(1) saturate(1.4) brightness(1.6); }

.minang-crown {
    display: grid;
    justify-items: center;
    gap: 7px;
}

.minang-crown span,
.minang-tag {
    color: var(--gold-pale);
    font-family: "Cormorant Garamond", serif;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.minang-crown .ornament {
    animation: ornament-breathe 4s ease-in-out infinite;
}

.guest-card strong {
    color: var(--gold-pale);
    text-shadow: 0 0 28px rgba(214, 168, 50, .25);
}

.button--gold {
    position: relative;
    overflow: hidden;
    box-shadow: 0 9px 28px rgba(214, 168, 50, .18);
}

.button--gold::after {
    content: "";
    position: absolute;
    inset: -100% auto -100% -45%;
    width: 30%;
    background: rgba(255,255,255,.45);
    transform: rotate(18deg);
    animation: button-shine 3.8s ease-in-out infinite;
}

.hero {
    isolation: isolate;
    background: linear-gradient(rgba(32,4,10,.19),rgba(32,4,10,.86));
}

.hero::before {
    content: "";
    position: absolute;
    z-index: -2;
    inset: -8%;
    background: url('/assets/minangkabau-wedding-hero.png') center 26%/cover;
    transform: translateY(var(--parallax-y)) scale(1.09);
    animation: hero-cinema 18s ease-in-out infinite alternate;
    will-change: transform;
}

.hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: radial-gradient(circle at 50% 45%, transparent 0 18%, rgba(27,3,8,.55) 75%);
}

.hero__glow {
    position: absolute;
    width: min(620px, 78vw);
    aspect-ratio: 1;
    border: 1px solid rgba(214,168,50,.3);
    border-radius: 50%;
    box-shadow: 0 0 0 18px rgba(214,168,50,.03), 0 0 0 38px rgba(214,168,50,.02);
    animation: halo-pulse 5s ease-in-out infinite;
}

.hero__content {
    text-shadow: 0 4px 24px rgba(0,0,0,.8);
}

.hero__ornament img {
    width: 170px;
    margin-top: 25px;
    filter: sepia(1) saturate(.75) brightness(1.8);
}

.songket-band {
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    height: 42px;
    background: var(--wine-2) url('/assets/songket-minang-9.png') center/270px auto repeat-x;
    border-top: 1px solid rgba(214,168,50,.65);
    border-bottom: 1px solid rgba(214,168,50,.65);
    box-shadow: 0 5px 20px rgba(36,5,10,.16);
}

.songket-band--top { top: 0; }
.songket-band--bottom { bottom: 0; transform: rotate(180deg); }

.minang-verse {
    width: fit-content;
    margin: -20px auto 48px;
    padding: 11px 22px;
    border-inline: 2px solid var(--gold);
    color: #765023;
    font: italic 600 1.05rem "Cormorant Garamond", serif;
    letter-spacing: .04em;
}

.person img {
    outline: 1px solid rgba(214,168,50,.8);
    outline-offset: 6px;
    transition: transform .65s cubic-bezier(.2,.8,.2,1), box-shadow .65s ease;
}

.person:hover img { transform: translateY(-8px) scale(1.015); box-shadow: 0 32px 75px rgba(75,15,24,.24); }
.ampersand { animation: ampersand-float 4s ease-in-out infinite; }

.countdown-grid div {
    position: relative;
    overflow: hidden;
    border-color: rgba(214,168,50,.62);
    box-shadow: inset 0 0 24px rgba(214,168,50,.03);
}

.countdown-grid div::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(125deg, transparent 35%, rgba(243,216,138,.1), transparent 65%);
    transform: translateX(-100%);
    animation: card-glint 5s ease-in-out infinite;
}

.countdown-grid strong { color: var(--gold-pale); }
.countdown-grid div:last-child strong { animation: second-pulse 1s ease-in-out infinite; }

.event-card {
    border-top: 4px solid var(--minang-red);
    box-shadow: 0 16px 45px rgba(53,25,18,.1), inset 0 0 0 5px rgba(214,168,50,.08);
    transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s ease;
}

.event-card:hover { transform: translateY(-7px); box-shadow: 0 25px 60px rgba(53,25,18,.17), inset 0 0 0 5px rgba(214,168,50,.12); }
.event-icon { animation: star-turn 8s linear infinite; }

.story__image {
    box-shadow: 0 25px 70px rgba(0,0,0,.28);
    transition: transform .8s cubic-bezier(.2,.8,.2,1);
}

.story__image:hover { transform: scale(1.025) rotate(-.4deg); }

.gallery-grid { perspective: 1000px; }
.gallery-grid img { transition: transform .55s cubic-bezier(.2,.8,.2,1), filter .55s ease, box-shadow .55s ease; }
.gallery-grid img:hover { position: relative; z-index: 2; transform: translateY(-6px) scale(1.025); filter: saturate(1.08); box-shadow: 0 22px 55px rgba(49,14,18,.25); }

.bank-card {
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 0 5px rgba(214,168,50,.04);
}

.bank-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('/assets/songket-minang-9.png') center/260px;
    opacity: .055;
    pointer-events: none;
}

.music-toggle {
    box-shadow: 0 7px 25px rgba(0,0,0,.28);
    transition: transform .25s ease, background .25s ease;
}

.music-toggle.is-playing { animation: music-spin 5s linear infinite; background: var(--gold); color: var(--wine-2); }

footer {
    position: relative;
    overflow: hidden;
    border-top: 8px solid transparent;
    border-image: linear-gradient(90deg, #161310 0 33%, #9c1527 33% 66%, #d6a832 66%) 1;
}

footer img { width: 150px; filter: sepia(1) saturate(.8) brightness(1.8); margin-bottom: 22px; }
footer span { display: block; color: #cdb77f; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; }

.reveal {
    opacity: 0;
    transform: translateY(42px) scale(.985);
    filter: blur(3px);
    transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1), filter .9s ease;
}

.reveal.visible { opacity: 1; transform: none; filter: none; }
.reveal-child { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); transition-delay: var(--stagger, 0ms); }
.reveal.visible .reveal-child { opacity: 1; transform: none; }

@keyframes cover-arrive { from { opacity: 0; transform: translateY(28px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes ornament-breathe { 0%,100% { transform: scale(1); opacity: .78; } 50% { transform: scale(1.055); opacity: 1; } }
@keyframes button-shine { 0%,42% { transform: translateX(-230%) rotate(18deg); } 70%,100% { transform: translateX(620%) rotate(18deg); } }
@keyframes flower-sway { 0%,100% { transform: rotate(-3deg) scale(1); } 50% { transform: rotate(3deg) scale(1.035); } }
@keyframes flower-sway-right { 0%,100% { transform: rotate(177deg) scale(1); } 50% { transform: rotate(183deg) scale(1.035); } }
@keyframes hero-cinema { from { transform: translateY(var(--parallax-y)) scale(1.09); } to { transform: translateY(var(--parallax-y)) scale(1.15); } }
@keyframes halo-pulse { 0%,100% { opacity: .4; transform: scale(.96); } 50% { opacity: .85; transform: scale(1.03); } }
@keyframes ampersand-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes card-glint { 0%,55% { transform: translateX(-120%); } 80%,100% { transform: translateX(120%); } }
@keyframes second-pulse { 50% { opacity: .62; } }
@keyframes star-turn { to { transform: rotate(360deg); } }
@keyframes music-spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
    .cover-flower { width: 250px; opacity: .32; }
    .songket-band { height: 32px; background-size: 210px auto; }
    .minang-verse { margin-bottom: 40px; font-size: 1rem; }
    .hero__glow { width: 88vw; }
    .section-flower { width: 240px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .reveal, .reveal-child { opacity: 1; transform: none; filter: none; }
}

/* SPA layout and readability pass */
body { font-size: 16px; }
.eyebrow { font-size: clamp(.82rem, 1.4vw, .95rem); line-height: 1.5; }

.cover {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    padding: clamp(10px, 2.2vh, 24px);
    background: linear-gradient(rgba(25,5,10,.6),rgba(25,5,10,.82)), var(--cover-image) center/cover;
}

.cover__panel {
    width: min(520px, calc(100vw - 28px));
    max-height: calc(100dvh - 28px);
    overflow: hidden;
    padding: clamp(18px, 3.5vh, 42px) clamp(16px, 3vw, 28px);
}

.couple-signature {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .06em .2em;
    width: 100%;
    font-size: clamp(2.35rem, min(10vw, 7.4vh), 5.2rem) !important;
    line-height: .9 !important;
    margin: clamp(10px, 2vh, 18px) 0 !important;
}

.couple-signature span {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-wrap: balance;
}
.couple-signature b { color: var(--gold); font-size: .62em; font-weight: 400; }
.cover__date { font-size: clamp(.9rem, 2vh, 1.08rem); margin-bottom: 0; }
.guest-card { margin: clamp(12px, 2.5vh, 26px) auto clamp(12px, 2vh, 22px); padding: clamp(10px, 1.8vh, 17px); }
.guest-card span, .guest-card small { font-size: clamp(.78rem, 1.55vh, .9rem); line-height: 1.45; }
.guest-card strong { font-size: clamp(1.45rem, 3.2vh, 1.9rem); }

.hero::before { background-image: var(--hero-image); background-position: center 42%; }
.hero::after { background: linear-gradient(180deg, rgba(22,3,7,.22), rgba(22,3,7,.4) 45%, rgba(22,3,7,.92)); }
.hero__content { width: min(1100px, 94vw); padding: calc(7vh + 28px) 28px 28px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(28,3,8,.62), rgba(28,3,8,.22) 52%, transparent 73%); }

.couple-title {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: .06em .22em;
    margin: 14px auto 18px !important;
    font-family: Parisienne, cursive !important;
    width: 100%;
    font-size: clamp(3.1rem, 9.2vw, 7.4rem) !important;
    font-weight: 400 !important;
    line-height: .92 !important;
}

.couple-title span { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-wrap: balance; }
.couple-title b { color: var(--gold-pale); font-size: .58em; font-weight: 400; }
.hero__content > p:last-of-type { color: #fff; font-size: clamp(1rem, 2vw, 1.28rem); font-weight: 600; text-shadow: 0 2px 14px #000; }
.minang-tag, .hero .eyebrow { color: #ffe7a3; text-shadow: 0 2px 12px #000; font-size: clamp(.78rem, 1.3vw, .9rem); }

.hero__scroll { display: grid; justify-items: center; gap: 2px; width: fit-content; margin: 24px auto 0; color: #fff; text-decoration: none; font-size: .82rem; letter-spacing: .08em; }
.hero__scroll i { font-size: 1.6rem; font-style: normal; animation: scroll-nudge 1.8s ease-in-out infinite; }

.spa-nav {
    position: fixed;
    z-index: 12;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    padding: 6px;
    border: 1px solid rgba(214,168,50,.5);
    border-radius: 999px;
    background: rgba(31,4,9,.9);
    box-shadow: 0 12px 35px rgba(0,0,0,.35);
    backdrop-filter: blur(12px);
}

.spa-nav a { position: relative; display: grid; place-items: center; width: 44px; height: 40px; border-radius: 50%; color: #ffe8aa; text-decoration: none; font-size: 1rem; }
.spa-nav a:hover, .spa-nav a.active { color: #261008; background: var(--gold); }
.spa-nav em { position: absolute; bottom: 52px; padding: 5px 8px; border-radius: 5px; background: #1e080c; color: #fff; font: normal .68rem Manrope,sans-serif; opacity: 0; transform: translateY(4px); pointer-events: none; transition: .2s; }
.spa-nav a:hover em { opacity: 1; transform: none; }

.section h2 { color: inherit; text-wrap: balance; }
.paper p, .paper label, .paper small { color: #35251f; }
.paper .lead { font-size: 1.05rem; }
.story__intro { max-width: 690px; margin: -4px auto 42px; color: #fff1d7; font-size: 1.06rem; line-height: 1.8; }

.story-timeline { position: relative; display: grid; gap: 36px; text-align: left; }
.story-timeline::before { content: ""; position: absolute; top: 5%; bottom: 5%; left: 50%; width: 1px; background: linear-gradient(transparent, var(--gold), transparent); }
.story-step { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 55px; align-items: center; }
.story-step:nth-child(even) .story-step__image { order: 2; }
.story-step::before { content: "✦"; position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%,-50%); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: #3b1014; box-shadow: 0 0 0 8px rgba(214,168,50,.12); }
.story-step__image { overflow: hidden; border: 1px solid var(--gold); padding: 7px; background: rgba(255,255,255,.04); }
.story-step__image img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .7s ease; }
.story-step:hover .story-step__image img { transform: scale(1.045); }
.story-step__copy span { color: var(--gold-pale); font-weight: 800; letter-spacing: .14em; }
.story-step__copy h3 { margin: 8px 0 10px; color: #fff; font-size: clamp(1.8rem, 4vw, 2.5rem); }
.story-step__copy p { margin: 0; color: #f3e8d8; font-size: 1rem; line-height: 1.75; }

.gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.gallery-grid figure { position: relative; margin: 0; overflow: hidden; min-height: 300px; background: #2b0d12; }
.gallery-grid figure:first-child { grid-row: auto; }
.gallery-grid figure img, .gallery-grid figure:first-child img { width: 100%; height: 100%; min-height: 300px; aspect-ratio: 4/3; object-fit: cover; display: block; }
.gallery-grid figcaption { position: absolute; inset: auto 0 0; padding: 42px 18px 16px; color: #fff; font: 600 1rem "Cormorant Garamond",serif; letter-spacing: .04em; background: linear-gradient(transparent, rgba(24,3,7,.86)); transform: translateY(8px); opacity: .92; transition: .35s; }
.gallery-grid figure:hover figcaption { transform: none; }

.gift { color: #3d251c; background: #efe5d6 url('/assets/vintage-cover.jpg') center/cover; }
.gift::before { content: ""; position: absolute; inset: 0; z-index: 0; background: rgba(252,246,236,.89); }
.gift::after { background: linear-gradient(90deg, rgba(143,20,36,.22), transparent 22% 78%, rgba(143,20,36,.22)); opacity: 1; }
.gift .container { z-index: 2; }
.gift .section-flower { z-index: 1; opacity: .48; filter: sepia(.35) saturate(1.2) brightness(.95); }
.gift > .section-flower--left { left: -3%; bottom: -2%; }
.gift > .section-flower--right { right: -3%; top: -3%; }
.gift-icon { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 18px; border-radius: 50%; background: #16110e; font-size: 1.6rem; }
.gift > .container > p:not(.eyebrow) { color: #3e2b24; font-size: 1.02rem; line-height: 1.8; }
.gift-accordion { margin-top: 30px; }
.gift-toggle { width: 100%; display: flex; justify-content: center; align-items: center; gap: 12px; border: 2px solid #fff; outline: 2px solid #19120f; border-radius: 999px; padding: 13px 18px; background: #16110e; color: #fff; cursor: pointer; font-weight: 700; }
.gift-toggle b { font-size: 1.25rem; transition: transform .3s ease; }
.gift-toggle[aria-expanded="true"] b { transform: rotate(45deg); }
.gift-options { display: grid; gap: 15px; margin-top: 22px; }
.gift-options[hidden] { display: none; }
.gift-card { position: relative; display: grid; justify-items: start; gap: 7px; padding: 26px 30% 26px 24px; min-height: 190px; overflow: hidden; border: 1px solid rgba(72,21,28,.2); border-radius: 22px; text-align: left; background: linear-gradient(120deg,#fff 0 64%,#f1eee9 64%); box-shadow: 0 12px 35px rgba(63,30,20,.08); }
.gift-card::after { content: ""; position: absolute; right: -8%; top: -40%; width: 42%; height: 190%; transform: rotate(18deg); background: rgba(214,168,50,.08); }
.gift-card .bank-logo { position: absolute; z-index: 2; right: 24px; top: 24px; color: #111; font-size: 1.3rem; font-weight: 900; }
.gift-card > span { text-transform: uppercase; font-size: .75rem; font-weight: 800; color: #685749; letter-spacing: .08em; }
.gift-card > strong { color: #18120f; font: 700 1.35rem "Cormorant Garamond",serif; }
.gift-card > small { color: #312720; font-size: .88rem; }
.gift-copy { margin-top: 12px; border: 0; border-radius: 9px; padding: 10px 14px; background: #111; color: #fff; cursor: pointer; text-transform: uppercase; font-size: .76rem; }

.details-section { padding-top: 80px; }
.details-section .container { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.detail-card { position: relative; overflow: hidden; display: grid; align-content: center; min-height: 390px; padding: 44px; border: 1px solid #8a4a43; border-radius: 30px; background: rgba(255,250,240,.75); box-shadow: 0 15px 45px rgba(63,25,20,.09); }
.detail-card::before { content: ""; position: absolute; inset: 0; background: url('/assets/ukiran-vintage-9.png') center 90%/230px no-repeat; opacity: .06; pointer-events: none; }
.detail-card h2 { font-size: clamp(2.3rem,5vw,3.8rem); color: #8b6735; }
.detail-card p:not(.eyebrow) { font-size: 1rem; line-height: 1.75; }
.detail-button { position: relative; width: fit-content; margin: 20px auto 0; padding: 12px 20px; border-radius: 999px; background: #111; color: #fff; text-decoration: none; font-weight: 700; }
.color-palette { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.color-palette span { width: 54px; height: 54px; border-radius: 50%; background: var(--dress-color); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), 0 5px 12px rgba(0,0,0,.08); transition: transform .3s ease; }
.color-palette span:hover { transform: translateY(-5px) scale(1.06); }

#rsvp-status { display: block; min-height: 24px; color: #32633d; font-size: .9rem; }

@keyframes scroll-nudge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

@media (max-width: 720px) {
    .cover::before { inset: 8px; }
    .cover-flower { opacity: .24; }
    .cover__panel { width: min(440px, calc(100vw - 22px)); }
    .couple-signature { max-width: 100%; gap: .06em .15em; font-size: clamp(2.25rem, 10.5vw, 4.2rem) !important; }
    .hero__content { padding-top: 2vh; }
    .couple-title { display: grid; gap: .02em; }
    .couple-title span { white-space: normal; overflow-wrap: anywhere; }
    .couple-title b { margin: -.08em 0; }
    .spa-nav { bottom: 8px; }
    .spa-nav a { width: 40px; height: 38px; }
    .story-timeline::before { left: 16px; }
    .story-step { grid-template-columns: 1fr; gap: 15px; padding-left: 45px; }
    .story-step:nth-child(even) .story-step__image { order: 0; }
    .story-step::before { left: 16px; top: 34px; }
    .story-step__copy { text-align: left; }
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-grid figure, .gallery-grid figure img, .gallery-grid figure:first-child img { min-height: 260px; }
    .details-section .container { grid-template-columns: 1fr; }
    .detail-card { min-height: 340px; padding: 34px 22px; }
    .gift-card { padding-right: 24px; }
    .gift-card .bank-logo { position: static; justify-self: end; margin-bottom: -20px; }
}

@media (max-width: 430px) {
    .couple-signature,
    .couple-title {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        gap: 0;
    }

    .couple-signature { font-size: clamp(2.45rem, 13vw, 3.6rem) !important; }
    .couple-title { font-size: clamp(3.2rem, 15vw, 4.5rem) !important; }
    .couple-signature span,
    .couple-title span { width: 100%; }
}

@media (max-height: 700px) {
    .minang-crown .ornament { width: 105px; max-height: 48px; }
    .minang-crown span, .cover .eyebrow { font-size: .68rem; }
    .couple-signature { font-size: clamp(2.2rem, 7vh, 3.6rem) !important; }
    .guest-card { margin-block: 8px; }
    .cover__panel .button { padding-block: 9px; }
}


/* Wedding names — Carattere */
.couple-signature, .couple-title, .person h3, .ampersand, footer h2 {
    font-family: Carattere, cursive !important;
}
