/* Avant Garde Software — tokens from the design system (dark theme) */
:root {
  --signal-blue: #3B82F6;
  --circuit-cyan: #22D3EE;
  --code-violet: #A78BFA;
  --surface: #141B26;
  --surface-raised: #1F2733;
  --surface-sunken: #0B0F16;
  --ink: #EEF2F7;
  --steel: #8FB8D8;
  --ink-muted: #9AA8BA;
  --border: #2A3442;
  --border-strong: #5B6B80;
  --success: #34D399;
  --danger: #F87171;

  --font: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px;

  --wrap: 1160px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 300;
}

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); max-width: 22ch; }
h3 { font-size: 1.15rem; line-height: 1.35; }
p { margin: 0; }
a { color: var(--circuit-cyan); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--circuit-cyan); outline-offset: 3px; border-radius: 4px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.sr-only, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--surface); padding: 8px 12px; border-radius: var(--radius-sm); z-index: 100; }
.skip:focus { left: 8px; }

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--steel);
  font-weight: 400;
  margin-bottom: var(--space-4);
}
.accent-text { color: var(--steel); font-weight: 400; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  background: var(--signal-blue); color: #fff;
  font: 500 1rem/1 var(--font); text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: #2563EB; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-raised); color: var(--ink); }
.btn-small { min-height: 40px; padding: var(--space-2) var(--space-4); font-size: 0.9rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); min-height: 72px; flex-wrap: wrap; padding-block: var(--space-2); }
.brand { display: inline-flex; align-items: center; gap: var(--space-3); text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; gap: 5px; }
.brand-name { font-weight: 600; font-size: 1.05rem; letter-spacing: 0.08em; }
.brand-sub { font-weight: 300; font-size: 0.62rem; letter-spacing: 0.62em; color: var(--steel); }
.nav { display: flex; align-items: center; gap: var(--space-6); flex-wrap: wrap; }
.nav a:not(.btn) { color: var(--ink-muted); text-decoration: none; font-weight: 400; font-size: 0.95rem; }
.nav a:not(.btn):hover { color: var(--ink); }

/* Hero */
.hero { padding-block: clamp(56px, 9vw, 112px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, var(--border) 1.2px, transparent 1.4px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 60% 70% at 85% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 85% 40%, #000 20%, transparent 75%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--space-12); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: var(--space-6); }
.lead { font-size: 1.15rem; color: var(--ink-muted); max-width: 56ch; }
.hero-actions { display: flex; gap: var(--space-4); flex-wrap: wrap; margin-top: var(--space-2); }

/* Review card */
.review-card {
  margin: 0;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .6);
  min-width: 0;
}
.review-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
.file { font-family: var(--mono); font-size: 0.82rem; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.04em; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill-ai { color: var(--code-violet); background: rgba(167, 139, 250, .12); border: 1px solid rgba(167, 139, 250, .35); }
.diff { margin: 0; padding: var(--space-4) 0; background: var(--surface-sunken); overflow-x: auto; font-family: var(--mono); font-size: 0.82rem; line-height: 1.8; }
.diff code { display: block; min-width: max-content; }
.ln { display: block; padding-inline: var(--space-4); }
.ln.add { background: rgba(52, 211, 153, .08); color: #A7F3D0; }
.ln.del { background: rgba(248, 113, 113, .08); color: #FECACA; }
.review-note { display: flex; gap: var(--space-3); padding: var(--space-4); align-items: flex-start; }
.note-icon { width: 28px; height: 28px; flex: none; color: var(--surface); background: var(--circuit-cyan); border-radius: 50%; padding: 4px; }
.note-title { font-weight: 500; font-size: 0.9rem; }
.note-body { color: var(--ink-muted); font-size: 0.9rem; line-height: 1.55; }

/* Bands */
.band { padding-block: clamp(64px, 9vw, 112px); border-top: 1px solid var(--border); }
.band-alt { background: var(--surface-sunken); }
.band h2 + .section-lead, .band h2 + p { margin-top: var(--space-4); }
.section-lead { color: var(--ink-muted); max-width: 60ch; font-size: 1.05rem; }

/* Steps */
.steps { list-style: none; padding: 0; margin: var(--space-12) 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); counter-reset: none; }
/* Each step spans 3 shared rows (number, title, text) so titles and text line up across columns */
.step { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: var(--space-3); align-content: start; padding-top: var(--space-6); border-top: 2px solid var(--border); }
@supports not (grid-template-rows: subgrid) {
  .step { display: flex; flex-direction: column; gap: var(--space-3); }
}
.step:nth-child(3) { border-top-color: var(--circuit-cyan); }
.step-num { font-family: var(--mono); font-size: 0.85rem; color: var(--steel); }
.step p { color: var(--ink-muted); font-size: 0.97rem; }

/* Services */
.services { margin-top: var(--space-12); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
.service { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.svc-icon { width: 28px; height: 28px; color: var(--circuit-cyan); }
.service p { color: var(--ink-muted); font-size: 0.97rem; }

/* Eyebrow spans the full row so the heading and the right-hand column start at the same height */
.grid-eyebrow { grid-column: 1 / -1; margin-bottom: calc(var(--space-4) - var(--space-12)); }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--space-12); align-items: start; }
.about-grid > div { display: flex; flex-direction: column; gap: var(--space-4); }
.about-grid > div p { color: var(--ink-muted); max-width: 60ch; }
.facts { margin: 0; display: grid; gap: var(--space-4); }
.fact { padding: var(--space-6); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-raised); }
.fact dt { font-size: 2rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fact dd { margin: var(--space-1) 0 0; color: var(--ink-muted); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--space-12); align-items: start; }
.contact-grid > div { display: flex; flex-direction: column; gap: var(--space-4); }
.contact-grid > div p { color: var(--ink-muted); max-width: 46ch; }
.form { display: flex; flex-direction: column; gap: var(--space-4); background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-8); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.field label { font-size: 0.9rem; font-weight: 400; }
.optional { color: var(--ink-muted); }
.field input, .field select, .field textarea {
  width: 100%; font: 300 1rem/1.5 var(--font); color: var(--ink);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4); min-height: 48px;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--circuit-cyan); outline-offset: 1px; border-color: transparent; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }
.form .btn { align-self: flex-start; }
.form-status { font-size: 0.95rem; min-height: 1.5em; }
.form-status.ok { color: var(--success); }
.form-status.err { color: var(--danger); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding-block: var(--space-8); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.brand-footer .brand-mark { width: 32px; height: 32px; }
.footer-meta { color: var(--ink-muted); font-size: 0.9rem; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .nav { gap: var(--space-4); }
  .nav a:not(.btn) { display: none; }
  .steps, .services, .field-row { grid-template-columns: minmax(0, 1fr); }
  .form { padding: var(--space-6); }
  .form .btn, .hero-actions .btn { width: 100%; }
}
