/* XStep design system
   Type: Geist (display/body) + Geist Mono (labels, data)
   Palette: near-black canvas, warm off-white text, 1AP-style electric blue */

:root {
  --bg: #08090b;
  --bg-2: #0d0f12;
  --surface: #121519;
  --line: rgba(236, 236, 230, 0.1);
  --line-strong: rgba(236, 236, 230, 0.2);
  --text: #ecece6;
  --text-2: #a7a9ab;
  --text-3: #74777b;
  --blue: #001cff;
  --blue-hover: #2b44ff;
  --blue-text: #7d8cff;
  --logo-blue: #3b55ff;  /* brand blue tuned for dark backgrounds */

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(80px, 11vw, 160px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.05; letter-spacing: -0.035em; text-wrap: balance; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue-text); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--blue); color: #fff; padding: 8px 14px; }
.skip:focus { left: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); }
.muted { color: var(--text-2); }
.small { font-size: 14px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 20px;
}
.eyebrow .accent, .accent { color: var(--blue-text); }

/* ---------- Type scale ---------- */
.display { font-size: clamp(44px, 7.4vw, 108px); font-weight: 500; letter-spacing: -0.045em; line-height: 0.98; }
.h1 { font-size: clamp(40px, 5.6vw, 80px); letter-spacing: -0.04em; }
.h2 { font-size: clamp(32px, 4vw, 56px); }
.h3 { font-size: clamp(22px, 2vw, 28px); letter-spacing: -0.02em; line-height: 1.2; }
.lead { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; color: var(--text-2); max-width: 46ch; letter-spacing: -0.01em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 13px 18px; border: 1px solid transparent;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn-lg { padding: 17px 24px; font-size: 14px; }

.link-arrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); display: inline-flex; gap: 10px; align-items: center; border-bottom: 1px solid var(--line-strong); padding-bottom: 4px; transition: border-color .2s; }
.link-arrow:hover { border-color: var(--blue-text); }
.link-arrow .arrow { transition: transform 0.25s var(--ease); }
.link-arrow:hover .arrow { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { background: rgba(8, 9, 11, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; color: var(--text); }
.brand .logo { height: 42px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 30px; font-size: 15px; }
.nav a:not(.btn) { color: var(--text-2); transition: color 0.2s; position: relative; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--blue-text); }
.nav-cta { margin-left: 8px; padding: 10px 14px; }
.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; padding: 10px 8px; cursor: pointer; }
.nav-toggle span { display: block; height: 1.5px; background: var(--text); margin: 6px 0; transition: transform 0.25s var(--ease); }
.nav-open .nav-toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-open .nav-toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

@media (max-width: 940px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 72px 0 0 0; background: var(--bg);
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 24px var(--gutter); font-size: 28px; letter-spacing: -0.02em;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  }
  .nav a:not(.btn) { color: var(--text); padding: 14px 0; border-bottom: 1px solid var(--line); width: 100%; }
  .nav a[aria-current="page"]::after { display: none; }
  .nav-cta { margin: 28px 0 0; }
  .nav-open .nav { opacity: 1; visibility: visible; transform: none; }
  .nav-open .site-header { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-open { overflow: hidden; }
}

/* ---------- Imagery ---------- */
.photo { position: relative; overflow: hidden; background: var(--bg-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.12) brightness(0.62); }
.photo::after { content: ""; position: absolute; inset: 0; background: var(--blue); mix-blend-mode: color; opacity: 0.22; pointer-events: none; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; padding: 140px 0 clamp(48px, 7vw, 96px); overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media.photo img { filter: grayscale(1) contrast(1.15) brightness(0.5); transform: scale(1.04); animation: drift 24s var(--ease) forwards; }
.hero-media::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(8,9,11,0.55) 0%, rgba(8,9,11,0.1) 35%, rgba(8,9,11,0.85) 82%, var(--bg) 100%); }
.hero-grid { position: absolute; inset: 0; z-index: 1; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 96px 96px; mask-image: linear-gradient(180deg, transparent, #000 30%, #000 60%, transparent); -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 60%, transparent); opacity: 0.5; }
.hero .wrap { position: relative; z-index: 2; width: 100%; }
.hero h1 { max-width: 13ch; }
.hero .lead { margin-top: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 40px; }
@keyframes drift { to { transform: scale(1); } }

.page-hero { padding: 180px 0 clamp(56px, 8vw, 112px); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-hero h1 { max-width: 16ch; }
.page-hero .lead { margin-top: 28px; }
.page-hero.has-photo { min-height: 72svh; display: flex; align-items: flex-end; }
.page-hero.has-photo .hero-media { position: absolute; inset: 0; }
.page-hero .wrap { position: relative; z-index: 2; width: 100%; }

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; border-bottom: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; margin-bottom: clamp(48px, 6vw, 88px); }
.section-head .lead { justify-self: end; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; gap: 24px; } .section-head .lead { justify-self: start; } }

/* Proof strip */
.proof { border-bottom: 1px solid var(--line); padding: 28px 0; }
.proof-inner { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
.proof-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); max-width: 22ch; line-height: 1.5; }
.proof-names { display: flex; flex-wrap: wrap; gap: 10px 40px; font-size: clamp(16px, 1.5vw, 20px); color: var(--text-2); letter-spacing: -0.01em; font-weight: 500; }
@media (max-width: 760px) { .proof-inner { grid-template-columns: 1fr; gap: 16px; } .proof-names { gap: 8px 24px; } }

