/*
 * Fusion29 Labs design system — tokens and base elements.
 * Graphite surfaces, copper accents, light type, precise geometry.
 * Files are numbered so Propshaft loads them in cascade order.
 */

:root {
  /* Surfaces */
  --bg: #0e1012;
  --bg-raised: #131619;
  --panel: #181c20;
  --panel-2: #1e2328;
  --panel-3: #252b31;
  --line: #2a3037;
  --line-strong: #3a434d;

  /* Text */
  --text: #eceef1;
  --text-muted: #a7afb8;
  --text-dim: #7c858f;

  /* Brand */
  --copper: #cf7b3f;
  --copper-bright: #e8955a;
  --copper-deep: #9b5426;
  --copper-glow: rgba(207, 123, 63, 0.18);
  --steel: #c9d0d7;
  --steel-dim: #8d969f;

  /* Status */
  --success: #62b98e;
  --warning: #e2b450;
  --danger: #e2685d;
  --info: #6aa7d8;

  /* Type */
  --font-display: "Michroma", "Eurostile", "Bahnschrift", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  /* Geometry */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --gutter: clamp(16px, 4vw, 32px);
  --container: 1180px;
  --container-narrow: 760px;
  --header-h: 72px;

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-copper: 0 8px 28px rgba(207, 123, 63, 0.22);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { flex: 1; }

img, svg { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  font-weight: 600;
  color: var(--text);
  text-wrap: balance;
}

h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.01em; }
h1 { font-size: clamp(1.9rem, 4.6vw, 3.3rem); line-height: 1.15; }
h2 { font-size: clamp(1.45rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.005em; }
h4 { font-size: 1rem; }

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--copper-bright);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s var(--ease);
}
a:hover { color: #f5ad77; }

strong { font-weight: 600; color: var(--text); }
small { font-size: 0.875rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

ul, ol { padding-left: 1.25rem; margin: 0 0 1em; }
li + li { margin-top: 0.35em; }

code, kbd { font-family: var(--font-mono); font-size: 0.9em; }

::selection { background: var(--copper); color: #fff; }

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

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

.skip-link {
  position: absolute;
  left: 16px; top: -48px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--copper);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

/* Layout primitives */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(var(--container-narrow) + 2 * var(--gutter)); }

.section { padding-block: clamp(56px, 9vw, 112px); position: relative; }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.section--raised { background: var(--bg-raised); border-block: 1px solid var(--line); }

.stack > * + * { margin-top: var(--stack-gap, 1rem); }

.grid { display: grid; gap: var(--grid-gap, 24px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

.split {
  display: grid;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1.05fr 0.95fr; }
  .split--reverse > :first-child { order: 2; }
}

.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-copper { color: var(--copper-bright); }
.text-center { text-align: center; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--text-muted); line-height: 1.6; }
.measure { max-width: 62ch; }
.center-block { margin-inline: auto; }
