/* ============================================================
   TEMA 18 — SINEMA (PREMIUM)
   Layout sinematik, bukan sekadar ganti palet: adegan full-screen,
   letterbox, foto Ken Burns, grain film, kartu bab, dan hitung
   mundur gaya bioskop. Semua aturan hanya aktif saat
   <html data-tema="tema-18">, jadi 17 tema lain tidak berubah.
   Gerak memakai transform/opacity saja (ringan di HP) dan mati
   kalau pengguna mengaktifkan prefers-reduced-motion.
   ============================================================ */

html[data-tema="tema-18"] {
    --cinema-ink: #0d0b09;
    --cinema-gold: #d9b877;
    --cinema-gold-bright: #f2dfb1;
    --cinema-text: #e8e0d0;
    --cinema-muted: #b8ab93;
    background: var(--cinema-ink);
}

html[data-tema="tema-18"] body {
    background: var(--cinema-ink);
    color: var(--cinema-text);
}

/* ==================== GRAIN FILM ==================== */
html[data-tema="tema-18"] body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9990;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='0.6'/></svg>");
}

/* ==================== SPLASH SINEMATIK ==================== */
html[data-tema="tema-18"] #cover-modal {
    background: var(--cinema-ink);
}

/* Foto pasangan full-bleed di balik sampul (dibuat cinemaMotion.js). */
html[data-tema="tema-18"] .cinema-splash-photo {
    position: absolute;
    inset: -4%;
    z-index: 0;
    background-size: cover;
    background-position: center;
    animation: cinemaKenBurns 18s ease-in-out infinite alternate;
}

/* Watermark ornamen dimatikan di splash: foto yang bicara. */
html[data-tema="tema-18"] #cover-modal::after {
    opacity: 0;
}

html[data-tema="tema-18"] #cover-modal::before {
    background: linear-gradient(180deg, rgba(13, 11, 9, 0.3) 0%, rgba(13, 11, 9, 0.18) 45%, rgba(13, 11, 9, 0.9) 100%);
    z-index: 2;
}

html[data-tema="tema-18"] .cover-content {
    position: relative;
    z-index: 3;
}

/* Bunga sudut sampul disembunyikan: layar bersih seperti judul film. */
html[data-tema="tema-18"] #cover-modal .cover-ornament,
html[data-tema="tema-18"] #cover-modal .cover-photo-floral {
    display: none;
}

/* Bingkai monogram disembunyikan: judul film memakai nama lengkap. */
html[data-tema="tema-18"] #cover-modal .cover-photo {
    display: none;
}

/* Judul film: nama pasangan besar, dibuat cinemaMotion.js. */
html[data-tema="tema-18"] .cinema-title-names {
    font-family: var(--ff-script);
    font-size: 2.9rem;
    line-height: 1.15;
    color: var(--cinema-gold-bright);
    margin: 0.4rem 0 0.2rem;
}

html[data-tema="tema-18"] .cinema-title-date {
    font-size: 0.85rem;
    color: var(--cinema-text);
    opacity: 0.9;
}

/* Urutan judul: label, foto, penerima, tombol — muncul beruntun. */
html[data-tema="tema-18"] #cover-modal .cover-label,
html[data-tema="tema-18"] #cover-modal .cinema-title-names,
html[data-tema="tema-18"] #cover-modal .cinema-title-date,
html[data-tema="tema-18"] #cover-modal .cover-to,
html[data-tema="tema-18"] #cover-modal #btn-open-invitation {
    animation: cinemaTitleIn 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

html[data-tema="tema-18"] #cover-modal .cinema-title-names {
    animation-delay: 0.25s;
}

html[data-tema="tema-18"] #cover-modal .cinema-title-date {
    animation-delay: 0.4s;
}

html[data-tema="tema-18"] #cover-modal .cover-to {
    animation-delay: 0.5s;
}

html[data-tema="tema-18"] #cover-modal #btn-open-invitation {
    animation-delay: 0.75s;
}

html[data-tema="tema-18"] #cover-modal .cover-label {
    color: var(--cinema-gold);
}

html[data-tema="tema-18"] #cover-modal #btn-open-invitation {
    background: var(--cinema-gold);
    color: #171310;
}

