:root {
  --ink: #2f2a22;
  --muted: #746b5d;
  --paper: #fffdf8;
  --panel: #ffffff;
  --gold: #c79b31;
  --gold-dark: #8f6c1d;
  --sage: #667761;
  --line: #e5dcc8;
  --soft-line: rgba(143, 108, 29, 0.18);
  --field-border: #d6cbb8;
  --field-bg: rgba(255, 255, 255, 0.72);
  --shadow: 0 26px 60px rgba(74, 55, 22, 0.13);
  color-scheme: light;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-weight: 300;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

/* ─── Scroll Progress Bar ─────────────────────────────────────────── */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 1000;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), color-mix(in srgb, var(--gold) 60%, #fff));
  transform-origin: left;
  transform: scaleX(0);
  pointer-events: none;
}

/* ─── Petals Canvas ──────────────────────────────────────────────── */

.petals-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -60px;
  background-size: contain;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  transform-origin: 50% 30%;
  animation: petalFall linear forwards;
}

@keyframes petalFall {
  0%   { opacity: 0;    transform: translateX(0)       rotate(calc(var(--tilt) * 1deg)); }
  8%   { opacity: 0.32; }
  85%  { opacity: 0.22; }
  100% { opacity: 0;    transform: translateX(var(--sway)) rotate(calc(var(--tilt) * 1deg + 18deg)); top: 108vh; }
}

/* ─── Page Shell ─────────────────────────────────────────────────── */

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 18px 0 56px;
}

/* ─── Topbar ─────────────────────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  margin-bottom: 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand strong {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.brand-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--gold) 72%, #fff);
  border-radius: 50%;
  background: var(--field-bg);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--sage) 18%, transparent),
    0 0 0 4px color-mix(in srgb, var(--gold-dark) 14%, transparent);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand-avatar:hover {
  transform: scale(1.08) rotate(4deg);
}

.brand-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar-actions {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
}

.lang-button {
  min-width: 54px;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  transition: transform 0.18s ease;
}

.lang-button:not(.active):hover {
  transform: scale(1.05);
}

.lang-button.active {
  background: var(--ink);
  color: #fff;
}

[hidden] {
  display: none !important;
}

/* ─── Layout Picker ──────────────────────────────────────────────── */

.layout-picker {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: clamp(8px, 2vw, 18px);
}

.layout-option {
  min-height: 34px;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  padding: 0 13px;
  font-size: 0.82rem;
  font-weight: 800;
  transition: transform 0.18s ease;
}

.layout-option:not(.active):hover {
  transform: scale(1.04);
}

.layout-option.active {
  background: var(--ink);
  color: #fff;
}

/* ─── Scroll Reveal ──────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in-view,
.reveal-right.in-view {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* ─── Invitation / AI Hero Art ───────────────────────────────────── */

.invitation-frame {
  margin: 0;
  justify-self: center;
  width: min(100%, 430px);
  filter: drop-shadow(var(--shadow));
}

.ai-hero-art {
  position: relative;
  width: min(100%, 520px);
  margin: 0;
  justify-self: center;
}

/* Warm gradient placeholder shown while the real image is preloading */
.ai-hero-art[data-img-loading] {
  opacity: 0 !important;
  transition: none !important;
}

/* Blur-up fade-in on the image itself */
#aiHeroImage {
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--gold) 18%, var(--paper)),
    color-mix(in srgb, var(--sage) 10%, var(--paper))
  );
}

.ai-hero-art::before {
  content: "";
  position: absolute;
  inset: 7% -4% -4% 9%;
  z-index: -1;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--gold) 13%, transparent);
}

.ai-hero-art img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: var(--field-bg);
  box-shadow: var(--shadow);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-hero-art img:hover {
  transform: scale(1.02) translateY(-4px);
  box-shadow: 0 38px 80px rgba(74, 55, 22, 0.22);
}

[data-ai-hero="twirl"] .ai-hero-art,
[data-ai-hero="venue"] .ai-hero-art,
[data-ai-hero="close"] .ai-hero-art {
  width: min(100%, 620px);
}

[data-ai-hero="twirl"] .ai-hero-art img,
[data-ai-hero="venue"] .ai-hero-art img,
[data-ai-hero="close"] .ai-hero-art img {
  aspect-ratio: 16 / 9;
}

.ai-hero-art figcaption {
  margin: 14px 0 0 auto;
  max-width: 310px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: end;
}

