/* ==========================================================
   AI Process Engineer — Design System
   Direction: engineering-log / blueprint. Cool graphite text
   on pale graph-paper background, signal-red used only where
   something is being flagged (anomaly, alert) — not decoration.
   Display: Archivo / Body: Inter / Data: IBM Plex Mono

   Token roles (names kept from an earlier pass so the rest of
   the stylesheet didn't need touching):
   --ink       = page background
   --panel     = raised surface (cards, diagram box)
   --panel-2   = alt section background
   --paper     = primary text
   --paper-dim = secondary/body text
   --white     = strongest-emphasis text (headings)
   --steel(-dim) = secondary/tertiary gray text
   --amber(-dim) = signal-red accent for text/icons/borders
   --amber-bright = signal-red accent for button backgrounds
   ========================================================== */

:root {
  /* Color */
  --ink:        #F6F7F4;   /* page background — pale graph-paper */
  --panel:      #FFFFFF;   /* raised panel background */
  --panel-2:    #EEF0EA;   /* alt panel / section background */
  --line:       #D8DBD2;   /* hairline dividers */
  --line-soft:  #E5E7E0;
  --steel:      #52585A;   /* secondary text, cool graphite */
  --steel-dim:  #767C78;   /* tertiary text */
  --paper:      #1A1D1B;   /* primary text */
  --paper-dim:  #363B37;   /* secondary/body text */
  --amber:      #A8362A;   /* signal-red accent — flags, not decoration */
  --amber-dim:  #7D2820;   /* darker accent — hover states */
  --amber-bright: #C24736; /* accent for button backgrounds */
  --amber-glow: rgba(168, 54, 42, 0.09);
  --white:      #0F1210;   /* strongest-emphasis text (headings) */

  /* Type */
  --font-display: "Archivo", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  /* Layout */
  --container-w: 1160px;
  --radius: 3px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(rgba(82,88,90,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82,88,90,0.05) 1px, transparent 1px),
    radial-gradient(ellipse 900px 500px at 15% -10%, var(--amber-glow), transparent 60%);
  background-size: 28px 28px, 28px 28px, 100% 100%;
  background-repeat: repeat, repeat, no-repeat;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.015em; }

h1 {
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1.02;
  color: var(--white);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.12;
  color: var(--white);
}

h3 {
  font-size: 1.15rem;
  color: var(--paper);
  font-weight: 700;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--amber-dim);
  display: inline-block;
}

.section-sub {
  font-family: var(--font-mono);
  color: var(--steel);
  font-size: 0.85rem;
  margin-top: 10px;
}

.body-text {
  color: var(--paper-dim);
  font-size: 1.02rem;
  max-width: 640px;
  line-height: 1.7;
}
.body-text + .body-text { margin-top: 14px; }

.footnote {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--steel-dim);
  letter-spacing: 0.02em;
  margin-top: 22px;
}

