/* Undangan Digital · aqiqah template: structure and neutral components.
   Every colour, face and size comes from variables a theme sets (css/theme.css). */
:root {
  --bg: #fbf8f1; --bg2: #efe9dc; --ink: #2f3a33; --muted: #66706a; --accent: #a87a2c; --accent2: #e6eee4;
  --line: rgb(47 58 51 / .16);
  --card: #fff; --card-line: rgb(47 58 51 / .12); --card-shadow: 0 10px 26px rgb(47 58 51 / .08); --radius: 16px;
  --btn-bg: var(--accent); --btn-ink: #fff; --btn-line: transparent; --btn-shadow: 0 8px 18px rgb(0 0 0 / .14); --btn-radius: 999px;
  --f-display: "Lora", Georgia, serif; --f-script: var(--f-display); --f-body: "Lora", "Amiri", Georgia, serif; --f-head: var(--f-display); --f-num: var(--f-display);
  --name-font: var(--f-display); --name-size: 3rem; --name-weight: 700; --name-color: var(--accent); --name-style: normal; --name-case: none; --name-track: 0; --name-shadow: none;
  --head-font: var(--f-head); --head-size: 1.6rem; --head-weight: 600; --head-color: var(--ink); --head-style: normal; --head-case: none; --head-track: 0;
  --head-bg: none; --head-ink: var(--head-color); --head-pad: 0; --head-radius: 0; --head-shadow: none;
  --kicker-font: var(--f-display); --kicker-color: var(--accent); --bism-color: var(--accent);
  --photo-radius: 20px; --cover-ar: 1 / 1; --photo-border: 0; --photo-shadow: 0 16px 36px rgb(0 0 0 / .16);
  --gate-bg: var(--bg); --gate-ink: var(--ink); --guest-bg: rgb(255 255 255 / .72); --guest-line: var(--line);
  --cd-num: var(--ink); --cd-label: var(--muted); --cd-title: var(--accent); --cd-tile: var(--card); --cd-tile-line: var(--card-line); --cd-tile-radius: 12px; --cd-tile-shadow: var(--card-shadow);
  --sec-pad: 56px 22px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; }
body.is-locked { overflow: hidden; }
h1, h2, h3, p, figure, ul, ol, dl, dd, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: lining-nums tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ic { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Cover (what the guest sees first) ---------- */
#gate { position: fixed; inset: 0; z-index: 50; overflow-y: auto; overflow-x: hidden; display: flex; background: var(--gate-bg); color: var(--gate-ink);
  text-align: center; transition: opacity .8s ease, visibility .8s; }
#gate.is-open { opacity: 0; visibility: hidden; }
.gate__in > *:not(.deco), .side__in > *:not(.deco) { position: relative; z-index: 2; }
.gate__in > .deco, .side__in > .deco { z-index: 3; }
.gate__in { position: relative; z-index: 2; width: 100%; max-width: 440px; margin: auto; padding: 28px 22px 36px; }
.photo { overflow: hidden; border-radius: var(--photo-radius); border: var(--photo-border); box-shadow: var(--photo-shadow); background: var(--bg2); position: relative; }
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: var(--photo-pos, 50% 40%); }
/* The photo sits in a wrapper sized by --pw; stickers anchored to it are placed in mockup pixels times --k. */
.phw { position: relative; isolation: isolate; width: var(--pw); margin: 0 auto 16px; --k: calc(var(--pw) / var(--cw, 400)); }
.phw .photo { width: 100%; aspect-ratio: calc(var(--cw, 4) / var(--ch, 4)); }
.phd { position: absolute; inset: 0; pointer-events: none; }
.phd i { position: absolute; display: block; z-index: 2; background: center / contain no-repeat; }
.phw::before { content: none; position: absolute; z-index: 1; pointer-events: none; }
.phw--cover { --pw: min(64vw, 260px); }
.phw--hero { --pw: min(76vw, 310px); margin-bottom: 20px; }
.phw--side { --pw: min(24vw, 300px); margin-bottom: 20px; }
.phw--prof { --pw: min(56vw, 220px); margin: 0 auto; }
.phw--prof .photo { aspect-ratio: 5 / 4; }
.gate__date { font-weight: 600; font-size: .92rem; margin-top: 12px; }
.guest { margin: 16px auto 0; max-width: 320px; padding: 12px 18px; border: 1px solid var(--guest-line); border-radius: 16px; background: var(--guest-bg); display: grid; gap: 1px; }
.guest__l { font-size: .78rem; opacity: .8; }
.guest__n { font-size: 1.1rem; font-weight: 700; line-height: 1.3; }
.guest__s { font-size: .68rem; opacity: .7; line-height: 1.4; margin-top: 4px; }

