/* ========================================================================
   FSYS Agency — UIkit Theme Override
   Maps DESIGN.md Eco-Futurist + Glassmorphism system onto UIkit classes
   ======================================================================== */

/* ---------- DESIGN.md Color Tokens ---------- */
:root {
  --fsys-surface: #111319;
  --fsys-surface-dim: #111319;
  --fsys-surface-bright: #373940;
  --fsys-surface-container-lowest: #0c0e14;
  --fsys-surface-container-low: #191b22;
  --fsys-surface-container: #1e1f26;
  --fsys-surface-container-high: #282a30;
  --fsys-surface-container-highest: #33343b;
  --fsys-on-surface: #e2e2eb;
  --fsys-on-surface-variant: #b9cbbc;
  --fsys-inverse-surface: #e2e2eb;
  --fsys-inverse-on-surface: #2e3037;
  --fsys-outline: #849587;
  --fsys-outline-variant: #3b4a3f;
  --fsys-primary: #f4fff3;
  --fsys-on-primary: #00391f;
  --fsys-primary-container: #00ff9d;
  --fsys-on-primary-container: #007143;
  --fsys-secondary: #bdf4ff;
  --fsys-secondary-container: #00e3fd;
  --fsys-on-secondary-container: #00616d;
  --fsys-tertiary: #fffbff;
  --fsys-tertiary-container: #dddcff;
  --fsys-on-tertiary-container: #5c5e91;
  --fsys-error: #ffb4ab;
  --fsys-on-error: #690005;
  --fsys-background: #111319;
  --fsys-on-background: #e2e2eb;
  --fsys-agro-emerald: #00E676;
  --fsys-solar-gold: #FFD700;
  --fsys-glowing-cyan: #52FFFF;
  --fsys-deep-space-indigo: #0F0F23;
  --fsys-bio-lime: #A4FF00;
}

/* ---------- Typography ---------- */
html {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  background: var(--fsys-background);
  color: var(--fsys-on-background);
}

body {
  background: var(--fsys-background);
  color: var(--fsys-on-background);
  overflow-x: hidden;
}

/* Headings — Space Grotesk */
h1, h2, h3, h4, h5, h6,
.uk-h1, .uk-h2, .uk-h3, .uk-h4, .uk-h5, .uk-h6,
.uk-heading-medium, .uk-heading-large, .uk-heading-xlarge,
.uk-heading-2xlarge {
  font-family: 'Space Grotesk', sans-serif;
}

.uk-h1 { font-size: 48px; font-weight: 600; line-height: 56px; }
.uk-h2 { font-size: 32px; font-weight: 600; line-height: 40px; }
.uk-h3 { font-size: 24px; font-weight: 600; line-height: 32px; }
.uk-h4 { font-size: 20px; font-weight: 600; line-height: 28px; }

/* JetBrains Mono for technical labels */
.fsys-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.05em;
}

/* Links */
a, .uk-link {
  color: var(--fsys-glowing-cyan);
}
a:hover, .uk-link:hover {
  color: #9cf0ff;
}

/* Selection */
::selection {
  background: rgba(0, 143, 90, 0.3);
  color: var(--fsys-on-background);
}

/* ---------- UIkit Navbar Override ---------- */
.uk-navbar-container {
  background: rgba(17, 19, 25, 0.4) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(82, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(82, 255, 255, 0.2);
  border-radius: 9999px;
}
.uk-navbar-nav > li > a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--fsys-on-surface);
  min-height: auto;
  padding: 0 16px;
  transition: color 0.3s, transform 0.3s;
}
.uk-navbar-nav > li > a:hover {
  color: var(--fsys-glowing-cyan);
  transform: scale(1.1);
}
.uk-navbar-item {
  min-height: auto;
}

/* ---------- UIkit Card Override (Glassmorphism) ---------- */
.uk-card {
  background: rgba(17, 19, 25, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(82, 255, 255, 0.2);
  box-shadow: inset 0 0 20px rgba(82, 255, 255, 0.05), 0 0 30px rgba(0, 0, 0, 0.5);
  border-radius: 1rem;
  color: var(--fsys-on-background);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.uk-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 60px rgba(82, 255, 255, 0.15);
}
.uk-card-body {
  padding: 2rem;
}
.uk-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--fsys-primary);
}