/* ==================== LETTERBOX ==================== */
html[data-tema="tema-18"] .cinema-letterbox {
    position: absolute;
    inset: 0;
    z-index: 6;
    pointer-events: none;
}

html[data-tema="tema-18"] .cinema-letterbox::before,
html[data-tema="tema-18"] .cinema-letterbox::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 7svh;
    background: #000;
}

html[data-tema="tema-18"] .cinema-letterbox::before {
    top: 0;
}

html[data-tema="tema-18"] .cinema-letterbox::after {
    bottom: 0;
}

/* ==================== ADEGAN (SCENE) ==================== */
html[data-tema="tema-18"] .section-card {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    background: var(--cinema-ink);
    min-height: 100svh;
}

html[data-tema="tema-18"] .section-inner {
    background: transparent;
    min-height: 100svh;
    padding: 14svh 24px 12svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
}

/* Ornamen sudut + blur floral dimatikan: adegan bersih dan gelap. */
html[data-tema="tema-18"] .section-ornament,
html[data-tema="tema-18"] .section-bg-blur {
    display: none;
}

/* Kartu bab di atas tiap adegan. */
html[data-tema="tema-18"] .section-card::before {
    content: '';
    position: absolute;
    top: 26px;
    left: 0;
    right: 0;
    z-index: 6;
    text-align: center;
    font-size: 0.68rem;
    color: var(--cinema-gold);
    opacity: 0.85;
}

html[data-tema="tema-18"] #section-cover .section-card::before {
    content: 'Adegan 01 · Sampul';
    top: calc(7svh + 16px);
}

html[data-tema="tema-18"] #section-couple .section-card::before {
    content: 'Adegan 02 · Mempelai';
}

html[data-tema="tema-18"] #section-event .section-card::before {
    content: 'Adegan 03 · Acara';
}

html[data-tema="tema-18"] #section-story .section-card::before {
    content: 'Adegan 04 · Cerita';
}

html[data-tema="tema-18"] #section-gallery .section-card::before {
    content: 'Adegan 05 · Galeri';
}

html[data-tema="tema-18"] #section-reservation .section-card::before {
    content: 'Adegan 06 · Kehadiran';
}

html[data-tema="tema-18"] #section-wishes .section-card::before {
    content: 'Adegan 07 · Ucapan';
}

html[data-tema="tema-18"] #section-gift .section-card::before {
    content: 'Adegan 08 · Penutup';
}

/* ==================== REVEAL ADEGAN ==================== */
/* Menimpa .animate-in biasa: masuk seperti potongan film — naik
   pelan dari blur, bukan geser kiri-kanan. */
html[data-tema="tema-18"] .animate-in {
    opacity: 0;
    transform: translateY(56px);
    filter: blur(6px);
    transition:
        opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1),
        transform 1.1s cubic-bezier(0.22, 1, 0.36, 1),
        filter 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-tema="tema-18"] .animate-in.animated {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* ==================== ADEGAN SAMPUL: FOTO FULL-BLEED ==================== */
html[data-tema="tema-18"] #section-cover .cover-section-photo {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    margin: 0;
    z-index: 0;
    filter: none;
}

html[data-tema="tema-18"] #section-cover .cover-section-photo::before {
    display: none;
}

/* Bingkai hexagon di tengah (yang bikin foto jadi diamond):
   lepas potongan hexagon-nya, isi penuh bingkai, tanpa latar krem. */
html[data-tema="tema-18"] #section-cover .cover-photo-frame {
    width: 100%;
    height: 100%;
    clip-path: none;
    background: none;
}

html[data-tema="tema-18"] #section-cover .cover-photo-frame::before,
html[data-tema="tema-18"] #section-cover .cover-photo-frame::after {
    display: none;
}

html[data-tema="tema-18"] #section-cover .cover-section-img {
    background-size: cover;
    background-position: center;
    animation: cinemaKenBurns 20s ease-in-out infinite alternate;
}

html[data-tema="tema-18"] #section-cover .cover-section-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    background: linear-gradient(180deg, rgba(13, 11, 9, 0.62) 0%, rgba(13, 11, 9, 0.25) 40%, rgba(13, 11, 9, 0.88) 100%);
}

