/* ============================================================
   Hawk Platform — Base Styles
   Resets, typography defaults, layout primitives
   ============================================================ */

/* ── Reset / Normalize ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: var(--text-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-ink);
  background-color: var(--color-parchment);
  line-height: var(--lh-body);
  min-height: 100vh;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--color-ink);
  line-height: var(--lh-tight);
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-base); font-weight: 600; font-family: var(--font-body); }

p { margin-top: var(--space-2); }
p + p { margin-top: var(--space-3); }

a {
  color: var(--color-brand-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--color-ink); }

small { font-size: var(--text-sm); }

figure { margin: 0; }

/* ── Figure caption / metadata ── */
figcaption, .text-meta {
  font-size: var(--text-xs);
  color: var(--color-slate);
  line-height: var(--lh-data);
}

/* ── Tabular numerals for financial data ── */
.data-mono {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ── App layout shell ── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  flex-shrink: 0;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  z-index: 100;
}

.content-area {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  position: relative;
}

.header {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--header-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  z-index: 99;
}

.page-body {
  margin-top: var(--header-height);
  padding: var(--space-6) var(--content-margin);
  max-width: var(--content-max);
}

/* ── Full-width variant for dense tables ── */
.page-body--wide {
  max-width: none;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

/* ── Grid ── */
.grid {
  display: grid;
  gap: var(--space-5);
}

.grid--2 { grid-template-columns: 1fr 1fr; }
.grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--12 { grid-template-columns: repeat(12, 1fr); }

/*.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }*/

/* ── Utility ── */
.text-xs { font-size: var(--text-xs) !important; }
.text-sm { font-size: var(--text-sm) !important; }
.text-lg { font-size: var(--text-lg) !important; }

.text-slate { color: var(--color-slate); }
.text-ink { color: var(--color-ink); }
.text-bronze { color: var(--color-bronze); }
.text-positive { color: var(--color-positive); }
.text-negative { color: var(--color-negative); }
.text-brand { color: var(--color-brand-blue); }

.text-right { text-align: right; }
.text-center { text-align: center; }

.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }

.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

.flex-1 { flex: 1; }

.hidden { display: none !important; }

/* ── Page title block ── */
.page-title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-2);
}

.page-subtitle {
  color: var(--color-slate);
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
}

/* ── Section header ── */
.section-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}

.section-title-sm {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}

/* ── Divider ── */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-5) 0;
}

/* Scrollbar subtle styling */
.content-area::-webkit-scrollbar { width: 6px; }
.content-area::-webkit-scrollbar-track { background: transparent; }
.content-area::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }
