:root {
  --blue-950: #061225;
  --blue-900: #081a35;
  --blue-800: #0d2d5d;
  --blue-600: #245b9c;
  --red: #c7192f;
  --red-soft: #ff3550;
  --white: #f7fbff;
  --muted: #aebbd0;
  --line: rgba(255, 255, 255, .16);
}

* {
  box-sizing: border-box;
}

body.preview-gate {
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 16% 18%, rgba(199, 25, 47, .32), transparent 27%),
    radial-gradient(circle at 86% 10%, rgba(255, 255, 255, .2), transparent 22%),
    radial-gradient(circle at 74% 82%, rgba(36, 91, 156, .46), transparent 32%),
    linear-gradient(135deg, var(--blue-950), var(--blue-900) 48%, #0a1f46);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.preview-gate::before,
body.preview-gate::after {
  position: fixed;
  inset: -28%;
  z-index: 0;
  content: "";
  pointer-events: none;
}

body.preview-gate::before {
  background:
    linear-gradient(104deg, transparent 0 56%, rgba(255, 255, 255, .88) 56.3% 61.2%, transparent 61.5%),
    linear-gradient(104deg, transparent 0 61%, rgba(199, 25, 47, .92) 61.2% 64.5%, transparent 64.8%),
    linear-gradient(104deg, transparent 0 67%, rgba(36, 91, 156, .78) 67.2% 72.5%, transparent 72.8%);
  filter: blur(.2px);
  opacity: .9;
  transform: translate3d(0, 0, 0) rotate(0deg);
  animation: gateSweep 16s ease-in-out infinite alternate;
}

body.preview-gate::after {
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 74%);
  opacity: .55;
  animation: gateGrid 20s linear infinite;
}

.gate-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .78;
}

.gate-dog-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.gate-dog-light {
  position: absolute;
  right: -14vw;
  top: -8vh;
  width: min(980px, 72vw);
  height: min(820px, 78vh);
  border-radius: 44% 56% 58% 42%;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, .86), rgba(255, 255, 255, .58) 38%, rgba(225, 237, 251, .28) 62%, transparent 76%),
    linear-gradient(135deg, rgba(255, 255, 255, .64), rgba(84, 139, 202, .12));
  filter: blur(2px);
  opacity: .78;
  transform: rotate(-7deg);
  animation: gateLightDrift 18s ease-in-out infinite alternate;
}

.gate-dog {
  position: absolute;
  display: block;
  max-width: none;
  object-fit: contain;
  user-select: none;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 0 38%, rgba(0, 0, 0, .74) 54%, transparent 78%);
  mask-image: radial-gradient(ellipse at 50% 50%, #000 0 38%, rgba(0, 0, 0, .74) 54%, transparent 78%);
  filter: grayscale(.08) saturate(.76) contrast(.94) blur(.2px) drop-shadow(0 34px 54px rgba(7, 18, 37, .1));
  animation: gateDogFloat 14s ease-in-out infinite alternate;
}

