/* =====================================================================
   EXTRA SECTIONS — verse, photo bands, gentle customs, moments, RSVP form,
   blessing cards, hosts & contact. Everything reads the theme variables, so
   each skin gets its own colours; the theme blocks further down change shape.
   ===================================================================== */

/* ---------- Qur'an verse ---------- */
.x-sec--verse .x-wrap { max-width: 780px; }
.x-verse {
  position: relative;
  text-align: center;
  padding: clamp(40px, 8vw, 70px) clamp(22px, 6vw, 58px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--card-r);
  box-shadow: var(--shadow);
}
.x-verse__star {
  display: block;
  width: 34px;
  height: 34px;
  margin: 0 auto 18px;
  background: var(--gold);
  -webkit-mask: var(--glyph) center / contain no-repeat;
  mask: var(--glyph) center / contain no-repeat;
}
.x-verse__ar {
  margin: 0 0 18px;
  font-family: var(--font-arabic);
  font-size: clamp(1.5rem, 5.4vw, 2.3rem);
  line-height: 2;
  color: var(--accent);
}
.x-verse__en {
  max-width: 30em;
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3.6vw, 1.4rem);
  font-style: italic;
  line-height: 1.7;
  color: var(--ink-2);
}
.x-verse__ref {
  margin: 20px 0 0;
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- full-width photo bands ---------- */
.x-band {
  position: relative;
  margin: 0;
  height: clamp(240px, 52vw, 460px);
  overflow: hidden;
  background: var(--c-bg, #222);
}
.x-band img { display: block; width: 100%; height: 100%; object-fit: cover; }
.x-band__veil {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px clamp(24px, 5vw, 46px);
  text-align: center;
  color: #fff;
  background: linear-gradient(to top, rgba(12, 5, 7, .74), rgba(12, 5, 7, .12) 62%, transparent);
}
.x-band__q {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 4.6vw, 2rem);
  font-style: italic;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .45);
}
.x-band__s {
  margin: 8px 0 0;
  font-family: var(--font-body);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold-l, #e3c989);
}
.x-band__s:empty { display: none; }

/* ---------- section intro line ---------- */
.x-intro {
  max-width: 34em;
  margin: 0 auto clamp(26px, 5vw, 40px);
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.08rem, 3.4vw, 1.28rem);
  line-height: 1.7;
  color: var(--ink-2);
}
.x-intro:empty { display: none; }

/* ---------- gentle customs ---------- */
.x-etq {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(12px, 2.4vw, 22px);
  max-width: 1000px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  counter-reset: etq;
}
.x-etq__item {
  counter-increment: etq;
  position: relative;
  padding: 28px 22px 26px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--card-r);
  box-shadow: var(--shadow);
}
.x-etq__ic {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--accent);
}
.x-etq__ic svg { width: 26px; height: 26px; }
.x-etq__item h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 600;
  color: var(--ink);
}
.x-etq__item p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.06rem;
  line-height: 1.65;
  color: var(--ink-2);
}

