:root {
  --ink: #2c261f;
  --white: #fffcf7;
  --ivory: #f7f1e6;
  --gold: #b8893d;
  --gold-soft: #e7d3a1;
  --mehndi: #8a4b12;
  --mehndi-deep: #4e2a0c;
  --marigold: #e7a322;
  --sand: #f6e2b8;
  --muted: #7a7166;
  --font-display: "Italiana", serif;
  --font-serif: "Cormorant Garamond", serif;
  --font-script: "Great Vibes", cursive;
  --font-arabic: "Scheherazade New", serif;
  --font-ui: "Manrope", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  overflow-x: hidden;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

button,
a {
  font: inherit;
}

.bismillah {
  font-family: var(--font-arabic);
  font-weight: 700;
  font-size: clamp(30px, 4.6vw, 48px);
  line-height: 2.2;
  direction: rtl;
  text-align: center;
  margin: 0 auto;
  color: var(--gold);
}

/* Opening — seated couple, flower wall splits open */
html.gate-locked,
html.gate-locked body {
  overflow: hidden;
  height: 100%;
}

.gate-stage {
  position: fixed;
  inset: 0;
  z-index: 100000;
  min-height: 100vh;
  height: 100dvh;
  background: #d7e4c8;
  overflow: hidden;
  cursor: pointer;
}

.opening-bismillah {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  left: 0;
  right: 0;
  z-index: 6;
  margin: 0;
  text-align: center;
  color: #5c3b16;
  text-shadow: 0 1px 0 rgba(255, 252, 247, 0.75);
  pointer-events: none;
}

.gate {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 3;
  overflow: hidden;
  will-change: transform;
}

.gate-left {
  left: 0;
}

.gate-right {
  right: 0;
}

.gate img {
  position: absolute;
  top: 0;
  height: 100%;
  width: 100vw;
  max-width: none;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
  user-select: none;
}

.gate-left img {
  left: 0;
}

.gate-right img {
  left: -100%;
}

.flower-open {
  position: absolute;
  left: 50%;
  bottom: max(22px, calc(env(safe-area-inset-bottom) + 16px));
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: 0;
  background: rgba(255, 252, 247, 0.94);
  color: #4a3b24;
  padding: 12px 26px 10px;
  border-radius: 999px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(60, 40, 10, 0.2);
  cursor: pointer;
}

.flower-open small {
  letter-spacing: 0.16em;
  font-size: 9px;
  font-weight: 600;
  opacity: 0.65;
}

.gate-center {
  position: relative;
  z-index: 5;
  margin: auto;
  text-align: center;
  padding: 24px 20px;
}

.gate-kicker,
.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold);
}

.gate-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(52px, 9vw, 92px);
  line-height: 0.95;
  color: #3a3228;
}

.gate-title span,
.couple-line span {
  font-family: var(--font-script);
  color: var(--gold);
}

.gate-names {
  margin: 14px 0 8px;
  font-family: var(--font-script);
  font-size: clamp(32px, 5vw, 46px);
  color: #4a4034;
}

