/* v2.ca - mission control. handcrafted, no build step. */

:root {
  --bg: #0a0a10;
  --panel: #12121c;
  --panel2: #161624;
  --border: #232336;
  --fg: #e8e8f0;
  --muted: #9a9ab0;
  --dim: #7a7a94;
  --live: #34d399;
  --armed: #f87171;
  --lab: #a78bfa;
  --writing: #67e8f9;
  --parked: #8a8aa0;
  --chill: #93c5fd;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, "Cascadia Code", Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
}

body.booting { overflow: hidden; }

a { color: var(--writing); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--live);
  outline-offset: 2px;
}

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 1.25rem; }

.mono { font-family: var(--mono); }

/* header */
header.site {
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 0;
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.wordmark {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--fg);
  letter-spacing: 0.02em;
}
.wordmark:hover { text-decoration: none; color: var(--live); }
nav.main { display: flex; gap: 1.1rem; flex-wrap: wrap; }
nav.main a {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.35rem 0;
}
nav.main a:hover { color: var(--fg); text-decoration: none; }

/* hero */
.hero { padding: 4rem 0 3rem; }
.kicker {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--dim);
  margin-bottom: 0.8rem;
}
.hero h1 { font-size: 2.6rem; line-height: 1.15; letter-spacing: -0.01em; }
.tagline {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 640px;
  margin-top: 1rem;
}
.versionline {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--dim);
  margin-top: 1rem;
}
.telemetry {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--dim);
  margin-top: 2rem;
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.dot {
  width: 9px; height: 9px; border-radius: 50%;
  display: inline-block; background: var(--live);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* sections */
section { padding: 2.6rem 0; }
section h2 {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
section h2::before { content: "## "; color: var(--dim); font-weight: 400; }
.section-sub { color: var(--muted); margin-bottom: 1.6rem; max-width: 680px; }

/* status board */
.legend {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--dim);
  margin-bottom: 1.4rem;
  line-height: 1.9;
}
.board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.system {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  display: flex; flex-direction: column; gap: 0.55rem;
}
.system header {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.8rem;
  border: 0; padding: 0;
}
.system h3 { font-size: 1.05rem; font-weight: 600; }
.system p { font-size: 0.95rem; color: var(--muted); }
.system .meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--dim);
  margin-top: auto;
}
.badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}
.badge.live    { color: var(--live);    border-color: rgba(52, 211, 153, 0.4);  background: rgba(52, 211, 153, 0.08); }
.badge.armed   { color: var(--armed);   border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.08); }
.badge.lab     { color: var(--lab);     border-color: rgba(167, 139, 250, 0.4); background: rgba(167, 139, 250, 0.08); }
.badge.writing { color: var(--writing); border-color: rgba(103, 232, 249, 0.4); background: rgba(103, 232, 249, 0.08); }
.badge.parked  { color: var(--parked);  border-color: rgba(138, 138, 160, 0.4); background: rgba(138, 138, 160, 0.08); }
.badge.chill   { color: var(--chill);   border-color: rgba(147, 197, 253, 0.4); background: rgba(147, 197, 253, 0.08); }
.note-link { font-family: var(--mono); font-size: 0.82rem; }

/* story + principles */
.prose { max-width: 680px; }
.prose p { margin-bottom: 1.1rem; }
.prose .seed { color: var(--muted); }

blockquote.ziglar {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  line-height: 1.45;
  font-style: italic;
  max-width: 720px;
  padding-left: 1.2rem;
  border-left: 3px solid var(--live);
  margin: 0.5rem 0 0.6rem;
}
blockquote.ziglar + .cite {
  font-family: var(--mono);
  color: var(--dim);
  font-size: 0.85rem;
  margin-bottom: 1.4rem;
}

.ldt { list-style: none; margin: 1.4rem 0; max-width: 680px; }
.ldt li { margin-bottom: 0.7rem; padding-left: 0; }
.ldt .k {
  font-family: var(--mono);
  color: var(--live);
  margin-right: 0.4rem;
}
.books { list-style: none; margin-top: 0.8rem; max-width: 680px; }
.books li {
  font-size: 0.95rem;
  color: var(--muted);
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}
.books li:last-child { border-bottom: 0; }
.books .author { color: var(--dim); font-family: var(--mono); font-size: 0.82rem; }
.shelf-note { color: var(--dim); font-size: 0.9rem; margin-top: 0.9rem; }

/* field notes */
.notes-list { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.note-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  display: block;
  color: var(--fg);
}
.note-card:hover { text-decoration: none; border-color: var(--live); }
.note-card h3 { font-size: 1.02rem; font-weight: 600; }
.note-card p { font-size: 0.92rem; color: var(--muted); margin-top: 0.25rem; }
.note-card .meta { font-family: var(--mono); font-size: 0.78rem; color: var(--dim); margin-top: 0.45rem; }

/* note pages */
main.note { padding: 3rem 0 2rem; }
main.note article { max-width: 680px; }
.note-meta { font-family: var(--mono); font-size: 0.82rem; color: var(--dim); margin-bottom: 0.8rem; }
main.note h1 { font-size: 2rem; line-height: 1.2; margin-bottom: 1.4rem; }
main.note article p { margin-bottom: 1.15rem; }
main.note article p.rule-title { font-weight: 600; color: var(--fg); margin-bottom: 0.2rem; }
.note-back { margin-top: 2.4rem; font-family: var(--mono); font-size: 0.9rem; }

/* footer */
footer.site {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding: 2.2rem 0 3rem;
}
.contact-line { color: var(--muted); margin-bottom: 1.4rem; max-width: 680px; }
.jokebox {
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--muted);
  display: flex; align-items: baseline; gap: 0.8rem; flex-wrap: wrap;
  margin-bottom: 1.4rem;
}
.jokebox .label { color: var(--dim); }
button.plain {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--writing);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
}
button.plain:hover { border-color: var(--writing); }
.colophon {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--dim);
  line-height: 2;
}

/* boot overlay */
.boot {
  position: fixed; inset: 0; z-index: 999;
  background: var(--bg);
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 2rem;
  transition: opacity 0.25s ease;
}
.boot.out { opacity: 0; }
.boot-lines {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--live);
  line-height: 2;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}
.boot-skip {
  position: absolute; right: 1.5rem; bottom: 1.5rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}
.boot-skip:hover { color: var(--fg); border-color: var(--muted); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 2rem; transform: translate(-50%, 8px);
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--fg);
  padding: 0.6rem 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 998;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* konami CRT mode */
body.crt {
  --bg: #051408;
  --panel: #082010;
  --panel2: #082010;
  --border: #14502a;
  --fg: #33ff66;
  --muted: #2bd457;
  --dim: #1f9e41;
  --live: #33ff66;
  --armed: #33ff66;
  --lab: #33ff66;
  --writing: #7dffa3;
  --parked: #1f9e41;
  --chill: #7dffa3;
}
body.crt .badge { background: rgba(51, 255, 102, 0.07); }
body.crt::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0px, rgba(0, 0, 0, 0.16) 1px, transparent 1px, transparent 3px);
  z-index: 997;
}

/* responsive */
@media (max-width: 820px) {
  .board { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.1rem; }
  .hero { padding: 3rem 0 2.2rem; }
  blockquote.ziglar { font-size: 1.25rem; }
}

/* reduced motion: no animation anywhere */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
