/* ============================================================
   STEP-CM Analytics — shared design system
   ============================================================ */
:root {
  --bg: #060912;
  --bg-2: #0a0f1e;
  --surface: rgba(255, 255, 255, 0.028);
  --surface-2: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(120, 200, 255, 0.28);
  --text: #e8edf7;
  --muted: #93a0ba;
  --muted-dim: #63708c;
  --accent-1: #34e2ff;
  --accent-2: #7c8bff;
  --accent-3: #b57cff;
  --grad: linear-gradient(120deg, var(--accent-1), var(--accent-2) 55%, var(--accent-3));
  --radius: 16px;
  --maxw: 1160px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Ambient background ---------- */
.bg-fx {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(680px 520px at 78% -8%, rgba(52, 226, 255, 0.14), transparent 60%),
    radial-gradient(620px 620px at 12% 6%, rgba(124, 139, 255, 0.13), transparent 60%),
    radial-gradient(900px 700px at 50% 108%, rgba(181, 124, 255, 0.10), transparent 60%),
    var(--bg);
}
.bg-grid {
  position: fixed; inset: 0; z-index: -1;
  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: 58px 58px;
  mask-image: radial-gradient(circle at 50% 22%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 22%, #000 0%, transparent 72%);
  opacity: 0.6;
}

/* ---------- Layout primitives ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { position: relative; }
/* Stop anchor jumps from hiding section tops under the sticky header. */
section[id], main[id] { scroll-margin-top: 88px; }

.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent-1);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: linear-gradient(90deg, var(--accent-1), transparent); }
.eyebrow.center { justify-content: center; }
.eyebrow.center::before { display: none; }

.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Nav ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(6, 9, 18, 0.55); border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 650; letter-spacing: -0.01em; font-size: 17px; color: var(--text); text-decoration: none; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--grad);
  display: grid; place-items: center; box-shadow: 0 0 22px rgba(52, 226, 255, 0.35); position: relative;
}
.brand .mark svg { width: 17px; height: 17px; }
.brand small { font-family: var(--mono); font-weight: 500; color: var(--muted); font-size: 11px; letter-spacing: 0.14em; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14.5px; padding: 8px 14px; border-radius: 9px; transition: color 0.2s, background 0.2s; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--text); }
.nav-cta { color: var(--text) !important; border: 1px solid var(--border-bright); background: var(--surface) !important; }
.nav-cta:hover { border-color: var(--accent-1); box-shadow: 0 0 18px rgba(52,226,255,0.18); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 550;
  padding: 13px 22px; border-radius: 11px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s;
  font-family: inherit;
}
.btn-primary { background: var(--grad); color: #04121b; font-weight: 650; box-shadow: 0 8px 30px rgba(52, 226, 255, 0.22); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 38px rgba(52, 226, 255, 0.34); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--border-bright); background: var(--surface-2); }

/* ---------- Section headings ---------- */
.sec-head { max-width: 640px; margin-bottom: 46px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head h2 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.025em; font-weight: 700; margin: 16px 0 14px; line-height: 1.12; }
.sec-head p { color: var(--muted); font-size: 16.5px; }
.sec-head p strong { color: var(--text); font-weight: 650; }
.divider-pad { padding: 92px 0; }

/* ---------- Page hero (subpages) ---------- */
.page-hero { padding: 84px 0 46px; }
.page-hero h1 { font-size: clamp(34px, 5vw, 54px); letter-spacing: -0.03em; line-height: 1.06; font-weight: 700; margin: 20px 0 18px; }
.page-hero p.lead { font-size: 18px; color: var(--muted); max-width: 56ch; }

/* ---------- Home hero ---------- */
.hero { padding: 96px 0 84px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 54px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.4vw, 62px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; margin: 22px 0 20px; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 40ch; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-actions.center { justify-content: center; }
.trust { margin-top: 40px; display: flex; gap: 30px; flex-wrap: wrap; }
.trust .stat { display: flex; flex-direction: column; }
.trust .stat b { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.trust .stat span { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-dim); }
/* ---------- Acronym line (decodes STEP-CM) ---------- */
.acronym {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 20px;
}
.acronym-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-dim);
}
.acronym-word {
  font-size: 15.5px;
  color: var(--muted);
  letter-spacing: 0.005em;
  position: relative;
}
.acronym-word + .acronym-word::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 50%;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--muted-dim);
  transform: translateY(-50%);
}
.acronym-word em {
  font-style: normal;
  font-weight: 700;
  color: var(--text);
  border-bottom: 2px solid var(--accent-1);
  padding-bottom: 1px;
}