/* Card "Bio-Cut" corner decoration */
.uk-card.fsys-bio-cut::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 20px;
  height: 20px;
  border-top: 2px solid var(--fsys-glowing-cyan);
  border-left: 2px solid var(--fsys-glowing-cyan);
  border-radius: 12px 0 0 0;
  opacity: 0.7;
}
.uk-card.fsys-bio-cut::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 20px;
  height: 20px;
  border-bottom: 2px solid var(--fsys-glowing-cyan);
  border-right: 2px solid var(--fsys-glowing-cyan);
  border-radius: 0 0 12px 0;
  opacity: 0.7;
}

/* Card default (use :not to avoid double border on bio-cut) */
.uk-card:not(.fsys-bio-cut) {
  position: relative;
}

/* ---------- UIkit Button Override (Holographic) ---------- */
.uk-button {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 9999px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid;
}
.uk-button-primary {
  background: rgba(82, 255, 255, 0.9);
  border-color: var(--fsys-glowing-cyan);
  color: var(--fsys-deep-space-indigo);
  font-weight: 700;
  letter-spacing: 0.15em;
  box-shadow: 0 0 20px rgba(82, 255, 255, 0.3);
}
.uk-button-primary:hover {
  background: var(--fsys-glowing-cyan);
  transform: scale(1.1);
  box-shadow: 0 0 40px rgba(82, 255, 255, 0.5);
}
.uk-button-primary:active {
  transform: scale(0.95);
}
.uk-button-secondary {
  background: rgba(0, 143, 90, 0.9);
  border-color: var(--fsys-agro-emerald);
  color: var(--fsys-on-primary);
  letter-spacing: 0.15em;
  box-shadow: 0 0 20px rgba(0, 143, 90, 0.6);
}
.uk-button-secondary:hover {
  background: var(--fsys-agro-emerald);
  transform: scale(1.05);
}
.uk-button-secondary:active {
  transform: scale(0.95);
}
.uk-button-default {
  background: transparent;
  border-color: rgba(82, 255, 255, 0.4);
  color: var(--fsys-glowing-cyan);
  letter-spacing: 0.1em;
}
.uk-button-default:hover {
  background: rgba(82, 255, 255, 0.1);
  border-color: var(--fsys-glowing-cyan);
}
.uk-button-danger {
  background: rgba(164, 255, 0, 0.9);
  border-color: var(--fsys-bio-lime);
  color: var(--fsys-deep-space-indigo);
  font-weight: 700;
  letter-spacing: 0.2em;
  box-shadow: 0 0 40px rgba(164, 255, 0, 0.5);
}
.uk-button-danger:hover {
  background: #fff;
  transform: scale(1.1);
}

/* ---------- UIkit Section Override ---------- */
.uk-section {
  padding-top: 6rem;
  padding-bottom: 6rem;
}
.uk-section-primary {
  background: var(--fsys-deep-space-indigo);
}
.uk-section-secondary {
  background: var(--fsys-surface-container-lowest);
}
.uk-section-muted {
  background: var(--fsys-surface-container);
}

/* ---------- UIkit Form Override (Input Ports) ---------- */
.uk-input, .uk-select, .uk-textarea {
  background: var(--fsys-surface-container-low);
  border: 1px solid rgba(82, 255, 255, 0.3);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--fsys-on-background);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  transition: all 0.3s;
}
.uk-input:focus, .uk-select:focus, .uk-textarea:focus {
  border-color: var(--fsys-glowing-cyan);
  box-shadow: 0 0 15px rgba(82, 255, 255, 0.15);
  outline: none;
  background: var(--fsys-surface-container-low);
  color: var(--fsys-on-background);
}
.uk-input::placeholder, .uk-textarea::placeholder {
  color: rgba(185, 203, 188, 0.5);
}
.uk-form-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--fsys-glowing-cyan);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

/* ---------- UIkit Badge / Label Override ---------- */
.uk-badge {
  background: var(--fsys-agro-emerald);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
}
.uk-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 9999px;
}

/* ---------- UIkit Progress Override ---------- */
.uk-progress {
  background: rgba(82, 255, 255, 0.15);
  border-radius: 2px;
  height: 4px;
}
.uk-progress::-webkit-progress-bar {
  background: rgba(82, 255, 255, 0.15);
}
.uk-progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--fsys-agro-emerald), var(--fsys-glowing-cyan));
}
.uk-progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--fsys-agro-emerald), var(--fsys-glowing-cyan));
}

