/* ============================================================================
   CatalystIQ — "Violet Ledger Interface"
   Transcribed from DESIGN.md (source: relevanceai.com). Tokens are normative
   values from that spec; do not invent colours outside this block.

   Guardrails from the spec, kept as comments where they are easy to violate:
     • The violet gradient is corner-rationed (~3% coverage per wash). Never a
       full-bleed fill; the page stays white-dominant.
     • The nav CTA radius is 4.8px — distinctly squarer than pill actions. It is
       NOT 9999px.
     • Secondary/ghost buttons stay grayscale. Violet is for the gradient CTA
       family only.
     • Elevation comes from hairline borders and soft multi-layer shadows on
       white — never darkened panels or heavy drop shadows.
     • No serif and no monospace face anywhere. Sora (display) + Inter (all
       other roles, including data).

   One documented extension: this spec describes a marketing site, so it defines
   no negative/severity colour. A pipeline console needs semantic status. The
   additions are marked below and kept to the minimum the data requires.
============================================================================ */

:root{
  /* ── Colour ─────────────────────────────────────────────────────────── */
  --bg:            #FFFFFF;
  --surface-tint:  #F8FAFC;
  --surface-panel: #F3F3F4;

  --ink:           #000000;   /* primary copy */
  --ink-navy:      #0D162F;   /* secondary / UI labels */
  --ink-muted:     #868A97;   /* tertiary captions */
  --ink-dark:      #1A192B;   /* wordmark, darkest headings */

  --border:        #E6E7EA;   /* hairline, used throughout */
  --border-soft:   #EFF0F2;

  --accent:        #6056FF;
  --accent-deep:   #4B40D6;
  --accent-grad:   radial-gradient(circle, rgb(96,86,255), rgb(59,50,249));
  --accent-teal:   #0E9384;

  /* Extension (see header note): semantic status for pipeline + market data. */
  --danger:        #D92D20;
  --warn:          #B54708;
  --positive:      #0E9384;

  /* ── Radii ──────────────────────────────────────────────────────────── */
  --r-pill:       9999px;
  --r-control:    6px;
  --r-nav:        4.8px;
  --r-card-tight: 8px;
  --r-card:       12px;
  --r-card-loose: 16px;

  /* ── Spacing ────────────────────────────────────────────────────────── */
  --s-base: 8px;
  --s-tight: 6px;
  --s-control: 10px;
  --s-standard: 12px;
  --s-loose: 20px;
  --section-pad: 64px;
  --maxw: 1300px;

  /* ── Type — strictly two families, no serif, no mono ────────────────── */
  --font-display: 'Sora', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
  --font-ui:      'Inter', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
  /* Inter does double duty as the data face; tabular figures keep columns
     aligned. There is deliberately no monospace token in this system. */
  --num-feat: 'tnum' 1, 'cv05' 1;

  /* ── Motion — one shared utilitarian curve ──────────────────────────── */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Elevation — soft, composite, on white ──────────────────────────── */
  --shadow-lifted: rgba(13,22,47,.06) 0 1px 2px 0,
                   rgba(13,22,47,.14) 0 6px 18px -4px,
                   rgba(255,255,255,.9) 0 1px 0 0 inset;
  --shadow-flat:   rgba(255,255,255,.8) 0 1px 0 0 inset,
                   rgba(13,22,47,.07) 0 2px 8px 0;
  --shadow-cta:    rgba(59,50,249,.25) 0 1.6px 6.4px 0;
  --shadow-cta-hi: rgba(59,50,249,.35) 0 3.2px 9.6px 0;
}

/* ── Base ──────────────────────────────────────────────────────────────── */
*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
html,body{ margin:0; padding:0; }
body{
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  min-height: 100vh;
  display:flex; flex-direction:column;
  -webkit-font-smoothing: antialiased;
}
a{ color: var(--accent-deep); text-decoration:none;
   transition: color .15s var(--ease); }
a:hover{ text-decoration:underline; }
img,svg{ max-width:100%; }
hr{ border:0; border-top:1px solid var(--border); margin:24px 0; }

/* ── Layout ────────────────────────────────────────────────────────────── */
.wrap{ max-width: var(--maxw); margin:0 auto; padding: 0 24px; width:100%; }
main{ flex:1; }
.section{ padding: var(--section-pad) 0; }
.section-tight{ padding: 40px 0; }

/* ── Typography ────────────────────────────────────────────────────────── */
h1,h2,h3,h4{ font-family: var(--font-display); color: var(--ink); margin:0 0 12px; }
/* Sora runs at 400, never bold — the spec is explicit that headlines are light
   and engineered rather than punchy. */
