/* ── reset & base ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    font-family: 'Cormorant Garamond', serif;
    background: #f3d9e3;
}

.section {
    width: 100%;
    height: 100dvh;
    height: 100svh;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5vh 5vw;
}

.overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* ── stars (section 1) ── */
.stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}
.star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #fff;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle {
    0%,
    100% {
        opacity: 0.2;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

.content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    height: 100%;
    width: 100%;
    padding: 0 1rem;
    padding-bottom: clamp(4rem, 14vh, 6rem);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1.8s ease forwards;
}
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.divider {
    width: clamp(40px, 12vw, 80px);
    height: 1px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    margin: 1.5em auto;
    opacity: 0.6;
}

.btn {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(0.9rem, 2.2vw, 1.2rem);
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0.7em 2.2em;
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 40px;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    transition: all 0.4s ease;
    display: inline-block;
    animation: pulse 2.8s ease-in-out infinite;
}
.btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}
.btn:active {
    transform: scale(0.96);
}

.btn-next {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: clamp(1.25rem, 5vh, 2.75rem);
    margin-top: 0;
}
.btn-next:hover {
    transform: translateX(-50%) translateY(-2px);
}
.btn-next:active {
    transform: translateX(-50%) scale(0.96);
}
@keyframes pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.20);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }
}

/* ── section 1 : OPENING ── */
.sec-opening {
    background: url('../img/01.png') center/cover no-repeat;
    background-color: #2a2036;
    color: #fff;
}
.sec-opening .overlay {
    background: rgba(0, 0, 0, 0.05);
}

.hero-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6em;
    margin: 11em auto 1em;
    width: clamp(140px, 40vw, 240px);
    color: #f3d9b8;
    opacity: 0.85;
}
.hero-ornament::before,
.hero-ornament::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, currentColor);
}
.hero-ornament::after { background: linear-gradient(90deg, currentColor, transparent); }
.hero-ornament svg { width: 16px; height: 16px; flex-shrink: 0; }

.bismillah {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    font-size: clamp(2.5rem, 2rem + 2.8vw, 3.25rem);
    color: #fdf2e2;
    text-shadow: 0 0 24px rgba(255, 224, 180, 0.45);
    margin-bottom: 0.35em;
    line-height: 1.15;
    letter-spacing: 0.3px;
}
.bismillah .hero-with {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.75rem, 1.4rem + 1.8vw, 2.25rem);
    color: #f3d9b8;
    letter-spacing: 2px;
}
.opening-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
    line-height: 1.6;
    color: #f7dcae;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.opening-text b {
    font-weight: 600;
    color: #ffd7e6;
}
.tabarakallah {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.125rem, 0.95rem + 0.8vw, 1.375rem);
    letter-spacing: 1px;
    color: #ecd2ae;
    margin-top: 0.8em;
    margin-bottom: 1.4em;
    opacity: 0.9;
}

.hero-start-btn {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1rem, 2.6vw, 1.2rem);
    letter-spacing: 1px;
    color: #f7e4c9;
    background: linear-gradient(180deg, #4a3145, #3a2536);
    border: 1px solid rgba(247, 228, 201, 0.55);
    border-radius: 999px;
    padding: 0.7em 2.6em;
    cursor: pointer;
    position: relative;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 0 0 3px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: fixed;
    left: 50%;
    bottom: clamp(1.25rem, 5vh, 2.75rem);
    transform: translateX(-50%);
}
.hero-start-btn::before,
.hero-start-btn::after {
    font-size: 0.7em;
    color: #f7e4c9;
    margin: 0 0.6em;
    vertical-align: middle;
}
.hero-start-btn:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), inset 0 0 0 3px rgba(0, 0, 0, 0.15);
}

.hero-cta-wrap {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.hero-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 28px;
    border-radius: 8px;
    color: #f7e4c9;
    animation: hero-chevron-bounce 1.8s ease-in-out infinite;
}
.hero-chevron svg {
    width: 16px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
@keyframes hero-chevron-bounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(4px);
    }
}

