/* =====================================================================
   Digital wedding invitation (pages/rsvp/card-core.js) — CoreLuke's own
   styling in the spirit of the Classic Charcoal card in
   reference/raikanfarisyanie: cream card on a dark shell, gold accents,
   maroon florals, Playfair / Amiri / Lato / Montserrat. Colours come from
   the theme as --iv-* custom properties on .ivc-frame.
   ===================================================================== */
.ivc-frame {
  --iv-display: "Playfair Display", Georgia, serif;
  --iv-arabic: "Amiri", "Times New Roman", serif;
  --iv-text: "Lato", system-ui, sans-serif;
  --iv-label: "Montserrat", system-ui, sans-serif;
  --iv-ease: cubic-bezier(.2, .8, .2, 1);
  position: fixed; top: 0; bottom: 0; left: 50%; width: min(430px, 100%); transform: translateX(-50%);
  overflow: hidden; background: var(--iv-card); color: var(--iv-ink); font-family: var(--iv-text); font-size: 15px; line-height: 1.6;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .2), 0 30px 80px rgba(0, 0, 0, .45); isolation: isolate;
}
.ivc-frame.is-embedded { position: absolute; inset: 0; width: auto; transform: none; box-shadow: none; }
.ivc-frame *, .ivc-frame *::before, .ivc-frame *::after { box-sizing: border-box; }
.ivc-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; overscroll-behavior: contain; }
.ivc-scroll::-webkit-scrollbar { display: none; }
.ivc-frame:not(.is-open) .ivc-scroll { overflow: hidden; }
.ivc-frame iconify-icon { font-size: 1.15em; vertical-align: -.18em; }

/* ── Type ── */
.ivc-label { margin: 0 0 6px; font-family: var(--iv-label); font-size: 10.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--iv-gold); }
.ivc-title { margin: 0 0 18px; font-family: var(--iv-display); font-size: 24px; color: var(--iv-ink); }
.ivc-body { margin: 0; color: var(--iv-muted); }
.ivc-muted { color: var(--iv-muted); }
.ivc-frame .small { font-size: 12px; }

/* ── Hero ── */
.ivc-hero { position: relative; height: max(560px, 92svh); overflow: hidden; }
.ivc-frame.is-embedded .ivc-hero { height: 560px; }
.ivc-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.ivc-layer { will-change: transform; }
.ivc-hero-copy { position: absolute; inset: 0 0 auto; padding: 72px 24px 0; text-align: center; }
.ivc-eyebrow { margin: 0 0 10px; font-family: var(--iv-label); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--iv-gold); }
.ivc-names { margin: 0; font-family: var(--iv-display); font-weight: 500; font-size: 46px; line-height: 1.05; color: var(--iv-ink); }
.ivc-names span { display: block; background: linear-gradient(100deg, var(--iv-ink) 30%, var(--iv-gold) 50%, var(--iv-ink) 70%) 0 0 / 260% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: ivc-shimmer 6s linear infinite; }
.ivc-names em { display: block; font-size: 26px; font-style: italic; color: var(--iv-gold); margin: 4px 0; }
.ivc-date { margin: 14px 0 0; font-family: var(--iv-label); font-size: 13px; letter-spacing: .28em; color: var(--iv-muted); }
.ivc-hint { margin: 26px 0 0; font-size: 12px; color: var(--iv-muted); display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.ivc-hint iconify-icon { font-size: 18px; color: var(--iv-gold); animation: ivc-bob 1.8s ease-in-out infinite; }
.ivc-stage { opacity: 0; transform: translateY(14px); }
.ivc-frame.is-open .ivc-stage { animation: ivc-rise .9s var(--iv-ease) both; animation-delay: calc(.25s + var(--s) * .32s); }

/* ── Sections ── */
.ivc-sec { position: relative; padding: 34px 26px; text-align: center; }
.ivc-sec[data-reveal] { opacity: 0; transform: translateY(22px) scale(.98); transition: opacity .9s var(--iv-ease), transform .9s var(--iv-ease); }
.ivc-sec[data-reveal].is-in { opacity: 1; transform: none; }
.ivc-panel { margin: 10px 18px; padding: 26px 20px; border: 1px solid var(--iv-line); border-radius: 18px; background: var(--iv-soft); }
.ivc-divider { display: block; width: 180px; height: 18px; margin: 6px auto; }
.ivc-greet { padding-top: 10px; }
.ivc-parents { margin: 6px 0 16px; font-family: var(--iv-display); font-size: 20px; line-height: 1.35; color: var(--iv-ink); }
.ivc-parents span { font-size: 15px; color: var(--iv-gold); }
.ivc-couple { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ivc-person h2 { margin: 10px 0 2px; font-family: var(--iv-display); font-size: 30px; font-weight: 500; color: var(--iv-ink); }
.ivc-person p { margin: 0; font-size: 13px; color: var(--iv-muted); }
.ivc-mono { display: inline-flex; align-items: center; justify-content: center; width: 78px; height: 78px; border-radius: 50%; border: 1.5px solid var(--iv-gold); background: var(--iv-card); color: var(--iv-gold); font-family: var(--iv-display); font-size: 34px; box-shadow: 0 0 0 6px var(--iv-soft); }
.ivc-mono.sm { width: 38px; height: 38px; font-size: 17px; box-shadow: none; flex-shrink: 0; }
.ivc-heart { color: var(--iv-accent); font-size: 22px; }
.ivc-info { padding: 10px 0; border-bottom: 1px dashed var(--iv-line); }
.ivc-info:last-of-type { border-bottom: 0; }
.ivc-info b { display: block; font-family: var(--iv-display); font-size: 18px; font-weight: 500; color: var(--iv-ink); }
.ivc-info small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--iv-muted); }
.ivc-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }

