/* =========================================================================
   Tema Telaga — pernikahan di tepi danau.

   Titik tolaknya video pembuka: gapura bunga putih di dermaga, danau
   berkilau saat matahari terbit, jalan marmer menuju papan marmer berlis
   emas yang diapit rangkaian mawar putih.

   Gagasan utama: PAPAN MARMER DI TEPI AIR. Isi = panel marmer pucat
   bersudut membulat dengan lis emas tipis (papan di video), garis riak air
   samar di kaki panel; matahari terbit di atas riak sebagai kepala bagian.
   Warna: biru telaga (utama), emas fajar, marmer, hijau zaitun.
   Huruf: Luxurious Script (nama & judul), Forum (sub judul), Urbanist (teks).
   ========================================================================= */

:root {
    --c-paper: #F8F5EF;
    --c-ink: #2F3D44;
    --c-accent: #4E7C90;

    --c-muted: color-mix(in srgb, var(--c-ink) 70%, #fff);
    --c-rule: color-mix(in srgb, var(--tlg-silver) 50%, #fff);
    --c-sunk: color-mix(in srgb, var(--c-accent) 8%, #fff);
    --c-action: var(--c-accent);

    --f-names: 'Luxurious Script', cursive;
    --f-display: 'Forum', 'Cormorant Garamond', Georgia, serif;
    --f-body: 'Urbanist', system-ui, sans-serif;
    --f-script: var(--f-names);

    /* "silver" = emas fajar lis papan (kosakata kartu bersama). */
    --tlg-silver: #CDA766;
    --tlg-ivory: #FFFDF8;
    --tlg-card: #FAF7F1;
    /* Video 720 × 1280. Ponsel: menutupi layar. Layar lebar: utuh setinggi layar. */
    --tlg-w: max(100vw, 100dvh * 9 / 16);
}
@media (min-aspect-ratio: 3 / 4) {
    :root { --tlg-w: calc(100dvh * 9 / 16); }
}

body.inv.tlg {
    background: #E6ECEC; color: var(--c-ink);
    font-family: var(--f-body); font-size: .93rem; line-height: 1.75;
}
.tlg-amp { font-family: var(--f-display); font-style: italic; color: var(--c-accent); }

/* ---------------------------------------------------------- latar isi */

/* Danau berkilau (awal video), dilembutkan & dicerahkan agar teks tetap terbaca. */
.tlg-lake {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background: linear-gradient(rgb(248 245 239 / .2), rgb(248 245 239 / .5)), var(--tlg-danau) center 70% / cover no-repeat, #E6ECEC;
}

/* ---------------------------------------------------------------- sampul */

.tlg .inv-cover.tlg-cover { padding: 0; display: block; overflow: hidden; background: #E6ECEC; }
.tlg-stage {
    position: absolute; left: 50%; top: 50%;
    width: var(--tlg-w); aspect-ratio: 9 / 16; transform: translate(-50%, -50%);
    container-type: inline-size; overflow: hidden;
}
.tlg-stage__poster, .tlg-stage__start, .tlg-stage__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* --- Sampul dua langkah (kelas dari theme.js) -------------------------
   diam      : bingkai pertama video + sapaan + tombol "Buka undangan"
   .is-playing: video berjalan, sapaan memudar
   .is-ready : nama, tanggal & jadwal masuk bingkai; tombol "Lihat undangan" */
.tlg-stage__video { opacity: 0; }
.tlg-stage.is-playing .tlg-stage__video { opacity: 1; }
.tlg-stage__start { transition: opacity .3s ease .25s; }
.tlg-stage.is-playing .tlg-stage__start, .tlg-stage.is-ready .tlg-stage__start { opacity: 0; }

.tlg-cover__text, .tlg-cover__foot { transition: opacity 1.1s ease, transform 1.1s var(--ease), visibility 0s linear 0s; }
.tlg-stage:not(.is-ready) .tlg-cover__text { opacity: 0; visibility: hidden; transform: translateY(12px); transition-duration: .3s, .3s, 0s; transition-delay: 0s, 0s, .3s; }
.tlg-stage.is-playing:not(.is-ready) .tlg-cover__foot { opacity: 0; visibility: hidden; transform: translateY(10px); transition-duration: .5s, .5s, 0s; transition-delay: 0s, 0s, .5s; }
.tlg-stage.is-ready .tlg-cover__foot { transition-delay: .7s, .7s, 0s; }
.tlg-stage:not(.is-ready) #inv-open, .tlg-stage.is-ready .tlg-play, .tlg-cover__foot [hidden] { display: none; }

/* Sebelum papan tiba (diam & selama video): sapaan di atas air, di bawah gapura.
   Posisi baru pindah ke bawah papan saat .is-ready — ketika sapaan sudah
   tak terlihat — jadi tidak ada lompatan saat memudar. */
.tlg-stage:not(.is-ready) .tlg-cover__foot { top: 104cqw; }

/* Jadwal ringkas di dalam bingkai */
/* Bagian bawah papan tertutup mawar di kedua sisi: jadwal dibatasi ±18cqw dari tengah. */
.tlg-cover__sched { display: flex; flex-wrap: wrap; justify-content: center; gap: .8cqw 2.6cqw; max-width: 36cqw; margin: .2cqw 0 0; }
.tlg-cover__sched p { display: grid; justify-items: center; margin: 0; font: 500 2.25cqw/1.35 var(--f-body); color: var(--c-muted); text-align: center; }
.tlg-cover__sched-title { font: 700 2.1cqw/1.4 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--c-accent); }
/* Papan marmer (bingkai akhir video): dalam lis x 24–76%, y 58–112cqw; mawar putih menutup kedua sudut bawah. */
.tlg-cover__text {
    position: absolute; left: 27.5cqw; width: 45cqw; top: 59.5cqw; height: 51cqw;
    display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 1.3cqw;
    text-align: center;
}
.tlg-cover__foot {
    position: absolute; left: 19cqw; width: 62cqw; top: 126cqw;
    display: grid; justify-items: center; padding: 3cqw 4cqw 3.6cqw; border-radius: 5cqw; text-align: center;
    background: rgb(250 247 241 / .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    box-shadow: 0 0 0 1px rgb(205 167 102 / .6), 0 16px 30px -18px rgb(40 60 70 / .45);
}
@keyframes tlg-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.tlg-cover__label { margin: 0; font: 400 3.3cqw/1.3 var(--f-display); letter-spacing: .16em; color: var(--c-accent); }
.tlg-cover__names {
    display: grid; justify-items: center; width: 100%; margin: 0;
    font: 400 13.5cqw/.98 var(--f-names); color: #34525F; text-wrap: balance;
}
.tlg-cover__names .tlg-amp { font-size: .5em; line-height: 1.05; }
.tlg-cover__date {
    margin: 1cqw 0 0; padding-top: 2cqw; border-top: 1px solid var(--tlg-silver);
    font: 400 3.7cqw/1.2 var(--f-display); letter-spacing: .05em; white-space: nowrap; color: var(--c-ink);
}
.tlg-cover__to { margin: 0; font-size: max(.72rem, 2.9cqw); color: var(--c-muted); }
.tlg-cover__guest { max-width: 100%; margin: .1rem 0 0; font: 400 max(1.15rem, 5.2cqw)/1.25 var(--f-display); color: var(--c-ink); overflow-wrap: anywhere; }
.tlg-open {
    margin-top: max(.6rem, 2.4cqw); padding: .8rem 1.8rem; border: 0; border-radius: 999px;
    background: var(--c-accent); color: #fff;
    font: 600 .86rem/1 var(--f-body); letter-spacing: .03em; white-space: nowrap; cursor: pointer;
    box-shadow: 0 0 0 3px rgb(250 247 241 / .9), 0 0 0 4px var(--tlg-silver), 0 10px 22px -12px rgb(30 55 65 / .55);
    transition: background .25s ease;
}
.tlg-open:hover { background: var(--c-ink); }
.tlg-open:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 6px; }

/* ---------------------------------------------------------------- isi */

body.tlg:not(.is-open) .tlg-main { visibility: hidden; opacity: 0; }
body.tlg.is-open .tlg-main { animation: tlg-fade 1s ease both .3s; }
@keyframes tlg-fade { from { opacity: 0; } }

.tlg .inv__main.tlg-main {
    position: relative; z-index: 1;
    width: min(100% - 2rem, 30rem); max-width: none; margin: 0 auto; padding: 26vh 0 0;
}

/* Panel marmer: urat marmer samar, lis emas tipis di dalam tepi (seperti
   papan di video), riak air tipis di kaki panel. */
.tlg .inv-section {
    position: relative; margin: 0 0 14vh; padding: 2.8rem 1.7rem 3.1rem;
    border: 0; border-radius: 1.6rem; text-align: center;
    background:
        /* riak air di kaki panel */
        radial-gradient(60% 10px at 50% calc(100% - 22px), transparent 70%, rgb(78 124 144 / .16) 72%, transparent 76%) no-repeat,
        radial-gradient(40% 8px at 50% calc(100% - 14px), transparent 70%, rgb(78 124 144 / .12) 72%, transparent 76%) no-repeat,
        /* awan urat marmer, sangat samar */
        radial-gradient(70% 40% at 85% 15%, rgb(200 186 166 / .14), transparent 70%),
        radial-gradient(60% 35% at 10% 75%, rgb(200 186 166 / .12), transparent 70%),
        radial-gradient(120% 70% at 20% 0%, #fff, transparent 60%),
        var(--tlg-card);
    box-shadow:
        inset 0 0 0 8px var(--tlg-card), inset 0 0 0 9px var(--tlg-silver),
        inset 0 0 0 10.5px rgb(255 255 255 / .9),
        0 2px 0 rgb(255 255 255 / .7), 0 30px 44px -26px rgb(30 60 75 / .5);
}

.tlg-head { margin-bottom: 1.5rem; text-align: center; }
.tlg-head__sun {
    display: block; width: 3.2rem; height: auto; margin: 0 auto .6rem; overflow: visible;
    fill: none; stroke: var(--tlg-silver); stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round;
}
.tlg-head__sun .tlg-head__disc { fill: color-mix(in srgb, var(--tlg-silver) 22%, transparent); }
.tlg-head__title { margin: 0; font: 400 clamp(2.6rem, 11.5vw, 3.2rem)/1.1 var(--f-names); color: var(--c-accent); }
.tlg-head__lead { max-width: 24rem; margin: .5rem auto 0; color: var(--c-muted); }

/* Pembuka */
.tlg .inv-bismillah { color: var(--c-accent); }
.tlg-verse { margin: 0 0 1.5rem; }
.tlg-verse__text { margin: 0; font: 400 1.18rem/1.7 var(--f-display); color: var(--c-ink); }
.tlg-verse__source { margin-top: .6rem; font: 500 .9rem/1.3 var(--f-display); letter-spacing: .1em; color: var(--c-accent); }
.tlg-lede { max-width: 25rem; margin: 0 auto; color: var(--c-muted); }

/* Mempelai: foto bulat bercincin perak ganda */
.tlg-couple__grid { display: grid; gap: .5rem; }
.tlg-couple__amp { margin: .25rem 0; font: 500 1.8rem/1 var(--f-display); color: var(--tlg-silver); }
.tlg-person { display: grid; justify-items: center; }
.tlg-photo {
    width: 10rem; aspect-ratio: 1; margin: 0 0 1.3rem; padding: 5px; border-radius: 50%;
    border: 1px solid var(--tlg-silver); outline: 1px solid rgb(255 255 255 / .9); outline-offset: 5px;
    box-shadow: 0 0 30px rgb(255 255 255 / .6);
}
.tlg-photo img, .tlg-photo__initial { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.tlg-photo__initial { display: grid; place-items: center; background: var(--c-sunk); font: 400 4.5rem/1 var(--f-names); color: var(--c-accent); }
.tlg-person__text { min-width: 0; overflow-wrap: break-word; }
.tlg-person__name { margin: 0; font: 400 2.9rem/1.05 var(--f-names); color: var(--c-accent); }
.tlg-person__family { margin: .35rem 0 0; font-size: .88rem; color: var(--c-muted); }
.tlg-person__bio { max-width: 22rem; margin: .6rem auto 0; font-size: .88rem; color: var(--c-muted); }
.tlg-person__ig { display: inline-block; margin-top: .6rem; color: var(--c-accent); font-size: .84rem; font-weight: 600; text-decoration: none; }

/* Hitung mundur: tiap sel diberi ikon fase bulan (sabit → purnama). */
.tlg-countdown { display: flex; justify-content: center; gap: .7rem; margin: 0 auto 2rem; }
.tlg .tlg-countdown .inv-countdown__cell {
    display: grid; justify-items: center; gap: .15rem; min-width: 3.6rem; padding: 0;
    border: 0; border-radius: 0; background: none;
}
.tlg .tlg-countdown b { font: 500 1.7rem/1 var(--f-display); color: var(--c-accent); }
.tlg .tlg-countdown span { font-size: .66rem; text-transform: none; letter-spacing: .04em; color: var(--c-muted); }

/* Acara */
.tlg-events__list { display: grid; gap: 0; }
.tlg-event { padding: 1.35rem 0; }
.tlg-event + .tlg-event { border-top: 1px solid var(--c-rule); }
.tlg-event.is-past { opacity: .55; }
.tlg-event__title { margin: 0 0 .2rem; font: 400 2.8rem/1.05 var(--f-names); color: var(--c-accent); }
.tlg-event__date { margin: 0; font: 500 1.1rem/1.4 var(--f-display); letter-spacing: .06em; }
.tlg-event__time { margin: 0; color: var(--c-muted); }
.tlg-event__venue { margin: .85rem 0 0; font-weight: 600; }
.tlg-event__address { margin: .1rem 0 0; font-size: .88rem; color: var(--c-muted); }
.tlg-event__meta { margin: .35rem 0 0; font-size: .84rem; color: var(--c-muted); }
.tlg-event__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.1rem; }
.tlg-event__actions .inv-btn { flex: 1 1 8.5rem; text-align: center; }

/* Tombol */
.tlg .inv-btn { border-radius: 999px; padding: .72rem 1.2rem; font: 600 .82rem/1.2 var(--f-body); letter-spacing: .02em; text-transform: none; }
.tlg .inv-btn--solid { background: var(--c-accent); border-color: var(--c-accent); color: var(--tlg-ivory); box-shadow: none; }
.tlg .inv-btn--ghost { background: rgb(255 255 255 / .6); border-color: var(--tlg-silver); color: var(--c-ink); }
.tlg .inv-btn:hover { filter: none; background: var(--c-ink); border-color: var(--c-ink); color: #fff; }

/* Cerita: bulan sabit kecil sebagai penanda */
.tlg-story__list { display: grid; gap: 1.75rem; margin: 0; padding: 0; list-style: none; }
.tlg-story__item { display: grid; justify-items: center; }
.tlg-story__item::before {
    content: ''; width: 1rem; height: 1rem; margin-bottom: .5rem; border-radius: 50%;
    background: radial-gradient(circle at 70% 35%, transparent .36rem, var(--c-accent) .4rem);
}
.tlg-story__period { margin: 0; font: 500 .95rem/1.2 var(--f-display); letter-spacing: .12em; color: var(--c-muted); }
.tlg-story__title { margin: .15rem 0 0; font: 500 1.3rem/1.3 var(--f-display); color: var(--c-ink); }
.tlg-story__img { width: 100%; aspect-ratio: 4 / 3; margin-top: .75rem; object-fit: cover; border-radius: 1rem; }
.tlg-story__text { max-width: 25rem; margin: .4rem 0 0; font-size: .9rem; color: var(--c-muted); }

/* Galeri (markup _base): pertama bulat */
.tlg .inv-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .45rem; }
.tlg .inv-gallery__cell { padding: 0; border: 0; border-radius: 1rem; aspect-ratio: 3 / 4; overflow: hidden; background: var(--c-sunk); cursor: zoom-in; }
.tlg .inv-gallery__cell:first-child { grid-column: 1 / -1; width: 82%; margin: 0 auto .6rem; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 0 1px var(--tlg-silver), 0 0 0 8px rgb(255 255 255 / .5); }
.tlg .inv-gallery__cell img { width: 100%; height: 100%; object-fit: cover; }

/* Video & siaran langsung */
.tlg .inv-video { padding: 0; border: 0; border-radius: 1rem; overflow: hidden; background: #000; }
.tlg .inv-video iframe { position: static; display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }

/* Form RSVP & ucapan (markup _base) */
.tlg .inv-form { gap: 1.3rem; text-align: left; }
.tlg .inv-label { font-size: .85rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--c-ink); }
.tlg .inv-input { padding: .8rem 1rem; border: 1px solid var(--tlg-silver); border-radius: .9rem; background: rgb(255 255 255 / .8); font-size: .95rem; }
.tlg .inv-input:focus, .tlg .inv-input:focus-visible { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 18%, transparent); }
.tlg .inv-choice { border-color: var(--tlg-silver); border-radius: .9rem; background: rgb(255 255 255 / .8); }
.tlg .inv-choice:has(:checked) { border-color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 8%, #fff); color: var(--c-accent); }
.tlg .inv-choice input { accent-color: var(--c-accent); }
.tlg .inv-form .inv-btn--solid { width: 100%; padding-block: .95rem; }
.tlg .inv-tally div { border: 1px solid var(--tlg-silver); border-radius: .9rem; background: rgb(255 255 255 / .75); }
.tlg .inv-tally dd { font-family: var(--f-display); font-size: 1.9rem; color: var(--c-accent); }
.tlg .inv-wish { padding: .95rem 1.1rem; border: 0; border-radius: .9rem; background: rgb(255 255 255 / .75); text-align: left; }
.tlg .inv-wish__name { font-weight: 600; color: var(--c-accent); }

/* Hadiah: kartu malam dengan bulan purnama samar */
.tlg .inv-gifts { display: grid; gap: 1rem; }
.tlg .inv-gift {
    position: relative; overflow: hidden; isolation: isolate; padding: 1.9rem 1.5rem; border: 0; border-radius: 1.2rem; text-align: center; color: var(--tlg-ivory);
    background: linear-gradient(160deg, var(--c-accent), color-mix(in srgb, var(--c-accent) 70%, #0d1120));
}
.tlg .inv-gift::before {
    content: ''; position: absolute; z-index: -1; width: 11rem; aspect-ratio: 1; right: -3.5rem; top: -3.5rem; border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, rgb(242 239 223 / .35), rgb(242 239 223 / .08) 70%);
    box-shadow: 0 0 40px rgb(242 239 223 / .2);
}
.tlg .inv-gift__logo { max-height: 1.6rem; margin-inline: auto; filter: brightness(0) invert(1); opacity: .9; }
.tlg .inv-gift__label { font-size: .85rem; letter-spacing: .02em; text-transform: none; color: rgb(242 239 223 / .75); }
.tlg .inv-gift__account { font: 500 1.7rem/1.3 var(--f-display); letter-spacing: .08em; color: #fff; }
.tlg .inv-gift__holder, .tlg .inv-gift__address { color: rgb(242 239 223 / .85); }
.tlg .inv-gift .inv-btn--ghost { margin-top: 1rem; background: transparent; border-color: rgb(242 239 223 / .5); color: #fff; }
.tlg .inv-gift__qr { display: block; max-width: 12rem; margin: .75rem auto 0; padding: .5rem; background: #fff; border-radius: .5rem; }

/* Penutup */
.tlg .tlg-closing { margin-bottom: 50vh; }
.tlg-closing__text { max-width: 24rem; margin: 0 auto; color: var(--c-muted); }
.tlg-closing__salutation { margin: 1.6rem 0 0; font: 500 1rem/1.3 var(--f-display); letter-spacing: .1em; color: var(--c-muted); }
.tlg-closing__names { display: grid; margin: .2rem 0 0; font: 400 clamp(3.4rem, 15vw, 4.2rem)/1 var(--f-names); color: var(--c-accent); }
.tlg-closing__names .tlg-amp { font-size: .46em; line-height: 1.6; letter-spacing: .1em; }
.tlg-closing__tag { margin: .8rem 0 0; font-size: .88rem; color: var(--c-muted); }
/* Penyesuaian */
.tlg-story__item::before { width: 6px; height: 6px; background: var(--tlg-silver); box-shadow: 0 0 0 3px rgb(217 184 120 / .25); }
.tlg-photo { box-shadow: 0 10px 24px -14px rgb(30 50 60 / .55); }
.tlg .tlg-countdown .inv-countdown__cell {
    min-width: 3.7rem; padding: .7rem .2rem .55rem; border: 1.5px solid var(--tlg-silver); border-radius: 1rem;
    background: #fff; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px color-mix(in srgb, var(--tlg-silver) 55%, transparent);
}
.tlg .inv-gift { background: linear-gradient(170deg, color-mix(in srgb, var(--c-accent) 80%, #fff), color-mix(in srgb, var(--c-accent) 82%, #0c2530)); box-shadow: inset 0 0 0 1px var(--tlg-silver), inset 0 0 0 6px color-mix(in srgb, var(--c-accent) 85%, #000), inset 0 0 0 7px rgb(255 255 255 / .35); }
.tlg .inv-gift::before { background: radial-gradient(circle at 40% 40%, rgb(255 246 214 / .55), rgb(255 246 214 / .05) 70%); box-shadow: none; }
.tlg .inv-gift__account { color: #fff; }
.tlg .tlg-closing { margin-bottom: 46vh; }

.tlg .tlg-footer {
    position: relative; margin: 0 -1rem; padding: 1rem; border-radius: 1.25rem 1.25rem 0 0;
    background: rgb(47 61 68 / .8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    color: rgb(255 251 244 / .85); font-size: .75rem; text-align: center;
}
.tlg .tlg-footer a { color: #fff; }

/* Musik, tombol QR, navigasi cepat */
.tlg .inv-music { background: var(--c-accent); }
.tlg .inv-checkin-btn { background: var(--c-accent); color: #fff; }
.tlg { --qn-bg: rgb(250 247 241 / .93); --qn-fg: var(--c-muted); --qn-active: var(--c-accent); }

/* ------------------------------------------------------------ layar lebar */

@media (min-aspect-ratio: 3 / 4) {
    .tlg .inv-cover.tlg-cover { isolation: isolate; }
    .tlg .inv-cover.tlg-cover::before {
        content: ''; position: absolute; inset: -40px; z-index: -1;
        background: var(--tlg-blur) center / cover; filter: blur(24px);
    }
    .tlg-stage { box-shadow: 0 0 80px -10px rgb(30 60 75 / .35); }
}
@media (min-width: 900px) {
    .tlg .inv-cover.tlg-cover { left: 0; right: 0; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
    body.tlg.is-open .tlg-main { animation: none; }
    .tlg-cover__text, .tlg-cover__foot, .tlg-stage__start { transition: none; }
}

/* ------------------------------------------------- HP: bilah alamat menyusut
   Di HP, bilah alamat menutup sendiri saat digulir → tinggi layar berubah →
   latar fixed ikut berubah ukuran ("melompat"). Latar memakai tinggi layar
   TERBESAR (lvh) yang tetap, jadi tidak berubah saat bilah alamat muncul/hilang. */
.tlg-lake { bottom: auto; height: 100vh; height: 100lvh; }