.gate-dog-1 {
  left: -10vw;
  bottom: -11vh;
  width: min(840px, 58vw);
  opacity: .075;
  transform: rotate(-4deg);
  animation-duration: 17s;
  -webkit-mask-image: radial-gradient(ellipse at 45% 55%, #000 0 34%, rgba(0, 0, 0, .55) 54%, transparent 80%);
  mask-image: radial-gradient(ellipse at 45% 55%, #000 0 34%, rgba(0, 0, 0, .55) 54%, transparent 80%);
}

.gate-dog-2 {
  right: 33vw;
  bottom: -28vh;
  height: min(820px, 92vh);
  opacity: .055;
  transform: rotate(7deg);
  animation-duration: 19s;
  -webkit-mask-image: radial-gradient(ellipse at 50% 48%, #000 0 36%, rgba(0, 0, 0, .52) 55%, transparent 81%);
  mask-image: radial-gradient(ellipse at 50% 48%, #000 0 36%, rgba(0, 0, 0, .52) 55%, transparent 81%);
}

.gate-dog-3 {
  right: -5vw;
  top: 6vh;
  width: min(780px, 55vw);
  opacity: .105;
  transform: rotate(-2deg);
  animation-duration: 16s;
  -webkit-mask-image: radial-gradient(ellipse at 52% 50%, #000 0 42%, rgba(0, 0, 0, .48) 62%, transparent 84%);
  mask-image: radial-gradient(ellipse at 52% 50%, #000 0 42%, rgba(0, 0, 0, .48) 62%, transparent 84%);
}

.gate-dog-4 {
  right: 5vw;
  bottom: 3vh;
  width: min(430px, 34vw);
  opacity: .12;
  transform: rotate(4deg);
  animation-duration: 15s;
  -webkit-mask-image: radial-gradient(ellipse at 50% 48%, #000 0 34%, rgba(0, 0, 0, .54) 57%, transparent 82%);
  mask-image: radial-gradient(ellipse at 50% 48%, #000 0 34%, rgba(0, 0, 0, .54) 57%, transparent 82%);
}

.gate-shell {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: min(680px, calc(100vw - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 46px 0;
}

.gate-panel {
  position: relative;
  width: 100%;
  padding: clamp(26px, 4.5vw, 46px);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 36px;
  background:
    linear-gradient(135deg, rgba(11, 39, 82, .82), rgba(8, 18, 37, .42)),
    rgba(6, 18, 37, .34);
  box-shadow: 0 34px 90px rgba(0, 0, 0, .28);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.gate-panel::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 22% 22%, rgba(255, 255, 255, .16), transparent 19%),
    linear-gradient(120deg, transparent, rgba(255, 255, 255, .08), transparent);
  transform: translateX(-28%);
  animation: gateGlow 7s ease-in-out infinite;
}

.gate-mark,
.gate-kicker,
.gate-panel h1,
.gate-lead,
.gate-stripes,
.gate-login-title,
.gate-form,
.gate-made-by {
  position: relative;
  z-index: 1;
}

.gate-mark {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.gate-mark img {
  width: 68px;
  height: 68px;
  border: 2px solid rgba(255, 255, 255, .8);
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 18px 36px rgba(0, 0, 0, .24);
}

.gate-kicker,
.gate-login-title {
  margin: 0 0 10px;
  color: #ffaf7a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.gate-panel h1 {
  max-width: 520px;
  margin: 0;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: clamp(54px, 8vw, 92px);
  font-weight: 900;
  line-height: .82;
  letter-spacing: -.02em;
  text-transform: uppercase;
}

.gate-lead {
  max-width: 390px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, .78);
  font-size: clamp(14px, 1.7vw, 17px);
  line-height: 1.45;
}

.gate-stripes {
  display: flex;
  gap: 8px;
  margin-top: 26px;
}

.gate-stripes span {
  display: block;
  height: 6px;
  border-radius: 999px;
}

.gate-stripes span:nth-child(1) {
  width: 76px;
  background: var(--red);
}

.gate-stripes span:nth-child(2) {
  width: 132px;
  background: var(--white);
}

.gate-stripes span:nth-child(3) {
  width: 190px;
  background: #2f75c4;
}

.gate-login-title {
  margin-top: 30px;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, .72);
  font-size: 10px;
}

.gate-error {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 53, 80, .42);
  border-radius: 16px;
  background: rgba(199, 25, 47, .18);
  color: #ffd8de;
  font-size: 13px;
  font-weight: 800;
}

.gate-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gate-form label {
  display: grid;
  gap: 8px;
}

.gate-form span {
  color: rgba(255, 255, 255, .62);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.gate-form input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 18px;
  outline: 0;
  background: rgba(255, 255, 255, .1);
  color: var(--white);
  padding: 14px 14px;
  font: 800 15px/1 Inter, sans-serif;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.gate-form input:focus {
  border-color: rgba(255, 255, 255, .78);
  background: rgba(255, 255, 255, .16);
  box-shadow: 0 0 0 4px rgba(36, 91, 156, .28);
}

.gate-form button {
  grid-column: 1 / -1;
  margin-top: 4px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #e8f2ff 55%, #ffffff);
  color: #123263;
  padding: 15px 18px;
  font: 900 13px/1 Inter, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 20px 44px rgba(0, 0, 0, .28);
  transition: transform .2s ease, box-shadow .2s ease;
}

.gate-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 54px rgba(0, 0, 0, .34);
}

.gate-made-by {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  color: rgba(255, 255, 255, .48);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.gate-made-by img {
  width: 142px;
  height: auto;
  filter: invert(1);
  opacity: .86;
}

@keyframes gateSweep {
  from {
    transform: translate3d(-2%, -2%, 0) rotate(0deg);
  }

  to {
    transform: translate3d(4%, 3%, 0) rotate(1deg);
  }
}

@keyframes gateGrid {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(44px, 44px, 0);
  }
}

@keyframes gateGlow {
  0%, 100% {
    transform: translateX(-34%);
    opacity: .42;
  }

  50% {
    transform: translateX(26%);
    opacity: .78;
  }
}

@keyframes gateLightDrift {
  from {
    transform: translate3d(-1.5vw, -1vh, 0) rotate(-7deg) scale(1);
  }

  to {
    transform: translate3d(2vw, 2vh, 0) rotate(-4deg) scale(1.04);
  }
}

@keyframes gateDogFloat {
  from {
    translate: 0 0;
  }

  to {
    translate: 1.3vw -1.8vh;
  }
}

@media (max-width: 880px) {
  body.preview-gate {
    overflow: auto;
  }

  .gate-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 28px 0 84px;
  }

  .gate-panel {
    padding: 28px;
    border-radius: 28px;
  }

  .gate-panel h1 {
    font-size: clamp(48px, 16vw, 68px);
  }

  .gate-form {
    grid-template-columns: 1fr;
  }

  .gate-dog-light {
    right: -42vw;
    top: 4vh;
    width: 110vw;
    height: 58vh;
    opacity: .62;
  }

  .gate-dog-1,
  .gate-dog-2 {
    display: none;
  }

  .gate-dog-3 {
    right: -36vw;
    top: 7vh;
    width: 118vw;
    opacity: .08;
  }

  .gate-dog-4 {
    right: -14vw;
    bottom: 9vh;
    width: 66vw;
    opacity: .075;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
