/* =========================================================
   Polaris — shared design system
   Dark analytics-brand theme: navy/indigo base, blue→violet
   accent gradient (matches product logo), amber for "found
   issues", glassmorphism surfaces, monospace for data.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root{
  --bg: #05060c;
  --bg-1: #080a14;
  --bg-2: #0c0f1c;
  --surface: rgba(255,255,255,0.045);
  --surface-hover: rgba(255,255,255,0.075);
  --border: rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.16);

  --text: #f3f4f8;
  --text-dim: #a3a9bd;
  --text-faint: #676e85;

  --blue: #5b8cff;
  --blue-2: #4169e1;
  --violet: #9061f9;
  --violet-2: #7c3aed;
  --amber: #f5a524;
  --green: #34d399;
  --red: #f2545b;

  --grad: linear-gradient(135deg, var(--blue) 0%, var(--violet) 100%);
  --grad-soft: linear-gradient(135deg, rgba(91,140,255,0.16) 0%, rgba(144,97,249,0.16) 100%);
  --grad-text: linear-gradient(90deg, #8fb4ff 0%, #c3a5ff 100%);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1180px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow-glow: 0 20px 60px rgba(79,105,225,0.18);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4,p{ margin:0; }
button{ font-family: inherit; cursor:pointer; }
::selection{ background: rgba(91,140,255,0.35); color:#fff; }

.container{ max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow{ max-width: 820px; margin: 0 auto; padding: 0 24px; }

section{ position: relative; padding: 112px 0; }
section.tight{ padding: 80px 0; }
@media (max-width: 780px){
  section{ padding: 72px 0; }
  section.tight{ padding: 56px 0; }
}

/* ---------- background texture ---------- */
.bg-grid{
  position: fixed; inset:0; z-index:-2; pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 0%, transparent 75%);
}
.glow-orb{ position: fixed; border-radius:50%; pointer-events:none; z-index:-1; filter: blur(110px); }
.glow-orb.blue{ width:640px; height:640px; background: radial-gradient(circle, rgba(91,140,255,0.24) 0%, transparent 70%); top:-220px; right:-160px; }
.glow-orb.violet{ width:560px; height:560px; background: radial-gradient(circle, rgba(144,97,249,0.20) 0%, transparent 70%); bottom:-200px; left:-180px; }

/* ---------- type ---------- */
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-family: var(--font-mono); font-size:12.5px; font-weight:600;
  letter-spacing:.06em; text-transform:uppercase; color: var(--blue);
  background: rgba(91,140,255,0.1); border:1px solid rgba(91,140,255,0.28);
  padding:6px 14px; border-radius:999px;
}
.eyebrow::before{ content:''; width:6px; height:6px; border-radius:50%; background: var(--grad); }

