/* =========================================================
   Wedding invitation · Egyptian heritage theme
   Deep Nile teal, ivory papyrus, and gold leaf
   ========================================================= */

:root {
  --ink: #0f2b2d;
  --ink-2: #16393b;
  --ink-3: #081a1b;
  --gold: #c9a24a;
  --gold-light: #ecd592;
  --gold-dark: #8e6b22;
  --ivory: #f7f0e1;
  --sand: #efe3c8;
  --text: #2a2420;
  --muted: #7a6a55;
  --on-dark: #e9dfc9;
  --line: #dccaa3;

  --font-body: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-script: "Aref Ruqaa", "Amiri", "Traditional Arabic", serif;
  --font-classic: "Amiri", "Traditional Arabic", "Times New Roman", serif;
  --font-kufi: "Reem Kufi", "Tajawal", "Segoe UI", sans-serif;

  --gold-gradient: linear-gradient(135deg, #8e6b22 0%, #d4b062 28%, #f6e6ae 45%, #c9a24a 60%, #8e6b22 100%);
  /* Pointed (two-centre) Islamic arch */
  --arch: polygon(0% 100%, 0% 40.55%, 0.3% 36.5%, 1.19% 32.48%, 2.68% 28.54%, 4.73% 24.72%, 7.34% 21.05%, 10.47% 17.57%, 14.1% 14.31%, 18.2% 11.3%, 22.72% 8.57%, 27.61% 6.16%, 32.84% 4.07%, 38.35% 2.34%, 44.09% 0.98%, 50% 0%, 55.91% 0.98%, 61.65% 2.34%, 67.16% 4.07%, 72.39% 6.16%, 77.28% 8.57%, 81.8% 11.3%, 85.9% 14.31%, 89.53% 17.57%, 92.66% 21.05%, 95.27% 24.72%, 97.32% 28.54%, 98.81% 32.48%, 99.7% 36.5%, 100% 40.55%, 100% 100%);
  --ease-out: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.locked { overflow: hidden; height: 100svh; }
img { max-width: 100%; display: block; }

/* Reem Kufi ships a very narrow space glyph */
.section-title { word-spacing: .22em; }
button { font: inherit; color: inherit; }
a { color: inherit; }
svg { stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.gold-text {
  background: var(--gold-gradient);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: .12em .18em;          /* calligraphy overflows its box; keep it inside the clip */
}
.names .gold-text { animation: shimmer 8s linear infinite; }   /* animate only the hero names */
/* deeper gold on the light ivory sections so the letters never fade into the paper */
.section-ivory .gold-text {
  background-image: linear-gradient(135deg, #6f5117 0%, #a8822f 30%, #d4b25e 47%, #a8822f 64%, #6f5117 100%);
}
@keyframes shimmer { to { background-position: 220% center; } }

/* =========================================================
   INTRO · Mashrabiya gate
   ========================================================= */
.intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 42%, #1f4d4f 0%, var(--ink) 52%, var(--ink-3) 100%);
  transition: opacity 1s ease, transform 1.2s var(--ease-out), visibility 0s 1.2s;
}
.intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/pattern.svg") center / 84px;
  opacity: .1;
  -webkit-mask-image: radial-gradient(circle at 50% 45%, transparent 18%, #000 75%);
  mask-image: radial-gradient(circle at 50% 45%, transparent 18%, #000 75%);
}
.sparkles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.intro-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 2.2vh, 20px);
  padding: 24px 16px;
  text-align: center;
}
.intro-bismillah, .intro-names, .btn-open { transition: opacity .5s ease, transform .6s var(--ease-out); }
.intro-bismillah { margin: 0; font-family: var(--font-classic); font-size: clamp(1.05rem, 4vw, 1.35rem); color: var(--gold-light); }
.intro-names { margin: 0; font-family: var(--font-script); font-size: clamp(1.9rem, 8vw, 2.8rem); color: var(--gold-light); line-height: 1.3; }
.intro-names span { color: var(--gold); font-size: .7em; margin: 0 .2em; }

.gate {
  position: relative;
  width: min(60vw, 280px, 38svh);
  aspect-ratio: 2 / 3;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.gate:focus-visible { outline: 2px dashed var(--gold); outline-offset: 12px; }
.gate-glow {
  position: absolute;
  inset: -30% -40%;
  background: radial-gradient(ellipse at center, rgba(236, 213, 146, .32), transparent 62%);
  animation: glow 3.5s ease-in-out infinite;
  transition: opacity 1s ease;
}
@keyframes glow { 50% { opacity: .55; transform: scale(.94); } }

.gate-frame {
  position: absolute;
  inset: 0;
  clip-path: var(--arch);
  background: var(--gold-gradient);
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .45));
}
.gate-doors {
  position: absolute;
  inset: 6px;
  display: flex;
  clip-path: var(--arch);
  /* the warm light waiting behind the doors */
  background: radial-gradient(ellipse at 50% 60%, #fffbe9 0%, #f6e3a8 40%, #d4a94e 100%);
}
.door {
  position: relative;
  width: 50%;
  height: 100%;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .25), transparent 18%, transparent 82%, rgba(0, 0, 0, .25)),
    linear-gradient(180deg, #1b4547, #102e30);
  transition: transform 1.6s cubic-bezier(.6, .05, .25, 1) .25s;
  will-change: transform;
}
.door-right { transform-origin: right center; border-left: 1px solid rgba(201, 162, 74, .7); }
.door-left  { transform-origin: left center;  border-right: 1px solid rgba(201, 162, 74, .7); }
/* the couple waiting behind the doors */
.gate-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
  transform: scale(1.12);
  transition: transform 3s var(--ease-out);
}
.intro.opening .gate-photo { transform: scale(1); }
.door-panel {
  position: absolute;
  inset: 44% 16% 8%;
  border: 1.5px solid rgba(201, 162, 74, .75);
  border-radius: 3px;
  background: url("../img/pattern.svg") center / 30px;
  opacity: .9;
}
.door-panel::before {
  content: "";
  position: absolute;
  left: 8%; right: 8%;
  bottom: calc(100% + 10%);
  height: 60%;
  border: 1.5px solid rgba(201, 162, 74, .55);
  border-radius: 50% 50% 3px 3px / 70% 70% 3px 3px;
}