/* ---------- UIkit Modal Override ---------- */
.uk-modal-dialog {
  background: rgba(17, 19, 25, 0.6);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(82, 255, 255, 0.15);
  border-radius: 1rem;
  color: var(--fsys-on-background);
}
.uk-modal-title {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--fsys-primary);
}

/* ---------- UIkit Dotnav / Slidenav Override ---------- */
.uk-dotnav > * > * {
  border-color: var(--fsys-glowing-cyan);
}
.uk-dotnav > *.uk-active > * {
  background: var(--fsys-glowing-cyan);
  border-color: var(--fsys-glowing-cyan);
}
.uk-slidenav {
  color: var(--fsys-glowing-cyan);
}

/* ---------- FSYS Custom Component Classes ---------- */

/* Glass panel */
.fsys-glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(82, 255, 255, 0.15);
}

/* Terminal Module (glass + bio-cut corners) */
.fsys-terminal {
  background: rgba(17, 19, 25, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(82, 255, 255, 0.2);
  box-shadow: inset 0 0 20px rgba(82, 255, 255, 0.05), 0 0 30px rgba(0, 0, 0, 0.5);
  position: relative;
}
.fsys-terminal::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 20px;
  height: 20px;
  border-top: 2px solid var(--fsys-glowing-cyan);
  border-left: 2px solid var(--fsys-glowing-cyan);
  border-radius: 12px 0 0 0;
  opacity: 0.7;
}
.fsys-terminal::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 20px;
  height: 20px;
  border-bottom: 2px solid var(--fsys-glowing-cyan);
  border-right: 2px solid var(--fsys-glowing-cyan);
  border-radius: 0 0 12px 0;
  opacity: 0.7;
}

/* Glow bloom utilities */
.fsys-bloom-cyan {
  box-shadow: 0 0 20px rgba(82, 255, 255, 0.3);
}
.fsys-bloom-emerald {
  box-shadow: 0 0 25px rgba(0, 143, 90, 0.4);
}
.fsys-bloom-gold {
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
}

/* Timeline chip */
.fsys-timeline-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  letter-spacing: 0.2em;
}
.fsys-timeline-chip.gold {
  border-color: rgba(255, 215, 0, 0.5);
  background: rgba(255, 215, 0, 0.1);
  color: var(--fsys-solar-gold);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
}
.fsys-timeline-chip.cyan {
  border-color: rgba(82, 255, 255, 0.3);
  background: rgba(82, 255, 255, 0.05);
  color: var(--fsys-glowing-cyan);
  box-shadow: 0 0 20px rgba(82, 255, 255, 0.1);
}

/* Scanlines overlay */
.fsys-scanlines {
  position: fixed;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(82, 255, 255, 0.03) 51%);
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 9998;
}

/* Particle canvas */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
}

/* Time jump vertical line */
.fsys-time-line {
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--fsys-glowing-cyan), transparent);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
  opacity: 0.3;
}

/* Floating animation */
@keyframes fsys-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.fsys-float {
  animation: fsys-float 6s ease-in-out infinite;
}

