/* Cloud Scope landing page — ported from frontend/ui-kit/ui_kits/landing/
   Tokens come from tokens.css (bundled into app.css). */

body.cs-landing {
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(255,107,53,0.08), transparent 60%),
    var(--bg-0);
  background-image:
    radial-gradient(circle, var(--grid-color) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  background-position: 0 0;
  min-height: 100vh;
}
body.cs-landing * { box-sizing: border-box; }
body.cs-landing .mono { font-family: var(--font-mono); }
body.cs-landing .mono-dim,
body.cs-landing .cs-mono-dim {
  font-family: var(--font-mono);
  color: var(--fg-3);
  font-size: 12px;
}

/* ---------- NAV ---------- */
.cs-nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11,13,16,0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-1);
}
.cs-nav-inner {
  max-width: var(--page-max); margin: 0 auto;
  padding: 0 var(--gutter); height: 64px;
  display: flex; align-items: center; gap: 32px;
}
.cs-brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--fg-0); font-weight: 600; font-size: 16px;
  border: 0; letter-spacing: -0.01em; white-space: nowrap;
}
.cs-brand:hover { color: var(--fg-0); }
.cs-nav-links { display: flex; gap: 28px; margin-left: 16px; }
.cs-nav-links a { color: var(--fg-2); font-size: 14px; border: 0; white-space: nowrap; }
.cs-nav-links a:hover { color: var(--fg-0); }
.cs-nav-cta { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* Signed-in variant — replaces the "Sign in + Start scan" CTAs when the
   visitor already has a session cookie. Populated by landing.js. */
.cs-nav-user {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 10px 4px 4px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line-2);
}
.cs-nav-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand-500); color: #0a0a0a;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.02em;
}
.cs-nav-user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.cs-nav-user-name { color: var(--fg-0); font-size: 13px; font-weight: 500; }
.cs-nav-user-sub { color: var(--fg-3); font-size: 10px; letter-spacing: 0.04em; margin-top: 1px; }
@media (max-width: 720px) {
  .cs-nav-user-meta { display: none; }
  .cs-nav-user { padding: 2px; border-color: transparent; background: transparent; }
}

/* ---------- BUTTONS ---------- */
.cs-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500;
  height: 40px; padding: 0 18px;
  border-radius: var(--r-sm); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  letter-spacing: -0.005em;
  transition: background var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard),
              transform var(--dur-fast) var(--ease-standard);
}
.cs-btn:hover { color: inherit; }
.cs-btn:active { transform: scale(0.98); }
.cs-btn-primary { background: var(--brand-500); color: #1a0a03; }
.cs-btn-primary:hover { background: var(--brand-400); }
.cs-btn-ghost { background: var(--bg-3); color: var(--fg-0); border-color: var(--line-2); }
.cs-btn-ghost:hover { background: var(--bg-4); border-color: var(--line-3); }
.cs-btn-link { background: transparent; color: var(--fg-1); padding: 0 8px; border-bottom: 0; }
.cs-btn-link:hover { color: var(--fg-0); }
.cs-btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.cs-btn-block { width: 100%; justify-content: center; }

/* ---------- HERO ---------- */
.cs-hero { padding: 96px 0 80px; }
.cs-hero-inner {
  max-width: var(--page-max); margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center;
}
@media (max-width: 900px) { .cs-hero-inner { grid-template-columns: 1fr; gap: 48px; } }

.cs-eyebrow {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--brand-500); margin-bottom: 20px;
}
.cs-display {
  font-size: clamp(44px, 5.4vw, 72px);
  line-height: 1.02; letter-spacing: -0.035em;
  color: var(--fg-0); font-weight: 600; margin: 0 0 24px;
}
.cs-lead {
  font-size: 19px; line-height: 1.55; color: var(--fg-1);
  max-width: 540px; margin: 0 0 32px;
}
.cs-hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.cs-hero-trust {
  display: flex; gap: 10px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 12px; color: var(--fg-3);
}

