@font-face { font-family: "Tajawal"; src: url(fonts/Tajawal-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: "Tajawal"; src: url(fonts/Tajawal-Medium.ttf); font-weight: 500; font-display: swap; }
@font-face { font-family: "Tajawal"; src: url(fonts/Tajawal-Bold.ttf); font-weight: 700; font-display: swap; }
/* Headings and the guest's name: Amiri, the Naskh the cards use, cut down to Arabic and
   Latin letters (fontTools subset of Amiri-Bold.ttf, saved as WOFF). */
@font-face { font-family: "Amiri"; src: url(fonts/Amiri-Bold-web.woff) format("woff"); font-weight: 700; font-display: swap; }

:root {
  --ink: #2b1a14;
  --body: #4a3a32;
  --muted: #7a6a60;
  --line: #e6dccb;
  --paper: #fbf6ec;
  --card: #fffdf8;
  --brand: #8e2a24;
  --brand-deep: #6d1f1a;
  --brand-soft: #f6e6dd;
  --gold: #b8862d;
  --gold-soft: #f8edd6;
  --good: #1e6b4f;
  --good-soft: #dff1e8;
  --warn: #8a5a00;
  --warn-soft: #fbeecb;
  --bad: #a4261f;
  --bad-soft: #fbe2df;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(43, 26, 20, .06), 0 8px 24px rgba(43, 26, 20, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

a { color: var(--brand); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(680px, 100% - 32px); margin-inline: auto; }

/* Header and footer */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.logo { font-family: "Amiri", serif; font-weight: 700; font-size: 30px; color: var(--brand); text-decoration: none; line-height: 1; }
.logo img { display: block; height: 50px; width: auto; }
.trial { background: var(--gold-soft); color: #6d5014; text-align: center; font-size: 14px; padding: 6px 12px; }
/* The footer sits at the bottom even on a short page: the page is a column, and the main part takes the room. */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
body.guest-page, body.door-page { display: block; }
.footer { margin-top: 56px; padding: 26px 0; background: var(--ink); color: #d9cdbf; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 16px 24px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer a { color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: flex-end; }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } .footer-links { justify-content: flex-start; } }
.app-badge { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; transition: transform .15s; }
.app-badge:hover { transform: translateY(-2px); }
.app-icon { width: 24px; height: 24px; }
.app-badge.app-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.app-badge.app-tiktok { background: #111; }
.app-badge.app-tiktok .app-icon { filter: drop-shadow(-1px -1px 0 #25f4ee) drop-shadow(1px 1px 0 #fe2c55); }
.app-badge.app-snapchat { background: #fffc00; color: #fff; }
.app-badge.app-x { background: #000; border: 1px solid #444; }
.app-badge.app-youtube { background: #ff0000; }
.app-badge.app-whatsapp { background: #25d366; }
.app-badge.app-email { background: var(--brand); }
.contact-list { display: grid; gap: 10px; margin-top: 16px; }
.contact-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); text-decoration: none; }
.contact-item b { display: block; }
.contact-item:hover { border-color: var(--gold); }
.social-row { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-occasions { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.footer-social { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: flex-end; }
.phrases { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.phrases li { background: var(--card); border: 1px solid var(--line); border-inline-start: 4px solid var(--gold); border-radius: 10px; padding: 12px 16px; font-weight: 500; font-size: 18px; color: var(--ink); }
.contact-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 4px; max-height: 60vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.contact-list li { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.contact-list label { display: flex; gap: 10px; align-items: center; font-weight: 400; }
.contacts-actions { display: flex; gap: 8px; margin-top: 10px; }
.contacts-box form + form { margin-top: 10px; }
.door-for fieldset { border: 0; padding: 0; margin: 0 0 6px; }
.door-for legend { font-weight: 700; margin-bottom: 14px; }
.door-for .chips { margin: 0; }
.phrases li p { margin: 0; }
.phrase-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.guide .section { padding: 30px 0 10px; }
.guide .section > .note { margin-top: -6px; }
.guide-toc { margin-top: 28px; }
.guide-toc ol { margin: 8px 0 0; padding-inline-start: 22px; display: grid; gap: 4px; }
.guide-steps { display: grid; gap: 10px; padding-inline-start: 22px; margin: 0 0 16px; font-size: 17px; }
.guide-tips { display: grid; gap: 8px; padding-inline-start: 22px; margin: 0; }
.guide-cta { margin-top: 30px; text-align: center; background: var(--gold-soft); border-color: #ecd8ae; }
.guide-cta h2 { margin-top: 0; color: var(--brand-deep); }
.occasion-designs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.occasion-designs a { color: var(--ink); text-decoration: none; text-align: center; font-weight: 700; }
.occasion-designs img { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: var(--shadow); margin-bottom: 6px; }
@media (max-width: 640px) { .occasion-designs { grid-template-columns: repeat(2, 1fr); } }

/* Buttons */
.btn {
  display: inline-block; border: 1px solid var(--brand); background: var(--brand); color: #fff;
  border-radius: 11px; padding: 11px 22px; font: inherit; font-weight: 700; cursor: pointer;
  text-align: center; text-decoration: none; line-height: 1.4;
}
.btn:hover { background: var(--brand-deep); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.green { background: var(--good); border-color: var(--good); }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.small { padding: 5px 13px; font-size: 15px; }
.btn.block { display: block; width: 100%; }
.btn.big { padding: 15px 24px; font-size: 20px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 1px;
}

/* Landing */
.hero { padding: 48px 0 40px; background: linear-gradient(180deg, var(--brand-soft), var(--paper)); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-family: "Amiri", serif; font-size: clamp(42px, 7vw, 68px); font-weight: 700; color: var(--brand-deep); margin-bottom: .3em; }
.lead { font-size: 20px; color: var(--body); }
.hero-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.hero-cards img { border-radius: 10px; box-shadow: var(--shadow); }
.note { color: var(--muted); font-size: 15px; }
.section { padding: 44px 0; }
.section h2 { font-size: clamp(25px, 4vw, 32px); color: var(--brand-deep); }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.box h3 { font-size: 19px; color: var(--brand-deep); margin-bottom: .3em; }
.box p:last-child { margin-bottom: 0; }
.step { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 8px; }
.price { font-size: 34px; font-weight: 700; color: var(--brand-deep); line-height: 1.2; }
.price small { font-size: 15px; font-weight: 400; color: var(--muted); }
.price .was { font-size: 20px; font-weight: 400; color: var(--muted); }
.partner-offer { text-align: center; font-weight: 500; }
.partner-box h3 { margin: 0 0 4px; }
.partner-box .terms { margin: 0 0 10px; }
.partner-box table { margin: 10px 0; }
.partner-box .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.partner-box.stopped { opacity: .7; }
.copy-line { display: block; direction: ltr; text-align: left; overflow-wrap: anywhere; background: var(--paper);
             border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font-size: 15px; }
.ticks { list-style: none; padding: 0; margin: 10px 0 0; }
.ticks li { position: relative; padding-inline-start: 24px; margin-bottom: 4px; font-size: 16px; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 8px 0 0; color: var(--body); }

/* Forms */
.page-title { font-size: clamp(25px, 4vw, 31px); color: var(--brand-deep); margin: 26px 0 8px; }
label { display: block; font-weight: 700; font-size: 16px; margin-bottom: 14px; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }
.hint.inline { display: inline; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline-form input { flex: 1 1 220px; margin: 0; }
input[type=text], input[type=tel], input[type=email], input[type=date], input[type=time], input[type=url], input[type=number], select, textarea {
  display: block; width: 100%; margin-top: 5px; padding: 11px 13px; font: inherit; font-weight: 400;
  border: 1px solid #d3c6b2; border-radius: 10px; background: #fff; color: var(--ink);
}
textarea { min-height: 130px; resize: vertical; }
.field-error { color: var(--bad); font-size: 14px; font-weight: 500; display: block; margin-top: 3px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.wedding-details { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; background: #fff; }
.wedding-details[hidden] { display: none; }
.wedding-details summary { cursor: pointer; font-weight: 700; margin-bottom: 4px; }
.wedding-details[open] summary { margin-bottom: 12px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.check input { width: auto; margin: 4px 0 0; flex: none; }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 26px; align-items: start; }
.editor > div { min-width: 0; }
.preview-pane { position: sticky; top: 16px; }
.preview-pane img { display: block; margin-inline: auto; border-radius: 10px; box-shadow: var(--shadow); width: min(100%, calc(84vh * 9 / 16)); height: auto; background: var(--line); aspect-ratio: 9 / 16; }
.themes { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; min-inline-size: 0; }
.theme-list { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.themes legend { font-weight: 700; padding: 0; margin-bottom: 6px; }
.theme-groups { margin: 0 0 10px; }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.theme[hidden] { display: none; }
.theme img { width: 100%; }
.theme { position: relative; margin: 0; font-weight: 500; font-size: 14px; text-align: center; cursor: pointer; }
.theme input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.theme img { border-radius: 8px; border: 3px solid transparent; aspect-ratio: 9 / 16; object-fit: cover; }
.theme input:checked + img { border-color: var(--brand); }
.theme input:focus-visible + img { outline: 3px solid var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: -6px 0 14px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 12px; font: inherit; font-size: 14px; cursor: pointer; color: var(--body); }
.chip:hover { border-color: var(--brand); }

/* Alerts */
.alert { border-radius: 11px; padding: 12px 16px; margin: 14px 0; font-size: 16px; }
.alert.ok { background: var(--good-soft); color: var(--good); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.info { background: var(--gold-soft); color: #6d5014; }

/* Manage */
.manage-head { display: grid; grid-template-columns: 170px 1fr; gap: 18px; align-items: start; margin-top: 22px; }
.manage-head img { border-radius: 8px; box-shadow: var(--shadow); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.stat b { display: block; font-size: 28px; color: var(--brand-deep); line-height: 1.2; }
.stat span { font-size: 14px; color: var(--muted); }
.guest-fields { display: grid; grid-template-columns: 2fr 1.4fr .8fr; gap: 0 12px; }
.guest-fields.with-section { grid-template-columns: 2fr 1.4fr .8fr .9fr; }
.guest-fields input[name=phone] { text-align: right; }
@media (max-width: 640px) {
  .guest-fields, .guest-fields.with-section { grid-template-columns: 1fr 1fr; }
  .guest-field-name { grid-column: 1 / -1; }
}
.bulk-add, .helper-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: #fff; }
.bulk-add summary, .helper-box summary { cursor: pointer; font-weight: 700; }
.bulk-add[open] summary, .helper-box[open] summary { margin-bottom: 12px; }
.ask-us { background: var(--good-soft); border-radius: 10px; padding: 12px 14px; }
.ask-us p { margin-top: 0; }
.guest-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.guest-row:last-child { border-bottom: 0; }
.guest-name { font-weight: 700; }
.guest-meta { font-size: 14px; color: var(--muted); }
.guest-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.badge { display: inline-block; border-radius: 999px; padding: 0 10px; font-size: 13px; background: #eee6d8; color: var(--body); }
.badge.yes { background: var(--good-soft); color: var(--good); }
.badge.no { background: var(--bad-soft); color: var(--bad); }
.guest-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.badge.plain { background: #fff; border: 1px solid var(--line); }
.badge.in { background: #e3edf9; color: #1d4f91; }
.ticks { font-size: 13px; color: var(--muted); }
.ticks.read { color: #2b7bd0; }
.ticks.none { color: #b4a891; }
.group-title { font-size: 17px; margin: 18px 0 4px; }
.send-all { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.card-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.card-pair figure { margin: 0; text-align: center; font-size: 14px; color: var(--muted); }
.card-pair img { width: 100%; }
.sections-box .sections-fields { margin-top: 10px; }
.preview-switch { justify-content: center; margin: 0 0 8px; }
.queue { margin-top: 16px; }
.queue-progress { font-size: 18px; margin-bottom: 6px; }
.queue progress { width: 100%; height: 10px; margin-bottom: 14px; }
.queue-list { list-style: none; padding: 0; margin: 0; }
.queue-item { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: #fff; margin-bottom: 10px; }
.queue-name { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.sent { background: var(--good); border-color: var(--good); color: #fff; }
.link-box { display: flex; gap: 8px; align-items: stretch; }
.link-box input { margin: 0; direction: ltr; font-size: 14px; }
.inline { display: inline; }
details.danger summary { cursor: pointer; color: var(--bad); }

/* Door */
.door-page { background: #1f1512; color: #fff; min-height: 100vh; }
.door { width: min(520px, 100%); margin-inline: auto; padding: 12px; }
.door-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.door-title { font-weight: 700; font-size: 18px; }
.net { font-size: 14px; border-radius: 999px; padding: 2px 12px; background: var(--good); color: #fff; white-space: nowrap; }
.net.off { background: var(--warn); }
.door-count { text-align: center; font-size: 15px; color: #d9cdbf; margin: 8px 0; }
.door-count b { font-size: 34px; color: #fff; }
.camera { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.camera video { width: 100%; height: 100%; object-fit: cover; }
.result { border-radius: 14px; padding: 16px; margin-top: 12px; text-align: center; color: var(--ink); background: #fff; }
.result.ok { background: #c9f0d9; }
.result.warn { background: #ffe9a8; }
.result.bad { background: #ffc9c2; }
.result h2 { font-size: 26px; margin-bottom: 2px; }
.result p { margin: 0 0 8px; }
.stepper { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 8px 0 12px; }
.stepper button { width: 52px; height: 52px; border-radius: 50%; border: 0; font-size: 28px; background: var(--ink); color: #fff; cursor: pointer; }
.stepper output { font-size: 34px; font-weight: 700; min-width: 44px; }
.door input[type=text] { margin-top: 12px; direction: rtl; font-size: 18px; }
.matches { margin-top: 6px; display: grid; gap: 6px; }
.match { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 11px 13px; border: 0; border-radius: 9px; background: #3a2a24; color: #fff; font: inherit; text-align: start; cursor: pointer; }
.match span:last-child { color: #d9cdbf; font-size: 14px; }

/* Legal pages */
.prose { padding-bottom: 20px; }
.prose h2 { font-size: 21px; color: var(--brand-deep); margin-top: 1.4em; }

/* Admin */
table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 10px; overflow: hidden; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: start; }
th { background: var(--gold-soft); font-size: 15px; }
.verdict { font-size: 21px; font-weight: 700; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .editor { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .preview-pane { position: static; width: min(240px, 70%); margin: 0 auto 18px; }
  .grid.four { grid-template-columns: repeat(2, 1fr); }
  .grid.three { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .grid.two, .form-grid { grid-template-columns: 1fr; }
  .theme-list { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82px; overflow-x: auto; padding-bottom: 4px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .manage-head { grid-template-columns: 110px 1fr; }
  .hero { padding-top: 30px; }
}

/* Helpers: inline styles are blocked by the Content-Security-Policy. */
.flush { margin: 0 0 6px; }
.gap-top { margin-top: 14px; }
.block-grow { flex: 1 1 140px; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }

/* --- Motion and interaction ------------------------------------------------ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Landing: a stack of real cards that shuffles and leans toward the pointer */
.stack {
  --rx: 0deg; --ry: 0deg;
  position: relative; aspect-ratio: 9 / 16; width: min(320px, 72vw); margin-inline: auto; cursor: pointer;
  transform: perspective(1200px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .3s ease-out;
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { translate: 0 -10px; } }
.stack-card {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 14px;
  box-shadow: 0 18px 40px rgba(43, 26, 20, .24);
  transition: transform .9s cubic-bezier(.2, .8, .2, 1), filter .9s;
}
.stack-card[data-pos="0"] { transform: none; z-index: 3; }
.stack-card[data-pos="1"] { transform: translate(-17%, 3%) rotate(-7deg) scale(.92); z-index: 2; filter: brightness(.9); }
.stack-card[data-pos="2"] { transform: translate(17%, 4%) rotate(7deg) scale(.88); z-index: 1; filter: brightness(.82); }

/* Landing: try your name */
.try { background: linear-gradient(180deg, var(--paper), var(--gold-soft) 55%, var(--paper)); }
.try-grid { display: grid; grid-template-columns: 1fr minmax(230px, 330px); gap: 44px; align-items: center; }
.try-card img { border-radius: 14px; box-shadow: 0 18px 40px rgba(43, 26, 20, .2); transition: opacity .3s; }
.try-card.busy img { opacity: .55; }
.try-card img.pop { animation: pop .6s cubic-bezier(.2, .8, .2, 1); }
@keyframes pop { from { transform: scale(.96) rotate(-1deg); } }
.try-themes { margin: 0 0 18px; }

/* Landing: gallery */
.gallery-groups { margin: 0 0 16px; }
.gallery-row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 16px;
  width: min(1080px, 100% - 32px); margin-inline: auto;
}
.gallery-item {
  display: block; text-decoration: none; color: var(--ink); text-align: center; font-weight: 700; font-size: 15px;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.gallery-item img { border-radius: 10px; box-shadow: var(--shadow); margin-bottom: 6px; transition: box-shadow .35s; }
.gallery-item:hover, .gallery-item:focus-visible { transform: translateY(-6px) rotate(-1.2deg); }
.gallery-item:hover img { box-shadow: 0 16px 34px rgba(43, 26, 20, .24); }

/* Landing: fade in on scroll (only things that start below the fold) */
.reveal { transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--delay, 0ms); }
.reveal.waiting { opacity: 0; transform: translateY(26px); }

/* Reviews */
.stars { color: var(--gold); letter-spacing: 2px; }
.stars .dim { color: var(--line); }
.review { margin: 0; }
.review blockquote { margin: 8px 0; font-size: 17px; }
.review figcaption { color: var(--muted); font-size: 14px; }
.rating-sum { font-size: 19px; font-weight: 700; }
.stars-input { border: 0; padding: 0; margin: 0 0 12px; }
.stars-input legend { font-weight: 700; margin-bottom: 2px; padding: 0; }
.stars-row { display: inline-flex; flex-direction: row-reverse; gap: 4px; position: relative; }
.stars-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-row label { margin: 0; font-size: 38px; line-height: 1; color: var(--line); cursor: pointer; transition: color .15s, transform .15s; }
.stars-row label:hover, .stars-row label:hover ~ label, .stars-row input:checked ~ label { color: var(--gold); }
.stars-row label:hover { transform: scale(1.15); }
.stars-row input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* Wishes from guests */
.wish { margin: 10px 0 0; padding: 12px 14px; background: var(--gold-soft); border-radius: 12px; border-inline-start: 4px solid var(--gold); text-align: start; }
.wish blockquote { margin: 0; }
.wish figcaption { color: var(--muted); font-size: 14px; margin-top: 4px; }
.wish-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.wish-box { text-align: start; }

/* Guest page. The colours come from the card's design: themes.css gives each
   design its --g-deep (doors, buttons, the veil over the backdrop) and --g-rgb. */
.guest-page { --g-deep: #5b1915; --g-rgb: 91, 25, 21; --g-gold: #e8c97f; min-height: 100vh; background: var(--g-deep); }
.invite-backdrop {
  position: fixed; z-index: -2; top: -60px; left: -60px; width: calc(100% + 120px); height: calc(100% + 120px);
  object-fit: cover; filter: blur(28px) saturate(1.15); pointer-events: none;
}
.guest-page::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(var(--g-rgb), .3) 0%, rgba(var(--g-rgb), .7) 42%, rgba(var(--g-rgb), .92) 100%);
}
.invite { width: min(460px, 100% - 28px); margin: 18px auto 0; padding-bottom: 24px; }

/* The card catches the light once it is revealed */
.card-stage {
  position: relative; width: min(100%, calc(78vh * 9 / 16)); margin-inline: auto; border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 30px 60px -18px rgba(0, 0, 0, .7);
}
.invite-card { display: block; width: 100%; height: auto; }
.card-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; transform: translateX(-130%);
  background: linear-gradient(110deg, transparent 35%, rgba(255, 238, 196, .6) 50%, transparent 65%);
}
.card-stage.shine { animation: rise .9s cubic-bezier(.2, .8, .2, 1); }
.card-stage.shine::after { animation: sheen 1.7s ease-out .25s; }
@keyframes rise { from { transform: translateY(18px) scale(.96); opacity: .5; } }
@keyframes sheen { to { transform: translateX(130%); } }

/* Countdown, straight on the backdrop */
.countdown { margin: 24px 0 8px; text-align: center; color: #fbf3e2; }
.countdown-title { margin: 0 0 10px; font-size: 15px; opacity: .85; }
.countdown-units { display: grid; grid-template-columns: repeat(4, 1fr); }
.countdown-units div + div { border-inline-start: 1px solid rgba(232, 201, 127, .4); }
.countdown-units b { display: block; font-size: 34px; font-weight: 700; line-height: 1.15; color: var(--g-gold); font-variant-numeric: tabular-nums; }
.countdown-units span { font-size: 13px; opacity: .8; }
.countdown-now { margin: 0; font-family: "Amiri", serif; font-size: 30px; color: var(--g-gold); }

/* Panels */
.invite-panel {
  margin-top: 14px; padding: 22px 20px; border-radius: 22px; background: rgba(255, 251, 244, .96);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .6);
}
.rsvp-box { text-align: center; }
.panel-hello { margin: 0; color: var(--muted); font-size: 15px; }
.panel-title { margin: 2px 0 16px; font-family: "Amiri", serif; font-weight: 700; font-size: 30px; line-height: 1.45; color: var(--g-deep); }
.panel-title.small { font-size: 24px; margin-bottom: 4px; }

.seat-picker { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.seat-picker legend { font-weight: 700; margin: 0 auto 10px; padding: 0; }
.seat-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.seat-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seat-options label {
  margin: 0; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%;
  border: 1.5px solid rgba(var(--g-rgb), .28); font-weight: 700; font-size: 18px; color: var(--g-deep); cursor: pointer;
  transition: background .15s, color .15s, transform .15s;
}
.seat-options input:checked + label { background: var(--g-deep); border-color: var(--g-deep); color: #fff; transform: scale(1.06); }
.seat-options input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 2px; }
.rsvp-form > label { text-align: start; }

.btn-yes, .btn-no, .btn-soft { font: inherit; cursor: pointer; }
.btn-yes {
  display: block; width: 100%; padding: 15px 20px; border: 0; border-radius: 999px; background: var(--g-deep); color: #fff;
  font-weight: 700; font-size: 18px; box-shadow: 0 12px 24px -12px rgba(var(--g-rgb), .95); transition: transform .15s, filter .15s;
}
.btn-yes:hover { filter: brightness(1.18); }
.btn-yes:active { transform: scale(.98); }
.btn-no {
  display: block; margin: 10px auto 0; padding: 8px 16px; border: 0; background: none; color: var(--muted); font-size: 15px;
  text-decoration: underline; text-underline-offset: 4px;
}
.btn-soft {
  margin-top: 10px; padding: 11px 24px; border-radius: 999px; border: 1.5px solid rgba(var(--g-rgb), .35); background: transparent;
  color: var(--g-deep); font-weight: 700;
}
.btn-soft:hover { background: rgba(var(--g-rgb), .07); }
.change-answer { margin-top: 16px; }
.change-answer summary { cursor: pointer; color: var(--muted); font-size: 15px; }
.change-answer[open] summary { margin-bottom: 14px; }

.pass { margin: 6px auto 0; padding: 14px; max-width: 290px; border: 1.5px dashed rgba(var(--g-rgb), .35); border-radius: 18px; background: #fff; }
.pass-label { margin: 0; font-size: 15px; color: var(--muted); }
.qr { display: block; width: min(230px, 100%); height: auto; margin: 6px auto; }
.code { font-size: 26px; font-weight: 700; letter-spacing: 4px; direction: ltr; color: var(--g-deep); }

.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.facts li { display: flex; align-items: flex-start; gap: 12px; }
.facts .icon { flex: none; margin-top: 1px; color: var(--g-deep); }
.facts b { display: block; color: var(--ink); }
.facts span { display: block; color: var(--muted); font-size: 15px; }
.invite-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.invite-actions a {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 11px 4px; border-radius: 14px;
  background: rgba(var(--g-rgb), .06); color: var(--g-deep); font-weight: 700; font-size: 14px; text-decoration: none;
  transition: background .15s;
}
.invite-actions a:hover { background: rgba(var(--g-rgb), .13); }

.wish-box textarea { margin-top: 10px; }
.made-with { text-align: center; margin: 24px 0 6px; font-size: 15px; }
.made-with a { display: inline-flex; align-items: center; gap: 7px; color: rgba(255, 246, 230, .85); text-decoration: none; }
.made-with a:hover { color: #fff; text-decoration: underline; }

/* The two doors that open the invitation */
body.doors-up { overflow: hidden; }
.doors { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; perspective: 1800px; }
.leaf {
  position: absolute; top: 0; bottom: 0; width: 50.5%;
  background-color: var(--g-deep);
  background-image: radial-gradient(ellipse at 50% 38%, rgba(255, 236, 190, .16), transparent 68%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpolygon points='26.68,17.53 27.79,20.21 30.47,21.32 29.36,24.00 30.47,26.68 27.79,27.79 26.68,30.47 24.00,29.36 21.32,30.47 20.21,27.79 17.53,26.68 18.64,24.00 17.53,21.32 20.21,20.21 21.32,17.53 24.00,18.64' fill='none' stroke='%23e3c27a' stroke-opacity='.2' stroke-width='1'/%3E%3Ccircle cx='0' cy='0' r='1.3' fill='%23e3c27a' fill-opacity='.22'/%3E%3Ccircle cx='0' cy='48' r='1.3' fill='%23e3c27a' fill-opacity='.22'/%3E%3Ccircle cx='48' cy='0' r='1.3' fill='%23e3c27a' fill-opacity='.22'/%3E%3Ccircle cx='48' cy='48' r='1.3' fill='%23e3c27a' fill-opacity='.22'/%3E%3C/svg%3E");
  background-size: auto, 48px 48px;
  box-shadow: inset 0 0 0 9px rgba(0, 0, 0, .3), inset 0 0 0 10.5px rgba(232, 201, 127, .7), inset 0 0 90px rgba(0, 0, 0, .55);
  transition: transform 1.3s cubic-bezier(.6, .05, .3, 1); backface-visibility: hidden;
}
.leaf::before {
  content: ""; position: absolute; inset: 40px 26px 34px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 2000'%3E%3Cpath d='M1.5 2000 V64 C1.5 36 22 15 50 1.5 C78 15 98.5 36 98.5 64 V2000' fill='none' stroke='%23e3c27a' stroke-opacity='.75' stroke-width='1.6'/%3E%3Cpath d='M8 2000 V67 C8 42 26 24 50 11 C74 24 92 42 92 67 V2000' fill='none' stroke='%23e3c27a' stroke-opacity='.35' stroke-width='1'/%3E%3Cpolygon points='53.44,37.69 54.87,41.13 58.31,42.56 56.89,46.00 58.31,49.44 54.87,50.87 53.44,54.31 50.00,52.89 46.56,54.31 45.13,50.87 41.69,49.44 43.11,46.00 41.69,42.56 45.13,41.13 46.56,37.69 50.00,39.11' fill='%23e3c27a' fill-opacity='.8'/%3E%3C/svg%3E") top center / 100% auto no-repeat; border-bottom: 1.6px solid rgba(232, 201, 127, .75);
}
.leaf::after {
  content: ""; position: absolute; top: 50%; width: 12px; height: 34px; margin-top: -17px; border-radius: 6px;
  background: linear-gradient(90deg, #a8772a, #fbe7b0 45%, #b98a35); box-shadow: 0 2px 5px rgba(0, 0, 0, .5);
}
.leaf-a { right: 0; transform-origin: right center; }
.leaf-a::after { left: 13px; }
.leaf-b { left: 0; transform-origin: left center; }
.leaf-b::after { right: 13px; }
.doors.open { pointer-events: none; }
.doors.open .leaf-a { transform: rotateY(-105deg); }
.doors.open .leaf-b { transform: rotateY(105deg); }
.doors-center {
  position: relative; z-index: 2; max-width: 300px; text-align: center; color: #fbf3e2; padding: 26px 20px;
  border-radius: 24px; background: radial-gradient(closest-side, rgba(var(--g-rgb), .85), rgba(var(--g-rgb), 0));
  transition: opacity .45s, transform .6s;
}
.doors.open .doors-center { opacity: 0; transform: scale(1.15); }
.doors-for { margin: 0; font-size: 15px; opacity: .85; }
.doors-name {
  margin: 4px 0 20px; font-family: "Amiri", serif; font-weight: 700; font-size: clamp(32px, 9vw, 48px);
  color: var(--g-gold); line-height: 1.35; text-shadow: 0 2px 12px rgba(0, 0, 0, .5);
}
.doors-from { margin: 20px 0 0; font-size: 15px; opacity: .85; }
.seal {
  width: 124px; height: 124px; border-radius: 50%; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 15px;
  display: inline-grid; place-content: center; gap: 4px; color: #4a2a08;
  background: radial-gradient(circle at 35% 30%, #fdf0c8, #e2b65c 55%, #a8772a);
  box-shadow: 0 0 0 5px rgba(232, 201, 127, .25), 0 0 0 1px rgba(90, 58, 12, .4) inset, 0 12px 28px rgba(0, 0, 0, .5),
    inset 0 -5px 12px rgba(110, 70, 10, .35);
  animation: pulse 2.2s ease-in-out infinite;
}
.seal::before { content: ""; width: 34px; height: 34px; margin-inline: auto; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpolygon points='16.21,1.84 17.95,6.05 22.16,7.79 20.42,12.00 22.16,16.21 17.95,17.95 16.21,22.16 12.00,20.42 7.79,22.16 6.05,17.95 1.84,16.21 3.58,12.00 1.84,7.79 6.05,6.05 7.79,1.84 12.00,3.58' fill='%235a3a0c'/%3E%3Ccircle cx='12' cy='12' r='3.2' fill='%23e9c46f'/%3E%3C/svg%3E") center / contain no-repeat; }
.seal:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
@keyframes pulse {
  50% { box-shadow: 0 0 0 16px rgba(232, 201, 127, .06), 0 0 0 1px rgba(90, 58, 12, .4) inset, 0 12px 28px rgba(0, 0, 0, .5), inset 0 -5px 12px rgba(110, 70, 10, .35); }
}

/* Guest page: confetti after the guest says they will come */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i {
  position: absolute; top: -20px; left: var(--x); width: 8px; height: 14px; border-radius: 2px; background: var(--color);
  animation: fall var(--time) cubic-bezier(.25, .6, .4, 1) var(--delay) forwards;
}
.confetti i:nth-child(3n) { width: 10px; height: 10px; border-radius: 50%; }
@keyframes fall { to { transform: translate(var(--drift), 110vh) rotate(var(--spin)); } }

@media (max-width: 860px) {
  .try-grid { grid-template-columns: 1fr; gap: 24px; }
  .try-card { width: min(300px, 80vw); margin-inline: auto; }
  .stack { margin-top: 10px; width: min(280px, 64vw); }
}
@media (max-width: 560px) {
  .gallery-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding: 4px 16px 14px; width: 100%; }
  .gallery-item { flex: 0 0 40%; scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
