/* Scope Screener design tokens + shared primitives (landing and app) */

:root {
  --bg: #05060a;
  --bg-1: #090b11;
  --surface: #0c0f16;
  --surface-2: #11151e;
  --surface-3: #171c27;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #f3f5f9;
  --text-2: #c3c9d6;
  --muted: #8a92a3;
  --faint: #596073;

  --accent: #6bf2c6;
  --accent-2: #3fd6a6;
  --accent-ink: #03231a;
  --accent-glow: rgba(107, 242, 198, 0.22);

  --low: #6bf2c6;
  --medium: #f5c66b;
  --high: #ff9f6b;
  --critical: #ff6b7a;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: rgba(107, 242, 198, 0.28); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #1a2030; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

.mono { font-family: var(--mono); }
.container { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; letter-spacing: -0.005em; cursor: pointer; white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.3s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(180deg, #86f7d3, var(--accent) 55%, var(--accent-2));
  color: var(--accent-ink);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset, 0 8px 30px -8px var(--accent-glow), 0 1px 0 rgba(255,255,255,.4) inset;
}
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35) inset, 0 12px 44px -6px rgba(107, 242, 198, 0.45); transform: translateY(-1px); }
.btn-ghost { background: rgba(255, 255, 255, 0.03); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.2); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 13.5px; }
.btn:disabled { opacity: 0.55; cursor: wait; transform: none; }

/* Pills / badges / kbd */
.pill {
  display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  border: 1px solid currentColor; background: color-mix(in srgb, currentColor 10%, transparent);
}
.pill.low { color: var(--low); } .pill.medium { color: var(--medium); }
.pill.high { color: var(--high); } .pill.critical { color: var(--critical); }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-2); font-size: 13px; color: var(--text-2);
}
.badge .tag { background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 999px; letter-spacing: .03em; }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent-glow); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(107, 242, 198, 0); } 100% { box-shadow: 0 0 0 0 rgba(107, 242, 198, 0); } }
kbd {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted); padding: 2px 7px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-2); border-bottom-width: 2px;
}

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; letter-spacing: -0.02em; }
.brand-mark { height: 26px; width: auto; filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.22)); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 100;
  background: var(--surface-3); border: 1px solid var(--line-2); padding: 10px 18px; border-radius: 999px; font-size: 14px;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.6); transition: opacity 0.25s, transform 0.35s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Gauge (shared) */
.gauge { position: relative; width: var(--size); height: var(--size); flex: none; --gc: var(--accent); }
.gauge svg { overflow: visible; }
.g-track { stroke: rgba(255, 255, 255, 0.07); }
.g-fill { transition: stroke-dasharray 1.2s var(--ease), stroke 0.4s; filter: drop-shadow(0 0 9px var(--gc)); }
.g-tick { stroke: rgba(255, 255, 255, 0.14); stroke-width: 1; }
.g-tick.major { stroke: rgba(255, 255, 255, 0.28); stroke-width: 1.5; }
.g-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.g-num { font-size: calc(var(--size) * 0.27); font-weight: 650; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.g-cap { margin-top: 6px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

/* ---- Polish layer ---- */

/* Film grain over everything, very subtle */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Rotating light beam along a border */
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.beam { position: relative; }
.beam::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none; z-index: 2;
  background: conic-gradient(from var(--angle), transparent 0 62%, var(--beam, var(--accent)) 86%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: beam 7s linear infinite;
}
@keyframes beam { to { --angle: 360deg; } }

/* Shine sweep on primary buttons */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent); transition: left 0.7s var(--ease);
}
.btn-primary:hover::after { left: 130%; }

/* Gauge: glow, inner dotted ring, glowing end dot */
.gauge::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--gc) 16%, transparent), transparent 75%); pointer-events: none; }
.g-inner { stroke: rgba(255, 255, 255, 0.05); stroke-width: 1; stroke-dasharray: 2 5; }
.g-dot { transform-origin: 100px 100px; transform: rotate(135deg); transition: transform 1.2s var(--ease), opacity 0.3s; }
.g-halo { fill: color-mix(in srgb, var(--gc) 35%, transparent); }
.g-core { fill: #fff; filter: drop-shadow(0 0 6px var(--gc)); }

/* Social icon button (X) */
.social-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--text-2); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-2); transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s var(--ease); }
.social-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.3); transform: translateY(-2px); }
.social-btn svg { width: 16px; height: 16px; fill: currentColor; }
