/* ============================================
   NEON VELOCITY — Design System
   ============================================ */

:root {
  /* Colors */
  --bg-primary: #050505;
  --bg-elevated: #0a0a0a;
  --accent: #BFFF00;
  --accent-dim: rgba(191, 255, 0, 0.6);
  --accent-glow: rgba(191, 255, 0, 0.15);
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.4);
  --text-tertiary: rgba(255, 255, 255, 0.2);
  --border: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.2);
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --surface-active: rgba(255, 255, 255, 0.08);
  --danger: #FF4444;
  --danger-light: #ff8888;
  --warning: #FFB800;
  --success: #00FF88;
  --accent-dark: #A0E000;

  /* Typography */
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', 'Fira Code', monospace;
  --font-body: 'Inter', -apple-system, sans-serif;

  /* Spacing */
  --space-2xs: 2px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Animation */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 150ms var(--ease-out-expo);
  --transition-normal: 300ms var(--ease-out-expo);
  --transition-slow: 500ms var(--ease-out-expo);
  --transition-reveal: 600ms var(--ease-out-expo);
}

/* Responsive Breakpoints (reference — use in @media queries):
   Desktop:  1024px  (admin pages prioritize this and above)
   Tablet:    768px
   Mobile:    480px  (landing/wizard prioritize this and below)
*/

/* ---- Base ---- */

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
}

html {
  background: var(--bg-primary);
}

/* ---- SVG Noise Overlay ---- */

.noise-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
}

@media (prefers-reduced-motion: reduce) {
  .noise-overlay {
    display: none;
  }
}

/* ---- Particle Background ---- */

ff-particle-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* ---- Background Glows ---- */

.bg-glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
}

.bg-glow--top {
  top: -20vh;
  left: -10vw;
  width: 60vw;
  height: 60vh;
  background: radial-gradient(ellipse, var(--accent-glow), transparent 70%);
}

.bg-glow--bottom {
  bottom: -30vh;
  right: -15vw;
  width: 50vw;
  height: 50vh;
  background: radial-gradient(ellipse, var(--accent-glow), transparent 70%);
  opacity: 0.5;
}

@media (max-width: 768px) {
  .bg-glow--top {
    top: -10vh;
    left: -18vw;
    width: 72vw;
    height: 38vh;
    opacity: 0.28;
  }
}

/* ---- Glassmorphism ---- */

.glass {
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.glass:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

/* ---- Scroll Reveal Animation ---- */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }

/* ---- Typography ---- */

.heading-hero {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 9vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.heading-xl {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.heading-lg {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.heading-md {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.heading-sm {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
}

.label-mono {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
}

.label-mono-lg {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
}

.text-accent { color: var(--accent); }
.text-secondary { color: var(--text-secondary); }
.text-danger { color: var(--danger); }

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn--primary:hover {
  box-shadow: 0 0 30px var(--accent-glow), 0 0 60px rgba(191, 255, 0, 0.08);
  transform: translateY(-1px);
}

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

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(191, 255, 0, 0.05);
}

.btn--danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(255, 68, 68, 0.3);
}

.btn--danger:hover {
  background: rgba(255, 68, 68, 0.1);
  border-color: var(--danger);
}

.btn--sm {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.625rem;
}

.btn--icon {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  line-height: 1;
  flex-shrink: 0;
}

.btn--lg {
  padding: var(--space-lg) var(--space-2xl);
  font-size: 0.8125rem;
}

.btn:disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* ---- Form Controls ---- */

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
}

.form-select,
.form-input {
  width: 100%;
  padding: var(--space-md) var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='rgba(255,255,255,0.4)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-select:focus,
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(191, 255, 0, 0.1);
}

.form-select option {
  background: #1a1a1a;
  color: var(--text-primary);
}

/* ---- Hardware Combobox ---- */
.hw-combobox {
  position: relative;
}

.hw-combobox__control {
  position: relative;
  display: flex;
  align-items: center;
}

.hw-combobox__input {
  width: 100%;
  padding-right: 40px;
  font-size: 1rem; /* ≥16px prevents iOS auto-zoom on focus */
}

.hw-combobox__toggle {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 40px;
  background: none;
  border: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color var(--transition-fast);
}

.hw-combobox__toggle:hover {
  color: var(--text-primary);
}

.hw-combobox__toggle svg {
  transition: transform var(--transition-fast);
  pointer-events: none;
}

.hw-combobox--open .hw-combobox__toggle svg {
  transform: rotate(180deg);
}

.hw-combobox__list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  max-height: 280px;
  overflow-y: auto;
  z-index: 200;
  list-style: none;
  margin: 0;
  padding: var(--space-xs) 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.hw-combobox__list[hidden] {
  display: none;
}

.hw-combobox__group {
  padding: var(--space-xs) var(--space-md) 2px;
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  pointer-events: none;
  margin-top: var(--space-xs);
}

.hw-combobox__group:first-child {
  margin-top: 0;
}

.hw-combobox__item {
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.hw-combobox__item:hover,
.hw-combobox__item--active {
  background: rgba(191, 255, 0, 0.08);
  color: var(--accent);
}

.hw-combobox__item--selected {
  color: var(--accent);
}

.hw-combobox__empty {
  padding: var(--space-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-align: center;
}

@media (max-width: 768px) {
  .hw-combobox__list {
    max-height: 200px;
  }

  .hw-combobox__item {
    padding: var(--space-md) var(--space-md);
  }
}

/* ---- Container ---- */

.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: 720px;
}

.container--wide {
  max-width: 1200px;
}

/* ---- Utility ---- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
