:root {
  color-scheme: dark;
  --color-navy: #081b2f;
  --color-blue: #0b2037;
  --color-blue-mid: #174967;
  --color-blue-light: #2e6f8d;
  --color-gold: #f5bb62;
  --color-gold-light: #ffdb93;
  --color-ivory: #fff8e9;
  --color-text: #e3edf6;
  --color-muted: #a2bdd0;
  --font-sans: 'Avenir Next', Avenir, 'Segoe UI', sans-serif;
  --font-display: 'Avenir Next Condensed', 'Avenir Next', Avenir, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--color-navy);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--color-text);
  background:
    radial-gradient(circle at 78% 28%, rgb(46 111 141 / 46%), transparent 33%),
    radial-gradient(circle at 30% -20%, rgb(45 110 143 / 45%), transparent 37%),
    linear-gradient(150deg, #0d2d49, var(--color-navy) 68%);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: 20;
  inset: 8px;
  border: 1px solid rgb(245 187 98 / 42%);
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 3%);
  content: '';
  pointer-events: none;
}

.luck-page {
  position: relative;
  display: grid;
  min-height: 100svh;
  padding: 31px clamp(30px, 6vw, 96px) 25px;
  overflow: hidden;
  grid-template-rows: auto 1fr;
  isolation: isolate;

  .luck-page__aurora {
    position: absolute;
    z-index: -3;
    top: -44%;
    left: 52%;
    width: 74vw;
    height: 98vw;
    border: 1px solid rgb(255 219 147 / 7%);
    border-radius: 50%;
    box-shadow:
      0 0 0 90px rgb(255 219 147 / 2%),
      0 0 0 180px rgb(255 219 147 / 1%);
    transform: translateX(-50%);
  }

  .luck-page__grain {
    position: absolute;
    z-index: -2;
    inset: 0;
    background-image: radial-gradient(rgb(255 255 255 / 8%) 0.6px, transparent 0.6px);
    background-size: 11px 11px;
    mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
    opacity: 0.22;
  }

  .luck-page__header {
    position: relative;
    z-index: 3;
    display: flex;
    width: 100%;
    max-width: 1440px;
    margin-inline: auto;
    align-items: center;
    justify-content: flex-start;
  }

  .luck-page__logo {
    width: clamp(178px, 18vw, 224px);
    height: auto;
    filter: drop-shadow(0 5px 18px rgb(1 20 37 / 34%));
  }

  .luck-page__hero {
    display: grid;
    width: 100%;
    max-width: 1440px;
    margin-inline: auto;
    padding-block: clamp(38px, 6vh, 82px);
    align-items: center;
    gap: clamp(56px, 8vw, 126px);
    grid-template-columns: minmax(0, 1.08fr) minmax(370px, 0.92fr);
  }

  .luck-page__copy {
    position: relative;
    z-index: 2;
    max-width: 760px;
  }

  .luck-page__eyebrow {
    display: flex;
    margin: 0 0 22px;
    gap: 14px;
    color: var(--color-gold-light);
    font-size: 11px;
    font-weight: 800;
    align-items: center;
    letter-spacing: 0.24em;
    text-transform: uppercase;
  }

  .luck-page__eyebrow::before {
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-gold));
    content: '';
  }

  h1 {
    max-width: 750px;
    margin: 0;
    color: var(--color-ivory);
    font-family: var(--font-display);
    font-size: clamp(58px, min(7vw, 10.8vh), 106px);
    font-weight: 700;
    line-height: 0.94;
    letter-spacing: -0.045em;
    text-wrap: balance;
    text-shadow: 0 5px 34px rgb(1 20 37 / 76%);
    text-transform: uppercase;
  }

  .luck-page__notice {
    display: inline-flex;
    min-height: 46px;
    margin-top: 31px;
    padding-right: 17px;
    border: 1px solid rgb(245 187 98 / 56%);
    border-radius: 9px;
    gap: 13px;
    color: var(--color-gold-light);
    background: rgb(20 61 91 / 74%);
    box-shadow: 0 12px 28px rgb(2 17 33 / 19%);
    font-size: 10px;
    align-items: center;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .luck-page__notice span {
    display: grid;
    width: 44px;
    min-height: 44px;
    border-right: 1px solid rgb(245 187 98 / 42%);
    color: #183653;
    background: linear-gradient(135deg, var(--color-gold-light), #ec9d32);
    font-size: 17px;
    place-items: center;
  }
}

.horizon-scene {
  position: relative;
  min-height: 470px;
  overflow: hidden;

  .horizon-scene__sun {
    position: absolute;
    top: 48%;
    left: 50%;
    width: min(30vw, 390px);
    aspect-ratio: 1;
    border-radius: 50%;
    background:
      radial-gradient(circle at 35% 30%, #fff6d6 0, #ffdb93 21%, #f2a43e 67%, #bd6d18 100%);
    box-shadow:
      0 0 0 18px rgb(245 187 98 / 7%),
      0 0 100px rgb(245 187 98 / 32%),
      inset -18px -22px 32px rgb(138 75 15 / 30%);
    transform: translate(-50%, -50%);
    animation: float-sun 7s ease-in-out infinite;
  }

  .horizon-scene__sun::before,
  .horizon-scene__sun::after {
    position: absolute;
    border: 1px solid rgb(11 32 55 / 26%);
    border-radius: 50%;
    content: '';
  }

  .horizon-scene__sun::before {
    inset: 10%;
  }

  .horizon-scene__sun::after {
    inset: 20%;
    border-style: dashed;
  }

  .horizon-scene__ring {
    position: absolute;
    z-index: -1;
    top: 48%;
    left: 50%;
    border: 1px solid rgb(255 219 147 / 30%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
  }

  .horizon-scene__ring::before,
  .horizon-scene__ring::after {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-gold-light);
    box-shadow: 0 0 13px rgb(255 219 147 / 80%);
    content: '';
  }

  .horizon-scene__ring::before {
    top: 12%;
    left: 16%;
  }

  .horizon-scene__ring::after {
    right: 9%;
    bottom: 22%;
  }

  .horizon-scene__ring--outer {
    width: min(38vw, 500px);
    aspect-ratio: 1;
    animation: turn 28s linear infinite;
  }

  .horizon-scene__ring--inner {
    width: min(34vw, 445px);
    aspect-ratio: 1;
    border-style: dashed;
    opacity: 0.5;
    animation: turn 22s linear infinite reverse;
  }

  .horizon-scene__emblem {
    position: absolute;
    z-index: 2;
    top: 48%;
    left: 50%;
    width: clamp(96px, 10vw, 142px);
    height: auto;
    border-radius: 28%;
    filter: drop-shadow(0 14px 22px rgb(2 17 33 / 30%));
    transform: translate(-50%, -50%);
  }

  .horizon-scene__star {
    position: absolute;
    z-index: 2;
    color: var(--color-gold-light);
    text-shadow: 0 0 18px rgb(255 219 147 / 75%);
    animation: twinkle 3.5s ease-in-out infinite;
  }

  .horizon-scene__star--one {
    top: 13%;
    left: 13%;
    font-size: 22px;
  }

  .horizon-scene__star--two {
    top: 19%;
    right: 9%;
    font-size: 18px;
    animation-delay: -1.2s;
  }

  .horizon-scene__star--three {
    right: 16%;
    bottom: 22%;
    font-size: 13px;
    animation-delay: -2.3s;
  }

  .horizon-scene__wave {
    position: absolute;
    left: 50%;
    width: 150%;
    height: 39%;
    border-radius: 50% 50% 0 0;
    transform: translateX(-50%);
  }

  .horizon-scene__wave--back {
    z-index: 3;
    right: 0;
    bottom: -16%;
    background: #174967;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 9%);
    rotate: -4deg;
  }

  .horizon-scene__wave--middle {
    z-index: 4;
    bottom: -23%;
    background: #103955;
    box-shadow: inset 0 1px 0 rgb(255 219 147 / 12%);
    rotate: 4deg;
  }

  .horizon-scene__wave--front {
    z-index: 5;
    bottom: -29%;
    background: #0a2943;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 6%);
    rotate: -2deg;
  }
}

@keyframes turn {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes float-sun {
  0%,
  100% {
    transform: translate(-50%, -50%) translateY(0);
  }

  50% {
    transform: translate(-50%, -50%) translateY(-12px);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.85);
  }

  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@media (max-width: 900px) {
  .luck-page {
    .luck-page__hero {
      padding-block: 72px 42px;
      gap: 32px;
      grid-template-columns: 1fr;
    }

    h1 {
      max-width: 820px;
      font-size: clamp(58px, 12.6vw, 92px);
    }
  }

  .horizon-scene {
    min-height: 400px;

    .horizon-scene__sun {
      width: 310px;
    }

    .horizon-scene__ring--outer {
      width: 390px;
    }

    .horizon-scene__ring--inner {
      width: 345px;
    }
  }
}

@media (max-width: 600px) {
  body::before {
    inset: 5px;
    border-radius: 13px;
  }

  .luck-page {
    padding: 23px 24px 18px;

    .luck-page__header {
      align-items: flex-start;
      flex-direction: column;
      gap: 16px;
    }

    .luck-page__logo {
      width: 190px;
    }

    .luck-page__hero {
      padding-block: 66px 28px;
    }

    h1 {
      font-size: clamp(50px, 14.8vw, 67px);
      line-height: 0.96;
    }

    .luck-page__notice {
      margin-top: 27px;
    }

  }

  .horizon-scene {
    min-height: 330px;

    .horizon-scene__sun {
      width: 240px;
    }

    .horizon-scene__ring--outer {
      width: 300px;
    }

    .horizon-scene__ring--inner {
      width: 266px;
    }

    .horizon-scene__emblem {
      width: 98px;
    }
  }
}

@media (max-height: 730px) and (min-width: 901px) {
  .luck-page {
    padding-top: 25px;

    .luck-page__logo {
      width: 176px;
    }

    .luck-page__hero {
      padding-block: 28px;
    }

    .luck-page__notice {
      margin-top: 22px;
    }
  }

  .horizon-scene {
    min-height: 390px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .horizon-scene .horizon-scene__sun,
  .horizon-scene .horizon-scene__ring,
  .horizon-scene .horizon-scene__star {
    animation: none;
  }
}
