/* Starmark informational site — shared stylesheet.
   Design tokens mirror WebApp/src/styles/tokens.css so the marketing site and
   the app stay visually in lockstep. Change a token here only when the app's
   tokens change too. */

:root {
  color-scheme: dark;
  /* Canvas & surfaces — true black, depth via borders, not tinted panels. */
  --bg:            #000000;
  --surface-2:     #171b27;
  --surface-3:     #1f2433;
  --border:        #2a3042;
  --border-strong: #3a4258;
  --border-hairline: color-mix(in srgb, var(--border) 55%, transparent);

  --text:    #e9ecf3;
  --text-2:  #c3c9d6;
  --muted:   #767e93;
  --muted-2: #515872;

  /* Solid accent — used as fill, never as a gradient or glow. */
  --accent:      #7c5cff;
  --accent-2:    #6248d6;
  --accent-soft: #232145;

  --green:       #4ade80;
  --gold:        #f5c451;

  /* Launch blue — the "create something ownable" accent. */
  --launch-blue:      #58d2f9;
  --launch-blue-soft: rgba(88, 210, 249, 0.12);

  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-full: 999px;
  --radius-lg:   12px;
  --radius-xl:   16px;

  --mono:  ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --transition: 140ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Page rhythm */
  --page-max: 1080px;
  --prose-max: 720px;
  --section-pad: clamp(56px, 9vw, 112px);
  --header-h: 64px;
}

/* ---------------------------------------------------------------- base --- */

*,
*::before,
*::after { 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;
  text-rendering: optimizeLegibility;
}

img,
svg { display: block; max-width: 100%; }

a { color: var(--launch-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }

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

.page {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 32px);
}

.section { padding-block: var(--section-pad); }

/* ------------------------------------------------------------- buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition);
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }

.wp-download {
  margin: 0 0 2rem;
  text-align: left;
}

/* Whitepaper masthead — left-justified title block. */
.wp-masthead { text-align: left; }
.wp-masthead h1 {
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 1rem 0 0;
}
.wp-author { margin: 1.1rem 0 0; font-weight: 600; }
.wp-affil { margin: 0.15rem 0 0; font-style: italic; color: var(--muted); }
.wp-date { margin: 0.6rem 0 0; font-size: 13px; color: var(--muted-2); }

.btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--muted); background: var(--surface-2); }

/* -------------------------------------------------------------- header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-hairline);
}

.site-header .page {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand-link:hover { text-decoration: none; }
.brand-link img { width: 30px; height: 30px; border-radius: var(--radius-full); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}
.site-nav a { color: var(--text-2); font-size: 14px; font-weight: 500; }
.site-nav a:hover { color: var(--text); text-decoration: none; }

.nav-cta {
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
}
.nav-cta:hover { border-color: var(--muted); }

@media (max-width: 640px) {
  .site-nav .nav-links { display: none; }
}

/* ---------------------------------------------------------------- hero --- */

/* Full-viewport, centered statement. The black canvas is the design; the
   only ornament is type and one hairline above the footer. */

.hero {
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: clamp(64px, 12vh, 140px);
}

.hero-logo {
  width: clamp(84px, 11vw, 112px);
  height: auto;
  margin-bottom: clamp(24px, 4vh, 36px);
  filter: drop-shadow(0 16px 40px rgba(102, 10, 234, 0.4));
}

.hero h1 {
  margin: 0;
  font-size: clamp(48px, 10vw, 88px);
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.hero-tagline {
  margin: clamp(10px, 2vh, 16px) 0 clamp(18px, 3vh, 26px);
  font-size: clamp(21px, 3.4vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.hero-tagline em { font-style: normal; color: var(--launch-blue); }

.hero-lede {
  max-width: 54ch;
  margin: 0 0 clamp(30px, 5vh, 42px);
  color: var(--muted);
  font-size: clamp(16px, 2vw, 18px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* -------------------------------------------------------------- footer --- */

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

.site-footer .page {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.site-footer nav { display: flex; gap: 20px; margin-left: auto; }
.site-footer nav a { color: var(--muted); font-size: 14px; }
.site-footer nav a:hover { color: var(--text-2); text-decoration: none; }

.footer-note {
  order: -1;
  margin: 0;
  color: var(--muted-2);
  font-size: 13px;
}
.footer-note a {
  color: inherit;
  text-decoration: underline;
}

/* ------------------------------------------------------- prose (docs) ---- */

.prose { max-width: var(--prose-max); }
.prose h1 { font-size: clamp(30px, 5vw, 44px); margin: 0 0 12px; }
.prose h2 { margin-top: 2.2em; font-size: 22px; }
.prose p  { color: var(--text-2); }
.prose .lede { color: var(--muted); font-size: 18px; }

.prose hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}
.prose th,
.prose td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}
.prose th { background: var(--surface-2); font-weight: 600; }
.prose code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}
.prose pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  overflow-x: auto;
  line-height: 1.65;
}
.prose pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: 0.85em;
  line-height: inherit;
  white-space: pre;
}

.doc-status {
  display: inline-block;
  margin-bottom: 18px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(251, 191, 36, 0.12);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc {
  margin: 32px 0 0;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  list-style: none;
}
.toc li { margin: 6px 0; }
.toc a { color: var(--text-2); font-size: 15px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* language switcher (i18n.js) */
#lang-switch { display:inline-flex; align-items:center; margin-right:12px; }
.lang-switch {
  background:transparent; color:inherit; font:inherit; font-size:0.9em;
  border:1px solid rgba(255,255,255,0.22); border-radius:8px; padding:3px 8px; cursor:pointer;
}
.lang-switch:focus-visible { outline:2px solid currentColor; outline-offset:2px; }