html[data-tema="tema-18"] #section-cover .section-inner > *:not(.cover-section-photo) {
    position: relative;
    z-index: 1;
}

/* ==================== TIPOGRAFI & HITUNG MUNDUR ==================== */
html[data-tema="tema-18"] .section-title,
html[data-tema="tema-18"] .couple-headline {
    color: var(--cinema-gold-bright);
}

html[data-tema="tema-18"] .couple-headline {
    font-weight: 500;
}

html[data-tema="tema-18"] .section-subtitle,
html[data-tema="tema-18"] .section-text,
html[data-tema="tema-18"] .cover-subtitle,
html[data-tema="tema-18"] .countdown-label {
    color: var(--cinema-text);
}

html[data-tema="tema-18"] .date-day,
html[data-tema="tema-18"] .date-number,
html[data-tema="tema-18"] .date-month,
html[data-tema="tema-18"] .date-year {
    color: var(--cinema-gold-bright);
}

/* Sapaan tamu di splash: teks terang supaya terbaca di atas foto. */
html[data-tema="tema-18"] #cover-modal .cover-to,
html[data-tema="tema-18"] #cover-modal .cover-to * {
    color: var(--cinema-text);
}

html[data-tema="tema-18"] .count-value {
    font-size: 2.4rem;
    font-weight: 400;
    color: var(--cinema-gold-bright);
}

html[data-tema="tema-18"] .countdown-item {
    background: rgba(13, 11, 9, 0.55);
    border: 1px solid rgba(217, 184, 119, 0.35);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(6px);
}

html[data-tema="tema-18"] .count-label {
    color: var(--cinema-muted);
    font-size: 0.62rem;
}

/* ==================== GALERI ==================== */
html[data-tema="tema-18"] .gallery-slider {
    width: 100%;
}

html[data-tema="tema-18"] .gallery-main-img {
    height: 440px;
    animation: cinemaKenBurns 20s ease-in-out infinite alternate;
}

html[data-tema="tema-18"] .gallery-nav {
    background: rgba(13, 11, 9, 0.65);
    color: var(--cinema-gold-bright);
}

html[data-tema="tema-18"] #btn-show-all-gallery {
    background: var(--cinema-gold);
    color: #171310;
}

/* Lightbox galeri ikut gelap supaya tidak keluar dari tema. */
html[data-tema="tema-18"] .gallery-modal {
    background: var(--cinema-ink);
    color: var(--cinema-text);
}

html[data-tema="tema-18"] .gallery-modal-header h3 {
    color: var(--cinema-gold-bright);
}

html[data-tema="tema-18"] .gallery-modal-header button {
    color: var(--cinema-gold-bright);
}

/* ==================== PROGRES & PETUNJUK GULIR ==================== */
html[data-tema="tema-18"] .cinema-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 9991;
    background: linear-gradient(90deg, var(--cinema-gold), var(--cinema-gold-bright));
    transform: scaleX(0);
    transform-origin: left;
}

html[data-tema="tema-18"] .cinema-scroll-cue {
    margin-top: 28px;
    color: var(--cinema-gold);
    font-size: 0.68rem;
    animation: cinemaCue 2.2s ease-in-out infinite;
}

html[data-tema="tema-18"] .cinema-scroll-cue.hidden {
    display: none;
}

/* ==================== KARTU DALAM: ISI GELAP ==================== */
/* Kartu bawaan (mempelai, acara, pengingat, RSVP, ucapan) aslinya
   putih/abu. Di Sinema semuanya jadi panel gelap supaya adegan
   tetap satu kesatuan — tepi dari isi (fill), bukan garis. */
html[data-tema="tema-18"] .couple-card {
    border: none;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.05);
}

html[data-tema="tema-18"] .couple-card-bg {
    background: linear-gradient(135deg, rgba(217, 184, 119, 0.16), rgba(217, 184, 119, 0.05));
}

html[data-tema="tema-18"] .couple-card-body {
    background: rgba(13, 11, 9, 0.55);
}

html[data-tema="tema-18"] .couple-card-body h4 {
    font-weight: 500;
    color: var(--cinema-gold-bright);
}

html[data-tema="tema-18"] .event-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
}

html[data-tema="tema-18"] .event-card-header {
    background: var(--cinema-gold);
    color: #171310;
}

