/* ============================================================
   Sly Technologies — slytechs.com
   Dark technical aesthetic matching ExaViewer product UI
   ============================================================ */

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

:root {
  /* Core palette — pulled from ExaViewer dark theme */
  --bg-deep:       #0a0e17;
  --bg-primary:    #0f1420;
  --bg-card:       #141a2a;
  --bg-card-hover: #1a2236;
  --bg-elevated:   #1e2740;
  --bg-code:       #0d1117;

  /* Borders */
  --border-subtle:  #1e2740;
  --border-default: #2a3452;
  --border-bright:  #3a4a6b;

  /* Text */
  --text-primary:   #e8ecf4;
  --text-secondary: #8892a8;
  --text-muted:     #5a6580;
  --text-bright:    #ffffff;

  /* Accent — the blue from ExaViewer's selection highlight */
  --accent:         #3b82f6;
  --accent-dim:     #2563eb;
  --accent-glow:    rgba(59, 130, 246, 0.15);
  --accent-text:    #60a5fa;

  /* Protocol colors from ExaViewer */
  --color-tcp:    #4ade80;
  --color-udp:    #a78bfa;
  --color-http:   #f97316;
  --color-dns:    #38bdf8;
  --color-icmp:   #fbbf24;
  --color-tls:    #818cf8;
  --color-arp:    #f472b6;
  --color-alert:  #ef4444;
  --color-flow:   #22d3ee;

  /* Status */
  --green:  #22c55e;
  --yellow: #eab308;
  --red:    #ef4444;

  /* Spacing */
  --section-pad: clamp(64px, 8vw, 120px);
  --content-max: 1200px;

  /* Typography */
  --font-display: 'DM Sans', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--accent-text); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--text-bright); }

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

/* --- Utility --- */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}

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

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  height: 64px;
}

.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-bright);
  letter-spacing: -0.02em;
}

.nav-logo img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.nav-logo-mark {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: white;
  font-family: var(--font-mono);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-bright);
}

.nav-cta {
  background: var(--accent);
  color: white !important;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
}

.nav-cta:hover {
  background: var(--accent-dim);
  color: white !important;
  transform: translateY(-1px);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  margin: 4px 0;
  transition: 0.3s;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--accent-dim);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25);
}

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

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-text);
  background: var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--accent-text);
  padding: 8px 0;
}

.btn-ghost:hover { color: var(--text-bright); }

.btn-ghost::after {
  content: ' \2192';
  transition: transform 0.2s;
  display: inline-block;
}

.btn-ghost:hover::after {
  transform: translateX(4px);
}

/* --- Hero --- */
.hero {
  padding-top: calc(64px + var(--section-pad));
  padding-bottom: var(--section-pad);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--accent-glow);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-text);
  margin-bottom: 24px;
  font-family: var(--font-mono);
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-bright);
  margin-bottom: 20px;
}

.hero h1 .accent { color: var(--accent-text); }

.hero-sub {
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* Hero screenshot with glow frame */
.hero-screenshot {
  position: relative;
  margin-top: 48px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-default);
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.1),
    0 24px 80px rgba(0, 0, 0, 0.5),
    0 0 120px rgba(59, 130, 246, 0.08);
}

.hero-screenshot img {
  width: 100%;
  display: block;
}

/* --- Proof Bar --- */
.proof-bar {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  padding: 32px 0;
}

.proof-bar-inner {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.proof-stat {
  text-align: center;
}

.proof-stat-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.02em;
}

.proof-stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Section --- */
.section {
  padding: var(--section-pad) 0;
}

.section-header {
  margin-bottom: 56px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-text);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-bright);
  margin-bottom: 16px;
  line-height: 1.15;
}

.section-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.7;
}

/* --- Product Cards (home page) --- */
.products-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 32px;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-default);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.product-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 40px var(--accent-glow);
}

.product-card-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.product-card h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 4px;
}

.product-card .tagline {
  font-size: 14px;
  color: var(--accent-text);
  margin-bottom: 16px;
  font-weight: 500;
}

.product-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 20px;
}

.product-card-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

.product-card-link:hover { color: var(--text-bright); }
.product-card-link::after { content: ' \2192'; }

