@font-face {
  font-family: "Onest";
  src: url("./fonts/Onest-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Unbounded";
  src: url("./fonts/Unbounded-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --ink: #242020;
  --muted: #686068;
  --yellow: #ffd43b;
  --paper: #fffdfd;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  color: var(--ink);
  background: #e9e3ec;
  font-family: "Onest", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.landing {
  isolation: isolate;
  position: relative;
  width: min(100%, 540px);
  min-height: 100svh;
  margin: 0 auto;
  overflow-x: hidden;
  background: var(--paper) url("../background.webp") center / cover no-repeat;
  box-shadow: 0 0 50px rgba(55, 39, 58, 0.14);
}

.landing::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.82) 0%,
    rgba(255, 255, 255, 0.52) 28%,
    rgba(255, 255, 255, 0.04) 58%,
    rgba(255, 253, 253, 0.88) 82%,
    #fffdfd 100%
  );
}

.hero {
  display: grid;
  min-height: 100svh;
  padding: max(16px, env(safe-area-inset-top)) 20px max(11px, env(safe-area-inset-bottom));
  grid-template-rows: auto auto minmax(215px, 1fr) auto;
}

.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: 54px;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: block;
  width: clamp(91px, 24vw, 116px);
  height: auto;
  filter: drop-shadow(0 5px 7px rgba(91, 66, 100, 0.11));
}

.availability {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: var(--ink);
  line-height: 1.15;
}

.availability small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.offer {
  position: relative;
  z-index: 3;
  margin-top: clamp(8px, 2vh, 18px);
}

h1 {
  margin: 0;
  font-family: "Unbounded", "Onest", sans-serif;
  font-size: clamp(48px, 14.2vw, 68px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.earnings {
  display: grid;
  width: fit-content;
  margin: 13px 0 0 2px;
  grid-template-columns: auto auto;
  align-items: end;
  column-gap: 9px;
  line-height: 1;
}

.earnings__lead {
  grid-column: 1 / -1;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: clamp(15px, 4vw, 18px);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.earnings__amount {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.earnings__amount small,
.earnings__period {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.earnings__amount strong {
  position: relative;
  z-index: 0;
  font-family: "Unbounded", "Onest", sans-serif;
  font-size: clamp(24px, 6.9vw, 33px);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1;
}

.earnings__amount strong::after {
  position: absolute;
  z-index: -1;
  right: -5px;
  bottom: 0.04em;
  left: -5px;
  height: 0.42em;
  border-radius: 3px;
  background: rgba(255, 212, 59, 0.88);
  content: "";
  transform: rotate(-1.5deg);
}

.visual {
  position: relative;
  z-index: 2;
  min-height: 0;
}

.courier {
  position: absolute;
  right: 50%;
  bottom: -3px;
  width: auto;
  height: min(100%, 515px);
  max-width: 94vw;
  transform: translateX(50%);
  filter: drop-shadow(0 18px 16px rgba(72, 51, 36, 0.17));
  object-fit: contain;
  object-position: center bottom;
}

.hero__footer {
  position: relative;
  z-index: 4;
  padding-top: 9px;
  text-align: center;
}

.payment-note {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.terms {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

.terms span {
  padding: 0 4px;
  color: #d39e00;
}

.messenger-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.messenger-button {
  display: grid;
  min-height: 57px;
  padding: 0 13px;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  align-items: center;
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 10px 24px rgba(36, 32, 32, 0.2);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.messenger-button svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.messenger-button--telegram {
  background: #229ed9;
}

.messenger-button--telegram svg path {
  fill: #fff;
}

.messenger-button--element {
  background: #0baf88;
}

.messenger-button--element svg path {
  fill: #063c31;
}

.messenger-button__arrow {
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  opacity: 0.82;
}

.messenger-button:hover {
  box-shadow: 0 13px 27px rgba(36, 32, 32, 0.24);
  transform: translateY(-2px);
}

.messenger-button:active {
  box-shadow: 0 7px 16px rgba(36, 32, 32, 0.18);
  transform: translateY(1px);
}

.messenger-button:focus-visible {
  outline: 3px solid #9270ec;
  outline-offset: 3px;
}

.footnote {
  margin: 9px 0 0;
  color: #7c747b;
  font-size: 10px;
  font-weight: 550;
}

.js-ready .topbar,
.js-ready .offer,
.js-ready .courier,
.js-ready .hero__footer {
  animation: appear 430ms both ease-out;
}

.js-ready .offer {
  animation-delay: 50ms;
}

.js-ready .courier {
  animation-name: courier-appear;
  animation-delay: 90ms;
}

.js-ready .hero__footer {
  animation-delay: 140ms;
}

@keyframes appear {
  from {
    opacity: 0;
    translate: 0 8px;
  }
}

@keyframes courier-appear {
  from {
    opacity: 0;
    transform: translateX(50%) translateY(14px);
  }
}

@media (max-width: 359px) {
  .hero {
    padding-right: 15px;
    padding-left: 15px;
  }

  h1 {
    font-size: 45px;
  }

  .earnings {
    column-gap: 6px;
  }

  .earnings__amount small,
  .earnings__period {
    font-size: 11px;
  }

  .messenger-buttons {
    gap: 7px;
  }

  .messenger-button {
    min-height: 53px;
    padding: 0 10px;
    grid-template-columns: 21px 1fr auto;
    gap: 6px;
    font-size: 13px;
  }

  .messenger-button svg {
    width: 21px;
    height: 21px;
  }

  .messenger-button__arrow {
    font-size: 17px;
  }
}

@media (max-height: 650px) {
  .hero {
    padding-top: 10px;
    grid-template-rows: auto auto minmax(195px, 1fr) auto;
  }

  .topbar {
    min-height: 43px;
  }

  .brand-logo {
    width: 78px;
  }

  .offer {
    margin-top: 4px;
  }

  h1 {
    font-size: 43px;
  }

  .earnings {
    margin-top: 8px;
  }

  .earnings__lead {
    margin-bottom: 3px;
    font-size: 14px;
  }

  .earnings__amount strong {
    font-size: 24px;
  }

  .hero__footer {
    padding-top: 5px;
  }

  .payment-note {
    font-size: 11px;
  }

  .terms {
    margin: 2px 0 8px;
    font-size: 10px;
  }

  .messenger-button {
    min-height: 48px;
  }

  .footnote {
    margin-top: 5px;
    font-size: 9px;
  }
}

@media (min-width: 720px) {
  body {
    padding: 24px;
  }

  .landing {
    min-height: calc(100svh - 48px);
    border-radius: 24px;
  }

  .hero {
    min-height: calc(100svh - 48px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
