/* ==========================================================================
   LucentBrief Design System — Bold & Warm
   ========================================================================== */

/* Design Tokens */

:root {
  /* Typography */
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;

  /* Type scale — BOLD and expressive */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.3rem;
  --text-2xl: 1.625rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;
  --text-5xl: 3.75rem;

  /* Colors — warm paper palette, bolder */
  --color-bg: #faf8f5;
  --color-bg-alt: #f3f0eb;
  --color-surface: #fff;
  --color-text: #2d2620;
  --color-text-secondary: #6b6158;
  --color-text-muted: #9a918a;
  --color-border: #e0dbd4;
  --color-border-strong: #c8c1b8;
  --color-accent: #b5543e;
  --color-accent-bold: #a93d27;
  --color-accent-hover: #9a4533;
  --color-accent-tint: #f5ebe8;
  --color-positive: #3d8b37;
  --color-neutral: #9a918a;
  --color-negative: #c4392e;
  --color-negative-hover: #a83026;
  --color-negative-tint: #fde8e8;

  /* Status badges */
  --color-status-running-bg: #dbeafe;
  --color-status-running-text: #1d4ed8;
  --color-status-completed-bg: #dcfce7;
  --color-status-completed-text: #166534;
  --color-status-failed-bg: #fef2f2;
  --color-status-failed-text: #991b1b;
  --color-status-failed-border: #fecaca;
  --color-status-warn-bg: #fef3c7;
  --color-status-warn-text: #92400e;
  --color-status-warn-border: #f59e0b;
  --color-status-warn-hover: #fde68a;
  --color-status-info-bg: #e0e7ff;
  --color-status-info-text: #3730a3;

  /* Logo / brand colors (triangulation mark) */
  --color-logo-blue: #1d4ed8;
  --color-logo-center: #4a3f36;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Layout */
  --content-width: 720px;
  --content-width-wide: 960px;
  --max-width-content: var(--content-width);
  --max-width-wide: var(--content-width-wide);
  --header-height: 60px;

  /* Borders */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-full: 999px;

  /* Shadows — warm toned */
  --shadow-sm: 0 1px 2px rgba(45, 38, 32, 0.06);
  --shadow-md: 0 4px 12px rgba(45, 38, 32, 0.08);
  --shadow-lg: 0 8px 24px rgba(45, 38, 32, 0.12);
  --shadow-warm: 0 4px 16px rgba(181, 84, 62, 0.1);

  /* Transitions */
  --transition-fast: 0.12s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.35s ease;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1a1816;
    --color-bg-alt: #242120;
    --color-surface: #2d2a28;
    --color-text: #e8e4df;
    --color-text-secondary: #b5aea6;
    --color-text-muted: #8a8178;
    --color-border: #3d3935;
    --color-border-strong: #524d48;
    --color-accent: #e07a62;
    --color-accent-bold: #f08a72;
    --color-accent-hover: #eb9580;
    --color-accent-tint: #362420;
    --color-positive: #5aad54;
    --color-neutral: #8a8178;
    --color-negative: #e05a50;
    --color-negative-hover: #c44a40;
    --color-negative-tint: #3a2020;

    --color-status-running-bg: #1e2a3a;
    --color-status-running-text: #7cb3f5;
    --color-status-completed-bg: #1a2e1a;
    --color-status-completed-text: #6ec96e;
    --color-status-failed-bg: #2e1a1a;
    --color-status-failed-text: #f08080;
    --color-status-failed-border: #5a2a2a;
    --color-status-warn-bg: #2e2815;
    --color-status-warn-text: #d4a94e;
    --color-status-warn-border: #7a6530;
    --color-status-warn-hover: #3d3520;
    --color-status-info-bg: #1e1e30;
    --color-status-info-text: #9a9ae0;

    --color-logo-blue: #5b8def;
    --color-logo-center: #b5aea6;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-warm: 0 4px 16px rgba(224, 122, 98, 0.15);
  }
}

/* ==========================================================================
   CSS Reset (minimal)
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Subtle warm paper texture */
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(181, 84, 62, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(29, 78, 216, 0.02) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(61, 139, 55, 0.02) 0%, transparent 50%);
  background-attachment: fixed;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* ==========================================================================
   Base Typography — Bold & Expressive
   ========================================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-4xl);
  font-weight: 900;
  font-variation-settings: 'opsz' 48;
}

h2 {
  font-size: var(--text-2xl);
  font-weight: 800;
  font-variation-settings: 'opsz' 36;
}

h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  font-variation-settings: 'opsz' 24;
}

h4 {
  font-size: var(--text-lg);
  font-weight: 700;
  font-variation-settings: 'opsz' 20;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  text-decoration-skip-ink: auto;
  text-underline-offset: 0.15em;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-bold);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

::selection {
  background-color: var(--color-accent-tint);
  color: var(--color-text);
}

/* Focus rings — warm accent, not browser default blue */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Smooth transitions globally */
a, button, input, select, textarea {
  transition: color var(--transition-fast),
              background-color var(--transition-fast),
              border-color var(--transition-fast),
              box-shadow var(--transition-fast),
              transform var(--transition-fast);
}

/* Screen-reader-only utility */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
