/* Tema "Linen": kartu undangan kertas yang tenang. Arah desain dan alasan tiap keputusan ada di DESIGN.md.
   Dimuat setelah invitation.css hanya bila tema = linen. Krem gandum, pasir, cokelat susu, satu aksen terakota pudar.
   Motif: tepi kertas sobek dan jahitan putus-putus. Bayangan hanya untuk lembar yang memang bertumpuk. */
.theme-linen {
  --bg: #f5f0e7; --bg2: #e8ddcd; --ink: #46382e; --muted: #6f5a4a;
  --primary: #6f5a4a; --deep: #46382e; --on-primary: #fdfaf5; --accent: #96604c; --card: #fdfaf5;
  --line: rgba(111, 90, 74, .24);
  --kertas: #f5f0e7; --pasir: #e8ddcd; --putih: #fdfaf5; --susu: #6f5a4a; --pudar: #b9806a;
  --serif: "Gilda Display", "Lora", Georgia, serif;
  --r: 10px; /* sudut lembut untuk yang bisa diklik; lembar kertas tetap siku */
  /* Serat kain linen: dua arah garis sangat tipis */
  --serat: repeating-linear-gradient(0deg, rgba(111, 90, 74, .04) 0 1px, transparent 1px 4px), repeating-linear-gradient(90deg, rgba(111, 90, 74, .035) 0 1px, transparent 1px 3px);
  /* Tepi sobek: bagian pekat di bawah, sobekan di atas */
  --sobek: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='14' preserveAspectRatio='none'%3E%3Cpath d='M0 14V8L9 6L17 9L28 5L35 7L47 4L56 8L63 7L74 10L86 6L95 8L104 3L117 6L125 5L136 9L148 7L156 10L169 5L178 7L188 4L197 8L209 6L218 9L229 7L238 3L251 6L260 5L272 9L281 6L293 8L302 4L314 7L325 6L334 10L346 7L353 9L360 8V14Z'/%3E%3C/svg%3E");
}
.theme-linen .page { box-shadow: 0 0 30px rgba(70, 56, 46, .08); }

/* ---------- Tipografi: Gilda Display hanya punya satu ketebalan ---------- */
.theme-linen h1, .theme-linen h2, .theme-linen h3, .theme-linen .cname, .theme-linen .names, .theme-linen .hero-names,
.theme-linen .h, .theme-linen .salam, .theme-linen .to-name, .theme-linen .wishes h3 {
  font-family: var(--serif); font-style: normal; font-weight: 400;
}
.theme-linen .eyebrow { text-transform: none; letter-spacing: .02em; font-size: .98rem; color: var(--muted); }

/* ---------- Gerak: gerbang, muncul saat digulir, dan serpih kertas di latar (ambient.css) ---------- */
.theme-linen .sky, .theme-linen .hero-pat { display: none; }
.theme-linen .btn-open { animation: fadeUp 1s ease 1.2s both; }
.theme-linen .countdown [data-cd="s"], .theme-linen .sound-btn.on::after, .theme-linen .scroll-hint span { animation: none; }
.js .theme-linen [data-reveal] { transform: translateY(14px); transition-duration: 1.3s; }
.js .theme-linen [data-reveal="fade"] { transform: none; }
.js .theme-linen [data-reveal].in { transform: none; }

