/* Shared primitives for every Torusframe site.
 *
 * Only things all three sites need. Anything specific to one product belongs in
 * that site's own stylesheet.
 *
 * PLACEHOLDER: structurally real, visually unfinished.
 */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* The default scrollbar is the one piece of operating system that shows through
   an otherwise self-contained page. Thin, dark, and no track, so it reads as an
   edge marker rather than a control. The transparent border keeps the thumb off
   the very edge without needing a track colour. */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-track { background: transparent; }

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: var(--border-strong);
  background-clip: content-box;
  transition: background-color var(--transition);
}

::-webkit-scrollbar-thumb:hover { background: var(--accent); background-clip: content-box; }
::-webkit-scrollbar-corner { background: transparent; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  font-weight: 600;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-lg); }

p { margin: 0; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { text-decoration: underline; }

/* Visible focus everywhere. Keyboard users are not an edge case, least of all
   for a launcher and a CLI. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

img { max-width: 100%; height: auto; display: block; }

code, kbd, pre {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

code {
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  color: var(--text);
}

pre {
  margin: 0;
  padding: var(--space-4);
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-sunken);
  line-height: 1.5;
}

pre code { padding: 0; border: 0; background: none; }

kbd {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  color: var(--text);
  font-size: var(--text-xs);
  white-space: nowrap;
}

/* Layout ------------------------------------------------------------------ */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* Reach for this on the paragraph, not the container. Narrowing the container
   moves the heading too, and a section whose heading starts somewhere else
   reads as centred even when its text is flush left. */
.measure { max-width: 62ch; }

/* Only for a page, or a section, that is meant to be a single column of prose
   throughout. Mixing it into a page of full-width sections is what it is not
   for. */
.container-narrow { max-width: var(--container-narrow); }

.section { padding: var(--space-9) 0; }
.section-tight { padding: var(--space-7) 0; }

.stack > * + * { margin-top: var(--space-4); }
.stack-lg > * + * { margin-top: var(--space-6); }

.grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Site chrome ------------------------------------------------------------- */

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

.site-header .container {
  display: flex;
  gap: var(--space-5);
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.brand {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand:hover { text-decoration: none; }
.brand svg { flex: none; }

.nav {
  display: flex;
  gap: var(--space-5);
  align-items: center;
  font-size: var(--text-sm);
}

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

.site-footer {
  margin-top: var(--space-9);
  padding: var(--space-6) 0;
  border-top: 1px solid var(--border);
  color: var(--text-subtle);
  font-size: var(--text-sm);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
}

.site-footer a { color: var(--text-muted); }

/* Components -------------------------------------------------------------- */

.button {
  display: inline-flex;
  gap: var(--space-2);
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-text);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: filter var(--transition), border-color var(--transition), background var(--transition);
}

.button:hover { filter: brightness(1.1); text-decoration: none; }

.button-secondary {
  border-color: var(--border-strong);
  background: transparent;
  color: var(--text);
}

.button-secondary:hover { border-color: var(--accent); background: var(--accent-quiet); filter: none; }

.badge {
  display: inline-flex;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
}

.badge-accent { border-color: var(--accent); color: var(--accent); background: var(--accent-quiet); }

.card {
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
}

.card h3 { margin-bottom: var(--space-2); }
.card p { color: var(--text-muted); font-size: var(--text-sm); }

/* A standing notice, not a dismissible alert. Used wherever a page states its
   own maturity, which both product sites currently must. */
.notice {
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--warning);
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.notice strong { color: var(--text); }

.lead {
  color: var(--text-muted);
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
}

.eyebrow {
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table th,
.table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.table th { color: var(--text); font-weight: 600; }
.table td { color: var(--text-muted); }

/* Marks a block that is not finished, so nobody mistakes scaffolding for a
   decision. Remove the class, not the styles, when a section is real. */
.placeholder {
  position: relative;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: var(--space-5);
  color: var(--text-subtle);
}

.placeholder::before {
  content: "Placeholder";
  position: absolute;
  top: calc(var(--space-2) * -1);
  left: var(--space-4);
  padding: 0 var(--space-2);
  background: var(--bg);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  h1 { font-size: var(--text-3xl); }
  .section { padding: var(--space-7) 0; }
  .nav { gap: var(--space-4); }
}
