/* ============================================
   KALIXRP — DESIGN SYSTEM
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ─────────────────────────── */
:root {
  /* Colors */
  --red-primary:    #e8372e;
  --red-vivid:      #ff4d4d;
  --red-dark:       #b02820;
  --red-glow:       rgba(232, 55, 46, 0.25);
  --red-glow-soft:  rgba(232, 55, 46, 0.10);

  --bg-void:        #080808;
  --bg-base:        #0d0d0d;
  --bg-card:        #141414;
  --bg-elevated:    #1a1a1a;
  --bg-border:      rgba(255, 255, 255, 0.06);
  --bg-hover:       rgba(255, 255, 255, 0.04);

  --text-primary:   #f5f5f5;
  --text-secondary: #9a9a9a;
  --text-muted:     #555555;

  --white:          #ffffff;
  --success:        #2ecc71;
  --warning:        #f39c12;
  --danger:         #e74c3c;
  --info:           #3498db;

  /* Spacing */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  96px;
  --space-10: 128px;

  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Radii */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-base:   0.25s ease;
  --transition-slow:   0.45s ease;
  --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 24px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 48px rgba(0,0,0,0.6);
  --shadow-red: 0 0 32px var(--red-glow), 0 0 64px rgba(232,55,46,0.1);
  --shadow-red-sm: 0 0 16px var(--red-glow);

  /* Navbar height */
  --nav-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--red-primary) transparent;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--red-primary);
  border-radius: var(--radius-full);
}

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

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

img {
  max-width: 100%;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
}

/* ── Typography ────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.text-red { color: var(--red-primary); }
.text-muted { color: var(--text-secondary); }
.text-center { text-align: center; }
.text-gradient {
  background: linear-gradient(135deg, var(--red-vivid), var(--red-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Layout ────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

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

.section {
  padding: var(--space-10) 0;
}

.section-sm {
  padding: var(--space-8) 0;
}

/* ── Navbar ────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: background var(--transition-base), backdrop-filter var(--transition-base);
}

.navbar.scrolled {
  background: rgba(8, 8, 8, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bg-border);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-logo .logo-text {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.nav-logo .kalix {
  color: var(--red-primary);
}

.nav-logo .rp {
  color: var(--white);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
}

.nav-links a {
  padding: var(--space-2) var(--space-3);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 16px;
  height: 2px;
  background: var(--red-primary);
  border-radius: var(--radius-full);
  transition: transform var(--transition-base);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-links a.active {
  color: var(--text-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-2);
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

/* ── Buttons ───────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all var(--transition-base);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::before { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, var(--red-primary), var(--red-dark));
  color: var(--white);
  box-shadow: 0 4px 16px rgba(232, 55, 46, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(232, 55, 46, 0.6);
  transform: translateY(-1px);
}

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

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

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--bg-hover);
}

.btn-steam {
  background: linear-gradient(135deg, #1b2838, #2a475e);
  color: var(--white);
  border: 1px solid rgba(102, 192, 244, 0.2);
  box-shadow: 0 4px 16px rgba(27, 40, 56, 0.6);
}

.btn-steam:hover {
  box-shadow: 0 6px 24px rgba(102, 192, 244, 0.3);
  transform: translateY(-1px);
  border-color: rgba(102, 192, 244, 0.4);
}

.btn-steam svg {
  width: 18px;
  height: 18px;
  fill: #c6d4df;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

/* ── Cards ─────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  border-color: rgba(232, 55, 46, 0.2);
  box-shadow: var(--shadow-red-sm);
}

.card-glass {
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
}

/* ── Badges ────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-red {
  background: rgba(232, 55, 46, 0.15);
  color: var(--red-vivid);
  border: 1px solid rgba(232, 55, 46, 0.3);
}

.badge-green {
  background: rgba(46, 204, 113, 0.15);
  color: var(--success);
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.badge-orange {
  background: rgba(243, 156, 18, 0.15);
  color: var(--warning);
  border: 1px solid rgba(243, 156, 18, 0.3);
}

.badge-blue {
  background: rgba(52, 152, 219, 0.15);
  color: var(--info);
  border: 1px solid rgba(52, 152, 219, 0.3);
}

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ── Section Header ────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--red-primary);
  margin-bottom: var(--space-3);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-4);
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Divider ───────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bg-border), transparent);
  margin: var(--space-6) 0;
}

/* ── Grid ──────────────────────────────────── */
.grid { display: grid; gap: var(--space-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Flex Utilities ─────────────────────────── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }

/* ── Status Indicator ──────────────────────── */
.status-online { color: var(--success); }
.status-offline { color: var(--danger); }

/* ── Noise Overlay ─────────────────────────── */
.noise-overlay {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* ── Footer ────────────────────────────────── */
.footer {
  background: var(--bg-void);
  border-top: 1px solid var(--bg-border);
  padding: var(--space-8) 0 var(--space-6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-7);
  margin-bottom: var(--space-7);
}

.footer-brand .logo-text {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-bottom: var(--space-4);
}

.footer-brand .kalix { color: var(--red-primary); }
.footer-brand .rp { color: var(--white); }

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
  max-width: 280px;
}

.footer-social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-base);
  cursor: pointer;
}

.social-btn:hover {
  background: var(--red-primary);
  border-color: var(--red-primary);
  color: var(--white);
  transform: translateY(-2px);
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-col ul a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-col ul a:hover {
  color: var(--red-primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-5);
  border-top: 1px solid var(--bg-border);
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ── Toast Notifications ───────────────────── */
.toast-container {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  z-index: 9000;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 280px;
  box-shadow: var(--shadow-lg);
  animation: slide-in-right 0.3s var(--transition-spring);
  font-size: 0.9rem;
}

.toast-success { border-left: 3px solid var(--success); }
.toast-error   { border-left: 3px solid var(--danger); }
.toast-info    { border-left: 3px solid var(--red-primary); }

@keyframes slide-in-right {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Modal ─────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-xl);
  padding: var(--space-7);
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition-spring);
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--white);
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-3); text-align: center; }

  .section { padding: var(--space-8) 0; }
  .section-sm { padding: var(--space-6) 0; }

  .btn-lg { padding: 12px 24px; font-size: 0.95rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-4); }
}
