/* The site's own tokens: the app's default palette, copied from
   `apps/watchtower/src/index.css` (`:root` and `.dark`) so the front page looks
   like the app with no scheme applied. A scheme overrides these through
   `themes.css`, which is generated from the app's theme engine — the site never
   retypes a palette. */
@font-face {
  font-family: 'Inter Web';
  src: url('./fonts/inter-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono Web';
  src: url('./fonts/geist-mono-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono Web';
  src: url('./fonts/jetbrains-mono-latin.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-background: oklch(0.148 0.004 264);
  --color-foreground: oklch(0.965 0 0);
  --color-card: oklch(0.186 0.004 266);
  --color-card-foreground: oklch(0.965 0 0);
  --color-popover: oklch(0.215 0.004 266);
  --color-primary: oklch(0.94 0 0);
  --color-primary-foreground: oklch(0.2 0.004 264);
  --color-secondary: oklch(1 0 0 / 0.06);
  --color-muted: oklch(1 0 0 / 0.05);
  --color-muted-foreground: oklch(0.68 0.008 264);
  --color-accent: oklch(1 0 0 / 0.07);
  --color-border: oklch(1 0 0 / 0.1);
  --color-input: oklch(1 0 0 / 0.14);
  --color-destructive: oklch(0.66 0.19 22.216);
  --color-success: oklch(0.7 0.15 162.48);
  --color-warning: oklch(0.78 0.15 70.08);
  --color-orange: oklch(0.77 0.17 52);
  --color-mark: oklch(0.78 0.15 352.53);
  --color-beam: oklch(0.87 0.16 92);
  --radius: 0.5rem;
  --font-sans: 'Inter Web', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* The app's default mono is the system stack; the site vendors Geist Mono (one
     of the app's own font choices, OFL-1.1, 22 KB) because a landing page cannot
     assume a monospace face exists on the reader's machine and every label here is
     mono — the same rule the app applies to its Omarchy shelf. */
  --font-mono: 'Geist Mono Web', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  color-scheme: dark;
}

/* The app's own light palette (`index.css` `:root`) — what "watchtower light"
   means, and what "follow the system" picks on a light device. */
[data-appmode='light'] {
  --color-background: oklch(1 0 0);
  --color-foreground: oklch(0.141 0.005 285.823);
  --color-card: oklch(1 0 0);
  --color-card-foreground: oklch(0.141 0.005 285.823);
  --color-popover: oklch(1 0 0);
  --color-primary: oklch(0.21 0.006 285.885);
  --color-primary-foreground: oklch(0.985 0 0);
  --color-secondary: oklch(0 0 0 / 0.05);
  --color-muted: oklch(0 0 0 / 0.045);
  --color-muted-foreground: oklch(0.552 0.016 285.938);
  --color-accent: oklch(0 0 0 / 0.055);
  --color-border: oklch(0 0 0 / 0.09);
  --color-input: oklch(0 0 0 / 0.14);
  --color-success: oklch(0.6 0.15 162.48);
  --color-warning: oklch(0.62 0.15 70.08);
  --color-orange: oklch(0.62 0.17 52);
  --color-mark: oklch(0.6 0.19 352.53);
  --color-beam: oklch(0.75 0.16 92);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* A scheme may name its own mono face (the Omarchy shelf does); this is the only
   place the site reads it, so a palette change cannot half-apply. */
code, pre, kbd, .mono {
  font-family: var(--font-mono-omarchy, var(--font-mono));
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ── header: the app's bar, one line, hairline under ───────────────────────── */
header.bar {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--color-border);
  background: color-mix(in oklab, var(--color-background) 88%, transparent);
  backdrop-filter: blur(8px);
}
.bar-inner {
  display: flex; align-items: center; gap: 12px;
  height: 48px;
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand svg { width: 22px; height: 22px; color: var(--color-mark); overflow: visible; }
.brand .word {
  font-weight: 600; letter-spacing: -0.01em; font-size: 15px;
}
/* The app's beacon: one pass of light across the wordmark, once, on load. */
.brand .word { position: relative; overflow: hidden; }
.brand .word::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, color-mix(in oklab, var(--color-beam) 70%, transparent) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: beam 1.6s ease-out 0.4s 1 forwards;
  mix-blend-mode: screen;
}
@keyframes beam { to { transform: translateX(120%); } }

.spacer { flex: 1; }

.bar-right { display: flex; align-items: center; gap: 4px; }

button, .btn {
  font: inherit; color: inherit; cursor: pointer;
  background: transparent; border: 1px solid transparent; border-radius: 6px;
}
.icon-btn {
  height: 32px; min-width: 32px; padding: 0 8px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--color-muted-foreground);
}
.icon-btn:hover { background: var(--color-accent); color: var(--color-foreground); }

/* ── hero ──────────────────────────────────────────────────────────────────── */
.hero { padding: 72px 0 40px; }
.hero h1 {
  margin: 0 0 16px; font-size: clamp(30px, 4.6vw, 46px); line-height: 1.1;
  letter-spacing: -0.03em; font-weight: 600; max-width: 20ch;
}
.hero p.lede {
  margin: 0; max-width: 62ch; font-size: 17px;
  /* Foreground softened, not `muted-foreground`: a light palette's muted slot is
     chosen for labels, and body copy in it reads as disabled text. */
  color: color-mix(in oklab, var(--color-foreground) 82%, var(--color-background));
}
.cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.cta a {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 6px;
  border: 1px solid var(--color-border);
  font-size: 13px;
}
.cta a.primary {
  background: var(--color-primary); color: var(--color-primary-foreground);
  border-color: var(--color-primary); font-weight: 600;
}
.cta a.primary:hover { text-decoration: none; opacity: 0.92; }
.cta a:hover { text-decoration: none; background: var(--color-accent); }
.cta a.primary:hover { background: var(--color-primary); }
.cta .mono { font-family: var(--font-mono); font-size: 12px; }

.shot { margin: 40px 0 0; }
.shot img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--color-border); border-radius: 0.75rem;
  background: var(--color-card);
}
.shot figcaption {
  margin-top: 10px; font-size: 12.5px;
  color: color-mix(in oklab, var(--color-foreground) 68%, var(--color-background));
}

/* ── sections ──────────────────────────────────────────────────────────────── */
section { padding: 40px 0; border-top: 1px solid var(--color-border); }
section > h2 {
  margin: 0 0 4px; font-family: var(--font-mono); font-weight: 500;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--color-muted-foreground);
}
section > p.kicker {
  margin: 0 0 24px; max-width: 70ch;
  color: color-mix(in oklab, var(--color-foreground) 78%, var(--color-background));
}

