/* ============================================================
   Agentic Intelligence — Design Tokens & Base Styles
   ============================================================ */

:root {
  /* Color — sampled from the Agentic Intelligence mark */
  --bg: #0a0e1a;
  --bg-soft: #0d1220;
  --surface: #10151f;
  --surface-2: #141b28;
  --surface-3: #182031;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f4f6fa;
  --text-muted: #93a0b8;
  --text-faint: #5b6478;

  --blue: #3fa9f5;
  --blue-deep: #1e4fa8;
  --cyan: #56ccf2;
  --green: #6fcf52;
  --green-deep: #237a3f;

  --gradient-signature: linear-gradient(115deg, #1e4fa8 0%, #3fa9f5 32%, #56ccf2 52%, #6fcf52 100%);
  --gradient-text: linear-gradient(95deg, #56ccf2 0%, #6fcf52 100%);
  --gradient-btn: linear-gradient(120deg, #1e6fd9 0%, #2f9be0 55%, #4fb968 100%);

  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 80px rgba(63, 169, 245, 0.12);

  /* Type */
  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  /* Layout */
  --max-w: 1180px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
}

@media (prefers-reduced-motion: no-preference) {
  :root { --motion-ok: 1; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

/* Ambient background texture — faint dotted grid + radial glow, echoes the
   Stakely reference without copying its chat UI */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  z-index: -1;
  background: radial-gradient(circle, rgba(63, 169, 245, 0.14) 0%, rgba(111, 207, 82, 0.06) 45%, transparent 70%);
  pointer-events: none;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; color: var(--text-muted); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gradient-text);
  box-shadow: 0 0 10px rgba(86, 204, 242, 0.8);
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
.btn-primary {
  background: var(--gradient-btn);
  color: #05130b;
  box-shadow: 0 10px 30px rgba(63, 169, 245, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(63, 169, 245, 0.35); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }

.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* ---------- Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 14, 26, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand img { height: 30px; width: auto; object-fit: contain; }
.brand .sub { color: var(--green); font-weight: 500; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
}
.nav-links a { transition: color 0.15s ease; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -19px;
  height: 2px;
  background: var(--gradient-text);
}
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-cta .btn { padding: 10px 20px; font-size: 14px; }

.nav-links a.mobile-cta { display: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text);
  width: 40px; height: 40px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    padding: 22px 28px;
    gap: 20px;
  }
  .nav.open .nav-links a.active::after { display: none; }
  .nav-links a.mobile-cta {
    display: inline-flex;
    justify-content: center;
    margin-top: 6px;
    padding: 13px 20px;
    border-radius: 999px;
    background: var(--gradient-btn);
    color: #05130b;
    font-weight: 600;
  }
}

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--border-strong); }

/* ---------- Section rhythm ---------- */
section { padding: 96px 0; }
section.tight { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 16px; }
.section-head p { font-size: 17px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
  margin-top: 40px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand { max-width: 320px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { font-size: 14.5px; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 14.5px;
  padding: 6px 0;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--cyan); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-faint);
}
.footer-socials { display: flex; gap: 14px; }
.footer-socials a {
  width: 36px; height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.footer-socials a:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- Utility ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ============================================================
   Hero (home)
   ============================================================ */
.hero {
  padding: 76px 0 60px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 58px);
  margin-bottom: 22px;
}
.hero .lede {
  font-size: 18px;
  max-width: 480px;
  margin-bottom: 36px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-art { position: relative; width: 100%; aspect-ratio: 1 / 0.82; }
.hero-art svg { width: 100%; height: 100%; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-art { max-width: 460px; margin: 0 auto; order: -1; }
}

/* Platform strip */
.strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 30px 0;
}
.strip-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.strip-label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}
.strip-pills { display: flex; gap: 10px; flex-wrap: wrap; }

/* Feature cards (what I build) */
.feature-card .icon-badge { margin-bottom: 22px; }
.feature-card h3 { font-size: 20px; margin-bottom: 10px; }
.feature-card p { font-size: 15px; }
.icon-badge {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
}
.icon-badge svg { width: 22px; height: 22px; }

/* CTA band */
.cta-band {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(63,169,245,0.14), rgba(111,207,82,0.10));
  border: 1px solid var(--border-strong);
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 8px; }
.cta-band p { font-size: 15.5px; }

