/* ============ Tokens ============ */
:root {
  --bg: #f5f4ef;
  --bg-alt: #ecebe4;
  --surface: #ffffff;
  --ink: #0e1a24;
  --ink-2: #2b3843;
  --muted: #5b6874;
  --line: #dcdad1;
  --accent: #0d6e66;
  --accent-ink: #ffffff;
  --accent-soft: #d8ece8;
  --warn: #b45309;
  --term-bg: #0e1a24;
  --term-surface: #15242f;
  --term-line: #23384a;
  --term-ink: #dfe7ec;
  --term-muted: #8597a5;
  --term-ok: #34d3b4;
  --term-run: #fbbf24;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(14, 26, 36, .04), 0 8px 24px rgba(14, 26, 36, .06);
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1140px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b131a;
    --bg-alt: #0f1a22;
    --surface: #13202a;
    --ink: #e7edf1;
    --ink-2: #c5d0d8;
    --muted: #93a2ae;
    --line: #22323f;
    --accent: #2cc7ae;
    --accent-ink: #062320;
    --accent-soft: #123430;
    --warn: #fbbf24;
    --term-bg: #08101a;
    --term-surface: #0f1b26;
    --term-line: #1c2d3c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 560px) { .wrap { padding: 0 16px; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -100px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { top: 12px; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1px solid transparent;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--small { padding: 8px 16px; font-size: 14px; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--light { background: #fff; color: #0e1a24; }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn--outline-light:hover { border-color: #fff; }

/* ============ Nav ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.brand__mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: 13px; font-weight: 500;
}
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a:not(.btn) { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; }
.nav__links a:not(.btn):hover { color: var(--ink); }
.nav__toggle { display: none; }

@media (max-width: 820px) {
  .nav__toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 42px; height: 42px; padding: 0 10px; border: 1px solid var(--line);
    border-radius: 10px; background: var(--surface); cursor: pointer;
  }
  .nav__toggle .bar { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease; }
  .nav__toggle[aria-expanded="true"] .bar:nth-child(2) { transform: translateY(4px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav__links .btn { margin-top: 12px; }
}

/* ============ Hero ============ */
.hero { padding: 72px 0 88px; }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; color: var(--muted);
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.dot--live { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); animation: pulse 2.4s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.hero h1 { font-size: clamp(38px, 5.4vw, 62px); margin: 24px 0 20px; letter-spacing: -0.035em; font-weight: 600; }
.lede { font-size: clamp(18px, 1.6vw, 20px); color: var(--ink-2); max-width: 36em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__creds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 36px; color: var(--muted); font-size: 12.5px; }
.hero__creds li { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); white-space: nowrap; }
.hero__creds li::before { content: ""; width: 11px; height: 11px; flex: none; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/contain no-repeat; }
@media (min-width: 640px) { .hero__creds { flex-wrap: nowrap; } }

/* Pipeline visual */
.pipeline {
  margin: 0; background: var(--term-bg); color: var(--term-ink);
  border-radius: var(--radius); border: 1px solid var(--term-line);
  box-shadow: 0 30px 60px -20px rgba(14, 26, 36, .35);
  overflow: hidden;
}
.pipeline__bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--term-line); background: var(--term-surface); }
.pipeline__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--term-line); }
.pipeline__bar code { margin-left: 10px; font-size: 12.5px; color: var(--term-muted); }
.pipeline__steps { padding: 14px 10px; font-family: var(--mono); font-size: 14px; }
.pipeline__steps li {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px;
  padding: 10px 10px; border-radius: 8px; position: relative;
}
.pipeline__steps li + li::before {
  content: ""; position: absolute; left: 20px; top: -10px; height: 20px; width: 1px; background: var(--term-line);
}
.step__icon { width: 16px; height: 16px; position: relative; z-index: 1; justify-self: center; flex: none; }
.ok .step__icon {
  background: var(--term-ok);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/contain no-repeat;
}
.run .step__icon { border-radius: 50%; border: 2px solid var(--term-run); border-top-color: transparent; animation: spin 1s linear infinite; }
.run { background: rgba(251, 191, 36, .07); }
@keyframes spin { to { transform: rotate(360deg); } }
.step__name { color: var(--term-ink); }
.step__meta { color: var(--term-muted); font-size: 12.5px; white-space: nowrap; }
.pipeline figcaption { padding: 14px 20px 18px; font-size: 13.5px; color: var(--term-muted); border-top: 1px solid var(--term-line); }
@media (prefers-reduced-motion: reduce) { .run .step__icon, .dot--live { animation: none; } }

@media (max-width: 480px) {
  .eyebrow { border-radius: 12px; font-size: 12px; align-items: flex-start; }
  .eyebrow .dot { margin-top: 5px; }
}
@media (max-width: 960px) {
  .hero { padding: 48px 0 64px; }
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 420px) {
  .step__meta { font-size: 11.5px; }
  .pipeline__steps { font-size: 13px; }
}

