/* AnveAI — anveai.com
   Design read: B2B landing for technical buyers. Dark-tech, engineering-credible.
   Dials: VARIANCE 7 / MOTION 4 / DENSITY 4.
   Theme: dual-mode via tokens. One accent (violet, brand continuity from AnveVoice),
   used flat — no glows, no gradient text. One radius scale. */

@font-face {
  font-family: "Geist";
  src: url("/assets/Geist-Regular.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/Geist-Medium.woff2") format("woff2");
  font-weight: 500; font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/Geist-SemiBold.woff2") format("woff2");
  font-weight: 600; font-display: swap;
}

:root {
  --bg: #ffffff;
  --bg-sunken: #f6f6f7;
  --bg-raised: #ffffff;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --text: #18181b;
  --text-muted: #52525b;
  --text-faint: #71717a;
  --accent: #4a18ed;
  --accent-text: #ffffff;
  --accent-quiet: #f1ecfe;

  --radius: 10px;
  --radius-sm: 6px;
  --maxw: 1200px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0b;
    --bg-sunken: #101012;
    --bg-raised: #161619;
    --line: #26262b;
    --line-strong: #35353c;
    --text: #f4f4f5;
    --text-muted: #a1a1aa;
    --text-faint: #8b8b94;
    --accent: #8b6cf6;
    --accent-text: #0a0a0b;
    --accent-quiet: #1a1530;
  }
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- nav: single line, 64px ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: 64px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: -0.02em; font-size: 17px; }
.brand-mark { width: 22px; height: 22px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14.5px; color: var(--text-muted); }
.nav-links a { transition: color 0.2s var(--ease); white-space: nowrap; }
.nav-links a:hover { color: var(--text); }
@media (max-width: 860px) { .nav-links { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 500; white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text-faint); background: var(--bg-sunken); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }

/* ---------- hero: asymmetric split ---------- */
.hero { padding: 88px 0 76px; border-bottom: 1px solid var(--line); }
@media (max-width: 900px) { .hero { padding: 56px 0 48px; } }
.hero-grid {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 56px; align-items: center;
}
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; gap: 44px; } }

.eyebrow {
  font-family: var(--mono); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--text-faint); margin: 0 0 20px;
}
h1 {
  margin: 0 0 22px;
  font-size: clamp(2.15rem, 3.9vw, 3.05rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 600;
}
.hero p.lede {
  margin: 0 0 32px; font-size: 18px; color: var(--text-muted);
  max-width: 46ch;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- section scaffolding ---------- */
section { padding: 88px 0; }
@media (max-width: 900px) { section { padding: 60px 0; } }
.section-head { max-width: 62ch; margin-bottom: 48px; }
h2 {
  margin: 0 0 14px; font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.15; letter-spacing: -0.03em; font-weight: 600;
}
.section-head p { margin: 0; color: var(--text-muted); font-size: 17px; }
h3 { margin: 0 0 10px; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.sunken { background: var(--bg-sunken); border-block: 1px solid var(--line); }

/* ---------- services: asymmetric bento, varied fills ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cell {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; background: var(--bg-raised);
  display: flex; flex-direction: column;
}
.cell p { margin: 0; color: var(--text-muted); font-size: 15px; }
.cell-lead { grid-column: span 4; }
.cell-side { grid-column: span 2; }
.cell-half { grid-column: span 3; }
.cell-accent { background: var(--accent-quiet); border-color: color-mix(in srgb, var(--accent) 26%, var(--line)); }
.cell-figure { padding: 0; overflow: hidden; }
.cell-figure img { width: 100%; height: 100%; object-fit: cover; min-height: 190px; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .cell-lead, .cell-side, .cell-half { grid-column: span 1; }
}
.cell-num {
  font-family: var(--mono); font-size: 12px; color: var(--accent);
  margin-bottom: 14px;
}

/* ---------- products: split rows ---------- */
.product {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center;
  padding: 40px 0; border-bottom: 1px solid var(--line);
}
.product:last-child { border-bottom: 0; }
@media (max-width: 900px) { .product { grid-template-columns: 1fr; gap: 24px; } }
.product-media img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; height: 240px; object-fit: cover; }
.product h3 { font-size: 22px; letter-spacing: -0.02em; }
.product p { color: var(--text-muted); margin: 0 0 18px; }
.tag {
  display: inline-block; font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint);
  margin-bottom: 12px;
}

/* ---------- open source: card grid ---------- */
.repos { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.repo {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  background: var(--bg-raised);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
  display: flex; flex-direction: column;
}
.repo:hover { border-color: var(--text-faint); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .repo:hover { transform: none; } }
.repo-name { font-family: var(--mono); font-size: 14.5px; font-weight: 500; margin-bottom: 8px; color: var(--text); }
.repo p { margin: 0 0 16px; font-size: 14px; color: var(--text-muted); flex: 1; }
.repo-meta { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-faint); font-family: var(--mono); }

/* ---------- engagement: horizontal steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 28px; border-right: 1px solid var(--line); background: var(--bg-raised); }
.step:last-child { border-right: 0; }
@media (max-width: 900px) {
  .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .step:last-child { border-bottom: 0; }
}
.step h3 { font-size: 16px; }
.step p { margin: 0; font-size: 14.5px; color: var(--text-muted); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 14px; font-weight: 500; color: var(--text); }
.field input, .field textarea {
  font-family: inherit; font-size: 15px; color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 11px 13px;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field input:focus, .field textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent;
}
.field .hint { font-size: 13px; color: var(--text-muted); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--text-muted); font-size: 14px; }
.foot-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a:hover { color: var(--text); }

/* ---------- scroll reveal (motivated: sequences content on entry) ----------
   Progressive enhancement: content is visible by default and only starts hidden
   when JS is running, so a failed observer or blocked script can never leave the
   page blank. */
html.js .reveal:not(.in) { opacity: 0; transform: translateY(16px); }
.reveal { transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal:not(.in) { opacity: 1; transform: none; }
  .reveal { transition: none; }
}
