/* Agen8 AI — one stylesheet, no build step, no dependencies.
   A marketing page that needs a toolchain and 300 packages to render is its own
   argument against the people who wrote it. This loads in one request. */

:root {
  --bg:        #0c0d0f;
  --bg-raised: #131518;
  --bg-inset:  #17191d;
  --rule:      #23262b;
  --rule-soft: #1b1e22;

  --ink:       #edeef0;
  --ink-2:     #a8adb5;
  --ink-3:     #868c94;   /* AA against --bg; #71767e measured 4.25:1 */

  /* One accent. A second would be a decision nobody made. */
  --accent:    #6ee7a8;
  --accent-dim:#2a6b4c;

  --measure: 34rem;
  --page: 1120px;

  --sans: ui-sans-serif, -apple-system, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:        #fbfbfa;
    --bg-raised: #ffffff;
    --bg-inset:  #f3f3f1;
    --rule:      #e3e3df;
    --rule-soft: #ecece8;
    --ink:       #16181b;
    --ink-2:     #4b5158;
    --ink-3:     #61666d; /* AA against --bg; #7d838b measured 3.69:1 */
    --accent:    #14684a;
    --accent-dim:#a8dcc3;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

a { color: inherit; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-inset);
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
  padding: 0.1em 0.36em;
}

.dim { color: var(--ink-3); }

.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: var(--bg);
  padding: 0.6rem 1rem; border-radius: 6px; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

:where(a, button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ───────────────────────────────────────────────────────────── header ── */

.site {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem;
  max-width: var(--page); margin: 0 auto;
  padding: 1.4rem 1.5rem;
}

.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 600; letter-spacing: -0.01em; text-decoration: none;
  font-size: 1.05rem;
}
.brand .mark { color: var(--accent); flex: none; }

.site nav { display: flex; align-items: center; gap: 1.6rem; }
.site nav a {
  text-decoration: none; color: var(--ink-2); font-size: 0.95rem;
  transition: color 120ms;
}
.site nav a:hover { color: var(--ink); }
.site nav .cta {
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 7px;
  padding: 0.42rem 0.9rem;
}
.site nav .cta:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 720px) {
  .site { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .site nav { gap: 1.1rem; flex-wrap: wrap; }
}

/* ─────────────────────────────────────────────────────────────── hero ── */

/* `--page` PLUS the horizontal padding, so the hero's text lands on the same
   left edge as every band below it. Sized to `--page` alone, the hero box is
   centred and *then* padded, putting its content 24px inboard of every heading
   underneath — a misalignment too small to notice and too regular to forgive. */
.hero {
  max-width: calc(var(--page) + 3rem); margin: 0 auto;
  padding: 5.5rem 1.5rem 4.5rem;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.4rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5.2vw, 3.55rem);
  line-height: 1.1;
  letter-spacing: -0.028em;
  font-weight: 600;
  /* Wide enough that the deliberate <br> is the only break. At 20ch the first
     clause wrapped after "to", which put "demo" alone on a line and made the
     sentence read as two fragments. */
  max-width: 26ch;
}

.lede {
  margin: 1.6rem 0 0;
  max-width: var(--measure);
  font-size: 1.12rem;
  color: var(--ink-2);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 2.4rem 0 0; }

.btn {
  display: inline-block; text-decoration: none;
  padding: 0.72rem 1.25rem;
  border: 1px solid var(--rule); border-radius: 8px;
  font-size: 0.97rem; font-weight: 500;
  transition: border-color 120ms, background 120ms, color 120ms;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary {
  background: var(--accent); border-color: var(--accent); color: #06231a;
}
.btn.primary:hover { filter: brightness(1.08); }

@media (prefers-color-scheme: light) {
  .btn.primary { color: #ffffff; }
}

.hero-note {
  margin: 1.8rem 0 0;
  font-size: 0.92rem; color: var(--ink-3);
  max-width: var(--measure);
}

/* ─────────────────────────────────────────────────────────────── band ── */

.band {
  border-top: 1px solid var(--rule-soft);
  padding: 4.5rem 1.5rem;
}
.band > * { max-width: var(--page); margin-inline: auto; }
.band.alt { background: var(--bg-raised); }
/* The prose keeps the page container so its left edge lines up with the heading
   above it; the reading width is imposed on the paragraphs instead. Constraining
   the container was the obvious move and put the two out of alignment — first
   centred against a left-aligned heading, then flush to the viewport. */
.band.narrow .prose { max-width: var(--page); margin-inline: auto; }
.band.narrow .prose p { max-width: 46rem; }

.band-head { margin-bottom: 2.8rem; }
.band-head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em; font-weight: 600;
}
.band-head p {
  margin: 0.75rem 0 0; color: var(--ink-2); max-width: var(--measure);
}

.prose p { color: var(--ink-2); margin: 0 0 1.15rem; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 600; }

/* ─────────────────────────────────────────────────────────── services ── */

.services {
  display: grid; gap: 1px;
  /* Two columns, not three: four services auto-fitted to three leaves the
     fourth alone on its own row. `min(420px, 100%)` because a bare 420px floor
     cannot shrink below itself, which made a 390px phone scroll sideways. */
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
  border-radius: 12px; overflow: hidden;
}
.services article { background: var(--bg); padding: 2rem 1.8rem; }
.band.alt .services article { background: var(--bg-raised); }

.services .num {
  font-family: var(--mono); font-size: 0.78rem;
  color: var(--accent); letter-spacing: 0.08em;
}
.services h3 {
  margin: 0.7rem 0 0.7rem;
  font-size: 1.22rem; letter-spacing: -0.015em; font-weight: 600;
}
.services p { margin: 0; color: var(--ink-2); font-size: 0.98rem; }
.services ul { margin: 1.1rem 0 0; padding: 0; list-style: none; }
.services li {
  position: relative; padding-left: 1.1rem;
  margin-bottom: 0.5rem;
  font-size: 0.93rem; color: var(--ink-2);
}
.services li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent-dim);
}

