/* ============================================================
   PHILENTRUST LLC — base.css
   Brand palette: Navy (#1F3A5F), Forest Green (#2E6B4F),
   Muted Gold/Ochre (#B8860B). Neutral off-white surfaces.
   ============================================================ */

:root,
[data-theme='light'] {
  /* Brand colors */
  --navy: #1F3A5F;
  --navy-deep: #16293f;
  --navy-soft: #34507a;
  --green: #2E6B4F;
  --green-deep: #1f4a36;
  --green-soft: #4a8a6e;
  --gold: #B8860B;
  --gold-soft: #d4a52e;
  --gold-pale: #e8d29a;

  /* Surfaces (warm off-white) */
  --color-bg: #faf9f6;
  --color-surface: #ffffff;
  --color-surface-2: #f4f2ec;
  --color-surface-offset: #efede5;
  --color-surface-offset-2: #e8e5db;
  --color-surface-dynamic: #ddd9cc;
  --color-divider: #e2ddcf;
  --color-border: #d8d2c2;

  /* Text */
  --color-text: #1f2a37;
  --color-text-muted: #5c6470;
  --color-text-faint: #9aa0a8;
  --color-text-inverse: #faf9f6;

  /* Semantic mapping to brand */
  --color-primary: var(--navy);
  --color-primary-hover: var(--navy-deep);
  --color-primary-active: #0e1c2c;
  --color-primary-highlight: #dde4ee;
  --color-accent: var(--green);
  --color-accent-hover: var(--green-deep);
  --color-accent-highlight: #d6e4dc;
  --color-gold-hl: #f3e8c8;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows (warm-toned) */
  --shadow-sm: 0 1px 2px rgba(31, 42, 55, 0.06);
  --shadow-md: 0 4px 16px rgba(31, 42, 55, 0.08);
  --shadow-lg: 0 16px 40px rgba(31, 42, 55, 0.12);
  --shadow-navy: 0 12px 32px rgba(31, 58, 95, 0.18);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'General Sans', 'Inter', sans-serif;
  --font-body: 'General Sans', 'Inter', system-ui, sans-serif;
}

/* DARK MODE */
[data-theme='dark'] {
  --navy: #6b8fb5;
  --navy-deep: #4a6a8c;
  --navy-soft: #8aa8c8;
  --green: #6daa8a;
  --green-deep: #4a8a6e;
  --green-soft: #8ac4a8;
  --gold: #e8b84b;
  --gold-soft: #f0c870;
  --gold-pale: #5a4a2a;

  --color-bg: #121822;
  --color-surface: #19202d;
  --color-surface-2: #1e2634;
  --color-surface-offset: #222b3a;
  --color-surface-offset-2: #283242;
  --color-surface-dynamic: #303c4e;
  --color-divider: #2a3342;
  --color-border: #364356;

  --color-text: #e2e6ec;
  --color-text-muted: #9ba5b4;
  --color-text-faint: #6a7585;
  --color-text-inverse: #121822;

  --color-primary: var(--navy);
  --color-primary-hover: var(--navy-soft);
  --color-primary-active: #a0b8d0;
  --color-primary-highlight: #2a3647;
  --color-accent: var(--green);
  --color-accent-hover: var(--green-soft);
  --color-accent-highlight: #2a4035;
  --color-gold-hl: #3a3220;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-navy: 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   Base stylesheet
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  hanging-punctuation: first last;
  scroll-padding-top: 5rem;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}

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

ul[role='list'],
ol[role='list'] {
  list-style: none;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
  line-height: 1.15;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
}

p,
li,
figcaption {
  text-wrap: pretty;
  max-width: 72ch;
}

::selection {
  background: rgba(31, 58, 95, 0.22);
  color: var(--color-text);
}

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

@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;
  }
}

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

table {
  border-collapse: collapse;
  width: 100%;
}

a,
button,
[role='button'],
[role='link'],
input,
textarea,
select {
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive);
}

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