/* Process (numbered — real sequence, used on Services + teaser on Home) */
.process-list { display: flex; flex-direction: column; }
.process-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  padding: 30px 0;
  border-top: 1px solid var(--border);
}
.process-item:last-child { border-bottom: 1px solid var(--border); }
.process-num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-faint);
  padding-top: 4px;
}
.process-body h3 { font-size: 19px; margin-bottom: 8px; }
.process-body p { font-size: 15px; max-width: 560px; }
@media (max-width: 640px) {
  .process-item { grid-template-columns: 1fr; gap: 8px; }
}

/* ============================================================
   Services page
   ============================================================ */
.service-card { display: flex; flex-direction: column; gap: 18px; }
.service-card h3 { font-size: 21px; }
.service-card > p { font-size: 15px; }
.service-card ul {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.service-card li {
  font-size: 14.5px;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.service-card li::before {
  content: "";
  flex: none;
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-top: 7px;
  background: var(--gradient-text);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
@media (max-width: 860px) { .services-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Contact page
   ============================================================ */
.contact-hero { text-align: center; padding: 88px 0 20px; }
.contact-hero .eyebrow { justify-content: center; }
.contact-hero h1 { font-size: clamp(32px, 4.6vw, 48px); margin-bottom: 16px; }
.contact-hero p { font-size: 17px; max-width: 560px; margin: 0 auto; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.contact-card:hover { transform: translateY(-4px); border-color: var(--cyan); }
.contact-card .icon-badge { width: 52px; height: 52px; border-radius: 14px; }
.contact-card .icon-badge svg { width: 24px; height: 24px; }
.contact-card h3 { font-size: 19px; }
.contact-card p { font-size: 14.5px; }
.contact-card .handle {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--cyan);
  word-break: break-word;
}

.contact-note {
  margin-top: 48px;
  text-align: center;
  padding: 36px;
}
.contact-note p { font-size: 15px; margin-bottom: 18px; }

/* ============================================================
   Work Request (form) page
   ============================================================ */
.form-page-head { text-align: center; padding: 80px 0 10px; }
.form-page-head .eyebrow { justify-content: center; }
.form-page-head h1 { font-size: clamp(30px, 4.4vw, 44px); margin-bottom: 14px; }
.form-page-head p { font-size: 16.5px; max-width: 520px; margin: 0 auto; }

.form-wrap { max-width: 620px; margin: 0 auto; padding-bottom: 100px; }

.form-card { padding: 40px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 9px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(86, 204, 242, 0.15);
}
.field textarea { resize: vertical; min-height: 120px; font-family: var(--font-body); }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2393a0b8'><path d='M5.5 7.5l4.5 4.5 4.5-4.5' stroke='%2393a0b8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 40px;
}
.field-error {
  font-size: 12.5px;
  color: #f28b82;
  margin-top: 6px;
  display: none;
}
.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: #f28b82; }
.field.invalid .field-error { display: block; }

.form-status {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  margin-top: 20px;
}
.form-status.show { display: flex; }
.form-status.success { background: rgba(111, 207, 82, 0.12); border: 1px solid rgba(111, 207, 82, 0.35); color: #b7e8a6; }
.form-status.error { background: rgba(242, 139, 130, 0.1); border: 1px solid rgba(242, 139, 130, 0.35); color: #f2b3ac; }
.form-status a { text-decoration: underline; color: inherit; }

.setup-note {
  max-width: 620px;
  margin: 0 auto 28px;
  padding: 14px 18px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  line-height: 1.6;
}

/* ---------- Hero art motion ---------- */
.hero-art .wave-drift-1 { animation: driftA 7s ease-in-out infinite; }
.hero-art .wave-drift-2 { animation: driftB 9s ease-in-out infinite; }
.hero-art .wave-drift-3 { animation: driftA 8s ease-in-out infinite reverse; }
.hero-art .wave-drift-4 { animation: driftB 10s ease-in-out infinite reverse; }

@keyframes driftA { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(10px); } }
@keyframes driftB { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-8px); } }

.hero-art .node circle { transform-box: fill-box; transform-origin: center; }
.hero-art .pulse-a circle { animation: pulseGlow 3s ease-in-out infinite; }
.hero-art .pulse-b circle { animation: pulseGlow 3.6s ease-in-out infinite 0.6s; }
.hero-art .pulse-c circle { animation: pulseGlow 4.2s ease-in-out infinite 1.2s; }
@keyframes pulseGlow {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 0px rgba(255,255,255,0)); }
  50% { opacity: 0.55; filter: drop-shadow(0 0 9px rgba(86, 204, 242, 0.9)); transform: scale(1.18); }
}
