/*
 * sw-theme.css — Straightway design tokens (single source of truth).
 * Extracted from the swt terminal look (terminal.html): near-black navy + cyber grid, #00f0ff cyan,
 * red accent, amber/magenta signals, Orbitron display / Rajdhani body / Courier terminal line,
 * thin glowing borders, RGB-split glitch accents. Loaded by terminal.html, oneplus-preview.html and
 * driver.html (swr index.html migrates later). Pages consume these via var(--sw-*).
 * Keyframes here are byte-identical to the swt originals, so pages that still define them inline
 * render exactly the same.
 */
:root {
  /* surfaces */
  --sw-bg: #030712;
  --sw-bg-grid: rgba(0, 240, 255, 0.035);
  --sw-bg-grid-size: 30px;
  --sw-ink: #020617;
  --sw-panel: rgba(10, 18, 38, 0.94);
  --sw-panel-solid: #0a1226;
  --sw-panel-btn: rgba(10, 18, 38, 0.9);
  --sw-panel-deep: rgba(3, 7, 18, 0.88);
  --sw-panel-inset: rgba(15, 23, 42, 0.9);
  --sw-overlay: rgba(3, 7, 18, 0.96);
  --sw-bar: #05070b;
  /* accents */
  --sw-cyan: #00f0ff;
  --sw-cyan-rgb: 0, 240, 255;
  --sw-cyan-soft: #7dd3fc;
  --sw-sky: #38bdf8;
  --sw-red: #f43f5e;
  --sw-red-rgb: 244, 63, 94;
  --sw-red-soft: #fda4af;
  --sw-magenta: #ff2a6d;
  --sw-magenta-rgb: 255, 42, 109;
  --sw-amber: #fbbf24;
  --sw-amber-rgb: 251, 191, 36;
  --sw-yellow: #fce609;
  --sw-violet: #f0abfc;
  --sw-violet-rgb: 240, 171, 252;
  /* text */
  --sw-text: #f8fafc;
  --sw-text-2: #e2e8f0;
  --sw-text-3: #cbd5e1;
  --sw-muted: #94a3b8;
  --sw-dim: #64748b;
  /* borders */
  --sw-border: rgba(0, 240, 255, 0.32);
  --sw-border-soft: rgba(0, 240, 255, 0.24);
  --sw-border-strong: rgba(0, 240, 255, 0.55);
  --sw-border-muted: rgba(148, 163, 184, 0.28);
  --sw-border-red: rgba(244, 63, 94, 0.45);
  /* type */
  --sw-font-display: 'Orbitron', monospace;
  --sw-font-body: 'Rajdhani', sans-serif;
  --sw-font-term: 'Courier New', 'Orbitron', monospace;
  --sw-font-mono: 'Share Tech Mono', 'JetBrains Mono', 'Courier New', monospace;
  --sw-track-tag: 0.14em;
  /* radii */
  --sw-r-pill: 999px;
  --sw-r-card: 16px;
  --sw-r-modal: 18px;
  --sw-r-tile: 12px;
  --sw-r-row: 11px;
  --sw-r-panel: 10px;
  --sw-r-btn: 7px;
  /* glows / shadows */
  --sw-glow-card: 0 0 28px rgba(0, 240, 255, 0.16);
  --sw-glow-card-live: 0 0 32px rgba(0, 240, 255, 0.30);
  --sw-glow-modal: 0 0 42px rgba(0, 240, 255, 0.32);
  --sw-glow-cyan: 0 0 14px rgba(0, 240, 255, 0.35);
  --sw-glow-red: 0 0 16px rgba(244, 63, 94, 0.38);
  --sw-glow-inset: inset 0 0 14px rgba(0, 240, 255, 0.08);
  --sw-text-glow: 0 0 10px rgba(0, 240, 255, 0.55);
  --sw-text-glow-red: 0 0 8px rgba(244, 63, 94, 0.6);
  --sw-shield-glow: drop-shadow(0 0 26px rgba(0, 240, 255, 0.48));
  --sw-rgb-split: -2px 0 #ff2a6d, 2px 0 #00f0ff;
}

/* Glitch / motion keyframes (identical to swt terminal.html) */
@keyframes gmSkewBurst {
  0% { transform: translate(0, 0); }
  35% { transform: translate(-1.5px, 0.5px) skewX(3deg); }
  70% { transform: translate(1.5px, -0.5px) skewX(-3deg); }
  100% { transform: translate(0, 0); }
}
@keyframes termDotBlink {
  0% { opacity: 0.35; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1.15); }
}
@keyframes swCpGlitch {
  0% { transform: translate(0, 0); filter: none; }
  20% { transform: translate(-3px, 1px); filter: hue-rotate(90deg) saturate(2); }
  40% { transform: translate(3px, -1px); clip-path: polygon(0 12%, calc(100% - 14px) 12%, 100% 30%, 100% 62%, 14px 62%, 0 40%); }
  60% { transform: translate(-1px, 0); filter: brightness(1.8); }
  80% { transform: translate(2px, 1px); filter: hue-rotate(-60deg); }
  100% { transform: translate(0, 0); filter: none; }
}

/* Shared utilities */
.sw-red-initial::first-letter { color: var(--sw-red); text-shadow: var(--sw-text-glow-red); }
@media (prefers-reduced-motion: reduce) {
  .sw-glitch-press:active { animation: none !important; }
}
