:root {
  --bg: #101113;
  --bg-elevated: #17181b;
  --bg-elevated-2: #1e2024;
  --border: #2b2e33;
  --text: #eef0f2;
  --text-muted: #a8adb4;
  --text-faint: #868c93;
  --accent: #34bbe6;
  --accent-soft: rgba(52, 187, 230, 0.12);
  --accent-dark: #2a96b8;
  --accent-text: #06181f;
  --warn: #d9a441;
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Subtle film-grain texture over the whole site, for depth on dark backgrounds */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--text-muted); }
p.lead { font-size: 1.15rem; color: var(--text); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--accent);
  color: var(--accent-text); padding: 10px 16px; z-index: 1000; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
}
/* backdrop-filter lives on a pseudo-element, not .site-header itself:
   a filter/backdrop-filter on the header creates a new CSS containing block
   for its position:fixed descendants (the mobile nav panel), which breaks
   the full-screen overlay. Keeping it off .site-header avoids that trap. */
.site-header::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(16, 17, 19, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: -1;
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; max-width: var(--maxw); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand svg, .brand-logo { display: block; }

.nav-main { display: flex; align-items: center; gap: 28px; }
.nav-main a { color: var(--text-muted); font-size: 0.95rem; font-weight: 500; }
.nav-main a:hover, .nav-main a[aria-current="page"] { color: var(--text); text-decoration: none; }
.nav-toggle { display: none; }

.header-cta { display: flex; align-items: center; gap: 12px; }

@media (max-width: 860px) {
  .nav-main {
    position: fixed; inset: 60px 0 0 0; background: var(--bg);
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 8px 20px 24px; transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    overflow-y: auto; border-top: 1px solid var(--border);
  }
  .nav-main.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-main a { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--border); }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; background: transparent; border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text); cursor: pointer;
  }
  .header-cta .btn-header-desktop { display: none; }
}

/* Buttons — never pill-shaped */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem; border: 1px solid transparent;
  cursor: pointer; transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 15px 28px; font-size: 1.02rem; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; justify-content: center; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--border);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 55% 55% at 18% -10%, rgba(52, 187, 230, 0.20), transparent 65%),
    radial-gradient(ellipse 42% 40% at 90% 5%, rgba(52, 187, 230, 0.12), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 44px 44px, 44px 44px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); font-weight: 600; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 18px;
}
.hero h1 { max-width: 780px; }
.hero p.lead { max-width: 620px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-meta { margin-top: 36px; display: flex; gap: 28px; flex-wrap: wrap; }
.hero-meta .item { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 0.9rem; }
.hero-meta code {
  font-family: var(--font-mono); background: var(--bg-elevated); border: 1px solid var(--border);
  padding: 3px 8px; border-radius: var(--radius-sm); color: var(--text); font-size: 0.85rem;
}

/* Cards */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px;
}
.card svg.icon { color: var(--accent); margin-bottom: 14px; }
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; }
.card > .btn { margin-top: 16px; }

/* Icon badge — colored chip instead of a bare colored icon */
.icon-badge {
  width: 44px; height: 44px; border-radius: 10px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.icon-badge svg { width: 22px; height: 22px; color: var(--accent); }
.card:hover { border-color: #3a3e45; }

/* Icon */
.icon { width: 24px; height: 24px; flex-shrink: 0; }

/* Section heading */
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head .eyebrow { color: var(--accent); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* Showcase / project items */
.project-item {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center;
  padding: 36px 0; border-bottom: 1px solid var(--border);
}
.project-item:last-child { border-bottom: none; }
@media (max-width: 780px) { .project-item { grid-template-columns: 1fr; } }
.project-item-single { grid-template-columns: 1fr; }
.project-item-single > div:first-child { max-width: 640px; }
.project-tag {
  display: inline-block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--accent); background: rgba(52,187,230,0.1);
  border: 1px solid rgba(52,187,230,0.25); padding: 4px 10px; border-radius: var(--radius-sm); margin-bottom: 12px;
}
.project-stack { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted);
  background: var(--bg-elevated-2); border: 1px solid var(--border); padding: 4px 9px; border-radius: var(--radius-sm);
}
.code-panel {
  background: #0b0c0e; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
  font-family: var(--font-mono); font-size: 0.82rem; color: #9fd8ee; overflow-x: auto;
  white-space: pre-line;
}

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; color: var(--text);
  font-size: 1.05rem; font-weight: 600; padding: 20px 4px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-q svg { flex-shrink: 0; transition: transform 0.15s ease; color: var(--text-muted); }
.faq-item[data-open="true"] .faq-q svg { transform: rotate(45deg); }
.faq-a { padding: 0 4px 20px; color: var(--text-muted); display: none; }
.faq-item[data-open="true"] .faq-a { display: block; }

/* Team */
.team-card { text-align: center; }
.team-avatar {
  width: 88px; height: 88px; border-radius: var(--radius); margin: 0 auto 16px;
  background: var(--bg-elevated-2); border: 1px solid var(--border); overflow: hidden;
  image-rendering: pixelated;
}
.team-role { color: var(--accent); font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.team-name { font-family: var(--font-mono); }

/* Breadcrumbs */
.breadcrumbs { padding: 18px 0 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; font-size: 0.85rem; }
.breadcrumbs li { display: flex; align-items: center; gap: 6px; color: var(--text-faint); }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs li[aria-current] { color: var(--text-faint); }

/* CTA band */
.cta-band {
  background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 56px 0; text-align: center;
}
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-band .hero-actions { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 100px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-faint); margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { color: var(--text-muted); font-size: 0.92rem; }
.footer-bottom {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 0.82rem; color: var(--text-faint);
}
@media (max-width: 780px) { .site-footer { padding-bottom: 120px; } }

/* Sticky mobile CTA */
.sticky-cta {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: var(--bg-elevated); border-top: 1px solid var(--border);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(0,0,0,0.35);
}
@media (max-width: 780px) { .sticky-cta { display: block; } }

/* Forms (legal / static) */
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-size: 0.9rem; font-weight: 600; }
.field input, .field textarea {
  width: 100%; background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text);
  padding: 11px 14px; border-radius: var(--radius); font-family: var(--font); font-size: 0.95rem;
}

/* Prose (legal pages) */
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { color: var(--text-muted); }
.prose { max-width: 760px; }

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.badge-note {
  display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--warn);
  background: rgba(217,164,65,0.08); border: 1px solid rgba(217,164,65,0.3); padding: 10px 14px; border-radius: var(--radius);
}

/* 404 */
.error-page { padding: 120px 0; text-align: center; }
.error-page .code { font-family: var(--font-mono); font-size: 5rem; color: var(--accent); font-weight: 700; line-height: 1; }