.seal {
  position: absolute;
  top: 60%;
  left: 50%;
  width: 34%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 30%, #f8e7ad 0%, #d6b25e 40%, #9a7427 85%);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45), inset 0 -4px 10px rgba(0, 0, 0, .25), inset 0 3px 6px rgba(255, 255, 255, .5);
  transition: transform .7s var(--ease-out), opacity .5s ease;
  z-index: 2;
  container-type: inline-size;   /* lets the letters scale with the seal */
}
.seal::before {
  content: "";
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  border: 1.2px solid rgba(90, 60, 12, .45);
}
/* engraved monogram: ع | س */
.seal-mono {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .2em;
  font-family: var(--font-classic);
  font-weight: 700;
  padding-inline-start: 7cqw;     /* the tail of ع sweeps outward; nudge the pair back to optical centre */
  font-size: clamp(1.5rem, 6.8vw, 2rem);
  font-size: 32cqw;
  line-height: 1;
  color: #5b3e0e;
  text-shadow: 0 1px 0 rgba(255, 244, 210, .7), 0 -1px 0 rgba(70, 45, 5, .25);
}
.seal-mono span { transform: translateY(-.1em); }
.seal-mono i {
  width: 1.3px;
  height: 1.05em;
  background: linear-gradient(transparent, rgba(91, 62, 14, .65) 25%, rgba(91, 62, 14, .65) 75%, transparent);
}

.btn-open {
  position: relative;
  overflow: hidden;
  padding: 15px 34px;
  border: 0;
  border-radius: 999px;
  background: var(--gold-gradient);
  background-size: 200% auto;
  color: #22180a;
  font-weight: 700;
  font-size: 1.08rem;
  cursor: pointer;
  box-shadow: 0 10px 30px -8px rgba(201, 162, 74, .6);
  animation: breathe 2.6s ease-in-out infinite;
}
.btn-open::after {                       /* light sweep */
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 40%;
  left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .65), transparent);
  animation: sweep 3s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.04); box-shadow: 0 14px 40px -6px rgba(201, 162, 74, .75); } }
