/* Tracr website — retro terminal theme matching the app's TerminalTheme */

:root {
  color-scheme: dark;
  --bg: #000;
  --primary: #00ff00;
  --secondary: #00cc00;
  --muted: #00a000;
  --dim: #006600;
  --line: rgba(0, 255, 0, 0.3);
  --panel: rgba(0, 255, 0, 0.05);
  --glow: rgba(0, 255, 0, 0.55);
  --warning: #ffaa00;
  --danger: #ff3333;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

:root[data-theme="amber"] {
  --primary: #ffaa00;
  --secondary: #cc8800;
  --muted: #b07500;
  --dim: #664400;
  --line: rgba(255, 170, 0, 0.3);
  --panel: rgba(255, 170, 0, 0.05);
  --glow: rgba(255, 170, 0, 0.55);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--secondary);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
}

/* CRT scanlines + vignette, purely decorative */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.28) 2px 3px),
    radial-gradient(ellipse at center, transparent 70%, rgba(0, 0, 0, 0.3) 100%);
  z-index: 10;
}

::selection {
  background: var(--primary);
  color: var(--bg);
}

a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
  background: var(--primary);
  color: var(--bg);
  text-decoration: none;
}

:focus-visible {
  outline: 1px dashed var(--primary);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

.glow {
  color: var(--primary);
  text-shadow: 0 0 2px var(--glow), 0 0 10px var(--glow);
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand:hover,
.brand:focus-visible {
  background: none;
  color: var(--primary);
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-left: auto;
  font-size: 14px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 2px 4px;
}

.site-nav a[aria-current="page"] {
  color: var(--primary);
  background: var(--panel);
  outline: 1px solid var(--line);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--primary);
  color: var(--bg);
}

.theme-toggle {
  font: inherit;
  font-size: 14px;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 2px 4px;
  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--primary);
  color: var(--bg);
}

/* ---------- Main ---------- */

main {
  flex: 1;
  padding: 40px 0 56px;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.04em;
}

h1 {
  font-size: 28px;
  margin: 0 0 8px;
}

h2 {
  font-size: 18px;
  margin: 40px 0 12px;
  color: var(--primary);
}

h2::before {
  content: "## ";
  color: var(--dim);
}

p {
  margin: 0 0 14px;
}

.meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 16px 18px;
  margin: 20px 0;
}

.prompt-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}

.prompt-list li {
  position: relative;
  padding-left: 1.6em;
  margin-bottom: 8px;
}

.prompt-list li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--primary);
}

strong {
  color: var(--primary);
  font-weight: 700;
}

/* ---------- Home ---------- */

.boot {
  margin: 0 0 28px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.boot span {
  display: block;
  min-height: 1.5em;
  opacity: 0;
  animation: boot-line 0.01s linear forwards;
}

.boot .ok {
  color: var(--secondary);
}

.boot .granted {
  color: var(--primary);
  font-weight: 700;
  text-shadow: 0 0 8px var(--glow);
}

.boot span:nth-child(1) { animation-delay: 0.1s; }
.boot span:nth-child(2) { animation-delay: 0.25s; }
.boot span:nth-child(3) { animation-delay: 0.4s; }
.boot span:nth-child(4) { animation-delay: 0.55s; }
.boot span:nth-child(5) { animation-delay: 0.7s; }
.boot span:nth-child(6) { animation-delay: 0.85s; }
.boot span:nth-child(7) { animation-delay: 1s; }
.boot span:nth-child(8) { animation-delay: 1.15s; }

@keyframes boot-line {
  to { opacity: 1; }
}

.hero-title {
  font-size: clamp(56px, 16vw, 104px);
  line-height: 1;
  margin: 0 0 12px;
  letter-spacing: 0.06em;
}

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 0.8em;
  margin-left: 0.08em;
  background: var(--primary);
  box-shadow: 0 0 12px var(--glow);
  vertical-align: baseline;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.tagline {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 6px;
}

.status {
  display: inline-block;
  margin: 18px 0 8px;
  padding: 10px 16px;
  border: 1px solid var(--primary);
  border-radius: 2px;
  color: var(--primary);
  letter-spacing: 0.06em;
  font-size: 14px;
}

.status .label {
  color: var(--warning);
}

.trace-demo {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.trace-demo .bar {
  color: var(--primary);
}

.trace-demo.is-hot .bar,
.trace-demo.is-hot .pct {
  color: var(--warning);
}

.trace-demo.is-burned .bar,
.trace-demo.is-burned .pct,
.trace-demo.is-burned .eta {
  color: var(--danger);
}

.trace-demo .eta {
  color: var(--muted);
}

.steps {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin: 16px 0;
}

.steps .panel {
  margin: 0;
}

.steps h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--primary);
}

.steps p {
  margin: 0;
  font-size: 15px;
}

/* ---------- Support FAQ ---------- */

details {
  border: 1px solid var(--line);
  border-radius: 2px;
  margin-bottom: 10px;
  background: var(--panel);
}

summary {
  cursor: pointer;
  padding: 12px 16px;
  color: var(--primary);
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "[+] ";
  color: var(--muted);
}

details[open] summary::before {
  content: "[-] ";
}

summary:hover,
summary:focus-visible {
  background: var(--primary);
  color: var(--bg);
}

summary:hover::before,
summary:focus-visible::before {
  color: var(--bg);
}

details > div {
  padding: 0 16px 4px;
}

/* ---------- 404 ---------- */

.error-code {
  color: var(--danger);
  text-shadow: 0 0 10px rgba(255, 51, 51, 0.5);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.site-footer .wrap {
  padding-top: 20px;
  padding-bottom: 28px;
}

.site-footer p {
  margin: 0 0 6px;
}

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

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--bg);
}

@media (prefers-reduced-motion: reduce) {
  .boot span {
    animation: none;
    opacity: 1;
  }

  .cursor {
    animation: none;
  }
}
