:root {
  --ink: #0b0b0b;
  --paper: #ffffff;
  --soft: #f5f5f4;
  --muted: #5f5f5f;
  --line: #e4e4e2;
  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1120px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f5f5f4;
    --paper: #0b0b0b;
    --soft: #151515;
    --muted: #a3a3a3;
    --line: #262626;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 6px; z-index: 20; }
.skip:focus { left: 8px; }

/* Brand: logo PNGs used as masks so they follow the text colour */
.logo {
  display: block;
  width: 118px; height: 45px;
  background: currentColor;
  -webkit-mask: url(/assets/logo.png) center / contain no-repeat;
          mask: url(/assets/logo.png) center / contain no-repeat;
}
.logo-sm { width: 94px; height: 36px; }
.icon {
  display: block;
  width: 56px; height: 56px;
  background: currentColor;
  -webkit-mask: var(--src) left center / contain no-repeat;
          mask: var(--src) left center / contain no-repeat;
}
.icon-security { --src: url(/assets/icon-security.png); }
.icon-software { --src: url(/assets/icon-software.png); }
.icon-scale    { --src: url(/assets/icon-scale.png); }

/* Type */
.eyebrow {
  margin: 0 0 16px;
  font: 600 13px/1 var(--body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.display {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 112%;
  font-size: clamp(38px, 7vw, 84px);
  line-height: 1.04;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.display-sm { font-size: clamp(32px, 5vw, 56px); }
.title {
  margin: 0 0 48px;
  max-width: 20ch;
  font: 600 clamp(28px, 3.6vw, 44px)/1.15 var(--body);
  letter-spacing: -0.02em;
}
.lede { margin: 24px 0 0; max-width: 40ch; font-size: clamp(18px, 2vw, 22px); color: var(--muted); }
h3 { margin: 0 0 8px; font: 600 20px/1.3 var(--body); letter-spacing: -0.01em; }
p { margin: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  border-radius: 999px;
  font: 500 16px/1 var(--body);
  text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-ghost { border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn-lg { min-height: 56px; padding: 0 32px; font-size: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
          backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 32px; height: 72px; }
.brand { text-decoration: none; }
nav { margin-left: auto; }
.nav-links { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; }
.nav-links a { font-size: 15px; color: var(--muted); text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(96px, 16vw, 180px) 0 clamp(96px, 14vw, 160px); }
.hero-inner { position: relative; }
.hero-mark {
  position: absolute;
  right: -6vw; top: 50%;
  width: min(62vw, 720px); height: auto;
  transform: translateY(-50%);
  fill: var(--ink); opacity: .06;
  pointer-events: none;
}

/* Sections */
.section { padding: clamp(88px, 12vw, 140px) 0; border-top: 1px solid var(--line); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card {
  padding: 36px 32px 40px;
  background: var(--soft);
  border-radius: 20px;
}
.card .icon { margin-bottom: 40px; }
.card p { color: var(--muted); }

.mission { background: #0b0b0b; color: #f5f5f4; padding: clamp(96px, 13vw, 160px) 0; }
.mission .eyebrow { color: #a3a3a3; }
.mission .title { max-width: 18ch; margin-bottom: 32px; font-size: clamp(32px, 4.6vw, 56px); }
.mission-body { max-width: 60ch; font-size: clamp(18px, 1.8vw, 21px); color: #c9c9c7; }
.mission-body + .mission-body { margin-top: 20px; }
@media (prefers-color-scheme: dark) {
  .mission { background: #f5f5f4; color: #0b0b0b; }
  .mission .eyebrow { color: #5f5f5f; }
  .mission-body { color: #3d3d3d; }
}

.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; margin: 0; padding: 0; list-style: none; }
.points li { border-top: 2px solid var(--ink); padding-top: 24px; }
.num { display: block; margin-bottom: 20px; font: 700 14px/1 var(--display); letter-spacing: 0.12em; color: var(--muted); }
.points p { color: var(--muted); }

.contact { padding: clamp(96px, 14vw, 160px) 0; background: var(--soft); text-align: center; }
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.contact .lede { margin: 20px auto 40px; }

.site-footer { padding: 32px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-inner .logo { color: var(--ink); }
.footer-inner p { flex: 1; }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--ink); }

/* Projects page */
.page-hero { padding: clamp(80px, 12vw, 140px) 0 clamp(48px, 7vw, 80px); }
.page-hero .lede { max-width: 46ch; }
.projects { display: grid; gap: 24px; padding-bottom: clamp(88px, 12vw, 140px); }
.project {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 48px;
  padding: clamp(28px, 4vw, 48px);
  background: var(--soft);
  border-radius: 24px;
}
.project-head { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.project-icon { width: 72px; height: 72px; border-radius: 18px; flex-shrink: 0; }
.project-name { margin: 0; font: 600 clamp(28px, 3.4vw, 36px)/1.1 var(--body); letter-spacing: -0.02em; }
.project-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px; color: var(--muted);
}
.tag-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #1a7f37; }
.project-summary { font-size: clamp(18px, 1.8vw, 20px); }
.project-body { margin-top: 12px; color: var(--muted); }
.project .actions { margin-top: 32px; }
.features { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.features li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.features svg { flex-shrink: 0; margin-top: 3px; }
.features strong { display: block; font-weight: 600; }
.features span { color: var(--muted); font-size: 15px; }
.project-more {
  display: flex; align-items: center; justify-content: center;
  min-height: 120px;
  border: 1px dashed var(--line);
  border-radius: 24px;
  color: var(--muted);
  font-size: 15px;
}
@media (prefers-color-scheme: dark) { .tag-live::before { background: #3fb950; } }
@media (max-width: 860px) { .project { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

/* Scroll reveal (only when JS + motion allowed) */
.js-reveal .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.js-reveal .reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 860px) {
  .cards, .points { grid-template-columns: minmax(0, 1fr); }
  .points { gap: 40px; }
}
@media (max-width: 640px) {
  .nav-links li:not(.nav-keep) { display: none; }
  .header-inner { gap: 16px; height: 64px; }
  .logo { width: 104px; height: 40px; }
  .wrap { padding: 0 16px; }
  .hero-mark { right: -30vw; width: 90vw; }
  .actions .btn { flex: 1 1 100%; }
  .btn-lg { font-size: 16px; padding: 0 20px; }
  .footer-inner p { flex-basis: 100%; order: 3; }
}
