@font-face {
  font-family: Vazirmatn;
  src: url("vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: Gulzar;
  src: url("gulzar.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: Mirza;
  src: url("mirza.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: Mirza;
  src: url("mirza-semibold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: Vazirmatn, Tahoma, Arial, sans-serif;
  --calligraphy: Gulzar, "Times New Roman", serif;
  --serif: Mirza, "Times New Roman", serif;
  --ink: #36251f;
  --wine: #743b39;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; color: var(--ink); line-height: 1.8; }
h1, h2, h3, p, blockquote { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }

.ornament { display: inline-flex; height: 20px; align-items: center; gap: 7px; color: var(--accent, var(--wine)); }
.ornament::before, .ornament::after { content: ""; width: 30px; height: 1px; background: currentColor; opacity: .46; }
.ornament i { width: 8px; height: 8px; border: 1px solid currentColor; transform: rotate(45deg); box-shadow: inset 0 0 0 2px var(--ornament-field, transparent); }

.invitation-page { --accent: #763e3b; --secondary: #5d443c; }
.invitation-main { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 42px 22px 60px; }
.invitation {
  position: relative;
  width: min(100%, 680px);
  min-width: 0;
  text-align: center;
}
.invite-label { color: var(--accent); font-size: .91rem; }
.invitation h1 { margin-block: 0 9px; font: clamp(2.55rem, 7vw, 5rem)/1.5 var(--calligraphy); }
.invitation .and { color: var(--accent); }
.verse { font: clamp(1.53rem, 3.6vw, 2.02rem)/1.14 var(--serif); }
.verse span { display: block; }
.welcome { color: var(--secondary); margin-block-start: 14px; }
.event {
  width: min(100%, 540px);
  margin: 27px auto 0;
  border-block-start: 1px solid var(--event-line, #96645853);
  padding-block-start: 18px;
}
.event-meta { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 15px; }
.event-meta > div { padding-inline: 5px; color: var(--secondary); font-size: .9rem; }
.event-meta > div + div { border-inline-start: 1px solid var(--event-line, #96645853); padding-inline-start: 12px; }
.event-label { color: var(--accent); font-weight: 500; font-size: .79rem; }
.event-value { color: var(--event-ink, var(--ink)); font: 600 clamp(1.35rem, 3.2vw, 1.72rem)/1.13 var(--serif); margin-block: 5px 3px; }
address { font-style: normal; }
.action {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 7px 17px;
  border: 1px solid currentColor;
  border-radius: 3px;
  background: transparent;
  color: var(--accent);
  font-size: .93rem;
  line-height: 1.5;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease;
}
.action:hover { background: var(--accent); color: var(--action-hover-ink, #fff4e7); border-color: var(--accent); }
.map-link { margin-block-start: 19px; }
.map-pin { position: relative; width: 13px; height: 13px; transform: rotate(-45deg); border: 1.5px solid currentColor; border-radius: 50% 50% 50% 3px; }
.map-pin::after { content: ""; position: absolute; width: 4px; height: 4px; border: 1px solid currentColor; border-radius: 50%; inset: 3px; }
.reply { margin-block-start: 13px; color: var(--secondary); font-size: .81rem; }

.theme-paper { background: radial-gradient(ellipse at 55% 11%, #f0dfc9, #be9d8b 100%); }
.paper-card {
  isolation: isolate;
  color: #4a302b;
  background: #f7ebdc url("emboss-v2.jpg") center / cover;
  border-radius: 50% 50% 3px 3px / 21% 21% 3px 3px;
  box-shadow: -7px 8px 0 #d9bda5, -12px 19px 0 #ead3bb, 0 32px 55px #4e32274d;
}
.paper-card::before, .paper-card::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  content: "";
  pointer-events: none;
}
.paper-card::before { background: radial-gradient(ellipse, #fff6e8ac 30%, #fff6e824 84%); }
.paper-card::after { inset: 11px; border: 1px solid #9a6b5470; }
.paper-content { padding: 60px 40px 49px; }
.paper-content .ornament { margin-block-end: 6px; }
.paper-card h1 { color: #5a3131; }

.entrance { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .entrance {
    position: fixed;
    z-index: 20;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    animation: clear-entrance 360ms 720ms ease both;
  }
  .invitation { animation: unfold-paper 640ms 555ms cubic-bezier(.15,.66,.29,1) both; }
  .entrance-paper { background: radial-gradient(ellipse at 50% 20%, #f0dfc9, #be9d8b); }
  .entrance-sheet {
    display: grid;
    place-items: center;
    width: clamp(115px, 26vw, 204px);
    aspect-ratio: .74;
    border-radius: 50% 50% 3px 3px / 30% 30% 3px 3px;
    background: #f8ebd9 url("emboss-v2.jpg") center / cover;
    box-shadow: -4px 5px 0 #d9bda5, 0 15px 33px #5f423b5e;
    animation: lift-sheet 1.0s cubic-bezier(.2,.6,.34,1) both;
  }
  .theme-paper .invitation { animation-name: unfold-paper; }

  @keyframes clear-entrance {
    from { opacity: 1; }
    99% { opacity: 0; }
    to { opacity: 0; visibility: hidden; }
  }
  @keyframes unfold-paper {
    from { opacity: 0; transform: translateY(13px) scale(.965); }
    to { opacity: 1; transform: none; }
  }
}

@media (max-width: 500px) {
  .invitation-main { padding: 27px 13px 37px; }
  .paper-card { border-radius: 50% 50% 3px 3px / 15% 15% 3px 3px; }
  .paper-content { padding: 49px 17px 38px; }
  .event-meta { grid-template-columns: 1fr; gap: 12px; }
  .event-meta > div + div { border: 0; padding-inline: 5px; }
  .event { margin-block-start: 18px; padding-block-start: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