@keyframes hero-fade-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-corner,
    .hero-watermark,
    .hero-greeting,
    .hero-kicker,
    .hero-names .hero-name,
    .hero-names .ampersand,
    .hero-date,
    .hero-cta-wrap,
    .hero-chevron {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ── section 2 : TITLE ── */
.sec-title {
    background: url('../img/02.png') center/cover no-repeat;
    background-color: #f6dfe4;
    color: #fff;
}
.sec-title .overlay {
    background: rgba(0, 0, 0, 0.28);
}
.title-main {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: clamp(1.6rem, 7vw, 2.2rem);
    color: #f0f0f0;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
    margin-top: clamp(3rem, 16vh, 6rem);
    margin-bottom: 0.4em;
    letter-spacing: 0.5px;
}
.title-sub {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
    color: #fdeef3;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-top: clamp(1rem, 4vh, 2rem);
    margin-bottom: 0.2em;
}

/* ── sections 3–9 : placeholders ── */
.sec-placeholder {
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.sec-placeholder .overlay {
    background: rgba(0, 0, 0, 0.30);
}
.placeholder-title {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: clamp(1.4rem, 4.5vw, 2.2rem);
    letter-spacing: 0.3px;
    margin-bottom: 0.4em;
}
.placeholder-body {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.125rem, 0.95rem + 0.8vw, 1.375rem);
    line-height: 1.9;
    opacity: 0.92;
    max-width: 600px;
    margin: 0 auto;
}
.placeholder-body-aaa {
    margin-top: 250px;
}
.placeholder-body strong {
    font-weight: 600;
    color: #ffecf0;
}
.section-label {
    display: inline-block;
    font-size: clamp(1.125rem, 0.95rem + 0.8vw, 1.375rem);
    letter-spacing: 2px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.12);
    padding: 0.3em 1.4em;
    border-radius: 30px;
    margin-top: clamp(2rem, 12vh, 5rem);
    margin-bottom: 1.2em;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ── background images for sections 3–9 ── */
.sec-3 {
    background: url('../img/03.png') center/cover no-repeat;
    background-color: #d496b0;
}
.sec-4 {
    background: url('../img/04.png') center/cover no-repeat;
    background-color: #c49bc9;
}
.sec-5 {
    background: url('../img/05.png') center/cover no-repeat;
    background-color: #dba8a3;
}
.sec-6 {
    background: url('../img/06.png') center/cover no-repeat;
    background-color: #c9a8bf;
}
.sec-7 {
    background: url('../img/07.png') center/cover no-repeat;
    background-color: #e0b8ae;
}
.sec-8 {
    background: url('../img/08.png') center/cover no-repeat;
    background-color: #c4acc4;
}
.sec-9 {
    background: url('../img/09.png') center/cover no-repeat;
    background-color: #e0c0c8;
}

/* ── SECTION 3 : quote card ── */
.quote-box {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 1.8rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0.5rem 0 1rem;
    max-width: 650px;
    width: 100%;
}
.quote-text {
    font-size: clamp(1.25rem, 1rem + 0.9vw, 1.5rem);
    line-height: 1.8;
    font-style: italic;
    font-weight: 400;
}
.quote-source {
    margin-top: 0.8rem;
    font-size: clamp(0.85rem, 1.8vw, 1.05rem);
    opacity: 0.85;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ── SECTION 4 : surat ── */
.surat-box {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 20px;
    padding: 1.8rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    max-width: 650px;
    width: 100%;
    text-align: left;
    max-height: 60vh;
    overflow-y: auto;
    font-size: clamp(1.25rem, 1rem + 0.9vw, 1.5rem);
    line-height: 1.9;
}
.surat-box::-webkit-scrollbar {
    width: 4px;
}
.surat-box::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}
.surat-box p {
    margin-bottom: 0.8rem;
}
.surat-box p:last-child {
    margin-bottom: 0;
}

/* ── SECTION 5 : GALLERY ── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 600px;
    width: 100%;
    margin: 0.5rem auto;
}
.gallery-grid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 2px solid rgba(255, 255, 255, 0.15);
}
.gallery-grid img:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}
.gallery-sub {
    margin-top: 2rem;
    font-size: clamp(1.125rem, 0.95rem + 0.8vw, 1.375rem);
    opacity: 0.9;
    font-style: italic;
}

/* ── Lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
    touch-action: none;
}
.lightbox.active {
    display: flex;
}
.lightbox img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    user-select: none;
    -webkit-user-drag: none;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.4rem;
    color: #fff;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
    background: none;
    border: none;
    z-index: 10;
    font-family: 'Cormorant Garamond', serif;
    line-height: 1;
}
.lightbox-close:hover {
    opacity: 1;
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 2.8rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.3s;
    user-select: none;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
}
.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}
.lightbox-nav.prev {
    left: 20px;
}
.lightbox-nav.next {
    right: 20px;
}
.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1rem;
    opacity: 0.6;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 18px;
    border-radius: 30px;
    backdrop-filter: blur(4px);
}

/* ── SECTION 9 : ending & heart burst ── */
.heart-burst-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}
.heart-particle {
    position: absolute;
    font-size: 2rem;
    animation: floatUp 2.5s ease-out forwards;
    opacity: 0;
    will-change: transform, opacity;
}
@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0.2) rotate(720deg);
    }
}
.peluk-teks {
    margin-top: 1.2rem;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.8s ease;
}
.peluk-teks.show {
    opacity: 1;
}

/* ── responsive adjustments ── */
@media (max-height: 600px) {
    .section {
        padding: 3vh 4vw;
    }
    .hero-ornament {
        margin: 3em auto 1em;
    }
    .hero-start-btn {
        margin-top: 2.5em;
    }
    .placeholder-body {
        margin-top: 80px;
    }
    .bismillah {
        font-size: 44px;
        margin-bottom: 0.4em;
    }
    .surat-box {
        font-size: clamp(1.25rem, 1rem + 0.9vw, 1.5rem);
        line-height: 1.5;
    }
    .title-main {
        font-size: 25px;
    }
    .placeholder-title {
        font-size: clamp(1rem, 3.5vh, 1.6rem);
    }
    .divider {
        margin: 0.8em auto;
    }
    .btn {
        padding: 0.4em 1.6em;
        font-size: clamp(0.75rem, 1.8vh, 0.95rem);
    }
    .gallery-grid {
        gap: 8px;
    }
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.8rem;
    }
    .lightbox-nav.prev {
        left: 10px;
    }
    .lightbox-nav.next {
        right: 10px;
    }
}
@media (max-width: 400px) {
    .section {
        padding: 3vh 3vw;
    }
    .content {
        padding: 0 0.5rem;
    }
    .bismillah {
        font-size: 44px;
    }
    .surat-box {
        font-size: clamp(1.25rem, 1rem + 0.9vw, 1.5rem);
    }
    .placeholder-title {
        font-size: clamp(1rem, 4.5vw, 1.4rem);
    }
    .gallery-grid {
        gap: 6px;
    }
}
@media (min-height: 900px) {
    .section {
        padding: 6vh 6vw;
    }
    .bismillah {
        font-size: 44px;
    }
    .surat-box {
        font-size: clamp(1.25rem, 1rem + 0.9vw, 1.5rem);
    }
    .placeholder-title {
        font-size: clamp(1.8rem, 4vw, 2.6rem);
    }
    .btn {
        padding: 0.8em 2.6em;
        font-size: clamp(1rem, 2vw, 1.3rem);
    }
}