@keyframes sweep { 60%, 100% { left: 130%; } }

/* opening sequence */
.intro.opening .seal { transform: translate(-50%, -50%) scale(.2) rotate(-40deg); opacity: 0; }
.intro.opening .door-right { transform: perspective(900px) rotateY(112deg); }
.intro.opening .door-left  { transform: perspective(900px) rotateY(-112deg); }
.intro.opening .gate-glow { opacity: 1; animation: none; transform: scale(1.5); transition: transform 2s ease; }
.intro.opening .intro-bismillah,
.intro.opening .intro-names,
.intro.opening .btn-open { opacity: 0; transform: translateY(12px); }
.intro.open { opacity: 0; transform: scale(1.6); visibility: hidden; pointer-events: none; }

/* =========================================================
   MUSIC BUTTON
   ========================================================= */
.music-btn {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: rgba(15, 43, 45, .92);
  color: var(--gold-light);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
  animation: fadeIn .6s ease both;
}
.music-btn svg { width: 22px; height: 22px; }
.music-btn .icon-off { display: none; }
.music-btn.muted .icon-on { display: none; }
.music-btn.muted .icon-off { display: block; }
.music-btn:not(.muted)::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  animation: ring 2s ease-out infinite;
}
@keyframes ring { to { transform: scale(1.6); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } }

/* =========================================================
   SECTIONS
   ========================================================= */
section, .footer {
  position: relative;
  padding: clamp(60px, 9vw, 100px) 20px;
  text-align: center;
  overflow: hidden;
}
section > *, .footer > * { position: relative; z-index: 1; }