/* --- Feature Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 28px;
  transition: border-color 0.3s;
}

.feature-card:hover {
  border-color: var(--border-default);
}

.feature-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 18px;
}

.feature-card h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- ExaQL Code Showcase --- */
.code-showcase {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #febc2e; }
.code-dot.green { background: #28c840; }

.code-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 8px;
}

.code-body {
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.8;
  overflow-x: auto;
}

.code-body pre {
  font-family: inherit;
  white-space: pre;
}

.code-comment { color: #6a737d; }
.code-keyword { color: #ff7b72; }
.code-string  { color: #a5d6ff; }
.code-func    { color: #d2a8ff; }
.code-number  { color: #79c0ff; }
.code-ai      { color: #3fb950; font-weight: 600; }
.code-filter  { color: #ffa657; }

/* --- Comparison Table --- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.comparison-table th {
  text-align: left;
  padding: 14px 20px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
}

.comparison-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.comparison-table tr td:first-child {
  color: var(--text-primary);
  font-weight: 500;
}

.comparison-table .check { color: var(--green); }
.comparison-table .cross { color: var(--text-muted); }
.comparison-table .partial { color: var(--yellow); }

.comparison-wrap {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
}

/* --- Screenshot showcase with tabs --- */
.screenshot-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: 10px;
  width: fit-content;
}

.screenshot-tab {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
}

.screenshot-tab:hover { color: var(--text-secondary); }

.screenshot-tab.active {
  background: var(--bg-elevated);
  color: var(--text-bright);
}

.screenshot-panel {
  display: none;
  animation: fade-in 0.3s ease;
}

.screenshot-panel.active { display: block; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.screenshot-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-default);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.4);
}

.screenshot-frame img { width: 100%; display: block; }

.screenshot-caption {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

/* --- Two-column layout --- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }

/* --- Tagline block --- */
.tagline-block {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tagline-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.tagline-block .big {
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 8px;
  line-height: 1.3;
}

.tagline-block .sub {
  font-size: 18px;
  color: var(--text-secondary);
}

.tagline-block .highlight { color: var(--accent-text); }

/* --- CTA Section --- */
.cta-section {
  padding: var(--section-pad) 0;
  text-align: center;
}

.cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.cta-section p {
  color: var(--text-secondary);
  font-size: 17px;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0;
  background: var(--bg-primary);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 12px;
  line-height: 1.6;
}

.footer-col h5 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 10px; }

.footer-col a {
  color: var(--text-secondary);
  font-size: 14px;
}

.footer-col a:hover { color: var(--text-bright); }

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-legal a {
  color: var(--text-muted);
  margin-left: 20px;
}

/* --- Protocol color bar (decorative) --- */
.protocol-bar {
  display: flex;
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
}

.protocol-bar span {
  flex: 1;
  transition: flex 0.3s;
}

/* --- Architecture diagram (text-based) --- */
.arch-diagram {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 32px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  overflow-x: auto;
}

.arch-diagram pre { font-family: inherit; white-space: pre; }
.arch-diagram .arch-highlight { color: var(--accent-text); }
.arch-diagram .arch-green    { color: var(--color-tcp); }
.arch-diagram .arch-dim      { color: var(--text-muted); }

/* --- ExaViewer product page specifics --- */
.interface-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.interface-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.interface-card:hover {
  border-color: var(--border-default);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.interface-card img { width: 100%; display: block; }

.interface-card-body { padding: 24px; }

.interface-card-body h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.interface-card-body p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Full-width interface card */
.interface-card.full {
  grid-column: 1 / -1;
}

/* --- Divider --- */
.divider {
  height: 1px;
  background: var(--border-subtle);
}

/* Subtle grid background */
.grid-bg {
  position: relative;
}

.grid-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, black 20%, transparent 70%);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .split.reverse { direction: ltr; }

  .interface-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .proof-bar-inner {
    gap: 32px;
  }

  .hero-screenshot {
    margin-left: -24px;
    margin-right: -24px;
    border-radius: 0;
  }
}

@media (max-width: 640px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .nav-links { display: none; }
  .nav-toggle { display: block; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .proof-bar-inner { flex-direction: column; gap: 24px; }

  .screenshot-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .comparison-wrap { overflow-x: auto; }
  .comparison-table { min-width: 560px; }
}