:root {
  color-scheme: light;
  --coral: #f69893;
  --cream: #fff3ea;
  --display: "DIN Condensed", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--coral);
  overflow-x: hidden;
}

.linktree {
  position: relative;
  width: min(100%, 390px);
  height: max(802px, 100svh);
  min-height: 802px;
  margin: 0 auto;
  background: var(--coral);
  overflow: hidden;
}

.card {
  position: absolute;
  top: 135px;
  left: 18px;
  width: 354px;
  height: 514px;
  border-radius: 26px;
  background: var(--cream);
  animation: card-arrive 560ms cubic-bezier(0.2, 0.85, 0.3, 1) backwards;
}

.portrait {
  position: absolute;
  z-index: 2;
  top: -63px;
  left: 114px;
  width: 126px;
  height: 126px;
  animation: portrait-pop 680ms 140ms cubic-bezier(0.16, 1.25, 0.35, 1) backwards;
}

.brand {
  position: absolute;
  top: 81px;
  left: 74px;
  width: 203px;
  height: 80px;
  animation: rise-in 520ms 260ms cubic-bezier(0.2, 0.85, 0.3, 1) backwards;
}

.brand img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand .tagline {
  position: absolute;
  top: 58px;
  height: 13px;
}

.brand .tagline-left {
  left: 51px;
  width: 48px;
}

.brand .tagline-right {
  left: 137px;
  width: 62px;
}

h1 {
  position: absolute;
  top: 176px;
  left: 0;
  width: 100%;
  margin: 0;
  color: var(--coral);
  font-family: var(--display);
  font-size: 32px;
  font-stretch: condensed;
  font-weight: 700;
  line-height: 38px;
  letter-spacing: 0.96px;
  text-align: center;
  animation: rise-in 480ms 370ms cubic-bezier(0.2, 0.85, 0.3, 1) backwards;
}

.order-links {
  position: absolute;
  top: 214px;
  left: 34px;
  display: flex;
  gap: 6px;
}

.order-button {
  position: relative;
  display: grid;
  width: 142px;
  height: 47px;
  place-items: center;
  border: 3px solid var(--coral);
  border-radius: 24px;
  background: var(--cream);
  box-shadow: 2px 2px 0 var(--coral);
  overflow: hidden;
  text-decoration: none;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 180ms ease,
    background-color 180ms ease;
  animation: button-arrive 500ms 460ms cubic-bezier(0.2, 0.9, 0.25, 1.2) backwards;
}

.order-button:nth-child(2) {
  animation-delay: 530ms;
}

.order-button > img {
  position: relative;
  z-index: 1;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.3, 1);
}

.order-button::after,
.primary-links a::after {
  position: absolute;
  z-index: 0;
  top: -45%;
  left: -35%;
  width: 24%;
  height: 190%;
  background: rgb(246 152 147 / 18%);
  content: "";
  pointer-events: none;
  transform: rotate(18deg) translateX(-210%);
  transition: transform 430ms ease;
}

.order-button:first-child img {
  width: 92px;
  height: 29px;
}

.order-button .wolt-logo {
  width: 61px;
  height: 22px;
}

.primary-links {
  position: absolute;
  top: 279px;
  left: 30px;
  display: grid;
  gap: 16px;
  width: 297px;
}

.primary-links a {
  position: relative;
  display: block;
  width: 297px;
  height: 49px;
  color: var(--coral);
  text-decoration: none;
  overflow: hidden;
  border-radius: 25px;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.3, 1);
  animation: link-arrive 500ms 610ms cubic-bezier(0.2, 0.9, 0.25, 1.15) backwards;
}

.primary-links a:nth-child(2) {
  animation-delay: 680ms;
}

.primary-links a:nth-child(3) {
  animation-delay: 750ms;
}

.link-face {
  position: absolute;
  inset: 0;
  background: url("./public/assets/link-button.svg") center / 100% 100% no-repeat;
}