/* ─── Layout variants ────────────────────────────────────────────── */

[data-layout="romantic"] .page-shell {
  width: min(1280px, calc(100% - 28px));
}

[data-layout="romantic"] .hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  min-height: min(760px, calc(100vh - 126px));
  overflow: hidden;
  align-items: end;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: var(--ink);
  padding: 0;
}

[data-layout="romantic"] .hero::after {
  content: "";
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -64px;
  z-index: 1;
  height: 132px;
  border-radius: 50% 50% 0 0;
  background: var(--paper);
}

[data-layout="romantic"] .ai-hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  z-index: 0;
}

[data-layout="romantic"] .ai-hero-art::before {
  display: none;
}

[data-layout="romantic"] .ai-hero-art img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  filter: brightness(0.58) saturate(0.96);
}

[data-layout="romantic"] .ai-hero-art figcaption,
[data-layout="venue"] .ai-hero-art figcaption {
  display: none;
}

[data-layout="romantic"] .hero-copy {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
  padding: clamp(34px, 7vw, 86px);
  color: #fff;
}

[data-layout="romantic"] h1,
[data-layout="romantic"] .hero-text,
[data-layout="romantic"] .event-details dd,
[data-layout="romantic"] .map-link {
  color: #fff;
}

[data-layout="romantic"] .kicker,
[data-layout="romantic"] .event-details dt {
  color: color-mix(in srgb, var(--gold) 70%, #fff);
}

[data-layout="romantic"] .event-details {
  border-color: rgba(255, 255, 255, 0.28);
}

[data-layout="romantic"] .event-details div {
  border-color: rgba(255, 255, 255, 0.22);
}

[data-layout="romantic"] .rsvp-section {
  padding-top: clamp(78px, 9vw, 120px);
}

[data-layout="editorial"] .page-shell {
  width: min(1180px, calc(100% - 36px));
}

[data-layout="editorial"] .hero {
  grid-template-columns: 1fr;
  gap: 26px;
  padding-top: 18px;
  text-align: center;
}

[data-layout="editorial"] .hero-copy {
  justify-self: center;
  max-width: 760px;
}

[data-layout="editorial"] h1,
[data-layout="editorial"] .hero-text,
[data-layout="editorial"] .event-details {
  margin-inline: auto;
}

[data-layout="editorial"] .map-link {
  justify-content: center;
}

[data-layout="editorial"] .ai-hero-art {
  order: -1;
  width: 100%;
}

[data-layout="editorial"] .ai-hero-art::before,
[data-layout="editorial"] .ai-hero-art figcaption {
  display: none;
}

[data-layout="editorial"] .ai-hero-art img {
  aspect-ratio: 16 / 8;
  object-position: center;
}

[data-layout="sidebar"] .page-shell {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  column-gap: clamp(28px, 5vw, 70px);
  width: min(1180px, calc(100% - 36px));
}

[data-layout="sidebar"] .topbar {
  position: sticky;
  top: 18px;
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: start;
  display: grid;
  justify-content: stretch;
  min-height: auto;
  padding: 28px 0;
}

[data-layout="sidebar"] .brand,
[data-layout="sidebar"] .topbar-actions {
  justify-self: start;
}

[data-layout="sidebar"] .layout-picker,
[data-layout="sidebar"] main {
  grid-column: 2;
}

[data-layout="sidebar"] .layout-picker {
  justify-content: flex-end;
}

[data-layout="sidebar"] .hero {
  grid-template-columns: 1fr;
  gap: 26px;
  padding-top: 18px;
}

[data-layout="sidebar"] .ai-hero-art {
  order: -1;
  width: 100%;
}

[data-layout="sidebar"] .ai-hero-art img {
  aspect-ratio: 16 / 8;
}

[data-layout="venue"] body {
  background: color-mix(in srgb, var(--sage) 7%, var(--paper));
}

[data-layout="venue"] .page-shell {
  width: min(1040px, calc(100% - 36px));
}

[data-layout="venue"] .hero {
  grid-template-columns: 1fr;
  gap: 34px;
  padding-top: clamp(22px, 5vw, 62px);
  text-align: center;
}

[data-layout="venue"] .hero-copy {
  justify-self: center;
  max-width: 760px;
}

[data-layout="venue"] .hero-text,
[data-layout="venue"] .event-details {
  margin-inline: auto;
}

[data-layout="venue"] .ai-hero-art {
  order: -1;
  width: 100%;
}

[data-layout="venue"] .ai-hero-art img {
  aspect-ratio: 16 / 7;
}

[data-layout="pyramids"] .page-shell {
  width: min(1280px, calc(100% - 28px));
}

[data-layout="pyramids"] .hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  min-height: min(760px, calc(100vh - 126px));
  overflow: hidden;
  align-items: end;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: #1f1a16;
  padding: 0;
}

