:root {
  color-scheme: dark;
  --bg: #010103;
  --panel: rgba(2, 3, 7, 0.7);
  --red: #ff214d;
  --gold: #ffe600;
  --cyan: #00f6ff;
  --white: #f9fbff;
  --muted: #aeb8c4;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--white);
  font-family: Rajdhani, Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  min-height: 46px;
  border: 1px solid rgba(255, 230, 0, 0.5);
  border-radius: 8px;
  background: linear-gradient(135deg, #ff2048, #ff7a00);
  color: #030303;
  padding: 10px 18px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 26px rgba(255, 33, 77, 0.5);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

button:hover {
  transform: translateY(-2px);
  filter: saturate(1.2);
  box-shadow: 0 0 34px rgba(255, 230, 0, 0.28), 0 0 34px rgba(255, 33, 77, 0.58);
}

input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(0, 246, 255, 0.28);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--white);
  padding: 10px 13px;
  outline: 0;
  box-shadow: inset 0 0 18px rgba(0, 246, 255, 0.08);
}

input:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

img {
  max-width: 100%;
}

.noise,
.pulse-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.noise {
  z-index: -1;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.08), transparent 20rem),
    radial-gradient(circle at 20% 28%, rgba(0, 246, 255, 0.18), transparent 30rem),
    radial-gradient(circle at 80% 28%, rgba(255, 33, 77, 0.24), transparent 30rem),
    radial-gradient(circle at 50% 90%, rgba(255, 230, 0, 0.13), transparent 34rem);
  animation: aura 7s ease-in-out infinite alternate;
}

.pulse-field {
  z-index: -2;
  background:
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 8px),
    radial-gradient(ellipse at center, transparent 0 35%, rgba(0, 0, 0, 0.5) 78%),
    #010103;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 36px);
}

.gate-stage {
  width: min(1180px, 100%);
  display: grid;
  place-items: center;
  gap: clamp(18px, 3vw, 28px);
  animation: stage-in 640ms ease both;
}

.gate-stage[hidden],
.brand-stage[hidden] {
  display: none;
}

.dolphin-ritual {
  position: relative;
  width: min(980px, 96vw);
  min-height: clamp(250px, 32vw, 390px);
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.12));
}

#glyphCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.mind-bridge {
  position: relative;
  height: 150px;
  width: min(250px, 26vw);
  display: grid;
  place-items: center;
  z-index: 2;
}

.mind-bridge::before,
.mind-bridge::after,
.mind-bridge span,
.mind-bridge i {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.mind-bridge::before {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 246, 255, 0.58), rgba(255, 230, 0, 0.45), transparent);
  box-shadow: 0 0 26px rgba(0, 246, 255, 0.46), 0 0 18px rgba(255, 230, 0, 0.28);
  animation: thought-static 1.7s linear infinite;
}

.mind-bridge::after {
  width: 16px;
  height: 16px;
  background: var(--gold);
  box-shadow: 0 0 20px var(--gold);
  animation: thought-pulse 1.4s ease-in-out infinite alternate;
}

.mind-bridge span,
.mind-bridge i {
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--gold), var(--red));
  box-shadow: 0 0 22px rgba(255, 230, 0, 0.52);
}

.mind-bridge span {
  right: 50%;
}

.mind-bridge i {
  left: 50%;
}

.gate-stage.is-unlocking .mind-bridge span,
.gate-stage.is-unlocking .mind-bridge i {
  animation: bridge-connect 1.2s ease forwards;
}

.login-card {
  position: relative;
  z-index: 3;
  width: min(460px, 100%);
  border: 1px solid rgba(255, 230, 0, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(2, 3, 7, 0.86), rgba(20, 0, 12, 0.74)),
    var(--panel);
  padding: 22px;
  box-shadow:
    0 0 0 1px rgba(0, 246, 255, 0.08),
    0 26px 90px rgba(0, 0, 0, 0.8),
    0 0 42px rgba(255, 33, 77, 0.32);
  backdrop-filter: blur(18px);
}

.kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Orbitron, Arial, sans-serif;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255, 33, 77, 0.76), 0 0 30px rgba(255, 230, 0, 0.22);
}

h1 {
  display: flex;
  justify-content: center;
  gap: 0.3em;
  margin-bottom: 18px;
  color: #fff;
  font-size: clamp(32px, 7vw, 48px);
  line-height: 0.95;
}

h1 span {
  display: inline-block;
  animation: title-glitch 3.4s ease-in-out infinite;
}

h1 span:nth-child(2) {
  animation-delay: 260ms;
}

.access-form {
  display: grid;
  gap: 10px;
}

.access-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.status-line {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.status-line.is-error {
  color: #ff6a80;
}

.status-line.is-ok {
  color: var(--gold);
}

.success-mark {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--gold);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.success-mark span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(255, 230, 0, 0.34);
}

.success-mark.is-visible {
  display: flex;
  animation: success-pop 420ms ease both;
}

.brand-stage {
  width: min(1180px, 100%);
  display: grid;
  gap: clamp(16px, 3vw, 26px);
  place-items: center;
  animation: stage-in 640ms ease both;
}

.banner-strip {
  position: relative;
  width: 100%;
  max-height: 220px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #000;
  box-shadow: 0 0 32px rgba(255, 255, 255, 0.12), 0 0 42px rgba(255, 33, 77, 0.28);
}

.banner-strip img {
  width: 100%;
  max-height: 220px;
  display: block;
  object-fit: contain;
  padding: clamp(4px, 1vw, 10px);
  animation: banner-breathe 4s ease-in-out infinite alternate;
}

.logo-orbit {
  position: relative;
  width: min(470px, 86vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  perspective: 1100px;
}

.main-logo {
  width: 70%;
  border-radius: 50%;
  filter: drop-shadow(0 0 22px rgba(255, 255, 255, 0.2));
  animation: logo-flip 8s ease-in-out infinite;
  transform-style: preserve-3d;
}

.orbit-ring {
  position: absolute;
  border: 1px solid rgba(255, 230, 0, 0.38);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(255, 230, 0, 0.14);
}

.orbit-a {
  inset: 6%;
  animation: ring-roll 7s linear infinite;
}

.orbit-b {
  inset: 15%;
  border-color: rgba(0, 246, 255, 0.32);
  animation: ring-roll 5s linear reverse infinite;
}

.orbit-dolphin {
  position: absolute;
  inset: 0;
  animation: dolphin-orbit 6.5s linear infinite;
}

.orbit-dolphin img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border: 1px solid rgba(255, 230, 0, 0.5);
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 20px rgba(255, 230, 0, 0.24);
}

.brand-copy {
  max-width: 780px;
  text-align: center;
}

.brand-copy p:last-child {
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
}

.ghost-button {
  background: rgba(0, 0, 0, 0.38);
  color: var(--gold);
}

@keyframes aura {
  from {
    filter: saturate(1) hue-rotate(0deg);
    opacity: 0.72;
  }
  to {
    filter: saturate(1.25) hue-rotate(-8deg);
    opacity: 1;
  }
}

@keyframes stage-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes thought-static {
  from {
    transform: translateY(-3px);
    opacity: 0.45;
  }
  to {
    transform: translateY(3px);
    opacity: 0.9;
  }
}

@keyframes thought-pulse {
  from {
    transform: scale(0.75);
  }
  to {
    transform: scale(1.24);
  }
}

@keyframes bridge-connect {
  to {
    width: 50%;
  }
}

@keyframes title-glitch {
  0%,
  100% {
    transform: translate(0);
  }
  8% {
    transform: translate(1px, -1px);
    text-shadow: 2px 0 var(--cyan), -2px 0 var(--red);
  }
  11% {
    transform: translate(0);
  }
}

@keyframes success-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes banner-breathe {
  from {
    filter: brightness(0.88) drop-shadow(0 0 8px rgba(255, 255, 255, 0.18));
    transform: scale(1);
  }
  to {
    filter: brightness(1.08) drop-shadow(0 0 20px rgba(255, 255, 255, 0.28));
    transform: scale(1.01);
  }
}

@keyframes logo-flip {
  0%,
  100% {
    transform: rotateY(0deg) rotateZ(0deg) scale(1);
  }
  35% {
    transform: rotateY(16deg) rotateZ(-2deg) scale(1.03);
  }
  65% {
    transform: rotateY(-14deg) rotateZ(2deg) scale(1.01);
  }
}

@keyframes ring-roll {
  from {
    transform: rotateX(68deg) rotateZ(0deg);
  }
  to {
    transform: rotateX(68deg) rotateZ(360deg);
  }
}

@keyframes dolphin-orbit {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 760px) {
  .shell {
    align-content: center;
    padding: 14px;
  }

  .dolphin-ritual {
    min-height: 170px;
  }

  .login-card {
    padding: 18px;
  }

  .access-row {
    grid-template-columns: 1fr;
  }

  h1 {
    flex-wrap: wrap;
    font-size: clamp(30px, 10vw, 42px);
  }

  h2 {
    font-size: clamp(34px, 11vw, 48px);
  }

  .logo-orbit {
    width: min(360px, 92vw);
  }
}
