/* ==========================================================
   DInvite — Tema "Candi Sekar" (Adat Jawa)
   Gaya ukiran klasik (toile) di atas kertas gading: pepohonan bergaris
   hijau sage & ungu mauve, candi bertingkat, gunungan marun, janur kuning,
   ornamen emas timbul, dan hamparan bunga cat air (lili, peoni, hortensia).
   Pembuka: tirai beludru marun tersibak. Hiasan dipasang candisekar.js.
   Semua gerak dimatikan bila perangkat meminta gerak minimal.
   ========================================================== */
.t-candisekar {
    --bg: #f5f0e4; --bg-2: #efe8d8; --card: #fbf8f0; --ink: #4b3540; --muted: #7b6870;
    --accent: #7a4a58; --accent-2: #b8913f; --on-accent: #fff; --line: rgba(122,74,88,.24);
    --gold: linear-gradient(180deg, #e9cf86 0%, #c9a24e 45%, #a57d2c 100%);
    --hero-rgb: 245,240,228; --tint-a: .8; --hero-ink: #4b3540;
    --pattern: url(../../img/themes/candisekar/pola.svg) 0 0 / 56px 56px;
    --am-seam: linear-gradient(#e9cf86, #a57d2c, #e9cf86);
    color-scheme: light;
}
@keyframes csIn { from { opacity: 0; transform: translateY(22px); } }
@keyframes csSwayL { 0%, 100% { transform: rotate(-.8deg); } 50% { transform: rotate(1.1deg); } }
@keyframes csSwayR { 0%, 100% { transform: scaleX(1) rotate(.8deg); } 50% { transform: scaleX(1) rotate(-1.1deg); } }
@keyframes csBloom { from { opacity: 0; transform: translateY(40px) scaleY(.9); } }
@keyframes csBreath { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-3px) scale(1.012); } }
@keyframes csRise { from { opacity: 0; transform: translate(-50%, 50px); } }
@keyframes csFloat { 0%, 100% { transform: translateY(0) rotate(-.6deg); } 50% { transform: translateY(-7px) rotate(.6deg); } }
@keyframes csSwing { 0%, 100% { transform: rotate(-2.2deg); } 50% { transform: rotate(1.6deg); } }
@keyframes csUnfold { from { clip-path: inset(0 50% 0 50%); opacity: .2; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
@keyframes csGlow { 0%, 100% { filter: drop-shadow(0 6px 14px rgba(110,42,58,.22)); } 50% { filter: drop-shadow(0 6px 22px rgba(201,162,78,.55)); } }
@keyframes csReveal { from { opacity: 0; filter: blur(8px); letter-spacing: .04em; } to { opacity: 1; filter: blur(0); } }

/* Huruf: nama bersambung, judul kapital Cormorant, isi EB Garamond */
.t-candisekar { font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif; }
.t-candisekar .names { font-family: 'Pinyon Script', 'Great Vibes', cursive; font-weight: 400; color: var(--accent); }
.t-candisekar .names i { font-family: 'Pinyon Script', cursive; font-style: normal; font-size: .62em; color: var(--accent); }
.t-candisekar .cover .names { font-size: clamp(3rem, 13vw, 4.4rem); line-height: 1.2; }
.t-candisekar .names--lg { font-size: clamp(3.1rem, 14vw, 4.2rem); line-height: 1.15; }
.t-candisekar .names--md { font-size: 2.3rem; }
.t-candisekar .kicker { font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: .9rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.t-candisekar .sec__title { font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 1.75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.t-candisekar .sec__title::after { content: ''; display: block; width: 200px; height: 62px; margin: .2rem auto 0; background: url(../../img/themes/candisekar/emas.webp) center / contain no-repeat; }
.t-candisekar .reveal .sec__title::after { clip-path: inset(0 50% 0 50%); transition: clip-path 1.4s cubic-bezier(.2,.7,.2,1) .2s; }
.t-candisekar .reveal.is-visible .sec__title::after { clip-path: inset(0 0 0 0); }
.t-candisekar .cover__date, .t-candisekar .hero__date, .t-candisekar .aside__date, .t-candisekar .countdown__date { font-family: 'EB Garamond', serif; font-style: normal; font-weight: 500; letter-spacing: .12em; color: var(--ink); }
.t-candisekar .thanks { font-family: 'Pinyon Script', cursive; font-size: 2.4rem; color: var(--accent); }
.t-candisekar .cover__to strong { font-family: 'Cormorant Garamond', serif; font-weight: 600; color: var(--ink); }
.t-candisekar .quote { font-family: 'EB Garamond', serif; font-style: normal; font-size: 1.08rem; line-height: 1.85; color: var(--ink); }
.t-candisekar .lead-txt, .t-candisekar .person__parents { font-family: 'EB Garamond', serif; font-size: 1.02rem; }
.t-candisekar .tm-divider { width: 210px; }

/* Pembuka: tirai beludru marun */
.t-candisekar .am-panel::before { background: url(../../img/themes/candisekar/tirai.webp) center / cover no-repeat, #5a0f1d; }

/* Latar kertas gading bermotif kawung samar */
.t-candisekar .page { background: var(--pattern), var(--bg); }
.t-candisekar .sec--tint { background: var(--pattern), var(--bg-2); }
.t-candisekar .cover, .t-candisekar .hero, .t-candisekar .aside { background: radial-gradient(ellipse at 50% 40%, #fbf8f0, transparent 70%), var(--pattern), var(--bg); overflow: hidden; }
.t-candisekar .cover::before, .t-candisekar .cover::after { display: none; }

/* ---------- Lapisan hiasan (dipasang candisekar.js) ---------- */
.t-candisekar .sec.cs-host, .t-candisekar .aside.cs-host { position: relative; overflow: hidden; isolation: isolate; }
.t-candisekar .cover.cs-host { overflow: hidden; isolation: isolate; }
.t-candisekar .cs-scene { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.t-candisekar .sec.cs-host > :not(.cs-scene):not(.am-garland):not(.tm-frame) { position: relative; z-index: 1; }
.t-candisekar .cs-scene img { position: absolute; display: block; max-width: none; user-select: none; }
.t-candisekar .cs-tree { bottom: 0; width: min(34%, 190px); height: auto; transform-origin: 50% 100%; }
.t-candisekar .cs-tree--l { left: -9%; animation: csSwayL 9s ease-in-out infinite; }
.t-candisekar .cs-tree--r { right: -9%; animation: csSwayR 10s ease-in-out infinite; }
.t-candisekar .cs-bed { left: 50%; bottom: -2%; width: 150%; transform: translateX(-50%); transform-origin: 50% 100%; }
.t-candisekar .cs-candi { left: 50%; bottom: 7%; width: 125%; transform: translateX(-50%); opacity: .45; }

/* Sampul & pembuka: lengkung emas berundak di tengah */
.t-candisekar .cs-arch { position: absolute; left: 50%; top: 8%; bottom: 10%; width: min(78%, 360px); transform: translateX(-50%); z-index: 1;
    border: 3px solid #c9a24e; border-radius: 46% 46% 18px 18px / 18% 18% 18px 18px;
    box-shadow: inset 0 0 0 6px rgba(245,240,228,.9), inset 0 0 0 7px rgba(201,162,78,.55), 0 10px 30px -18px rgba(110,74,40,.5);
    background: linear-gradient(rgba(251,248,240,.82), rgba(251,248,240,.6)); }
.t-candisekar .cs-scene--hero .cs-candi { bottom: 14%; width: 112%; opacity: .32; }
.t-candisekar .cs-scene--hero .cs-bed { width: 175%; bottom: -4%; z-index: 2; }
.t-candisekar .cs-scene--hero .cs-tree { z-index: 1; bottom: 6%; width: min(38%, 220px); }
.t-candisekar .cs-scene--hero .cs-arch { z-index: 2; }
.t-candisekar .cs-scene--hero .cs-bed { z-index: 3; }
.t-candisekar .cover__inner, .t-candisekar .hero__inner, .t-candisekar .aside__inner { z-index: 3 !important; }
.t-candisekar .cover__inner { padding: 1rem 1.2rem 6rem; gap: .7rem; }
.t-candisekar .hero { padding-bottom: 7rem; }
.t-candisekar .tm-house { filter: drop-shadow(0 8px 16px rgba(110,42,58,.22)); }
.t-candisekar .cover .tm-house { width: min(96px, 26vw); animation: csIn 1.2s ease both, csFloat 7s ease-in-out 1.2s infinite; }
.t-candisekar .hero .tm-house { width: min(110px, 30vw); animation: csFloat 7s ease-in-out infinite, csGlow 5s ease-in-out infinite; }
.t-candisekar .aside .tm-house { width: 130px; }
.t-candisekar .tm-house--sm { width: 90px; }
@media (max-height: 720px) { .t-candisekar .cover .tm-house { width: 70px; } .t-candisekar .cover__inner { gap: .4rem; padding-bottom: 4.5rem; } }
.t-candisekar .cover .kicker { animation: csIn 1s ease .35s both; }
.t-candisekar .cover .names { animation: csReveal 1.5s cubic-bezier(.2,.7,.2,1) .55s both; }
.t-candisekar .cover__date { animation: csIn 1s ease .85s both; }
.t-candisekar .cover__to { animation: csIn 1s ease 1s both; }
.t-candisekar .cover .ibtn { animation: csIn 1s ease 1.2s both; }
.t-candisekar .cs-scene--hero .cs-bed { animation: csBloom 1.6s cubic-bezier(.2,.7,.2,1) .2s both; }
.t-candisekar .cs-scene--hero .cs-candi { animation: csRise 1.8s ease .4s both; }
body.t-candisekar:not(.is-locked) .hero .names { animation: csReveal 1.6s cubic-bezier(.2,.7,.2,1) .3s both; }

/* Sampul tertutup tirai beludru: teks krem keemasan */
.t-candisekar.am-has-opening .cover .names, .t-candisekar.am-has-opening .cover .names i { color: #f6e3b4; text-shadow: 0 2px 14px rgba(20,0,6,.55); }
.t-candisekar.am-has-opening .cover .kicker, .t-candisekar.am-has-opening .cover__date, .t-candisekar.am-has-opening .cover__to,
.t-candisekar.am-has-opening .cover__to strong { color: #fbf1dc; text-shadow: 0 1px 8px rgba(20,0,6,.6); }
.t-candisekar.am-has-opening .cover .tm-house { filter: drop-shadow(0 0 1px #f3dca8) drop-shadow(0 0 1px #f3dca8) drop-shadow(0 10px 18px rgba(0,0,0,.45)); }

/* Foto sampul (bila ada): memakai lapisan gradasi bawaan (pudar ke warna gading di bawah, teks gelap) */
.t-candisekar .hero.has-photo .names { text-shadow: 0 1px 12px rgba(245,240,228,.9); }

/* Kutipan: gunungan */
.t-candisekar .sec--quote { padding-top: 2rem; }
.t-candisekar .cs-scene--quote { position: relative; inset: auto; height: 170px; margin: 0 auto .8rem; }
.t-candisekar .cs-gunungan { left: 50%; top: 0; height: 100%; width: auto; transform-origin: 50% 90%; translate: -50% 0; animation: csFloat 7s ease-in-out infinite, csGlow 5s ease-in-out infinite; }
.t-candisekar .sec--quote .tm-divider, .t-candisekar .sec--quote .ornament { display: none; }

/* Mempelai: pepohonan samar */
.t-candisekar .cs-scene--soft .cs-tree { opacity: .22; bottom: auto; top: 2%; }

/* Bingkai foto mempelai: lengkung emas berundak, sayap ukiran & bunga */
.t-candisekar .pframe { width: min(230px, 64vw); padding: 0; margin: 4.2rem auto 3.4rem; }
.t-candisekar .pframe::before { content: ''; position: absolute; left: -27.4%; top: -24.6%; width: 154.8%; height: 147.3%; z-index: 2; border: 0; border-radius: 0; opacity: 1;
    background: url(../../img/themes/candisekar/bingkai.webp) center / 100% 100% no-repeat; pointer-events: none; }
.t-candisekar .pframe::after { display: none; }
.t-candisekar .pframe__arch { border-radius: 0; box-shadow: none; background: linear-gradient(160deg, #8a2233, #4a0d18);
    -webkit-mask: url(../../img/themes/candisekar/jendela.svg) center / 100% 100% no-repeat; mask: url(../../img/themes/candisekar/jendela.svg) center / 100% 100% no-repeat; }
.t-candisekar .pframe__init { color: #f3dca8; background: radial-gradient(circle at 50% 35%, #a52a3e, #4a0d18); font-family: 'Pinyon Script', cursive; }
.t-candisekar .reveal .pframe { opacity: 0; transform: translateY(26px) scale(.97); transition: opacity 1.1s ease, transform 1.1s cubic-bezier(.2,.7,.2,1); }
.t-candisekar .reveal.is-visible .pframe { opacity: 1; transform: none; }
.t-candisekar .person__soc .psoc { background: var(--accent); color: #fff; }

/* Hitung mundur: ornamen emas, pohon & bunga */
.t-candisekar .sec--countdown { padding-block: 6.4rem 15rem; }
.t-candisekar .cs-gold { left: 50%; width: min(300px, 78%); translate: -50% 0; }
.t-candisekar .cs-gold--top { top: 1.4rem; }
.t-candisekar .cs-gold--bottom { bottom: 8.6rem; transform: scaleY(-1); }
.t-candisekar .cs-scene--frame .cs-tree { opacity: .4; bottom: 4rem; width: min(26%, 150px); }
.t-candisekar .cs-scene--frame .cs-bed { width: 175%; }
.t-candisekar .reveal .cs-gold { clip-path: inset(0 50% 0 50%); transition: clip-path 1.5s cubic-bezier(.2,.7,.2,1) .2s; }
.t-candisekar .reveal.is-visible .cs-gold { clip-path: inset(0 0 0 0); }
.t-candisekar .reveal .cs-bed { opacity: 0; translate: -50% 40px; transition: opacity 1.3s ease .3s, translate 1.6s cubic-bezier(.2,.7,.2,1) .3s; transform: none; }
.t-candisekar .reveal.is-visible .cs-bed { opacity: 1; translate: -50% 0; animation: csBreath 8s ease-in-out 2s infinite; }
.t-candisekar .reveal .cs-bed { left: 50%; }
.t-candisekar .countdown div { border: 0; background: transparent; box-shadow: none; }
.t-candisekar .countdown b { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 2.6rem; color: var(--accent); }
.t-candisekar .countdown small { font-family: 'EB Garamond', serif; font-size: .95rem; letter-spacing: .04em; text-transform: none; color: var(--ink); }

/* Acara: janur kuning & candi */
.t-candisekar #acara { padding-bottom: 15rem; }
.t-candisekar .cs-janur { top: -.6rem; width: min(150px, 38%); transform-origin: 0 0; animation: csSwing 6s ease-in-out infinite; }
.t-candisekar .cs-janur--l { left: -.6rem; }
.t-candisekar .cs-janur--r { right: -.6rem; transform-origin: 50% 0; scale: -1 1; animation-delay: -3s; }
.t-candisekar .cs-scene--event .cs-candi { bottom: -1rem; width: 128%; opacity: 1; }
.t-candisekar .reveal .cs-candi { opacity: 0; translate: 0 60px; transition: opacity 1.4s ease .4s, translate 1.8s cubic-bezier(.2,.7,.2,1) .4s; }
.t-candisekar .reveal.is-visible .cs-scene--event .cs-candi { opacity: 1; translate: 0 0; }
.t-candisekar .reveal.is-visible .cs-scene--closing .cs-candi { opacity: .5; translate: 0 0; }
.t-candisekar .event { border: 0; background: transparent; box-shadow: none; padding: 1.4rem .6rem; }
.t-candisekar .event::before { display: none; }
.t-candisekar .event h3 { font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 2rem; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.t-candisekar .event h3::after { content: ''; display: block; width: 140px; height: 1px; margin: .7rem auto 0; background: var(--ink); opacity: .6; }
.t-candisekar .reveal .event { opacity: 0; transform: translateY(24px); transition: opacity 1s ease, transform 1s cubic-bezier(.2,.7,.2,1); }
.t-candisekar .reveal.is-visible .event { opacity: 1; transform: none; }
.t-candisekar .reveal.is-visible .event:nth-child(2) { transition-delay: .25s; }

/* Amplop digital & bagian lain: kartu bingkai emas ganda */
.t-candisekar .cs-scene--gift .cs-gold--top { top: .8rem; }
.t-candisekar .cs-scene--gift .cs-tree { opacity: .22; }
.t-candisekar .gift, .t-candisekar .rsvp, .t-candisekar .wish, .t-candisekar .qr-card, .t-candisekar .lstory__card {
    border-radius: 6px; border: 2px solid #c9a24e; background: rgba(251,248,240,.92);
    box-shadow: inset 0 0 0 5px rgba(251,248,240,.95), inset 0 0 0 6px rgba(201,162,78,.5), 0 18px 34px -24px rgba(75,53,64,.55); }
.t-candisekar .cs-scene--closing .cs-candi { bottom: 3.2rem; width: 118%; }
.t-candisekar .cs-scene--closing .cs-tree { width: min(26%, 140px); opacity: .7; }
.t-candisekar .sec--closing { padding-bottom: 19rem; }

/* Tombol emas */
.t-candisekar .ibtn { border-radius: 999px; font-family: 'EB Garamond', serif; font-size: 1rem; letter-spacing: .06em; border-color: #c9a24e; color: #8a6a26; }
.t-candisekar .ibtn--solid { background: var(--gold); color: #fff; border-color: #c9a24e; box-shadow: 0 10px 22px -12px rgba(165,125,44,.9), inset 0 1px 0 rgba(255,255,255,.45); text-shadow: 0 1px 1px rgba(90,60,10,.35); }
.t-candisekar .ibtn--solid:hover { background: linear-gradient(180deg, #f0d996, #d1ac58 45%, #b08732); color: #fff; }
.t-candisekar .divider { background: #c9a24e; }
.t-candisekar .lstory__dot { background: #c9a24e; }
.t-candisekar .lstory__title, .t-candisekar .tale__title { font-family: 'Cormorant Garamond', serif; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
.t-candisekar .amp { font-family: 'Pinyon Script', cursive; color: var(--accent-2); }
.t-candisekar .am-fall i { filter: drop-shadow(0 2px 3px rgba(150,80,100,.25)); }
.t-candisekar .ifoot { border-top: 1px solid var(--line); }

@media (min-width: 960px) {
    .t-candisekar .cs-scene--hero .cs-tree { height: 92%; }
    .t-candisekar .aside .cs-arch { width: min(64%, 540px); top: 7%; bottom: 16%; }
    .t-candisekar .aside .cs-scene--hero .cs-bed { width: 118%; bottom: -6%; }
    .t-candisekar .aside .cs-scene--hero .cs-candi { width: 80%; bottom: 18%; }
    .t-candisekar .aside .cs-scene--hero .cs-tree { width: min(24%, 260px); }
    .t-candisekar .aside__inner { padding-bottom: 8rem; }
}
@media (prefers-reduced-motion: reduce) {
    .t-candisekar .cs-scene img, .t-candisekar .tm-house, .t-candisekar .names { animation: none !important; }
    .t-candisekar .reveal .cs-bed, .t-candisekar .reveal .cs-candi, .t-candisekar .reveal .event, .t-candisekar .reveal .pframe { opacity: 1; translate: none; transform: none; transition: none; }
    .t-candisekar .reveal .cs-gold, .t-candisekar .reveal .sec__title::after { clip-path: none; }
    .t-candisekar .reveal .cs-bed { translate: -50% 0; }
}
