/* ============================================================
   ACTION LABS ;  base + shared primitives
   Consumes tokens.css. Shared across the shell and all 3 demos.
   Demo components MUST NOT redefine anything in this file.
   ============================================================ */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-feature-settings: "cv02","cv03","cv04","ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font: inherit; }

::selection { background: var(--signal); color: var(--signal-ink); }

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

/* thin instrument scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--line-3); }

/* ---------- typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
  color: var(--fg);
}
/* Söhne retains its native proportions across display and body settings. */
h1, h2 { font-stretch: var(--stretch-display); }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-wide { max-width: var(--container-wide); }
.section { padding-block: var(--section-y); position: relative; }
.section--band { background: var(--bg-1); }

/* ---------- eyebrow / region tag (the mono instrument voice) ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow--act { color: var(--act); }
.eyebrow--see { color: var(--see); }
.eyebrow .conf { color: var(--fg-dim); text-transform: none; letter-spacing: 0.02em; }
.eyebrow .idx { color: var(--fg-dim); }

.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-title { font-size: var(--fs-h2); margin-top: 18px; }
.section-lead { font-size: var(--fs-lead); color: var(--fg-muted); margin-top: 20px; line-height: 1.5; max-width: 62ch; }

/* ---------- the signature: detection frame (4 corner brackets) ---------- */
.detect-frame { --c: var(--act); --len: 15px; --thick: 2px; --inset: 0px; position: relative; }
.detect-frame::after {
  content: ""; position: absolute; inset: var(--inset); pointer-events: none; z-index: 3;
  background:
    linear-gradient(var(--c),var(--c)) top left,    linear-gradient(var(--c),var(--c)) top left,
    linear-gradient(var(--c),var(--c)) top right,    linear-gradient(var(--c),var(--c)) top right,
    linear-gradient(var(--c),var(--c)) bottom left,  linear-gradient(var(--c),var(--c)) bottom left,
    linear-gradient(var(--c),var(--c)) bottom right, linear-gradient(var(--c),var(--c)) bottom right;
  background-repeat: no-repeat;
  background-size:
    var(--len) var(--thick), var(--thick) var(--len),
    var(--len) var(--thick), var(--thick) var(--len),
    var(--len) var(--thick), var(--thick) var(--len),
    var(--len) var(--thick), var(--thick) var(--len);
}
.detect-frame--see { --c: var(--see); }

/* mono chip (source labels, key/value data) */
.chip {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500;
  color: var(--fg-muted); background: var(--bg-3);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 3px 8px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}

/* live pulse dot */
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); position: relative; flex: none; }
.pulse::after { content:""; position:absolute; inset:-4px; border-radius:50%; border:1px solid var(--signal-line); animation: pulse-ring 1.8s var(--ease-out) infinite; }
@keyframes pulse-ring { 0%{ transform: scale(0.6); opacity: 0.9; } 100%{ transform: scale(1.6); opacity: 0; } }

/* ---------- buttons ---------- */
.btn {
  --pad-y: 13px; --pad-x: 22px;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: var(--pad-y) var(--pad-x); border-radius: var(--r-sm); white-space: nowrap;
  border: 1px solid transparent; transition: transform var(--dur-1) var(--ease), background var(--dur-1), border-color var(--dur-1), box-shadow var(--dur-2);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--act); color: var(--act-ink); box-shadow: 0 6px 24px var(--act-glow); }
.btn--primary:hover { box-shadow: 0 10px 40px var(--act-glow); }
.btn--ghost { border-color: var(--line-2); color: var(--fg); }
.btn--ghost:hover { border-color: var(--act); color: var(--act); }
.btn .arrow { transition: transform var(--dur-1) var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* utility */
.mono { font-family: var(--font-mono); }
.tnum { font-variant-numeric: tabular-nums; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); clip-path:inset(50%); white-space:nowrap; border:0; table-layout:fixed; }
