/* ==================================================
   QUANTENSOR — static site stylesheet
   Terminal / quantum-dashboard aesthetic on a navy-teal brand base
   ================================================== */

:root {
  --bg: #05080d;
  --bg-alt: #080d16;
  --surface: #0c131f;
  --surface-2: #101a29;
  --border: #1c2839;
  --border-light: #2a3b52;
  --text: #e7edf5;
  --text-dim: #94a3b8;
  --text-faint: #57687e;

  --accent: #22e5a8;
  --accent-dim: #159a7f;
  --accent-soft: rgba(34, 229, 168, 0.12);
  --blue: #2f7bff;
  --blue-soft: rgba(47, 123, 255, 0.14);
  --red: #ff5c6a;
  --green: #22e5a8;

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, 'Courier New', monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-w: 1180px;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

.mono { font-family: var(--mono); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #04120d;
  padding: 10px 16px;
  z-index: 999;
  font-family: var(--mono);
  font-size: 13px;
}
.skip-link:focus { left: 10px; top: 10px; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- background layers ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

#net-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 640px;
  z-index: -1;
  opacity: 0.55;
  pointer-events: none;
}

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* i18n language toggle: [hidden] can lose the cascade to a component's own
   `display` rule (equal specificity, author beats UA) unless we force it. */
.i18n[hidden] {
  display: none !important;
}

/* ==================================================
   HEADER
   ================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 8, 13, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(5, 8, 13, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}
.brand-mark {
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 15px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav-link {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-dim);
  letter-spacing: 0.3px;
  transition: color 0.2s ease;
  white-space: nowrap;
}
.nav-link:hover { color: var(--accent); }
.nav-cta { display: none; }

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 3px;
  flex-shrink: 0;
}
.lang-btn {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active {
  background: var(--accent);
  color: #05130f;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px 1px var(--accent);
  animation: blink 1.8s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 0 7px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==================================================
   BUTTONS
   ================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 13px 22px;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #17c294);
  color: #05130f;
  box-shadow: 0 0 0 1px rgba(34,229,168,0.4), 0 8px 24px -8px rgba(34,229,168,0.5);
}
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(34,229,168,0.6), 0 10px 28px -6px rgba(34,229,168,0.65); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-light);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-sm { padding: 9px 14px; font-size: 12px; }
.soon {
  font-size: 0.72em;
  font-weight: 500;
  opacity: 0.75;
  letter-spacing: 0.2px;
}
.btn-block { width: 100%; margin-top: 22px; padding: 15px; font-size: 13.5px; }

/* ==================================================
   HERO
   ================================================== */
.hero {
  padding: 76px 0 40px;
  position: relative;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 18px;
}
.eyebrow.center { text-align: center; }

.hero-copy h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.grad-text {
  background: linear-gradient(100deg, var(--accent) 10%, var(--blue) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.hero-desc {
  margin-top: 18px;
  max-width: 560px;
  color: var(--text-dim);
  font-size: 16px;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* terminal panel */
.hero-panel, .contact-panel {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
}
.panel-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.panel-dots { display: flex; gap: 6px; }
.panel-dots i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--border-light);
  display: inline-block;
}
.panel-dots i:nth-child(1) { background: #ff5f57; }
.panel-dots i:nth-child(2) { background: #febc2e; }
.panel-dots i:nth-child(3) { background: #28c840; }
.panel-title { font-family: var(--mono); font-size: 12px; color: var(--text-faint); }

.panel-body { padding: 22px; }
.panel-body p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px dashed rgba(255,255,255,0.06);
}
.panel-body p:last-child { border-bottom: none; }
.panel-body .k { color: var(--text-faint); letter-spacing: 0.5px; }
.panel-body .v { color: var(--text); font-weight: 600; }
.panel-body .v.ok { color: var(--accent); }
.panel-body .typing { color: var(--text-faint); border-bottom: none; justify-content: flex-start; margin-top: 6px; }
.cursor { animation: blink 1s step-start infinite; color: var(--accent); }

/* stat row */
.stat-row {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  text-align: center;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.stat-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.stat-num {
  display: block;
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}
.stat-num-sm {
  font-size: 19px;
  letter-spacing: -0.2px;
}
.stat-label {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}

/* ==================================================
   TICKER
   ================================================== */
.ticker-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  overflow: hidden;
  padding: 14px 0;
}
.ticker-track {
  display: flex;
  gap: 40px;
  width: max-content;
  animation: scrollTicker 38s linear infinite;
}
.ticker-section:hover .ticker-track { animation-play-state: paused; }
@keyframes scrollTicker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  white-space: nowrap;
  color: var(--text-dim);
}
.ticker-item .pair { color: var(--text); font-weight: 600; }
.ticker-item .up { color: var(--green); }
.ticker-item .down { color: var(--red); }

/* ==================================================
   SECTIONS (shared)
   ================================================== */
.section { padding: 90px 0; position: relative; }
.section-alt { background: linear-gradient(180deg, var(--bg-alt), var(--bg)); }

.section-title {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.3px;
  max-width: 760px;
  margin-bottom: 18px;
}
.section-title.center { margin-left: auto; margin-right: auto; text-align: center; }

.section-desc {
  color: var(--text-dim);
  max-width: 760px;
  margin-bottom: 20px;
  font-size: 15.5px;
}
.section-desc.center { margin-left: auto; margin-right: auto; text-align: center; }

.sub-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 40px 0 14px;
}

/* grid helpers */
.grid { display: grid; gap: 18px; margin: 34px 0; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.fc-icon {
  display: inline-flex;
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 14px;
}
.feature-card h3 { font-size: 16.5px; margin-bottom: 10px; font-weight: 700; }
.feature-card p { color: var(--text-dim); font-size: 14px; }

.banner {
  margin-top: 30px;
  background: linear-gradient(90deg, var(--blue), #1a5cd6);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px 28px;
  font-weight: 700;
  font-size: 15.5px;
  text-align: center;
  line-height: 1.5;
}

/* pipeline */
.pipeline {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.pipe-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 18px;
}
.pipe-num {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 1px;
  opacity: 0.85;
}
.pipe-step h3 { font-size: 15px; margin: 10px 0 8px; font-weight: 700; }
.pipe-step p { font-size: 13px; color: var(--text-dim); }

/* two column lists */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 34px 0;
}
.col-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.col-card h3 { font-size: 16px; margin-bottom: 16px; color: var(--accent); }

.check-list li {
  position: relative;
  padding: 8px 0 8px 24px;
  font-size: 14.5px;
  color: var(--text-dim);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.check-list li:last-child { border-bottom: none; }
.check-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.badge {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  border: 1px solid var(--border-light);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
}

/* data table */
.table-wrap { overflow-x: auto; margin: 24px 0; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14.5px;
}
.data-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--text-faint);
  background: var(--surface-2);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}
.data-table tr:last-child td { border-bottom: none; }

.tag {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 5px;
  letter-spacing: 0.5px;
}
.tag-long { color: var(--green); background: rgba(34,229,168,0.12); }
.tag-short { color: var(--red); background: rgba(255,92,106,0.12); }
.tag-neutral { color: var(--text-dim); background: rgba(255,255,255,0.06); }

/* risk cards */
.risk-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: 8px;
  padding: 18px 20px;
}
.risk-card h4 { font-size: 14.5px; margin-bottom: 8px; }
.risk-card p { font-size: 13.5px; color: var(--text-dim); }

/* lifecycle */
.lifecycle {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.life-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  position: relative;
}
.life-step h4 { font-size: 14px; margin: 8px 0 6px; }
.life-step p { font-size: 12.5px; color: var(--text-dim); }

/* contact */
.contact-panel { max-width: 560px; margin: 0 auto; }
.contact-rows .v.link { color: var(--accent); }
.contact-rows .v.link:hover { opacity: 0.8; }

.disclaimer {
  max-width: 760px;
  margin: 40px auto 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: var(--surface);
}
.disclaimer-label {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.disclaimer p:last-child { font-size: 12.5px; color: var(--text-faint); line-height: 1.7; }

/* ==================================================
   FOOTER
   ================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  background: var(--bg-alt);
}
.footer-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-dim);
}
.footer-brand img {
  border-radius: 5px;
  object-fit: cover;
}
.footer-copy {
  font-size: 11.5px;
  color: var(--text-faint);
  flex: 1 1 320px;
  text-align: center;
}
.footer-links { display: flex; gap: 16px; }
.footer-links a {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-dim);
}
.footer-links a:hover { color: var(--accent); }

.to-top {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.to-top:hover { border-color: var(--accent); color: var(--accent); }

/* ==================================================
   RESPONSIVE
   ================================================== */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-panel { max-width: 480px; }
  .grid-4, .stat-row { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: repeat(3, 1fr); }
  .lifecycle { grid-template-columns: repeat(3, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }

  .main-nav.open {
    display: flex;
    position: absolute;
    top: 68px;
    left: 0; right: 0;
    flex-direction: column;
    background: rgba(5,8,13,0.98);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 22px;
    gap: 4px;
  }
  .main-nav.open .nav-link { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .main-nav.open .nav-cta {
    display: block;
    margin-top: 10px;
    text-align: center;
    color: #05130f;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #17c294);
    padding: 13px;
    border-radius: 7px;
    border-bottom: none;
  }
  .status-pill { display: none; }
  .header-right .btn.btn-primary.btn-sm { display: none; }
}

@media (max-width: 640px) {
  .header-inner { height: 60px; }
  .hero { padding: 44px 0 30px; }
  .stat-row, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: 1fr 1fr; }
  .lifecycle { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .footer-inner { flex-direction: column; text-align: center; }
  .btn-block { width: 100%; }
}

@media (max-width: 420px) {
  .stat-row, .grid-4, .pipeline, .lifecycle { grid-template-columns: 1fr; }
}