/* Numbered columns */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.cols > * { padding: 32px 32px 8px 0; border-right: 1px solid var(--line); }
.cols > * + * { padding-left: 32px; }
.cols > *:last-child { border-right: 0; }
.num { font-family: var(--mono); font-size: 13px; color: var(--blue-text); display: block; margin-bottom: 40px; }
.cols h3 { margin-bottom: 14px; }
.cols p { color: var(--text-2); }
.cols.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) {
  .cols, .cols.two { grid-template-columns: 1fr; }
  .cols > *, .cols > * + * { padding: 28px 0 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .num { margin-bottom: 20px; }
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.stat { padding: 32px 32px 0 0; }
.stat + .stat { padding-left: 32px; border-left: 1px solid var(--line); }
.stat-value { font-size: clamp(44px, 5.4vw, 76px); font-weight: 500; letter-spacing: -0.045em; line-height: 1; }
.stat-value .unit { color: var(--blue-text); }
.stats-2 { grid-template-columns: 1fr 1fr; }
.stat-text { font-size: clamp(26px, 2.8vw, 40px); letter-spacing: -0.03em; line-height: 1.1; max-width: 18ch; }
.stat-label { margin-top: 14px; color: var(--text-2); font-size: 15px; max-width: 26ch; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr; } .stat, .stat + .stat { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line); } }

/* Diagnose / Build split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.split > * { background: var(--bg); padding: clamp(28px, 4vw, 56px); }
.split h3 { font-size: clamp(32px, 3.6vw, 52px); letter-spacing: -0.04em; margin: 8px 0 20px; }
.split p { color: var(--text-2); max-width: 40ch; }
.split .tag { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue-text); }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* Service rows */
.service-group + .service-group { margin-top: clamp(64px, 8vw, 112px); }
.group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line-strong); flex-wrap: wrap; }
.group-head h3 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.035em; }
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) 32px; gap: 24px; align-items: baseline;
  padding: 26px 0; border-bottom: 1px solid var(--line);
  transition: background 0.25s var(--ease), padding 0.25s var(--ease);
}
a.row:hover { background: var(--bg-2); padding-left: 16px; padding-right: 16px; }
.row .num { margin: 0; }
.row h4 { font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.025em; line-height: 1.2; }
.row p { margin: 0; color: var(--text-2); }
.row .arrow { color: var(--text-3); transition: transform 0.25s var(--ease), color 0.25s; justify-self: end; }
a.row:hover .arrow { color: var(--blue-text); transform: translateX(4px); }
@media (max-width: 760px) { .row { grid-template-columns: 1fr; gap: 6px; } .row .arrow { display: none; } }

/* Feature (case) */
.case { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: stretch; }
.case .photo { min-height: 460px; }
.case-body { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.case-body .stats { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .case { grid-template-columns: 1fr; } .case .photo { min-height: 300px; } }

/* Industries / tag list */
.tags { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.tags li { font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em; padding: 9px 14px; border: 1px solid var(--line-strong); color: var(--text-2); transition: border-color .2s, color .2s; }
.tags li:hover { border-color: var(--blue-text); color: var(--text); }

/* Two-column text block */
.prose-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 6vw, 96px); }
.prose-grid .body p { color: var(--text-2); font-size: 18px; }
.prose-grid .body p strong { color: var(--text); font-weight: 500; }
@media (max-width: 860px) { .prose-grid { grid-template-columns: 1fr; } }