/* ============ Strip ============ */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.strip__grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.strip__grid > div { padding: 22px 16px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); }
.strip__grid > div:first-child { border-left: 0; padding-left: 0; }
.strip strong { font-size: 15px; font-weight: 600; }
.strip span { font-size: 13.5px; color: var(--muted); }
@media (max-width: 900px) {
  .strip__grid { grid-template-columns: repeat(2, 1fr); }
  .strip__grid > div { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .strip__grid > div:nth-child(-n+2) { border-top: 0; }
}

/* ============ Sections ============ */
.section { padding: 104px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 680px; margin-bottom: 48px; }
#approach .section__head { max-width: 820px; }
.kicker { font-family: var(--mono); font-size: 13px; color: var(--accent); margin-bottom: 14px; letter-spacing: .02em; }
.kicker--light { color: #7fe3d1; }
.section__head h2 { font-size: clamp(30px, 3.6vw, 42px); letter-spacing: -0.03em; }
.section__head p:not(.kicker) { margin-top: 16px; color: var(--muted); font-size: 18px; }
@media (max-width: 720px) { .section { padding: 72px 0; } .section__head { margin-bottom: 36px; } }

/* ============ Service cards ============ */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.card__icon { width: 44px; height: 44px; border-radius: 11px; background: var(--accent-soft); display: grid; place-items: center; margin-bottom: 8px; }
.card__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 21px; }
.card p { color: var(--ink-2); }
.card ul { margin-top: 8px; padding-top: 16px; border-top: 1px dashed var(--line); display: grid; gap: 8px; }
.card li { position: relative; padding-left: 20px; font-size: 15px; color: var(--muted); }
.card li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 8px; height: 1.5px; background: var(--accent); }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } .card { padding: 24px; } }

/* ============ Case studies ============ */
.cases { display: grid; gap: 20px; }
.case {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px; box-shadow: var(--shadow);
}
.case__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.tag { font-family: var(--mono); font-size: 12.5px; padding: 4px 10px; border-radius: 6px; }
.tag--accent { background: var(--accent-soft); color: var(--accent); }
.case__status { font-family: var(--mono); font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.case__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.case h3 { font-size: clamp(22px, 2.4vw, 27px); max-width: 30em; }
.case__body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 26px 0 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.case h4 { font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.case__body p { font-size: 15.5px; color: var(--ink-2); }
.case__list { display: grid; gap: 8px; font-size: 15.5px; color: var(--ink-2); }
.case__list li { position: relative; padding-left: 16px; }
.case__list li::before { content: ""; position: absolute; left: 0; top: .65em; width: 6px; height: 1.5px; background: var(--accent); }
.case__body > div:last-child p { color: var(--ink); font-weight: 500; font-style: italic; }
@media (max-width: 860px) {
  .case { padding: 24px; }
  .case__body { grid-template-columns: 1fr; gap: 18px; }
}

.stack { display: flex; flex-wrap: wrap; gap: 6px; }
.stack li {
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-2);
  padding: 4px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg);
}


/* ============ Principles ============ */
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: p; border-top: 1px solid var(--line); }
.principles li { counter-increment: p; padding: 28px 28px 0 0; }
.principles li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.principles li::before { content: "0" counter(p); display: block; font-family: var(--mono); font-size: 13px; color: var(--accent); margin-bottom: 16px; }
.principles h3 { font-size: 19px; line-height: 1.3; min-height: 2.6em; margin-bottom: 10px; }
.principles p { color: var(--muted); font-size: 15.5px; }
@media (max-width: 960px) {
  .principles { grid-template-columns: repeat(2, 1fr); row-gap: 8px; }
  .principles li:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 560px) {
  .principles { grid-template-columns: 1fr; border-top: 0; }
  .principles li, .principles li + li { padding: 24px 0; border-left: 0; border-top: 1px solid var(--line); }
  .principles h3 { min-height: 0; }
}

/* ============ Offers ============ */
.offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.offer { padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s ease; }
.offer:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.offer--featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, var(--shadow); }
.offer--featured:hover { border-color: var(--accent); }
.offer__type { font-family: var(--mono); font-size: 12.5px; color: var(--accent); margin-bottom: 12px; }
.offer h3 { font-size: 22px; margin-bottom: 12px; }
.offer p:not(.offer__type) { color: var(--ink-2); font-size: 15.5px; }
@media (max-width: 900px) { .offers { grid-template-columns: 1fr; } .offer { padding: 24px; } }
.offers__prompt { margin-top: 24px; text-align: center; color: var(--muted); font-size: 15px; }
.offers__prompt a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); }

/* ============ Experience ============ */
.exp { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: start; }
.timeline { border-left: 1px solid var(--line); margin-left: 4px; }
.timeline li { position: relative; padding: 0 0 40px 32px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.timeline__when { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.timeline h3 { font-size: 21px; }
.timeline__where { color: var(--accent); font-weight: 500; margin: 4px 0 10px; font-size: 15.5px; }
.timeline li > p:last-child { color: var(--ink-2); font-size: 15.5px; }

.certs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; position: sticky; top: 96px; }
.certs h3 { font-size: 15px; font-family: var(--mono); font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.certs h3:not(:first-child) { margin-top: 30px; }
.certs > ul:not(.stack) { display: grid; gap: 12px; }
.certs > ul:not(.stack) li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.cert__code { font-family: var(--mono); font-size: 12px; font-weight: 500; min-width: 54px; text-align: center; padding: 4px 6px; border-radius: 6px; background: var(--ink); color: var(--bg); }
@media (max-width: 900px) { .exp { grid-template-columns: 1fr; gap: 40px; } .certs { position: static; padding: 24px; } }

/* ============ Contact ============ */
.contact { background: #0e1a24; color: #e7edf1; padding: 96px 0; position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 80% 50%, black, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 80% 50%, black, transparent 70%);
}
.contact__inner { position: relative; display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: end; }
.contact h2 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.03em; color: #fff; }
.contact p:not(.kicker) { color: #a9b7c2; margin-top: 16px; font-size: 18px; max-width: 34em; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
@media (max-width: 860px) { .contact { padding: 72px 0; } .contact__inner { grid-template-columns: 1fr; gap: 32px; } .contact__actions { justify-content: flex-start; } }

/* ============ Footer ============ */
.footer { background: #0a141c; color: #8597a5; font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; border-top: 1px solid #1c2d3c; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; }

/* ============ Reveal ============ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
