/* OptiDetect by OptiCore - shared design tokens & primitives ("Desk Gear" style). */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-wght.woff2") format("woff2-variations"), url("../fonts/manrope-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-ext-wght.woff2") format("woff2-variations"), url("../fonts/manrope-latin-ext-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;
  --bg: #000000;
  --bg-deep: #000000;
  --panel: #0d0d10;
  --panel-2: #111216;
  --panel-3: #141519;
  --border: #1a1b20;
  --border-2: #24262c;
  --border-3: #2c2e35;
  --text: #eceef2;
  --text-2: #b8bdc7;
  --text-3: #9aa1ae;
  --text-4: #626873;
  --accent: #7c5cff;
  --accent-2: #6a48f0;
  --accent-ink: #ffffff;
  --accent-soft: rgba(124, 92, 255, .14);
  --green: #3ddc84;
  --green-soft: rgba(61, 220, 132, .12);
  --blue: #6aa8ff;
  --blue-soft: rgba(106, 168, 255, .12);
  --sev-info: #8a8a93;
  --sev-low: #4fa3ff;
  --sev-medium: #ffa726;
  --sev-high: #ff6b3d;
  --sev-critical: #ff2d55;
  --sev-info-soft: rgba(138, 138, 147, .14);
  --sev-low-soft: rgba(79, 163, 255, .13);
  --sev-medium-soft: rgba(255, 167, 38, .14);
  --sev-high-soft: rgba(255, 107, 61, .15);
  --sev-critical-soft: rgba(255, 45, 85, .16);
  --r-xs: 8px;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --font: "Manrope", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", ui-monospace, Consolas, "Liberation Mono", monospace;
  /* Desk Gear card: soft top-to-bottom gradient, hairline border, deep soft shadow, faint top highlight. */
  --card: linear-gradient(180deg, #0f1013, #0b0b0d);
  --card-shadow: 0 24px 48px -24px #000, 0 2px 6px #000, inset 0 1px 0 rgba(255, 255, 255, .03);
  --stage: radial-gradient(900px 520px at 50% 58%, #15161b 0%, #07070a 55%, #000 80%);
  --keycap: var(--card);
  --keycap-shadow: var(--card-shadow);
  --keycap-raised: linear-gradient(180deg, #141519, #111216);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 500 14px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: .92em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
img, svg { display: block; }
button { font: inherit; color: inherit; }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: #2a2a30 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #232328; border-radius: 10px; border: 2px solid var(--bg); }

/* ---------------- primitives ---------------- */
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.display { font-size: clamp(30px, 5vw, 42px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.muted { color: var(--text-3); }
.dim { color: var(--text-4); }

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--card-shadow);
}
.keycap {
  background: var(--keycap);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  box-shadow: var(--keycap-shadow);
}

.btn {
  --h: 38px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 16px; border-radius: 12px;
  font-weight: 700; font-size: 13.5px; letter-spacing: -.005em; white-space: nowrap;
  border: 1px solid var(--border-2); background: var(--keycap); color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 1px 0 rgba(0, 0, 0, .5);
  cursor: pointer; text-decoration: none !important;
  transition: transform .12s var(--ease), border-color .15s, background .15s, color .15s;
}
.btn:hover { border-color: var(--border-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 20px rgba(124, 92, 255, .18); }
.btn.primary:hover { background: #9580ff; border-color: #9580ff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 26px rgba(124, 92, 255, .38); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn.danger { color: var(--sev-critical); background: transparent; border-color: rgba(255, 77, 94, .35); box-shadow: none; }
.btn.danger:hover { background: var(--sev-critical-soft); }
.btn.sm { --h: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.btn.lg { --h: 50px; padding: 0 24px; font-size: 15px; border-radius: 14px; }
.btn.icon { width: var(--h); padding: 0; }
.btn svg { width: 16px; height: 16px; flex: none; }

.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px;
  border-radius: 999px; background: var(--panel); border: 1px solid var(--border);
  font-size: 12.5px; white-space: nowrap;
}
.chip .k { color: var(--text-3); font-weight: 600; }
.chip .v { font-weight: 800; color: var(--text); }
.chip.accent .v { color: var(--accent); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap; letter-spacing: .01em;
  background: var(--panel-3); color: var(--text-2); border: 1px solid transparent;
}
.badge .dot, .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.badge.outline { background: transparent; border-color: var(--border-2); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.green, .badge.ok { background: var(--green-soft); color: var(--green); }
.badge.blue, .badge.info { background: var(--sev-info-soft); color: var(--sev-info); }
.badge.low { background: var(--sev-low-soft); color: var(--sev-low); }
.badge.medium { background: var(--sev-medium-soft); color: var(--sev-medium); }
.badge.high { background: var(--sev-high-soft); color: var(--sev-high); }
.badge.critical { background: var(--sev-critical-soft); color: var(--sev-critical); }
.badge.solid-accent { background: var(--accent); color: var(--accent-ink); }

input, select, textarea {
  font: inherit; font-weight: 600; color: var(--text);
  background: #0c0c0e; border: 1px solid var(--border-2); border-radius: 12px;
  height: 42px; padding: 0 14px; min-width: 0; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input::placeholder, textarea::placeholder { color: var(--text-4); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
label.field { display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 700; color: var(--text-3); letter-spacing: .02em; }

/* segmented tabs */
.segmented {
  display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px;
  background: #0c0c0e; border: 1px solid var(--border); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5);
  max-width: 100%; overflow-x: auto;
}
.segmented button, .segmented a {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 16px; border-radius: 999px;
  border: 0; background: transparent; color: var(--text-3); font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap;
  text-decoration: none !important; transition: background .2s var(--ease), color .2s;
}
.segmented button:hover, .segmented a:hover { color: var(--text); }
.segmented .active, .segmented [aria-selected="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 14px rgba(124, 92, 255, .25); }
.segmented svg { width: 15px; height: 15px; }

/* radar mark animation (used on landing hero + login + empty states) */
.radar { position: relative; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at center, rgba(124, 92, 255, .08) 0, transparent 62%), #08080a;
  border: 1px solid var(--border-2); box-shadow: inset 0 0 60px rgba(0, 0, 0, .8), 0 0 0 10px rgba(255, 255, 255, .015); }
.radar::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: repeating-radial-gradient(circle at center, transparent 0 calc(12.5% - 1px), rgba(124, 92, 255, .13) calc(12.5% - 1px) 12.5%); }
.radar::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent calc(50% - .5px), rgba(124, 92, 255, .1) calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px)),
              linear-gradient(0deg, transparent calc(50% - .5px), rgba(124, 92, 255, .1) calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px)); }
.radar .sweep { position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(124, 92, 255, 0) 0deg, rgba(124, 92, 255, 0) 290deg, rgba(124, 92, 255, .05) 320deg, rgba(124, 92, 255, .45) 359deg, rgba(124, 92, 255, 0) 360deg);
  animation: radar-spin 4s linear infinite; z-index: 1; }
.radar .blip { position: absolute; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--accent); z-index: 2;
  box-shadow: 0 0 12px var(--accent); animation: radar-blip 4s ease-out infinite; opacity: 0; }
.radar .blip.red { background: var(--sev-critical); box-shadow: 0 0 12px var(--sev-critical); }
.radar .core { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: var(--accent); z-index: 3; box-shadow: 0 0 0 6px rgba(124, 92, 255, .15); }
@keyframes radar-spin { to { transform: rotate(360deg); } }
@keyframes radar-blip { 0% { opacity: 0; transform: scale(.4); } 6% { opacity: 1; transform: scale(1.3); } 40% { opacity: .5; transform: scale(1); } 100% { opacity: 0; } }

@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }

.skeleton { border-radius: 10px; background: linear-gradient(90deg, #141417 0, #1d1d22 40%, #141417 80%); background-size: 800px 100%; animation: shimmer 1.3s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .radar .sweep { animation: none; background: conic-gradient(from 300deg, rgba(124, 92, 255, 0) 0deg, rgba(124, 92, 255, .35) 59deg, rgba(124, 92, 255, 0) 60deg); }
  .radar .blip { opacity: .8; animation: none; }
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