.section-ivory { background: var(--ivory); }
.section-ivory.alt { background: linear-gradient(180deg, var(--ivory), var(--sand) 18%, var(--sand) 82%, var(--ivory)); }
.section-ivory::before,
.section-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/pattern.svg") center / 84px;
  opacity: .06;
  pointer-events: none;
}
.section-dark {
  background: radial-gradient(ellipse at 50% 0%, #1b4547 0%, var(--ink) 55%, var(--ink-3) 100%);
  color: var(--on-dark);
}
.section-dark::before { opacity: .08; }

.section-title {
  margin: 0 0 clamp(28px, 5vw, 44px);
  font-family: var(--font-kufi);
  font-weight: 600;
  font-size: clamp(1.7rem, 5.5vw, 2.4rem);
  color: var(--ink);
  line-height: 1.4;
}
.section-title span { display: inline-flex; align-items: center; gap: 16px; }
.section-title span::before,
.section-title span::after {
  content: "";
  width: clamp(28px, 8vw, 60px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.section-title span::after { transform: scaleX(-1); }
.section-title.light { color: var(--gold-light); }

.ornament { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--gold); }
.ornament i { width: clamp(50px, 16vw, 110px); height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament i:last-child { transform: scaleX(-1); }
.ornament b { font-weight: 400; font-size: 1.1rem; }

/* ---------------- hero */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  /* sized from the screen height so the scroll hint is always visible without scrolling */
  padding-block: clamp(36px, 7svh, 76px) clamp(68px, 11svh, 112px);
}
.corner {
  position: absolute;
  top: 18px;
  width: clamp(56px, 14vw, 120px);
  aspect-ratio: 1;
  border-top: 1.5px solid var(--gold);
  pointer-events: none;
}
.corner::after {
  content: "";
  position: absolute;
  top: 8px;
  width: 60%;
  aspect-ratio: 1;
  border-top: 1px solid var(--gold);
}
.corner-tr { right: 18px; border-right: 1.5px solid var(--gold); border-top-right-radius: 4px; }
.corner-tr::after { right: 8px; border-right: 1px solid var(--gold); }
.corner-tl { left: 18px; border-left: 1.5px solid var(--gold); border-top-left-radius: 4px; }
.corner-tl::after { left: 8px; border-left: 1px solid var(--gold); }

.bismillah { margin: 0 0 clamp(8px, 2svh, 20px); font-family: var(--font-classic); font-size: clamp(1.05rem, 3.6vw, 1.35rem); color: var(--gold-dark); }

.arch-frame {
  height: min(48svh, 460px);
  aspect-ratio: 5 / 8;
  width: auto;
  max-width: 66vw;
  min-height: 0;
  padding: 4px;
  clip-path: var(--arch);
  background: var(--gold-gradient);
  margin-bottom: clamp(10px, 2.2svh, 24px);
}
.arch-inner {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 7px;
  clip-path: var(--arch);
  background: var(--ivory);
}
.arch-img, .arch-monogram {
  width: 100%;
  height: 100%;
  clip-path: var(--arch);
  object-fit: cover;
}
/* absolutely placed so a tall photo can't stretch the arch; crop keeps faces high in the arch */
.arch-img { position: absolute; inset: 7px; width: calc(100% - 14px); height: calc(100% - 14px); object-position: 50% 26%; }
.arch-monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .1em;
  padding-top: 20%;
  background: url("../img/pattern.svg") center / 40px, radial-gradient(ellipse at 50% 70%, var(--ink-2), var(--ink-3));
  font-family: var(--font-script);
  font-size: clamp(3rem, 14vw, 4.6rem);
  color: var(--gold-light);
}
.arch-monogram i { font-style: normal; font-size: .5em; color: var(--gold); }

.eyebrow { margin: 0; font-weight: 500; font-size: clamp(.95rem, 2.8vw, 1.1rem); color: var(--muted); }
.names {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: .25em;
  font-family: var(--font-script);
  font-weight: 700;
  font-size: clamp(2.4rem, 10.5vw, 4.6rem);
  line-height: 1.2;
}
.names-and {
  display: inline-grid;
  place-items: center;
  width: 1.5em;
  height: 1.5em;
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-size: .38em;
  font-weight: 400;
  color: var(--gold-dark);
}
.hero-date { margin: clamp(4px, 1svh, 12px) 0 0; font-weight: 700; font-size: clamp(1rem, 3.3vw, 1.2rem); color: var(--ink); }

.scroll-hint {
  position: absolute;
  bottom: clamp(14px, 3.5svh, 34px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: .8rem;
  color: var(--muted);
  text-decoration: none;
  animation: bob 2.2s ease-in-out infinite;
}
.scroll-hint svg { width: 22px; height: 22px; color: var(--gold); }
@keyframes bob { 50% { transform: translate(-50%, 7px); } }

/* ---------------- verse */
.verse { padding-block: clamp(64px, 10vw, 110px); }
.verse-text {
  max-width: 760px;
  margin: 26px auto 10px;
  font-family: var(--font-classic);
  font-weight: 700;
  font-size: clamp(1.4rem, 4.8vw, 2.1rem);
  line-height: 2.1;
  color: var(--gold-light);
}
.verse-ref { margin: 0 0 26px; font-size: .95rem; color: rgba(233, 223, 201, .65); }

/* ---------------- invitation text */
.family { margin: 0 auto 14px; max-width: 36ch; font-family: var(--font-classic); font-size: clamp(1.15rem, 3.8vw, 1.35rem); color: var(--muted); }
.invite-text {
  max-width: 34ch;
  margin: 0 auto 40px;
  font-family: var(--font-classic);
  font-size: clamp(1.3rem, 4.4vw, 1.7rem);
  line-height: 2;
  color: var(--text);
}
.couple-full {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(12px, 4vw, 40px);
  max-width: 620px;
  margin: 0 auto;
}
.couple-full .role { display: block; font-size: .9rem; color: var(--muted); }
.couple-full strong { font-family: var(--font-script); font-size: clamp(1.4rem, 5vw, 2rem); font-weight: 700; color: var(--ink); line-height: 1.5; }
.couple-star { color: var(--gold); font-size: 1.3rem; }

/* ---------------- date */
.date-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 540px;
  margin: 0 auto;
}
.date-side {
  padding: 14px 4px;
  border-block: 1px solid var(--gold);
  font-weight: 700;
  font-size: clamp(1.05rem, 4vw, 1.35rem);
  color: var(--ink);
}
.date-main { display: flex; flex-direction: column; align-items: center; padding: 0 clamp(16px, 5vw, 38px); }
.date-month, .date-year { font-weight: 500; font-size: clamp(1rem, 3.6vw, 1.2rem); color: var(--muted); }
.date-day { font-family: var(--font-classic); font-weight: 700; font-size: clamp(4.6rem, 20vw, 7.4rem); line-height: 1.05; }

.btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-position .5s ease, transform .2s ease, box-shadow .3s ease;
}
.btn svg { width: 20px; height: 20px; }
.btn:active { transform: scale(.97); }
.btn-gold {
  border: 0;
  background: linear-gradient(135deg, #b8913a, #ecd592 50%, #b8913a);
  background-size: 200% auto;
  color: #22180a;
  box-shadow: 0 10px 24px -12px rgba(142, 107, 34, .9);
}
.btn-gold:hover { background-position: right center; }
.btn-outline { border: 1.5px solid var(--gold); background: transparent; color: var(--ink); }
.btn-outline:hover { background: rgba(201, 162, 74, .12); }
.btn-outline.light { color: var(--gold-light); }

/* ---------------- countdown */
.cd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 3vw, 22px);
  max-width: 620px;
  margin: 0 auto;
}
.cd-tile {
  position: relative;
  aspect-ratio: 2 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 18%;
  clip-path: var(--arch);
  background: var(--gold-gradient);
}
.cd-tile::before {
  content: "";
  position: absolute;
  inset: 2px;
  clip-path: var(--arch);
  background: linear-gradient(180deg, #1d4a4c, #0c2224);
}
.cd-num, .cd-label { position: relative; }
.cd-num {
  font-family: var(--font-kufi);
  font-weight: 600;
  font-size: clamp(1.7rem, 7.5vw, 3rem);
  line-height: 1.2;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
}
.cd-num.tick { animation: tick .45s var(--ease-out); }
@keyframes tick { from { transform: translateY(-8px); opacity: .3; } }
.cd-label { font-size: clamp(.8rem, 3vw, 1rem); color: rgba(233, 223, 201, .75); }
.cd-done { font-family: var(--font-script); font-size: clamp(1.8rem, 7vw, 2.6rem); color: var(--gold-light); margin: 0; }

/* ---------------- location */
.venue-icon { width: 42px; height: 42px; color: var(--gold); margin: 0 auto 6px; }
.venue h3 { margin: 0; font-family: var(--font-script); font-size: clamp(2rem, 7vw, 2.8rem); font-weight: 700; color: var(--ink); line-height: 1.4; }
.venue-details { margin: 2px 0 0; font-weight: 700; color: var(--gold-dark); }
.venue-address { margin: 4px 0 0; color: var(--muted); }
.map-frame {
  max-width: 760px;
  margin: 30px auto 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fffdf7;
  box-shadow: 0 20px 40px -24px rgba(15, 43, 45, .35);
}
.map-frame iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 0;
  border-radius: 18px;
  filter: sepia(.22) saturate(.92);
}
.note { margin: 24px 0 0; color: var(--muted); }

