/* ─── Litmus · AMOLED Industrial ─────────────────────────────────────── */

:root {
  --bg:          #000000;
  --surface:     #080808;
  --surface-2:   #0e0e0e;
  --border:      #161616;
  --border-mid:  #242424;
  --border-hi:   #363636;
  --text:        #f0f0f0;
  --text-mid:    #808080;
  --text-dim:    #383838;
  --text-ghost:  #1a1a1a;
  --font: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

/* ─── Reset ───────────────────────────────────────────────────────────── */

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

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body { min-height: 100vh; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--text); }

pre, code { font-family: var(--font); font-size: inherit; }

/* ─── Header ──────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 44px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 60, 80, 0.5) 0%, rgba(60, 120, 255, 0.5) 100%);
  opacity: 0.3;
}

.site-header .wordmark {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-header .wordmark::before {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  background: var(--text);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.site-header nav { 
  display: flex; 
  gap: 28px; 
  align-items: center;
}

.site-header nav a {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  transition: all 0.2s;
  display: flex;
  align-items: center;
}

.site-header nav a::before {
  content: '[';
  opacity: 0;
  transform: translateX(4px);
  transition: all 0.2s ease-out;
  color: var(--border-hi);
  margin-right: 6px;
}

.site-header nav a::after {
  content: ']';
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.2s ease-out;
  color: var(--border-hi);
  margin-left: 6px;
}

.site-header nav a:hover { 
  color: var(--text);
}

.site-header nav a:hover::before,
.site-header nav a:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* ─── Hero ────────────────────────────────────────────────────────────── */

.hero {
  padding: 96px 48px 80px;
  border-bottom: 1px solid var(--border);
  min-height: calc(90vh - 44px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 15% 0%, rgba(255, 60, 80, 0.12), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(60, 120, 255, 0.12), transparent 45%);
}

.hero-identity {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 40px;
}

.hero-logo {
  width: clamp(72px, 8vw, 120px);
  height: clamp(72px, 8vw, 120px);
  object-fit: contain;
  flex-shrink: 0;
  mix-blend-mode: screen;
}

.hero h1 {
  font-size: clamp(80px, 14vw, 160px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--text);
}

.tagline {
  font-size: clamp(22px, 3.5vw, 40px);
  font-weight: 300;
  font-style: normal;
  line-height: 1.25;
  color: var(--text-mid);
  max-width: 820px;
  margin-bottom: 40px;
}

.tagline em {
  font-style: italic;
  color: var(--text-dim);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

.hero-meta-div { color: var(--text-ghost); }

/* ─── Install ─────────────────────────────────────────────────────────── */

.install-section {
  padding: 96px 48px;
  border-bottom: 1px solid var(--border);
}

.install-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4em;
  color: var(--text-dim);
  margin-bottom: 28px;
}

.install-quote-wrapper {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.install-quote {
  font-size: clamp(24px, 3.5vw, 42px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.2;
  color: var(--text);
  quotes: none;
}

.copy-button {
  background: var(--surface-2);
  border: 1px solid var(--border-mid);
  color: var(--text-mid);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.copy-button:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-hi);
  transform: translateY(-2px);
}

.copy-button .check-icon {
  display: none;
}

.copy-button.copied {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  transform: translateY(0);
}

.copy-button.copied .copy-icon {
  display: none;
}

.copy-button.copied .check-icon {
  display: block;
}

.install-sub {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-mid);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 36px;
}

/* ─── Ticker ──────────────────────────────────────────────────────────── */

.ticker-wrap {
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  white-space: nowrap;
}

.ticker-track {
  display: inline-block;
  animation: ticker 40s linear infinite;
}