/* ---------- Title block (cover, hero, desktop side) ---------- */
.ttl { display: grid; justify-items: center; gap: 4px; }
.ttl > p > span { display: inline-block; }
.ttl b { font-weight: inherit; }
.ttl__bism { font: 400 1.75rem/1.7 "Amiri", "Traditional Arabic", serif; color: var(--bism-color); margin-bottom: 2px; }
.ttl__kicker { font: 600 1.35rem/1.25 var(--kicker-font); color: var(--kicker-color); letter-spacing: var(--kicker-track, 0); text-transform: var(--kicker-case, none); }
.ttl__salam { font: italic 500 .98rem/1.5 var(--f-body); margin-top: 6px; }
.ttl__pre, .ttl__theme { font: 600 1rem/1.3 var(--f-display); color: var(--accent); }
.ttl__name { font-family: var(--name-font); font-size: var(--name-size); font-weight: var(--name-weight); font-style: var(--name-style); line-height: 1.08; color: var(--name-color);
  text-transform: var(--name-case); letter-spacing: var(--name-track); text-shadow: var(--name-shadow); text-wrap: balance; overflow-wrap: anywhere; margin: 6px 0 2px; max-width: 100%; }
.ttl__name span { display: inline-block; }
.ttl__full span { font: 600 1rem/1.25 var(--f-body); color: var(--full-ink, var(--ink)); background: var(--full-bg, var(--bg2)); padding: 7px 20px; border-radius: 999px; }
.ttl__sub span { font: 600 .92rem/1.25 var(--f-body); color: var(--sub-ink, #fff); background: var(--sub-bg, var(--accent)); padding: 6px 20px; border-radius: 6px; }
.ttl__tag span { font: 600 .9rem/1.3 var(--f-body); }
.ttl__prayer { font: italic 400 .95rem/1.6 var(--f-body); max-width: 340px; margin-top: 8px; color: var(--muted); }
.ttl__date { font-weight: 600; }
.ttl .lead { margin-top: 6px; }
.orn { display: block; color: var(--accent); line-height: 0; }
.orn svg, .orn img { display: block; width: var(--orn-w, 150px); height: auto; margin: 10px auto; }
.orn--top svg, .orn--top img { width: var(--orn-top-w, 110px); margin: 0 auto 12px; }
.orn--head-top svg, .orn--head-top img { width: var(--orn-head-w, 44px); margin: 0 auto 6px; }

/* Parents ("Putra dari ...") */
.par { display: grid; justify-items: center; gap: 2px; margin-top: 12px; }
.par__l { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; color: var(--par-label, var(--muted)); }
.par__ic { width: 26px; height: 26px; color: var(--accent); }
.par__n { font: var(--par-weight, 700) 1.12rem/1.35 var(--par-font, var(--f-body)); color: var(--par-ink, var(--ink)); }
.par__b { display: block; }

/* ---------- Buttons and links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 24px; border-radius: var(--btn-radius); border: var(--btn-border, 1px solid var(--btn-line));
  background: var(--btn-bg); color: var(--btn-ink); font: 600 .95rem/1.2 var(--btn-font, var(--f-body)); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  box-shadow: var(--btn-shadow); transition: transform .2s ease, filter .2s ease; text-align: center; }
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn .ic { width: 19px; height: 19px; }
.btn .ic--end { margin-left: -2px; }
.btn--open { margin-top: 20px; }
.btn--block { width: 100%; }
.btn--sm { padding: 7px 14px; font-size: .8rem; gap: 6px; box-shadow: none; }
.btn--sm .ic { width: 14px; height: 14px; }
.link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; color: var(--accent); text-decoration: none; background: none; border: 0; cursor: pointer; padding: 0; }
.link .ic { width: 17px; height: 17px; }

/* ---------- Page: phone column; from 1024 px the cover stays on the left ---------- */
.page { min-height: 100vh; }
#side { display: none; }
.inv { max-width: 560px; margin: 0 auto; background: var(--bg); overflow: hidden; outline: none; }
@media (min-width: 1024px) {
  .page { display: grid; grid-template-columns: minmax(0, 1fr) 480px; }
  #side { display: flex; position: sticky; top: 0; height: 100vh; overflow: hidden; align-items: center; justify-content: center;
    background: var(--gate-bg); color: var(--gate-ink); text-align: center; }
  .side__in { position: relative; z-index: 2; width: 100%; max-width: 520px; padding: 36px 32px; }
  .side__in .ttl__name { font-size: calc(var(--name-size) * 1.1); }
  .side__date { font-weight: 600; font-size: .95rem; margin-top: 10px; }
  .side__guest { margin-top: 14px; font-size: .92rem; opacity: .85; }
  .inv { max-width: none; box-shadow: 0 0 60px rgb(0 0 0 / .14); }
}

/* ---------- Sections ---------- */
.sec { position: relative; padding: var(--sec-pad); text-align: center; overflow: hidden; background: var(--sec-bg, transparent); }
.sec__in { position: relative; z-index: 2; max-width: 440px; margin: 0 auto; opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.sec__in.in { opacity: 1; transform: none; }
.deco { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.deco .o { position: absolute; display: block; background-repeat: no-repeat; background-size: contain; background-position: center; }
.h-sec { margin-bottom: 22px; display: grid; justify-items: center; }
.h-sec__t { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--head-font); font-style: var(--head-style); font-weight: var(--head-weight);
  font-size: var(--head-size); line-height: 1.2; color: var(--head-ink); text-transform: var(--head-case); letter-spacing: var(--head-track);
  background: var(--head-bg); padding: var(--head-pad); border-radius: var(--head-radius); box-shadow: var(--head-shadow); }
.h-sec__ic { width: .95em; height: .95em; }
.h-sec__sub { font-size: .95rem; color: var(--muted); margin-top: 8px; max-width: 340px; }
.lead { font-size: .98rem; color: var(--muted); max-width: 350px; margin: 12px auto 0; }
.lead.salam, .closing__p.salam { font-style: italic; }
.hint { font-size: .78rem; color: var(--muted); margin-top: 12px; }
.card { background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 20px 18px; box-shadow: var(--card-shadow); position: relative; }

/* Hero */
.sec--hero { padding-top: 34px; }

/* Countdown */
.cd__head { margin-bottom: 14px; }
.cd__t { display: flex; align-items: center; justify-content: center; gap: 8px; font: 600 1.25rem/1.3 var(--f-head); color: var(--cd-title); }
.cd__sub { font-size: .9rem; color: var(--muted); margin-top: 2px; }
.cd__ic { width: 1.1em; height: 1.1em; }
.cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 360px; margin: 0 auto; }
.cd__c { display: grid; gap: 0; padding: 10px 0 8px; background: var(--cd-tile); border: var(--cd-tile-border, 1px solid var(--cd-tile-line)); border-radius: var(--cd-tile-radius); box-shadow: var(--cd-tile-shadow); position: relative; }
.cd__n { font: 600 2rem/1.05 var(--f-num); color: var(--cd-num); }
.cd__l { font-size: .74rem; font-weight: 600; color: var(--cd-label); }
.cd__over { grid-column: 1 / -1; font: 600 1.3rem var(--f-head); color: var(--cd-num); }
.link--cal { margin-top: 18px; }

/* Event details */
.dts { display: grid; gap: 12px; text-align: left; }
.dt { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--card-shadow); }
.dt__ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--dt-ic-bg, var(--bg2)); color: var(--dt-ic, var(--accent)); flex: none; }
.dt__ic .ic { width: 24px; height: 24px; }
.dt__l { font-size: .82rem; font-weight: 600; color: var(--dt-label, var(--muted)); letter-spacing: .01em; }
.dt__v { font-size: 1rem; line-height: 1.4; }
.dt__v strong { font-weight: 700; }
.dt__v small { display: block; font-size: .86rem; color: var(--muted); margin-top: 2px; }
.note { margin: 14px auto 0; font-size: .92rem; padding: 12px 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--card-line); }
.dts__act { display: grid; justify-items: center; gap: 10px; margin-top: 18px; }
.btn--map { background: var(--map-bg, var(--card)); color: var(--map-ink, var(--accent)); border: 1px solid var(--map-line, var(--card-line)); box-shadow: none; padding: 11px 20px; font-size: .9rem; }
.mapslot { width: 100%; display: grid; place-items: center; }
.mapslot iframe { width: 100%; aspect-ratio: 16 / 10; border: 0; border-radius: 14px; }
.btn--cta { margin-top: 22px; }