.gate-date {
  margin: 0 0 22px;
  letter-spacing: 0.28em;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.enter-btn,
.text-btn {
  border: 1px solid var(--gold);
  background: transparent;
  color: #4a3b24;
  padding: 13px 28px;
  border-radius: 999px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.enter-btn {
  background: #fff;
}

.enter-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

/* Page */
.event-page {
  background:
    radial-gradient(circle at 10% 0%, #fff, transparent 32%),
    var(--white);
}

.nikkah {
  padding: 72px 6vw 48px;
  text-align: center;
}

.lead {
  margin: 18px 0 8px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
}

.nikkah-title,
.mehndi-title,
.rsvp-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(56px, 9vw, 96px);
  line-height: 0.95;
}

.nikkah-title {
  color: #3c342b;
  margin-bottom: 28px;
}

/* Names show once, under the banner with parent lines */
.couple-line {
  display: none;
}

.couple-amp {
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.banner {
  width: min(980px, 100%);
  margin: 0 auto;
  background: #fff;
  border: 1px solid rgba(184, 137, 61, 0.35);
  box-shadow: 0 22px 48px rgba(74, 59, 36, 0.1);
  overflow: hidden;
}

.banner-sky {
  position: relative;
}

.banner img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.sky-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.nikkah-banner figcaption {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 16px;
  padding: 18px 16px 22px;
  background: linear-gradient(#fff, #f7f1e6);
  text-align: center;
}

.nikkah-banner figcaption .person {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.nikkah-banner figcaption .role {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

.nikkah-banner figcaption strong {
  font-family: var(--font-script);
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 400;
  line-height: 1;
  color: #3c342b;
  white-space: nowrap;
}

.nikkah-banner figcaption .person-title {
  margin: 8px 0 0;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--muted);
  line-height: 1.35;
  max-width: 16em;
}

.nikkah-banner figcaption .couple-amp {
  font-size: 11px;
  line-height: 1;
  align-self: center;
  padding: 0 4px;
}

.mehndi {
  padding: 72px 6vw 64px;
  text-align: center;
  background:
    radial-gradient(circle at 80% 0%, rgba(231, 163, 34, 0.28), transparent 36%),
    linear-gradient(180deg, #f8e7c4, #e7c48a 40%, #c9843a);
  color: var(--mehndi-deep);
}

.eyebrow.light {
  color: #fff6df;
}

.mehndi-title {
  margin-bottom: 28px;
  color: #fffaf0;
  text-shadow: 0 8px 24px rgba(78, 42, 12, 0.25);
}

.mehndi-banner {
  border-color: rgba(78, 42, 12, 0.28);
  box-shadow: 0 24px 48px rgba(78, 42, 12, 0.22);
}

.when {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 16px;
  padding: 56px 6vw;
  align-items: stretch;
}

.when-card,
.timer,
.flow,
.place-card,
.rsvp-person {
  background: #fff;
  border: 1px solid rgba(184, 137, 61, 0.28);
  border-radius: 22px;
  box-shadow: 0 14px 32px rgba(74, 59, 36, 0.06);
}

.when-card {
  grid-row: span 2;
  text-align: center;
  padding: 28px 18px;
}

.when-week,
.when-month {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 22px;
}

.when-day {
  margin: 4px 0;
  font-family: var(--font-display);
  font-size: 84px;
  line-height: 0.9;
  color: var(--gold);
}

.timer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 12px;
  gap: 8px;
}

.timer div {
  text-align: center;
  padding: 16px 4px;
}

.timer strong {
  display: block;
  font-family: var(--font-display);
  font-size: 36px;
  color: #3c342b;
}

.timer span {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.flow {
  margin: 0;
  padding: 8px 22px;
  list-style: none;
}

.flow li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid rgba(184, 137, 61, 0.2);
}

.flow li:last-child {
  border-bottom: 0;
}

.flow strong {
  color: var(--gold);
  letter-spacing: 0.04em;
}

.flow span {
  font-family: var(--font-serif);
  font-size: 28px;
}

.flow small {
  display: block;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 11px;
}

.place {
  padding: 0 6vw 56px;
}

.place-card {
  text-align: center;
  padding: 42px 20px;
  background: linear-gradient(160deg, #3c342b, #231c16);
  color: #f7f1e6;
  border: 0;
}

.place-name {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 400;
  color: var(--gold-soft);
}

.place-address {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.4;
}

.text-btn.light {
  color: var(--gold-soft);
  border-color: var(--gold-soft);
}

.rsvp {
  padding: 20px 6vw 64px;
  text-align: center;
}

.rsvp-lead {
  margin: 8px 0 28px;
  font-family: var(--font-script);
  font-size: clamp(28px, 4vw, 40px);
  color: var(--gold);
}

.rsvp-grid {
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 12px;
  text-align: left;
}

.rsvp-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}

.rsvp-index {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--gold);
}

.rsvp-person h3 {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.rsvp-call {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: #3c342b;
  color: #fff8ee;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.rsvp-quiet {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.event-footer {
  padding: 48px 16px 60px;
  text-align: center;
  background: #3c342b;
  color: var(--gold-soft);
}

.event-footer p {
  margin: 0 0 6px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 11px;
}

.event-footer strong {
  font-family: var(--font-script);
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 400;
}

.reveal,
.reveal-in {
  opacity: 0;
}

.event-page.is-open .reveal-in {
  opacity: 1;
}

@media (max-width: 800px) {
  .opening-bismillah {
    font-size: clamp(20px, 5.6vw, 32px);
    padding: 0 12px;
  }

  .flower-open {
    padding: 11px 22px 9px;
  }

  .bismillah {
    font-size: clamp(22px, 6.2vw, 34px);
  }

  .nikkah,
  .mehndi,
  .when,
  .place,
  .rsvp {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nikkah {
    padding-top: 40px;
  }

  .mehndi {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .nikkah-title,
  .mehndi-title,
  .rsvp-title {
    font-size: clamp(40px, 12vw, 68px);
  }

  .when {
    grid-template-columns: 1fr;
  }

  .when-card {
    grid-row: auto;
  }

  .timer {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .flow li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (max-width: 640px) {
  .nikkah-banner figcaption {
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 20px 14px 24px;
  }

  .nikkah-banner figcaption .role {
    display: none;
  }

  .nikkah-banner figcaption strong {
    font-size: clamp(30px, 9vw, 42px);
  }

  .nikkah-banner figcaption .person-title {
    max-width: 18em;
    margin-top: 6px;
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.4;
  }

  .nikkah-banner figcaption .couple-amp {
    margin: 4px 0 10px;
    font-size: 11px;
  }
}

@media (max-width: 420px) {
  .flower-open {
    font-size: 11px;
    padding: 10px 18px 8px;
  }

  .rsvp-person {
    gap: 8px;
    padding: 10px 10px;
  }

  .rsvp-person h3 {
    font-size: 12.5px;
  }

  .rsvp-call,
  .rsvp-quiet {
    font-size: 11px;
  }

  .rsvp-call {
    padding: 6px 8px;
  }
}

@media (max-height: 700px) and (orientation: landscape) {
  .flower-open {
    bottom: max(12px, env(safe-area-inset-bottom));
    padding: 8px 18px 7px;
  }

  .opening-bismillah {
    font-size: clamp(18px, 4vw, 26px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-in {
    opacity: 1;
  }

  .flower-open {
    animation: none;
  }
}
