/* OneDroid landing — tokens straight from brand-guide.md v1.0 */

:root {
  --void: #0A0A0B;
  --slate: #141417;
  --ash: #27272A;
  --bone: #FAFAF9;
  --stone: #A1A1AA;
  --graphite: #52525B;
  --signal: #E8590C;
  --signal-light: #F97316;
  --signal-dim: #7C2D12;
  --success: #16A34A;
  --warning: #CA8A04;
  --error: #DC2626;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --container: 1200px;
  --radius: 6px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--void);
  color: var(--bone);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Type ---------- */

h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--signal);
  margin-bottom: 16px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.btn-primary {
  background: var(--signal);
  color: var(--bone);
}
.btn-primary:hover { background: var(--signal-light); }

.btn-secondary {
  background: transparent;
  color: var(--bone);
  border-color: var(--ash);
}
.btn-secondary:hover { border-color: var(--graphite); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 10, 11, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ash);
}

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

.site-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.site-nav a {
  color: var(--stone);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 140ms ease;
}
.site-nav a:hover { color: var(--bone); }

/* ---------- Wordmark (per brand-guide logo construction) ---------- */

.wordmark {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--bone);
  text-decoration: none;
  white-space: nowrap;
}

.wm-1d {
  position: relative;
  z-index: 0;
  padding: 0 0.08em;
}

.wm-1d::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: 1.28em;
  height: 1.28em;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  background: var(--signal);
  border-radius: 50%;
}

.wordmark-sm { font-size: 1.05rem; }

/* ---------- Hero ---------- */

.hero { padding: 104px 0 40px; }

.hero-tagline {
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 14px;
}

.hero-sub {
  max-width: 56ch;
  color: var(--stone);
  font-size: 1.125rem;
  margin-top: 24px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* ---------- Governance plane ---------- */

.plane-section { padding: 40px 0 96px; }

.plane-frame {
  border: 1px solid var(--ash);
  border-radius: var(--radius);
  background: var(--slate);
  overflow: hidden;
}

#plane, #fusion, #pipeline {
  display: block;
  width: 100%;
  height: 400px;
  cursor: crosshair;
}

.plane-static {
  display: none;
  padding: 96px 24px;
  text-align: center;
  font-family: var(--font-mono);
  color: var(--stone);
  font-size: 1rem;
}
.plane-static .ring-word {
  color: var(--signal);
  border: 1.5px solid var(--signal);
  border-radius: 999px;
  padding: 6px 18px;
}

@media (prefers-reduced-motion: reduce) {
  #plane { display: none; }
  .plane-static { display: block; }
}

.ticker {
  border-top: 1px solid var(--ash);
  background: var(--void);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.ticker-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 0;
  color: var(--stone);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ticker-note { color: var(--graphite); margin-left: auto; text-transform: none; letter-spacing: 0; }

.dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

#ticker-lines {
  list-style: none;
  padding: 8px 16px 12px;
  height: 148px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

#ticker-lines li {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.85;
  color: var(--stone);
}

#ticker-lines .t-time { color: var(--graphite); }
#ticker-lines .t-q { color: var(--signal); font-weight: 500; }
#ticker-lines .t-allow { color: var(--success); font-weight: 500; }
#ticker-lines .t-deny { color: var(--error); font-weight: 500; }
#ticker-lines .t-tool { color: var(--bone); }
#ticker-lines .t-meta { color: var(--graphite); }

/* ---------- Sections ---------- */

.problem { padding: 96px 0; border-top: 1px solid var(--ash); }

.problem blockquote p {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  max-width: 34ch;
}

.problem cite {
  display: block;
  margin-top: 16px;
  font-style: normal;
  color: var(--graphite);
  font-size: 0.9375rem;
}

.problem-body {
  margin-top: 32px;
  max-width: 62ch;
  color: var(--stone);
  font-size: 1.0625rem;
}

.how { padding: 96px 0; border-top: 1px solid var(--ash); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.step {
  border: 1px solid var(--ash);
  border-radius: var(--radius);
  background: var(--slate);
  padding: 24px;
  min-width: 0;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--signal);
  display: block;
  margin-bottom: 12px;
}