/* ---------- Hero data panel ---------- */
.viz {
  position: relative; border: 1px solid var(--border); border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  padding: 20px; box-shadow: 0 30px 80px -30px rgba(0,0,0,0.8); overflow: hidden;
}
.viz::before {
  content: ""; position: absolute; inset: 0; border-radius: 20px; padding: 1px;
  background: linear-gradient(140deg, rgba(52,226,255,0.5), transparent 40%, transparent 70%, rgba(181,124,255,0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.viz-head { display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--muted-dim); letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 6px 14px; }
.viz-dots { display: flex; gap: 6px; }
.viz-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-2); display: block; }
.viz-dots i:nth-child(1){ background: rgba(52,226,255,.6); }
.viz-dots i:nth-child(2){ background: rgba(124,139,255,.6); }
.viz-dots i:nth-child(3){ background: rgba(181,124,255,.6); }
.viz svg { width: 100%; display: block; }
.grid-line { stroke: rgba(255,255,255,0.06); stroke-width: 1; }
.curve { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.4s ease forwards 0.3s; }
.curve.two { animation-delay: 0.6s; opacity: 0.85; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.pt { opacity: 0; animation: pop 0.4s ease forwards; }
@keyframes pop { to { opacity: 1; } }
.viz-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.chip { border: 1px solid var(--border); border-radius: 11px; padding: 11px 12px; background: var(--surface); }
.chip span { font-family: var(--mono); font-size: 10px; color: var(--muted-dim); letter-spacing: 0.1em; text-transform: uppercase; display: block; margin-bottom: 3px; }
.chip b { font-size: 15px; font-weight: 650; }

/* ---------- Cards ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { position: relative; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 26px 24px; transition: transform 0.2s ease, border-color 0.2s, background 0.2s; }
.card:hover { transform: translateY(-4px); border-color: var(--border-bright); background: var(--surface-2); }
.card .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(140deg, rgba(52,226,255,0.16), rgba(124,139,255,0.10)); border: 1px solid var(--border); margin-bottom: 18px; }
.card .ic svg { width: 23px; height: 23px; stroke: var(--accent-1); }
.card h3 { font-size: 18.5px; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.svc { display: flex; gap: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 26px; transition: border-color 0.2s, background 0.2s; }
.svc:hover { border-color: var(--border-bright); background: var(--surface-2); }
.svc .num { font-family: var(--mono); font-size: 12px; color: var(--accent-1); letter-spacing: 0.1em; padding-top: 3px; min-width: 30px; }
.svc h3 { font-size: 18px; font-weight: 650; margin-bottom: 7px; letter-spacing: -0.01em; }
.svc p { color: var(--muted); font-size: 14.5px; }

/* ---------- Detailed service blocks (services page) ---------- */
.svc-detail { display: grid; grid-template-columns: 60px 1fr; gap: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 32px; margin-bottom: 18px; transition: border-color 0.2s, background 0.2s; }
.svc-detail:hover { border-color: var(--border-bright); background: var(--surface-2); }
.svc-detail .num { font-family: var(--mono); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.svc-detail h3 { font-size: 22px; font-weight: 650; letter-spacing: -0.015em; margin-bottom: 12px; }
.svc-detail p { color: var(--muted); font-size: 15.5px; margin-bottom: 16px; max-width: 66ch; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; background: var(--bg-2); }

/* Advisory service: different in kind from the methodological ones, so give it
   a subtle accent treatment rather than letting it read as just another row. */
.svc-detail.feature {
  border-color: var(--border-bright);
  background:
    radial-gradient(520px 220px at 88% 12%, rgba(52,226,255,0.10), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
}
.svc-detail.feature .tag { border-color: rgba(120,200,255,0.3); color: var(--text); }

/* ---------- Approach band ---------- */
.band {
  border: 1px solid var(--border); border-radius: 22px;
  background: radial-gradient(600px 300px at 85% 20%, rgba(124,139,255,0.10), transparent 70%), linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  padding: 54px 48px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 44px; align-items: center;
}
.band h2 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.025em; margin-bottom: 16px; line-height: 1.15; }
.band p { color: var(--muted); font-size: 16px; margin-bottom: 12px; }
.stack-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.stack-list li { display: flex; gap: 13px; align-items: flex-start; font-size: 15px; color: var(--text); }
.stack-list b { font-weight: 600; }
.stack-list .tick { width: 22px; height: 22px; border-radius: 6px; flex: none; display: grid; place-items: center; margin-top: 1px; background: linear-gradient(140deg, rgba(52,226,255,0.2), rgba(124,139,255,0.12)); border: 1px solid var(--border-bright); }
.stack-list .tick svg { width: 12px; height: 12px; stroke: var(--accent-1); }

/* ---------- About / bio ---------- */
.bio-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: start; }
.bio-photo { position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--border); background: linear-gradient(160deg, rgba(52,226,255,0.10), rgba(181,124,255,0.10)); aspect-ratio: 4 / 5; }
.bio-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bio-photo .ph { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted-dim); font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; padding: 20px; }
.bio-photo .monogram { font-family: var(--font); font-size: 76px; font-weight: 700; letter-spacing: -0.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: 0.85; }
.bio-body h2, .bio-name { font-size: clamp(26px, 3vw, 34px); font-weight: 700; letter-spacing: -0.025em; margin: 14px 0 8px; line-height: 1.15; }
.bio-name span { font-size: 0.52em; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 4px; white-space: nowrap; }
.bio-role { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; line-height: 1.75; color: var(--accent-1); text-transform: uppercase; margin-bottom: 22px; max-width: 54ch; }
.bio-body p { color: var(--muted); font-size: 16px; margin-bottom: 16px; max-width: 62ch; }
.bio-body strong { color: var(--text); font-weight: 600; }
.cred-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.cred { border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; background: var(--surface); }
.cred b { display: block; font-size: 16px; font-weight: 650; }
.cred span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-dim); }