.primary-links a > span:last-child {
  position: absolute;
  top: 6px;
  right: 45px;
  font-family: var(--display);
  font-size: 32px;
  font-stretch: condensed;
  font-weight: 700;
  line-height: 38px;
  letter-spacing: 0.96px;
  transition: letter-spacing 180ms ease, transform 180ms ease;
}

.link-icon {
  position: absolute;
  z-index: 1;
  object-fit: contain;
  transition: transform 260ms cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

.menu-icon {
  top: 6px;
  left: 32px;
  width: 37px;
  height: 28px;
}

.franchise-icon {
  top: 7px;
  left: 34px;
  width: 30px;
  height: 30px;
}

.website-icon {
  top: 6px;
  left: 32px;
  width: 31px;
  height: 31px;
}

.social-links {
  position: absolute;
  top: 688px;
  left: 127px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 35px;
}

.social-links a {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 50%;
  transition: transform 220ms cubic-bezier(0.2, 0.9, 0.3, 1.3), background-color 180ms ease;
  animation: social-pop 450ms 900ms cubic-bezier(0.2, 1.2, 0.3, 1) backwards;
}

.social-links a:nth-child(2) {
  animation-delay: 970ms;
}

.social-links a:nth-child(3) {
  animation-delay: 1040ms;
}

.social-links img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.social-links a:nth-child(2) img {
  width: 30px;
}

.site-credit {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  color: rgb(255 243 234 / 76%);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.7px;
  text-align: center;
  text-transform: uppercase;
  animation: rise-in 450ms 1120ms cubic-bezier(0.2, 0.85, 0.3, 1) backwards;
}

.site-credit a {
  position: relative;
  color: var(--cream);
  font-weight: 700;
  text-decoration: none;
}

.site-credit a::after {
  position: absolute;
  right: 0;
  bottom: -3px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms ease;
}

.site-credit a:hover::after,
.site-credit a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.order-button:hover,
.order-button:focus-visible {
  background: #fff8f2;
  box-shadow: 1px 1px 0 var(--coral);
  transform: translate(1px, 1px) scale(1.025);
}

.order-button:hover::after,
.order-button:focus-visible::after,
.primary-links a:hover::after,
.primary-links a:focus-visible::after {
  transform: rotate(18deg) translateX(750%);
}

.order-button:hover > img,
.order-button:focus-visible > img {
  transform: scale(1.05);
}

.primary-links a:hover,
.primary-links a:focus-visible {
  transform: translate(2px, 2px) scale(1.018);
}

.primary-links a:hover .link-icon,
.primary-links a:focus-visible .link-icon {
  transform: rotate(-7deg) scale(1.1);
}

.primary-links a:hover > span:last-child,
.primary-links a:focus-visible > span:last-child {
  letter-spacing: 1.5px;
  transform: translateX(2px);
}

.social-links a:hover,
.social-links a:focus-visible {
  transform: translateY(-4px) rotate(-5deg) scale(1.08);
  background: rgb(255 243 234 / 12%);
}

.order-button:active,
.primary-links a:active {
  box-shadow: none;
  transform: translate(3px, 3px) scale(0.97);
  transition-duration: 70ms;
}

.social-links a:active {
  transform: translateY(0) scale(0.9);
  transition-duration: 70ms;
}

a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@keyframes card-arrive {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.975);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes portrait-pop {
  0% {
    opacity: 0;
    transform: translateY(-18px) rotate(-7deg) scale(0.7);
  }
  70% {
    opacity: 1;
    transform: translateY(2px) rotate(2deg) scale(1.035);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes button-arrive {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes link-arrive {
  from {
    opacity: 0;
    transform: translateX(-18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes social-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.45);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 389px) {
  .linktree {
    width: 390px;
    left: 50%;
    margin-right: 0;
    margin-left: -195px;
    transform: scale(var(--page-scale, 1));
    transform-origin: top center;
  }
}

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