/* ─────────────────────────────────────────────────────────────── work ── */

.cat {
  font-family: var(--mono);
  font-size: 0.76rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 1.1rem;
  display: flex; align-items: center; gap: 0.7rem;
}
.cat::after {
  content: ""; flex: 1; height: 1px; background: var(--rule-soft);
}
.cat .soon {
  font-size: 0.7rem; letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid var(--accent-dim); border-radius: 999px;
  padding: 0.1rem 0.5rem;
  text-transform: none;
}

.work {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  margin-bottom: 3.2rem;
}
.work.soon-grid {
  margin-bottom: 0;
  /* Four again; keep them square rather than 3 + 1. */
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
}

.proj {
  background: var(--bg);
  border: 1px solid var(--rule-soft);
  border-radius: 12px;
  padding: 1.7rem 1.6rem;
}
.band.alt .proj { background: var(--bg); }
.proj.muted { background: transparent; border-style: dashed; }

.proj-head { display: flex; align-items: center; gap: 0.7rem; }
.proj-head h3 { margin: 0; font-size: 1.2rem; letter-spacing: -0.015em; font-weight: 600; }

.tag {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em;
  color: var(--ink-3);
  border: 1px solid var(--rule); border-radius: 999px;
  padding: 0.12rem 0.5rem;
}

.tagline {
  margin: 0.55rem 0 0.75rem;
  color: var(--accent); font-size: 0.94rem;
}
.proj p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }

.stats {
  display: flex; flex-wrap: wrap; gap: 1.4rem;
  margin: 1.3rem 0 0; padding: 1.1rem 0 0;
  border-top: 1px solid var(--rule-soft);
}
.stats div { display: flex; flex-direction: column; gap: 0.15rem; }
.stats dt {
  font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3);
}
.stats dd {
  margin: 0; font-family: var(--mono); font-size: 0.86rem; color: var(--ink);
}

/* ──────────────────────────────────────────────────────────────── how ── */

.how {
  display: grid; gap: 1.1rem 2.4rem;
  /* Four items, so two columns. Three would leave the fourth on a row of its
     own — the same stranded-card problem as the services grid. */
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
}
.how article {
  border-left: 2px solid var(--accent-dim);
  padding: 0.15rem 0 0.15rem 1.4rem;
}
.how h3 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem; letter-spacing: -0.01em; font-weight: 600;
}
.how p { margin: 0; color: var(--ink-2); font-size: 0.96rem; }

/* ──────────────────────────────────────────────────────────── contact ── */

.contact { text-align: left; }
/* `margin: 0 auto`, not `margin: 0` — the shorthand overrode the
   `margin-inline: auto` from `.band > *` and pinned this heading to the
   viewport edge while its own lede stayed in the column. */
.contact h2 {
  margin: 0 auto;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  letter-spacing: -0.025em; font-weight: 600;
}
.contact .lede { margin-top: 1.1rem; }
.mail { margin: 2rem 0 0; }
.mail a {
  font-size: clamp(1.15rem, 3vw, 1.6rem);
  font-family: var(--mono);
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
  padding-bottom: 0.1rem;
}
.mail a:hover { border-bottom-color: var(--accent); }

/* ─────────────────────────────────────────────────────────────── foot ── */

.site-foot {
  border-top: 1px solid var(--rule-soft);
  max-width: var(--page); margin: 0 auto;
  padding: 2.2rem 1.5rem 3.5rem;
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between; align-items: baseline;
  font-size: 0.9rem;
}
.site-foot a { color: var(--ink-2); }
.site-foot a:hover { color: var(--accent); }
.brand-sm { font-weight: 600; margin-right: 0.7rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