/* ---------- Portfolio ---------- */
.pf-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.pf-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: transform 0.2s, border-color 0.2s; display: flex; flex-direction: column; }
.pf-card:hover { transform: translateY(-4px); border-color: var(--border-bright); }
.pf-visual { height: 190px; border-bottom: 1px solid var(--border); background: linear-gradient(160deg, rgba(52,226,255,0.06), rgba(124,139,255,0.04)); position: relative; overflow: hidden; }
.pf-visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pf-body { padding: 24px; }
.pf-body .kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-1); }
.pf-body h3 { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; margin: 10px 0 8px; }
.pf-body p { color: var(--muted); font-size: 14.5px; }

/* ---------- Contact / forms ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.contact-info h2 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.025em; margin: 14px 0 14px; line-height: 1.15; }
.contact-info p { color: var(--muted); font-size: 16px; margin-bottom: 24px; max-width: 44ch; }
.contact-meta { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.contact-meta a, .contact-meta div { display: flex; align-items: center; gap: 13px; color: var(--text); text-decoration: none; font-size: 15px; }
.contact-meta .mic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); flex: none; }
.contact-meta .mic svg { width: 18px; height: 18px; stroke: var(--accent-1); }
.contact-meta small { display: block; color: var(--muted-dim); font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }

.form-card { border: 1px solid var(--border); border-radius: 20px; background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)); padding: 32px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-family: var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px;
  padding: 13px 15px; color: var(--text); font-family: inherit; font-size: 15px; transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-dim); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent-1); box-shadow: 0 0 0 3px rgba(52,226,255,0.12); }
.field textarea { resize: vertical; min-height: 130px; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2393a0ba' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 42px; }
.form-note { font-size: 12.5px; color: var(--muted-dim); margin-top: 14px; }
.form-note code { font-family: var(--mono); color: var(--muted); }

/* ---------- CTA ---------- */
.cta-final { text-align: center; padding: 96px 0 40px; }
.cta-final h2 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.03em; margin-bottom: 16px; line-height: 1.1; }
.cta-final p { color: var(--muted); font-size: 17px; max-width: 46ch; margin: 0 auto 30px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); margin-top: 60px; padding: 46px 0 40px; }
.foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; flex-wrap: wrap; }
.foot .brand { margin-bottom: 12px; }
.foot p { color: var(--muted-dim); font-size: 13.5px; max-width: 34ch; }
.foot-links { display: flex; gap: 40px; flex-wrap: wrap; }
.foot-col h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-dim); margin-bottom: 14px; }
.foot-col a { display: block; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 9px; transition: color 0.2s; }
.foot-col a:hover { color: var(--accent-1); }
.foot-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted-dim); font-size: 13px; font-family: var(--mono); letter-spacing: 0.04em; }

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .band, .bio-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 56px; }
  .cards-3, .services, .pf-grid { grid-template-columns: 1fr; }
  .nav-links a:not(.nav-cta) { display: none; }
  .band { padding: 36px 26px; }
  .bio-photo { max-width: 340px; }
}
@media (prefers-reduced-motion: reduce) {
  .curve { animation: none; stroke-dashoffset: 0; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