.display-lg{ font-size: clamp(30px, 4vw, 48px); line-height:1.2; letter-spacing:-2.4px; font-weight:400; }
.headline-md{ font-size: clamp(26px, 3vw, 36px); line-height:1.35; letter-spacing:-0.9px; font-weight:400; }
.headline-sm{ font-size: 26px; line-height:1.3; letter-spacing:-0.6px; font-weight:400; }
h3{ font-size: 20px; font-weight:500; letter-spacing:-0.5px; font-family: var(--font-ui); line-height:1.4; }
.lede{ font-size:16px; line-height:1.6; color: var(--ink-navy); max-width:62ch; }
.muted{ color: var(--ink-muted); font-size:14px; line-height:1.55; }
.faint{ color: var(--ink-muted); font-size:13px; }
.label{ font-size:12px; font-weight:600; letter-spacing:.02em; color: var(--ink-navy); }
.eyebrow{ font-family: var(--font-ui); font-size:11px; font-weight:600;
  letter-spacing:.08em; text-transform:uppercase; color: var(--ink-muted); }

/* ── Hero corner washes — the only place violet pools ──────────────────── */
.hero{ position:relative; overflow:hidden; padding: 72px 0 56px; }
.hero-wash{ position:absolute; inset:0; pointer-events:none; z-index:0; }
.hero-wash::before{
  content:""; position:absolute; inset:0;
  background:
    radial-gradient(90% 80% at 12% 0%,   rgba(138,105,255,.55) 0%, rgba(138,105,255,0) 62%),
    radial-gradient(85% 75% at 92% 10%,  rgba(109,74,255,.55)  0%, rgba(109,74,255,0)  62%),
    radial-gradient(85% 85% at 82% 100%, rgba(138,105,255,.50) 0%, rgba(138,105,255,0) 60%),
    radial-gradient(80% 70% at 22% 100%, rgba(199,207,255,.60) 0%, rgba(199,207,255,0) 65%);
}
.hero > .wrap{ position:relative; z-index:1; }
/* The spec's first screen is a two-column hero: headline left, supporting body
   and CTA pair right, near-even split with a wide gutter. */
.hero-grid{ display:grid; gap:32px; }
@media (min-width:900px){
  .hero-grid{ grid-template-columns: 1.05fr .95fr; gap:80px; align-items:end; }
}

/* Edge scrim over media strips — fades their edges into white. */
.scrim{ background: linear-gradient(90deg,
  rgba(0,0,0,0) 0%, rgba(96,86,255,.07) 14%, rgba(96,86,255,.07) 86%, rgba(0,0,0,0) 100%); }

/* ── Navigation ────────────────────────────────────────────────────────── */
.nav{ position:sticky; top:0; z-index:40; height:65px; background: var(--bg);
  border-bottom:1px solid var(--border); }
.nav .wrap{ display:flex; align-items:center; gap:20px; height:65px; }
.brand{ display:flex; align-items:center; gap:10px; color: var(--ink-dark); text-decoration:none; }
.brand:hover{ text-decoration:none; }
.brand .mark{ width:26px; height:26px; border-radius:50%; flex:none;
  background: var(--accent-grad); box-shadow: var(--shadow-cta); }
.brand .name{ font-family: var(--font-display); font-weight:600; font-size:16px;
  letter-spacing:-0.3px; color: var(--ink-dark); line-height:1.1; }
.brand .tag{ display:block; font-family: var(--font-ui); font-size:9.5px; letter-spacing:.08em;
  text-transform:uppercase; color: var(--ink-muted); font-weight:600; }
.nav-links{ margin-left:auto; display:flex; align-items:center; gap:22px; }
.nav-links a{ color: var(--ink-navy); font-size:14px; font-weight:500; }
.nav-links a:hover{ color: var(--accent-deep); text-decoration:none; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-family: var(--font-ui); font-size:14px; font-weight:500;
  border-radius: var(--r-pill); padding:10px 20px; height:42px;
  border:1px solid transparent; cursor:pointer; text-decoration:none;
  transition: background .15s var(--ease), box-shadow .15s var(--ease),
              color .15s var(--ease), border-color .15s var(--ease); }
.btn:hover{ text-decoration:none; }
.btn[disabled]{ opacity:.5; cursor:not-allowed; }

/* The gradient family — the only violet controls in the system. Hover
   intensifies the shadow rather than shifting colour. */