[data-layout="pyramids"] .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(28, 22, 18, 0.72), rgba(28, 22, 18, 0.12) 56%, rgba(28, 22, 18, 0.38)),
    linear-gradient(0deg, rgba(28, 22, 18, 0.34), transparent 45%);
  pointer-events: none;
}

[data-layout="pyramids"] .ai-hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  z-index: 0;
}

[data-layout="pyramids"] .ai-hero-art::before,
[data-layout="pyramids"] .ai-hero-art figcaption {
  display: none;
}

[data-layout="pyramids"] .ai-hero-art img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: center;
  filter: brightness(1.08) contrast(1.1) saturate(1.16);
}

[data-layout="pyramids"] .hero-copy {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
  padding: clamp(34px, 7vw, 86px);
  color: #fff;
}

[data-layout="pyramids"] h1,
[data-layout="pyramids"] .hero-text,
[data-layout="pyramids"] .event-details dd,
[data-layout="pyramids"] .map-link {
  color: #fff;
}

[data-layout="pyramids"] .kicker,
[data-layout="pyramids"] .event-details dt {
  color: color-mix(in srgb, var(--gold) 72%, #fff);
}

[data-layout="pyramids"] .event-details {
  border-color: rgba(255, 255, 255, 0.28);
}

[data-layout="pyramids"] .event-details div {
  border-color: rgba(255, 255, 255, 0.22);
}

[data-layout="pyramids"] .rsvp-section {
  padding-top: clamp(78px, 9vw, 120px);
}

[data-layout="classic"] .hero {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
}

[data-layout="classic"] .ai-hero-art {
  width: min(100%, 620px);
}

[data-layout="classic"] .ai-hero-art img {
  aspect-ratio: 16 / 9;
  object-position: center;
}

.invitation-frame img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: #fff;
}

/* ─── Hero ───────────────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  align-items: center;
  gap: clamp(34px, 7vw, 86px);
  padding: clamp(26px, 5vw, 76px) 0 clamp(46px, 7vw, 92px);
}

.hero-copy {
  padding-block: 18px;
}

/* ─── Kicker ─────────────────────────────────────────────────────── */

.kicker {
  margin: 0 0 12px;
  color: var(--gold-dark);
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ─── Headings ───────────────────────────────────────────────────── */

h1,
h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Amiri, Georgia, serif;
  letter-spacing: 0;
}

h1 {
  max-width: 100%;
  font-size: clamp(3.15rem, 8.2vw, 7.7rem);
  line-height: 0.9;
  color: var(--ink);
}

h1 span {
  display: block;
  max-width: 100%;
  white-space: nowrap;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.08;
}

/* ─── Hero body text ─────────────────────────────────────────────── */

.hero-text {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.16rem);
  line-height: 1.8;
}

/* ─── Event Details ──────────────────────────────────────────────── */

.event-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 560px;
  margin: 34px 0 0;
  border-top: 1px solid var(--soft-line);
}

.event-details div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  padding: 14px 6px;
  border-bottom: 1px solid var(--soft-line);
  border-radius: 6px;
  transition: background 0.22s ease, padding 0.22s ease;
}

.event-details div:hover {
  background: color-mix(in srgb, var(--gold) 7%, transparent);
  padding-inline: 10px;
}

.event-details dt {
  color: var(--gold-dark);
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.event-details dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.45;
}

/* ─── Map Link ───────────────────────────────────────────────────── */

.map-link {
  display: inline-flex;
  align-items: center;
  margin-top: 20px;
  color: var(--ink);
  font-weight: 800;
  text-underline-offset: 5px;
  text-decoration-color: var(--gold);
}

.map-link::after {
  content: "→";
  display: inline-block;
  margin-inline-start: 6px;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.map-link:hover::after {
  transform: translateX(4px);
}

/* ─── Countdown Strip ────────────────────────────────────────────── */

.countdown-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 4vw, 48px);
  padding: 20px 0;
  border-top: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
}

