/* ==========================================================================
   KrizFX - Modern Glass, Soft Gradients & Brand Accent Buttons
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg-main: #0A0B0E;
  --surface-base: rgba(255, 255, 255, 0.02);
  --surface-card: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.06);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 255, 255, 0.2);

  --accent-indigo: #6366F1;
  --accent-purple: #A855F7;
  --accent-cyan: #38BDF8;
  --accent-emerald: #34D399;
  --accent-light: #818CF8;
  
  --text-primary: #FFFFFF;
  --text-secondary: #94A3B8;
  --text-tertiary: #484F58;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-xl: 18px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

/* ==========================================================================
   Global Theme Transitions
   ========================================================================== */

body, header, .card, .widget-card, .feature-card, .typewriter-block, .accordion-item, footer, input, nav, nav a, .btn, .btn-secondary, .btn-secondary-custom, .theme-toggle-btn, .cookie-banner {
  transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              color 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Light Mode Overrides
   ========================================================================== */

[data-theme="light"] {
  --bg-main: #F8FAFC;
  --surface-base: rgba(15, 23, 42, 0.02);
  --surface-card: #FFFFFF;
  --surface-hover: #F1F5F9;
  
  --border-subtle: rgba(148, 163, 184, 0.25);
  --border-focus: rgba(99, 102, 241, 0.4);

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #94A3B8;
}

[data-theme="light"] body {
  background-color: #F8FAFC !important;
  color: #0F172A !important;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.08), rgba(255, 255, 255, 0)),
    linear-gradient(to right, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
}

[data-theme="light"] header {
  background: rgba(248, 250, 252, 0.9) !important;
  border-bottom-color: rgba(148, 163, 184, 0.25) !important;
}

[data-theme="light"] nav a {
  color: #475569 !important;
}

[data-theme="light"] nav a svg {
  stroke: #475569 !important;
}

[data-theme="light"] nav a:hover, 
[data-theme="light"] nav a.active {
  color: #0F172A !important;
  background: rgba(99, 102, 241, 0.08) !important;
}

[data-theme="light"] nav a:hover svg,
[data-theme="light"] nav a.active svg {
  stroke: var(--accent-indigo) !important;
}

[data-theme="light"] .card, 
[data-theme="light"] .widget-card,
[data-theme="light"] .feature-card,
[data-theme="light"] .typewriter-block,
[data-theme="light"] .accordion-item {
  background: #FFFFFF !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05) !important;
}

[data-theme="light"] .card h3,
[data-theme="light"] .feature-card h3,
[data-theme="light"] .typewriter-block h3,
[data-theme="light"] .accordion-header {
  color: #0F172A !important;
}

[data-theme="light"] .logo-badge {
  background: linear-gradient(135deg, #E2E8F0 0%, #CBD5E1 100%) !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
}

[data-theme="light"] .logo-badge svg {
  stroke: #0F172A !important;
}

[data-theme="light"] .logo-text .brand-title {
  color: #0F172A !important;
}

[data-theme="light"] .btn-secondary,
[data-theme="light"] .btn-secondary-custom {
  background: #E2E8F0 !important;
  color: #0F172A !important;
  border: 1px solid #CBD5E1 !important;
}

[data-theme="light"] .btn-secondary:hover,
[data-theme="light"] .btn-secondary-custom:hover {
  background: #CBD5E1 !important;
  border-color: var(--accent-indigo) !important;
}

[data-theme="light"] footer {
  background: rgba(241, 245, 249, 0.95) !important;
  border-top-color: rgba(148, 163, 184, 0.25) !important;
}

[data-theme="light"] .menu-toggle {
  background: rgba(15, 23, 42, 0.05) !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
}

[data-theme="light"] .menu-toggle span {
  background-color: #0F172A !important;
}

[data-theme="light"] .cookie-banner {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
  border-left-color: #10B981 !important;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12) !important;
}

[data-theme="light"] .cookie-header {
  color: #0F172A !important;
}

[data-theme="light"] .cookie-content p {
  color: #475569 !important;
}

[data-theme="light"] .cookie-btn.decline {
  background: rgba(15, 23, 42, 0.05) !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
  color: #475569 !important;
}

[data-theme="light"] .cookie-btn.decline:hover {
  color: #0F172A !important;
  background: rgba(15, 23, 42, 0.1) !important;
}

@media (max-width: 880px) {
  [data-theme="light"] nav {
    background: rgba(248, 250, 252, 0.98) !important;
    border-bottom-color: rgba(148, 163, 184, 0.25) !important;
  }
}

/* ==========================================================================
   Animated Theme Switcher Button
   ========================================================================== */

.theme-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: transform 0.3s ease, background 0.3s ease;
}

.theme-toggle-btn:hover {
  transform: scale(1.08) rotate(12deg);
  background: rgba(99, 102, 241, 0.15);
}

.theme-toggle-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="light"] .theme-toggle-btn svg {
  transform: rotate(360deg);
}

/* ==========================================================================
   Base Structure & Reset Rules
   ========================================================================== */

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

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

button {
  background: transparent;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), rgba(255, 255, 255, 0)),
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
}

