/* ============================================================
   SMART LEKÁREŇ — AI / Research Visual Layer
   Deep dark hero, neural grid, terminal elements,
   data-scan aesthetics, glitch, neon teal accents
   ============================================================ */

/* ============================================================
   HERO — full dark AI command-centre look
   ============================================================ */
/* Hero canvas + blob — must not intercept mouse events */
#sl-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}
.sl-blob-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.07;
}

/* Neural canvas — same */
#neural-canvas {
  width: 100%; height: 100%;
  display: block;
  pointer-events: none;
}

.hero {
  background: #050E1A !important;
  animation: none !important;
  min-height: 100vh;
  padding-top: 72px;
}

/* Neural grid overlay */
.hero::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(42,191,191,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42,191,191,0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 60% 40%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, black 20%, transparent 75%);
  pointer-events: none;
}

/* Deep glow radials */
.hero::after {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 70% 30%, rgba(42,191,191,0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 10% 80%, rgba(26,79,122,0.35) 0%, transparent 50%);
  pointer-events: none;
}

/* Hero text on dark */
.hero h1 { color: #FFFFFF; }
.hero .lead { color: rgba(255,255,255,0.65); }

/* Scanline shimmer on hero */
.hero-image-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(42,191,191,0.025) 3px,
    rgba(42,191,191,0.025) 4px
  );
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
}

/* Neon border on hero image */
.hero-image-wrap {
  border: 1px solid rgba(42,191,191,0.25);
  box-shadow:
    0 0 0 1px rgba(42,191,191,0.1),
    0 0 40px rgba(42,191,191,0.12),
    0 0 80px rgba(42,191,191,0.06),
    var(--shadow-lg);
  position: relative;
}

/* Float cards — dark glass */
.hero-float-card {
  background: rgba(5,14,26,0.85);
  border: 1px solid rgba(42,191,191,0.2);
  backdrop-filter: blur(12px);
  color: #fff;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), 0 0 20px rgba(42,191,191,0.08);
}
.hero-float-icon {
  background: rgba(42,191,191,0.12);
  border: 1px solid rgba(42,191,191,0.2);
}

/* Hero mini-stats on dark */
.mini-stats strong { color: #2ABFBF !important; }
.mini-stats > div > div:last-child { color: rgba(255,255,255,0.45) !important; }
.mini-stats > div[style*="width:1px"] { background: rgba(255,255,255,0.1) !important; }

/* Typewriter on dark — fixed width prevents line-wrap glitch */
#sl-typewriter {
  color: #2ABFBF;
  border-color: #2ABFBF;
  display: inline-block;
  min-width: 14ch;          /* wide enough for longest word */
  white-space: nowrap;
  overflow: hidden;
  vertical-align: bottom;
}

/* Badge on dark */
.hero-badge {
  background: rgba(42,191,191,0.08);
  border-color: rgba(42,191,191,0.3);
  color: #2ABFBF;
}

/* ============================================================
   TERMINAL / CODE BLOCK aesthetic
   ============================================================ */