/* ── Buttons ── */
.ivc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 18px; border: 1px solid var(--iv-gold); border-radius: 999px; background: var(--iv-gold); color: #fff; font-family: var(--iv-label); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: transform .15s var(--iv-ease), background-color .2s, color .2s, box-shadow .2s; }
.ivc-btn:hover { box-shadow: 0 6px 16px -6px var(--iv-gold); }
.ivc-btn:active { transform: scale(.97); }
.ivc-btn.is-ghost { background: transparent; color: var(--iv-gold); }
.ivc-btn.w-full { width: 100%; margin-top: 14px; }
.ivc-btn:disabled { opacity: .6; cursor: default; }
.ivc-btn:focus-visible, .ivc-nav button:focus-visible, .ivc-icon:focus-visible { outline: 2px solid var(--iv-gold); outline-offset: 2px; }

/* ── Aturcara ── */
.ivc-timeline { position: relative; list-style: none; margin: 0 auto; padding: 0; max-width: 300px; text-align: left; }
.ivc-timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--iv-line); }
.ivc-timeline::after { content: ""; position: absolute; left: 11px; top: 6px; width: 2px; height: 0; background: var(--iv-gold); transition: height 1.2s var(--iv-ease) .2s; }
.is-in > .ivc-timeline::after { height: calc(100% - 12px); }
.ivc-timeline li { position: relative; padding: 0 0 18px 40px; }
.ivc-timeline li b { display: block; font-family: var(--iv-label); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--iv-gold); }
.ivc-timeline li span { font-family: var(--iv-display); font-size: 17px; color: var(--iv-ink); }
.ivc-dot { position: absolute; left: 4px; top: 3px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--iv-gold); background: var(--iv-card); }

/* ── Countdown ── */
.ivc-count { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ivc-count div { padding: 12px 4px; border-radius: 14px; background: var(--iv-card); border: 1px solid var(--iv-line); }
.ivc-count b { display: block; font-family: var(--iv-display); font-size: 28px; font-weight: 500; color: var(--iv-ink); font-variant-numeric: tabular-nums; }
.ivc-count span { font-family: var(--iv-label); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--iv-muted); }

/* ── Doa, guestbook, footer ── */
.ivc-doa .ivc-body { font-family: var(--iv-display); font-size: 16px; line-height: 1.7; }
.ivc-amin { margin: 10px 0 0; font-family: var(--iv-label); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--iv-gold); }
.ivc-wishes { display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow-y: auto; text-align: left; scrollbar-width: thin; }
.ivc-wishes blockquote { margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--iv-soft); border: 1px solid var(--iv-line); }
.ivc-wishes p { margin: 0; font-size: 14px; }
.ivc-wishes cite { display: block; margin-top: 6px; font-style: normal; font-size: 12px; color: var(--iv-gold); }
.ivc-empty { color: var(--iv-muted); font-size: 13px; }
.ivc-foot { padding: 30px 24px 120px; text-align: center; font-size: 12px; color: var(--iv-muted); }
.ivc-tag { margin: 0 0 6px; font-family: var(--iv-display); font-size: 22px; color: var(--iv-gold); }

