/* 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); }
/* content pages (articles, prose): hero-scale top padding is too airy under a plain title */
main.section:has(> article.prose) { padding-block-start: clamp(28px, 4vw, 48px); }

/* ------------------------------------------------------------- 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 { height: 30px; width: auto; }

.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; } /* legacy no-op (element never existed) */
}

/* ------------------------------------------------------------ mobile nav --- */
/* Below 720px the inline nav collapses into a hamburger panel under the
   header. Toggle button drawn in pure CSS (gradient bars); state lives on
   <body class="nav-open">, managed by assets/js/nav.js. */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  cursor: pointer;
  position: relative;
  padding: 0;
}
.nav-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 15px;
  background: repeating-linear-gradient(to bottom,
    var(--text) 0 2px, transparent 2px 6.5px);
}
.nav-toggle:focus-visible { outline: 2px solid var(--border-strong); outline-offset: 2px; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 4px 0 12px;
  }
  body.nav-open .site-nav { display: flex; }
  .site-nav a {
    padding: 14px 22px;
    font-size: 16px;
    border-top: 1px solid var(--border-hairline);
    border-radius: 0;
  }
  .site-nav a:first-child { border-top: 0; }
  .nav-cta {
    margin: 10px 22px 0;
    text-align: center;
    border-top: 1px solid var(--border-strong);
    padding: 12px 16px;
  }
  #lang-switch { display: block; padding: 10px 22px 2px; }
}

/* ---------------------------------------------------------------- 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 h1.avail {
  font-size: clamp(24px, 4.5vw, 40px);
}

.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 {
  appearance:none; -webkit-appearance:none; -moz-appearance:none;
  background:transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='rgba(255,255,255,0.75)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 8px center / 10px 6px;
  color:inherit; font:inherit; font-size:0.9em;
  border:1px solid rgba(255,255,255,0.22); border-radius:8px; padding:4px 26px 4px 10px; cursor:pointer;
}
.lang-switch:focus-visible { outline:2px solid currentColor; outline-offset:2px; }

/* blog: index cards, article hero */
.article-grid { display:grid; gap:22px; margin-top:26px; }
.article-card { display:block; border:1px solid rgba(255,255,255,0.14); border-radius:14px; overflow:hidden; text-decoration:none; color:inherit; transition:border-color .15s ease; }
.article-card:hover { border-color:rgba(255,255,255,0.38); text-decoration:none; } /* whole card is one <a>: kill the global a:hover underline (owner ruling) */
.article-card img { display:block; width:100%; height:auto; aspect-ratio:16/9; object-fit:cover; }
.article-card .ac-body { padding:16px 18px 18px; }
.article-card h2 { margin:0 0 6px; font-size:1.25em; }
.ac-meta { margin:0 0 6px; opacity:0.55; font-size:0.85em; }
.ac-desc { margin:0; opacity:0.8; }
.article-hero { display:block; width:100%; height:auto; border-radius:14px; margin:0 0 22px; }
@media (min-width:720px) { .article-grid { grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); } }
