/* Shared styling for the auth pages. Follows the lab style guide:
   no cards, no boxes — readouts and form fields float on the background.
   Atmosphere (orbits, scanbeam, gradients) matches the landing page exactly. */

:root {
  --bg-0:        #05080F;
  --bg-1:        #080C18;
  --bg-2:        #0C1322;
  --surface-1:   rgba(255,255,255,0.025);
  --edge:        rgba(94,234,212,0.18);
  --edge-soft:   rgba(255,255,255,0.06);

  --text:        #E8EEF7;
  --text-mid:    #9AA8C0;
  --muted:       #5C6A82;

  --cyan:        #5EEAD4;
  --cyan-dim:    #2DD4BF;
  --blue:        #4F8CFF;
  --ember:       #E8512A;
  --ember-lt:    #FF8B5C;
  --amber:       #E8A317;
  --grid:        rgba(94,234,212,0.045);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg-0);
  color: var(--text);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── atmosphere — same as the landing page ───────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: -10%;
  background:
    radial-gradient(50% 60% at 80% 8%, rgba(79,140,255,0.18), transparent 65%),
    radial-gradient(45% 55% at 12% 92%, rgba(94,234,212,0.10), transparent 65%),
    radial-gradient(60% 50% at 50% 55%, rgba(232,81,42,0.05), transparent 75%);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  animation: drift 40s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 1.5%, 0) scale(1.05); }
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg,
      rgba(255,255,255,0.012) 0,
      rgba(255,255,255,0.012) 1px,
      transparent 1px,
      transparent 3px),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  background-size: auto, 400px 400px;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 9999;
  opacity: 0.55;
}

.scanbeam {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.scanbeam::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 8vh;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(94,234,212,0.04) 25%,
    rgba(94,234,212,0.075) 50%,
    rgba(94,234,212,0.04) 75%,
    transparent 100%);
  animation: scan 12s linear infinite;
  will-change: transform;
}
@keyframes scan {
  0%   { transform: translate3d(0, 100vh, 0); }
  75%  { transform: translate3d(0, -10vh, 0); }
  100% { transform: translate3d(0, -10vh, 0); }
}

.hud-bracket {
  position: fixed;
  width: 26px;
  height: 26px;
  border-color: var(--cyan);
  border-style: solid;
  border-width: 0;
  pointer-events: none;
  z-index: 5;
  opacity: 0.55;
}
.hud-bracket.tl { top: 18px; left: 18px;  border-top-width: 1px; border-left-width: 1px;  }
.hud-bracket.tr { top: 18px; right: 18px; border-top-width: 1px; border-right-width: 1px; }
.hud-bracket.bl { bottom: 18px; left: 18px;  border-bottom-width: 1px; border-left-width: 1px;  }
.hud-bracket.br { bottom: 18px; right: 18px; border-bottom-width: 1px; border-right-width: 1px; }

.orbits {
  position: fixed;
  top: -240px;
  right: -280px;
  width: 1020px;
  height: 1020px;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
  animation: orbitSpin 260s linear infinite;
  will-change: transform;
}
.orbits-2 {
  position: fixed;
  bottom: -360px;
  left: -340px;
  width: 920px;
  height: 920px;
  opacity: 0.10;
  pointer-events: none;
  z-index: 0;
  animation: orbitSpin 360s linear infinite reverse;
}
@keyframes orbitSpin { to { transform: rotate(360deg); } }

/* ── stage — full viewport, content floats ───────────────────────────── */
.stage {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 88px 36px;
}

.wordmark {
  font-family: 'Major Mono Display', 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: clamp(36px, 6vw, 72px);
  letter-spacing: 0.14em;
  line-height: 0.98;
  color: var(--text);
  text-transform: lowercase;
  text-shadow:
    0 0 22px rgba(94,234,212,0.18),
    0 0 60px rgba(79,140,255,0.10);
  text-decoration: none;
  display: inline-block;
}
.wordmark .dot {
  color: var(--ember);
  text-shadow:
    0 0 18px rgba(232,81,42,0.6),
    0 0 40px rgba(232,81,42,0.35);
}
.wordmark-sub {
  display: block;
  width: 44px;
  height: 1px;
  background: var(--cyan);
  margin: 22px auto 0;
  opacity: 0.55;
  box-shadow: 0 0 12px rgba(94,234,212,0.6);
}

.eyebrow {
  margin-top: 56px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-mid);
}

/* ── form — instrument-style fields, no card ─────────────────────────── */
.form {
  width: 100%;
  max-width: 540px;
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.form.wide { max-width: 640px; }

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.field label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-mid);
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--edge-soft);
  border-radius: 0;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 300;
  padding: 8px 0 12px;
  outline: none;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.field input:hover { border-bottom-color: rgba(94,234,212,0.28); }
.field input:focus,
.field textarea:focus {
  border-bottom-color: var(--cyan);
  box-shadow: 0 1px 0 0 rgba(94,234,212,0.35);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); }
.field textarea {
  resize: none;
  min-height: 96px;
  border-bottom: 1px solid var(--edge-soft);
  font-size: 16px;
  line-height: 1.55;
}

.hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-mid);
  line-height: 1.65;
  max-width: 540px;
}

/* ── primary action — wide, bare, instrument-style ───────────────────── */
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 12px;
}
button.primary {
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  color: var(--cyan);
  font-family: 'Major Mono Display', 'JetBrains Mono', monospace;
  font-size: 22px;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  padding: 6px 0;
  cursor: pointer;
  text-shadow: 0 0 18px rgba(94,234,212,0.25);
  transition: color 0.2s ease, text-shadow 0.2s ease, letter-spacing 0.4s ease;
  position: relative;
}
button.primary::after {
  content: ' →';
  display: inline-block;
  margin-left: 12px;
  transition: margin-left 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
button.primary:hover:not([disabled]) {
  color: #BDF7EC;
  text-shadow: 0 0 24px rgba(94,234,212,0.55);
}
button.primary:hover:not([disabled])::after {
  margin-left: 18px;
}
button.primary[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

button.ghost {
  background: transparent;
  border: 0;
  color: var(--text-mid);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 0;
  cursor: pointer;
  border-bottom: 1px dotted rgba(154,168,192,0.3);
  transition: color 0.2s ease, border-color 0.2s ease;
}
button.ghost:hover { color: var(--cyan); border-bottom-color: rgba(94,234,212,0.45); }

/* ── auxiliary links row ─────────────────────────────────────────────── */
.row-links {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-mid);
  letter-spacing: 0.04em;
}
.row-links a {
  color: var(--text-mid);
  text-decoration: none;
  border-bottom: 1px dotted rgba(154,168,192,0.3);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.row-links a:hover {
  color: var(--cyan);
  border-bottom-color: rgba(94,234,212,0.5);
}

/* ── status line ─────────────────────────────────────────────────────── */
.status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  min-height: 1em;
  margin-top: -16px;
}
.status.error { color: var(--ember); text-shadow: 0 0 12px rgba(232,81,42,0.4); }
.status.ok    { color: var(--cyan);  text-shadow: 0 0 12px rgba(94,234,212,0.35); }
.status.muted { color: var(--text-mid); }

/* ── topbar (used on profile) ────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 22px;
  right: 60px;
  display: flex;
  gap: 28px;
  z-index: 6;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.topbar a, .topbar button {
  background: transparent;
  border: 0;
  color: var(--text-mid);
  text-decoration: none;
  padding: 0;
  cursor: pointer;
  border-bottom: 1px dotted rgba(154,168,192,0.3);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.topbar a:hover, .topbar button:hover {
  color: var(--cyan);
  border-bottom-color: rgba(94,234,212,0.45);
}

/* ── responsive ──────────────────────────────────────────────────────── */
@media (max-width: 540px) {
  .stage { padding: 60px 24px; }
  .field input[type="text"],
  .field input[type="email"],
  .field input[type="password"] { font-size: 17px; }
  button.primary { font-size: 18px; }
  .topbar { right: 24px; gap: 18px; }
}