.step h3 { margin-bottom: 8px; }

.step p { color: var(--stone); font-size: 0.9375rem; }

.step pre {
  margin-top: 16px;
  background: var(--void);
  border: 1px solid var(--ash);
  border-radius: var(--radius);
  padding: 12px;
  overflow-x: auto;
}

.step code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--stone);
  line-height: 1.5;
}

.capabilities { padding: 96px 0; border-top: 1px solid var(--ash); }

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cap-card {
  border: 1px solid var(--ash);
  border-radius: var(--radius);
  background: var(--slate);
  padding: 24px;
  min-width: 0;
  transition: border-color 140ms ease;
}
.cap-card:hover { border-color: var(--graphite); }

.cap-card h3 { margin-bottom: 8px; }
.cap-card p { color: var(--stone); font-size: 0.9375rem; }

.suite { padding: 96px 0; border-top: 1px solid var(--ash); }

.suite-list { list-style: none; }

.suite-list li {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--ash);
}
.suite-list li:first-child { border-top: 1px solid var(--ash); }

.suite-status {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-live { background: var(--success); }
.status-dev { border: 1.5px dashed var(--graphite); background: transparent; }

.suite-list h3 { font-size: 1rem; }
.suite-list p { color: var(--stone); font-size: 0.9375rem; }

.suite-tag {
  margin-left: auto;
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--stone);
  border: 1px solid var(--ash);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.byodb { padding: 96px 0; border-top: 1px solid var(--ash); }

.byodb-lead {
  max-width: 62ch;
  color: var(--stone);
  font-size: 1.0625rem;
  margin: -16px 0 48px;
}

.suite-link {
  flex: none;
  font-size: 0.875rem;
  color: var(--signal);
  text-decoration: none;
  white-space: nowrap;
}
.suite-link::after { content: ' \2192'; }
.suite-link:hover { color: var(--signal-light); }

.why { padding: 96px 0; border-top: 1px solid var(--ash); }

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.why-grid h3 { margin-bottom: 8px; }
.why-grid p { color: var(--stone); font-size: 0.9375rem; max-width: 40ch; }

/* Free-tier reassurance directly under the hero CTAs. */
.hero-free {
  margin-top: 16px;
  color: var(--stone);
  font-size: 0.9375rem;
}

/* Qualifying copy under a CTA band: who you reach, and how fast we answer. */
.cta-sub {
  margin-top: 20px;
  max-width: 60ch;
  color: var(--stone);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.muted { color: var(--stone); font-size: 0.875rem; }

/* Real product screenshots. width/height are set on the <img> so the browser reserves the
   box before the image loads — otherwise every caption below jumps on a slow connection. */
.shot { margin: 40px 0 0; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--ash);
  border-radius: 8px;
}
.shot figcaption {
  margin-top: 14px;
  max-width: 68ch;
  color: var(--stone);
  font-size: 0.9375rem;
  line-height: 1.65;
}
.shot figcaption strong { color: inherit; }

/* Copy-pasteable commands in the docs. Must scroll on its own rather than forcing the
   page to scroll sideways on a phone — a long curl line is otherwise unreadable there. */
.code-block {
  margin: 20px 0 28px;
  padding: 18px 20px;
  border: 1px solid var(--ash);
  border-radius: 6px;
  overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8125rem;
  line-height: 1.7;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}
.code-block code { font-family: inherit; font-size: inherit; }

/* Docs sections carry prose + headings; give h3 room to separate steps. */
.section h3 { margin-top: 32px; margin-bottom: 8px; }

.cta-band {
  padding: 96px 0;
  border-top: 1px solid var(--ash);
}
.cta-band h2 { margin-bottom: 24px; max-width: 24ch; }

/* ---------- Subpages ---------- */

.page-hero { padding: 96px 0 40px; }

.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}

.page-hero .hero-sub { max-width: 60ch; }

.section { padding: 96px 0; border-top: 1px solid var(--ash); }

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--stone);
  text-decoration: none;
}
.back-link:hover { color: var(--bone); }
.back-link::before { content: '\2190 '; }

/* Pricing */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  align-items: stretch;
}