/* ---------------- gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 3vw, 24px);
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 36px;
}
.photo {
  position: relative;
  padding: 3px;
  border: 0;
  aspect-ratio: 2 / 3;
  clip-path: var(--arch);
  background: var(--gold-gradient);
  cursor: zoom-in;
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: var(--arch);
  transition: transform .8s var(--ease-out);
}
.photo:hover img { transform: scale(1.06); }
.photo:nth-child(even) { transform: translateY(36px); }
.photo.reveal:nth-child(even) { transform: translateY(70px); }
.photo.reveal.in:nth-child(even) { transform: translateY(36px); }

/* ---------------- RSVP */
.rsvp-intro { margin: -14px auto 30px; color: rgba(233, 223, 201, .85); font-size: 1.05rem; }
.rsvp-intro small { color: var(--gold-light); font-size: .95rem; }
.rsvp-card {
  max-width: 540px;
  margin: 0 auto;
  padding: clamp(26px, 6vw, 40px);
  border-radius: 26px;
  background: var(--ivory);
  color: var(--text);
  text-align: right;
  outline: 1px solid rgba(201, 162, 74, .6);
  outline-offset: -10px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
}
.field { display: block; margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.field > span, .field > legend { display: block; margin-bottom: 8px; padding: 0; font-weight: 700; color: var(--ink); }
.field small { font-weight: 400; color: var(--muted); }
.field input[type="text"], .field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
  color: var(--text);
  font: inherit;
  font-size: 16px;          /* prevents iOS zoom on focus */
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201, 162, 74, .2); }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice label { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
  text-align: center;
  line-height: 1.4;
  transition: all .25s ease;
}
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--gold-light); font-weight: 700; }
.choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(201, 162, 74, .5); }

