:root {
  color-scheme: dark;
  --gold: #dcc58c;
  --ink: #10100e;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { background: var(--ink); }
body {
  margin: 0;
  color: #fff8e3;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #10100e;
}

body::before, body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
body::before {
  background: url("background.webp") center / cover no-repeat;
  opacity: .62;
}
body::after {
  background:
    radial-gradient(ellipse at 50% 38%, rgba(168, 139, 68, .12), transparent 65%),
    linear-gradient(180deg, rgba(9, 10, 8, .32), rgba(8, 9, 7, .7));
}

main {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 40px 24px;
}
.landing {
  position: relative;
  isolation: isolate;
  width: min(1280px, 100%);
  min-height: 570px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
.landing::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: -8% 0;
  background: url("header.webp") 57% center / cover no-repeat;
  filter: blur(54px);
  opacity: .28;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 22%, rgba(0, 0, 0, .65) 52%, transparent 82%);
  mask-image: radial-gradient(ellipse at center, #000 22%, rgba(0, 0, 0, .65) 52%, transparent 82%);
  pointer-events: none;
}
.scene-art {
  --edge-x: linear-gradient(90deg,
    transparent 0%, rgba(0, 0, 0, .04) 3%, rgba(0, 0, 0, .18) 7%,
    rgba(0, 0, 0, .5) 12%, rgba(0, 0, 0, .82) 17%, #000 23%,
    #000 77%, rgba(0, 0, 0, .82) 83%, rgba(0, 0, 0, .5) 88%,
    rgba(0, 0, 0, .18) 93%, rgba(0, 0, 0, .04) 97%, transparent 100%);
  --edge-y: linear-gradient(180deg,
    transparent 0%, rgba(0, 0, 0, .04) 3%, rgba(0, 0, 0, .18) 7%,
    rgba(0, 0, 0, .5) 12%, rgba(0, 0, 0, .82) 17%, #000 24%,
    #000 66%, rgba(0, 0, 0, .88) 73%, rgba(0, 0, 0, .62) 81%,
    rgba(0, 0, 0, .3) 89%, rgba(0, 0, 0, .06) 97%, transparent 100%);
  position: absolute;
  z-index: -1;
  inset: -4% 0;
  background: url("header.webp") 57% center / cover no-repeat;
  -webkit-mask-image: var(--edge-x), var(--edge-y);
  -webkit-mask-composite: source-in;
  mask-image: var(--edge-x), var(--edge-y);
  mask-composite: intersect;
}
.brand-block {
  display: grid;
  justify-items: center;
  align-content: center;
  position: relative;
  padding: 12px 0 56px 72px;
  gap: 18px;
}
.brand-logo {
  display: block;
  width: min(500px, 100%);
  height: auto;
  aspect-ratio: 549 / 282;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .5));
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
#join-form { margin: 0; max-width: 100%; }
.join-button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 66px;
  max-width: 100%;
  padding: 0 42px 0 29px;
  border: 1px solid #af9560;
  border-radius: 3px;
  background: #aa9362 url("button.webp") center / 100% 100% no-repeat;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .45), 0 0 30px rgba(199, 163, 74, .16);
  color: #201b13;
  cursor: pointer;
  font: 750 16px/1.3 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-shadow: 0 1px rgba(255, 243, 201, .3);
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}
.join-button::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 1px;
  overflow: hidden;
  background: linear-gradient(110deg, transparent 32%, rgba(255, 241, 195, .3) 50%, transparent 68%);
  background-size: 300% 100%;
  animation: gold-glint 5s ease-in-out infinite;
  pointer-events: none;
}
.join-button svg { width: 26px; height: 26px; flex: 0 0 auto; }
.join-button:hover {
  filter: brightness(1.13);
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .5), 0 0 38px rgba(214, 177, 85, .25);
}
.join-button:focus-visible { outline: 3px solid #fff1c8; outline-offset: 6px; }
.join-button:disabled { opacity: .78; cursor: wait; transform: none; }
#join-status {
  position: absolute;
  top: calc(100% - 30px);
  left: 72px;
  right: 0;
  margin: 0;
  color: #e7d4a3;
  font-size: 12px;
  text-align: center;
}
@keyframes gold-glint {
  0%, 65% { background-position: 100% 0; opacity: 0; }
  72% { opacity: 1; }
  95%, 100% { background-position: 0 0; opacity: 0; }
}

@media (max-width: 760px) {
  main { padding: 28px 16px; }
  .landing {
    width: min(520px, 100%);
    min-height: 650px;
    grid-template-columns: 1fr;
    align-items: end;
  }
  .scene-art {
    --edge-x: linear-gradient(90deg,
      transparent 0%, rgba(0, 0, 0, .04) 3%, rgba(0, 0, 0, .18) 6%,
      rgba(0, 0, 0, .5) 10%, rgba(0, 0, 0, .82) 15%, #000 21%,
      #000 79%, rgba(0, 0, 0, .82) 85%, rgba(0, 0, 0, .5) 90%,
      rgba(0, 0, 0, .18) 94%, rgba(0, 0, 0, .04) 97%, transparent 100%);
    --edge-y: linear-gradient(180deg,
      transparent 0%, rgba(0, 0, 0, .04) 3%, rgba(0, 0, 0, .18) 6%,
      rgba(0, 0, 0, .5) 10%, rgba(0, 0, 0, .82) 15%, #000 22%,
      #000 58%, rgba(0, 0, 0, .9) 65%, rgba(0, 0, 0, .68) 74%,
      rgba(0, 0, 0, .35) 84%, rgba(0, 0, 0, .08) 94%, transparent 100%);
    inset: 0 0 24%;
    background-position: 67% top;
    background-size: auto 100%;
  }
  .landing::before {
    inset: 0 0 24%;
    background-position: 67% top;
    background-size: auto 100%;
    filter: blur(44px);
  }
  .brand-block { padding: 0 0 44px; gap: 12px; }
  .brand-logo { width: min(380px, 100%); }
  .join-button { min-height: 64px; padding: 0 40px 0 23px; font-size: 15px; }
  #join-status { top: calc(100% - 20px); left: 0; }
}
@media (max-width: 380px) {
  main { padding-inline: 12px; }
  .landing { min-height: 580px; }
  .join-button { padding-inline: 20px 37px; gap: 10px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  main { padding: 12px 20px; }
  .landing { width: min(900px, 100%); min-height: 390px; grid-template-columns: 1fr 1fr; align-items: center; }
  .scene-art { inset: 0; background-position: 57% center; background-size: cover; }
  .landing::before { inset: 0; background-position: 57% center; background-size: cover; }
  .brand-block { padding: 0 0 20px 36px; gap: 0; }
  .brand-logo { width: min(350px, 100%); }
  .join-button { min-height: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
