/* ============================================================================
   Halcyon Debate — shared site styles
   Static site, no build step. Components under components/*.html carry their
   own layout inline; this file holds the shared design system: fonts, reset,
   buttons, inputs, cards, keyframes, and page visibility.
   Accent: #6EB5C0. UI text uses en dashes, never em dashes.
   ============================================================================ */

:root {
  --accent: #6EB5C0;
  --accent-ink: #06181d;   /* text color on an accent-filled control */
  --accent-deep: #3f7a83;  /* darker accent for mono labels on light panels */
  --ink: #141414;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #ffffff; }
body {
  color: var(--ink);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--accent-ink); }

/* ── Page routing: exactly one .site-page is visible at a time ─────────────── */
.site-page { display: none; }
.site-page.active { display: block; }

/* ── Type helpers ──────────────────────────────────────────────────────────── */
.mono { font-family: 'JetBrains Mono', monospace; }
.kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 3px;
  color: var(--accent); margin-bottom: 20px;
}
.field-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; letter-spacing: 1.5px; color: #9a9a9a;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn-accent {
  background: var(--accent); color: var(--accent-ink);
  border: none; cursor: pointer; font-family: inherit;
  font-weight: 700; font-size: 15px; padding: 14px 26px; border-radius: 7px;
}
.btn-accent:hover { filter: brightness(1.06); }
.btn-accent:disabled { opacity: 0.55; cursor: default; filter: none; }
.btn-accent.small { font-size: 13.5px; padding: 9px 18px; border-radius: 6px; }

.btn-ghost {
  background: #ffffff; color: #222;
  border: 1px solid #d4d4d4; cursor: pointer; font-family: inherit;
  font-weight: 600; font-size: 15px; padding: 14px 26px; border-radius: 7px;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost.small { font-size: 13.5px; padding: 9px 16px; border-radius: 8px; }
.btn-ghost.danger:hover { border-color: #c97a7a; color: #b04a4a; }

.link-quiet {
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 14px; color: #555; text-align: left; padding: 0;
}
.link-quiet:hover { color: var(--accent); }
.link-accent {
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 13.5px; font-weight: 700; color: var(--accent); padding: 0;
}
.link-back {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px; letter-spacing: 1.5px; color: #9a9a9a; padding: 0;
}
.link-back:hover { color: var(--accent); }

/* ── Nav links (site.js sets .active from the route) ───────────────────────── */
.nav-link {
  background: none; border: none; cursor: pointer;
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  font-size: 14px; font-weight: 600; padding: 20px 0; line-height: 1;
  border-bottom: 2px solid transparent; color: #777777;
}
.nav-link.active { color: #141414; border-bottom-color: var(--accent); }

/* ── Inputs ────────────────────────────────────────────────────────────────── */
.field {
  font-family: inherit; font-size: 15px; color: var(--ink);
  padding: 12px 14px; border: 1px solid #dcdcdc; border-radius: 9px;
  background: #fafafa; outline: none; width: 100%;
}
.field:focus { border-color: var(--accent); background: #ffffff; }
textarea.field { resize: vertical; min-height: 220px; line-height: 1.6; }

/* Checkboxes: 14x14, no native glyph, accent fill when checked */
input[type="checkbox"].hal-check {
  appearance: none; -webkit-appearance: none;
  width: 14px; height: 14px; margin: 0; border-radius: 3px;
  border: 1px solid #c9c9c9; background: #fff; cursor: pointer; flex-shrink: 0;
}
input[type="checkbox"].hal-check:checked { background: var(--accent); border-color: var(--accent); }

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card { border: 1px solid #e6e6e6; border-radius: 12px; background: #ffffff; }
.card-hover:hover { border-color: var(--accent); }

/* ── Status / error lines under forms ──────────────────────────────────────── */
.form-note { font-size: 13.5px; line-height: 1.55; margin: 0; }
.form-note.err { color: #b04a4a; }
.form-note.ok { color: var(--accent-deep); }

/* ── Background animations (hero grid, scanline, blink, floating token) ────── */
@keyframes hcBlink { 0%, 49% { opacity: 1 } 50%, 100% { opacity: 0 } }
@keyframes hcGrid { from { background-position: 0 0 } to { background-position: 0 -26px } }
@keyframes hcScan { 0% { transform: translateY(-120%) } 100% { transform: translateY(520%) } }
@keyframes hcFloat { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-7px) } }
@keyframes hcBallX { from { left: 8% } to { left: 88% } }
@keyframes hcBallY { from { top: 16% } to { top: 80% } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}

/* ── Small screens ─────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .nav-links { display: none !important; }   /* footer carries the same links */
}