h1{ font-size: clamp(2.6rem, 5.2vw, 4.4rem); font-weight:800; letter-spacing:-0.02em; line-height:1.06; }
h2.section-title{ font-size: clamp(1.9rem, 3.4vw, 2.75rem); font-weight:800; letter-spacing:-0.02em; line-height:1.12; }
h3{ font-size:1.3rem; font-weight:700; letter-spacing:-0.01em; }
.grad-text{ background: var(--grad-text); -webkit-background-clip:text; background-clip:text; color:transparent; }
.lede{ font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--text-dim); line-height:1.6; max-width: 640px; }
.section-head{ max-width: 680px; margin-bottom: 56px; }
.section-head .eyebrow{ margin-bottom:18px; }
.section-head h2{ margin-bottom:16px; }
.mono{ font-family: var(--font-mono); }
.text-dim{ color: var(--text-dim); }
.text-faint{ color: var(--text-faint); }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  font-weight:600; font-size:15px; padding:14px 26px; border-radius:12px;
  border:1px solid transparent; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn-primary{ background: var(--grad); color:#fff; box-shadow: 0 10px 30px rgba(91,110,255,0.35); }
.btn-primary:hover{ transform: translateY(-2px); box-shadow: 0 16px 40px rgba(91,110,255,0.48); }
.btn-ghost{ background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover{ background: var(--surface-hover); border-color: var(--border-strong); }
.btn-sm{ padding:10px 18px; font-size:13.5px; border-radius:10px; }
.btn svg{ width:16px; height:16px; }

/* ---------- nav ---------- */
.nav{
  position: sticky; top:0; z-index:100;
  background: rgba(5,6,12,0.72); backdrop-filter: blur(14px);
  border-bottom:1px solid var(--border);
}
.nav-inner{ display:flex; align-items:center; justify-content:space-between; padding:16px 24px; max-width: var(--container); margin:0 auto; }
.brand{ display:flex; align-items:center; gap:10px; font-weight:800; font-size:18px; letter-spacing:-0.01em; }
.brand .logo-mark{ width:32px; height:32px; }
.nav-links{ display:flex; align-items:center; gap:2px; }
.nav-links a{
  font-size:14px; font-weight:500; color: var(--text-dim); padding:9px 14px; border-radius:8px;
  transition: color .15s ease, background .15s ease;
}
.nav-links a:hover{ color: var(--text); background: var(--surface); }
.nav-links a.active{ color: var(--text); background: var(--surface); }
.nav-cta{ display:flex; align-items:center; gap:10px; }
.nav-toggle{ display:none; background:none; border:none; color:var(--text); padding:6px; }
.nav-toggle svg{ width:24px; height:24px; }

.nav-drop{ position:relative; }
.nav-drop summary{ list-style:none; cursor:pointer; display:flex; align-items:center; gap:4px; font-size:14px; font-weight:500; color:var(--text-dim); padding:9px 14px; border-radius:8px; }
.nav-drop summary::-webkit-details-marker{ display:none; }
.nav-drop summary:hover{ color:var(--text); background:var(--surface); }
.nav-drop[open] summary{ color:var(--text); background:var(--surface); }
.nav-drop .chev{ width:13px; height:13px; transition:transform .15s ease; }
.nav-drop[open] .chev{ transform:rotate(180deg); }
.nav-drop-menu{ position:absolute; top:calc(100% + 8px); left:0; background:var(--bg-1); border:1px solid var(--border); border-radius:12px; padding:8px; min-width:210px; box-shadow:0 20px 40px rgba(0,0,0,0.45); z-index:50; }
.nav-drop-menu a{ display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px 12px; border-radius:8px; font-size:13.5px; color:var(--text-dim); }
.nav-drop-menu a:hover{ color:var(--text); background:var(--surface); }

@media (max-width: 980px){
  .nav-links{ display:none; }
  .nav-toggle{ display:flex; }
  .nav.open .nav-links{
    display:flex; flex-direction:column; position:absolute; top:100%; left:0; right:0;
    background: var(--bg-1); border-bottom:1px solid var(--border); padding:12px; gap:2px;
    max-height: 80vh; overflow-y:auto;
  }
  .nav.open .nav-links a{ padding:12px 14px; }
  .nav-drop-menu{ position:static; box-shadow:none; border:none; padding:0 0 4px 10px; margin-top:2px; min-width:0; }
}

/* ---------- footer ---------- */
.footer{ border-top:1px solid var(--border); padding:64px 0 32px; }
.footer-grid{ display:grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap:32px; margin-bottom:48px; }
.footer-brand p{ color: var(--text-faint); font-size:14px; margin-top:14px; max-width:260px; }
.footer-col h4{ font-size:12.5px; text-transform:uppercase; letter-spacing:.06em; color: var(--text-faint); margin-bottom:14px; font-weight:700; }
.footer-col a{ display:block; font-size:14px; color: var(--text-dim); padding:6px 0; transition: color .15s ease; }
.footer-col a:hover{ color: var(--text); }
.footer-bottom{ display:flex; justify-content:space-between; align-items:center; padding-top:28px; border-top:1px solid var(--border); font-size:13px; color: var(--text-faint); flex-wrap:wrap; gap:12px; }
@media (max-width: 860px){ .footer-grid{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .footer-grid{ grid-template-columns: 1fr; } }

/* ---------- cards / surfaces ---------- */
.card{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
  padding:28px; backdrop-filter: blur(8px);
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.card:hover{ border-color: var(--border-strong); background: var(--surface-hover); }
.card-lg{ padding:36px; }
.grid{ display:grid; gap:20px; }
.grid-2{ grid-template-columns: 1fr 1fr; }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-4{ grid-template-columns: repeat(4, 1fr); }
.grid-5{ grid-template-columns: repeat(5, 1fr); }
@media (max-width: 980px){ .grid-3, .grid-4, .grid-5{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px){ .grid-2, .grid-3, .grid-4, .grid-5{ grid-template-columns: 1fr; } }

.icon-tile{
  width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center;
  background: var(--grad-soft); border:1px solid rgba(144,97,249,0.28); color:#c3d0ff; margin-bottom:18px;
}
.icon-tile svg{ width:22px; height:22px; }

/* ---------- badges / pills ---------- */
.pill{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; padding:5px 12px; border-radius:999px; font-family: var(--font-mono); }
.pill-live{ color: var(--green); background: rgba(52,211,153,0.1); border:1px solid rgba(52,211,153,0.3); }
.pill-new{ color: var(--blue); background: rgba(91,140,255,0.1); border:1px solid rgba(91,140,255,0.3); }
.pill-soon{ color: var(--amber); background: rgba(245,165,36,0.1); border:1px solid rgba(245,165,36,0.32); }
.pill-cat-a{ color: var(--blue); background: rgba(91,140,255,0.1); border:1px solid rgba(91,140,255,0.28); }
.pill-cat-b{ color: var(--violet); background: rgba(144,97,249,0.12); border:1px solid rgba(144,97,249,0.3); }
.pill-cat-c{ color: var(--green); background: rgba(52,211,153,0.1); border:1px solid rgba(52,211,153,0.3); }

/* ---------- reveal on scroll ---------- */
.reveal{ opacity:0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible{ opacity:1; transform:none; }

/* ---------- stat ---------- */
.stat-num{ font-family: var(--font-mono); font-weight:700; font-size: clamp(2rem,3.2vw,2.6rem); background: var(--grad-text); -webkit-background-clip:text; background-clip:text; color:transparent; }
.stat-label{ color: var(--text-dim); font-size:14px; margin-top:6px; }

/* ---------- fake browser chrome (for mockups) ---------- */
.browser-frame{ border:1px solid var(--border); border-radius: var(--radius); overflow:hidden; background: var(--bg-2); box-shadow: var(--shadow-glow); }
.browser-bar{ display:flex; align-items:center; gap:8px; padding:12px 16px; border-bottom:1px solid var(--border); background: rgba(255,255,255,0.02); }
.browser-bar .dot{ width:10px; height:10px; border-radius:50%; background: rgba(255,255,255,0.14); }
.browser-bar .url{ margin-left:10px; font-family: var(--font-mono); font-size:12px; color: var(--text-faint); background: rgba(255,255,255,0.04); border-radius:6px; padding:4px 10px; flex:1; }

/* ---------- annotation marker (baymard-style found-issue circle) ---------- */
.flag-dot{
  position:absolute; width:26px; height:26px; border-radius:50%;
  border:2px solid var(--amber); box-shadow: 0 0 0 4px rgba(245,165,36,0.14);
}
.flag-dot::after{ content:''; position:absolute; inset:6px; border-radius:50%; background: var(--amber); opacity:.55; }

/* ---------- code block ---------- */
.code-block{
  font-family: var(--font-mono); font-size:13px; line-height:1.7; color:#c9d3ff;
  background: #070912; border:1px solid var(--border); border-radius: var(--radius); padding:22px 24px; overflow-x:auto;
}
.code-block .tag{ color:#7dd3fc; } .code-block .attr{ color:#93b4ff; } .code-block .str{ color:#a5e3a5; } .code-block .cmt{ color: var(--text-faint); }

/* ---------- tabs ---------- */
.tabbar{ display:flex; gap:6px; flex-wrap:wrap; margin-bottom:24px; }
.tabbar button{ background: var(--surface); border:1px solid var(--border); color: var(--text-dim); padding:10px 16px; border-radius:10px; font-size:13.5px; font-weight:600; transition: all .15s ease; }
.tabbar button.active{ background: var(--grad); border-color:transparent; color:#fff; }
.tab-panel{ display:none; }
.tab-panel.active{ display:block; }

/* ---------- ring diagram ---------- */
.ring-wrap{ display:grid; grid-template-columns: 460px 1fr; gap:56px; align-items:center; }
@media (max-width: 900px){ .ring-wrap{ grid-template-columns:1fr; } }
.ring-svg-holder{ position:relative; width:100%; max-width:460px; margin:0 auto; }
.ring-step-detail{ min-height: 210px; }
.ring-node{ cursor:pointer; }
.ring-node circle.hit{ fill: transparent; }
.ring-node .node-bg{ transition: fill .2s ease, stroke .2s ease; }
.ring-node.active .node-bg{ fill: rgba(91,140,255,0.18); stroke: var(--blue); }
.ring-node text{ fill: var(--text-dim); font-family: var(--font-sans); font-weight:700; font-size:13px; transition: fill .2s ease; }
.ring-node.active text{ fill: #fff; }
.ring-list{ display:flex; flex-direction:column; gap:10px; margin-top:20px; }
.ring-list li{ display:flex; gap:12px; align-items:flex-start; padding:12px 14px; border-radius:10px; border:1px solid transparent; cursor:pointer; transition: background .15s ease, border-color .15s ease; }
.ring-list li:hover{ background: var(--surface); }
.ring-list li.active{ background: var(--surface); border-color: var(--border); }
.ring-list .n{ font-family: var(--font-mono); font-size:12px; color: var(--blue); font-weight:700; padding-top:2px; }

/* ---------- forms ---------- */
.field{ margin-bottom:16px; }
.field label{ display:block; font-size:13px; font-weight:600; color: var(--text-dim); margin-bottom:8px; }
.field input, .field textarea{
  width:100%; background: rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:10px;
  padding:13px 14px; color: var(--text); font-size:14.5px; font-family: var(--font-sans);
}
.field input:focus, .field textarea:focus{ outline:none; border-color: var(--blue); background: rgba(255,255,255,0.05); }
.field input::placeholder, .field textarea::placeholder{ color: var(--text-faint); }
.form-note{ font-size:12.5px; color: var(--text-faint); margin-top:10px; }

/* ---------- table ---------- */
.hc-table{ width:100%; border-collapse: collapse; font-size:14.5px; }
.hc-table th{ text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:.05em; color: var(--text-faint); padding:12px 16px; border-bottom:1px solid var(--border); font-weight:700; }
.hc-table td{ padding:14px 16px; border-bottom:1px solid var(--border); color: var(--text-dim); vertical-align:top; }
.hc-table tr:last-child td{ border-bottom:none; }
.hc-table td.yes{ color: var(--green); font-weight:600; }
.hc-table td.no{ color: var(--text-faint); }

/* ---------- utility ---------- */
.flex{ display:flex; }
.center{ align-items:center; justify-content:center; }
.gap-sm{ gap:10px; } .gap{ gap:20px; } .gap-lg{ gap:36px; }
.mt-sm{ margin-top:12px; } .mt{ margin-top:24px; } .mt-lg{ margin-top:48px; }
.mb-sm{ margin-bottom:12px; } .mb{ margin-bottom:24px; }
.divider{ height:1px; background: var(--border); margin: 40px 0; }
.hidden-mobile{ display:initial; }
@media (max-width: 640px){ .hidden-mobile{ display:none; } }

/* page hero (secondary pages) */
.page-hero{ padding: 72px 0 40px; }
.page-hero .kicker-row{ display:flex; align-items:center; gap:12px; margin-bottom:20px; }
.breadcrumb{ font-family: var(--font-mono); font-size:12.5px; color: var(--text-faint); }
.breadcrumb a{ color: var(--text-dim); }
.breadcrumb a:hover{ color: var(--text); }

/* CTA band */
.cta-band{
  border-radius: var(--radius-lg); padding: 64px; text-align:center;
  background: linear-gradient(135deg, rgba(91,140,255,0.12), rgba(144,97,249,0.12));
  border:1px solid var(--border-strong); position:relative; overflow:hidden;
}
.cta-band::before{ content:''; position:absolute; inset:0; background: radial-gradient(circle at 30% 20%, rgba(91,140,255,0.18), transparent 60%); pointer-events:none; }
@media (max-width: 640px){ .cta-band{ padding:40px 24px; } }
