/* =============================================================================
   GOLDSIGNAL.UK — INSTITUTIONAL AUTHENTICATION GATEWAY STYLESHEET
   Design: Dark Editorial × Generative Art × Quant Intelligence
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Newsreader:ital,opsz,wght@1,6..72,400;1,6..72,500;1,6..72,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --gate-bg: #040609;
  --gate-surface: #0a0e15;
  --gate-surface-hover: #121822;
  --gate-input-bg: rgba(14, 18, 26, 0.7);
  
  --gold-primary: #e6ca65;
  --gold-champagne: #f3e5ab;
  --gold-amber: #d4af37;
  --gold-glow: rgba(230, 202, 101, 0.18);
  --gold-border: rgba(230, 202, 101, 0.28);
  
  --text-pure: #ffffff;
  --text-main: #f1f4f9;
  --text-muted: #828f9f;
  --text-dim: #455060;
  
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-amber: #f59e0b;
  
  --border-hairline: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(230, 202, 101, 0.45);
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body.auth-body {
  background-color: var(--gate-bg);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ambient Backdrops */
.auth-ambient-grid {
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(rgba(230, 202, 101, 0.025) 1px, transparent 0);
  background-size: 36px 36px;
  pointer-events: none;
  z-index: 1;
}

.auth-ambient-glow {
  position: fixed;
  top: -20vh;
  right: -10vw;
  width: 70vw;
  height: 70vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, rgba(4, 6, 9, 0) 70%);
  pointer-events: none;
  z-index: 1;
}

/* Fullscreen Viewport */
.auth-viewport {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =============================================================================
   TOP TECHNICAL HEADER
   ============================================================================= */
.gate-header {
  height: 72px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-hairline);
  background: rgba(4, 6, 9, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.gate-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  transition: opacity 0.2s;
}

.gate-brand:hover {
  opacity: 0.88;
}

.gate-crest {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(230, 202, 101, 0.08);
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gate-crest img,
.gate-crest-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(230, 202, 101, 0.45));
}

.gate-brand-banner {
  margin-bottom: 24px;
}

.gate-hero-logo {
  height: 38px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  display: block;
}

.gate-title {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: #fff;
}

.gate-title span {
  color: var(--gold-primary);
}

.gate-version-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-hairline);
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.gate-header-telemetry {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.telemetry-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(230, 202, 101, 0.06);
  border: 1px solid rgba(230, 202, 101, 0.2);
  color: var(--gold-champagne);
  font-weight: 600;
}

.telemetry-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-primary);
}

.pulse-amber {
  animation: pulseBeacon 2s infinite ease-in-out;
}

@keyframes pulseBeacon {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(230, 202, 101, 0.6); }
  50% { opacity: 0.5; transform: scale(0.9); box-shadow: 0 0 8px 2px rgba(230, 202, 101, 0.3); }
}

.telemetry-divider {
  width: 1px;
  height: 14px;
  background: var(--border-hairline);
}

/* =============================================================================
   MAIN STAGE: ASYMMETRIC GATE LAYOUT
   ============================================================================= */
.gate-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(440px, 520px) 1fr;
  min-height: calc(100vh - 72px);
}

/* =============================================================================
   LEFT: EDITORIAL AUTHENTICATION PANE
   ============================================================================= */
.gate-editorial-pane {
  padding: 60px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--border-hairline);
  background: linear-gradient(135deg, rgba(8, 12, 18, 0.75) 0%, rgba(4, 6, 9, 0.95) 100%);
  position: relative;
  z-index: 10;
}

.gate-pane-content {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

.gate-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.eyebrow-accent {
  color: var(--gold-primary);
  font-weight: 700;
}

.eyebrow-sep {
  color: var(--text-dim);
}

.gate-heading {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-pure);
  margin-bottom: 16px;
}

.heading-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--gold-champagne);
  letter-spacing: -0.01em;
}

.gate-subtext {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* Error Banner */
.gate-error-banner {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  font-size: 13px;
  margin-bottom: 24px;
  animation: shakeAlert 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shakeAlert {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
  40%, 60% { transform: translate3d(3px, 0, 0); }
}

.error-icon {
  flex-shrink: 0;
  stroke: #ef4444;
}

/* Form Styling */
.gate-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.gate-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gate-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gate-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.label-hint {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 400;
}

.gate-caps-badge {
  display: none;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  letter-spacing: 0.04em;
  animation: blinkCaps 1s infinite alternate;
}

@keyframes blinkCaps {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

.gate-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  stroke: var(--text-dim);
  pointer-events: none;
  transition: stroke 0.2s;
}

.gate-input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 42px;
  background: var(--gate-input-bg);
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  color: var(--text-pure);
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: 0.01em;
  outline: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.gate-input::placeholder {
  color: var(--text-dim);
  font-size: 13px;
}

.gate-input:focus {
  border-color: var(--border-focus);
  background: rgba(18, 24, 34, 0.9);
  box-shadow: 0 0 0 1px var(--border-focus), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.gate-input:focus + .input-icon,
.gate-input-wrapper:focus-within .input-icon {
  stroke: var(--gold-primary);
}

.gate-password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.2s;
}

.gate-password-toggle:hover {
  color: var(--gold-champagne);
}

/* Options Row */
.gate-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -4px;
}

.gate-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.gate-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.custom-check {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--gate-input-bg);
  border: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.gate-checkbox:checked + .custom-check {
  background: var(--gold-primary);
  border-color: var(--gold-primary);
}

.gate-checkbox:checked + .custom-check::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid #040609;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.checkbox-text {
  font-size: 13px;
  color: var(--text-muted);
}