.stepper { display: inline-flex; align-items: center; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: #fffdf8; }
.stepper button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--sand);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.stepper button:hover { background: var(--gold); color: #fff; }
.stepper output { min-width: 3ch; text-align: center; font-family: var(--font-kufi); font-size: 1.35rem; color: var(--ink); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: #f8e5e1; color: #8a3226; }
.btn-block { width: 100%; font-size: 1.1rem; }
.spinner { display: none; width: 20px; height: 20px; border: 2.5px solid rgba(34, 24, 10, .25); border-top-color: #22180a; border-radius: 50%; animation: spin .8s linear infinite; }
.loading .spinner { display: inline-block; }
.loading .btn-label { opacity: .6; }
button:disabled { cursor: progress; }
@keyframes spin { to { transform: rotate(360deg); } }

.thanks { text-align: center; }
.thanks h3 { margin: 10px 0 4px; font-family: var(--font-script); font-size: 2.2rem; color: var(--ink); line-height: 1.5; }
.thanks p { margin: 0 0 22px; font-size: 1.1rem; color: var(--muted); }
.thanks .btn-outline.light { color: var(--ink); }
.check { width: 76px; height: 76px; margin: 0 auto; color: var(--gold); stroke-width: 2.5; }
.check circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .8s ease forwards; }
.check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .6s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------------- footer */
.footer { padding-block: 80px 110px; }
.footer-line { margin: 22px 0 0; font-family: var(--font-classic); font-size: clamp(1.3rem, 4.5vw, 1.7rem); color: var(--text); }
.footer-names { display: inline-block; margin: 6px 0 0; font-family: var(--font-script); font-weight: 700; font-size: clamp(2.4rem, 10vw, 3.6rem); line-height: 1.4; }
.hashtag { margin: 8px 0 0; font-weight: 700; color: var(--gold-dark); }

/* ---------------- lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(8, 26, 27, .94);
  animation: fadeIn .3s ease;
}
.lightbox img { max-width: min(92vw, 900px); max-height: 86svh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lb-close {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: 16px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: transparent;
  color: var(--gold-light);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------------- scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s ease, transform 1s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (min-width: 760px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .photo:nth-child(even), .photo.reveal.in:nth-child(even) { transform: none; }
  .photo.reveal:nth-child(even) { transform: translateY(28px); }
  .photo:nth-child(3n+2), .photo.reveal.in:nth-child(3n+2) { transform: translateY(44px); }
  .photo.reveal:nth-child(3n+2) { transform: translateY(80px); }
}
@media (max-width: 400px) {
  .choice { grid-template-columns: 1fr; }
  .couple-full { grid-template-columns: 1fr; gap: 10px; }
  .btn-row .btn { width: 100%; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .gate { width: min(30vw, 150px, 46svh); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .reveal, .photo.reveal { opacity: 1; transform: none !important; transition: none; }
  .door { transition: opacity .6s ease; }
  .intro.opening .door-right, .intro.opening .door-left { transform: none; opacity: 0; }
  html { scroll-behavior: auto; }
}