.terminal-block {
  background: #0A1628;
  border: 1px solid rgba(42,191,191,0.2);
  border-radius: 10px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.82rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(42,191,191,0.05);
}
.terminal-bar {
  background: #0F1F35;
  border-bottom: 1px solid rgba(42,191,191,0.12);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.terminal-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.terminal-dot:nth-child(1) { background: #FF5F57; }
.terminal-dot:nth-child(2) { background: #FEBC2E; }
.terminal-dot:nth-child(3) { background: #28C840; }
.terminal-title {
  flex: 1; text-align: center;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.08em;
}
.terminal-body {
  padding: 1.25rem 1.5rem;
  line-height: 1.9;
}
.terminal-line { display: flex; gap: 0.75rem; }
.t-prompt { color: #2ABFBF; user-select: none; }
.t-cmd     { color: #E2F0FF; }
.t-comment { color: rgba(255,255,255,0.28); font-style: italic; }
.t-key     { color: #79C0FF; }
.t-val     { color: #A5F3D0; }
.t-num     { color: #FF9F5E; }
.t-string  { color: #FFA2C0; }
.t-cursor  {
  display: inline-block; width: 8px; height: 1em;
  background: #2ABFBF; vertical-align: middle;
  animation: t-blink 1s step-end infinite;
}
@keyframes t-blink {
  0%,100% { opacity: 1; } 50% { opacity: 0; }
}

/* ============================================================
   AI FEATURE CARDS (replace plain story-features)
   ============================================================ */
.ai-card {
  background: linear-gradient(135deg, #F4F8FB 0%, #EBF2F8 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.22,1,0.36,1);
}
.ai-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--navy));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1);
}
.ai-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.ai-card:hover::before { transform: scaleX(1); }
.ai-card-icon {
  width: 48px; height: 48px;
  background: var(--teal-light);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(42,191,191,0.15);
}
.ai-card h4 { font-size: 1rem; margin-bottom: 0.4rem; }
.ai-card p  { font-size: 0.88rem; color: var(--muted); margin: 0; }
/* accuracy bar inside card */
.ai-card-metric {
  margin-top: 1rem;
  font-size: 0.72rem;
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.35rem;
}

/* ============================================================
   NEURAL NETWORK SECTION (new section between hero and stats)
   ============================================================ */
.neural-section {
  background: #050E1A;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.neural-section::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(42,191,191,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42,191,191,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}
.neural-canvas-wrap {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
}
#neural-canvas {
  width: 100%; height: 100%;
  display: block;
}
.neural-content { position: relative; z-index: 1; }
.neural-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(42,191,191,0.08);
  border: 1px solid rgba(42,191,191,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.neural-stat {
  background: rgba(5,14,26,0.9);
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: background 0.3s;
}
.neural-stat:hover { background: rgba(42,191,191,0.08); }
.neural-stat-number {
  font-family: var(--font-head);
  font-size: clamp(2rem,4vw,3.2rem);
  font-weight: 800;
  color: #2ABFBF;
  line-height: 1;
  margin-bottom: 0.4rem;
  text-shadow: 0 0 24px rgba(42,191,191,0.5);
}
.neural-stat-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.06em;
}
.neural-stat-sub {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.25);
  margin-top: 0.2rem;
}

/* ============================================================
   DATA STREAM (animated ticker below stats)
   ============================================================ */
.data-stream {
  background: #050E1A;
  border-top: 1px solid rgba(42,191,191,0.1);
  padding: 14px 0;
  overflow: hidden;
  position: relative;
}
.data-stream::before,
.data-stream::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; width: 80px; z-index: 2;
}
.data-stream::before { left: 0;  background: linear-gradient(90deg, #050E1A, transparent); }
.data-stream::after  { right: 0; background: linear-gradient(-90deg, #050E1A, transparent); }
.data-stream-track {
  display: flex;
  gap: 3rem;
  animation: stream-scroll 28s linear infinite;
  width: max-content;
  white-space: nowrap;
}
.data-stream-item {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.72rem;
  color: rgba(42,191,191,0.6);
  display: flex; align-items: center; gap: 0.5rem;
}
.data-stream-item::before {
  content: '';
  width: 5px; height: 5px; border-radius: 50%;
  background: #2ABFBF;
  animation: pulse-dot 2s infinite;
  flex-shrink: 0;
}
.data-stream-item.warn  { color: rgba(255,159,94,0.7); }
.data-stream-item.warn::before  { background: #FF9F5E; }
.data-stream-item.ok   { color: rgba(40,200,64,0.7);  }
.data-stream-item.ok::before    { background: #28C840; }
@keyframes stream-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   RESEARCH METRICS SECTION
   ============================================================ */
.metrics-section {
  background: var(--white);
}
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.metrics-bars { display: flex; flex-direction: column; gap: 1.5rem; }
.metric-row { }
.metric-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 0.5rem;
}
.metric-name {
  font-family: var(--font-head);
  font-size: 0.9rem; font-weight: 600; color: var(--navy);
}
.metric-value {
  font-family: var(--font-head);
  font-size: 0.9rem; font-weight: 800; color: var(--teal);
}
.metric-track {
  height: 8px; background: var(--mid); border-radius: 100px; overflow: hidden;
}
.metric-fill {
  height: 100%; width: 0%;
  border-radius: 100px;
  transition: width 1.6s cubic-bezier(0.22,1,0.36,1);
  position: relative;
}
.metric-fill::after {
  content: '';
  position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px; border-radius: 50%;
  background: inherit;
  box-shadow: 0 0 8px currentColor;
}
.metric-fill.c1 { background: linear-gradient(90deg, #2ABFBF, #1A9E9E); }
.metric-fill.c2 { background: linear-gradient(90deg, #1A4F7A, #2ABFBF); }
.metric-fill.c3 { background: linear-gradient(90deg, #2ABFBF, #28C840); }
.metric-fill.c4 { background: linear-gradient(90deg, #1A4F7A, #2ABFBF); }
.metric-fill.c5 { background: linear-gradient(90deg, #2ABFBF, #79C0FF); }

/* Radar / ring chart (pure CSS) */
.ai-accuracy-ring {
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 1.5rem;
}
.ring-chart {
  width: 220px; height: 220px; position: relative;
}
.ring-chart svg { transform: rotate(-90deg); }
.ring-bg   { fill: none; stroke: var(--mid); stroke-width: 18; }
.ring-fill {
  fill: none;
  stroke: url(#ring-grad);
  stroke-width: 18;
  stroke-linecap: round;
  stroke-dasharray: 628;
  stroke-dashoffset: 628;
  transition: stroke-dashoffset 2s cubic-bezier(0.22,1,0.36,1);
}
.ring-fill.animated { stroke-dashoffset: 41; /* 628 * (1-0.934) ≈ 98% */ }
.ring-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ring-pct {
  font-family: var(--font-head);
  font-size: 2.4rem; font-weight: 800; color: var(--navy);
  line-height: 1;
}
.ring-sub { font-size: 0.72rem; color: var(--muted); text-align: center; letter-spacing: 0.06em; text-transform: uppercase; }
.ring-caption { text-align: center; }
.ring-caption h4 { font-size: 1rem; margin-bottom: 0.25rem; }
.ring-caption p  { font-size: 0.85rem; color: var(--muted); margin: 0; }

/* ============================================================
   AI TECH STACK BADGES
   ============================================================ */
.tech-stack {
  display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem;
}
.tech-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.85rem;
  background: #050E1A;
  border: 1px solid rgba(42,191,191,0.2);
  border-radius: 100px;
  font-family: 'JetBrains Mono','Courier New',monospace;
  font-size: 0.72rem;
  color: #2ABFBF;
  letter-spacing: 0.04em;
  transition: all 0.25s;
}
.tech-badge:hover {
  background: rgba(42,191,191,0.1);
  border-color: rgba(42,191,191,0.5);
  box-shadow: 0 0 12px rgba(42,191,191,0.2);
}
.tech-badge-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #2ABFBF;
}

/* ============================================================
   STATS SECTION — dark AI style override
   ============================================================ */
.stats-section {
  background: #050E1A !important;
  position: relative;
}
.stats-section::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(42,191,191,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42,191,191,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.stat-number {
  color: #2ABFBF !important;
  text-shadow: 0 0 20px rgba(42,191,191,0.4);
}
.stat-label { color: rgba(255,255,255,0.85) !important; }
.stat-desc  { color: rgba(255,255,255,0.3) !important; }
.stat-item:not(:last-child)::after {
  background: rgba(42,191,191,0.15) !important;
}

/* TIMELINE — fully in timeline.css */

/* ============================================================
   SECTION WAVE DIVIDERS
   ============================================================ */
.wave-dark-to-light svg path { fill: var(--white); }
.wave-light-to-dark svg path { fill: #050E1A; }
.wave-dark-to-mid svg path   { fill: var(--light); }
.wave-mid-to-dark svg path   { fill: #0A1628; }

/* ============================================================
   STORY SECTION — add code terminal feel
   ============================================================ */
.story-section { background: var(--light); }

/* ============================================================
   NAV — dark transparent on dark hero
   ============================================================ */
#site-header {
  background: rgba(5,14,26,0.92) !important;
  border-bottom-color: rgba(42,191,191,0.08) !important;
}
#site-header.scrolled {
  background: rgba(5,14,26,0.98) !important;
  border-bottom-color: rgba(42,191,191,0.15) !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4) !important;
}
.nav-logo-text { color: #fff !important; }
.nav-logo-sub  { color: #2ABFBF !important; }
.nav-menu a    { color: rgba(255,255,255,0.75) !important; }
.nav-menu a:hover, .nav-menu a.active {
  color: #2ABFBF !important;
  background: rgba(42,191,191,0.08) !important;
}
.nav-toggle span { background: #fff !important; }

/* Mobile menu open — white background, dark text */
@media (max-width: 768px) {
  .nav-menu.open {
    background: #fff !important;
  }
  .nav-menu.open a {
    color: #1C2B3A !important;
  }
  .nav-menu.open a:hover,
  .nav-menu.open a.active {
    color: #2ABFBF !important;
    background: rgba(42,191,191,0.08) !important;
  }
}

/* ============================================================
   FOOTER — darker with terminal feel
   ============================================================ */
#site-footer {
  background: #030B16 !important;
  border-top: 1px solid rgba(42,191,191,0.08);
}
.footer-bottom {
  border-top-color: rgba(42,191,191,0.08) !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .neural-grid { grid-template-columns: repeat(2,1fr); }
  .metrics-grid { grid-template-columns: 1fr; }
  .ai-accuracy-ring { order: -1; }
  .data-stream-track { animation-duration: 18s; }
}
@media (max-width: 480px) {
  .terminal-body { font-size: 0.72rem; padding: 1rem; }
  .neural-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   SCAN LINE HOVER on cards (JS adds .scan-active)
   ============================================================ */
.article-card, .testimonial-card, .ai-card { position: relative; }
.article-card::after,
.testimonial-card::after,
.ai-card::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 60px;
  background: linear-gradient(to bottom, rgba(42,191,191,0.06), transparent);
  top: var(--scan-y, -60px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: inherit;
  z-index: 1;
}
.article-card.scan-active::after,
.testimonial-card.scan-active::after,
.ai-card.scan-active::after { opacity: 1; }

/* Hero container must be above canvas/blob layers */
.hero > .container {
  position: relative;
  z-index: 1;
}

/* Hero grid: terminal on right side */
.hero-grid {
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
/* Always show hero visual on desktop */
.hero .hero-visual {
  display: flex !important;
  flex-direction: column;
  gap: 0.75rem;
}
@media (min-width: 769px) {
  .hero .hero-visual { display: flex !important; }
}
@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero .hero-visual { display: none !important; }
}

/* ============================================================
   LIGHT HERO OVERRIDE — neutralise dark AI styles on .hero--light
   ============================================================ */
.hero.hero--light {
  background: linear-gradient(135deg, #F7FAFB 0%, #EBF4F8 50%, #E3F5F5 100%) !important;
}
.hero.hero--light::before {
  background-image: none !important;
  background: radial-gradient(circle, rgba(42,191,191,0.14) 0%, transparent 70%) !important;
  top: -150px; right: -150px;
  width: 600px; height: 600px;
  border-radius: 50%;
  inset: auto !important;
  mask-image: none !important;
  -webkit-mask-image: none !important;
  background-size: auto !important;
}
.hero.hero--light::after {
  background: radial-gradient(circle, rgba(26,79,122,0.06) 0%, transparent 70%) !important;
  bottom: -80px; left: -80px;
  width: 400px; height: 400px;
  border-radius: 50%;
  inset: auto !important;
}
.hero.hero--light h1 {
  color: var(--navy) !important;
  text-shadow: none !important;
}
.hero.hero--light .lead {
  color: var(--muted) !important;
  text-shadow: none !important;
}
.hero.hero--light #sl-particles,
.hero.hero--light .sl-blob-wrap {
  display: none !important;
}