.ticker-inner {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── Stats ───────────────────────────────────────────────────────────── */

.stats-section {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  border-bottom: 1px solid var(--border);
}

.stat {
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-div {
  width: 1px;
  background: var(--border);
  margin: 40px 0;
}

.stat-num {
  font-size: clamp(36px, 4.5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}

.stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ─── Feature split ───────────────────────────────────────────────────── */

.feature-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
  min-height: 520px;
}

.feature-split.reverse {
  direction: rtl;
}

.feature-split.reverse > * {
  direction: ltr;
}

.feature-split-text {
  padding: 72px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--border);
}

.feature-split.reverse .feature-split-text {
  border-right: none;
  border-left: 1px solid var(--border);
}

.feature-index {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: var(--text-ghost);
  margin-bottom: 24px;
  display: block;
}

.feature-split-text h2 {
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 28px;
}

.feature-split-text p {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.8;
  max-width: 440px;
  margin-bottom: 16px;
}

.feature-split-text p:last-child { margin-bottom: 0; }

.feature-split-aside {
  padding: 72px 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Feature diagram widget ──────────────────────────────────────────── */

.feature-diagram {
  width: 100%;
  max-width: 340px;
  border: 1px solid var(--border-mid);
  background: var(--surface);
  padding: 24px 28px;
  font-size: 12px;
}

.fd-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.fd-row:last-of-type { margin-bottom: 0; }

.fd-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fd-dot.active { background: var(--text-mid); }
.fd-dot.dim    { background: var(--text-dim); }

.fd-label { color: var(--text-mid); letter-spacing: 0.04em; }
.fd-dim   { color: var(--text-dim); }

.fd-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.fd-stat-label { color: var(--text-dim); flex: 1; }
.fd-stat-val   { color: var(--text); font-weight: 700; }

/* ─── Circadian widget ────────────────────────────────────────────────── */

.circadian {
  width: 100%;
  max-width: 380px;
}

.circ-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.circ-time {
  font-size: 11px;
  color: var(--text-dim);
  width: 44px;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}

.circ-bar {
  height: 3px;
  flex: 1;
  background: var(--border);
  position: relative;
}

.circ-bar::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--w);
}

.circ-bar.research::before { background: var(--text-mid); }
.circ-bar.leisure::before  { background: var(--text-dim); }

.circ-mode {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--text-mid);
  width: 64px;
  flex-shrink: 0;
}

.circ-mode.dim { color: var(--text-dim); }

.circ-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--text-ghost);
  letter-spacing: 0.1em;
  margin-top: 8px;
  padding-left: 60px;
  padding-right: 72px;
}

/* ─── Feature full ────────────────────────────────────────────────────── */

.feature-full {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 64px;
  padding: 72px 64px;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.feature-full .feature-index {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 9px;
  letter-spacing: 0.35em;
  color: var(--text-ghost);
  margin-bottom: 0;
  align-self: center;
}

.feature-full-inner h2 {
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 24px;
}

.feature-full-inner p {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.8;
}

/* ─── Digest preview widget ───────────────────────────────────────────── */

.digest-preview {
  border: 1px solid var(--border-mid);
  background: var(--surface);
  font-size: 12px;
  line-height: 1.5;
  align-self: center;
}

.dp-header {
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-mid);
  background: var(--surface-2);
}

.dp-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--text-dim);
}

.dp-line {
  padding: 9px 20px;
  color: var(--text-mid);
  border-bottom: 1px solid var(--border);
}

.dp-line:last-child { border-bottom: none; }
.dp-line.hi  { color: var(--text); }
.dp-line.dim { color: var(--text-dim); }

/* ─── CTA ─────────────────────────────────────────────────────────────── */

.cta-section {
  padding: 96px 48px;
  border-bottom: 1px solid var(--border);
}

.cta-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4em;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.cta-head {
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 48px;
}

.cta-links {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.cta-primary {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--bg);
  background: var(--text);
  padding: 14px 28px;
  transition: opacity 0.15s;
}

.cta-primary:hover { opacity: 0.88; color: var(--bg); }

.cta-secondary {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-mid);
  transition: color 0.15s;
}

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

/* ─── Footer ──────────────────────────────────────────────────────────── */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--text-ghost);
}

.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--text-mid); }
.footer-links { display: flex; gap: 28px; }

/* ─── Docs layout ─────────────────────────────────────────────────────── */

.section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4em;
  color: var(--text-dim);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.docs-layout {
  display: grid;
  grid-template-columns: 272px 1fr;
  min-height: calc(100vh - 44px);
}

/* ─── Sidebar ─────────────────────────────────────────────────────────── */

.docs-sidebar {
  position: sticky;
  top: 44px;
  height: calc(100vh - 44px);
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 52px 0;
  scrollbar-width: none;
}

.docs-sidebar::-webkit-scrollbar { display: none; }

.docs-sidebar-section { margin-bottom: 40px; }

.docs-sidebar-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4em;
  color: var(--text-ghost);
  padding: 0 32px;
  margin-bottom: 10px;
}