.countdown-copy {
  min-width: min(100%, 240px);
}

.countdown-title {
  margin: 0;
  color: var(--muted);
  font-family: Parisienne, "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 400;
  line-height: 1.15;
}

.countdown-items {
  display: grid;
  grid-template-columns: repeat(4, minmax(74px, 1fr));
  gap: 10px;
  width: min(100%, 520px);
}

/* ─── Flip Unit ──────────────────────────────────────────────────── */

.flip-unit {
  position: relative;
  min-height: 82px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--field-bg) 74%, transparent);
  box-shadow: 0 4px 16px rgba(74, 55, 22, 0.1);
  overflow: hidden;
  perspective: 400px;
}

.flip-unit::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 100%);
  border-bottom: 1px solid var(--soft-line);
  pointer-events: none;
  z-index: 1;
}

.flip-unit strong {
  color: var(--ink);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1;
  z-index: 2;
}

.flip-unit span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  z-index: 2;
}

@keyframes flipIn {
  0%   { transform: rotateX(-90deg); opacity: 0.4; }
  100% { transform: rotateX(0deg);   opacity: 1; }
}

.flip-unit strong.flip {
  animation: flipIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ─── Ornament Dividers ──────────────────────────────────────────── */

.ornament {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  opacity: 0.65;
}

.orn-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.ornament svg {
  flex-shrink: 0;
  color: var(--gold);
  width: 22px;
  height: 22px;
}

/* ─── Couple Showcase ────────────────────────────────────────────── */

.couple-showcase {
  position: relative;
  width: min(100%, 450px);
  min-height: 560px;
  margin: 0;
  justify-self: center;
  isolation: isolate;
}

.couple-showcase::before {
  content: "";
  position: absolute;
  inset: 10% 3% 7% 8%;
  z-index: -2;
  border: 1px solid var(--soft-line);
  border-radius: 999px 999px 12px 12px;
  background:
    radial-gradient(circle at 24% 22%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 32%),
    linear-gradient(145deg, color-mix(in srgb, var(--paper) 88%, #fff), color-mix(in srgb, var(--gold) 10%, #fff));
}

.couple-showcase::after {
  content: "";
  position: absolute;
  right: 2%;
  bottom: 11%;
  z-index: -1;
  width: 46%;
  height: 20%;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 25%, transparent);
  filter: blur(26px);
}

.photo-card {
  position: absolute;
  overflow: hidden;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.salma-card {
  left: 0;
  top: 36px;
  width: 58%;
  height: 72%;
}

.salma-card img {
  object-position: 53% 47%;
}

.izz-card {
  right: 0;
  bottom: 34px;
  width: 59%;
  height: 61%;
}

.izz-card img {
  object-position: 52% 38%;
}

.couple-showcase figcaption {
  position: absolute;
  right: 4%;
  bottom: 0;
  max-width: 260px;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.5;
}

[data-hero-style="garden"] .couple-showcase::before {
  inset: 6% 8% 12% 5%;
  border-radius: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--sage) 16%, transparent), transparent 42%),
    color-mix(in srgb, var(--paper) 86%, #fff);
}

[data-hero-style="garden"] .salma-card {
  left: 6%;
  top: 20px;
  width: 50%;
  height: 78%;
}

[data-hero-style="garden"] .izz-card {
  right: 4%;
  bottom: 68px;
  width: 50%;
  height: 55%;
}

[data-hero-style="bright"] .couple-showcase {
  min-height: 520px;
}

[data-hero-style="bright"] .couple-showcase::before {
  inset: 7% 2% 8% 2%;
  border-radius: 12px;
  background:
    radial-gradient(circle at 85% 18%, color-mix(in srgb, var(--gold) 42%, transparent), transparent 22%),
    linear-gradient(135deg, color-mix(in srgb, var(--sage) 16%, #fff), color-mix(in srgb, var(--paper) 72%, #fff));
}

[data-hero-style="bright"] .salma-card {
  left: 1%;
  top: 86px;
  width: 48%;
  height: 58%;
}

[data-hero-style="bright"] .izz-card {
  right: 1%;
  top: 36px;
  bottom: auto;
  width: 55%;
  height: 67%;
}

/* ─── Sections ───────────────────────────────────────────────────── */

.rsvp-section,
.location-section,
.host-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 78px);
  align-items: start;
  padding: clamp(38px, 6vw, 76px) 0;
  border-top: 1px solid var(--soft-line);
}

.location-section {
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  padding-top: clamp(34px, 5vw, 64px);
}

.section-heading p:not(.kicker) {
  max-width: 340px;
  color: var(--muted);
  line-height: 1.7;
}

.location-section .map-link {
  margin-top: 4px;
}

/* ─── Map Embed ──────────────────────────────────────────────────── */

.map-embed {
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: var(--field-bg);
  box-shadow: 0 18px 50px rgba(74, 55, 22, 0.08);
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  filter: saturate(0.9) contrast(0.96);
}

/* ─── RSVP column wrapper (keeps aside + form as one grid child) ─── */

.rsvp-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ─── Gift Notice ────────────────────────────────────────────────── */

.gift-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding: 14px 18px;
  border: 1.5px solid color-mix(in srgb, var(--gold-dark) 45%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--gold-dark) 10%, var(--field-bg));
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.55;
}

