/* ============================================================
   base.css — design tokens, reset, typography baseline
   JoSa Management
   ============================================================ */

:root {
  /* Brand */
  --blue: #230a9a;
  --blue-deep: #150360;
  --blue-ink: #0a0436;
  --red: #ff001a;
  --red-deep: #cc0015;
  --yellow: #ffd400;
  --cream: #f4f1e8;
  --offwhite: #f6f3ec;
  --white: #ffffff;
  --black: #0a0a0a;

  /* Type families */
  --font-display: "Clash Display", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Satoshi", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "Menlo", monospace;

  /* Fluid type scale */
  --fs-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.85rem);
  --fs-sm: clamp(0.85rem, 0.8rem + 0.25vw, 0.95rem);
  --fs-base: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --fs-md: clamp(1.05rem, 0.95rem + 0.6vw, 1.25rem);
  --fs-lg: clamp(1.25rem, 1.1rem + 0.8vw, 1.6rem);
  --fs-xl: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  --fs-2xl: clamp(2.5rem, 1.8rem + 3vw, 4rem);
  --fs-3xl: clamp(3.5rem, 2.5rem + 5vw, 6.5rem);
  --fs-hero: clamp(4.5rem, 3rem + 9vw, 12rem);

  /* 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;
  --space-40: 10rem;

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-md: 0 6px 18px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg: 0 18px 40px rgba(0,0,0,0.18), 0 4px 12px rgba(0,0,0,0.08);
  --shadow-pop: 8px 8px 0 0 rgba(10,4,54,1);

  /* Easing & timing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 180ms;
  --t-med: 320ms;
  --t-slow: 600ms;

  /* Semantic — light (default) */
  --bg: var(--offwhite);
  --bg-alt: #ece8dd;
  --surface: #ffffff;
  --ink: #0a0436;
  --ink-soft: #2a2353;
  --ink-mute: #6a6588;
  --border: rgba(10, 4, 54, 0.12);
  --accent: var(--red);
  --accent-ink: #ffffff;
  --primary: var(--blue);
  --primary-ink: #ffffff;

  /* Layout */
  --maxw: 1320px;
  --gutter: clamp(1rem, 2.5vw, 2rem);
}

[data-theme="dark"] {
  --bg: #07041e;
  --bg-alt: #100a36;
  --surface: #110b3a;
  --ink: #f4f1e8;
  --ink-soft: #d8d3ea;
  --ink-mute: #948fb6;
  --border: rgba(255, 255, 255, 0.14);
  --shadow-pop: 8px 8px 0 0 rgba(255, 212, 0, 0.85);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background var(--t-med) var(--ease-out), color var(--t-med) var(--ease-out);
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  color: inherit;
}
p { margin: 0; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--red); color: #fff; }

/* ---------- Utility ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--blue);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 200;
  border-radius: 0 0 var(--r-md) 0;
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 4px;
}
