:root {
  --gold-1: #fff0a8;
  --gold-2: #d6a742;
  --gold-3: #8c5f1c;
  --gold-4: #ffe09a;
  --card: #5a4e48;
  --card-deep: #3a302c;
  --ink: #f9e6b2;
  --bg: #15100e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 12%, rgba(219,174,83,.12), transparent 34%),
    radial-gradient(circle at 16% 68%, rgba(164,113,54,.10), transparent 30%),
    linear-gradient(145deg, #0d0a09 0%, #18110f 46%, #090706 100%);
  color: var(--ink);
  font-family: "Montserrat", system-ui, sans-serif;
  overflow-x: hidden;
}

a { color: inherit; }

.scene {
  position: relative;
  min-height: 100svh;
  padding: clamp(18px, 3vw, 42px) 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.scene::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
  pointer-events: none;
  z-index: -2;
}

.ambient {
  position: fixed;
  width: 45vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .16;
  z-index: -2;
  pointer-events: none;
}
.ambient-one { background: #d7a749; top: -18vw; left: -10vw; }
.ambient-two { background: #7c4d1f; right: -20vw; bottom: -18vw; }

.particles,
.particles::before,
.particles::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  z-index: -1;
  background-repeat: no-repeat;
}
.particles {
  background-image:
    radial-gradient(circle, rgba(255,222,151,.6) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255,222,151,.33) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255,222,151,.45) 0 1px, transparent 1.5px);
  background-size: 170px 170px, 230px 230px, 310px 310px;
  background-position: 16px 34px, 90px 120px, 130px 20px;
  animation: floatParticles 22s linear infinite;
}

@keyframes floatParticles {
  from { transform: translateY(0); }
  to { transform: translateY(-170px); }
}

.invite-wrap {
  width: min(95vw, 820px);
  perspective: 1800px;
  text-align: center;
  will-change: transform;
}

.invite-card {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transform: rotateX(0) rotateY(0) translateZ(0);
  transition: transform .18s ease-out, filter .35s ease;
  filter: drop-shadow(0 42px 50px rgba(0,0,0,.46));
  animation: cardArrival 1.25s cubic-bezier(.18,.75,.15,1) both;
}

@keyframes cardArrival {
  0% { opacity: 0; transform: translateY(50px) rotateX(8deg) scale(.96); }
  100% { opacity: 1; transform: translateY(0) rotateX(0) scale(1); }
}

.card-face { width: 100%; }
.card-back {
  position: absolute;
  inset: 14px -14px -14px 14px;
  border-radius: 6px;
  background: linear-gradient(145deg, #5f4b28, #241a10 52%, #ae843f);
  transform: translateZ(-28px);
  box-shadow: 0 22px 45px rgba(0,0,0,.55);
}

.card-front {
  position: relative;
  padding: 11px;
  border-radius: 6px;
  background:
    linear-gradient(145deg, #fff1ad 0%, #c89435 16%, #6d4717 31%, #f8d87d 48%, #a87525 68%, #ffe69a 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255,248,205,.8),
    inset 0 0 0 4px rgba(72,45,14,.7),
    0 0 0 1px rgba(255,226,148,.65);
  overflow: hidden;
  transform-style: preserve-3d;
}

.card-front::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 28%, rgba(255,255,255,.23) 44%, transparent 60%);
  transform: translateX(-130%);
  animation: sweep 6s ease-in-out 1.3s infinite;
  pointer-events: none;
  z-index: 5;
}

@keyframes sweep {
  0%, 63%, 100% { transform: translateX(-130%); }
  78% { transform: translateX(130%); }
}

.inner-frame {
  position: relative;
  padding: clamp(24px, 4vw, 44px) clamp(18px, 4vw, 54px) clamp(22px, 3.4vw, 40px);
  background:
    radial-gradient(circle at 50% 25%, rgba(255,255,255,.045), transparent 33%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.017) 0 1px, transparent 1px 4px),
    linear-gradient(145deg, #685c56 0%, #554842 45%, #453934 100%);
  border: 2px solid #f1ca70;
  box-shadow:
    inset 0 0 0 2px rgba(51,31,13,.75),
    inset 0 0 0 7px rgba(224,174,78,.22),
    inset 0 0 46px rgba(0,0,0,.33);
  overflow: hidden;
}