.center { text-align: center; }
.center.body-text,
.center .body-text { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.btn-primary {
  background: var(--amber-bright);
  color: #1A1305;
  font-weight: 600;
}
.btn-primary:hover { background: #f0b158; transform: translateY(-1px); }
.btn-outline {
  border-color: var(--line);
  color: var(--paper-dim);
}
.btn-outline:hover { border-color: var(--steel); color: var(--white); }
.btn-lg { padding: 14px 28px; font-size: 0.88rem; margin-top: 8px; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: rgba(250, 250, 247, 0.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--white);
  letter-spacing: -0.01em;
}
.nav-brand::before {
  content: "◆ ";
  color: var(--amber);
  font-size: 0.7rem;
}
.nav-links {
  display: flex;
  gap: 36px;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--steel);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.2s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav-links a:hover { color: var(--paper); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta { display: inline-flex; }

@media (max-width: 1000px) {
  .nav-links { gap: 22px; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-sub {
  font-family: var(--font-mono);
  color: var(--steel);
  font-size: 0.95rem;
  margin-top: 14px;
}
.hero-desc {
  color: var(--paper-dim);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-top: 14px;
  max-width: 480px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}

/* Draw-tower signature diagram */
.tower {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
}
.tower-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--steel-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.tower svg { width: 100%; height: auto; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; border-top: 1px solid var(--line-soft); }
.bg-white { background: var(--panel-2); }
.section-header { margin-bottom: 36px; max-width: 640px; }
.section-header.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Card grids ---------- */
.card-grid { display: grid; gap: 18px; }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px 22px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.card:hover { border-color: var(--amber-dim); transform: translateY(-2px); }
.card-icon {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--amber);
  letter-spacing: 0.1em;
  border: 1px solid var(--line);
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 12px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--steel); font-size: 0.95rem; line-height: 1.65; }

@media (max-width: 860px) {
  .card-grid.three { grid-template-columns: 1fr; }
}

/* ---------- Steps (how it works) ---------- */
.steps {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.step {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 28px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.step-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--amber);
  padding-top: 2px;
}
.step-body h3 { margin-bottom: 6px; }
.step-body p { color: var(--steel); font-size: 0.95rem; max-width: 560px; }

@media (max-width: 600px) {
  .step { grid-template-columns: 44px 1fr; }
}

/* ---------- Two-col (experience) ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 44px;
  align-items: start;
}
.founder-name a {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--white);
  font-weight: 600;
  border-bottom: 1px solid var(--amber-dim);
  padding-bottom: 2px;
}
.founder-name a:hover { color: var(--amber); }
.founder-title {
  font-family: var(--font-mono);
  color: var(--steel);
  font-size: 0.82rem;
  margin: 6px 0 22px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.two-col .col-text p { color: var(--paper-dim); margin-bottom: 18px; line-height: 1.7; }
.two-col .col-text p strong { color: var(--paper); }

.collaborators { margin-top: 8px; margin-bottom: 20px; }
.collab-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--steel-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.collab-list { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.collab-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  min-width: 200px;
  transition: border-color 0.2s var(--ease);
}
.collab-card:hover { border-color: var(--amber-dim); }
.collab-name { font-weight: 600; color: var(--paper); font-size: 0.92rem; }
.collab-context { font-size: 0.78rem; color: var(--steel-dim); }
.collab-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--amber);
  margin-top: 4px;
}

/* Vertical stack diagram */
.stack {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stack-item {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--paper-dim);
  border: 1px solid var(--line);
  padding: 10px 20px;
  border-radius: 4px;
  width: 100%;
  text-align: center;
}
.stack-item.highlight {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-glow);
}
.stack-arrow { color: var(--steel-dim); padding: 6px 0; font-size: 0.9rem; }

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ---------- Pipeline (deep experience) ---------- */
.pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 24px 0 20px;
}
.pipe-step {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--paper-dim);
  border: 1px solid var(--line);
  padding: 12px 18px;
  border-radius: 4px;
  text-align: center;
  max-width: 240px;
}
.pipe-sep { color: var(--amber-dim); font-size: 0.9rem; }

/* ---------- CTA ---------- */
.cta-section { padding: 72px 0; }
.cta-section .hero-desc { margin: 14px auto 24px; text-align: center; }
.contact-links {
  margin-top: 20px;
  display: flex;
  gap: 14px;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--steel);
}
.contact-links a:hover { color: var(--amber); }
.contact-links .divider { color: var(--line); }

/* ---------- Footer ---------- */
.footer {
  padding: 32px 0 24px;
  border-top: 1px solid var(--line-soft);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
}
.footer-brand strong {
  display: block;
  font-family: var(--font-display);
  color: var(--paper);
  font-size: 0.95rem;
}
.footer-brand span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--steel-dim);
}
.footer-links { display: flex; gap: 20px; font-family: var(--font-mono); font-size: 0.82rem; color: var(--steel); }
.footer-links a:hover { color: var(--amber); }
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--steel-dim);
}

@media (max-width: 600px) {
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ---------- Responsive: hero ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 32px; }
  .navbar { padding: 16px 20px; }
  .container { padding: 0 20px; }
  .section { padding: 48px 0; }
}