/* Slow zoom */
@keyframes fsys-zoom {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
.fsys-hero-media {
  animation: fsys-zoom 20s ease-in-out infinite;
  will-change: transform;
}

/* Scroll reveal */
.fsys-reveal {
  opacity: 0;
  transform: translateY(50px) scale(0.98);
  transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.fsys-reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* HUD parallax layer */
.fsys-hud {
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Superpower icon circle */
.fsys-icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  border: 2px solid;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.fsys-card:hover .fsys-icon-circle {
  transform: scale(1.15) rotate(8deg);
}

/* 3D tilt card */
.fsys-tilt {
  transition: transform 0.1s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}
.fsys-tilt:hover {
  z-index: 10;
}
.fsys-tilt:hover .fsys-tilt-content {
  transform: translateZ(30px);
}

/* Story panel */
.fsys-story-panel {
  background: rgba(15, 15, 35, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(82, 255, 255, 0.1);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.5s ease;
}
.fsys-story-panel:hover {
  border-color: rgba(82, 255, 255, 0.3);
  box-shadow: 0 0 30px rgba(82, 255, 255, 0.05);
}

/* Story divider */
.fsys-divider {
  height: 2px;
  background: linear-gradient(to right, transparent, rgba(82, 255, 255, 0.3), transparent);
  margin: 3rem 0;
}

/* Radio card (form selection) */
.fsys-radio-card {
  cursor: pointer;
  display: block;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(82, 255, 255, 0.15);
  background: rgba(25, 27, 34, 0.5);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.fsys-radio-card:hover {
  border-color: rgba(82, 255, 255, 0.4);
  background: rgba(25, 27, 34, 0.8);
}
.fsys-radio-card.selected {
  border-color: var(--fsys-solar-gold);
  background: rgba(255, 215, 0, 0.08);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.15);
}
.fsys-radio-card.selected .fsys-radio-title {
  color: var(--fsys-solar-gold);
}

/* Hover glitch scanner effect */
.fsys-glitch-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(82, 255, 255, 0.03) 50%, transparent 100%);
  background-size: 100% 200%;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0;
  transition: opacity 0.8s;
}
.fsys-glitch-group:hover .fsys-glitch-overlay {
  opacity: 1;
  animation: fsys-glitch-scan 0.6s ease-in-out 3;
}
@keyframes fsys-glitch-scan {
  0% { background-position: 0% 0%; opacity: 0.3; }
  20% { background-position: 0% 50%; opacity: 0.8; clip-path: inset(20% 0 60% 0); }
  40% { background-position: 0% 80%; opacity: 0.5; clip-path: inset(60% 0 10% 0); }
  60% { background-position: 0% 30%; opacity: 0.9; clip-path: inset(10% 0 50% 0); transform: translateX(3px); }
  80% { background-position: 0% 70%; opacity: 0.4; clip-path: inset(50% 0 30% 0); }
  100% { background-position: 0% 100%; opacity: 0; }
}

/* Loading screen */
.fsys-loading {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: #0a0e1a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.fsys-loading.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.fsys-loading-logo {
  font-family: 'Courier New', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--fsys-agro-emerald);
  text-shadow: 0 0 20px rgba(0, 143, 90, 0.6);
  animation: fsys-pulse-logo 1.5s ease-in-out infinite;
}
@keyframes fsys-pulse-logo {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
.fsys-loading-bar {
  margin-top: 2rem;
  width: 200px;
  height: 3px;
  background: rgba(82, 255, 255, 0.15);
  border-radius: 2px;
  overflow: hidden;
}
.fsys-loading-bar-inner {
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, var(--fsys-agro-emerald), var(--fsys-glowing-cyan));
  border-radius: 2px;
  animation: fsys-loading-slide 1.2s ease-in-out infinite;
}
@keyframes fsys-loading-slide {
  0% { transform: translateX(-100%); width: 30%; }
  50% { width: 50%; }
  100% { transform: translateX(400%); width: 30%; }
}

/* Map pulse animations */
@keyframes fsys-map-pulse {
  0% { opacity: 0.15; }
  50% { opacity: 0.7; }
  100% { opacity: 0.15; }
}
@keyframes fsys-map-core {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}
.fsys-map-pulse { animation: fsys-map-pulse 2.5s ease-in-out infinite; }
.fsys-map-core { animation: fsys-map-core 2.5s ease-in-out infinite; }
.fsys-delay-0 { animation-delay: 0s; }
.fsys-delay-1 { animation-delay: 0.35s; }
.fsys-delay-2 { animation-delay: 0.7s; }
.fsys-delay-3 { animation-delay: 1.05s; }
.fsys-delay-4 { animation-delay: 1.4s; }
.fsys-delay-5 { animation-delay: 1.75s; }

/* Responsive container */
.uk-container {
  max-width: 1280px;
}

/* Utility: text with glow */
.fsys-text-glow-cyan {
  text-shadow: 0 0 15px rgba(82, 255, 255, 0.3);
}
.fsys-text-glow-emerald {
  text-shadow: 0 0 10px rgba(0, 143, 90, 0.5);
}
.fsys-text-glow-gold {
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}
.fsys-text-glow-primary {
  text-shadow: 0 0 20px rgba(244, 255, 243, 0.3);
}