/* ── board mock: the app's lanes, cards and pills ───────────────────────────── */
.board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lane { display: flex; flex-direction: column; gap: 8px; }
.lane > h3 {
  margin: 0 0 2px; display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-weight: 500; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-muted-foreground);
}
.lane > h3 .n { color: color-mix(in oklab, var(--color-muted-foreground) 70%, transparent); }

.card {
  border: 1px solid var(--color-border); border-radius: var(--radius);
  background: var(--color-card); padding: 8px 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.card.running { border-color: color-mix(in oklab, var(--color-success) 55%, var(--color-border)); }
.card .title { font-size: 12.5px; line-height: 1.35; }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 1px 6px; border-radius: 999px;
  border: 1px solid currentColor; color: var(--color-muted-foreground);
  white-space: nowrap;
}
.pill.running { color: var(--color-success); }
.pill.queued, .pill.review { color: var(--color-warning); }
.pill.done { color: var(--color-orange); }
.pill.failed { color: var(--color-destructive); }
.pill.plain { border-color: var(--color-border); color: var(--color-muted-foreground); }
.row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dot { width: 6px; height: 6px; border-radius: 999px; background: var(--color-success); }
.dot.idle { background: var(--color-muted-foreground); }

/* ── cards of prose ────────────────────────────────────────────────────────── */
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 820px) { .cols { grid-template-columns: 1fr; } }
.cols .card { padding: 14px 16px; gap: 8px; }
.cols .card h4 { margin: 0; font-size: 13px; font-weight: 600; }
.cols .card p {
  margin: 0; font-size: 13px;
  color: color-mix(in oklab, var(--color-foreground) 74%, var(--color-background));
}

/* ── code ──────────────────────────────────────────────────────────────────── */
pre {
  margin: 0; padding: 14px 16px; overflow-x: auto;
  background: var(--color-card); border: 1px solid var(--color-border);
  border-radius: var(--radius); font-size: 12.5px; line-height: 1.7;
}
pre .c { color: var(--color-muted-foreground); }
pre .ok { color: var(--color-success); }
pre .warn { color: var(--color-warning); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* ── the theme picker: the app's panel, in miniature ───────────────────────── */
.picker {
  position: absolute; right: 24px; top: 52px; z-index: 30;
  width: 320px; padding: 12px;
  background: var(--color-popover); border: 1px solid var(--color-border);
  border-radius: 0.75rem; box-shadow: 0 16px 48px rgb(0 0 0 / 0.45);
}
.picker[hidden] { display: none; }
.picker .head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--color-muted-foreground); margin-bottom: 8px;
}
.picker .modes { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--color-border); }
.picker .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.picker .col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.picker .colhead {
  font-family: var(--font-mono); font-size: 9px; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--color-muted-foreground);
  opacity: 0.7; padding: 2px 8px 4px;
}
.picker button.theme {
  text-align: left; padding: 5px 8px; border-radius: 6px; font-size: 12px;
  border: 1px solid transparent; display: flex; align-items: center; gap: 7px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.picker button.theme span:last-child { overflow: hidden; text-overflow: ellipsis; }
.picker button.theme:hover { background: var(--color-accent); }
.picker button.theme[aria-pressed='true'] { border-color: var(--color-ring, var(--color-border)); background: var(--color-accent); }
.picker .swatch {
  width: 13px; height: 13px; border-radius: 3px; flex: none;
  border: 1px solid color-mix(in oklab, var(--color-foreground) 22%, transparent);
}
.picker .divider {
  margin: 10px 0 8px; padding-top: 8px; border-top: 1px solid var(--color-border);
  font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--color-muted-foreground);
  display: flex; align-items: center; justify-content: space-between;
}
.picker .hint { font-family: var(--font-sans); font-size: 11px; text-transform: none; letter-spacing: 0; }
.picker .eggshelf { max-height: 232px; overflow-y: auto; }

/* ── footer ────────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--color-border); padding: 28px 0 56px;
  color: var(--color-muted-foreground); font-size: 12.5px;
}
footer .row { justify-content: space-between; }
footer .mono { font-size: 11px; }

@media (prefers-reduced-motion: reduce) {
  .brand .word::after { animation: none; }
}
