/* Dunbar — minimal ship theme.
   Constraints (docs 9/10): pitch black-first; wordmark in spaced capitals
   (capitals are exclusive to the wordmark); everything else sentence case.
   Visual tokens are placeholders until the design system exists. */

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

:root {
  --black: #000;
  --text: #f2f2f2;
  --muted: #a3a3a3;
  --faint: #6b6b6b;
  --line: #262626;
}

html { background: var(--black); }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--black);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); }

/* --- top bar: thin, translucent, no solid fill --- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.6rem;
}

.wordmark {
  font-size: 0.95rem;
  letter-spacing: 0.42em;
  text-decoration: none;
  font-weight: 600;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.topnav a:hover { color: var(--text); }

/* --- homepage hero: nebula background (docs 9/10, marketing nebula —
       atmosphere only, deliberately NOT a data view, doc 10 §1) --- */
body.home {
  background-image: url("nebula.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.1rem;
  padding: 2rem 1.5rem 4rem;
  /* soft black circle behind hero content so it stays readable
     over the nebula */
  background-image: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.28) 45%,
    transparent 70%
  );
  background-repeat: no-repeat;
  background-position: center;
  background-size: 64rem 36rem;
  /* fade the whole hero block (glow + text + button) in after 1s,
     so the nebula lands first */
  animation: hero-fade-in 1.6s ease-out 1s both;
}

@keyframes hero-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero { animation: none; }
}

.tagline {
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.sub { color: var(--text); max-width: 34rem; }

.cta { margin-top: 1.2rem; }

.button {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
}
.button:hover { background: rgba(255, 255, 255, 0.09); }

/* --- long-form reading pages (whitepaper; later /privacy, /terms) --- */
.layout {
  flex: 1;
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 1rem 1.6rem 4rem;
  display: block;
}

.toc { display: none; }

.content { max-width: 42rem; }

.content h1 {
  font-size: 1.9rem;
  margin: 1.5rem 0 0.5rem;
  line-height: 1.25;
}

.content h2 {
  font-size: 1.3rem;
  margin: 2.4rem 0 0.8rem;
  line-height: 1.3;
}

.content h3 {
  font-size: 1.05rem;
  margin: 1.8rem 0 0.6rem;
}

.content p, .content li { color: #d9d9d9; }
.content p { margin: 0.9rem 0; }
.content ul, .content ol { margin: 0.9rem 0 0.9rem 1.4rem; }
.content li { margin: 0.35rem 0; }
.content strong { color: var(--text); }
.content hr { border: none; border-top: 1px solid var(--line); margin: 2.2rem 0; }
.content a { text-underline-offset: 3px; }
.content em { color: var(--muted); }

/* sticky mini-TOC on wide screens only (doc 10 §3) */
@media (min-width: 1100px) {
  .layout {
    display: grid;
    grid-template-columns: 15rem 1fr;
    gap: 3rem;
  }
  .toc {
    display: block;
    position: sticky;
    top: 4.5rem;
    align-self: start;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    font-size: 0.85rem;
  }
  .toc nav { display: flex; flex-direction: column; gap: 0.45rem; }
  .toc a {
    color: var(--faint);
    text-decoration: none;
    line-height: 1.35;
  }
  .toc a:hover { color: var(--text); }
}

/* --- footer: minimal single row, chrome not sitemap (doc 10 §3) --- */
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 1.4rem 1.6rem;
  color: var(--faint);
  font-size: 0.85rem;
}

.monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.footer nav a { color: var(--muted); text-decoration: none; }
.footer nav a:hover { color: var(--text); }