.inner-frame::before,
.inner-frame::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.inner-frame::before {
  inset: 12px;
  border: 1px solid rgba(255,224,143,.48);
}
.inner-frame::after {
  inset: 21px;
  border: 1px solid rgba(92,59,18,.58);
}

.foil {
  position: absolute;
  width: 44%;
  height: 16px;
  border-radius: 50%;
  filter: blur(9px);
  opacity: .18;
  background: white;
  z-index: 1;
  pointer-events: none;
}
.foil-a { top: 18px; left: 8%; transform: rotate(-1deg); }
.foil-b { bottom: 15px; right: 8%; transform: rotate(1deg); }

.leaf-art {
  position: absolute;
  width: clamp(100px, 18vw, 160px);
  color: #e3b75a;
  filter: drop-shadow(0 1px 0 #fff0a0) drop-shadow(0 3px 2px rgba(0,0,0,.5));
  opacity: .92;
  z-index: 1;
}
.leaf-top { top: 3px; right: -3px; }
.leaf-bottom { bottom: -4px; left: -6px; transform: rotate(180deg); }

.content {
  position: relative;
  z-index: 2;
  transform: translateZ(34px);
}

.bismillah,
.host-name,
.invite-line,
.event-title,
.beloved,
.insha,
.venue-at,
.venue-block h2,
.venue-block p,
.mini-heading,
.welcome p,
.contact a {
  font-family: "Cormorant Garamond", Georgia, serif;
  text-shadow: 0 2px 1px rgba(38,24,15,.8), 0 0 12px rgba(255,220,130,.08);
}

.bismillah {
  margin: 0 0 12px;
  font-size: clamp(17px, 2.6vw, 25px);
  line-height: 1.24;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.bismillah span { font-size: .86em; }

.hosts { margin-top: 10px; }
.host-name {
  margin: 0;
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 700;
  line-height: 1.06;
  text-transform: uppercase;
}
.invite-line {
  margin: 11px 0 0;
  font-size: clamp(13px, 2vw, 19px);
  line-height: 1.22;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .035em;
}
.event-title {
  margin: 12px 0 0;
  font-size: clamp(35px, 6.3vw, 64px);
  line-height: 1.02;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.beloved {
  margin: 8px 0 4px;
  font-size: clamp(14px, 2.2vw, 21px);
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
}

.couple-block { margin: 8px 0 6px; }
.groom,
.bride {
  margin: 0;
  font-family: "Great Vibes", "Cormorant Garamond", cursive;
  color: #f1ca72;
  font-size: clamp(54px, 9.5vw, 94px);
  line-height: .92;
  font-weight: 400;
  text-shadow: 0 2px 1px #2a1707, 0 0 1px #fff2ad, 0 9px 20px rgba(0,0,0,.22);
}
.bride { margin-top: 6px; }
.with {
  display: block;
  margin: 7px 0 5px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(20px, 3vw, 31px);
  line-height: 1.12;
  font-weight: 700;
  text-transform: uppercase;
}
.bride-family {
  margin: 13px 0 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(16px, 2.65vw, 27px);
  line-height: 1.22;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .025em;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: min(76%, 470px);
  margin: 18px auto 13px;
}
.divider span { height: 1px; flex: 1; background: linear-gradient(90deg, transparent, #e9bf65); }
.divider span:last-child { background: linear-gradient(90deg, #e9bf65, transparent); }
.divider i { width: 7px; height: 7px; border: 1px solid #f0cf7b; transform: rotate(45deg); }

.insha {
  margin: 0 0 7px;
  font-size: clamp(18px, 3.2vw, 30px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.date-row {
  width: min(100%, 540px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(8px, 2vw, 20px);
  font-family: "Cormorant Garamond", serif;
  text-transform: uppercase;
  font-weight: 700;
}
.day,.month {
  font-size: clamp(18px, 3vw, 28px);
  border-block: 1px solid #dfb459;
  padding: 5px 4px 6px;
  line-height: 1.1;
}
.date-number {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  font-size: clamp(55px, 8.6vw, 82px);
  line-height: .92;
  padding-inline: clamp(10px, 2.4vw, 22px);
  border-inline: 1px solid #e0b459;
}
.date-suffix {
  font-size: .32em;
  line-height: 1;
  margin-bottom: .14em;
}

.venue-block { margin-top: 14px; }
.venue-at { margin: 0; font-size: clamp(16px, 2.2vw, 21px); text-transform: uppercase; }
.venue-block h2 {
  margin: 2px 0 0;
  font-size: clamp(28px, 4.8vw, 45px);
  text-transform: uppercase;
  line-height: 1.04;
}
.venue-block p:last-child {
  margin: 6px auto 0;
  max-width: 650px;
  font-size: clamp(14px, 2.15vw, 20px);
  line-height: 1.22;
  font-weight: 700;
  text-transform: uppercase;
}

.timing-grid {
  width: min(100%, 560px);
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.timing-item {
  min-width: 0;
  padding: 6px clamp(5px, 2vw, 14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
}
.timing-item + .timing-item { border-left: 1px solid rgba(238,190,98,.7); }
.timing-item strong,
.timing-item small {
  font-family: "Cormorant Garamond", serif;
  line-height: 1.1;
}
.timing-item strong { font-size: clamp(16px, 2.5vw, 23px); }
.timing-item small { font-size: clamp(13px, 2vw, 17px); font-weight: 700; }
.icon { height: 45px; margin-bottom: 4px; color: #e5ba5c; }

.people-icon { display: flex; align-items: end; justify-content: center; gap: 4px; }
.people-icon span {
  position: relative;
  display: block;
  width: 10px;
  height: 26px;
  border-radius: 6px 6px 2px 2px;
  background: currentColor;
  box-shadow: 0 2px 2px rgba(0,0,0,.35);
}
.people-icon span::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  top: -12px;
  left: 0;
}
.people-icon span:nth-child(2) { height: 31px; }
.people-icon span:nth-child(2)::before { width: 11px; height: 11px; top: -13px; }

.cloche-icon { position: relative; width: 58px; margin-inline: auto; }
.cloche-icon::before {
  content: "";
  position: absolute;
  width: 46px; height: 22px;
  left: 6px; bottom: 7px;
  border: 3px solid currentColor;
  border-bottom: 0;
  border-radius: 50px 50px 0 0;
}
.cloche-icon::after {
  content: "";
  position: absolute;
  left: 1px; right: 1px; bottom: 3px;
  height: 3px; background: currentColor; border-radius: 9px;
}
.cloche-icon span {
  position: absolute;
  width: 8px; height: 8px;
  border: 2px solid currentColor; border-radius: 50%;
  top: 7px; left: 25px;
}
.qr-item { transition: transform .2s ease, background .2s ease; border-radius: 8px; }
.qr-item:hover { transform: translateY(-3px); background: rgba(255,232,168,.05); }
.qr-item img {
  width: clamp(52px, 9vw, 72px);
  aspect-ratio: 1;
  object-fit: contain;
  border: 2px solid #d9ad56;
  background: #f9e9b7;
  padding: 2px;
  box-shadow: 0 5px 12px rgba(0,0,0,.24);
}

.lower-grid {
  margin: 20px auto 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 20px;
  text-align: left;
}
.welcome p,
.contact p { margin: 0; }
.mini-heading {
  margin-bottom: 4px !important;
  font-size: clamp(16px, 2.3vw, 22px);
  font-weight: 700;
  text-transform: uppercase;
}
.welcome p:not(.mini-heading) {
  font-size: clamp(15px, 2.1vw, 19px);
  line-height: 1.24;
  font-weight: 700;
  text-transform: uppercase;
}
.contact { text-align: right; }
.contact a {
  display: block;
  text-decoration: none;
  font-size: clamp(16px, 2.2vw, 21px);
  line-height: 1.24;
  font-weight: 700;
}
.contact a:hover { color: #fff0b7; }

.countdown-wrap {
  margin: 18px auto 0;
  padding-top: 14px;
  border-top: 1px solid rgba(238,191,97,.34);
}
.countdown-label {
  margin: 0 0 8px;
  font-family: "Italiana", serif;
  font-size: clamp(12px, 1.8vw, 15px);
  text-transform: uppercase;
  letter-spacing: .12em;
  opacity: .82;
}
.countdown {
  width: min(100%, 420px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.countdown span {
  padding: 7px 4px 6px;
  border: 1px solid rgba(239,196,109,.3);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.08));
  box-shadow: inset 0 1px rgba(255,255,255,.05);
}
.countdown b {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(23px, 4vw, 33px);
  line-height: .95;
}
.countdown em {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: .1em;
  opacity: .72;
}

.tilt-note { display: none; }

@media (max-width: 620px) {
  .scene {
    padding: 8px 6px;
    align-items: start;
    overflow: visible;
  }
  .invite-wrap {
    width: 100%;
    max-width: 100%;
  }
  .card-front { padding: 6px; }
  .card-back { inset: 6px -6px -6px 6px; transform: translateZ(-18px); }
  .inner-frame { padding: 18px 13px 18px; }
  .inner-frame::before { inset: 7px; }
  .inner-frame::after { inset: 12px; }
  .leaf-art { width: 82px; opacity: .62; }
  .leaf-top { right: -18px; top: 6px; }
  .leaf-bottom { left: -19px; bottom: -5px; }
  .bismillah { margin-bottom: 8px; font-size: 14px; }
  .hosts { margin-top: 7px; }
  .host-name { font-size: clamp(21px, 7vw, 30px); }
  .invite-line { margin-top: 7px; font-size: 11px; }
  .event-title { margin-top: 9px; font-size: clamp(29px, 8.7vw, 40px); }
  .beloved { margin-top: 6px; font-size: 12px; }
  .couple-block { margin-top: 6px; }
  .groom, .bride { font-size: clamp(42px, 14vw, 60px); }
  .bride { margin-top: 4px; }
  .with { margin: 4px 0 2px; font-size: 16px; }
  .bride-family { margin-top: 8px; font-size: clamp(12px, 3.8vw, 16px); }
  .divider { margin: 12px auto 10px; }
  .insha { margin-bottom: 4px; font-size: 16px; }
  .date-row { gap: 6px; }
  .day, .month { font-size: clamp(12px, 4vw, 17px); padding: 4px 2px; }
  .date-number { font-size: clamp(43px, 13vw, 56px); padding-inline: 8px; gap: 1px; }
  .date-suffix { font-size: .3em; margin-bottom: .1em; }
  .venue-block { margin-top: 10px; }
  .venue-at { font-size: 13px; }
  .venue-block h2 { font-size: clamp(22px, 6.6vw, 30px); }
  .venue-block p:last-child { margin-top: 4px; font-size: 11px; line-height: 1.2; padding-inline: 8px; }
  .timing-grid { margin-top: 13px; }
  .timing-item { padding: 4px 3px; gap: 2px; }
  .icon { height: 31px; margin-bottom: 1px; }
  .people-icon span { width: 7px; height: 18px; }
  .people-icon span::before { width: 7px; height: 7px; top: -9px; }
  .people-icon span:nth-child(2) { height: 22px; }
  .people-icon span:nth-child(2)::before { width: 8px; height: 8px; top: -10px; }
  .cloche-icon { transform: scale(.68); transform-origin: center bottom; }
  .timing-item strong { font-size: 13px; }
  .timing-item small { font-size: 10px; }
  .qr-item img { width: 43px; }
  .lower-grid { margin-top: 13px; gap: 8px; }
  .mini-heading { margin-bottom: 3px !important; font-size: 12px; }
  .welcome p:not(.mini-heading), .contact a { font-size: 11px; }
  .countdown-wrap { margin-top: 13px; padding-top: 10px; }
  .countdown-label { font-size: 8px; margin-bottom: 6px; }
  .countdown { gap: 3px; }
  .countdown span { padding: 5px 2px; }
  .countdown b { font-size: 20px; }
  .countdown em { font-size: 6px; }
}

@media (max-width: 390px) {
  .inner-frame { padding-inline: 11px; }
  .leaf-art { width: 74px; }
  .bismillah { font-size: 13px; }
  .host-name { font-size: 20px; }
  .invite-line { font-size: 10px; }
  .event-title { font-size: 27px; }
  .groom, .bride { font-size: 39px; }
  .with { font-size: 15px; }
  .bride-family { font-size: 11px; }
  .insha { font-size: 15px; }
  .date-number { font-size: 40px; }
  .day, .month { font-size: 11px; }
  .venue-block h2 { font-size: 21px; }
  .venue-block p:last-child { font-size: 10px; }
  .timing-item strong { font-size: 11px; }
  .timing-item small { font-size: 9px; }
  .qr-item img { width: 39px; }
  .welcome p:not(.mini-heading), .contact a { font-size: 10px; }
  .countdown b { font-size: 18px; }
}

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