.price-card {
  border: 1px solid var(--ash);
  border-radius: var(--radius);
  background: var(--slate);
  padding: 32px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.price-card.price-featured { border-color: var(--signal-dim); }

.price-card h3 { font-size: 1.125rem; }

.price-amount {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 12px 0 4px;
}

.price-note { color: var(--graphite); font-size: 0.875rem; }

.price-card ul {
  list-style: none;
  margin: 24px 0 32px;
  flex: 1;
}

.price-card li {
  color: var(--stone);
  font-size: 0.9375rem;
  padding: 7px 0 7px 22px;
  position: relative;
}

.price-card li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
}

.pricing-footnote {
  margin-top: 32px;
  color: var(--graphite);
  font-size: 0.875rem;
  max-width: 62ch;
}

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

/* Legal pages */

.legal-container { max-width: 820px; }

.legal { padding: 24px 0 96px; }

.legal h2 {
  font-size: 1.2rem;
  margin: 44px 0 12px;
}

.legal p {
  color: var(--stone);
  max-width: 72ch;
  margin-bottom: 14px;
}

.legal ul {
  margin: 0 0 14px 20px;
  max-width: 72ch;
}

.legal li {
  color: var(--stone);
  margin-bottom: 8px;
}

.legal a { color: var(--bone); }
.legal a:hover { color: var(--signal-light); }
.legal strong { color: var(--bone); font-weight: 600; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--ash);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-line { color: var(--graphite); font-size: 0.875rem; margin-top: 8px; }
.footer-line a { color: var(--stone); text-decoration: none; }
.footer-line a:hover { color: var(--bone); }

.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }

.footer-nav a {
  color: var(--stone);
  text-decoration: none;
  font-size: 0.875rem;
}
.footer-nav a:hover { color: var(--bone); }

/* ---------- Scroll reveal ---------- */

/* Hidden-until-scroll applies ONLY when JS is running (html.js set inline in <head>).
   Without JS — crawlers, reviewers, no-script browsers — everything is visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 480ms ease, transform 480ms ease;
}
.js .reveal.visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .steps, .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 768px) {
  .site-nav { display: none; }
  h1 br { display: none; }
  .header-cta { margin-left: auto; }
  .hero { padding: 72px 0 32px; }
  .steps, .cap-grid { grid-template-columns: 1fr; }
  #plane, #fusion, #pipeline { height: 320px; }
  .suite-list li { flex-wrap: wrap; }
  .suite-tag { margin-left: 28px; }
}

/* ---------- GitHub mark in the header ---------- */

.header-gh {
  display: inline-flex;
  align-items: center;
  color: var(--stone);
  transition: color 140ms ease;
  flex: none;
}
.header-gh:hover { color: var(--bone); }
.header-gh:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 4px;
  border-radius: var(--radius);
}

/* ---------- Open-source section ---------- */

.repo-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 28px;
  padding: 14px 18px;
  background: var(--slate);
  border: 1px solid var(--ash);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--bone);
  transition: border-color 140ms ease;
}
.repo-card:hover { border-color: var(--graphite); }
.repo-card:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.repo-mark { flex: none; color: var(--bone); }

.repo-name {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
}

/* .suite-tag defaults to margin-left:auto, which would fling the licence pill to the far
   edge of the card. Inside the repo card it belongs beside the name. */
.repo-card .suite-tag { margin-left: 8px; }

.opensource-boundary {
  margin-top: 14px;
  color: var(--stone);
  font-size: 0.9375rem;
  border-left: 2px solid var(--ash);
  padding-left: 14px;
}
.opensource-boundary strong { color: var(--bone); font-weight: 600; }

.opensource .hero-ctas { margin-top: 28px; }

@media (max-width: 768px) {
  /* .site-nav is display:none at this width, so without moving the auto-margin the mark
     would strand itself beside the wordmark while the CTA flew right. Keep the pair
     together, right-aligned. */
  .header-inner { gap: 16px; }
  .header-gh { margin-left: auto; }
  .header-cta { margin-left: 0; }
  .repo-card { width: 100%; flex-wrap: wrap; }
}
