@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&family=JetBrains+Mono:wght@500;600;700&display=swap');

:root {
  --lab-bg: #0D1117;
  --lab-surface: #161B22;
  --lab-panel: #1C2128;
  --lab-border: #30363D;
  --lab-muted: #8B949E;
  --lab-text: #C9D1D9;
  --lab-cyan: #22D3EE;
  --lab-green: #4ADE80;
  --lab-cyan-dim: rgba(34, 211, 238, 0.15);
  --lab-green-dim: rgba(74, 222, 128, 0.12);
  --lab-glow: 0 0 24px rgba(34, 211, 238, 0.08);
  --mono: 'JetBrains Mono', 'Consolas', monospace;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--lab-text);
  background: var(--lab-bg);
  line-height: 1.75;
  font-size: 1rem;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(34, 211, 238, 0.015) 2px,
    rgba(34, 211, 238, 0.015) 4px
  );
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4 {
  font-family: var(--mono);
  color: var(--lab-cyan);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.75rem, 4.5vw, 2.75rem); font-weight: 700; }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); font-weight: 600; margin-bottom: 1rem; }
h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--lab-green); }

a { color: var(--lab-cyan); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--lab-green); }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 1; }

.mono-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--lab-green);
}

/* Header — terminal bar */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--lab-surface);
  border-bottom: 1px solid var(--lab-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
}

.logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--lab-cyan);
}

.logo span { color: var(--lab-green); }
.logo::before { content: '> '; color: var(--lab-muted); }

.nav-list {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  align-items: center;
}

.nav-list a {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--lab-muted);
  padding: 0.45rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: all 0.2s;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--lab-cyan);
  border-color: var(--lab-border);
  background: var(--lab-panel);
}

.nav-toggle {
  display: none;
  background: var(--lab-panel);
  border: 1px solid var(--lab-border);
  cursor: pointer;
  padding: 0.5rem 0.65rem;
  border-radius: 4px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--lab-cyan);
  margin: 4px 0;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.35rem;
  border-radius: 4px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s;
  text-align: center;
}

.btn-primary {
  background: var(--lab-cyan);
  color: var(--lab-bg);
  border-color: var(--lab-cyan);
}

.btn-primary:hover {
  background: var(--lab-green);
  border-color: var(--lab-green);
  color: var(--lab-bg);
}

.btn-outline {
  background: transparent;
  color: var(--lab-cyan);
  border-color: var(--lab-cyan);
}

.btn-outline:hover {
  background: var(--lab-cyan-dim);
  color: var(--lab-green);
  border-color: var(--lab-green);
}

main { padding-top: 64px; position: relative; z-index: 1; }

/* Notebook cell */
.notebook-cell {
  background: var(--lab-surface);
  border: 1px solid var(--lab-border);
  border-radius: 6px;
  overflow: hidden;
}

.cell-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--lab-panel);
  border-bottom: 1px solid var(--lab-border);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--lab-muted);
}

.cell-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lab-border);
}

.cell-bar .dot.run { background: var(--lab-green); }
.cell-body { padding: 1.5rem; }

/* Experiment log panel */
.log-panel {
  background: var(--lab-panel);
  border: 1px solid var(--lab-border);
  border-left: 3px solid var(--lab-green);
  border-radius: 0 6px 6px 0;
  padding: 1.25rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.88rem;
}

.log-panel .timestamp {
  color: var(--lab-muted);
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

/* Hero — split terminal layout */
.hero {
  padding: 4rem 0 3.5rem;
  border-bottom: 1px solid var(--lab-border);
}

.hero-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: start;
}

.hero-prompt {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--lab-green);
  margin-bottom: 1rem;
}

.hero-prompt::before { content: '$ '; color: var(--lab-muted); }

.hero h1 { margin-bottom: 1rem; }
.hero-lead { font-size: 1.05rem; margin-bottom: 1.25rem; max-width: 540px; }

.hero-clarify {
  background: var(--lab-green-dim);
  border: 1px solid rgba(74, 222, 128, 0.35);
  padding: 1rem 1.25rem;
  border-radius: 4px;
  font-size: 0.92rem;
  margin: 1.25rem 0;
}

