/* Kad Aqiqah Yaasir & Raef Taqiyy — editorial ivory & gold print sheet.
   One flat sheet in a double gold frame; serif caps + gold script accents;
   SVG botanicals drape the corners (art inline in index.html). */

:root {
  --ink: #2F2C26;
  --muted: #57534A;
  --secondary: #7C7669;
  --faint: #9C968A;
  --olive: #B08D4F;        /* antique gold */
  --olive-dark: #8F7239;   /* bronze */
  --error: #A4472E;
  --cream: #F7F4EA;
  --desk: #E8E3D7;
  --hairline: rgba(176, 141, 79, 0.22);
  --gold-line: rgba(176, 141, 79, 0.5);
  --gold-line-soft: rgba(176, 141, 79, 0.32);
  --gradient: linear-gradient(165deg, #FAF7F0 0%, #F4F0E5 40%, #F2ECDF 100%);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }

body {
  margin: 0;
  background: var(--desk);
  font-family: 'Cormorant Garamond', serif;
  color: var(--ink);
}
body.terkunci { overflow: hidden; }

a { color: var(--olive-dark); text-decoration: none; }
input, textarea, button { font-family: 'Cormorant Garamond', serif; }

/* ---- Sheet layout ---- */
.desk { min-height: 100dvh; display: flex; justify-content: center; background: var(--desk); }
.column {
  width: 100%;
  max-width: 441px;
  position: relative;
  overflow: hidden;
  background: var(--gradient);
  box-shadow: 0 0 48px rgba(70, 62, 45, 0.2);
}
.column::after, .cover-sheet::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.72 0 0 0 0 0.68 0 0 0 0 0.58 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.sheet-frame {
  position: absolute; inset: 12px;
  border: 1px solid var(--gold-line);
  pointer-events: none; z-index: 1;
}
.sheet-frame::before {
  content: ""; position: absolute; inset: 7px;
  border: 1px solid var(--gold-line-soft);
}
.corner { position: absolute; pointer-events: none; z-index: 3; line-height: 0; opacity: 0.95; }
.corner svg { display: block; width: 100%; height: auto; }
.corner-tl { top: 0; left: 0; width: 62%; max-width: 300px; }
.corner-br { bottom: 0; right: 0; width: 56%; max-width: 280px; }

.stack {
  position: relative; z-index: 2;
  padding: 104px 28px 140px;
  display: flex; flex-direction: column; gap: 56px;
}
.sheet-sec { position: relative; text-align: center; }
.sheet-sec.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s ease, transform 0.9s ease; }
.sheet-sec.reveal.nampak { opacity: 1; transform: none; }

/* ---- Typography primitives ---- */
.kicker { font-size: 11px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink); }
.kicker.gold { color: var(--olive); }
.hero-name {
  font-size: clamp(34px, 10.5vw, 46px);
  font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.14em; padding-left: 0.14em;
  line-height: 1.25; white-space: nowrap;
}
.hero-name.sm { font-size: clamp(28px, 8.5vw, 38px); }
.script { font-family: 'Great Vibes', cursive; }
.and-row { display: flex; align-items: center; justify-content: center; gap: 16px; }
.and-row .rule { width: 64px; height: 1px; background: var(--gold-line); }
.and-row .and { font-size: 36px; color: var(--olive); line-height: 1; }
.sec-head { margin-bottom: 4px; }
.sec-title { font-size: 11px; font-weight: 600; letter-spacing: 0.34em; color: var(--ink); }
.amp-olive { color: var(--olive); }
.divider-sprig { display: block; width: 60px; height: 14px; margin: 0 auto 14px; }
.mono-sprig { display: block; width: 20px; height: 34px; }

/* ---- Date block ---- */
.dateline { display: flex; align-items: center; justify-content: center; }
.dateline .word {
  font-size: 11px; font-weight: 600; letter-spacing: 0.25em; padding: 10px 2px 10px 0.25em;
  border-top: 1px solid var(--gold-line); border-bottom: 1px solid var(--gold-line);
  min-width: 88px; text-align: center;
}
.dateline .num {
  font-size: 58px; font-weight: 300; line-height: 0.9; padding: 0 20px; margin: 0 18px;
  border-left: 1px solid var(--gold-line); border-right: 1px solid var(--gold-line);
}