/* Detail blocks (service pages) */
.detail { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 6vw, 96px); padding: clamp(48px, 6vw, 88px) 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.detail:first-child { border-top: 0; padding-top: 0; }
.detail h2 { font-size: clamp(30px, 3.4vw, 48px); letter-spacing: -0.04em; margin-top: 4px; }
.detail .body > p { color: var(--text-2); font-size: 19px; line-height: 1.55; }
.checklist { list-style: none; padding: 0; margin: 28px 0 0; border-top: 1px solid var(--line); }
.checklist li { padding: 14px 0 14px 28px; border-bottom: 1px solid var(--line); position: relative; color: var(--text); }
.checklist li::before { content: ""; position: absolute; left: 2px; top: 23px; width: 10px; height: 2px; background: var(--blue-text); }
.callout { margin-top: 28px; padding: 24px 28px; border: 1px solid var(--line-strong); background: var(--bg-2); }
.callout .eyebrow { margin-bottom: 8px; color: var(--blue-text); }
.callout p { margin: 0; color: var(--text-2); }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; gap: 20px; } }

/* Marketplace */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filter { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; padding: 9px 14px; border: 1px solid var(--line-strong); background: none; color: var(--text-2); cursor: pointer; transition: all .2s; }
.filter:hover { color: var(--text); border-color: var(--text-2); }
.filter[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.product { background: var(--bg); padding: 28px; display: flex; flex-direction: column; min-height: 340px; transition: background .25s var(--ease); position: relative; }
.product:hover { background: var(--bg-2); }
.product-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.status { padding: 4px 8px; border: 1px solid var(--line-strong); color: var(--text-2); }
.status.live { border-color: var(--blue-text); color: var(--blue-text); }
.product-glyph { margin: 48px 0 32px; width: 56px; height: 56px; border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--blue-text); font-family: var(--mono); font-size: 18px; transition: border-color .25s, background .25s, color .25s; }
.product:hover .product-glyph { border-color: var(--blue); background: var(--blue); color: #fff; }
.product h3 { margin-top: 56px; font-size: 24px; letter-spacing: -0.025em; margin-bottom: 10px; }
.product p { color: var(--text-2); font-size: 15px; flex: 1; }
.product-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.product[hidden] { display: none; }
@media (max-width: 1000px) { .products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .products { grid-template-columns: 1fr; } .product { min-height: 0; } }

/* Insights */
.posts { border-top: 1px solid var(--line); }
.post { display: grid; grid-template-columns: 160px 1fr auto; gap: 32px; padding: 32px 0; border-bottom: 1px solid var(--line); align-items: baseline; transition: padding .25s var(--ease), background .25s var(--ease); }
a.post:hover { padding-left: 16px; padding-right: 16px; background: var(--bg-2); }
.post h3 { font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -0.03em; line-height: 1.15; }
.post p { color: var(--text-2); margin: 10px 0 0; max-width: 60ch; }
@media (max-width: 760px) { .post { grid-template-columns: 1fr; gap: 8px; } }

/* Contact */
.contact-intro { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 5vw, 80px); margin-bottom: clamp(40px, 5vw, 64px); }
.cal-embed { width: 100%; min-height: 640px; overflow: auto; border: 1px solid var(--line); background: var(--bg-2); }
@media (max-width: 900px) { .contact-intro { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { padding: var(--section) 0 32px; }
.footer-cta { padding-bottom: clamp(64px, 8vw, 120px); border-bottom: 1px solid var(--line); }
.footer-title { font-size: clamp(40px, 6vw, 88px); letter-spacing: -0.045em; max-width: 14ch; margin-bottom: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding: 56px 0; }
.footer-grid a:not(.brand) { display: block; color: var(--text-2); padding: 4px 0; font-size: 15px; transition: color .2s; }
.footer-grid a:not(.brand):hover { color: var(--text); }
.footer-brand p { margin-top: 20px; max-width: 32ch; }
.footer-base { display: flex; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); letter-spacing: 0.04em; text-transform: uppercase; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Reveal motion ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media (max-width: 760px) { .stats-2 { grid-template-columns: 1fr; } }
.hero .eyebrow, .page-hero.has-photo .eyebrow { color: var(--text-2); }
.hero .lead, .page-hero.has-photo .lead { color: #c4c6c8; }
.footer-brand .logo { height: 48px; }
@media (max-width: 940px) { .brand .logo { height: 36px; } }
.cal-embed.is-booked { min-height: 0; display: grid; place-items: center; padding: clamp(40px, 7vw, 96px) 24px; }
.booked { max-width: 56ch; text-align: center; }
.booked .lead { margin: 20px auto; color: var(--text); }