/* ==========================================================================
   Animated Glass Navigation Bar & Logo Branding
   ========================================================================== */

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(10, 11, 14, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.logo:hover {
  transform: scale(1.02);
}

.logo-badge {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #12141A 0%, #1E2230 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 8px;
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.live-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: var(--accent-emerald, #34D399);
  border-radius: 50%;
  border: 2px solid #0D0E12;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(52, 211, 153, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

nav a {
  position: relative;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}

nav a svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-secondary);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), stroke 0.25s ease;
}

nav a:hover, 
nav a.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

nav a:hover svg,
nav a.active svg {
  stroke: var(--accent-cyan);
  transform: translateY(-2px) scale(1.15);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-indigo));
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

nav a:hover::after,
nav a.active::after {
  width: 60%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Hero Section & UI Components
   ========================================================================== */

.hero {
  max-width: 1000px;
  margin: 80px auto;
  text-align: center;
  padding: 0 20px;
}

.hero-pill {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 20px;
  color: var(--accent-light);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.cta-btn {
  background: linear-gradient(135deg, var(--accent-indigo) 0%, #4F46E5 100%);
  color: #FFFFFF !important;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  display: inline-block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.6);
}

.btn-secondary,
.btn-secondary-custom {
  background: var(--surface-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}

.widget-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: block;
}

.card:hover {
  transform: translateY(-2px);
  background: var(--surface-hover);
  border-color: var(--border-focus);
}

/* ==========================================================================
   Cookie Consent Banner Glass Styling
   ========================================================================== */

.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 460px;
  background: rgba(19, 22, 32, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid #34D399;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  z-index: 99990;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.show {
  transform: translateY(0);
  opacity: 1;
}

.cookie-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #FFF;
}

.cookie-content p {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: #94A3B8;
  line-height: 1.4;
}

.cookie-actions {
  display: flex;
  gap: 8px;
}

.cookie-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.cookie-btn.accept {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFF;
}

.cookie-btn.accept:hover {
  opacity: 0.9;
}

.cookie-btn.decline {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #94A3B8;
}

.cookie-btn.decline:hover {
  color: #FFF;
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding: 40px 24px;
  background: rgba(10, 11, 14, 0.8);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   Mobile Responsiveness
   ========================================================================== */

@media (max-width: 880px) {
  .menu-toggle { 
    display: flex; 
  }

  .nav-container {
    padding: 12px 16px;
  }

  nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 11, 14, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 24px;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
  }

  nav.active { 
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  nav a {
    width: 100%;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  }

  nav a::after {
    display: none;
  }

  .hero h1 { 
    font-size: 2.3rem; 
  }

  .footer-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
}