*,*::before,*::after { box-sizing: border-box; }

html {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  min-height: 100lvh;
  background: #1a1410;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  min-height: 100lvh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #fff;
  background: transparent;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: calc(-1 * env(safe-area-inset-top, 0px));
  right: calc(-1 * env(safe-area-inset-right, 0px));
  bottom: calc(-1 * env(safe-area-inset-bottom, 0px));
  left: calc(-1 * env(safe-area-inset-left, 0px));
  background:
    linear-gradient(to bottom, transparent 65%, #1a1410 100%),
    url("/images/back.webp") center / cover no-repeat #1a1410;
  z-index: -1;
  pointer-events: none;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

.hero__character {
  position: fixed;
  right: clamp(-60px, -4vw, 0px);
  bottom: calc(-1px - env(safe-area-inset-bottom, 0px));
  width: clamp(320px, 42vw, 640px);
  z-index: 1;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,0.45));
}

.hero {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  min-height: 100lvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-block: 0;
  padding-inline: max(clamp(16px, 4vw, 48px), env(safe-area-inset-left, 0px)) max(clamp(16px, 4vw, 48px), env(safe-area-inset-right, 0px));
}

.hero__logo {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + clamp(20px, 3vw, 60px));
  left: clamp(180px, 28vw, 480px);
  width: clamp(340px, 43vw, 624px);
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.4));
  user-select: none;
  -webkit-user-drag: none;
  z-index: 2;
}

.hero__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  z-index: 2;
  width: max-content;
  max-width: 100%;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.hero__counter {
  width: clamp(240px, 30vw, 360px);
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.35));
  transform: rotate(-2deg);
}

.btn-link {
  display: inline-block;
  cursor: pointer;
  user-select: none;
  filter: drop-shadow(0 10px 0 rgba(0,0,0,0.45)) drop-shadow(0 14px 24px rgba(0,0,0,0.35));
  transition: transform .14s ease, filter .14s ease;
}
.btn-link img {
  display: block;
  width: clamp(280px, 38vw, 480px);
  height: auto;
  -webkit-user-drag: none;
}
.btn-link:hover {
  transform: translateY(3px);
  filter: drop-shadow(0 7px 0 rgba(0,0,0,0.45)) drop-shadow(0 10px 18px rgba(0,0,0,0.35)) brightness(1.05);
}
.btn-link:active {
  transform: translateY(8px);
  filter: drop-shadow(0 2px 0 rgba(0,0,0,0.45)) drop-shadow(0 3px 8px rgba(0,0,0,0.35)) brightness(0.95);
}

@media (max-width: 720px) {
  .hero {
    padding-block: 12px;
    padding-inline: max(12px, env(safe-area-inset-left, 0px)) max(12px, env(safe-area-inset-right, 0px));
  }
  .hero__logo {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 16px);
    left: 50%;
    transform: translateX(-50%);
    width: clamp(280px, 78vw, 520px);
  }
  .hero__character {
    right: -10vw;
    width: 90vw;
    max-width: 560px;
    bottom: calc(-10vh - env(safe-area-inset-bottom, 0px));
  }
  .hero__cta {
    width: 100%;
    align-items: center;
  }
  .hero__counter {
    width: min(70vw, 280px);
  }
  .btn-link img {
    width: min(85vw, 360px);
  }
}

@media (max-width: 420px) {
  .hero__character {
    right: -16vw;
    width: 80vw;
    opacity: 0.95;
  }
}

@media (orientation: landscape) and (max-height: 540px) {
  .hero__logo {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + clamp(20px, 8vh, 56px));
    left: clamp(60px, 18vw, 200px);
    width: clamp(180px, 38vh, 320px);
    transform: none;
  }
  .hero__character {
    right: -4vw;
    width: clamp(220px, 75vh, 380px);
  }
  .hero__counter {
    width: clamp(180px, 28vh, 260px);
  }
  .btn-link img {
    width: clamp(220px, 38vh, 340px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-link, .btn-link:hover, .btn-link:active {
    transition: none;
    transform: none;
  }
}
