/* Shared design system for the b1ake.xyz apps workspace.
   Canonical source — copied into each app's public/ folder.
   Fonts: fonts/Lato-{Regular,SemiBold,Bold}.ttf, licensed under the SIL
   Open Font License (see fonts/OFL.txt). */

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

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

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

:root {
  /* Backgrounds — dark is the only default, not gated behind
     prefers-color-scheme. Apps with a light toggle use the
     [data-theme="light"] override below. Page bg follows Material
     Design's #121212 convention (darker than pure black would read as
     less harsh, and gives room for cards to read as elevated above it);
     card bg is the palette's own near-black grey, elevated above the page. */
  --bg: #121212;
  --card-bg: #242424;
  --border: #3a3a3a;

  --text-primary: #f2f2f0;
  --text-secondary: #b8bcc2;
  --text-muted: #7c828c;

  --accent-blue: #00aeef;
  --accent-green: #00b074;
  --accent-red: #e23d0c;
  --accent-orange: #f28c0a;
  --accent-magenta: #c6009c;
  --accent-violet: #8b5cf6;
  --accent: var(--accent-violet);

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 0.75rem;
  --space-lg: 1rem;
  --space-xl: 1.5rem;
  --space-2xl: 2rem;
  --space-3xl: 3rem;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-pill: 999px;

  --content-width: 1400px;
}

:root[data-theme='light'] {
  --bg: #f1f0eb;
  --card-bg: #ffffff;
  --border: #e4e2dc;

  --text-primary: #1a1a1a;
  --text-secondary: #55565b;
  --text-muted: #8a8b90;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Lato, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: Lato, sans-serif;
  margin: 0 0 var(--space-lg);
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
}

h2 {
  font-size: 1.15rem;
  font-weight: 600;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

p {
  margin: 0 0 var(--space-md);
}

.meta,
.text-muted {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.page {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem var(--space-3xl);
}

/* App header bar - full-bleed, visually separated from the page (card-bg
   + a bottom border) rather than just sitting flush in the page flow.
   The title goes on the left, actions (sync, add, etc.) on the right via
   .topbar-actions; anything else (subtitle, tabs, status text) can sit
   between them - .topbar-inner is just a flex row that wraps. */
.topbar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-xl);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-lg);
}

.topbar-inner h1 {
  margin: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-left: auto;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-xl);
}

.card--interactive {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card--interactive:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.25rem;
  font: inherit;
  font-family: Lato, sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.btn--danger {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.btn--danger:hover {
  background: color-mix(in srgb, var(--accent-red) 12%, transparent);
}

.btn--success {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.btn--success:hover {
  background: color-mix(in srgb, var(--accent-green) 12%, transparent);
}