.gift-notice p {
  margin: 0;
}

.gift-notice-icon {
  flex-shrink: 0;
  font-size: 1.5rem;
  line-height: 1;
}

/* ─── RSVP Form ──────────────────────────────────────────────────── */

.rsvp-form,
.link-builder {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.rsvp-col {
  position: relative;
}

.rsvp-col.is-loading > :not(.rsvp-state-overlay) {
  filter: blur(3px);
  opacity: 0.38;
  pointer-events: none;
  user-select: none;
}

.rsvp-state-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  min-height: 220px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  backdrop-filter: blur(8px);
  text-align: center;
}

.rsvp-state-overlay p {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.spinner {
  width: 46px;
  height: 46px;
  border: 3px solid color-mix(in srgb, var(--gold) 25%, transparent);
  border-top-color: var(--gold-dark);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-grid,
.link-builder {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

.field span,
.choice-group legend,
.stepper-field span {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--field-border);
  border-radius: 12px;
  background: var(--field-bg);
  color: var(--ink);
  padding: 14px 15px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(199, 155, 49, 0.16);
}

/* ─── RSVP Code Gate ───────────────────────────────────────────────── */

.rsvp-gate {
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid var(--soft-line);
  border-radius: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--gold) 8%, transparent), transparent 42%),
    var(--field-bg);
  box-shadow: 0 18px 50px rgba(74, 55, 22, 0.08);
}

.rsvp-gate h3 {
  margin: 0;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.rsvp-gate p:not(.kicker):not(.status-message) {
  max-width: 460px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.code-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 22px;
}

.code-entry input {
  text-transform: uppercase;
}

.code-entry .secondary-button {
  min-width: 150px;
}

/* ─── Choice Cards ───────────────────────────────────────────────── */

.choice-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
  padding: 0;
  border: 0;
}

.choice-group legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.choice-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 14px;
  border: 1px solid var(--field-border);
  border-radius: 12px;
  background: var(--field-bg);
  font-weight: 700;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.22s ease,
              background 0.22s ease,
              box-shadow 0.22s ease;
}

.choice-card:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
}

.choice-card:has(input:checked) {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 9%, var(--field-bg));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent);
}

.choice-card input {
  width: 18px;
  height: 18px;
  accent-color: var(--sage);
}

/* ─── Guest Steppers ─────────────────────────────────────────────── */

.guest-steppers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 18px;
}

.stepper-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--field-border);
  border-radius: 12px;
  background: var(--field-bg);
}

.stepper-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stepper-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  color: var(--gold);
  opacity: 0.8;
}

.stepper-icon--child {
  width: 30px;
  height: 30px;
  opacity: 0.75;
}

.stepper-field small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.stepper {
  display: grid;
  grid-template-columns: 38px 54px 38px;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.stepper input {
  height: 38px;
  padding: 0;
  text-align: center;
  font-weight: 800;
  appearance: textfield;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.stepper-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--field-border);
  border-radius: 50%;
  background: color-mix(in srgb, var(--paper) 68%, #fff);
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.18s ease,
              background 0.18s ease;
}

.stepper-button:hover {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 18%, #fff);
  transform: scale(1.1);
}

.stepper-button:active {
  transform: scale(0.95);
}

.stepper-button:disabled,
.stepper input:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

/* ─── Form Footer & Submit ───────────────────────────────────────── */

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
}

.invite-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.invite-note strong {
  color: var(--ink);
}

