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

:root {
  font-family: Vazirmatn, Tahoma, sans-serif;
  color: #fff8f2;
  background: #171015;
  font-synthesis: none;
  --cream: #fff5eb;
  --plum: #422947;
  --pearl: #e8c5b1;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.top {
  min-height: 4.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .7rem;
  padding: .6rem clamp(1rem, 5.4vw, 5.6rem);
  background: #171015;
  border-bottom: 1px solid #c998ab32;
}
.name {
  display: inline-flex;
  gap: .6rem;
  align-items: center;
  white-space: nowrap;
  font-size: clamp(.99rem, 1.5vw, 1.13rem);
  font-weight: 650;
}
.mark { color: #deb398; font-size: 1.25em; line-height: 1; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .6rem;
  min-height: 2.85rem;
  border: 1px solid transparent;
  border-radius: 99rem;
  padding: .55rem 1.05rem;
  font-size: .91rem;
  font-weight: 690;
  cursor: pointer;
  transition: color 160ms, background-color 160ms, border-color 160ms;
}
.sound { background: #33202d; border-color: #774e68; color: #fff2f5; }
.sound:hover, .sound[aria-pressed="true"] { background: #593044; }
.sound-bars { display: flex; align-items: center; gap: 3px; height: 1rem; }
.sound-bars i { width: 2px; height: .5rem; border-radius: 5px; background: currentColor; }
.sound-bars i:nth-child(2) { height: .93rem; }
.sound[aria-pressed="true"] i { animation: equalize .52s 6 ease-in-out alternate; }
.sound[aria-pressed="true"] i:nth-child(2) { animation-delay: 140ms; }
.sound[aria-pressed="true"] i:nth-child(3) { animation-delay: 280ms; }
@keyframes equalize { to { transform: scaleY(.37); } }

.hero {
  position: relative;
  display: grid;
  isolation: isolate;
  min-height: 42rem;
  min-height: clamp(34rem, 78svh, 56rem);
  overflow: hidden;
  background: #241322;
}
.hero-media, .hero-scrim { position: absolute; inset: 0; }
.hero-media { z-index: -2; }
.hero-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 44%;
}
.hero-scrim {
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(0deg, #160b17f5 0%, #160b17d9 13%, #160b1740 38%, transparent 57%),
              linear-gradient(270deg, #1c0e23a3, transparent 55%);
}
.hero-copy {
  align-self: end;
  justify-self: start;
  position: relative;
  max-width: 42rem;
  padding: 3rem clamp(1rem, 5.4vw, 5.6rem);
}
.eyebrow {
  color: #f6d9c6;
  margin: 0 0 .75rem;
  font-size: clamp(.92rem, 1.75vw, 1.2rem);
  font-weight: 650;
}
h1 {
  margin: 0 0 1.3rem;
  display: flex;
  flex-wrap: wrap;
  column-gap: .25em;
  color: var(--cream);
  font-size: clamp(3.2rem, 8vw, 7.3rem);
  line-height: 1.14;
  font-weight: 850;
}
h1 em { color: #f3bec7; font-style: normal; }
.primary { background: #fce9db; color: #51253c; }
.primary:hover { background: #ffffff; }
.envelope {
  position: relative;
  width: 1rem;
  height: .75rem;
  overflow: hidden;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}
.envelope::after {
  content: "";
  position: absolute;
  top: -.29rem;
  left: .14rem;
  width: .58rem;
  height: .58rem;
  transform: rotate(45deg);
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
}

.film-controls {
  position: absolute;
  inset: auto auto 3rem clamp(1rem, 5.4vw, 5.6rem);
}
.film { color: var(--cream); border-color: #efc7b989; background: #211322d9; }
.film:hover { background: #4f2743; }
.film-icon {
  width: .8rem;
  height: .8rem;
  background: currentColor;
  clip-path: polygon(19% 0, 100% 50%, 19% 100%);
}
.film[data-state="playing"] .film-icon {
  clip-path: polygon(0 0, 32% 0, 32% 100%, 0 100%, 0 0, 68% 0, 100% 0, 100% 100%, 68% 100%, 68% 0);
}

.greeting-header .letter {
  color: var(--cream);
  background: linear-gradient(140deg, #351a2c, #180d1b 76%);
  border-top: 1px solid #c998ab45;
  padding: clamp(1.9rem, 4.5vw, 4.3rem) clamp(1rem, 5.4vw, 5.6rem);
}
.letter-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .7fr);
  grid-template-areas: "message photo";
  align-items: center;
  gap: clamp(2rem, 6.3vw, 6.8rem);
  width: min(100%, 74rem);
  margin: 0 auto;
}
.detail {
  grid-area: photo;
  margin: 0;
  overflow: hidden;
  border-radius: 1.2rem 1.2rem 8rem 1.2rem;
  border: 1px solid #81485b;
  background: #2b152b;
  box-shadow: 0 1rem 2.75rem #35122225;
}
.detail img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 4;
  object-fit: cover;
}
.letter-copy { grid-area: message; }
.letter-rule {
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  height: 1.4rem;
  margin-bottom: 1.12rem;
}
.letter-rule i {
  width: .53rem;
  height: .53rem;
  border-radius: 65% 40% 65% 34%;
  transform: rotate(-35deg);
  background: #9b3c5b;
}
.letter-rule i:nth-child(1) { background: #e6c4a6; }
.letter-rule i:nth-child(3) { background: #bf8bd6; }
.letter h2 {
  color: #f6dce9;
  margin: 0 0 1.2rem;
  font-size: clamp(1.7rem, 3.6vw, 3.25rem);
  font-weight: 840;
  line-height: 1.42;
}
.letter p { margin: 0 0 1rem; line-height: 2.08; font-size: clamp(1rem, 1.44vw, 1.23rem); }
.letter .sign-off { margin: 1.25rem 0 0; color: #f4bcc7; font-weight: 750; }
.skip-text {
  font-size: .87rem;
  font-weight: 680;
  margin-top: .8rem;
  padding: .4rem 0;
  border: 0;
  background: transparent;
  color: #ffd3e0;
  text-decoration: underline;
  text-underline-offset: .2em;
  cursor: pointer;
}
.media-attribution {
  padding: .75rem 1rem;
  background: #211322;
  color: #e1c7cf;
  font-size: .82rem;
  line-height: 1.85;
}
.media-attribution:not(:focus-within) {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.media-attribution a { text-decoration: underline; text-underline-offset: .17em; }

.typing { display: grid; }
.typing > span { grid-area: 1 / 1; }
.typing-original { opacity: 0; user-select: none; }
.is-typing .typed-output::after {
  content: "";
  display: inline-block;
  height: .76em;
  width: .075em;
  margin-inline-start: .13em;
  vertical-align: -.06em;
  background: currentColor;
  animation: cursor .68s step-end alternate infinite;
}
@keyframes cursor { to { opacity: .25; } }

@media (min-width: 56rem) {
  .hero-copy { max-width: 62rem; }
}
@media (max-width: 57rem) {
  .letter-inner { gap: clamp(1.3rem, 4.5vw, 2.6rem); }
}
@media (max-width: 42rem) {
  .top { min-height: 3.85rem; }
  .hero {
    display: block;
    min-height: 0;
    background: radial-gradient(at 95% 50%, #502037, #1b101e 70%);
  }
  .hero-media { position: relative; inset: auto; z-index: 0; aspect-ratio: 6 / 5; }
  .hero-media video { object-fit: contain; object-position: center; background: #1b101e; }
  .hero-scrim {
    z-index: 0;
    inset: auto 0 0;
    top: auto;
    height: 12rem;
    background: linear-gradient(0deg, #1b101e72, transparent);
  }
  .hero-copy { padding: 1.55rem 1.1rem .8rem; }
  h1 { margin-bottom: 1.05rem; font-size: clamp(3rem, 13vw, 5rem); }
  .film-controls {
    position: relative;
    inset: auto;
    margin: 0 1.1rem 1.45rem;
  }
  .letter-inner { grid-template-columns: minmax(0, 1fr); grid-template-areas: "message" "photo"; gap: 1.75rem; }
  .greeting-header .letter { padding-inline: 1.15rem; }
  .detail { border-end-start-radius: 4rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
  .sound[aria-pressed="true"] i, .is-typing .typed-output::after { animation: none; }
}