html[data-tema="tema-18"] .event-card-body h5 {
    color: var(--cinema-gold-bright);
}

html[data-tema="tema-18"] .calendar-reminder {
    background: rgba(255, 255, 255, 0.05);
}

html[data-tema="tema-18"] .calendar-reminder span {
    color: var(--cinema-text);
}

html[data-tema="tema-18"] .rsvp-card {
    border: none;
    background: rgba(255, 255, 255, 0.05);
}

html[data-tema="tema-18"] .rsvp-card::before {
    display: none;
}

html[data-tema="tema-18"] .wishes-form-container,
html[data-tema="tema-18"] .wishes-list-container {
    background: rgba(255, 255, 255, 0.05);
}

html[data-tema="tema-18"] .form-group label {
    color: var(--cinema-text);
}

html[data-tema="tema-18"] .form-group input,
html[data-tema="tema-18"] .form-group select,
html[data-tema="tema-18"] .form-group textarea,
html[data-tema="tema-18"] .rsvp-field textarea {
    background: rgba(255, 255, 255, 0.07);
    color: var(--cinema-text);
}

html[data-tema="tema-18"] .select-trigger {
    background: rgba(255, 255, 255, 0.09);
    border: none;
    color: var(--cinema-text);
}

html[data-tema="tema-18"] .select-trigger.placeholder .select-value,
html[data-tema="tema-18"] .select-trigger i {
    color: var(--cinema-muted);
}

html[data-tema="tema-18"] .select-menu {
    background: #171310;
    border: none;
}

html[data-tema="tema-18"] .select-menu li {
    color: var(--cinema-text);
}

html[data-tema="tema-18"] .select-menu li:hover,
html[data-tema="tema-18"] .select-menu li.selected {
    background: rgba(217, 184, 119, 0.18);
    color: var(--cinema-gold-bright);
}

html[data-tema="tema-18"] .form-group input::placeholder,
html[data-tema="tema-18"] .form-group textarea::placeholder,
html[data-tema="tema-18"] .rsvp-field textarea::placeholder {
    color: var(--cinema-muted);
}

html[data-tema="tema-18"] .wish-item,
html[data-tema="tema-18"] .gift-card {
    background: rgba(255, 255, 255, 0.05);
    color: var(--cinema-text);
}

html[data-tema="tema-18"] .story-timeline::before {
    background: var(--cinema-gold);
}

html[data-tema="tema-18"] .story-item {
    color: var(--cinema-text);
}

/* ==================== NAV & TOMBOL ==================== */
html[data-tema="tema-18"] #bottom-nav {
    background: rgba(13, 11, 9, 0.88);
    backdrop-filter: blur(12px);
}

html[data-tema="tema-18"] #bottom-nav .nav-link {
    color: var(--cinema-muted);
}

html[data-tema="tema-18"] #bottom-nav .nav-link.active {
    color: var(--cinema-gold-bright);
}

html[data-tema="tema-18"] .btn-primary-custom {
    background: var(--cinema-gold);
    color: #171310;
}

/* ==================== KEYFRAMES ==================== */
@keyframes cinemaKenBurns {
    from {
        transform: scale(1) translate3d(0, 0, 0);
    }

    to {
        transform: scale(1.1) translate3d(-1.5%, -1%, 0);
    }
}

@keyframes cinemaTitleIn {
    from {
        opacity: 0;
        transform: translateY(26px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cinemaCue {
    0%,
    100% {
        opacity: 0.35;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(6px);
    }
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
    html[data-tema="tema-18"] .cinema-splash-photo,
    html[data-tema="tema-18"] #section-cover .cover-section-img,
    html[data-tema="tema-18"] .gallery-main-img,
    html[data-tema="tema-18"] .cinema-scroll-cue,
    html[data-tema="tema-18"] #cover-modal .cover-label,
    html[data-tema="tema-18"] #cover-modal .cinema-title-names,
    html[data-tema="tema-18"] #cover-modal .cinema-title-date,
    html[data-tema="tema-18"] #cover-modal .cover-to,
    html[data-tema="tema-18"] #cover-modal #btn-open-invitation {
        animation: none;
    }

    html[data-tema="tema-18"] .animate-in {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
    }
}