/* Hosts and prayer */
.par--hosts { margin-top: 0; }
.par--hosts .par__l { font-size: .95rem; }
.prayer { font: italic 400 1.05rem/1.65 var(--f-body); color: var(--ink); max-width: 380px; margin: 0 auto; quotes: "“" "”"; }
.prayer::before { content: open-quote; } .prayer::after { content: close-quote; }

/* Profile ("Tentang Aqiqah", facts about the little one) */
.profs { display: grid; gap: 16px; }
.prof { display: grid; gap: 14px; justify-items: center; background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 22px 18px; box-shadow: var(--card-shadow); }
.prof__h span { display: inline-block; font: 600 1.25rem/1.25 var(--f-head); color: var(--head-color); }
.prof__p { font-size: .95rem; color: var(--muted); margin-top: 6px; }
.prof__name { font: 700 1.3rem/1.3 var(--f-display); color: var(--name-color); margin-top: 4px; }
.prof__sub { font-size: .92rem; color: var(--muted); }
.prof__q { font: italic 400 1rem/1.6 var(--f-body); }
.facts { display: grid; gap: 8px; margin-top: 12px; text-align: left; width: 100%; }
.facts div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .93rem; }
.facts dt { color: var(--muted); }
.facts dd { font-weight: 600; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gallery--1 .gallery__item, .gallery--3 .gallery__item:first-child, .gallery--5 .gallery__item:first-child { grid-column: span 2; aspect-ratio: 16 / 10; }
.gallery__item { padding: 0; background: var(--card); cursor: zoom-in; border-radius: var(--gal-radius, 14px); overflow: hidden; aspect-ratio: var(--gal-ar, 4 / 3);
  box-shadow: var(--gal-shadow, var(--card-shadow)); border: var(--gal-border, 0); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gallery__item:hover img { transform: scale(1.04); }

/* RSVP */
.lead--rsvp { margin: -6px auto 16px; }
.form { text-align: left; margin-top: 8px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 600; font-size: .9rem; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field small { font-size: .78rem; color: var(--muted); }
.field input, .field select, .wcomp input, .wcomp textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--field-line, var(--card-line)); border-radius: 12px; background: var(--field-bg, #fff); color: var(--field-ink, var(--ink)); }
.field input:focus, .field select:focus, .wcomp input:focus, .wcomp textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(0 0 0 / .06); }
.form__err { color: #c0262d; font-size: .85rem; font-weight: 600; min-height: 1em; margin-bottom: 8px; }
.rsvp-done { text-align: center; }
.rsvp-done__ic { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 50%; background: var(--accent); color: var(--btn-ink); }
.rsvp-done__ic .ic { width: 28px; height: 28px; stroke-width: 2.4; }
.rsvp-done__t { font: 600 1.4rem var(--f-head); margin-bottom: 6px; }
.rsvp-done .link { margin-top: 10px; }

/* Wishes */
.wcomp { display: grid; gap: 8px; text-align: left; background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 12px; box-shadow: var(--card-shadow); }
.wcomp__row { display: flex; gap: 8px; align-items: flex-end; }
.wcomp__ic { display: none; }
.wcomp textarea { resize: none; min-height: 66px; line-height: 1.4; }
.btn--send { padding: 12px 16px; flex: none; gap: 6px; }
.btn--send .ic { width: 17px; height: 17px; }
.wcomp .form__err { margin: 0; min-height: 0; }
.wishes__n { font-size: .82rem; font-weight: 600; color: var(--muted); margin: 18px 0 10px; }
.wishes { display: grid; gap: 10px; max-height: 30rem; overflow-y: auto; text-align: left; padding: 2px; }
.wish { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 14px; box-shadow: var(--wish-shadow, none); }
.wish__av { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--av-bg, var(--bg2)); color: var(--av-ink, var(--muted)); font: 700 1.05rem var(--f-display); flex: none; }
.wish__av b { font-weight: inherit; }
.wish__av .ic { display: none; width: 22px; height: 22px; }
.wish__b { min-width: 0; flex: 1; }
.wish__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wish__top strong { font-size: .95rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wish__ago { font-size: .72rem; color: var(--muted); }
.wish__t { font-size: .92rem; margin-top: 4px; }
.tag { flex: none; font-size: .68rem; font-weight: 700; border-radius: 999px; padding: 3px 9px; }
.tag--yes { background: var(--accent); color: var(--btn-ink); }
.tag--no { background: var(--bg2); color: var(--muted); }

/* Gift (off in these demos, on when a customer adds an account) */
.lead--gift { margin: -6px auto 20px; }
.gifts { display: grid; gap: 14px; text-align: left; }
.bank { background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 20px; box-shadow: var(--card-shadow); }
.bank__name { font-size: .78rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.bank__no { font: 600 1.6rem/1.2 var(--f-num); letter-spacing: .04em; margin-top: 6px; }
.bank__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; font-size: .9rem; }
.parcel__t { display: flex; gap: 8px; align-items: center; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.parcel .btn--sm { margin-top: 12px; }

/* Closing */
.closing__t span { display: inline-block; font: var(--head-style) var(--head-weight) calc(var(--head-size) * 1.15)/1.15 var(--head-font); color: var(--head-color); text-transform: var(--head-case); }
.closing__p { font-size: 1rem; max-width: 350px; margin: 8px auto 0; }
.closing__sign { margin-top: 18px; font-size: .95rem; font-weight: 600; }
.made { margin-top: 40px; font-size: .66rem; letter-spacing: .28em; text-transform: uppercase; opacity: .6; }

/* Photo viewer */
.zoom { border: 0; padding: 0; background: transparent; max-width: 92vw; max-height: 92vh; overflow: visible; }
.zoom::backdrop { background: rgb(0 0 0 / .84); }
.zoom img { max-width: 92vw; max-height: 84vh; width: auto; border-radius: 12px; }
.zoom__close { position: absolute; top: -44px; right: 0; background: none; border: 0; color: #fff; font: 700 .85rem var(--f-body); letter-spacing: .1em; text-transform: uppercase; padding: 10px; cursor: pointer; }

/* Drifting stars / petals / bubbles (themes that set theme.fx) */
.fx { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.fx i { position: absolute; top: -40px; display: block; width: 10px; height: 10px; opacity: 0; animation: fx-fall linear infinite; }
.fx--up i { top: auto; bottom: -40px; animation-name: fx-rise; }
@keyframes fx-fall { 0% { transform: translate3d(0, 0, 0) rotate(0) scale(var(--s, 1)); opacity: 0; } 8% { opacity: .9; } 90% { opacity: .8; }
  100% { transform: translate3d(var(--dx, 60px), 105vh, 0) rotate(var(--rot, 360deg)) scale(var(--s, 1)); opacity: 0; } }
@keyframes fx-rise { 0% { transform: translate3d(0, 0, 0) scale(var(--s, 1)); opacity: 0; } 10% { opacity: .8; } 85% { opacity: .6; }
  100% { transform: translate3d(calc(var(--dx, 40px) * .4), -105vh, 0) scale(var(--s, 1)); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #gate, .sec__in, .btn, .gallery__item img { transition: none; }
  .sec__in { opacity: 1; transform: none; }
  .fx { display: none; }
}