.hero-clarify strong { color: var(--lab-green); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.hero-terminal {
  background: var(--lab-surface);
  border: 1px solid var(--lab-border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--lab-glow);
}

.hero-terminal pre {
  padding: 1.25rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.6;
  overflow-x: auto;
  color: var(--lab-text);
}

.hero-terminal .kw { color: var(--lab-cyan); }
.hero-terminal .fn { color: var(--lab-green); }
.hero-terminal .cm { color: var(--lab-muted); }

.hero-img-wrap {
  margin-top: 1.5rem;
  border: 1px solid var(--lab-border);
  border-radius: 6px;
  overflow: hidden;
}

/* Sections */
.section { padding: 3.5rem 0; }
.section-dark { background: var(--lab-surface); }
.section-head { margin-bottom: 2rem; }
.section-head.center { text-align: center; }
.section-head.center p { max-width: 620px; margin: 0.5rem auto 0; color: var(--lab-muted); }

/* Callout */
.callout-strip {
  background: var(--lab-cyan-dim);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 6px;
  padding: 2rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
}

.callout-icon {
  font-family: var(--mono);
  font-size: 2rem;
  color: var(--lab-cyan);
  line-height: 1;
}

/* Stats — horizontal metric strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--lab-border);
  border: 1px solid var(--lab-border);
  border-radius: 6px;
  overflow: hidden;
}

.stat-block {
  background: var(--lab-panel);
  padding: 1.5rem 1rem;
  text-align: center;
}

.stat-val {
  font-family: var(--mono);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--lab-cyan);
}

.stat-key {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--lab-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.35rem;
}

/* Pipeline cards — 4 columns */
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.pipeline-card {
  background: var(--lab-surface);
  border: 1px solid var(--lab-border);
  border-radius: 6px;
  padding: 1.5rem;
  position: relative;
  transition: border-color 0.3s;
}

.pipeline-card:hover { border-color: var(--lab-cyan); }

.pipeline-card .step-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--lab-bg);
  background: var(--lab-green);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 0.75rem;
}

/* Inside lab */
.lab-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.lab-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.lab-checklist li {
  padding-left: 1.75rem;
  position: relative;
  font-size: 0.95rem;
}

.lab-checklist li::before {
  content: '[✓]';
  position: absolute;
  left: 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--lab-green);
}

/* Why — 4 reason blocks */
.reasons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.reason-block {
  background: var(--lab-panel);
  border: 1px solid var(--lab-border);
  padding: 1.5rem;
  border-radius: 6px;
}

.reason-block .num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--lab-cyan);
  margin-bottom: 0.5rem;
}

/* Method — 4 steps horizontal */
.method-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.method-rail::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, var(--lab-cyan), var(--lab-green));
  z-index: 0;
}

.method-node {
  text-align: center;
  padding: 0 0.75rem;
  position: relative;
  z-index: 1;
}

.method-node .node-circle {
  width: 56px;
  height: 56px;
  background: var(--lab-bg);
  border: 2px solid var(--lab-cyan);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--lab-cyan);
  margin: 0 auto 1rem;
}

.method-node p { font-size: 0.9rem; color: var(--lab-muted); }

/* Programme preview cards */
.programme-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.prog-card {
  background: var(--lab-surface);
  border: 1px solid var(--lab-border);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.3s;
}

.prog-card:hover { transform: translateY(-3px); border-color: var(--lab-cyan); }

.prog-card img { height: 180px; object-fit: cover; width: 100%; }

.prog-card-body { padding: 1.35rem; }

.prog-code {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--lab-green);
  margin-bottom: 0.5rem;
}

.prog-price {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--lab-cyan);
  margin-top: 0.75rem;
}

/* Mini FAQ */
.mini-faq .faq-item {
  background: var(--lab-surface);
  border: 1px solid var(--lab-border);
  border-radius: 4px;
  margin-bottom: 0.65rem;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--lab-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after { content: '+'; color: var(--lab-cyan); font-size: 1.1rem; }
.faq-item.open .faq-question::after { content: '−'; color: var(--lab-green); }
.faq-item.open .faq-question { color: var(--lab-cyan); }

.faq-answer {
  padding: 0 1.25rem 1rem;
  display: none;
  font-size: 0.92rem;
  color: var(--lab-muted);
}

.faq-item.open .faq-answer { display: block; }

/* Testimonials */
.testimonial-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.testimonial-card {
  background: var(--lab-panel);
  border: 1px solid var(--lab-border);
  padding: 1.5rem;
  border-radius: 6px;
  position: relative;
}

.testimonial-card::before {
  content: '"';
  font-family: var(--mono);
  font-size: 2.5rem;
  color: var(--lab-cyan);
  opacity: 0.4;
  line-height: 1;
  position: absolute;
  top: 0.5rem;
  left: 1rem;
}

.testimonial-card blockquote {
  padding-top: 1.5rem;
  font-size: 0.92rem;
  font-style: italic;
}

.testimonial-author {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--lab-green);
  margin-top: 1rem;
}

/* CTA */
.cta-lab {
  background: linear-gradient(135deg, var(--lab-panel) 0%, var(--lab-surface) 100%);
  border: 1px solid var(--lab-border);
  border-radius: 8px;
  padding: 3.5rem 2rem;
  text-align: center;
  margin: 0 1.5rem;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.cta-lab h2 { margin-bottom: 0.75rem; }

/* Disclaimer */
.disclaimer-box {
  background: var(--lab-panel);
  border: 1px solid var(--lab-border);
  border-left: 3px solid var(--lab-muted);
  border-radius: 0 4px 4px 0;
  padding: 1.25rem 1.5rem;
  font-size: 0.85rem;
  color: var(--lab-muted);
  margin: 2rem 0;
}

.disclaimer-box strong { color: var(--lab-text); }

/* Page hero */
.page-hero {
  padding: 3rem 0;
  border-bottom: 1px solid var(--lab-border);
  background: var(--lab-surface);
}

.page-hero .mono-label { margin-bottom: 0.75rem; display: block; }
.page-hero p { max-width: 640px; color: var(--lab-muted); margin-top: 0.75rem; }

/* Program full cards */
.program-full-grid { display: flex; flex-direction: column; gap: 2rem; }

.program-full-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  background: var(--lab-surface);
  border: 1px solid var(--lab-border);
  border-radius: 6px;
  overflow: hidden;
}

