/* ========================================
   BASE.CSS — Reset + Design Tokens
   Jordan's Archives
   ======================================== */

/* --- CSS Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  line-height: 1.5;
  text-rendering: optimizeSpeed;
}

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

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

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

/* ========================================
   @FONT-FACE — Self-hosted fonts
   Awesome Serif (display) + Trip Sans (body)
   ======================================== */

/* --- Awesome Serif — Display/Heading font --- */
@font-face {
  font-family: 'Awesome Serif';
  src: url('fonts/AwesomeSerif-LightRegular.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Awesome Serif';
  src: url('fonts/AwesomeSerif-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Awesome Serif';
  src: url('fonts/AwesomeSerif-MediumRegular.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Awesome Serif';
  src: url('fonts/AwesomeSerif-BoldRegular.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- Trip Sans — Body/UI font --- */
@font-face {
  font-family: 'Trip Sans';
  src: url('fonts/trip-sans.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Trip Sans';
  src: url('fonts/trip-sans-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Trip Sans';
  src: url('fonts/trip-sans-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Trip Sans';
  src: url('fonts/trip-sans-ultra.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* --- Trip Sans Mono — Code/mono font --- */
@font-face {
  font-family: 'Trip Sans Mono';
  src: url('fonts/trip-sans-mono-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- Design Tokens --- */
:root {
  /* New Color Palette */
  --beige: #f1e9e7;
  --gray: #cdc4c1;
  --green-dark: #1a2d14;
  --green: #37481c;
  --red: #a82226;

  /* Semantic mapping */
  --bg: #f1e9e7;
  --bg-surface: #e9dfdb;
  --bg-surface-hover: #dfd4cf;
  --bg-sidebar: #ebe2df;
  --bg-elevated: #f5edeb;

  --text-primary: #1a2d14;
  --text-muted: #5a6b4e;
  --text-faint: #8a9a7e;

  --accent: #a82226;
  --accent-hover: #8c1c1f;
  --accent-muted: rgba(168, 34, 38, 0.12);
  --accent-subtle: rgba(168, 34, 38, 0.06);

  --badge-new: #37481c;
  --badge-beta: #a82226;

  --border: #cdc4c1;
  --border-subtle: #ddd5d2;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(26, 45, 20, 0.06);
  --shadow-md: 0 4px 12px rgba(26, 45, 20, 0.08);
  --shadow-lg: 0 8px 24px rgba(26, 45, 20, 0.12);
  --shadow-card: 0 2px 8px rgba(26, 45, 20, 0.06);
  --shadow-card-hover: 0 8px 24px rgba(26, 45, 20, 0.12);

  /* Typography */
  --font-display: 'Awesome Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Trip Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Trip Sans Mono', 'JetBrains Mono', 'Fira Code', monospace;

  /* Type Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-hero: 3.5rem;

  /* 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;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-full: 9999px;

  /* Sidebar */
  --sidebar-width: 240px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

/* --- Base Styles --- */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg);
}

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

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-faint);
}