/* Pembatas: jahitan tangan dengan satu simpul silang */
.theme-linen .ln-divider { position: relative; width: 150px; height: 18px; margin: 0 auto 26px; }
.theme-linen .ln-divider::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; flex: none; height: 2px; background: repeating-linear-gradient(90deg, var(--pudar) 0 9px, transparent 9px 15px); -webkit-mask: linear-gradient(90deg, #000 0 58px, transparent 58px 92px, #000 92px); mask: linear-gradient(90deg, #000 0 58px, transparent 58px 92px, #000 92px); transform: none; }
.theme-linen .ln-divider::after { content: ""; position: absolute; left: 66px; top: 0; flex: none; width: 18px; height: 18px; transform: none;
  background: linear-gradient(45deg, transparent 44%, var(--accent) 44% 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, var(--accent) 44% 56%, transparent 56%); }

/* ---------- Gerbang: selembar kertas yang diangkat ---------- */
.theme-linen .gate { color: var(--ink); background: var(--serat), var(--pasir); overflow: clip; }
.js .theme-linen .gate { background: transparent; }
.ln-sheet { position: absolute; inset: 0; z-index: 1; background: var(--serat), var(--pasir); }
.ln-paper { position: absolute; left: 0; right: 0; top: 42px; bottom: 42px; background: var(--serat), var(--kertas); filter: none; }
.ln-paper::before, .ln-paper::after, .theme-linen .ln-torn::after {
  content: ""; position: absolute; left: 0; right: 0; height: 14px; background: var(--kertas); -webkit-mask: var(--sobek) 0 0 / 360px 14px repeat-x; mask: var(--sobek) 0 0 / 360px 14px repeat-x;
}
.ln-paper::before { bottom: calc(100% - 1px); }
.ln-paper::after { top: calc(100% - 1px); transform: scaleY(-1); }
/* Tepi bawah lembar penutup: terlihat saat lembar terangkat */
.ln-sheet::after { content: ""; position: absolute; left: 0; right: 0; top: calc(100% - 1px); height: 14px; background: var(--pasir); -webkit-mask: var(--sobek) 0 0 / 360px 14px repeat-x; mask: var(--sobek) 0 0 / 360px 14px repeat-x; transform: scaleY(-1); }
.js .ln-sheet { transition: transform 1.55s cubic-bezier(.65, 0, .25, 1) .3s; }
.js body.theme-linen.is-opening .ln-sheet { transform: translateY(calc(-100% - 24px)); }

.theme-linen .gate-content { width: min(100%, 400px); padding: 62px 30px; }
.js .theme-linen .gate-content { max-height: calc(100% - 92px); padding-top: 14px; padding-bottom: 14px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; transition: transform 1.55s cubic-bezier(.65, 0, .25, 1) .3s, opacity .7s ease .3s; }
.js .theme-linen .gate-content::-webkit-scrollbar { display: none; }
.js body.theme-linen.is-opening .gate-content { transform: translateY(-100vh); opacity: 0; }
.theme-linen .gate .eyebrow { margin-bottom: 8px; }
.theme-linen .gate .names { font-size: clamp(2.7rem, 13vw, 3.5rem); line-height: 1.12; margin-bottom: 14px; color: var(--ink); }
.theme-linen .names i { font: 400 .55em var(--serif); color: var(--accent); line-height: 1.35; }
.theme-linen .cover-date { color: var(--muted); letter-spacing: .02em; margin-bottom: 22px; }
.theme-linen .to { border-top: 2px dashed var(--pudar); border-bottom: 2px dashed var(--pudar); max-width: 290px; padding: 14px 4px; margin-bottom: 22px; }
.theme-linen .to-note, .theme-linen .sound-note { color: var(--muted); }
.theme-linen .sound-note { margin-top: 14px; }
.theme-linen .btn-open { background: var(--accent); color: #fff; border-radius: var(--r); font-weight: 500; letter-spacing: .01em; padding: 13px 38px; transition: background .25s; }
.theme-linen .btn-open:hover { background: #83513f; box-shadow: none; transform: none; }
.theme-linen .btn-open:focus-visible { outline: 3px solid var(--deep); outline-offset: 3px; box-shadow: none; }

/* ---------- Hero: lembar kertas berbingkai jahitan ---------- */
.theme-linen .hero { background: var(--serat), var(--kertas); color: var(--ink); }
.theme-linen .hero::before { content: ""; position: absolute; inset: 16px 16px 34px; border: 2px dashed rgba(185, 128, 106, .65); pointer-events: none; }
.theme-linen .hero-in { padding: 70px 32px 128px; }
.theme-linen .hero .bismillah { color: var(--muted); font-size: 1.55rem; margin-bottom: 34px; }
.theme-linen .hero-names { font-size: clamp(3.1rem, 15vw, 4.3rem); line-height: 1.12; color: var(--ink); margin: 6px 0 28px; overflow-wrap: anywhere; }
.theme-linen .hero-names i { font: 400 .5em var(--serif); color: var(--accent); line-height: 1.5; }
.theme-linen .hero-date { display: inline-block; margin: 0; padding: 10px 4px; border-top: 1px solid var(--pudar); border-bottom: 1px solid var(--pudar); color: var(--muted); opacity: 1; letter-spacing: .03em; }
.theme-linen .scroll-hint { bottom: 64px; margin-left: -1px; width: 2px; height: 34px; border: 0; border-radius: 0; background: repeating-linear-gradient(180deg, var(--accent) 0 7px, transparent 7px 12px); }
.theme-linen .scroll-hint::after { content: ""; position: absolute; inset: -6px -22px; }
.theme-linen .scroll-hint span { display: none; }

/* ---------- Bagian umum: lembar bergantian, disambung tepi sobek ---------- */
.theme-linen .sec { padding: 66px 28px; background: var(--serat), var(--kertas); }
.theme-linen .sec.alt, .theme-linen .closing { background: var(--serat), var(--pasir); }
/* Sobekan lembar terang yang menimpa awal lembar pasir */
.theme-linen .sec.alt::before, .theme-linen .closing::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 14px; background: var(--kertas); -webkit-mask: var(--sobek) 0 0 / 360px 14px repeat-x; mask: var(--sobek) 0 0 / 360px 14px repeat-x; transform: scaleY(-1);
}
.theme-linen .sec.alt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 14px; background: var(--kertas); -webkit-mask: var(--sobek) 0 0 / 360px 14px repeat-x; mask: var(--sobek) 0 0 / 360px 14px repeat-x; }
.theme-linen .h { color: var(--ink); font-size: 2rem; }
.theme-linen .salam { color: var(--ink); font-size: 1.3rem; line-height: 1.55; }
.theme-linen .intro { color: var(--muted); }

/* Mempelai: dua cetakan foto yang ditempel dengan selotip kertas */
.theme-linen .couple { gap: 18px; margin-bottom: 44px; }
.theme-linen .couple article { width: 100%; }
.theme-linen .amp { font: 400 2.2rem var(--serif); color: var(--accent); }
.theme-linen .avatar { width: 188px; margin: 0 auto 22px; padding: 10px 10px 18px; background: var(--putih); box-shadow: 0 6px 16px rgba(70, 56, 46, .14); rotate: -2.5deg; }
.theme-linen .couple article:nth-of-type(2) .avatar { rotate: 2.5deg; }
.theme-linen .avatar::before { display: block; content: ""; position: absolute; inset: auto; left: 50%; top: -11px; width: 78px; height: 24px; margin-left: -39px; border: 0; border-radius: 0; background: rgba(185, 128, 106, .42); rotate: -3deg; animation: none; z-index: 1; }
.theme-linen .avatar .avatar-frame { width: 100%; height: auto; aspect-ratio: 5 / 6; border: 0; border-radius: 0; box-shadow: none; background: var(--pasir); }
.theme-linen .avatar .avatar-frame img { animation: none; }
.theme-linen .cname { color: var(--ink); font-size: 1.5rem; line-height: 1.35; overflow-wrap: anywhere; }
.theme-linen .parents { color: var(--muted); }

/* Ayat: dibingkai jahitan, tanpa kotak */
.theme-linen .quote { background: none; border: 0; border-top: 2px dashed var(--pudar); border-bottom: 2px dashed var(--pudar); border-radius: 0; padding: 26px 0; }
.theme-linen .quote::before { content: none; }
.theme-linen .quote .arab { color: var(--ink); }
.theme-linen .quote .terjemah { font-style: normal; }

/* Hitung mundur: angka tenang dipisah garis tipis */
.theme-linen .countdown { gap: 0; margin-bottom: 38px; }
.theme-linen .countdown div { background: none; color: var(--ink); border: 0; border-left: 1px solid var(--line); border-radius: 0; padding: 4px; }
.theme-linen .countdown div:first-child { border-left: 0; }
.theme-linen .countdown b { font: 400 2.1rem/1.2 var(--serif); font-variant-numeric: tabular-nums; }
.theme-linen .countdown span { text-transform: none; letter-spacing: .02em; font-size: .8rem; color: var(--muted); opacity: 1; }

/* Acara: kartu kertas dengan tanggal besar di atas */
.theme-linen .event.ev-split { padding: 30px 22px 26px; margin-bottom: 22px; background: var(--putih); border: 0; border-radius: 0; box-shadow: 0 6px 18px rgba(70, 56, 46, .09); }
.theme-linen .event::before { inset: 8px; border: 1px dashed var(--pudar); border-radius: 0; opacity: .7; }
.theme-linen .ev-badge { display: flex; flex-direction: column; align-items: center; margin-bottom: 14px; color: var(--accent); }
.theme-linen .ev-badge b { font: 400 3.6rem/1 var(--serif); }
.theme-linen .ev-badge span { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.theme-linen .event h3 { color: var(--ink); font-size: 1.5rem; }

/* Adab: daftar polos bertanda jahitan pendek */
.theme-linen .notes { gap: 0; }
.theme-linen .notes li { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 15px 0 15px 30px; }
.theme-linen .notes li:last-child { border-bottom: 0; }
.theme-linen .notes li::before { content: ""; left: 0; top: 27px; width: 17px; height: 2px; background: repeating-linear-gradient(90deg, var(--accent) 0 7px, transparent 7px 10px); animation: none; }

/* Tanda kasih */
.theme-linen .acc { background: var(--putih); border: 0; border-radius: 0; box-shadow: 0 6px 18px rgba(70, 56, 46, .08); padding: 22px 18px; overflow-wrap: anywhere; }
.theme-linen .acc .num { font: 400 1.6rem var(--serif); letter-spacing: .04em; color: var(--ink); }

/* Tombol dan formulir */
.theme-linen .btn, .theme-linen .btn.small { border-radius: var(--r); min-height: 44px; display: inline-flex; align-items: center; justify-content: center; font-weight: 500; }
.theme-linen .btn:hover { transform: none; box-shadow: none; }
.theme-linen .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; box-shadow: none; }
.theme-linen .rsvp-form input:not([type="radio"]), .theme-linen .rsvp-form select, .theme-linen .rsvp-form textarea { border: 1px solid #846e5c; border-radius: var(--r); background: var(--putih); }
.theme-linen .rsvp-form input:focus, .theme-linen .rsvp-form select:focus, .theme-linen .rsvp-form textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; box-shadow: none; }
.theme-linen .rsvp-form ::placeholder { color: var(--muted); opacity: 1; }
.theme-linen .radios label { border: 1px solid #846e5c; border-radius: var(--r); background: var(--putih); min-height: 44px; }
.theme-linen .radios label:has(input:checked) { border-color: var(--accent); background: #f3e3da; }
.theme-linen .radios input { accent-color: var(--accent); }
.theme-linen .rsvp-form .btn { background: var(--accent); border-color: var(--accent); color: #fff; padding: 13px; }
.theme-linen .wishes h3 { color: var(--ink); }
.theme-linen .wishes li { border: 0; border-radius: 0; background: var(--putih); }

/* Penutup */
.theme-linen .closing { padding: 74px 28px 124px; }
.theme-linen .closing .intro, .theme-linen .closing .salam, .theme-linen .closing .credit { color: var(--muted); }
.theme-linen .closing .salam { font-size: 1.1rem; }
.theme-linen .closing .doa { color: var(--ink); }
.theme-linen .closing .names.small { color: var(--ink); font-size: 2.2rem; line-height: 1.3; }

/* Navigasi bawah dan tombol melayang */
.theme-linen .dock { background: var(--putih); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 22px rgba(70, 56, 46, .16); -webkit-backdrop-filter: none; backdrop-filter: none; }
.theme-linen .dock a { color: var(--muted); border-radius: var(--r); }
.theme-linen .dock a.on { background: var(--pasir); color: var(--ink); }
.theme-linen .dock a:focus-visible { outline-color: var(--accent); }
.js .theme-linen .sound-btn, .js .theme-linen .motion-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--putih); border: 1px solid var(--line); color: var(--primary); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.theme-linen .sound-btn.on::after { display: none; }

@media (min-width: 560px) { .theme-linen .page { border-radius: 6px; } }
