:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #020714;
  color: #ffffff;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: #020714;
}

.signin-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(18px, 4vw, 56px);
  background: #020714;
}

.signin-shell::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: 3;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.76' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.58'/%3E%3C/svg%3E");
  animation: signinShellGrain 13s steps(8) infinite;
}

.signin-shell::after {
  content: "";
  position: absolute;
  inset: auto -18% -30% -18%;
  z-index: 2;
  height: 58%;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 51% 16%, rgba(255, 122, 24, 0.36), transparent 33%),
    radial-gradient(ellipse at 37% 32%, rgba(219, 36, 89, 0.2), transparent 41%),
    radial-gradient(ellipse at 66% 28%, rgba(0, 120, 212, 0.24), transparent 46%);
  filter: blur(5px);
}

.signin-shell-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #020714;
}

.signin-shell-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 43%, transparent 0 23%, rgba(0, 0, 0, 0.1) 45%, rgba(0, 0, 0, 0.66) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.52), transparent 29%, transparent 63%, rgba(0, 0, 0, 0.86)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.58), transparent 31%, transparent 69%, rgba(0, 0, 0, 0.56));
}

.signin-panel {
  position: relative;
  z-index: 4;
  width: min(100%, 900px);
  min-height: min(74vh, 680px);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: clamp(18px, 3.4vw, 30px);
  text-align: center;
  transform: translateY(-1.5vh);
}

.signin-panel::before {
  content: "";
  position: absolute;
  z-index: -2;
  top: 45%;
  left: 50%;
  width: min(112%, 980px);
  height: min(72vh, 620px);
  border-radius: 42px;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(0, 0, 0, 0.78) 0 18%, rgba(0, 0, 0, 0.56) 38%, rgba(0, 0, 0, 0.18) 65%, transparent 80%),
    radial-gradient(ellipse at 31% 36%, rgba(124, 249, 255, 0.16), transparent 43%),
    radial-gradient(ellipse at 72% 45%, rgba(255, 196, 88, 0.16), transparent 46%);
  filter: blur(16px);
  transform: translate(-50%, -50%);
}

.signin-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 48%;
  left: 50%;
  width: min(88vw, 760px);
  height: min(46vh, 340px);
  border-radius: 999px;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.08), transparent 29%),
    radial-gradient(ellipse at 31% 41%, rgba(0, 120, 212, 0.18), transparent 45%),
    radial-gradient(ellipse at 70% 56%, rgba(255, 122, 24, 0.18), transparent 45%);
  filter: blur(18px);
  opacity: 0.82;
  transform: translate(-50%, -50%);
}

.signin-logo {
  width: min(82vw, 760px);
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  filter:
    drop-shadow(0 4px 1px rgba(0, 0, 0, 0.5))
    drop-shadow(0 24px 48px rgba(0, 0, 0, 0.68))
    drop-shadow(0 0 26px rgba(255, 255, 255, 0.18));
  transform: scale(0.94);
  transform-origin: center;
}

.signin-copy {
  display: grid;
  gap: 9px;
  justify-items: center;
  max-width: min(88vw, 640px);
  text-wrap: balance;
}

.signin-kicker,
.signin-copy p {
  margin: 0;
  color: rgba(255, 250, 246, 0.84);
  font-size: clamp(0.95rem, 1.8vw, 1.08rem);
  line-height: 1.5;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.56);
}

.signin-kicker {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.signin-copy h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.6rem, 8vw, 5.8rem);
  font-weight: 850;
  line-height: 0.94;
  letter-spacing: 0;
  text-shadow:
    0 3px 2px rgba(0, 0, 0, 0.42),
    0 18px 46px rgba(0, 0, 0, 0.58),
    0 0 34px rgba(0, 120, 212, 0.3),
    0 0 24px rgba(255, 122, 24, 0.18);
}

.signin-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 198px);
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  overflow: hidden;
  background:
    linear-gradient(135deg, #db2459 0%, #ff7a18 46%, #0078d4 100%);
  color: #ffffff;
  font-weight: 850;
  text-decoration: none;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.46),
    0 0 30px rgba(255, 122, 24, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.signin-button::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 0 26%, rgba(255, 255, 255, 0.28) 44%, transparent 62% 100%);
  opacity: 0.32;
  transform: translateX(-42%);
  transition:
    opacity 160ms ease,
    transform 220ms ease;
}

.signin-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.44);
  box-shadow:
    0 22px 52px rgba(0, 0, 0, 0.52),
    0 0 38px rgba(0, 120, 212, 0.3),
    0 0 34px rgba(255, 122, 24, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.signin-button:hover::before {
  opacity: 0.5;
  transform: translateX(36%);
}

.signin-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.76);
  outline-offset: 4px;
}

@keyframes signinShellGrain {
  to {
    transform: translate3d(-8%, 7%, 0);
  }
}

@media (max-width: 820px) {
  .signin-panel {
    min-height: 78vh;
    gap: 22px;
    transform: translateY(-3vh);
  }

  .signin-logo {
    width: min(86vw, 560px);
  }

  .signin-copy h1 {
    font-size: clamp(2.35rem, 10.5vw, 4.4rem);
  }
}

@media (max-width: 520px) {
  .signin-shell {
    padding: 20px;
  }

  .signin-panel {
    width: 100%;
    min-height: 82vh;
    gap: 20px;
    transform: translateY(-4vh);
  }

  .signin-logo {
    width: min(82vw, 400px);
  }

  .signin-kicker {
    font-size: 0.7rem;
    letter-spacing: 0.13em;
  }

  .signin-copy p {
    max-width: 290px;
  }

  .signin-button {
    width: min(100%, 260px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .signin-shell::before,
  .signin-button,
  .signin-button::before {
    animation: none;
    transition: none;
  }
}