/* ── Bottom nav ── */
.ivc-nav { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 5; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px; border-radius: 20px; border: 1px solid var(--iv-line);
  background: color-mix(in srgb, var(--iv-card) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .35);
  transform: translateY(130%); transition: transform .35s var(--iv-ease); }
.ivc-nav.is-in { transform: none; }
.ivc-nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border: 0; border-radius: 14px; background: transparent; color: var(--iv-ink); font-family: var(--iv-label); font-size: 9.5px; font-weight: 600; letter-spacing: .04em; cursor: pointer; transition: background-color .15s, color .15s; }
.ivc-nav button iconify-icon { font-size: 21px; color: var(--iv-gold); }
.ivc-nav button:hover { background: var(--iv-soft); }

/* ── Sheet ── */
.ivc-sheet-wrap { position: absolute; inset: 0; z-index: 8; }
.ivc-sheet-wrap[hidden] { display: none; }
.ivc-scrim { position: absolute; inset: 0; background: rgba(20, 16, 18, .5); opacity: 0; transition: opacity .25s ease; }
.ivc-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%; overflow-y: auto; padding: 10px 22px 26px; border-radius: 24px 24px 0 0; background: var(--iv-card); transform: translateY(100%); transition: transform .3s var(--iv-ease); }
.ivc-sheet-wrap.is-in .ivc-scrim { opacity: 1; }
.ivc-sheet-wrap.is-in .ivc-sheet { transform: none; }
.ivc-grab { display: block; width: 40px; height: 4px; margin: 0 auto 14px; border-radius: 4px; background: var(--iv-line); }
.ivc-sheet h3 { margin: 0 0 4px; font-family: var(--iv-display); font-size: 22px; font-weight: 500; color: var(--iv-ink); }
.ivc-sheet p { margin: 0 0 12px; }
.ivc-form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.ivc-form label { display: flex; flex-direction: column; gap: 4px; font-family: var(--iv-label); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--iv-muted); }
.ivc-form label[hidden] { display: none; }
.ivc-form input, .ivc-form select, .ivc-form textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--iv-line); border-radius: 12px; background: #fff; color: var(--iv-ink); font: 15px var(--iv-text); text-transform: none; letter-spacing: 0; }
.ivc-form input:focus, .ivc-form select:focus, .ivc-form textarea:focus { outline: 2px solid color-mix(in srgb, var(--iv-gold) 55%, transparent); border-color: var(--iv-gold); }
.ivc-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ivc-seg label { flex-direction: row; text-transform: none; letter-spacing: 0; font-size: 14px; }
.ivc-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ivc-seg span { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px; border: 1px solid var(--iv-line); border-radius: 12px; background: #fff; color: var(--iv-ink); cursor: pointer; transition: border-color .15s, background-color .15s; }
.ivc-seg input:checked + span { border-color: var(--iv-gold); background: color-mix(in srgb, var(--iv-gold) 12%, #fff); color: var(--iv-ink); font-weight: 700; }
.ivc-seg input:focus-visible + span { outline: 2px solid var(--iv-gold); outline-offset: 2px; }
.ivc-err { margin: 0 !important; color: #b3261e; font-size: 13px; }
.ivc-done { padding: 14px 0 4px; text-align: center; }
.ivc-done iconify-icon { font-size: 44px; color: var(--iv-gold); }
.ivc-qr { display: flex; justify-content: center; margin: 10px 0 14px; }
.ivc-qr img, .ivc-qr canvas { padding: 10px; border-radius: 14px; background: #fff; border: 1px solid var(--iv-line); }
.ivc-acct { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px; border-radius: 14px; background: var(--iv-soft); text-align: center; }
.ivc-acct b { font-family: var(--iv-label); font-size: 20px; letter-spacing: .12em; color: var(--iv-ink); }
.ivc-acct .ivc-btn { margin-top: 10px; }
.ivc-list { display: flex; flex-direction: column; gap: 8px; }
.ivc-li { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--iv-soft); }
.ivc-li-t { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.ivc-li-t small { color: var(--iv-muted); }
.ivc-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--iv-gold); color: var(--iv-gold); font-size: 18px; text-decoration: none; }

/* ── Cover gate ── */
.ivc-cover { position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 40%, var(--iv-card) 0%, var(--iv-soft) 70%, color-mix(in srgb, var(--iv-soft) 70%, var(--iv-gold)) 100%);
  transition: opacity .6s ease .8s, visibility 0s linear 1.4s; }
.ivc-cover::after { content: ""; position: absolute; inset: 0; background: var(--iv-shell); opacity: 0; pointer-events: none; transition: opacity .45s ease .45s; }
.ivc-cover.is-gathering::after { opacity: .9; }
.ivc-cover.is-gathering { opacity: 0; visibility: hidden; }
.ivc-cover-copy { position: relative; z-index: 1; padding: 24px; animation: ivc-fade 1.4s ease both; transition: opacity .4s ease, transform .5s var(--iv-ease); }
.ivc-cover.is-gathering .ivc-cover-copy { opacity: 0; transform: scale(.96); }
.ivc-bismillah { margin: 0 0 18px; font-family: var(--iv-arabic); font-size: 24px; color: var(--iv-gold); }
.ivc-arabic { margin: 6px 0 4px; font-family: var(--iv-arabic); font-size: 48px; line-height: 1.3; color: var(--iv-ink); }
.ivc-arabic span { font-size: 26px; color: var(--iv-gold); }
.ivc-names-sm { margin: 0 0 18px; font-family: var(--iv-display); font-size: 20px; font-style: italic; color: var(--iv-muted); }
.ivc-to { margin: 0 0 18px; font-size: 12px; color: var(--iv-muted); }
.ivc-to b { display: block; font-family: var(--iv-display); font-size: 19px; font-weight: 500; color: var(--iv-ink); }
.ivc-open { min-height: 46px; padding: 0 24px; animation: ivc-breathe 2.4s ease-in-out infinite; }
.ivc-mobile { margin: 14px 0 0; font-size: 11px; color: var(--iv-muted); }
.ivc-corner { position: absolute; display: flex; gap: 2px; transition: transform 1s var(--iv-ease), opacity .8s ease; }
.ivc-corner.tl { top: -6px; left: -6px; }
.ivc-corner.tr { top: -6px; right: -6px; flex-direction: row-reverse; }
.ivc-corner.bl { bottom: -6px; left: -6px; }
.ivc-corner.br { bottom: -6px; right: -6px; flex-direction: row-reverse; align-items: flex-end; }
.ivc-flower { transform: rotate(var(--r)); animation: ivc-sway 6s ease-in-out infinite; transform-origin: 50% 50%; }
.ivc-cover.is-gathering .ivc-corner.tl { transform: translate(140px, 260px) scale(.4); opacity: 0; }
.ivc-cover.is-gathering .ivc-corner.tr { transform: translate(-140px, 260px) scale(.4); opacity: 0; }
.ivc-cover.is-gathering .ivc-corner.bl { transform: translate(140px, -260px) scale(.4); opacity: 0; }
.ivc-cover.is-gathering .ivc-corner.br { transform: translate(-140px, -260px) scale(.4); opacity: 0; }

/* redraws while editing (Card Studio): no entrance animations, so typing does not flicker */
.ivc-frame.no-intro .ivc-stage, .ivc-frame.no-intro .ivc-sec[data-reveal] { opacity: 1; transform: none; animation: none; transition: none; }
.ivc-frame.no-intro .ivc-timeline::after { transition: none; }

@keyframes ivc-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ivc-fade { from { opacity: 0; } }
@keyframes ivc-shimmer { to { background-position: -260% 0; } }
@keyframes ivc-bob { 50% { transform: translateY(4px); } }
@keyframes ivc-breathe { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--iv-gold) 18%, transparent); } }
@keyframes ivc-sway { 50% { transform: rotate(calc(var(--r) + 6deg)); } }
@media (prefers-reduced-motion: reduce) {
  .ivc-frame *, .ivc-frame *::before, .ivc-frame *::after { animation: none !important; transition: none !important; }
  .ivc-stage, .ivc-sec[data-reveal] { opacity: 1; transform: none; }
}

/* Guest page: dark shell around the card on wide screens */
body.ivc-page { margin: 0; min-height: 100svh; background: radial-gradient(70% 60% at 50% 30%, color-mix(in srgb, var(--iv-shell, #1a1a1f) 82%, #fff), var(--iv-shell, #1a1a1f)); }