.submit-button,
.secondary-button {
  position: relative;
  overflow: hidden;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  padding: 0 22px;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.22s ease;
}

.submit-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0.14) 50%, transparent 100%);
  animation: shimmer 2.8s infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0%   { left: -100%; }
  60%  { left: 140%; }
  100% { left: 140%; }
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(47, 42, 34, 0.25);
}

.submit-button:active {
  transform: translateY(0);
  box-shadow: none;
}

.secondary-button {
  align-self: end;
  background: var(--sage);
}

.secondary-button:hover {
  filter: brightness(0.94);
}

.status-message {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--sage);
  font-weight: 750;
}

.status-message.error {
  color: #a23824;
}

.rsvp-thank-you {
  padding: clamp(22px, 5vw, 36px);
  border: 1px solid var(--soft-line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 34%),
    var(--field-bg);
  box-shadow: 0 18px 50px rgba(74, 55, 22, 0.08);
}

.thank-you-face {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--gold) 12%, #fff);
  font-size: 1.8rem;
  box-shadow: 0 12px 30px rgba(74, 55, 22, 0.08);
}

.rsvp-thank-you h3 {
  margin: 0;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1;
}

.rsvp-thank-you p:not(.kicker) {
  max-width: 520px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.7;
}

/* ─── Host / Generated Link ──────────────────────────────────────── */

.generated-link {
  grid-column: 1 / -1;
  min-height: 52px;
  overflow-wrap: anywhere;
  border: 1px dashed var(--gold);
  border-radius: 12px;
  background: #fffaf0;
  padding: 14px;
  color: var(--ink);
  font-weight: 700;
}

/* ─── Site Credit ────────────────────────────────────────────────── */

.site-credit {
  display: flex;
  justify-content: center;
  padding: 18px 0 2px;
  border-top: 1px solid var(--soft-line);
}

.site-credit a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(125, 92, 104, 0.92);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  opacity: 1;
  transition: transform 160ms ease, opacity 160ms ease;
}

.site-credit img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  flex: 0 0 auto;
}

.site-credit a:hover,
.site-credit a:focus-visible {
  transform: translateY(-1px);
}

.site-credit-label {
  color: rgba(125, 92, 104, 0.96);
}

.site-credit-brand {
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: 0 1px 2px rgba(122, 73, 95, 0.22);
}

/* ─── RTL / Arabic overrides ─────────────────────────────────────── */

[dir="rtl"] {
  font-family: Amiri, Georgia, serif;
}

[dir="rtl"] .kicker,
[dir="rtl"] .event-details dt,
[dir="rtl"] .lang-button,
[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] button {
  font-family: "DM Sans", system-ui, sans-serif;
}

[dir="rtl"] .kicker {
  font-family: "DM Sans", system-ui, sans-serif;
  letter-spacing: 0.04em;
}

[dir="rtl"] .event-details dt {
  font-family: "DM Sans", system-ui, sans-serif;
  letter-spacing: 0.04em;
}

[dir="rtl"] .submit-button {
  font-family: "DM Sans", system-ui, sans-serif;
  letter-spacing: 0.02em;
}

[dir="rtl"] .brand strong {
  font-family: "DM Sans", system-ui, sans-serif;
  letter-spacing: 0.01em;
}

[dir="rtl"] h1,
[dir="rtl"] h2 {
  line-height: 1.05;
}

[dir="rtl"] h1 {
  font-family: "Noto Naskh Arabic", Amiri, Georgia, serif;
  font-size: clamp(2.75rem, 7vw, 6.35rem);
  line-height: 1.12;
}

[dir="rtl"] .countdown-title {
  font-family: "Noto Naskh Arabic", Amiri, Georgia, serif;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 600;
}

[dir="rtl"] .kicker,
[dir="rtl"] .event-details dt {
  text-transform: none;
}

[dir="rtl"] .map-link::after {
  content: "←";
}