.docs-sidebar a {
  display: block;
  padding: 7px 32px;
  font-size: 13px;
  font-weight: 300;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  transition: color 0.1s;
}

.docs-sidebar a:hover { color: var(--text-mid); }

.docs-sidebar a.active {
  color: var(--text);
  border-left: 1px solid var(--text-mid);
  padding-left: 31px;
}

/* ─── Content area ────────────────────────────────────────────────────── */

.docs-content {
  padding: 80px 96px;
  max-width: 960px;
}

.docs-content h1 {
  font-size: clamp(32px, 3.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 16px;
}

.docs-content .doc-subtitle {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-dim);
  margin-bottom: 80px;
  line-height: 1.6;
}

.docs-content .doc-subtitle a { color: var(--text-dim); }
.docs-content .doc-subtitle a:hover { color: var(--text-mid); }

/* Section break: large tracked label + full-width rule */
.docs-content h2 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.45em;
  color: var(--text-dim);
  margin-top: 96px;
  margin-bottom: 36px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 20px;
}

.docs-content h2::before {
  content: '//';
  color: var(--text-ghost);
  letter-spacing: 0;
  font-weight: 300;
  flex-shrink: 0;
}

.docs-content h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-top: 48px;
  margin-bottom: 18px;
}

.docs-content p {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.9;
  margin-bottom: 20px;
}

.docs-content ul,
.docs-content ol {
  margin: 0 0 20px 0;
  padding-left: 24px;
  color: var(--text-mid);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.9;
}

.docs-content li { margin-bottom: 6px; }

.docs-content strong { color: var(--text); font-weight: 700; }

.docs-content em { font-style: italic; color: var(--text-mid); }

.docs-content a { color: var(--text-mid); border-bottom: 1px solid var(--border-mid); }
.docs-content a:hover { color: var(--text); border-bottom-color: var(--text-dim); }

.docs-content code {
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-mid);
  padding: 2px 8px;
}

.docs-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 32px 36px;
  margin: 28px 0;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-mid);
}

.docs-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.docs-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 28px 0;
}

.docs-content table th,
.docs-content table td {
  text-align: left;
  padding: 13px 20px;
  border: 1px solid var(--border);
}

.docs-content table th {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  background: var(--surface);
}

.docs-content table td             { color: var(--text-mid); font-weight: 300; }
.docs-content table td:first-child { color: var(--text); font-weight: 400; }

.docs-content .callout {
  border-left: 1px solid var(--border-hi);
  padding: 20px 28px;
  background: var(--surface);
  margin: 32px 0;
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.75;
}

.docs-content .callout strong { color: var(--text); }

/* ─── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .feature-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .feature-split.reverse { direction: ltr; }

  .feature-split-text {
    border-right: none !important;
    border-left: none !important;
    border-bottom: 1px solid var(--border);
    padding: 56px 40px;
  }

  .feature-split-aside { padding: 40px; justify-content: flex-start; }

  .feature-full {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 56px 40px;
  }

  .feature-full .feature-index {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .stats-section {
    grid-template-columns: 1fr 1fr;
  }

  .stat-div { display: none; }

  .stat {
    padding: 40px 32px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }

  .stat:nth-child(4n)  { border-right: none; }
  .stat:nth-child(7n)  { border-right: none; }

  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 28px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
  }
  .docs-sidebar-section { margin-bottom: 0; padding: 8px 0; }
  .docs-content { padding: 56px 48px; }
  .docs-content h2 { margin-top: 72px; }
}

@media (max-width: 640px) {
  .site-header { padding: 0 24px; }

  .hero {
    padding: 48px 24px 40px;
    min-height: calc(85vh - 44px);
  }

  .hero-identity { gap: 20px; }

  .install-section,
  .cta-section { padding: 64px 24px; }

  .stats-section { grid-template-columns: 1fr 1fr; }

  .stat { padding: 32px 24px; }

  .feature-split-text,
  .feature-split-aside { padding: 40px 24px; }

  .feature-full { padding: 48px 24px; }

  .site-footer {
    flex-direction: column;
    gap: 16px;
    padding: 20px 24px;
  }

  .docs-content { padding: 40px 24px; }
  .docs-content h2 { margin-top: 56px; }
  .docs-sidebar-section { display: block; }

  .cta-links { flex-direction: column; align-items: flex-start; gap: 24px; }
}
