/* Celxstial Studios: brand tokens and base styles for every page.
   Linked before each page's own <style>, so a page can still override anything here.
   Brand guide v1 (Oct 2026): Void background, Starlight text, Signal Cyan accents,
   Glitch Magenta for the glitch layer only, Dust for secondary text.
   Unbounded 900 for the wordmark and big headlines, JetBrains Mono for everything else. */

:root {
  /* Brand palette */
  --void: #07070d;
  --starlight: #f2f2f5;
  --cyan: #00e5ff;
  --magenta: #ff2bd6;
  --dust: #b9b9c6;

  /* Surfaces, lifted just off the Void */
  --bg: var(--void);
  --panel: #0d0d16;
  --panel-2: #0a0a12;
  --panel-3: #13131e;
  --line: #22222f;
  --line-2: #33334a;

  /* Text */
  --text: var(--starlight);
  --muted: var(--dust);
  --dim: #6f6f82;

  /* Accents. --accent-2 stays cyan family: magenta is reserved for glitch effects */
  --accent: var(--cyan);
  --accent-2: #7af3ff;
  --accent-ink: var(--void);
  --blue: #8fa8ff;
  --blurple: #5865f2;
  --badge: var(--cyan);
  --good: #3ef0a1;
  --warn: #ffd166;
  --bad: #ff4f6d;

  --radius: 3px;
  --radius-lg: 4px;

  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --display: "Unbounded", "JetBrains Mono", system-ui, sans-serif;

  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
}
[hidden] { display: none !important; }

/* ---------- Brand primitives, usable on any page ---------- */

/* Section label: "01 / IDENTITY" */
.c-label {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--cyan);
}

/* Big display headline */
.c-display {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.98;
}

/* RGB split: cyan copy shifted left, magenta shifted right */
.c-rgb { text-shadow: -0.04em 0 0 rgba(0, 229, 255, 0.9), 0.04em 0 0 rgba(255, 43, 214, 0.9); }
.c-rgb-sm { text-shadow: -1.5px 0 0 rgba(0, 229, 255, 0.85), 1.5px 0 0 rgba(255, 43, 214, 0.85); }

/* Glitch text: add data-text="same words" and the class; slices jump every few seconds */
.c-glitch { position: relative; display: inline-block; }
.c-glitch::before, .c-glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.9;
}
.c-glitch::before { color: var(--cyan); transform: translateX(-0.045em); clip-path: inset(0 0 0 0); z-index: -1; }
.c-glitch::after { color: var(--magenta); transform: translateX(0.045em); clip-path: inset(0 0 0 0); z-index: -1; }
@media (prefers-reduced-motion: no-preference) {
  .c-glitch::before { animation: c-slice-a 4.2s steps(1) infinite; }
  .c-glitch::after { animation: c-slice-b 4.2s steps(1) infinite; }
}
@keyframes c-slice-a {
  0%, 86%, 100% { clip-path: inset(0 0 0 0); transform: translateX(-0.045em); }
  87% { clip-path: inset(18% 0 62% 0); transform: translateX(-0.16em); }
  89% { clip-path: inset(64% 0 14% 0); transform: translateX(0.1em); }
  91% { clip-path: inset(38% 0 44% 0); transform: translateX(-0.08em); }
}
@keyframes c-slice-b {
  0%, 86%, 100% { clip-path: inset(0 0 0 0); transform: translateX(0.045em); }
  87% { clip-path: inset(70% 0 8% 0); transform: translateX(0.18em); }
  89% { clip-path: inset(10% 0 74% 0); transform: translateX(-0.12em); }
  91% { clip-path: inset(46% 0 30% 0); transform: translateX(0.1em); }
}

/* Corner brackets on a box: add .c-corners */
.c-corners { position: relative; }
.c-corners::before, .c-corners::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
  border-color: var(--cyan);
  border-style: solid;
  opacity: 0.8;
}
.c-corners::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.c-corners::after { right: -1px; bottom: -1px; border-width: 0 1px 1px 0; }

/* The >_ mark, inline. Size it with font-size. */
.c-mark { display: inline-flex; align-items: flex-end; gap: 0.12em; font-family: var(--mono); font-weight: 800; line-height: 1; }
.c-mark .chev { color: var(--cyan); text-shadow: 0.06em 0.04em 0 var(--magenta); }
.c-mark .cur { width: 0.62em; height: 0.16em; margin-bottom: 0.08em; background: var(--starlight); box-shadow: -0.05em 0 0 var(--cyan), 0.06em 0.04em 0 var(--magenta); }
@media (prefers-reduced-motion: no-preference) {
  .c-mark .cur { animation: c-blink 1.1s steps(1) infinite; }
}
@keyframes c-blink { 50% { opacity: 0; } }

/* Big headlines are always Unbounded, uppercase. Pages size them; this sets the face. */
h1 {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

/* Sensible defaults so nothing falls back to browser blue/purple or system fonts */
a { color: var(--accent); }
.btn { color: var(--text); }
button, input, select, textarea { font-family: inherit; }
input::placeholder, textarea::placeholder { color: var(--dim); }
