/* ============================================================
   BORN BETWEEN 2 GENERALS · INTELLIGENCE LAB — design tokens
   Art direction: darkened operations room. Deep graphite blacks,
   brushed steel structure, one commanding amber (general's gold)
   and one cold cyan (the lab / the data). Nothing decorative.
   ============================================================ */

:root {
  /* ---- surfaces ---- */
  --ink:        #06080B;
  --surface:    #0B0F14;
  --surface-2:  #11171E;
  --surface-3:  #172029;
  --line:       #202A35;
  --line-soft:  #18212B;

  /* ---- text ---- */
  --paper:      #E9EEF4;
  --paper-dim:  #B7C2CE;
  --steel:      #7C8A99;
  --steel-dim:  #55616E;

  /* ---- accents ---- */
  --amber:      #E8A33D;
  --amber-hot:  #FFC66E;
  --amber-deep: #8A5F1B;
  --cyan:       #4FD3D9;
  --cyan-deep:  #1C5E62;
  --alert:      #E5533D;
  --ok:         #58C98A;
  --violet:     #9A8CFF;

  /* ---- type ---- */
  --font-display: 'Cabinet Grotesk', 'Satoshi', system-ui, sans-serif;
  --font-body:    'Satoshi', 'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.5rem;
  --text-2xl:  2.125rem;
  --text-3xl:  3rem;
  --text-hero: clamp(2.6rem, 7vw, 5.75rem);

  /* ---- space ---- */
  --s1: 0.25rem; --s2: 0.5rem;  --s3: 0.75rem; --s4: 1rem;
  --s5: 1.5rem; --s6: 2rem;     --s7: 3rem;    --s8: 4rem;
  --s9: 6rem;   --s10: 8rem;

  /* ---- structure ---- */
  --radius:    4px;
  --radius-lg: 8px;
  --maxw:      1240px;
  --maxw-prose: 68ch;

  /* ---- effects ---- */
  --glow-amber: 0 0 0 1px rgba(232,163,61,.35), 0 0 28px -6px rgba(232,163,61,.45);
  --glow-cyan:  0 0 0 1px rgba(79,211,217,.30), 0 0 28px -6px rgba(79,211,217,.40);
  --shadow:     0 24px 60px -24px rgba(0,0,0,.85);
  --ease:       cubic-bezier(.22,.61,.36,1);
  --ease-out:   cubic-bezier(.16,1,.3,1);

  /* hairline grid used across the whole product */
  --grid: linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px) 0 0/100% 44px,
          linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px) 0 0/44px 100%;
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
::selection { background: rgba(232,163,61,.3); }

/* ---- typography primitives ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-family: var(--font-body); font-weight: 700; font-size: var(--text-lg); letter-spacing: 0; }
p  { text-wrap: pretty; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--amber);
}
.eyebrow--cyan { color: var(--cyan); }
.eyebrow--steel { color: var(--steel); }

.lede { font-size: var(--text-lg); color: var(--paper-dim); max-width: var(--maxw-prose); }
.mono { font-family: var(--font-mono); }
.dim  { color: var(--steel); }

/* ---- layout primitives ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--s5); }
.section { padding-block: var(--s9); position: relative; }
.rule { height: 1px; background: var(--line); border: 0; }

/* stencilled section marker: "01 / PROVING GROUND" */
.marker { display: flex; align-items: baseline; gap: var(--s4); margin-bottom: var(--s6); }
.marker__num {
  font-family: var(--font-mono); font-size: var(--text-xs); color: var(--amber);
  letter-spacing: .2em; padding-top: .35em;
}
.marker__line { flex: 1; height: 1px; background: var(--line); }

/* ---- buttons ---- */
.btn {
  --btn-bg: transparent; --btn-fg: var(--paper); --btn-bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: .85em 1.5em; border: 1px solid var(--btn-bd); border-radius: var(--radius);
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: .16em; text-transform: uppercase; cursor: pointer;
  transition: background .25s var(--ease), border-color .25s var(--ease),
              color .25s var(--ease), transform .25s var(--ease), box-shadow .3s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { --btn-bg: var(--amber); --btn-fg: #14100A; --btn-bd: var(--amber); font-weight: 700; }
.btn--primary:hover { --btn-bg: var(--amber-hot); --btn-bd: var(--amber-hot); box-shadow: var(--glow-amber); }
.btn--ghost:hover { --btn-bd: var(--amber); --btn-fg: var(--amber-hot); background: rgba(232,163,61,.07); }
.btn--cyan { --btn-bd: var(--cyan-deep); --btn-fg: var(--cyan); }
.btn--cyan:hover { --btn-bd: var(--cyan); background: rgba(79,211,217,.08); box-shadow: var(--glow-cyan); }
.btn[disabled] { opacity: .38; pointer-events: none; }
.btn--sm { padding: .6em 1.05em; }
.btn--block { width: 100%; }

/* ---- panels ---- */
.panel {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  position: relative;
}
.panel--pad { padding: var(--s6); }
/* corner ticks — the "instrument housing" motif */
.panel--ticked::before, .panel--ticked::after {
  content: ''; position: absolute; width: 10px; height: 10px; pointer-events: none;
  border-color: var(--amber-deep); border-style: solid;
}
.panel--ticked::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.panel--ticked::after  { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.tag {
  display: inline-flex; align-items: center; gap: .4em;
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .12em;
  text-transform: uppercase; padding: .3em .65em; border-radius: 3px;
  border: 1px solid var(--line); color: var(--steel);
}
.tag--amber { color: var(--amber); border-color: var(--amber-deep); background: rgba(232,163,61,.08); }
.tag--cyan  { color: var(--cyan);  border-color: var(--cyan-deep);  background: rgba(79,211,217,.08); }
.tag--ok    { color: var(--ok);    border-color: #235B3C; background: rgba(88,201,138,.08); }
.tag--alert { color: var(--alert); border-color: #6B2A20; background: rgba(229,83,61,.08); }

/* ---- full-bleed motion layer ---- */
.bleed { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.bleed video, .bleed img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .5; filter: saturate(.85) contrast(1.05);
}
.bleed::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, transparent 0%, rgba(6,8,11,.55) 55%, var(--ink) 100%),
    linear-gradient(180deg, rgba(6,8,11,.45) 0%, rgba(6,8,11,.15) 40%, var(--ink) 100%);
}
.bleed--scan::before {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply; opacity: .5;
}
/* slow ken-burns drift on top of the clip's own motion */
@keyframes bleedDrift {
  0%   { transform: scale(1.06) translate3d(0, 0, 0); }
  50%  { transform: scale(1.13) translate3d(-1.4%, -1.1%, 0); }
  100% { transform: scale(1.06) translate3d(0, 0, 0); }
}
.bleed--drift video, .bleed--drift img {
  animation: bleedDrift 34s var(--ease, ease-in-out) infinite;
  will-change: transform;
}
/* section headers sit closer to the type, so damp the footage a little */
.subhero .bleed video, .subhero .bleed img { opacity: .38; }
.subhero .bleed::after {
  background:
    radial-gradient(115% 100% at 22% 0%, transparent 0%, rgba(6,8,11,.62) 58%, var(--ink) 100%),
    linear-gradient(180deg, rgba(6,8,11,.52) 0%, rgba(6,8,11,.30) 45%, var(--ink) 100%);
}

/* ---- reveal on scroll ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .bleed--drift video, .bleed--drift img { animation: none; transform: scale(1.04); }
}
