/* =========================================================
   WISSENSDATENBANK – Global Design System
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&family=IBM+Plex+Sans:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── Custom Properties ─────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-base:          #020617;
  --bg-surface:       #0F172A;
  --bg-card:          #1E293B;
  --bg-card-hover:    #263348;

  /* Accents */
  --accent-1:         #0EA5E9;
  --accent-2:         #38BEF8;
  --accent-alt:       #6366F1;
  --accent-grad:      linear-gradient(135deg, #0EA5E9 0%, #6366F1 100%);

  /* Semantic */
  --accent-success:   #22C55E;
  --accent-danger:    #EF4444;
  --accent-warning:   #F59E0B;

  /* Text */
  --text-primary:     #F1F5F9;
  --text-secondary:   #94A3B8;
  --text-muted:       #475569;

  /* Borders */
  --border:           rgba(148, 163, 184, 0.10);
  --border-strong:    rgba(148, 163, 184, 0.18);
  --border-focus:     rgba(14, 165, 233, 0.55);

  /* Shadows */
  --shadow-glow:      0 0 32px rgba(14, 165, 233, 0.20);
  --shadow-card:      0 4px 24px rgba(0, 0, 0, 0.60);

  /* Radii */
  --radius-sm:        6px;
  --radius-md:        10px;
  --radius-lg:        14px;
  --radius-xl:        20px;

  /* Typography */
  --font-heading:     'Poppins', system-ui, sans-serif;
  --font-body:        'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:        'JetBrains Mono', 'Courier New', monospace;
  --font:             var(--font-body);

  /* Motion */
  --transition:       0.20s cubic-bezier(0.4, 0, 0.2, 1);

  /* Dot-grid texture */
  --dot-grid:         radial-gradient(circle, rgba(148, 163, 184, 0.10) 1px, transparent 1px);
  --dot-grid-size:    28px 28px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  outline: none;
}

input {
  font-family: var(--font);
}

/* ── Background dot-grid texture ──────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: var(--dot-grid);
  background-size: var(--dot-grid-size);
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

/* ── Surface Card (replaces heavy glassmorphism) ───────── */
.glass {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
}

/* ── Gradient Text ─────────────────────────────────────── */
.gradient-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-md);
  background: var(--accent-1);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.025em;
  transition: var(--transition), box-shadow var(--transition);
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.3), 0 4px 16px rgba(14, 165, 233, 0.25);
}

.btn-primary:hover {
  background: #0284C7;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.5), 0 6px 24px rgba(14, 165, 233, 0.35);
}

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

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ── Form Elements ─────────────────────────────────────── */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.input-field {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.93rem;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.input-field:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
  background: var(--bg-card);
}

.input-field::placeholder {
  color: var(--text-muted);
}

/* ── Error / Info Messages ─────────────────────────────── */
.msg-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  font-size: 0.88rem;
  font-weight: 500;
  animation: fadeIn 0.3s ease;
}

/* ── Logo / Icon ───────────────────────────────────────── */
.logo-ring {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1.5px solid var(--accent-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.25);
  flex-shrink: 0;
  overflow: hidden;
}

/* Image icon inside logo-ring */
.logo-ring img {
  width: 75%;
  height: 75%;
  object-fit: contain;
}

/* ── Animations ────────────────────────────────────────── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

@keyframes revealUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal-1 { animation: revealUp 0.5s ease 0.05s both; }
.reveal-2 { animation: revealUp 0.5s ease 0.12s both; }
.reveal-3 { animation: revealUp 0.5s ease 0.20s both; }
.reveal-4 { animation: revealUp 0.5s ease 0.28s both; }

@keyframes typing {

  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.4;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

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

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ── Typing indicator dots ─────────────────────────────── */
.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-1);
  animation: typing 1.4s infinite;
  flex-shrink: 0;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.16s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.32s;
}