:root {
  --thx-wine: #7a0303;
  --thx-wine-soft: #9b2929;
  --thx-cream: #fefaef;
  --thx-cream-soft: #efe3d2;
  --thx-text: #681313;
  --thx-muted: #7d5247;
  --thx-heading: "Vetrino", "Cormorant Garamond", Georgia, serif;
  --thx-main: "Montserrat Alternates", Arial, sans-serif;
}

@font-face {
  font-family: "Vetrino";
  src: url("/static/assets/fonts/vetrino/Vetrino.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat Alternates";
  src: url("/static/assets/fonts/montserrat-alternates/MontserratAlternates-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--thx-wine);
  color: var(--thx-text);
  font-family: var(--thx-main);
}

.thx-page {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: clamp(32px, 6vw, 72px) 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 12%, rgba(254, 250, 239, 0.14), transparent 26%),
    radial-gradient(circle at 90% 88%, rgba(254, 250, 239, 0.12), transparent 28%),
    var(--thx-wine);
}

.thx-page__content {
  display: flex;
  width: min(100%, 640px);
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.thx-page__eyebrow {
  margin: 0 0 clamp(20px, 4vw, 34px);
  color: var(--thx-cream);
  font-family: var(--thx-heading);
  font-size: clamp(24px, 5vw, 36px);
  line-height: 1;
  animation: thx-content-enter 700ms ease-out both;
}

.thx-photo {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 0.96 / 1;
  margin: 0;
  isolation: isolate;
}

.thx-photo::before {
  position: absolute;
  z-index: -1;
  inset: 13% 12%;
  border-radius: 4px;
  background: var(--thx-cream-soft);
  box-shadow: 0 24px 54px rgba(35, 0, 0, 0.2);
  content: "";
  transform: rotate(-3deg);
}

.thx-photo::after {
  position: absolute;
  z-index: -1;
  right: 9%;
  bottom: 8%;
  width: 32%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(254, 250, 239, 0.14);
  content: "";
}

.thx-photo__image {
  position: absolute;
  display: block;
  overflow: hidden;
  width: 56%;
  height: 70%;
  border: 7px solid var(--thx-cream);
  border-radius: 3px;
  background: var(--thx-cream-soft);
  box-shadow: 0 14px 32px rgba(35, 0, 0, 0.22);
  object-fit: cover;
  opacity: 0;
  will-change: transform, opacity;
}

.thx-photo__image--main-one {
  z-index: 2;
  top: 14%;
  left: 8%;
  object-position: center center;
  transform: rotate(-8deg) translate(-90px, -46px);
  animation: thx-main-one-enter 900ms 130ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.thx-photo__image--main-two {
  z-index: 3;
  top: 11%;
  right: 7%;
  object-position: center 42%;
  transform: rotate(8deg) translate(100px, -28px);
  animation: thx-main-two-enter 900ms 290ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.thx-photo__image--extra-one {
  z-index: 4;
  bottom: 3%;
  left: 3%;
  width: 31%;
  height: 36%;
  object-position: center 62%;
  transform: rotate(-13deg) translate(-58px, 74px);
  animation: thx-extra-one-enter 900ms 450ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.thx-photo__image--extra-two {
  z-index: 4;
  right: 2%;
  bottom: 1%;
  width: 31%;
  height: 36%;
  object-position: center 52%;
  transform: rotate(11deg) translate(62px, 74px);
  animation: thx-extra-two-enter 900ms 610ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.thx-page h1 {
  max-width: 12em;
  margin: clamp(28px, 5vw, 48px) 0 0;
  color: var(--thx-cream);
  font-family: var(--thx-heading);
  font-size: clamp(38px, 8vw, 64px);
  font-weight: 400;
  line-height: 1.02;
  text-wrap: balance;
  animation: thx-content-enter 800ms 700ms ease-out both;
}

.thx-page__text {
  max-width: 28em;
  margin: 18px 0 0;
  color: rgba(254, 250, 239, 0.82);
  font-size: clamp(14px, 2.4vw, 18px);
  line-height: 1.55;
  animation: thx-content-enter 800ms 820ms ease-out both;
}

@keyframes thx-content-enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes thx-main-one-enter {
  from {
    opacity: 0;
    transform: rotate(-8deg) translate(-90px, -46px);
  }

  to {
    opacity: 1;
    transform: rotate(-8deg) translate(0, 0);
  }
}

@keyframes thx-main-two-enter {
  from {
    opacity: 0;
    transform: rotate(8deg) translate(100px, -28px);
  }

  to {
    opacity: 1;
    transform: rotate(8deg) translate(0, 0);
  }
}

@keyframes thx-extra-one-enter {
  from {
    opacity: 0;
    transform: rotate(-13deg) translate(-58px, 74px);
  }

  to {
    opacity: 1;
    transform: rotate(-13deg) translate(0, 0);
  }
}

@keyframes thx-extra-two-enter {
  from {
    opacity: 0;
    transform: rotate(11deg) translate(62px, 74px);
  }

  to {
    opacity: 1;
    transform: rotate(11deg) translate(0, 0);
  }
}

@media (max-width: 420px) {
  .thx-page {
    padding-right: 14px;
    padding-left: 14px;
  }

  .thx-photo__image {
    border-width: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .thx-page__eyebrow,
  .thx-photo__image,
  .thx-page h1,
  .thx-page__text {
    animation: none;
  }

  .thx-page__eyebrow,
  .thx-page h1,
  .thx-page__text {
    opacity: 1;
    transform: none;
  }

  .thx-photo__image {
    opacity: 1;
  }

  .thx-photo__image--main-one {
    transform: rotate(-8deg) translate(0, 0);
  }

  .thx-photo__image--main-two {
    transform: rotate(8deg) translate(0, 0);
  }

  .thx-photo__image--extra-one {
    transform: rotate(-13deg) translate(0, 0);
  }

  .thx-photo__image--extra-two {
    transform: rotate(11deg) translate(0, 0);
  }
}
