/* ============================================================
   ROUND ROCK REQUISITION — DESIGN SYSTEM
   DNA: Financial Fort | Hunter Green / Silver
   ============================================================ */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  /* Brand: Hunter Green Scale */
  --brand-50:  #edf4ef;
  --brand-100: #d3e7d8;
  --brand-200: #a7cfb1;
  --brand-300: #7ab88a;
  --brand-400: #4ea063;
  --brand-500: #357a47;
  --brand-600: #265c34;
  --brand-700: #1B3022;  /* PRIMARY — Hunter Green */
  --brand-800: #142419;
  --brand-900: #0d1810;
  --brand-950: #07090c;

  /* Brand accent + component tokens */
  --brand-accent:         #C0C0C0;   /* Silver */
  --brand-nav-bg:         rgba(13,24,16,0.96);
  --brand-callout-border: #265c34;
  --brand-callout-bg:     #edf4ef;

  /* Silver Scale */
  --sv-50:  #f8fafc;
  --sv-100: #f1f5f9;
  --sv-200: #e2e8f0;
  --sv-300: #cbd5e1;
  --sv-400: #94a3b8;
  --sv-500: #64748b;
  --sv-600: #475569;
  --sv-700: #334155;
  --sv-800: #1e293b;
  --sv-900: #0f172a;

  /* Stone */
  --st-50:  #fafaf9;
  --st-100: #f5f4f0;
  --st-200: #e8e5de;
  --st-300: #d4cfc5;
  --st-400: #b8b2a5;

  /* Color Aliases */
  --color-brand:      var(--brand-700);
  --color-brand-dark: var(--brand-800);
  --color-brand-deep: var(--brand-900);
  --color-silver:     #C0C0C0;
  --color-stone:      var(--st-100);
  --color-white:      #ffffff;
  --color-text:       var(--sv-900);
  --color-text-muted: var(--sv-600);
  --color-text-light: var(--sv-400);
  --color-border:     var(--sv-200);
  --color-border-dark:var(--sv-300);

  /* 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:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;
  --text-7xl:  4.5rem;
  --text-8xl:  6rem;

  /* Spacing (4px base) */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;
  --sp-32: 8rem;
  --sp-40: 10rem;

  /* Nav height */
  --nav-h: 68px;

  /* Radius */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full: 9999px;

  /* Shadow */
  --shadow-sm:  0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.14);
  --shadow-xl:  0 16px 48px rgba(0,0,0,.18);

  /* Transitions */
  --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
  --ease-in:  cubic-bezier(0.55, 0.055, 0.675, 0.19);
  --dur-fast: 140ms;
  --dur-base: 220ms;
  --dur-slow: 380ms;

  /* Font families — Financial Fort DNA */
  --font-sans:  'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Crimson Pro', Georgia, 'Times New Roman', serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', Consolas, monospace;

  /* Container */
  --container-max: 1200px;
  --container-pad: var(--sp-6);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }

/* ── Container ──────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-serif); }

.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }
.text-2xl  { font-size: var(--text-2xl); }
.text-3xl  { font-size: var(--text-3xl); }
.text-4xl  { font-size: var(--text-4xl); }

.font-medium  { font-weight: 500; }
.font-semibold{ font-weight: 600; }
.font-bold    { font-weight: 700; }
.font-serif   { font-family: var(--font-serif); }

.text-muted { color: var(--color-text-muted); }
.text-light { color: var(--color-text-light); }
.text-brand { color: var(--color-brand); }
.text-white { color: var(--color-white); }

.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.05em; }
.tracking-wider { letter-spacing: 0.1em; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: all var(--dur-base) var(--ease-out);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.btn--primary {
  background: var(--brand-700);
  color: var(--color-white);
  border: 1.5px solid var(--brand-700);
}
.btn--primary:hover {
  background: var(--brand-800);
  border-color: var(--brand-800);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(27,48,34,.35);
}

.btn--primary-inv {
  background: var(--color-white);
  color: var(--brand-700);
  border: 1.5px solid var(--color-white);
}
.btn--primary-inv:hover {
  background: var(--st-100);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,255,255,.25);
}

.btn--ghost {
  background: transparent;
  color: var(--brand-700);
  border: 1.5px solid var(--brand-700);
}
.btn--ghost:hover {
  background: var(--brand-700);
  color: var(--color-white);
}

.btn--ghost-inv {
  background: transparent;
  color: var(--color-white);
  border: 1.5px solid rgba(255,255,255,.6);
}
.btn--ghost-inv:hover {
  background: rgba(255,255,255,.12);
  border-color: var(--color-white);
}

.btn--lg {
  padding: var(--sp-4) var(--sp-8);
  font-size: var(--text-base);
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-sans);
}
.badge--green  { background: var(--brand-100); color: var(--brand-700); }
.badge--silver { background: var(--sv-100); color: var(--sv-700); }
.badge--stone  { background: var(--st-200); color: var(--sv-700); }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  transition: box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* ── Data Table ─────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.data-table thead tr {
  background: var(--brand-700);
  color: var(--brand-100);
}
.data-table th {
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: var(--text-xs);
  text-transform: uppercase;
  font-family: var(--font-sans);
}
.data-table td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  line-height: 1.5;
  font-family: var(--font-sans);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:nth-child(even) { background: var(--st-50); }
.data-table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--color-border); }

/* ── Grid Utilities ─────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-8); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-8); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }

/* ── Section Utilities ──────────────────────────────────────── */
.section { padding-block: var(--sp-24); }
.section--sm { padding-block: var(--sp-16); }
.section--lg { padding-block: var(--sp-32); }

.section__label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-600);
  margin-bottom: var(--sp-3);
  font-family: var(--font-sans);
}
.section__title {
  font-family: var(--font-serif);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-4);
}
.section__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 640px;
  line-height: 1.65;
  font-family: var(--font-sans);
}

/* ── Dividers ───────────────────────────────────────────────── */
.divider {
  width: 48px;
  height: 3px;
  background: var(--brand-700);
  margin-bottom: var(--sp-8);
}

/* ── Fort Overlay (for hero overlays) ───────────────────────── */
.fort-overlay {
  opacity: 0.92;
}

/* ── Glossary Tooltip (gloss-tips) ─────────────────────────── */
.gloss-term {
  border-bottom: 1px dashed var(--brand-400);
  cursor: help;
  position: relative;
}
.gloss-term:hover::after {
  content: attr(data-def);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  max-width: 300px;
  background: var(--brand-800);
  color: rgba(255,255,255,.9);
  font-size: var(--text-xs);
  line-height: 1.55;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-md);
  z-index: 200;
  pointer-events: none;
  font-family: var(--font-sans);
  font-weight: 400;
  white-space: normal;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --container-pad: var(--sp-4); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding-block: var(--sp-16); }
  .section--lg { padding-block: var(--sp-24); }
}

/* ── Utility ────────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
.flex          { display: flex; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }
.mt-4  { margin-top: var(--sp-4); }
.mt-8  { margin-top: var(--sp-8); }
.mb-4  { margin-bottom: var(--sp-4); }
.mb-8  { margin-bottom: var(--sp-8); }