/* ─── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 860px) {
  [data-layout="sidebar"] .page-shell {
    display: block;
    width: min(100% - 28px, 1180px);
  }

  [data-layout="sidebar"] .topbar {
    position: static;
    display: flex;
    padding: 0;
  }

  [data-layout="sidebar"] .layout-picker {
    justify-content: flex-start;
  }

  .hero,
  .rsvp-section,
  .location-section,
  .host-panel {
    grid-template-columns: 1fr;
  }

  /* ── Mobile centring ── */
  .hero-copy {
    text-align: center;
  }

  .hero-copy .hero-text {
    margin-inline: auto;
  }

  .hero-copy .event-details {
    margin-inline: auto;
    text-align: start; /* keep label/value pairs left-aligned inside the centred block */
  }

  .hero-copy .map-link {
    justify-content: center;
  }

  .section-heading {
    text-align: center;
  }

  .section-heading p:not(.kicker) {
    margin-inline: auto;
  }

  .section-heading .map-link {
    justify-content: center;
  }

  /* RTL: same centring, direction already handled by dir="rtl" */
  [dir="rtl"] .hero-copy .event-details {
    text-align: end;
  }

  .hero {
    padding-top: 10px;
  }

  [data-layout="romantic"] .hero,
  [data-layout="pyramids"] .hero {
    min-height: 720px;
    padding-top: 0;
  }

  [data-layout="venue"] .hero,
  [data-layout="sidebar"] .hero,
  [data-layout="editorial"] .hero {
    padding-top: 10px;
  }

  .hero-copy {
    padding-block: 8px;
  }

  [data-layout="romantic"] .hero-copy,
  [data-layout="pyramids"] .hero-copy {
    align-self: end;
    padding: 38px 24px 76px;
  }

  .invitation-frame,
  .couple-showcase {
    width: min(100%, 430px);
  }

  .ai-hero-art,
  [data-layout="twirl"] .ai-hero-art,
  [data-layout="venue"] .ai-hero-art,
  [data-layout="close"] .ai-hero-art {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 12px;
  }

  .brand strong {
    display: none;
  }

  .topbar {
    align-items: flex-start;
  }

  .layout-option {
    flex: 0 0 auto;
  }

  .couple-showcase {
    min-height: 470px;
  }

  .couple-showcase figcaption {
    left: 0;
    right: auto;
    max-width: 230px;
  }

  .event-details,
  .form-grid,
  .choice-group,
  .guest-steppers,
  .code-entry,
  .link-builder {
    grid-template-columns: 1fr;
  }

  .code-entry .secondary-button {
    width: 100%;
  }

  .stepper-field {
    min-height: 70px;
    padding: 12px;
  }

  .countdown-strip {
    align-items: center;
    flex-direction: column;
    gap: 14px;
    padding: 18px 0 16px;
    text-align: center;
  }

  .countdown-copy {
    min-width: 0;
    width: 100%;
  }

  .countdown-copy .kicker {
    margin-bottom: 8px;
  }

  .countdown-title {
    font-size: clamp(1.45rem, 7vw, 1.95rem);
  }

  .countdown-items {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .flip-unit {
    min-height: 54px;
    padding: 6px 2px;
    gap: 2px;
  }

  .flip-unit strong {
    font-size: clamp(1.18rem, 6vw, 1.55rem);
  }

  .flip-unit span {
    font-size: clamp(0.56rem, 2.35vw, 0.68rem);
  }

  [data-layout="romantic"] .hero,
  [data-layout="pyramids"] .hero {
    min-height: 690px;
    border-radius: 12px;
  }

  [data-layout="romantic"] .hero-copy,
  [data-layout="pyramids"] .hero-copy {
    padding: 30px 18px 72px;
  }

  [data-layout="romantic"] h1,
  [data-layout="pyramids"] h1 {
    font-size: clamp(3.35rem, 17vw, 5rem);
  }

  h1 {
    font-size: clamp(2.85rem, 12vw, 4.75rem);
  }

  [dir="rtl"] h1 {
    font-size: clamp(2.4rem, 9vw, 4.1rem);
  }

  [data-layout="romantic"] .event-details div,
  [data-layout="pyramids"] .event-details div {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
  }

  [data-layout="editorial"] .ai-hero-art img,
  [data-ai-hero="pyramids"] .ai-hero-art img {
    aspect-ratio: 4 / 3;
  }

  [data-layout="sidebar"] .ai-hero-art img,
  [data-layout="venue"] .ai-hero-art img,
  [data-ai-hero="twirl"] .ai-hero-art img,
  [data-ai-hero="venue"] .ai-hero-art img,
  [data-ai-hero="close"] .ai-hero-art img {
    aspect-ratio: 4 / 5;
  }

  .map-embed,
  .map-embed iframe {
    min-height: 280px;
  }

  .form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .submit-button,
  .secondary-button {
    width: 100%;
  }

}
