:root {
  color-scheme: dark;
  background: #060709;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: #060709;
  color: #ced6d4;
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Interactive C/WASM stage stays hidden until WebAssembly boots cleanly, so
 * no-JS, no-WASM, crawler, and ?static=1 visitors get the static site directly. */
.stage {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

html.wasm-ready,
html.wasm-ready body {
  height: 100%;
  overflow: hidden;
}

html.wasm-ready .stage {
  display: block;
}

html.wasm-ready #teknosis-static {
  display: none;
}

#teknosis-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #060709;
  outline: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: none;
}

/* ---- Static fallback site (generated from content/*.md) ----------------- */

.static-site {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.static-header {
  padding-bottom: 1.75rem;
  border-bottom: 1px solid #182520;
}

.static-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.static-crest {
  width: 56px;
  height: 56px;
  opacity: 0.62;
  flex-shrink: 0;
}

.static-header h1 {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #e4ece9;
}

.static-tagline {
  margin: 0.15rem 0 0;
  color: #8f9e9a;
  font-size: 0.95rem;
}

.static-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 1.25rem;
  font-size: 0.92rem;
}

.static-nav a {
  color: #5ee0a2;
  text-decoration: none;
}

.static-nav a:hover,
.static-nav a:focus-visible {
  text-decoration: underline;
}

.static-sections {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  padding: 2.25rem 0;
}

.static-section {
  padding-bottom: 2rem;
  border-bottom: 1px solid #131d19;
}

.static-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.static-section h2 {
  margin: 0 0 0.85rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #5ee0a2;
}

.static-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.static-card {
  padding: 1.15rem 1.25rem;
  border: 1px solid #192822;
  background: #090d0c;
}

.static-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #e4ece9;
}

.static-feed {
  padding: 1rem 1.25rem;
  border-left: 2px solid #2a6a4e;
  background: #080c0b;
}

.static-section h3 {
  margin: 1.2rem 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #86deb2;
}

.static-card h3 {
  margin: 0 0 0.5rem;
  color: #e4ece9;
}

.static-section p,
.static-contact p {
  margin: 0.5rem 0;
}

.static-section em,
.static-contact em {
  color: #9baaa6;
}

.static-section strong,
.static-contact strong {
  color: #e6eeeb;
}

.static-section code,
.static-contact code {
  padding: 0.1em 0.38em;
  border-radius: 3px;
  background: #0f1e18;
  color: #9aecc2;
  font: 0.9em/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.static-section ul,
.static-contact ul {
  margin: 0.55rem 0 0;
  padding-left: 1.25rem;
}

.static-section li,
.static-contact li {
  margin: 0.3rem 0;
}

.static-section a,
.static-contact a {
  color: #44e498;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.static-section a:hover,
.static-section a:focus-visible,
.static-contact a:hover,
.static-contact a:focus-visible {
  color: #8ef5c4;
}

.static-footer {
  margin-top: 0.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid #182520;
}

.static-contact h2 {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #5ee0a2;
}

.static-meta {
  margin-top: 1.75rem;
  padding-top: 1.15rem;
  border-top: 1px solid #131d19;
  color: #7c8a86;
  font-size: 0.8rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.static-meta p {
  margin: 0.3rem 0;
}

.static-note {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #65726f;
}
