/* ===================================================================
   base.css — reset, design tokens, theme variables
   Limbaga Law — warm cream / navy legal aesthetic
   =================================================================== */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Design tokens ---------- */
:root {
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* type scale */
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.1875rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: 2.75rem;
  --text-hero: clamp(2.4rem, 6vw, 4rem);

  /* spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --maxw: 1120px;
  --transition: 200ms ease;

  /* brand constants */
  --navy: #163A63;
  --navy-deep: #102b49;
}

/* ---------- Light theme (default) ---------- */
:root, [data-theme="light"] {
  --bg: #F6F3EE;
  --surface: #FBFAF6;
  --surface-alt: #EFEBE2;
  --border: #DDD7CB;
  --text: #232019;
  --text-muted: #605d54;
  --text-faint: #8f8b80;
  --primary: #163A63;
  --primary-hover: #102b49;
  --on-primary: #F6F3EE;
  --accent-soft: rgba(22, 58, 99, 0.08);
  --header-bg: rgba(246, 243, 238, 0.9);
  --shadow: 0 8px 30px rgba(28, 25, 20, 0.10);
  --shadow-sm: 0 2px 10px rgba(28, 25, 20, 0.07);
  --focus-ring: #163A63;
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
  --bg: #14171c;
  --surface: #1b1f26;
  --surface-alt: #222833;
  --border: #333b47;
  --text: #e7e4dd;
  --text-muted: #a8a49a;
  --text-faint: #7c7871;
  --primary: #8fb3dd;
  --primary-hover: #a9c6e8;
  --on-primary: #0e1b2c;
  --accent-soft: rgba(143, 179, 221, 0.12);
  --header-bg: rgba(20, 23, 28, 0.9);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.4);
  --focus-ring: #a9c6e8;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
@media (min-width: 720px) { .container { padding-inline: var(--space-8); } }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--primary);
  color: var(--on-primary);
  padding: var(--space-3) var(--space-4);
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

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

.eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-6);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--text-base);
  text-decoration: none;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--accent-soft); border-color: var(--primary); }

.btn-block { width: 100%; }
