@font-face {
  font-family: Estedad;
  src: url("./fonts/Estedad-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Estedad;
  src: url("./fonts/Estedad-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Estedad;
  src: url("./fonts/Estedad-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Estedad;
  src: url("./fonts/Estedad-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Nastaliq;
  src: url("./fonts/Nastaliq.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@property --rim-turn {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
:root {
  color-scheme: light;
  --paper: #faf7f0;
  --ink: #554b3d;
  --gold: #89703f;
  --gold-light: #c7b381;
  --rule: #b49a605e;
  font-family: Estedad, Tahoma, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  padding: 52px 24px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: radial-gradient(ellipse at 50% 18%, #fcfaf6 0, #f1ece3 60%, #e5ddd0 100%);
  -webkit-font-smoothing: antialiased;
}
.invitation {
  width: min(100%, 550px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid #fffaf1;
  border-radius: 3px;
  box-shadow: 0 36px 85px -26px #51432a36, 0 5px 14px #51432a0a, 1px 1px 0 #e6dfd1;
}
.paper-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("./assets/paper-botanicals.webp") center / 450% 450% no-repeat;
  opacity: .42;
  pointer-events: none;
}
.botanical {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("./assets/paper-botanicals.webp") center / 100% 100% no-repeat;
  opacity: .92;
  pointer-events: none;
}
.botanical-top {
  -webkit-mask-image: radial-gradient(ellipse 48% 37% at 0 0, #000 72%, transparent 100%);
  mask-image: radial-gradient(ellipse 48% 37% at 0 0, #000 72%, transparent 100%);
  transform-origin: 0 0;
}
.botanical-bottom {
  -webkit-mask-image: radial-gradient(ellipse 50% 37% at 100% 100%, #000 72%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 37% at 100% 100%, #000 72%, transparent 100%);
  transform-origin: 100% 100%;
}
.frame {
  position: absolute;
  inset: 24px;
  border: 1px solid var(--rule);
  border-radius: 230px 230px 2px 2px;
  z-index: -1;
  pointer-events: none;
}
.frame::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid #c7b38130;
  border-radius: inherit;
}
@supports (mask-composite: exclude) or (-webkit-mask-composite: xor) {
  .frame::before {
    content: "";
    position: absolute;
    inset: -1px;
    padding: 1px;
    border-radius: inherit;
    background: conic-gradient(from var(--rim-turn), transparent 0deg 50deg, #b3975e 75deg, #eadbb7 94deg, #b3975e 113deg, transparent 140deg 270deg, #c8b17a 302deg, transparent 332deg);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: .9;
  }
}
.card-content {
  padding: 85px 56px 51px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
p, h1 { margin: 0; }
.intro { width: 100%; }
.opening {
  font-size: 1.0625rem;
  color: var(--gold);
  font-weight: 600;
  line-height: 1.8;
}
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--gold-light);
  margin: 21px auto 29px;
  width: 116px;
}
.ornament::before, .ornament::after { content: ""; height: 1px; flex: 1; background: var(--rule); }
.ornament span { font-family: Georgia, serif; font-size: 1rem; line-height: 1; }
.occasion { font-size: 1rem; font-weight: 500; line-height: 2; color: var(--ink); }
.names {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0 44px;
  color: #7b6137;
  font-family: Nastaliq, serif;
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 2.6;
  width: 100%;
}
.names > span { display: block; max-width: 100%; }
.names .and {
  font-family: Estedad, Tahoma, sans-serif;
  font-size: .9375rem;
  font-weight: 400;
  color: #967b49;
  line-height: 1.7;
  margin: 6px 0;
}
.words { width: 100%; }
.verse { font-size: 1rem; line-height: 2.55; font-weight: 400; }
.verse strong { font-weight: 600; color: #71603f; }
.welcome { font-size: 1rem; font-weight: 400; line-height: 2.4; margin: 33px 0 40px; }
.details { width: 100%; max-width: 314px; border-top: 1px solid var(--rule); padding-top: 32px; }
.weekday { font-size: .9375rem; line-height: 1.9; font-weight: 500; margin-bottom: 6px; }
.day { color: #7b6137; font-size: 1.75rem; line-height: 1.9; font-weight: 700; }
.day span { font-size: 1.125rem; font-weight: 500; padding-inline-start: 3px; }
.time { font-size: 1rem; line-height: 2.2; font-weight: 500; margin-top: 9px; }
.location { margin-top: 34px; }
.place-label { font-size: .875rem; color: #7c6c53; line-height: 2; margin-bottom: 8px; }
.place { font-size: 1.0625rem; font-weight: 600; line-height: 2.15; }
.address { font-size: 1rem; font-weight: 400; line-height: 2.2; }
.closing-mark { color: var(--gold-light); font-family: Georgia, serif; font-size: 1.125rem; margin-top: 31px; line-height: 1; }
@media (max-width: 580px) {
  body { padding: 20px 13px; }
  .card-content { padding: 74px 35px 45px; }
  .frame { inset: 18px; }
  .names { font-size: clamp(1.75rem, 7.4vw, 2.2rem); margin-bottom: 39px; }
  .ornament { margin-bottom: 26px; }
}
@media (max-width: 360px) {
  body { padding: 12px 8px; }
  .card-content { padding-inline: 27px; }
  .frame { inset: 13px; }
}
@media (prefers-reduced-motion: no-preference) {
  .invitation {
    animation: unfold 1.8s cubic-bezier(.2,.7,.2,1) both;
    transform-origin: 50% 10%;
    transition: box-shadow .9s ease;
  }
  .invitation:hover { box-shadow: 0 42px 95px -27px #51432a45, 0 5px 20px #9b7c4118, 1px 1px 0 #e6dfd1; }
  .invitation::after {
    content: "";
    position: absolute;
    inset: -20%;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(112deg, transparent 35%, #fffdf530 46%, #fffdf568 50%, #fffdf530 54%, transparent 65%);
    animation: paper-sheen 11s ease-in-out infinite;
  }
  .botanical-top { animation: jasmine-top 7s ease-in-out infinite alternate; }
  .botanical-bottom { animation: jasmine-bottom 8.5s ease-in-out infinite alternate; }
  .frame::before { animation: rim-light 13s linear infinite; }
  .ornament span { animation: jewel-light 4.5s ease-in-out infinite; }
  .reveal { animation: reveal 1.45s cubic-bezier(.2,.7,.2,1) both; }
  .intro { animation-delay: .3s; }
  .names { animation-delay: .6s; }
  .words { animation-delay: .9s; }
  .details { animation-delay: 1.2s; }
  .closing-mark { animation-delay: 1.45s; }
  @supports (background-clip: text) or (-webkit-background-clip: text) {
    .person-name {
      color: transparent;
      background: linear-gradient(110deg, #71552e 0% 35%, #a58141 46%, #8e6b34 52%, #71552e 64% 100%);
      background-size: 300% 100%;
      -webkit-background-clip: text;
      background-clip: text;
      animation: name-foil 7.5s ease-in-out infinite;
    }
    .person-name:last-child { animation-delay: 2.3s; }
  }
  @keyframes unfold {
    from { opacity: 0; transform: perspective(1500px) rotateX(5deg) translateY(24px) scale(.97); }
    to { opacity: 1; transform: perspective(1500px) rotateX(0) translateY(0) scale(1); }
  }
  @keyframes reveal {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes jasmine-top {
    from { transform: translate(-3px, -2px) rotate(-1.1deg); }
    to { transform: translate(3px, 5px) rotate(1.3deg); }
  }
  @keyframes jasmine-bottom {
    from { transform: translate(2px, 3px) rotate(1deg); }
    to { transform: translate(-4px, -4px) rotate(-1.3deg); }
  }
  @keyframes rim-light { to { --rim-turn: 360deg; } }
  @keyframes name-foil {
    0%, 12% { background-position: 150% 50%; }
    58%, 100% { background-position: -150% 50%; }
  }
  @keyframes paper-sheen {
    0%, 10% { transform: translateX(-130%); }
    48%, 100% { transform: translateX(130%); }
  }
  @keyframes jewel-light {
    0%, 100% { transform: scale(.95); opacity: .65; text-shadow: 0 0 0 #b9986800; }
    50% { transform: scale(1.2); opacity: 1; text-shadow: 0 0 9px #b9986880; }
  }
}
@media print {
  body { background: white; padding: 0; min-height: auto; }
  .invitation { width: 130mm; box-shadow: none; break-inside: avoid; }
  .invitation::after { display: none; }
  .person-name { color: #7b6137; background: none; }
  * { animation: none !important; opacity: 1 !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
