:root {
  --wib-primary: #35584e;
  --wib-secondary: #dda093;
  --wib-background: #eff8f5;
  --wib-font-ar: "Aref Ruqaa", serif;
  --wib-font-en: "Cormorant Garamond", serif;
  --wib-content-width: 820px;
  --wib-hero-logo-width: 72%;
  --wib-detail-logo-width: 58%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.wib-page {
  margin: 0;
  color: var(--wib-primary);
  background: var(--wib-background);
  font-family: var(--wib-font-ar);
  overflow-x: hidden;
}
.wib-page button, .wib-page a { font: inherit; }
.wib-site { min-height: 100vh; }

.wib-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--wib-background);
  background-position: center;
  background-size: cover;
}
.wib-hero::before {
  content: "";
  position: absolute;
  inset: 7% 12%;
  z-index: -1;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--wib-background) 94%, white) 0 48%, transparent 80%);
  filter: blur(8px);
}
.wib-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(circle at 18% 76%, color-mix(in srgb, var(--wib-primary) 11%, transparent), transparent 31%), radial-gradient(circle at 77% 24%, rgba(255,255,255,.32), transparent 33%);
  animation: wib-watercolor 8s ease-in-out infinite alternate;
}
.wib-hero-content {
  position: relative;
  z-index: 2;
  width: min(var(--wib-content-width), 88vw);
  padding: 6rem 1rem 4rem;
  text-align: center;
  animation: wib-reveal 1.25s cubic-bezier(.21,.7,.3,1) both;
}
.wib-leaf {
  position: absolute;
  z-index: 0;
  width: min(620px, 48vw);
  aspect-ratio: 768 / 465;
  background: url("../images/leaf-corner.png") center/contain no-repeat;
  opacity: .76;
  pointer-events: none;
}
.wib-leaf-top { top: -3%; left: -2%; }
.wib-leaf-bottom { right: -3%; bottom: -3%; transform: rotate(180deg); }
.wib-flower {
  position: absolute;
  z-index: 1;
  width: 96px;
  height: 96px;
  pointer-events: none;
  background-image: url("../images/botanical-frame.png");
  background-repeat: no-repeat;
  background-size: 1908px 1069px;
  background-position: var(--wib-crop-x) var(--wib-crop-y);
  -webkit-mask-image: radial-gradient(circle, #000 34%, rgba(0,0,0,.9) 53%, transparent 72%);
  mask-image: radial-gradient(circle, #000 34%, rgba(0,0,0,.9) 53%, transparent 72%);
  filter: saturate(1.08);
  transform-origin: 50% 62%;
  animation: wib-flower-drift var(--wib-speed, 7s) ease-in-out var(--wib-delay, 0s) infinite alternate;
  will-change: transform;
}
.wib-flower-one { top: 7%; left: 21%; --wib-crop-x: -405px; --wib-crop-y: -70px; --wib-speed: 6.8s; }
.wib-flower-two { top: 23%; right: 16%; --wib-crop-x: -1485px; --wib-crop-y: -235px; --wib-speed: 8.2s; --wib-delay: -2.4s; }
.wib-flower-three { bottom: 20%; left: 8%; --wib-crop-x: -176px; --wib-crop-y: -730px; --wib-speed: 7.4s; --wib-delay: -4.1s; }
.wib-flower-four { bottom: 19%; right: 12%; --wib-crop-x: -1540px; --wib-crop-y: -697px; --wib-speed: 6.4s; --wib-delay: -1.2s; }
.wib-flower-five { bottom: -1%; left: 38%; --wib-crop-x: -738px; --wib-crop-y: -925px; --wib-speed: 8.8s; --wib-delay: -5.5s; }
.wib-eyebrow {
  margin: 0 0 1.4rem;
  font-family: var(--wib-font-en);
  font-size: clamp(.78rem, 1.1vw, 1rem);
  letter-spacing: .28em;
  text-transform: uppercase;
}
.wib-headline {
  margin: 0;
  font-family: var(--wib-font-en);
  font-size: clamp(2.1rem, 5.4vw, 5rem);
  font-weight: 400;
  letter-spacing: .04em;
  direction: ltr;
}
.wib-hero-logo {
  display: block;
  width: min(var(--wib-hero-logo-width), 680px);
  max-height: 34vh;
  object-fit: contain;
  margin: .8rem auto 1.2rem;
}
.wib-couple-name {
  margin: .25rem 0 1rem;
  font-family: var(--wib-font-ar);
  font-size: clamp(4.2rem, 11vw, 9.5rem);
  line-height: 1.1;
  font-weight: 400;
}
.wib-date-row {
  display: grid;
  grid-template-columns: 1fr 1px 1fr 1px 1fr;
  align-items: center;
  gap: clamp(.75rem, 2.5vw, 2rem);
  width: min(680px, 100%);
  margin: 1.45rem auto .9rem;
  font-family: var(--wib-font-en);
  font-size: clamp(.85rem, 1.6vw, 1.1rem);
  letter-spacing: .06em;
}
.wib-date-row i { width: 1px; height: 1.8rem; background: color-mix(in srgb, var(--wib-primary) 35%, transparent); }
.wib-venue-hero { margin: 0; font-family: var(--wib-font-en); font-size: clamp(.9rem, 1.6vw, 1.08rem); letter-spacing: .03em; }
.wib-scroll {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  width: 26px;
  height: 40px;
  border: 1px solid color-mix(in srgb, var(--wib-primary) 65%, transparent);
  border-radius: 20px;
  transform: translateX(-50%);
}
.wib-scroll::after { content: ""; position: absolute; top: 8px; left: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--wib-secondary); transform: translateX(-50%); animation: wib-scroll 1.8s infinite; }

.wib-details {
  position: relative;
  min-height: 100svh;
  padding: clamp(4rem, 8vw, 7rem) 1rem;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(color-mix(in srgb, var(--wib-background) 92%, rgba(255,255,255,.9)), color-mix(in srgb, var(--wib-background) 96%, rgba(255,255,255,.8))), url("../images/leaf-corner.png") left top/38rem auto no-repeat;
}
.wib-details::before {
  content: "";
  position: absolute;
  right: -7rem;
  bottom: -3rem;
  width: min(42rem, 78vw);
  aspect-ratio: 768 / 465;
  background: url("../images/leaf-corner.png") center/contain no-repeat;
  transform: rotate(180deg);
  opacity: .52;
  pointer-events: none;
}
.wib-invitation { width: min(var(--wib-content-width), 92vw); margin: 0 auto; }
.wib-ornament { margin-bottom: 1.2rem; color: var(--wib-secondary); letter-spacing: .45em; }
.wib-basmala { margin: .3rem auto 1.5rem; font-size: clamp(2.4rem, 5.5vw, 4.8rem); line-height: 1.35; }
.wib-basmala-image { display: block; width: min(360px, 78vw); max-height: 190px; object-fit: contain; margin: .3rem auto 1.5rem; }
.wib-invite-copy { margin: 0 auto 1.25rem; font-size: clamp(1.05rem, 2.1vw, 1.4rem); line-height: 2; }
.wib-families {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  gap: clamp(.55rem, 2.4vw, 1.4rem);
  margin: .25rem auto 1.2rem;
  width: min(760px, 100%);
  font-size: clamp(.95rem, 1.9vw, 1.25rem);
  font-weight: 600;
}
.wib-families b { display: grid; place-items: center; width: 2.1rem; aspect-ratio: 1; border: 1px solid color-mix(in srgb, var(--wib-primary) 32%, transparent); border-radius: 50%; color: var(--wib-secondary); font-weight: 400; }
.wib-detail-logo { display: block; width: min(var(--wib-detail-logo-width), 520px); max-height: 190px; object-fit: contain; margin: 1rem auto 1.3rem; }
.wib-detail-names { margin: .8rem 0 1rem; font-size: clamp(3.8rem, 8.5vw, 7rem); line-height: 1.2; font-weight: 400; }
.wib-event-line { margin: .45rem 0; font-size: clamp(1rem, 1.9vw, 1.25rem); }

.wib-links {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  width: min(560px, 100%);
  margin: 2.5rem auto 2rem;
}
.wib-links::before { content: ""; position: absolute; top: 17px; right: 25%; left: 25%; height: 1px; background: color-mix(in srgb, var(--wib-primary) 30%, transparent); }
.wib-link-point { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: .45rem; min-width: 0; color: var(--wib-primary); text-decoration: none; }
.wib-link-point:only-child { grid-column: 1 / -1; }
.wib-links:has(.wib-link-point:only-child)::before { display: none; }
.wib-dot { display: block; width: 35px; height: 35px; border: 1px solid var(--wib-primary); border-radius: 50%; background: color-mix(in srgb, var(--wib-background) 90%, white); transition: .25s ease; }
.wib-dot::after { content: ""; display: block; width: 7px; height: 7px; margin: 13px auto; border-radius: 50%; background: var(--wib-secondary); }
.wib-link-point:hover .wib-dot, .wib-link-point:focus-visible .wib-dot { background: var(--wib-primary); transform: translateY(-2px) scale(1.05); }
.wib-link-point small { color: color-mix(in srgb, var(--wib-primary) 72%, transparent); }

.wib-notes { width: min(540px, 100%); margin: 1.5rem auto 0; padding-top: 1rem; border-top: 1px solid color-mix(in srgb, var(--wib-primary) 25%, transparent); line-height: 1.8; }
.wib-notes strong, .wib-notes span { display: block; }
.wib-notes strong { margin-bottom: .2rem; }
.wib-notes span { color: color-mix(in srgb, var(--wib-primary) 78%, transparent); }
.wib-countdown { display: grid; grid-template-columns: repeat(4,1fr); gap: .7rem; width: min(620px, 100%); margin: 2.5rem auto; direction: ltr; }
.wib-countdown > div { padding: 1rem .35rem; border-block: 1px solid color-mix(in srgb, var(--wib-primary) 30%, transparent); background: color-mix(in srgb, var(--wib-background) 72%, transparent); }
.wib-countdown strong { display: block; font-family: var(--wib-font-en); font-size: clamp(1.8rem, 5vw, 3.2rem); font-weight: 500; line-height: 1; }
.wib-countdown span { display: block; margin-top: .45rem; font-size: .84rem; }
.wib-actions { display: flex; justify-content: center; }
.wib-button { min-width: 190px; padding: .75rem 1.4rem; border: 1px solid var(--wib-primary); color: var(--wib-primary); background: transparent; cursor: pointer; transition: .25s ease; }
.wib-button:hover, .wib-button:focus-visible { color: var(--wib-background); background: var(--wib-primary); outline: none; transform: translateY(-2px); }
.wib-footer { display: flex; flex-direction: column; align-items: center; gap: .35rem; margin-top: 4rem; font-family: var(--wib-font-en); }
.wib-footer img { width: auto; height: min(96px, 24vw); max-width: 240px; object-fit: contain; }
.wib-footer time { letter-spacing: .14em; }

.wib-music { position: fixed; z-index: 20; left: 1rem; bottom: 1rem; }
.wib-music button { border: 1px solid color-mix(in srgb, var(--wib-primary) 48%, transparent); border-radius: 999px; padding: .48rem .8rem; color: var(--wib-primary); background: color-mix(in srgb, var(--wib-background) 90%, white); box-shadow: 0 8px 22px rgba(0,0,0,.12); cursor: pointer; }
.wib-music button:hover, .wib-music button:focus-visible { color: var(--wib-background); background: var(--wib-primary); outline: none; }
.wib-audio-host { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.wib-template-ivory .wib-hero::after { content: ""; position: absolute; inset: clamp(1rem,3vw,2.2rem); border: 1px solid color-mix(in srgb, var(--wib-secondary) 60%, transparent); pointer-events: none; }
.wib-template-botanical .wib-hero { background-image: url("../images/botanical-frame.png"); }
.wib-template-ivory .wib-hero { background-image: linear-gradient(color-mix(in srgb, var(--wib-background) 84%, transparent), color-mix(in srgb, var(--wib-background) 84%, transparent)), url("../images/botanical-frame.png"); }
.wib-template-ivory .wib-details { border: clamp(1rem,3vw,2.2rem) solid transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wib-secondary) 60%, transparent); }
.wib-template-ivory .wib-leaf { opacity: .24; filter: sepia(.35); }
.wib-template-ivory .wib-flower { opacity: .45; filter: sepia(.55) saturate(.7); }
.wib-template-botanical .wib-hero > .wib-leaf { display: none; }
.wib-template-midnight .wib-hero { background-color: var(--wib-background); background-image: linear-gradient(color-mix(in srgb, var(--wib-background) 89%, transparent), color-mix(in srgb, var(--wib-background) 89%, transparent)), url("../images/botanical-frame.png"); }
.wib-template-midnight .wib-details { background-color: var(--wib-background); }
.wib-template-midnight .wib-leaf { opacity: .17; filter: sepia(1) saturate(.65) brightness(1.35); }
.wib-template-midnight .wib-flower { opacity: .3; filter: sepia(1) saturate(.65) brightness(1.15); }
.wib-template-midnight .wib-countdown > div, .wib-template-midnight .wib-music button { background: rgba(255,255,255,.04); }