/* ---------- RSVP form ---------- */
.x-sec--rsvp .x-rsvp { margin-top: 0; }
.x-rsvpf {
  display: grid;
  gap: 18px;
  max-width: 640px;
  margin: clamp(24px, 5vw, 38px) auto 0;
  padding: clamp(24px, 5vw, 40px);
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--card-r);
  box-shadow: var(--shadow);
}
.x-field { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.x-field label,
.x-field legend {
  padding: 0;
  font-family: var(--font-body);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
}
.x-field input[type="text"],
.x-field input[type="tel"],
.x-field input[type="email"],
.x-field select,
.x-field textarea {
  width: 100%;
  padding: 13px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  border: 1px solid var(--line);
  border-radius: min(var(--card-r), 12px);
  transition: border-color .25s, box-shadow .25s;
}
.x-field textarea { resize: vertical; min-height: 92px; }
.x-field input::placeholder,
.x-field textarea::placeholder { color: color-mix(in srgb, var(--ink) 45%, transparent); }
.x-field input:focus,
.x-field select:focus,
.x-field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 28%, transparent);
}
.x-field select option { color: #1b1013; background: #fff; }
.x-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .x-two { grid-template-columns: 1fr; } }
.x-choice { grid-template-columns: 1fr 1fr; gap: 10px; }
.x-choice legend { grid-column: 1 / -1; margin-bottom: 2px; }
.x-chip { position: relative; display: block; cursor: pointer; letter-spacing: 0; text-transform: none; }
.x-chip input { position: absolute; opacity: 0; inset: 0; }
.x-chip span {
  display: grid;
  place-items: center;
  min-height: 50px;
  padding: 8px 10px;
  text-align: center;
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: min(var(--card-r), 14px);
  transition: background .25s, color .25s, border-color .25s;
}
.x-chip input:checked + span {
  background: var(--btn-bg, var(--accent));
  border-color: var(--btn-bg, var(--accent));
  color: var(--btn-on, #fff);
}
.x-chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.x-trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.x-rsvpf__error { min-height: 1.2em; margin: 0; font-size: .92rem; color: #ff8d8d; }
.x-rsvpf__submit { justify-self: center; min-width: 220px; }
.x-rsvpf.is-done { justify-items: center; text-align: center; padding-block: clamp(36px, 7vw, 56px); }
.x-rsvpf.is-done h3 { margin: 0; font-family: var(--font-display); font-size: 1.7rem; color: var(--ink); }
.x-rsvpf.is-done p { margin: 0; max-width: 28em; font-family: var(--font-display); font-size: 1.12rem; color: var(--ink-2); }
.x-rsvpf__tick {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--accent);
}
.x-rsvpf__tick svg { width: 30px; height: 30px; stroke-width: 2.4; }

/* ---------- blessing cards ---------- */
.x-giftcards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(12px, 2.4vw, 22px);
  max-width: 900px;
  margin: clamp(26px, 5vw, 40px) auto 0;
}
.x-gift {
  padding: 28px 18px 24px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--card-r);
  box-shadow: var(--shadow);
}
.x-gift__ic {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--accent);
}
.x-gift__ic svg { width: 26px; height: 26px; }
.x-gift h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  color: var(--ink);
}
.x-gift p { margin: 0; font-family: var(--font-display); font-size: 1.04rem; line-height: 1.6; color: var(--ink-2); }

/* ---------- hosts & contact ---------- */
.x-contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(14px, 3vw, 26px);
  max-width: 820px;
  margin: 0 auto;
}
.x-contact {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
  padding: clamp(28px, 5vw, 40px) 24px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--card-r);
  box-shadow: var(--shadow);
}
.x-contact__label {
  font-family: var(--font-body);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
}
.x-contact__person {
  margin: 0;
  font-family: var(--x-num-font, var(--font-display));
  font-size: 1.9rem;
  font-weight: 500;
  color: var(--ink);
}
.x-contact__sub { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.08rem; line-height: 1.55; color: var(--ink-2); }
.x-contact__phone { min-width: 190px; }

/* ---- Malligai: editorial, strips, large numerals ---- */
.x-verse {
  text-align: left;
  border: 0;
  border-left: 5px solid var(--accent);
  background: transparent;
  box-shadow: none;
  padding-left: clamp(24px, 6vw, 56px);
}
.x-verse::before {
  content: "\201C";
  position: absolute;
  top: -.18em;
  left: clamp(18px, 5vw, 42px);
  font-family: var(--font-display);
  font-size: clamp(5rem, 16vw, 9rem);
  line-height: 1;
  color: color-mix(in srgb, var(--accent) 35%, transparent);
  pointer-events: none;
}
.x-verse__star { margin-left: 0; }
.x-verse__ar { text-align: right; }
.x-verse__en { margin-left: 0; }

.x-band__veil { align-items: flex-start; text-align: left; padding-left: clamp(20px, 6vw, 72px); }
.x-band__q { font-style: normal; font-size: clamp(1.4rem, 5vw, 2.4rem); max-width: 14em; }

.x-etq { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 clamp(20px, 5vw, 56px); }
.x-etq__item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "n t" "n p";
  column-gap: 20px;
  text-align: left;
  padding: 24px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}
.x-etq__item::before {
  content: counter(etq, decimal-leading-zero);
  grid-area: n;
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 1;
  color: color-mix(in srgb, var(--accent) 55%, var(--ink));
}
.x-etq__ic { display: none; }
.x-etq__item h3 { grid-area: t; }
.x-etq__item p { grid-area: p; }

/* gallery: sideways strip of arched windows */
.x-gal--collage {
  display: flex;
  gap: clamp(12px, 2.4vw, 22px);
  max-width: none;
  padding: 0 clamp(16px, 5vw, 56px) 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.x-gal--collage figure {
  flex: 0 0 min(300px, 74vw);
  grid-column: auto !important;
  margin-top: 0 !important;
  aspect-ratio: 3 / 4.2 !important;
  border-radius: 160px 160px 2px 2px;
  scroll-snap-align: center;
}
.x-gal--collage figure:nth-child(even) { margin-top: 28px !important; }

.x-rsvpf { border-radius: 2px; border-width: 0 0 0 5px; border-left-color: var(--accent); }
.x-chip span { border-radius: 0; }
.x-rsvpf__submit { border-radius: 0; }

.x-giftcards { gap: 0; }
.x-gift {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "i t" "i p";
  column-gap: 16px;
  align-items: center;
  text-align: left;
  border-radius: 0;
  box-shadow: none;
}
.x-gift__ic { grid-area: i; margin: 0; }
.x-gift h3 { grid-area: t; align-self: end; }
.x-gift p { grid-area: p; align-self: start; }

.x-contact { text-align: left; justify-items: start; border-style: dashed; }
.x-contact__phone { border-radius: 0; }

.x-gal--collage { scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }

/* =====================================================================
   VENUE PHOTO — sits inside the venue card, above the name
   ===================================================================== */
.x-venue .x-venue-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 0 auto 28px;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  rotate: none;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: var(--b-bg, #222);
}
.x-venue .x-venue-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s cubic-bezier(.2,.8,.2,1); }
.x-venue:hover .x-venue-photo img { transform: scale(1.04); }
.x-venue .x-venue-photo::before { content: none; }

.x-venue .x-venue-photo {
  margin: 0;
  aspect-ratio: 4 / 5;
  border-radius: 2px;
  box-shadow: 0 18px 38px color-mix(in srgb, var(--plum) 25%, transparent);
}
.x-venue .x-venue-photo::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, .55);
  pointer-events: none;
}
@media (max-width: 819px) {
  .x-venue .x-venue-photo { aspect-ratio: 16 / 10; margin-bottom: 24px; }
}

/* =====================================================================
   WEDDING EVENTS — one card per celebration
   ===================================================================== */
.x-events {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: clamp(16px, 2.6vw, 28px);
  max-width: 1040px;
  margin: 0 auto;
}
.x-event {
  position: relative;
  padding: 0 22px 30px;
  overflow: hidden;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--card-r, 8px);
  box-shadow: var(--shadow);
  transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s;
}
.x-event::before {
  content: "";
  display: block;
  height: 10px;
  margin: 0 -22px 28px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 24px, var(--gold) 24px 48px);
}
.x-event:hover { transform: translateY(-5px); box-shadow: 0 26px 44px color-mix(in srgb, var(--accent) 20%, transparent); }
.x-event.is-main { border-color: var(--gold); box-shadow: 0 22px 44px color-mix(in srgb, var(--accent) 22%, transparent); }
.x-event__badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: 0 auto 14px;
  color: var(--accent);
}
.x-event__badge::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--gold);
  background: color-mix(in srgb, var(--champagne) 22%, transparent);
  transform: rotate(45deg);
}
.x-event__badge svg { position: relative; width: 34px; height: 34px; }
.x-event__ar {
  margin: 0;
  font-family: var(--font-arabic);
  font-size: 1.5rem;
  line-height: 1.5;
  color: var(--accent);
}
.x-event__name {
  margin: 2px 0 0;
  font-family: var(--x-num-font, var(--font-display));
  font-size: clamp(1.5rem, 4.6vw, 1.9rem);
  font-weight: 400;
  color: var(--ink);
}
.x-event__sub {
  margin: 4px 0 0;
  font-family: var(--font-body);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.x-event__line { display: block; width: 1px; height: 26px; margin: 16px auto; background: var(--gold); }
.x-event__date { margin: 0; font-family: var(--font-body); font-size: .92rem; color: var(--ink); }
.x-event__time {
  margin: 6px 0 0;
  font-family: var(--x-num-font, var(--font-display));
  font-size: 1.5rem;
  color: var(--accent);
}
.x-event__place { margin: 12px 0 0; font-family: var(--font-display); font-size: 1.08rem; line-height: 1.6; color: var(--ink-2); }
.x-event__map {
  display: inline-block;
  margin-top: 18px;
  padding: 9px 18px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  transition: background .3s, color .3s;
}
.x-event__map:hover { background: var(--accent); color: #fff; }

/* ---- opening: a "click to open" hint, laptop / desktop only (hidden on touch phones) ---- */
@media (hover: hover) and (pointer: fine) and (min-width: 820px) {
  .opening-label {
    display: inline-block;
    padding: 10px 20px 10px 22px;
    border-radius: 999px;
    background: rgba(18, 8, 10, .42);
    border: 1px solid rgba(255, 255, 255, .28);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .28em;
    text-transform: uppercase;
    animation: x-open-hint 2.4s ease-in-out infinite;
  }
  .opening-label::before { content: "Click to open"; }
  @keyframes x-open-hint {
    0%, 100% { opacity: .75; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-3px); }
  }
}

/* =====================================================================
   MOTION & SMOOTHNESS
   ===================================================================== */
html { scroll-behavior: smooth; }
body { animation: x-page-in .9s ease both; }
@keyframes x-page-in { from { opacity: 0; } to { opacity: 1; } }

/* thin read-progress bar */
.x-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 400;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent, #b0344f), var(--gold, #c9a040));
  transform-origin: 0 50%;
  transform: scaleX(var(--prog, 0));
  pointer-events: none;
}

/* reveal: a soft blur-up on top of the existing fade/rise */
.rv {
  filter: blur(7px);
  transition:
    opacity 1s cubic-bezier(.2,.75,.25,1) calc(var(--i, 0) * 90ms),
    transform 1s cubic-bezier(.2,.75,.25,1) calc(var(--i, 0) * 90ms),
    filter .9s ease calc(var(--i, 0) * 90ms);
}
.rv:not(.is-in) { will-change: opacity, transform; }
.rv.is-in { filter: none; }

/* heading rules draw outwards */
.x-head.rv .x-rule,
.x-head.rv::after {
  opacity: 0;
  transform: scaleX(.15);
  transition: transform 1s cubic-bezier(.2,.75,.25,1) .35s, opacity .8s ease .35s;
}
.x-head.rv.is-in .x-rule,
.x-head.rv.is-in::after { opacity: 1; transform: scaleX(1); }

/* cards: gentle lift + icon nudge */
.x-event, .x-contact, .x-gift, .x-etq__item, .x-giftcards .x-gift {
  transition: transform .55s cubic-bezier(.2,.8,.2,1), box-shadow .55s ease, border-color .4s ease;
}
.x-contact:hover, .x-gift:hover { transform: translateY(-6px); }
.x-event__badge svg, .x-gift__ic svg {
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.x-event:hover .x-event__badge svg,
.x-gift:hover .x-gift__ic svg { transform: scale(1.14) rotate(-6deg); }

/* buttons: press feedback */
.x-btn { transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, background .3s, color .3s; }
.x-btn:active { transform: translateY(0) scale(.97); }

/* quiet ambient motion */
.x-garland img { animation: x-float 8s ease-in-out infinite; }
@keyframes x-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
.x-verse__star { animation: x-spin 48s linear infinite; }
@keyframes x-spin { to { transform: rotate(360deg); } }
.x-venue-photo img { transform: scale(1.06); transition: transform 2s cubic-bezier(.2,.8,.2,1); }
.x-venue.is-in .x-venue-photo img,
.x-venue.rv.is-in .x-venue-photo img { transform: scale(1); }

/* countdown: numbers pop on every tick */
.x-pop { animation: x-pop .5s cubic-bezier(.2,.9,.3,1.4); }
@keyframes x-pop {
  0% { transform: translateY(8px) scale(.9); opacity: .4; }
  100% { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body, .x-garland img, .x-verse__star, .x-pop { animation: none; }
  .rv { filter: none; }
}
