/* ============================================================
   BASE.CSS — Shared variables, resets, typography
   Loaded by both base_public.html and base_dashboard.html
   ============================================================ */

:root {
  /* Primary Colors (Orange Theme) */
  --color-primary: #f37b30;
  --color-p500: #f37b30;
  --color-p600: #db6823;
  --color-p700: #C4561A;
  --color-p300: #FF9A5C;
  --color-p100: #FFF3E9;

  /* Neutral Colors (Warm Brown Palette) */
  --color-n900: #1c130d;
  --color-n800: #2a1e16;
  --color-n700: #3b2e23;
  --color-n600: #5c4a3d;
  --color-n500: #9c6949;
  --color-n400: #b08968;
  --color-n300: #c9a88a;
  --color-n200: #e8d8ce;
  --color-n100: #f4ece7;
  --color-n075: #f8f3ef;
  --color-n050: #f8f7f5;

  /* Warm background */
  --color-cream50: #FDF8F3;

  /* Raised surfaces (cards, dropdowns, inputs) */
  --color-surface: #ffffff;

  /* Semantic Colors */
  --color-success: #2EB872;
  --color-warning: #F6A609;
  --color-error: #E5484D;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-soft: 0 1px 3px rgba(28, 19, 13, 0.06);
  --shadow-nav: 0 1px 2px rgba(28, 19, 13, 0.05);
  --shadow-card: 0 1px 3px rgba(28, 19, 13, 0.08);
  --shadow-card-soft: 0 1px 2px rgba(28, 19, 13, 0.04);
  --shadow-dropdown: 0 8px 24px rgba(28, 19, 13, 0.12);
}

/* Dark theme — neutral graphite palette (per docs/new_design dark mockups):
   #121212 page, #1E1E1E surfaces, #333 borders, gray text scale. The scale
   flips so n900 stays "strongest text" and n050 stays "page background"
   everywhere in the components. */
[data-theme="dark"] {
  color-scheme: dark;

  --color-p100: #31231a;
  --color-p700: #ff9d5c;

  --color-n900: #f3f4f6;
  --color-n800: #e5e7eb;
  --color-n700: #d1d5db;
  --color-n600: #b0b6c0;
  --color-n500: #9ca3af;
  --color-n400: #7b828d;
  --color-n300: #565c66;
  --color-n200: #3f454f;
  --color-n100: #333333;
  --color-n075: #262626;
  --color-n050: #121212;

  --color-cream50: #0d0d0d;
  --color-surface: #1e1e1e;

  --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-nav: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-card-soft: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-dropdown: 0 8px 24px rgba(0, 0, 0, 0.6);
}

/* ==================== RESETS ==================== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--color-n900);
}

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

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea,
select {
  font-family: inherit;
}

/* ==================== TYPOGRAPHY ==================== */
.h0 { font-size: 36px; line-height: 1.2; font-weight: 700; }
.h1 { font-size: 24px; line-height: 1.2; font-weight: 700; color: var(--color-n900); }
.h2 { font-size: 20px; line-height: 1.25; font-weight: 600; color: var(--color-n900); }
.h3 { font-size: 16px; line-height: 1.3; font-weight: 600; color: var(--color-n900); }
.h4 { font-size: 20px; line-height: 1.3; font-weight: 600; }

.body-lg { font-size: 15px; line-height: 1.5; }
.body-sm { font-size: 13px; line-height: 1.5; }

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-n500);
}

/* Keyboard focus ring. :focus-visible fires for keyboard navigation only,
   so this restores the outlines stripped by `outline: none` on components
   without adding rings to mouse clicks. */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--color-p500);
  outline-offset: 2px;
}

/* Material Symbols — prevent text flash before font loads */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-size: 22px;
  width: 1em;
  height: 1em;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'liga';
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-n200);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-n300);
}

/* ==================== REDUCED MOTION ==================== */
/* Honor the OS "reduce motion" setting app-wide: neutralize CSS
   transitions/animations and disable smooth scrolling. GSAP-driven
   motion guards itself separately via gsap.matchMedia(). */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