/* ---------- TERMINAL ---------- */
.cs-terminal {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,107,53,0.08), 0 0 60px rgba(255,107,53,0.08);
}
.cs-terminal-chrome {
  background: var(--bg-3);
  padding: 10px 14px;
  display: flex; align-items: center; gap: 6px;
  border-bottom: 1px solid var(--line-1);
}
.cs-terminal-chrome .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.cs-terminal-chrome .dot.r { background: #ff5f57; }
.cs-terminal-chrome .dot.y { background: #febc2e; }
.cs-terminal-chrome .dot.g { background: #28c840; }
.cs-terminal-title {
  margin-left: 10px; font-family: var(--font-mono); font-size: 12px;
  color: var(--fg-3); letter-spacing: 0.02em;
}
.cs-terminal-body {
  margin: 0; padding: 20px 22px;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.8;
  color: var(--fg-1);
  min-height: 340px;
  white-space: pre-wrap;
}
.cs-terminal-body .dim { color: var(--fg-3); }
.cs-line { display: block; animation: cs-fade-in 200ms var(--ease-standard); }
.cs-prefix { display: inline-block; width: 14px; }
.cs-line.cs-brand  { color: var(--brand-500); background: transparent; padding: 0; border: 0; border-radius: 0; font-size: inherit; }
.cs-line.cs-ok     { color: var(--ok); }
.cs-line.cs-dim    { color: var(--fg-3); }
.cs-line.cs-high   { color: var(--sev-high); }
.cs-line.cs-crit   { color: var(--sev-crit); }
.cs-cursor { color: var(--brand-500); animation: cs-blink 1s steps(2) infinite; }
@keyframes cs-blink { 50% { opacity: 0; } }
@keyframes cs-fade-in { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }

/* ---------- SOCIAL PROOF ---------- */
.cs-proof { padding: 40px 0; border-top: 1px solid var(--line-1); border-bottom: 1px solid var(--line-1); background: var(--bg-1); }
.cs-proof-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
}
@media (max-width: 780px) { .cs-proof-stats { grid-template-columns: repeat(2,1fr); } }
.cs-stat-n { font-size: 32px; font-weight: 600; color: var(--brand-500); letter-spacing: -0.02em; }
.cs-stat-l { font-size: 13px; color: var(--fg-2); margin-top: 4px; }

/* ---------- SECTIONS ---------- */
.cs-section { padding: 120px 0; }
.cs-section-tight { padding: 80px 0; }
.cs-section-inner { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); }
.cs-h2 {
  font-size: clamp(32px, 3.6vw, 44px);
  line-height: 1.1; letter-spacing: -0.025em;
  color: var(--fg-0); font-weight: 600; margin: 0 0 16px;
  max-width: 720px;
}
.cs-section-lead {
  font-size: 18px; line-height: 1.55; color: var(--fg-2);
  max-width: 620px; margin: 0 0 48px;
}

/* ---------- COVERAGE ---------- */
.cs-coverage-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
@media (max-width: 900px) { .cs-coverage-grid { grid-template-columns: repeat(2, 1fr); } }
.cs-coverage-cell {
  display: flex; gap: 14px; align-items: center;
  padding: 18px 20px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  transition: border-color var(--dur-fast) var(--ease-standard);
}
.cs-coverage-cell:hover { border-color: var(--line-3); }
.cs-coverage-name { color: var(--fg-0); font-weight: 500; font-size: 15px; }
.cs-coverage-desc { color: var(--fg-3); font-size: 12px; font-family: var(--font-mono); margin-top: 2px; }
.cs-coverage-more { margin-top: 24px; font-family: var(--font-mono); font-size: 13px; color: var(--fg-3); line-height: 1.55; }
.cs-coverage-more a { color: var(--brand-300); border-bottom-color: rgba(255,107,53,0.3); }

/* ---------- COMPLIANCE FRAMEWORKS ---------- */
.cs-fw-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
@media (max-width: 900px) { .cs-fw-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cs-fw-grid { grid-template-columns: 1fr; } }
.cs-fw-chip {
  padding: 20px 22px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  transition: border-color var(--dur-fast) var(--ease-standard);
}
.cs-fw-chip:hover { border-color: var(--brand-500); }
.cs-fw-short {
  font-size: 18px; font-weight: 600; color: var(--brand-300);
  letter-spacing: 0.02em;
}
.cs-fw-full { color: var(--fg-0); font-size: 14px; margin-top: 6px; }
.cs-fw-stat {
  color: var(--fg-3); font-family: var(--font-mono); font-size: 11px;
  margin-top: 4px; letter-spacing: 0.04em;
}
.cs-fw-meta {
  display: flex; gap: 36px; margin-top: 28px; flex-wrap: wrap;
  padding-top: 24px; border-top: 1px solid var(--line-1);
}
.cs-fw-meta-item {
  color: var(--fg-2); font-size: 13px;
}
.cs-fw-meta-item .mono {
  color: var(--brand-300); font-family: var(--font-mono);
  padding-right: 6px;
}

/* ---------- FINDINGS ---------- */
.cs-findings {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.cs-findings-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: var(--bg-3);
  border-bottom: 1px solid var(--line-1);
}
.cs-findings-tabs { display: flex; gap: 6px; }
.cs-tab {
  font-family: var(--font-mono); font-size: 12px;
  padding: 4px 10px; border-radius: var(--r-sm);
  color: var(--fg-3); cursor: pointer;
}
.cs-tab.active { background: var(--bg-1); color: var(--fg-0); border: 1px solid var(--line-2); }
.cs-find-row {
  display: grid;
  grid-template-columns: 16px 1fr auto auto 16px;
  gap: 16px; align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-1);
  transition: background var(--dur-fast) var(--ease-standard);
}
.cs-find-row:last-of-type { border-bottom: 0; }
.cs-find-row:hover { background: var(--bg-3); }
.cs-sev-pip { width: 8px; height: 8px; border-radius: 50%; }
.cs-sev-pip.sev-crit { background: var(--sev-crit); }
.cs-sev-pip.sev-high { background: var(--sev-high); }
.cs-sev-pip.sev-med  { background: var(--sev-med); }
.cs-sev-pip.sev-low  { background: var(--sev-low); }
.cs-find-title { color: var(--fg-0); font-weight: 500; font-size: 14px; }
.cs-find-meta { color: var(--fg-3); font-family: var(--font-mono); font-size: 12px; margin-top: 3px; }
.cs-find-tag {
  font-family: var(--font-mono); font-size: 11px;
  padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--bg-3); color: var(--fg-2); border: 1px solid var(--line-2);
}
.cs-find-val { font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
.cs-find-val.cost { color: var(--brand-500); }
.cs-find-val.sev-crit { color: var(--sev-crit); }
.cs-find-val.sev-high { color: var(--sev-high); }
.cs-find-val.sev-med  { color: var(--sev-med); }
.cs-find-arrow { color: var(--fg-3); font-family: var(--font-mono); }
.cs-findings-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: var(--bg-3);
  border-top: 1px solid var(--line-1);
}

