/* ============================================================
   SOVRAN COMMODITIES — Foundations
   Monochromatic. Institutional. Restrained.
   ============================================================ */

/* ---------- Webfonts (Geist + Geist Mono, self-hosted) ---------- */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/geist-variable.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/geist-mono-variable.woff2") format("woff2");
}

/* ---------- Fraunces (self-hosted, OFL) — display serif ----------
   Variable: opsz 9..144, wght 300..600. Latin + Latin-ext only. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("assets/fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("assets/fonts/fraunces-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0307, U+030A, U+030C, U+0311, U+0313, U+031B, U+0323, U+0327-0328, U+032D-032E, U+0330-0331, U+0335-0336, U+0339, U+033C, U+0342, U+0345, U+0394, U+03A9, U+03BC, U+03C0, U+1E00-1EFF, U+2000-20B8, U+20BA-20BF, U+20C1-20CF, U+20D1-20FF, U+2113, U+2116-2117, U+211E-2123, U+2126-212F, U+2132-214E, U+2153-218F, U+2190-21FF, U+2201-22FF, U+2302-23FF, U+2423, U+27C2, U+27E6-27F5, U+2980-29FF, U+2C60-2C7F, U+2E00-2E7F, U+A700-A7FF, U+A830-A8FF, U+AB30-AB6F, U+FE20-FE2F, U+FEFF, U+FFFD, U+1F130-1F16F, U+1F1E6-1F1FF;
}

:root {
  /* ---------- Color — monochrome only ---------- */
  --bg-absolute: #0A0A0B;        /* near-black; never pure #000 */
  --bg-elevated: #111113;
  --bg-surface:  #18181B;
  --border-subtle: #27272A;
  --border-strong: #3F3F46;

  --text-primary:   #FAFAFA;     /* never pure white */
  --text-secondary: #A1A1AA;
  --text-tertiary:  #52525B;

  --accent-glow: rgba(250, 250, 250, 0.08);  /* subtle white halo */
  --accent-glow-strong: rgba(250, 250, 250, 0.14);

  /* ---------- Type families ---------- */
  --font-display: "Fraunces", "Georgia", "Times New Roman", serif;
  --font-body:    "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono:    "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* ---------- Type scale (display-first) ---------- */
  --text-display-1: clamp(56px, 9vw, 160px);  /* hero, big numbers */
  --text-display-2: clamp(44px, 6vw, 96px);   /* section titles */
  --text-display-3: clamp(32px, 4vw, 64px);   /* sub titles */
  --text-headline:  clamp(24px, 2.2vw, 36px);
  --text-title:     20px;
  --text-body:      16px;
  --text-small:     14px;
  --text-micro:     12px;

  /* ---------- Letter-spacing ---------- */
  --tracking-display: -0.015em;  /* display serif — gentle tightening only */
  --tracking-headline: -0.02em;
  --tracking-body: 0em;
  --tracking-mono: 0em;
  --tracking-label: 0.12em;      /* mono corner labels, eyebrow */
  --tracking-wordmark: 0.18em;   /* SOVRAN wordmark spacing — tight enough to feel solid */

  /* ---------- Line-height ---------- */
  --leading-display: 0.95;
  --leading-tight: 1.15;
  --leading-body: 1.6;
  --leading-mono: 1.5;

  /* ---------- Weights ---------- */
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;   /* display weight */
  --weight-semibold: 600;

  /* ---------- Spacing — 8px grid ---------- */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 80px;
  --space-9: 96px;
  --space-10: 128px;
  --space-11: 160px;
  --space-12: 192px;

  /* ---------- Radii — sharp or barely-rounded ---------- */
  --radius-none: 0px;
  --radius-xs: 2px;        /* maximum for buttons */
  --radius-sm: 4px;        /* cards, inputs — use sparingly */

  /* ---------- Borders ---------- */
  --border-width: 1px;
  --border-hair: 0.5px;

  /* ---------- Shadows (essentially unused — institutional tone) ---------- */
  --shadow-none: none;
  --shadow-glow-sm: 0 0 0 1px var(--accent-glow);
  --shadow-glow-md: 0 0 24px var(--accent-glow);
  --shadow-elev:   0 1px 0 0 var(--border-subtle);

  /* ---------- Motion ---------- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);   /* ease-out only */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 200ms;
  --duration-medium: 400ms;
  --duration-slow: 600ms;
  --duration-stroke: 1200ms;   /* logo stroke-draw */

  /* ---------- Layout ---------- */
  --container-max: 1440px;
  --gutter: clamp(24px, 4vw, 64px);
}

/* ============================================================
   Semantic element styles
   ============================================================ */

html, body {
  background: var(--bg-absolute);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Display / headlines */
.display-1, h1.display {
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  font-size: var(--text-display-1);
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-display);
  color: var(--text-primary);
}

.display-2, h2 {
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  font-size: var(--text-display-2);
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-display);
  color: var(--text-primary);
}

.display-3, h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  font-size: var(--text-display-3);
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-display);
  color: var(--text-primary);
}

.headline, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  font-size: var(--text-headline);
  letter-spacing: var(--tracking-headline);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

/* Body */
p, .body {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--text-secondary);
  max-width: 62ch;
  text-wrap: pretty;
}

p.lede, .lede {
  font-size: var(--text-headline);
  line-height: 1.35;
  color: var(--text-secondary);
  max-width: 44ch;
}

small, .small {
  font-size: var(--text-small);
  color: var(--text-secondary);
}

/* Mono — used aggressively for any numeric data */
.mono, code, kbd {
  font-family: var(--font-mono);
  font-weight: var(--weight-regular);
  line-height: var(--leading-mono);
}

.mono-label {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.mono-data {
  font-family: var(--font-mono);
  font-size: var(--text-body);
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.mono-display {
  font-family: var(--font-mono);
  font-weight: var(--weight-regular);
  font-size: var(--text-display-1);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* Wordmark — for SOVRAN logotype usage */
.wordmark {
  font-family: var(--font-display);
  font-weight: var(--weight-light);
  letter-spacing: var(--tracking-wordmark);
  text-transform: uppercase;
  color: var(--text-primary);
}

/* Links — opacity shift, never color change */
a {
  color: inherit;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity var(--duration-fast) var(--ease-out);
}
a:hover { opacity: 1; }

/* Utility */
hr, .rule {
  border: 0;
  border-top: 1px solid var(--border-subtle);
}

::selection {
  background: var(--text-primary);
  color: var(--bg-absolute);
}