/* ---- Buttons & fields ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 2px; padding: 14px 26px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.28em; text-transform: uppercase; cursor: pointer; text-align: center;
}
.btn-primary { background: var(--ink); color: var(--cream); border: 1px solid var(--ink); }
.btn-outline { background: transparent; color: var(--olive-dark); border: 1px solid var(--gold-line); }
.btn-outline:hover { border-color: var(--olive-dark); }
.btn.block { width: 100%; }
.btn-sm { padding: 9px 14px; font-size: 10px; letter-spacing: 0.2em; }
.btn-text {
  background: none; border: none; color: var(--olive-dark); font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; cursor: pointer; text-decoration: underline; padding: 8px;
}
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

.field {
  width: 100%; border: 1px solid var(--gold-line-soft); background: transparent;
  border-radius: 2px; padding: 13px 14px; font-size: 15px; color: var(--ink);
}
.field::placeholder { color: var(--faint); font-style: italic; }
.field:focus { outline: none; border-color: var(--olive-dark); box-shadow: inset 0 0 0 1px var(--olive-dark); }
textarea.field { resize: vertical; }

.seg {
  flex: 1; padding: 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.22em;
  cursor: pointer; border: 1px solid var(--gold-line); background: transparent;
  color: var(--olive-dark); border-radius: 2px;
}
.seg.aktif { background: var(--ink); border-color: var(--ink); color: var(--cream); }

.pax-row {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--gold-line-soft); background: transparent;
  border-radius: 2px; padding: 8px 14px;
}
.pax-label { font-size: 15px; }
.pax-ctrl { display: flex; align-items: center; gap: 14px; }
.pax-btn {
  width: 30px; height: 30px; border: 1px solid var(--gold-line); border-radius: 2px;
  background: none; color: var(--olive-dark); font-size: 16px; cursor: pointer;
}
.pax-value { font-size: 17px; font-weight: 600; min-width: 20px; text-align: center; }
.err { font-size: 13px; font-style: italic; color: var(--error); }

/* ---- Pembuka ---- */
.bismillah { font-size: 23px; line-height: 1.7; }
.salam { font-style: italic; font-size: 15px; color: var(--secondary); margin-top: 10px; }
.pembuka .divider-sprig { margin: 24px auto; }
.parents { font-size: 16px; font-weight: 500; line-height: 1.75; }
.parents + .parents { margin-top: 14px; }
.invite { font-size: 15px; color: var(--muted); line-height: 1.9; margin: 24px 0; }
.patronymic { font-style: italic; font-size: 14px; color: var(--secondary); margin: 2px 0 10px; }

/* ---- Countdown ---- */
.cd-grid { display: flex; justify-content: center; margin-top: 20px; }
.cd-cell { padding: 0 14px; min-width: 70px; }
.cd-cell + .cd-cell { border-left: 1px solid var(--gold-line); }
.cd-num { font-size: 38px; font-weight: 300; line-height: 1; }
.cd-label { font-size: 9px; font-weight: 600; letter-spacing: 0.22em; color: var(--olive); margin-top: 7px; }
.cd-mesej { font-style: italic; font-size: 16px; color: var(--muted); margin-top: 20px; line-height: 1.8; }

/* ---- Butiran ---- */
.detail { margin-top: 22px; }
.detail-label { font-size: 10px; font-weight: 600; letter-spacing: 0.3em; color: var(--olive); }
.detail-value { font-size: 20px; font-weight: 500; margin-top: 5px; }
.detail-note { font-style: italic; font-size: 13px; color: var(--secondary); margin-top: 2px; }
.detail-sub { font-size: 14px; color: var(--muted); line-height: 1.6; margin-top: 2px; }
.butiran .btn-row { margin-top: 18px; }
.butiran .btn-row + .btn-row { margin-top: 10px; }

/* ---- Aturcara ---- */
.agenda { margin-top: 20px; }
.agenda-time { font-size: 11px; font-weight: 600; letter-spacing: 0.25em; color: var(--olive-dark); }
.agenda-item { font-size: 17px; margin-top: 3px; }
.agenda-note { font-style: italic; color: var(--secondary); }

/* ---- Doa ---- */
.doa { font-style: italic; font-size: 16px; color: var(--muted); line-height: 2.1; max-width: 300px; margin: 14px auto 0; }

