/* Vitebird: airmail shell around the invitation cards. */
:root {
  color-scheme: light;
  --desk: #eceff5;
  --paper: #ffffff;
  --ink: #1d2742;
  --ink-2: #4a5470;
  --muted: #6b7489;
  --line: #d6dbe6;
  --red: #d33f36;
  --blue: #2b5cae;
  --yes: #2f7d5b;
  --maybe: #b7791f;
  --no: #a23a3a;
  --soft-blue: #e3eaf7;
  --radius-s: 8px;
  --radius-m: 14px;
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --display: "Nunito", ui-rounded, ui-sans-serif, system-ui, sans-serif;
  --airmail: repeating-linear-gradient(-45deg, var(--red) 0 14px, var(--paper) 14px 22px, var(--blue) 22px 36px, var(--paper) 36px 44px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-optical-sizing: auto;
}
a { color: var(--blue); }
img, iframe { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, .ev-title { font-family: var(--display); font-weight: 900; letter-spacing: -.02em; }
:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Top bar ---------- */
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 4px; background: var(--airmail); }
.topbar .in { max-width: 1180px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; text-decoration: none; border-radius: 8px; }
.brand img { height: 34px; width: auto; }
.topbar nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.topbar nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { background: var(--soft-blue); color: var(--ink); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---------- Buttons and fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid var(--ink); background: var(--ink); color: #fff;
  font-weight: 700; font-size: 15px; line-height: 1;
  padding: 12px 18px; border-radius: 999px; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { background: #2c3a60; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--soft-blue); }
.btn.small { padding: 8px 13px; font-size: 14px; }
.btn.danger { border-color: var(--no); background: transparent; color: var(--no); }
.btn.link { border: 0; background: none; color: var(--blue); padding: 4px 2px; }
.btn.link:hover { text-decoration: underline; background: none; }

label.f { display: block; font-size: 14px; font-weight: 650; color: var(--ink-2); margin: 16px 0 6px; }
.hint { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
input.t, select.t, textarea.t {
  width: 100%; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius-s);
  padding: 10px 12px; font-size: 15px;
}
textarea.t { min-height: 96px; resize: vertical; line-height: 1.45; }
input.t:focus, select.t:focus, textarea.t:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--soft-blue); }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.row > .btn, .row > .shrink { flex: none; }

.switch { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.switch:last-child { border-bottom: 0; }
.switch b { display: block; font-size: 15px; }
.switch span { display: block; font-size: 13px; color: var(--muted); }
.switch input[type="checkbox"] {
  appearance: none; flex: none; width: 44px; height: 26px; border-radius: 999px; background: var(--line);
  position: relative; cursor: pointer; transition: background .15s; margin-top: 2px;
}
.switch input[type="checkbox"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input[type="checkbox"]:checked { background: var(--yes); }
.switch input[type="checkbox"]:checked::after { transform: translateX(18px); }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 22px; }
.panel h2 { font-size: 19px; margin: 0 0 4px; letter-spacing: -.01em; }
.panel > p.sub { margin: 0 0 8px; color: var(--muted); font-size: 14px; }

/* ---------- Card frames ---------- */
.cardframe { position: relative; aspect-ratio: 5 / 7; width: 100%; }
.cardframe iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.cardframe.shadow { filter: drop-shadow(0 14px 24px rgba(29, 39, 66, .2)) drop-shadow(0 2px 4px rgba(29, 39, 66, .12)); }

/* ---------- Modal ---------- */
dialog.modal { border: 0; border-radius: var(--radius-m); padding: 0; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); color: var(--ink); box-shadow: 0 30px 80px rgba(29,39,66,.35); }
dialog.modal::backdrop { background: rgba(29, 39, 66, .45); }
dialog.modal .mh { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 0; }
dialog.modal .mh h2 { margin: 0; font-size: 20px; }
dialog.modal .mb { padding: 6px 22px 8px; overflow: auto; }
dialog.modal .mf { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; }
.x { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px 8px; border-radius: 8px; }
.x:hover { background: var(--soft-blue); color: var(--ink); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--no); }

/* ---------- Status chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--soft-blue); color: var(--ink-2); white-space: nowrap; }
.chip.yes { background: #dcefe5; color: var(--yes); }
.chip.maybe { background: #f6ead2; color: var(--maybe); }
.chip.no { background: #f3dddd; color: var(--no); }
.chip.draft { background: #eef0f4; color: var(--muted); }
.chip.canceled { background: #f3dddd; color: var(--no); }

/* ---------- Event page sections (shared by the guest page and the create preview) ---------- */
.ev-sec { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px 22px; margin-top: 14px; }
.ev-sec h3 { margin: 0 0 8px; font-size: 16px; color: var(--ink-2); font-weight: 700; }
.ev-sec p { margin: 0; }
.ev-title { font-size: clamp(30px, 5vw, 44px); line-height: 1.05; letter-spacing: -.03em; margin: 0 0 14px; font-weight: 800; }
.ev-when { font-size: 18px; font-weight: 650; }
.ev-note { white-space: pre-wrap; }
.ev-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.ev-item:first-of-type { border-top: 0; }
.bar { height: 8px; border-radius: 99px; background: var(--soft-blue); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.locked { color: var(--muted); font-size: 14px; }

.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* ---------- Plans ---------- */
.plans { display: grid; gap: 10px; }
.plan { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; text-align: left; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; cursor: pointer; }
.plan:hover:not([disabled]) { border-color: var(--ink); }
.plan[disabled] { opacity: .55; cursor: default; }
.plan b { font-size: 17px; }
.plan .price { font-weight: 800; font-size: 18px; grid-row: span 2; align-self: center; }
.plan span:not(.price), .plan small { color: var(--muted); font-size: 14px; }
.plan small { grid-column: 1 / -1; }

@media (max-width: 560px) {
  .topbar .in { gap: 8px; }
  .brand img { height: 28px; }
  .topbar nav { gap: 2px; }
  .topbar nav a { padding: 7px 9px; font-size: 14px; white-space: nowrap; }
  .topbar nav a[href="/#occasions"] { display: none; }
}
