@font-face {
  font-family: "Happy Season";
  src: url("happy-season-regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Happy Season";
  src: url("happy-season-bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Happy Season";
  src: url("happy-season-semibold.otf") format("opentype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "HappySeasonSemibold";
  src: url("happy-season-semibold.otf") format("opentype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Happy Season";
  src: url("happy-season-extrabold.otf") format("opentype");
  font-weight: 800;
  font-display: swap;
}

:root {
  --brown: #3f281e;
  --red: #e2404b;
  --white: #fff;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: #66cdf1;
  color: var(--brown);
  font-family: "Happy Season", Impact, fantasy;
}

.page {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: url("GESREK FESTIVAL - BG@v2.webp") center / cover no-repeat;
}

.page::before,
.page::after {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  content: "";
}

.page::before {
  background: url("Paper - Screen.jpg") center / cover;
  mix-blend-mode: screen;
  opacity: 0.35;
}

.page::after {
  background: url("Grunge - Overlay.jpg") center / cover;
  mix-blend-mode: overlay;
  opacity: 0.22;
}

.header {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  width: 100%;
  padding: 52px 6.5vw 0;
}

.festival-logo {
  width: 91px;
  height: auto;
}

.hero {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  width: 100%;
  padding: 0 24px;
  text-align: center;
  transform: translateY(-2vh);
}

h1 {
  margin: 0;
}

h1 img {
  display: block;
  width: min(560px, 72vw);
  height: auto;
  /* filter: drop-shadow(6px 7px 0 rgba(63, 40, 30, 0.85)); */
}

.info {
  display: block;
  width: min(520px, 76vw);
  height: auto;
  margin-top: 18px;
  
}

.cta {
  position: relative;
  display: block;
  width: min(170px, 28vw);
  margin-top: 46px;
  /* transform: rotate(-2deg); */
  transform-origin: 16% 86%;
  animation: ticket-idle 2.8s ease-in-out infinite;
  transition:
    filter 180ms ease,
    transform 180ms ease;
  will-change: transform;
}

.cta::after {
  position: absolute;
  inset: 7% 10%;
  z-index: -1;
  border-radius: 18px;
  background: rgba(63, 40, 30, 0.32);
  content: "";
  filter: blur(10px);
  opacity: 0;
  transform: translate(-4px, 9px) scale(0.92);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

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

.cta:hover,
.cta:focus-visible {
  animation-name: ticket-wiggle;
  animation-duration: 620ms;
  animation-timing-function: cubic-bezier(0.2, 0.9, 0.2, 1);
  animation-iteration-count: 1;
  animation-fill-mode: both;
  filter: saturate(1.08);
}

.cta:hover::after,
.cta:focus-visible::after {
  opacity: 1;
  transform: translate(-6px, 14px) scale(1);
}

.cta:active {
  animation: none;
  transform: translate(-2px, 3px) rotate(-5deg) scale(0.98);
}

.cta:focus-visible {
  outline: 4px solid rgba(255, 255, 255, 0.9);
  outline-offset: 8px;
}

@keyframes ticket-idle {
  0%,
  62%,
  100% {
    transform: rotate(-2deg) scale(1);
  }

  68% {
    transform: translate(-1px, -3px) rotate(-6deg) scale(1.025);
  }

  74% {
    transform: translate(2px, -4px) rotate(3deg) scale(1.03);
  }

  81% {
    transform: translate(0, -2px) rotate(-3deg) scale(1.018);
  }

  88% {
    transform: rotate(-2deg) scale(1);
  }
}

@keyframes ticket-wiggle {
  0% {
    transform: translateY(0) rotate(-2deg) scale(1);
  }

  18% {
    transform: translate(-2px, -7px) rotate(-8deg) scale(1.035);
  }

  34% {
    transform: translate(3px, -9px) rotate(5deg) scale(1.045);
  }

  52% {
    transform: translate(-1px, -7px) rotate(-4deg) scale(1.04);
  }

  70% {
    transform: translate(1px, -8px) rotate(2deg) scale(1.045);
  }

  100% {
    transform: translateY(-8px) rotate(1deg) scale(1.045);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta,
  .cta::after {
    transition: none;
  }

  .cta:hover,
  .cta:focus-visible {
    animation: none;
    transform: translateY(-6px) rotate(1deg) scale(1.03);
  }
}

@media (max-width: 760px) {
  .page {
    min-height: 100vh;
    min-height: 100dvh;
    background-position: center;
  }

  .header {
    padding: 28px 20px 0;
  }

  .festival-logo {
    width: 86px;
  }

  .hero {
    transform: translateY(-3vh);
  }

  h1 img {
    width: min(440px, 92vw);
  }

  .info {
    width: min(330px, 90vw);
    margin-top: 24px;
  }

  .cta {
    width: 158px;
  }
}