.btn-primary{ background: var(--accent-grad); color:#FFFFFF; box-shadow: var(--shadow-cta); }
.btn-primary:hover{ box-shadow: var(--shadow-cta-hi); }

/* Secondary stays grayscale. Never violet. */
.btn-ghost{ background:transparent; color:#374151; border-radius: var(--r-control);
  height:38px; padding:8px 16px; }
.btn-ghost:hover{ background:#F9FAFB; }

.btn-outline{ background:transparent; color: var(--ink-navy); border:1px solid var(--border);
  border-radius: var(--r-control); height:42px; padding:10px 20px; }
.btn-outline:hover{ background:#F9FAFB; text-decoration:none; }

.btn-block{ display:flex; width:100%; }
.btn-sm{ height:38px; padding:8px 16px; font-size:13px; }

/* Nav CTA is deliberately SQUARER than every other action — 4.8px, not a pill.
   The spec calls this out as a guardrail; do not "fix" it to 9999px. */
.btn-nav{ background: var(--accent-grad); color:#FFFFFF; box-shadow: var(--shadow-cta);
  border-radius: var(--r-nav); height:42px; padding:10px 20px; }
.btn-nav:hover{ box-shadow: var(--shadow-cta-hi); }

/* ── Pills / chips ─────────────────────────────────────────────────────── */
.eyebrow-pill{ display:inline-flex; align-items:center; gap:8px;
  border:1px solid var(--border); border-radius: var(--r-pill); background: var(--bg);
  padding:6px 14px; margin-bottom:20px; box-shadow: var(--shadow-flat); }
.chip{ display:inline-flex; align-items:center; gap:10px; background: var(--surface-tint);
  border:1px solid var(--border); border-radius: var(--r-card-tight); padding:12px 16px; }
.pill{ display:inline-block; font-size:11px; font-weight:600; letter-spacing:.02em;
  border:1px solid var(--border); border-radius: var(--r-pill); padding:3px 10px;
  color: var(--ink-muted); background: var(--bg); }
.pill.on{ border-color: rgba(14,147,132,.35); color: var(--accent-teal); background: rgba(14,147,132,.06); }
.pill.off{ border-color: rgba(181,71,8,.3); color: var(--warn); background: rgba(181,71,8,.06); }
.live-dot{ width:7px; height:7px; border-radius:50%; background: var(--accent-teal);
  display:inline-block; }
.grad-dot{ width:8px; height:8px; border-radius:50%; background: var(--accent-grad); flex:none; }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card{ background: var(--bg); border:1px solid var(--border); border-radius: var(--r-card);
  padding:24px; box-shadow: var(--shadow-flat); }
.card-lg{ padding:32px; border-radius: var(--r-card-loose); }
.card-tint{ background: var(--surface-panel); border-color: transparent; border-radius: var(--r-card); }
.card-grad{ background: linear-gradient(160deg, rgb(230,230,251) 0%, rgb(226,227,250) 50%, rgb(223,226,250) 100%);
  border-color: transparent; border-radius: var(--r-card-loose); }
.card-title{ display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.card-title .eyebrow{ margin:0; }

.grid{ display:grid; gap: 12px; }
.cols-2,.cols-3,.cols-4{ grid-template-columns: 1fr; }
@media (min-width:760px){ .cols-2{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width:820px){ .cols-3{ grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (min-width:980px){ .cols-4{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width:1180px){ .cols-4{ grid-template-columns: repeat(4, minmax(0,1fr)); } }

/* ── Metric / numeral row ──────────────────────────────────────────────── */
.kpis{ display:grid; grid-template-columns: repeat(auto-fit, minmax(158px,1fr)); gap:20px; }
.kpi{ background:transparent; border:0; padding:0; }
.kpi .n{ font-family: var(--font-display); font-size:34px; font-weight:400;
  letter-spacing:-1.4px; color: var(--ink); font-variant-numeric: tabular-nums; line-height:1.15; }
.kpi .l{ font-size:11px; font-weight:600; letter-spacing:.08em; text-transform:uppercase;
  color: var(--ink-muted); margin-bottom:4px; }
.kpi .sub{ font-size:12px; color: var(--ink-muted); margin-top:2px; }
/* A thin gradient rule stands in for the spec's sparkline foot. */
.kpi .spark{ height:2px; border-radius:var(--r-pill); margin-top:12px;
  background: linear-gradient(90deg, var(--accent) 0%, rgba(96,86,255,.15) 100%); }

/* ── Tables — hairline geometry, the core of this system ───────────────── */
table{ width:100%; border-collapse:collapse; font-size:14px; }
th{ text-align:left; font-size:11px; font-weight:600; letter-spacing:.06em;
  text-transform:uppercase; color: var(--ink-muted); padding:10px 12px;
  border-bottom:1px solid var(--border); background: var(--bg); }
td{ padding:12px; border-bottom:1px solid var(--border-soft); color: var(--ink-navy);
  vertical-align:top; }
td b, td strong{ color: var(--ink); font-weight:600; }
tbody tr{ transition: background .15s var(--ease); }
tbody tr:hover{ background: var(--surface-tint); }
.num, .tabular{ font-variant-numeric: tabular-nums; }

/* ── Forms ─────────────────────────────────────────────────────────────── */
label{ display:block; font-size:12px; font-weight:600; letter-spacing:.02em;
  color: var(--ink-navy); margin:16px 0 6px; }
input[type=text],input[type=email],input[type=password],select,textarea{
  width:100%; padding:10px 12px; font-family: var(--font-ui); font-size:15px;
  background: var(--bg); border:1px solid var(--border);
  border-radius: var(--r-control); color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
input::placeholder{ color: var(--ink-muted); }
input:focus,select:focus,textarea:focus{ outline:none;
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(96,86,255,.14); }
input[disabled]{ opacity:.6; cursor:not-allowed; background: var(--surface-tint); }
input[aria-invalid=true]{ border-color: var(--danger); }
.check{ display:flex; gap:10px; align-items:flex-start; margin:14px 0; }
.check input{ margin-top:3px; flex:none; width:16px; height:16px; accent-color: var(--accent); }
.check span{ font-size:14px; line-height:1.5; color: var(--ink-navy); }
.check label{ display:inline; margin:0; font-size:14px; font-weight:400;
  letter-spacing:0; color:inherit; }
.hint{ font-size:13px; color: var(--ink-muted); margin-top:7px; line-height:1.5; }
.rule{ display:flex; gap:8px; align-items:center; font-size:12.5px; color: var(--ink-muted);
  margin-top:5px; transition: color .15s var(--ease); }
.rule .tick{ width:13px; text-align:center; }
.rule.pass{ color: var(--accent-teal); }
.rule.fail{ color: var(--ink-muted); }

.msg{ border-radius: var(--r-control); padding:12px 14px; margin:0 0 16px;
  font-size:14px; border:1px solid; }
.msg.ok{ background: rgba(14,147,132,.06); border-color: rgba(14,147,132,.3); color:#0A6E63; }
.msg.info{ background: rgba(96,86,255,.06); border-color: rgba(96,86,255,.28); color:#3B32C9; }
.msg.err{ background: rgba(217,45,32,.05); border-color: rgba(217,45,32,.3); color:#A32017; }

/* ── Pricing ───────────────────────────────────────────────────────────── */
.price{ display:flex; flex-direction:column; }
.badge-slot{ min-height:27px; }
.price .amt{ font-family: var(--font-display); font-size:38px; font-weight:400;
  letter-spacing:-1.8px; color: var(--ink); margin:0 0 2px; }
.price .amt small{ font-size:14px; font-weight:400; color: var(--ink-muted); letter-spacing:0; }
.price ul{ list-style:none; padding:0; margin:18px 0 22px; flex:1; }
.price ul li{ padding:6px 0 6px 24px; position:relative; font-size:14px;
  line-height:1.5; color: var(--ink-navy); }
.price ul li::before{ content:"✓"; position:absolute; left:0; color: var(--accent);
  font-size:12px; font-weight:600; }
.popular{ border-color: rgba(96,86,255,.4); box-shadow: 0 0 0 1px rgba(96,86,255,.22), var(--shadow-lifted); }
.badge{ display:inline-block; align-self:flex-start; font-size:10px; font-weight:600;
  letter-spacing:.08em; text-transform:uppercase; padding:4px 10px;
  border-radius: var(--r-pill); margin-bottom:12px;
  background: var(--accent-grad); color:#FFFFFF; box-shadow: var(--shadow-cta); }

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer{ border-top:1px solid var(--border); padding:28px 0; margin-top:auto; }
.footer .wrap{ display:flex; flex-wrap:wrap; gap:18px; align-items:center; }
.footer a{ color: var(--ink-muted); font-size:13px; }
.footer a:hover{ color: var(--ink-navy); text-decoration:none; }
.footer .copy{ font-size:13px; color: var(--ink-muted); }

/* ── Utilities ─────────────────────────────────────────────────────────── */
.row{ display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.stack{ display:flex; flex-direction:column; gap:12px; }
.right{ margin-left:auto; }
.center{ text-align:center; }
.mt-0{ margin-top:0; } .mb-0{ margin-bottom:0; }
.mt-md{ margin-top:16px; } .mt-lg{ margin-top:24px; } .mt-xl{ margin-top:40px; }
.narrow{ max-width:520px; }
.mid{ max-width:620px; }
.locked{ position:relative; overflow:hidden; }
.locked::after{ content:""; position:absolute; inset:0; pointer-events:none;
  background: linear-gradient(180deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.96) 88%); }
.todo-banner{ border:1px solid rgba(181,71,8,.28); background: rgba(181,71,8,.05);
  color:#8A3707; border-radius: var(--r-control); padding:12px 14px; font-size:13px; margin-bottom:22px; }

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{ transition-duration:.001ms !important; animation-duration:.001ms !important;
    animation-iteration-count:1 !important; }
}
