/* Oil AI — "Precision Instrument" design system.
   One shared token layer for the dark app and the light marketing/report pages.
   Domain-rooted: subsurface slate + a single brass-gauge accent. No AI-slop. */

/* ---- DARK (app: terminal / map / 3d) is the default ---- */
:root {
  --bg: #0b0e13;
  --surface: #12161d;
  --surface-2: #181d26;
  --raise: #1e242f;
  --line: rgba(255,255,255,.08);
  --line-2: rgba(255,255,255,.14);
  --text: #eef1f5;
  --text-2: #a3acba;
  --text-3: #6b7585;
  --accent: #d99a4e;          /* brass gauge */
  --accent-2: #c2853a;
  --accent-ink: #1a1206;      /* text on accent */
  --accent-soft: rgba(217,154,78,.13);
  --pos: #46c08a;
  --neg: #e5605a;
  --warn: #e8b04a;
  --info: #7ba6dd;
  --shadow-1: 0 1px 2px rgba(0,0,0,.35);
  --shadow-2: 0 10px 34px rgba(0,0,0,.34);
  --ring: 0 0 0 2px var(--bg), 0 0 0 4px rgba(217,154,78,.55);

  --r-xs: 6px; --r-sm: 8px; --r-md: 10px; --r-lg: 14px; --r-pill: 999px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --ease: cubic-bezier(.2,.6,.2,1);
  --t-fast: 120ms; --t: 180ms; --t-slow: 280ms;
  /* Motion grammar: quick feedback, deliberate state changes, cinematic reveals. */
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-in-out: cubic-bezier(.65,0,.35,1);
  --motion-fast: 160ms;
  --motion-base: 380ms;
  --motion-slow: 760ms;

  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ---- LIGHT (marketing / report) ---- */
.theme-light {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-2: #f5f2ec;
  --raise: #ffffff;
  --line: rgba(20,25,33,.10);
  --line-2: rgba(20,25,33,.18);
  --text: #15191f;
  --text-2: #4a5360;
  --text-3: #7a8492;
  --accent: #a9742c;
  --accent-2: #8c5f22;
  --accent-ink: #ffffff;
  --accent-soft: rgba(169,116,44,.10);
  --pos: #1f9e6e;
  --neg: #c8483f;
  --shadow-1: 0 1px 2px rgba(20,25,33,.06);
  --shadow-2: 0 14px 40px rgba(20,25,33,.10);
  --ring: 0 0 0 2px var(--bg), 0 0 0 4px rgba(169,116,44,.45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 82px; }
body { margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 15px; line-height: 1.6;
  font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
::selection { background: var(--accent-soft); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* type primitives */
.display { font-family: var(--font-display); font-weight: 700; font-size: clamp(40px, 6vw, 60px); line-height: 1.04; letter-spacing: -.02em; }
.h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 4vw, 36px); line-height: 1.12; letter-spacing: -.018em; }
.h2 { font-family: var(--font-display); font-weight: 600; font-size: 23px; line-height: 1.2; letter-spacing: -.01em; }
.h3 { font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1.3; }
.lead { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; color: var(--text-2); }
.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1, "zero" 1; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--text-2); } .faint { color: var(--text-3); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-sans); font-weight: 600; font-size: 14px;
  padding: 11px 18px; border-radius: var(--r-sm); border: 1px solid transparent; cursor: pointer;
  transition: transform var(--t-fast) var(--ease), background var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--text); }
.btn-lg { padding: 13px 22px; font-size: 15px; }

/* line-icon system (1.5px stroke, currentColor) */
.ico { width: 18px; height: 18px; display: inline-block; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; flex: 0 0 auto; }

/* utility */
.wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11.5px;
  padding: 4px 10px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--text-2); background: var(--surface); }
.hairline { height: 1px; background: var(--line); border: 0; }
[hidden] { display: none !important; }

/* Scroll reveals remain progressive enhancement: content is only hidden after
   the head script has confirmed JavaScript is available. Direction and delay
   are opt-in so the same primitive stays useful on report pages. */
html.js .reveal {
  --reveal-x: 0px;
  --reveal-y: 22px;
  --reveal-scale: 1;
  opacity: 0;
  filter: blur(3px);
  transform: translate3d(var(--reveal-x), var(--reveal-y), 0) scale(var(--reveal-scale));
  transition: opacity var(--motion-slow) var(--ease-out),
    transform var(--motion-slow) var(--ease-out),
    filter var(--motion-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
html.js .reveal[data-reveal="left"] { --reveal-x: -28px; --reveal-y: 0px; }
html.js .reveal[data-reveal="right"] { --reveal-x: 28px; --reveal-y: 0px; }
html.js .reveal[data-reveal="scale"] { --reveal-y: 12px; --reveal-scale: .965; }
html.js .reveal.in { opacity: 1; filter: none; transform: translate3d(0,0,0) scale(1); }

@media (max-width: 760px) {
  html.js .reveal { filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; filter: none; transform: none; transition: none; }
}

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-3) 45%, transparent); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