.gate-security-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* Submit Button */
.gate-submit-btn {
  height: 50px;
  width: 100%;
  margin-top: 10px;
  background: linear-gradient(135deg, #e6ca65 0%, #c9a738 100%);
  border: none;
  border-radius: 8px;
  color: #05070a;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(230, 202, 101, 0.2);
  position: relative;
  overflow: hidden;
}

.gate-submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.gate-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(230, 202, 101, 0.35);
}

.gate-submit-btn:hover::before {
  left: 100%;
}

.gate-submit-btn:active {
  transform: translateY(0);
}

.gate-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-arrow {
  transition: transform 0.2s;
}

.gate-submit-btn:hover .btn-arrow {
  transform: translateX(3px);
}

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(5, 7, 10, 0.3);
  border-top-color: #05070a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Footer Disclosure */
.gate-pane-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-hairline);
}

.footer-notice {
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.return-link {
  color: var(--gold-champagne);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  transition: color 0.2s;
}

.return-link:hover {
  color: #fff;
}

.legal-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.legal-link:hover {
  color: var(--text-pure);
}

.dot-sep {
  color: var(--text-dim);
  font-size: 10px;
}

/* =============================================================================
   RIGHT: IMMERSIVE GENERATIVE QUANTUM CANVAS
   ============================================================================= */
.gate-artwork-pane {
  position: relative;
  background: radial-gradient(circle at 60% 40%, rgba(20, 26, 38, 0.5) 0%, rgba(4, 6, 9, 0.98) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.artwork-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gate-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Floating HUD Elements */
.hud-top-meta {
  position: absolute;
  top: 36px;
  right: 48px;
  display: flex;
  gap: 28px;
  pointer-events: none;
  z-index: 10;
}

.hud-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
  font-family: var(--font-mono);
}

.hud-label {
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.hud-val {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-champagne);
  letter-spacing: 0.05em;
}

.hud-center-focus {
  position: absolute;
  pointer-events: none;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.focus-reticle {
  width: 100%;
  height: 100%;
  border: 1px dashed rgba(230, 202, 101, 0.15);
  border-radius: 50%;
  animation: rotateReticle 40s linear infinite;
}

@keyframes rotateReticle {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hud-bottom-meta {
  position: absolute;
  bottom: 40px;
  left: 48px;
  right: 48px;
  pointer-events: none;
  z-index: 10;
  font-family: var(--font-mono);
}

.hud-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-pure);
  margin-bottom: 6px;
}

.hud-desc {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
  max-width: 600px;
  line-height: 1.5;
}

.hud-status-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  color: var(--gold-champagne);
  padding: 6px 12px;
  background: rgba(10, 14, 22, 0.7);
  border: 1px solid var(--border-hairline);
  border-radius: 6px;
  display: inline-flex;
}

.status-indicator.live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
}

.sep {
  color: var(--text-dim);
}

/* =============================================================================
   RESPONSIVE ADAPTATIONS
   ============================================================================= */

/* Laptop (1366px - 1440px) */
@media (max-width: 1440px) {
  .gate-editorial-pane {
    padding: 48px 40px;
  }
  .gate-heading {
    font-size: 38px;
  }
}

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  .gate-main {
    grid-template-columns: 1fr;
  }
  .gate-editorial-pane {
    border-right: none;
    padding: 48px 32px;
  }
  .gate-artwork-pane {
    display: none; /* Hide 3D canvas on tablet for performance and focus */
  }
  .hud-top-meta, .hud-bottom-meta {
    display: none;
  }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
  .gate-header {
    padding: 0 20px;
    height: 64px;
  }
  .gate-header-telemetry {
    display: none;
  }
  .gate-editorial-pane {
    padding: 36px 20px 48px;
  }
  .gate-heading {
    font-size: 32px;
  }
  .gate-pane-footer {
    margin-top: 36px;
  }
  .footer-links {
    flex-wrap: wrap;
  }
}

/* Very Small Mobile (< 360px) */
@media (max-width: 360px) {
  .gate-heading {
    font-size: 28px;
  }
  .gate-editorial-pane {
    padding: 24px 16px;
  }
}