/* ---- Hubungi ---- */
.contact { margin-top: 24px; }
.contact-name { font-size: 18px; font-weight: 600; }
.contact-role { font-size: 10px; letter-spacing: 0.18em; color: var(--faint); margin-top: 2px; }
.contact-btns { justify-content: center; margin-top: 12px; }
.contact-btns .btn { flex: 0 1 auto; min-width: 110px; }

/* ---- RSVP ---- */
.deadline { font-style: italic; font-size: 14px; color: var(--secondary); margin: 12px 0 18px; }
.form-col { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.rsvp-done { text-align: center; }
.thanks { font-size: 34px; }
.rsvp-summary { font-size: 15px; color: var(--muted); margin-top: 6px; }
.rsvp-nota { font-style: italic; font-size: 13px; color: var(--secondary); margin-top: 18px; }
#rsvpPeringatan .btn-row { margin-top: 10px; }
#btnKemasKini { margin-top: 14px; }

/* ---- Ucapan ---- */
.wish-list { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.wish { border-top: 1px solid var(--hairline); padding: 18px 6px 2px; text-align: center; }
.wish-msg { font-style: italic; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.wish-name { margin-top: 8px; font-size: 10px; font-weight: 600; letter-spacing: 0.2em; color: var(--olive); }

/* ---- Penutup ---- */
.monogram { display: inline-flex; align-items: center; gap: 2px; }
.mono-a, .mono-b { font-size: 44px; font-weight: 500; color: var(--olive-dark); line-height: 1; }
.mono-a { transform: translate(-4px, -10px); }
.mono-b { transform: translate(4px, 10px); }
.closing-names { font-size: 36px; color: var(--ink); margin-top: 14px; }
.closing-note { font-style: italic; font-size: 14px; color: var(--secondary); margin-top: 10px; }
#btnKongsi { margin-top: 22px; }
.hashtag { margin-top: 18px; font-size: 10px; font-weight: 600; letter-spacing: 0.3em; color: var(--faint); }

/* ---- Kulit (cover) ---- */
.cover { position: fixed; inset: 0; z-index: 60; background: var(--desk); display: flex; justify-content: center; }
.cover.tutup { display: none; }
.cover-sheet {
  position: relative; width: 100%; max-width: 441px; height: 100%;
  background: var(--gradient); overflow: hidden;
}
.arch {
  position: absolute; left: 50%; top: 28px; transform: translateX(-50%);
  width: min(300px, 78%); aspect-ratio: 5 / 7;
  border: 1px solid rgba(176, 141, 79, 0.55);
  border-bottom: none;
  border-radius: 50% 50% 0 0 / 38% 38% 0 0;
  pointer-events: none; z-index: 1;
}
.arch::before {
  content: ""; position: absolute; inset: 9px 9px 0;
  border: 1px solid rgba(176, 141, 79, 0.22);
  border-bottom: none;
  border-radius: 50% 50% 0 0 / 38% 38% 0 0;
}
.cover-body {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 13px; padding: 48px 30px; text-align: center; overflow-y: auto;
}
.cover-body .divider-sprig { margin: 2px auto; }
.venue-name { font-size: 15px; font-weight: 600; letter-spacing: 0.2em; }
.venue-addr { font-size: 13px; color: var(--muted); letter-spacing: 0.06em; line-height: 1.9; }
#btnBuka { margin-top: 8px; }

/* ---- Music toggle ---- */
.music-btn {
  position: fixed; bottom: 18px; right: 18px; z-index: 50;
  width: 40px; height: 40px; border-radius: 2px;
  border: 1px solid var(--gold-line); background: #FAF7F0;
  color: var(--olive-dark); font-size: 16px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(70, 62, 45, 0.18);
}

/* ---- Petals ---- */
.petal-layer { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 70; }
.petal { position: absolute; top: -24px; border-radius: 0 100% 0 100%; opacity: 0; }
@keyframes jatuhPetal {
  0% { transform: translateY(-4vh) translateX(0) rotate(10deg); opacity: 0; }
  8% { opacity: 0.4; }
  88% { opacity: 0.35; }
  100% { transform: translateY(106vh) translateX(36px) rotate(330deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .petal-layer { display: none; }
  .sheet-sec.reveal { opacity: 1; transform: none; transition: none; }
}