.program-full-card img { height: 100%; min-height: 220px; object-fit: cover; }
.program-full-body { padding: 1.75rem; }

.program-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0; }

.program-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  background: var(--lab-panel);
  border: 1px solid var(--lab-border);
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  color: var(--lab-muted);
}

/* Services */
.service-block {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--lab-border);
}

.service-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.service-block:nth-child(even) { direction: rtl; }
.service-block:nth-child(even) > * { direction: ltr; }

.service-block img {
  border: 1px solid var(--lab-border);
  border-radius: 6px;
  height: 240px;
  object-fit: cover;
  width: 100%;
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 2.5rem;
}

.contact-detail {
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: var(--lab-panel);
  border: 1px solid var(--lab-border);
  border-radius: 4px;
}

.contact-detail strong {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--lab-green);
  display: block;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-group { margin-bottom: 1.15rem; }

.form-group label {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--lab-muted);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--lab-bg);
  border: 1px solid var(--lab-border);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--lab-text);
}

.form-group textarea { min-height: 140px; resize: vertical; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--lab-cyan);
  box-shadow: 0 0 0 2px var(--lab-cyan-dim);
}

.form-check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.88rem;
}

.form-check input { margin-top: 0.3rem; width: auto; accent-color: var(--lab-cyan); }

.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form-status {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
}

.form-status.ok {
  background: var(--lab-green-dim);
  border: 1px solid rgba(74, 222, 128, 0.4);
  color: var(--lab-green);
}

.form-status.err {
  background: rgba(248, 81, 73, 0.12);
  border: 1px solid rgba(248, 81, 73, 0.4);
  color: #F85149;
}

/* Legal */
.legal-content h2 { margin-top: 2rem; margin-bottom: 0.75rem; font-size: 1.2rem; }
.legal-content h3 { margin-top: 1.35rem; margin-bottom: 0.5rem; font-size: 1rem; color: var(--lab-cyan); }
.legal-content p, .legal-content li { margin-bottom: 0.75rem; color: var(--lab-muted); }
.legal-content ul, .legal-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }

/* About team */
.team-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.team-member {
  text-align: center;
  background: var(--lab-surface);
  border: 1px solid var(--lab-border);
  padding: 1.5rem 1rem;
  border-radius: 6px;
}

.team-member .role {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--lab-muted);
  margin-top: 0.35rem;
}

/* Footer */
.site-footer {
  background: var(--lab-surface);
  border-top: 1px solid var(--lab-border);
  padding: 3rem 0 1.5rem;
  font-size: 0.88rem;
  margin-top: 3rem;
}

.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-cols h4 {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--lab-cyan);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-cols ul { list-style: none; }
.footer-cols li { margin-bottom: 0.4rem; }
.footer-cols a { color: var(--lab-muted); }
.footer-cols a:hover { color: var(--lab-green); }

.footer-reg {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--lab-muted);
  line-height: 1.8;
  margin-top: 0.75rem;
}

.footer-bottom {
  border-top: 1px solid var(--lab-border);
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--lab-muted);
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--lab-surface);
  border-top: 2px solid var(--lab-cyan);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
  display: none;
}

.cookie-banner.show { display: block; }

.cookie-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.cookie-inner p { flex: 1; min-width: 280px; font-size: 0.88rem; color: var(--lab-muted); }
.cookie-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.cookie-custom {
  display: none;
  width: 100%;
  padding-top: 1rem;
  border-top: 1px solid var(--lab-border);
}

.cookie-custom.show { display: block; }

.cookie-custom label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}

/* 404 */
.error-lab {
  text-align: center;
  padding: 6rem 0;
}

.error-lab .error-code {
  font-family: var(--mono);
  font-size: 4rem;
  color: var(--lab-cyan);
  opacity: 0.5;
}

.error-lab h1 { margin: 1rem 0; }

/* Fade animation — visible by default */
.fade-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s, transform 0.45s;
}
html.js-anim .fade-in.animate-pending { opacity: 0; transform: translateY(16px); }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 960px) {
  .hero-split, .lab-feature-grid, .contact-layout,
  .footer-cols, .stats-strip, .pipeline-grid,
  .method-rail, .programme-preview-grid, .testimonial-row,
  .team-row, .reasons-grid, .program-full-card, .service-block,
  .service-block:nth-child(even) {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .method-rail::before { display: none; }

  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--lab-surface);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--lab-border);
  }

  .nav-list.open { display: flex; }
  .nav-toggle { display: block; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .stats-strip { grid-template-columns: 1fr; }
  .callout-strip { grid-template-columns: 1fr; }
}
