/* Viriditas — Lab Black */
@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500;600&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --bg: #06120B;
  --bg-1: #0A1A12;
  --bg-2: #0F2419;
  --line: #15302180;
  --line-bright: #1F4A33;
  --ink: #E8F5EC;
  --ink-dim: #8DA89A;
  --ink-mute: #4A6655;
  --phos: #7BFF9C;
  --phos-dim: #4FCB78;
  --cyan: #67E8F9;
  --amber: #FFD27A;
  --red: #FF7B7B;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Inter Tight', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(123, 255, 156, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(103, 232, 249, 0.05), transparent 60%);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

::selection { background: var(--phos); color: var(--bg); }

/* Subtle dot grid background */
.grid-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(123, 255, 156, 0.06) 1px, transparent 0);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 30%, black, transparent 90%);
}

/* Scanline / vignette */
.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(0,0,0,0.12) 3px,
    rgba(0,0,0,0.12) 4px
  );
  mix-blend-mode: multiply;
  opacity: 0.5;
}

/* Type */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--phos);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--phos);
  box-shadow: 0 0 10px var(--phos);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.h-display {
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 0.96;
  font-size: clamp(48px, 9vw, 144px);
}
.h-display em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--phos);
}
.h-section {
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1;
  font-size: clamp(40px, 6vw, 88px);
}
.h-section em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.h-card {
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-size: clamp(22px, 2.4vw, 32px);
}
.body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-dim);
  text-wrap: pretty;
}
.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.mono { font-family: var(--mono); }

/* Layout */
.section {
  position: relative;
  padding: 140px 48px;
  z-index: 2;
}
.section-narrow {
  padding: 120px 48px;
}
.container {
  max-width: 1440px;
  margin: 0 auto;
}
.container-tight {
  max-width: 1200px;
  margin: 0 auto;
}

/* Crosshair corners */
.crosshair { position: relative; }
.crosshair::before,
.crosshair::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--line-bright);
}
.crosshair::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.crosshair::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1px solid var(--line-bright);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.btn:hover {
  border-color: var(--phos);
  color: var(--phos);
  background: rgba(123, 255, 156, 0.04);
}
.btn-primary {
  background: var(--phos);
  color: var(--bg);
  border-color: var(--phos);
}
.btn-primary:hover {
  background: transparent;
  color: var(--phos);
  box-shadow: 0 0 24px rgba(123, 255, 156, 0.25);
}
.btn .dot {
  width: 6px; height: 6px;
  background: currentColor;
  border-radius: 50%;
}

/* Cards */
.card {
  background: rgba(15, 36, 25, 0.4);
  border: 1px solid var(--line);
  padding: 32px;
  position: relative;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--line-bright); }

/* Tags */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-bright);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.tag-phos { color: var(--phos); border-color: var(--phos); }
.tag-cyan { color: var(--cyan); border-color: var(--cyan); }
.tag-amber { color: var(--amber); border-color: var(--amber); }

/* Section header */
.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  margin-bottom: 80px;
  align-items: end;
}
@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; }
  .section { padding: 80px 24px; }
}

/* Animated underline */
.under {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
}

/* Live data tick */
@keyframes flicker {
  0%, 96%, 100% { opacity: 1; }
  97%, 99% { opacity: 0.6; }
}
.live { animation: flicker 4s infinite; }

/* Marquee/ticker */
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Glow */
.glow {
  text-shadow: 0 0 24px rgba(123, 255, 156, 0.4);
}

/* Nav */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6, 18, 11, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-links {
  display: flex;
  gap: 32px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-links a {
  color: var(--ink-dim);
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover { color: var(--phos); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::before {
  content: '◆';
  margin-right: 6px;
  color: var(--phos);
  font-size: 8px;
}
@media (max-width: 800px) {
  .nav { padding: 14px 20px; }
  .nav-links { display: none; }
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 18px;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.logo-mark {
  width: 22px; height: 22px;
  position: relative;
}

/* Hero */
.hero {
  height: 100vh;
  min-height: 720px;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 48px;
  overflow: hidden;
}
.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}
.hero-meta {
  position: absolute;
  bottom: 40px;
  left: 48px;
  right: 48px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  z-index: 2;
  gap: 40px;
}
@media (max-width: 800px) {
  .hero { padding: 0 20px; }
  .hero-meta { left: 20px; right: 20px; flex-direction: column; align-items: start; }
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 60px 48px 40px;
  position: relative;
  z-index: 2;
}

/* Form */
input, textarea, select {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-bright);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  padding: 14px 0;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}
input:focus, textarea:focus, select:focus { border-color: var(--phos); }
input::placeholder, textarea::placeholder { color: var(--ink-mute); }

/* Specific data viz */
.tick-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.tick-row .key { color: var(--ink-mute); }
.tick-row .val { color: var(--ink); margin-left: auto; }

/* Helpers */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 16px; }
.gap-2 { gap: 8px; }
.mt-8 { margin-top: 32px; }
.mt-6 { margin-top: 24px; }
.mt-12 { margin-top: 48px; }
.text-center { text-align: center; }

.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line-bright), transparent);
  margin: 0;
}

/* Animations on scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal.in { opacity: 1; transform: translateY(0); }