@keyframes wib-reveal { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes wib-watercolor { to { transform: scale(1.03); opacity: .74; } }
@keyframes wib-flower-drift {
  0% { transform: translate3d(-3px, 4px, 0) rotate(-4deg) scale(.96); }
  38% { transform: translate3d(6px, -7px, 0) rotate(2deg) scale(1.015); }
  72% { transform: translate3d(-2px, -13px, 0) rotate(5deg) scale(1.04); }
  100% { transform: translate3d(5px, 2px, 0) rotate(-1deg) scale(.99); }
}
@keyframes wib-scroll { 0% { opacity: 0; transform: translate(-50%,0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,15px); } }

@media (max-width: 640px) {
  .wib-leaf { width: 80vw; opacity: .38; }
  .wib-flower { scale: .72; }
  .wib-flower-one { top: 4%; left: 12%; }
  .wib-flower-two { top: 18%; right: -1%; }
  .wib-flower-three { bottom: 19%; left: -4%; }
  .wib-flower-four { bottom: 13%; right: -3%; }
  .wib-flower-five { bottom: -1%; left: 30%; }
  .wib-hero-content { width: 94vw; padding-top: 5rem; }
  .wib-headline { font-size: 2.15rem; }
  .wib-hero-logo { width: min(var(--wib-hero-logo-width), 88vw); }
  .wib-date-row { gap: .45rem; font-size: .82rem; }
  .wib-venue-hero { max-width: 18rem; margin-inline: auto; }
  .wib-details { padding-inline: .75rem; }
  .wib-families { gap: .35rem; font-size: .88rem; }
  .wib-families b { width: 1.7rem; }
  .wib-link-point { font-size: .88rem; }
  .wib-countdown { gap: .3rem; }
  .wib-countdown > div { padding-inline: .15rem; }
  .wib-music { left: .65rem; bottom: .65rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
