/* SPDX-License-Identifier: LicenseRef-Relocat-Proprietary
   Copyright (C) 2025-2026 Ruslan Zykun. All rights reserved.

   Design tokens for the relocat.org landing page (web/public/landing.html),
   ported from the Claude Design web tokens (src/web/tokens.css, 2026-09-15):
   light and dark themes, type, base element rules and the few shared
   components every public page uses. Loaded first, before shell.css and
   the page's own stylesheet.

   Theme resolution:
     1. <html data-theme="light"|"dark">, set by theme-toggle.js, wins.
     2. Otherwise prefers-color-scheme decides.
   The two dark blocks below must stay identical, and must set every
   variable the light block sets (tests/unit/core/test_landing_page.py). */

/* ============================================================
   Fonts — self-hosted, provenance in fonts/README.md
   ============================================================ */

@font-face {
  font-family: 'Albert Sans';
  src: url('fonts/AlbertSans-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono-Variable.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Questrial';
  src: url('fonts/Questrial-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   Theme — light (default)
   ============================================================ */

:root {
  --bg: #FFFFFF;
  --bg-page: #F8F8F6;
  --surface: #F5F5F3;
  --border: rgba(0,0,0,0.06);
  --border-strong: rgba(0,0,0,0.12);
  --text-primary: #1A1A1A;
  --text-secondary: #6B6B6B;
  --text-tertiary: #8F8F8F;
  --brand: #F2B820;
  --accent: #0F766E;
  --accent-hover: #0D6660;
  --accent-light: rgba(15,118,110,0.12);
  --accent-border: rgba(15,118,110,0.30);
  --accent-on: #FFFFFF;
  --accent-text: #0F766E;
  --success: #2D8A4E;
  --warning-text: #8A7410;
  --focus-ring: #005FCC;
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.08);
}

/* ============================================================
   Theme — dark (system preference, unless the reader chose light)
   ============================================================ */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212;
    --bg-page: #0E0E0E;
    --surface: #1E1E1E;
    --border: rgba(255,255,255,0.06);
    --border-strong: rgba(255,255,255,0.12);
    --text-primary: #E8E8E8;
    --text-secondary: #A0A0A0;
    --text-tertiary: #6A6A6A;
    --brand: #F2B820;
    --accent: #2DA89C;
    --accent-hover: #36C0B2;
    --accent-light: rgba(45,168,156,0.18);
    --accent-border: rgba(45,168,156,0.36);
    --accent-on: #0E0E0E;
    --accent-text: #2DA89C;
    --success: #4CAF6E;
    --warning-text: #F2B820;
    --focus-ring: #66B3FF;
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.40);
  }
}

/* ============================================================
   Theme — dark (explicit choice via the theme toggle)
   ============================================================ */

:root[data-theme="dark"] {
  --bg: #121212;
  --bg-page: #0E0E0E;
  --surface: #1E1E1E;
  --border: rgba(255,255,255,0.06);
  --border-strong: rgba(255,255,255,0.12);
  --text-primary: #E8E8E8;
  --text-secondary: #A0A0A0;
  --text-tertiary: #6A6A6A;
  --brand: #F2B820;
  --accent: #2DA89C;
  --accent-hover: #36C0B2;
  --accent-light: rgba(45,168,156,0.18);
  --accent-border: rgba(45,168,156,0.36);
  --accent-on: #0E0E0E;
  --accent-text: #2DA89C;
  --success: #4CAF6E;
  --warning-text: #F2B820;
  --focus-ring: #66B3FF;
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.40);
}

/* ============================================================
   Type and layout
   ============================================================ */

:root {
  --font-logo: 'Questrial', sans-serif;
  --font-body: 'Albert Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  --topbar-h: 56px;
}

/* ============================================================
   Base
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg-page); color: var(--text-primary); }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 200ms ease, color 200ms ease;
}

a { color: var(--text-primary); text-decoration: none; }
.logo { font-family: var(--font-logo); font-weight: 400; }
.mono { font-family: var(--font-mono); font-weight: 400; }

::selection { background: var(--accent); color: var(--accent-on); }
*:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ============================================================
   Components
   ============================================================ */

.btn {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  cursor: pointer;
  transition: background 100ms ease, border-color 100ms ease, color 100ms ease;
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 0;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-on);
  border: 1px solid var(--accent);
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--text-tertiary); }

.btn-icon {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 100ms ease, color 100ms ease, border-color 100ms ease;
}
.btn-icon:hover { background: var(--surface); color: var(--text-primary); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px; font-weight: 500;
  color: var(--text-secondary);
}

.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  padding: 0 14px;
  height: 40px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0ms !important;
    transition-duration: 0ms !important;
  }
}