/* ---------- HOW IT WORKS ---------- */
.cs-steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 900px) { .cs-steps { grid-template-columns: 1fr; } }
.cs-step {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 28px;
}
.cs-step-num { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--brand-500); margin-bottom: 14px; }
.cs-step-title { font-size: 20px; color: var(--fg-0); font-weight: 600; letter-spacing: -0.015em; margin: 0 0 10px; }
.cs-step-desc { color: var(--fg-2); font-size: 14px; line-height: 1.65; margin: 0 0 20px; }
.cs-step-code {
  margin: 0; padding: 14px 16px;
  background: var(--bg-0); border: 1px solid var(--line-1);
  border-radius: var(--r-sm);
  font-family: var(--font-mono); font-size: 12px; line-height: 1.6;
  color: var(--fg-1);
  white-space: pre-wrap;
  overflow-x: auto;
}

/* ---------- PRICING ---------- */
.cs-pricing { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
@media (max-width: 900px) { .cs-pricing { grid-template-columns: 1fr; } }
.cs-tier {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 28px;
  position: relative;
}
.cs-tier.highlight {
  border-color: rgba(255,107,53,0.5);
  background: linear-gradient(180deg, rgba(255,107,53,0.04), transparent 40%), var(--bg-2);
  box-shadow: 0 0 0 1px rgba(255,107,53,0.2), 0 24px 60px rgba(0,0,0,0.5);
}
.cs-tier-badge {
  position: absolute; top: -11px; left: 24px;
  background: var(--brand-500); color: #1a0a03;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  padding: 4px 10px; border-radius: var(--r-pill);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.cs-tier-name { font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-2); margin-bottom: 16px; }
.cs-tier-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.cs-tier-price .amt { font-size: 40px; font-weight: 600; color: var(--fg-0); letter-spacing: -0.02em; }
.cs-tier-price .sub { font-family: var(--font-mono); font-size: 13px; color: var(--fg-3); }
.cs-tier-ideal { color: var(--fg-2); font-size: 14px; margin-bottom: 22px; }
.cs-tier-feat { list-style: none; padding: 0; margin: 0 0 24px; }
.cs-tier-feat li { color: var(--fg-1); font-size: 14px; padding: 8px 0; border-top: 1px solid var(--line-1); display: flex; gap: 10px; }
.cs-tier-feat li:first-child { border-top: 0; }
.cs-tier-feat .check { color: var(--brand-500); }

/* ---------- CTA ---------- */
.cs-cta { padding: 120px 0; }
.cs-cta-card {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 64px;
  display: grid; grid-template-columns: auto 1fr; gap: 48px; align-items: center;
  position: relative; overflow: hidden;
}
@media (max-width: 780px) { .cs-cta-card { grid-template-columns: 1fr; padding: 40px; } }
.cs-cta-ascii {
  margin: 0; color: var(--brand-500); opacity: 0.75;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.25;
}
.cs-cta-copy .cs-lead { max-width: 540px; }

/* ---------- FOOTER ---------- */
.cs-footer { border-top: 1px solid var(--line-1); background: var(--bg-1); padding: 64px 0 0; }
.cs-footer-inner {
  max-width: var(--page-max); margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1.2fr 2fr; gap: 64px;
}
@media (max-width: 780px) { .cs-footer-inner { grid-template-columns: 1fr; gap: 32px; } }
.cs-footer-wordmark { font-size: 18px; font-weight: 600; color: var(--fg-0); letter-spacing: -0.01em; margin-top: 8px; }
.cs-footer-tag { color: var(--fg-2); font-size: 14px; margin: 6px 0 16px; }
.cs-footer-sys { display: flex; align-items: center; gap: 8px; }
.cs-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.cs-footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 780px) { .cs-footer-cols { grid-template-columns: repeat(2,1fr); } }
.cs-footer-h { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-3); margin-bottom: 14px; }
.cs-footer-cols ul { list-style: none; padding: 0; margin: 0; }
.cs-footer-cols li { padding: 4px 0; }
.cs-footer-cols a { color: var(--fg-1); font-size: 14px; border: 0; }
.cs-footer-cols a:hover { color: var(--brand-300); }
.cs-footer-bar {
  max-width: var(--page-max); margin: 48px auto 0;
  padding: 20px var(--gutter); border-top: 1px solid var(--line-1);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ---------- WORKSPACE PICKER ---------- */
.cs-workspace-main {
  min-height: calc(100vh - 64px);
  display: flex; align-items: center; justify-content: center;
  padding: 48px var(--gutter);
}
.cs-workspace-card {
  width: 100%; max-width: 420px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 40px;
}
.cs-workspace-card h1 {
  font-size: 26px; line-height: 1.2;
  color: var(--fg-0); margin: 0 0 8px;
}
.cs-workspace-sub {
  color: var(--fg-2); font-size: 14px; margin: 0 0 28px;
}
.cs-workspace-field {
  display: flex; align-items: stretch;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--bg-1);
  overflow: hidden;
  transition: border-color var(--dur-fast) var(--ease-standard),
              box-shadow var(--dur-fast) var(--ease-standard);
}
.cs-workspace-field:focus-within {
  border-color: var(--line-3);
  box-shadow: var(--glow-brand);
}
.cs-workspace-input {
  flex: 1; min-width: 0;
  background: transparent; color: var(--fg-0);
  border: 0; outline: 0;
  padding: 0 14px;
  font-family: var(--font-mono); font-size: 14px;
}
.cs-workspace-input::placeholder { color: var(--fg-3); }
.cs-workspace-suffix {
  display: inline-flex; align-items: center;
  padding: 0 14px;
  font-family: var(--font-mono); font-size: 13px;
  color: var(--fg-3);
  background: var(--bg-3);
  border-left: 1px solid var(--line-2);
  white-space: nowrap;
}
.cs-workspace-submit {
  margin-top: 16px; width: 100%;
  height: 44px; border: 0; border-radius: var(--r-sm);
  background: var(--brand-500); color: #1a0a03;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-standard),
              transform var(--dur-fast) var(--ease-standard);
}
.cs-workspace-submit:hover { background: var(--brand-400); }
.cs-workspace-submit:active { transform: scale(0.98); }
.cs-workspace-submit:disabled { background: var(--fg-4); color: var(--bg-1); cursor: not-allowed; }
.cs-workspace-err {
  margin-top: 12px; color: var(--sev-crit); font-size: 13px;
}
.cs-workspace-help {
  margin-top: 20px; text-align: center;
  font-size: 13px; color: var(--fg-3);
}
.cs-workspace-help a { color: var(--brand-300); border-bottom-color: rgba(255,107,53,0.3); }
