/* ============================================================
   NEXFLOW ROBOTICS
   Light theme · white ground, solid brand purple, no gradients
   Brand purple #690bff · ink #14082e
   Type: Space Grotesk (display) · Inter (body) · JetBrains Mono (labels)
   ============================================================ */

:root {
  --bg: #ffffff;
  --tint: #f7f4ff;
  --ink: #14082e;
  --ink-dim: #58507a;
  --accent: #690bff;
  --accent-ink: #4f08c4;
  --line: #e6e0f7;
  --line-strong: #cdc0f0;
  --ok: #17a673;
  --radius: 14px;
  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --container: 1240px;
  --pad: clamp(20px, 4vw, 48px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* anchor targets clear the fixed header */
section[id] { scroll-margin-top: 112px; }

/* section rhythm: white and tinted grounds alternate down the page */
.solutions, .faq { background: var(--tint); }

/* ---------- type ---------- */
.label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.label .dot { opacity: 0.45; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.06; letter-spacing: -0.02em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 15px 26px;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-white { background: #fff; color: var(--accent); }
.btn-white:hover { transform: translateY(-1px); }

.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.btn-outline-white:hover { background: #fff; color: var(--accent); }

.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 98px;
  gap: 24px;
}
.nav-logo { flex: 0 0 auto; }
.nav-logo img { height: 54px; width: auto; max-width: none; }

.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-dim);
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--accent); background: var(--tint); }

.nav-cta { display: flex; align-items: center; gap: 12px; }

.nav-burger {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  width: 42px; height: 42px;
  cursor: pointer;
  position: relative;
}
.nav-burger span, .nav-burger span::before, .nav-burger span::after {
  content: "";
  position: absolute;
  left: 11px;
  width: 18px; height: 2px;
  background: var(--ink);
  transition: all 0.2s;
}
.nav-burger span { top: 20px; }
.nav-burger span::before { left: 0; top: -6px; }
.nav-burger span::after { left: 0; top: 6px; }

/* ---------- about (opening section) ---------- */
.about { padding: clamp(130px, 16vw, 190px) 0 clamp(64px, 8vw, 110px); }
.about .label { display: block; margin-bottom: 26px; }
.about h1 {
  font-size: clamp(38px, 5.6vw, 74px);
  max-width: 20ch;
  margin-bottom: 34px;
}
.about h1 .accent { color: var(--accent); }

.about-body {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.about-body p {
  font-size: clamp(16px, 1.7vw, 20px);
  color: var(--ink-dim);
  max-width: 62ch;
}
.about-body p + p { margin-top: 20px; }

.markets { display: grid; gap: 10px; }
.market {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  transition: border-color 0.2s;
}
.market:hover { border-color: var(--line-strong); }
.market .n { color: var(--accent); font-weight: 600; }

/* ---------- solutions ---------- */
.solutions { padding: clamp(64px, 9vw, 120px) 0; border-top: 1px solid var(--line); }
.solutions .label { display: block; margin-bottom: 22px; }
.solutions h2 { font-size: clamp(30px, 4.4vw, 52px); max-width: 22ch; margin-bottom: 22px; }
.solutions .lead {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--ink-dim);
  max-width: 68ch;
  margin-bottom: clamp(44px, 6vw, 68px);
}

/* Each skill is a full-width row: a large animation stage beside its copy, so the
   process text is always readable while the cell keeps running. Rows alternate
   sides and are joined by handover connectors, which reads as a sequence. */
.stack { display: grid; gap: 0; }

.skill {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
  gap: clamp(26px, 4.5vw, 68px);
  align-items: center;
}
/* flipped rows also mirror the column widths, so every stage is the same size */
.skill.flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr); }
.skill.flip .skill-stage { order: 2; }

.skill-stage {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 982 / 711;  /* matches the animation's cropped viewBox */
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.skill:hover .skill-stage { border-color: var(--line-strong); box-shadow: 0 14px 40px rgba(105, 11, 255, 0.08); }
.skill-stage svg { width: 100%; height: 100%; }

.skill-copy .step {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.skill-copy h3 { font-size: clamp(26px, 3.2vw, 40px); margin-bottom: 20px; }
.skill-copy p { font-size: clamp(15px, 1.4vw, 17px); color: var(--ink-dim); line-height: 1.65; max-width: 46ch; }
.skill-copy p + p { margin-top: 16px; }

.handover {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: clamp(26px, 3.5vw, 44px) 0;
  color: var(--accent);
}
.handover svg { width: 15px; height: auto; }
.handover span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* the one solid-purple moment before the closing block */
.claim {
  margin-top: clamp(40px, 5vw, 64px);
  background: var(--accent);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 34px) clamp(26px, 3.4vw, 40px);
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: clamp(15px, 1.4vw, 17px);
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.6;
}
.claim strong { color: #fff; font-weight: 600; }
.claim .led {
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff;
  flex: none;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ---------- RaaS ---------- */
.raas { padding: clamp(64px, 9vw, 120px) 0; border-top: 1px solid var(--line); }
.raas .label { display: block; margin-bottom: 22px; }
.raas h2 { font-size: clamp(30px, 4.4vw, 52px); max-width: 20ch; margin-bottom: 22px; }
.raas .lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-dim); max-width: 64ch; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: clamp(44px, 6vw, 68px);
}
.step-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 34px);
  transition: border-color 0.2s;
}
.step-card:hover { border-color: var(--line-strong); }
.step-card .n {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--accent);
  display: block;
  margin-bottom: 18px;
}
.step-card h3 { font-size: clamp(19px, 1.9vw, 24px); margin-bottom: 12px; }
.step-card p { font-size: 14.5px; color: var(--ink-dim); }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(26px, 3.4vw, 40px);
  margin-top: 18px;
}
.panel h3 { font-size: clamp(19px, 1.9vw, 24px); margin-bottom: 22px; }
.panel ul { list-style: none; display: grid; gap: 13px; }
/* multi-column rather than a 2-up grid: a grid row is as tall as its tallest item,
   so a wrapping bullet left a ragged gap beside it. Columns flow and pack tight. */
.panel.wide ul {
  display: block;
  columns: 2;
  column-gap: clamp(24px, 3vw, 48px);
}
.panel.wide li { break-inside: avoid; margin-bottom: 13px; }
.panel.wide li:last-child { margin-bottom: 0; }
.panel li {
  display: flex;
  gap: 12px;
  font-size: 14.5px;
  color: var(--ink-dim);
  line-height: 1.55;
}
.panel li::before {
  content: "";
  flex: none;
  width: 7px; height: 7px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- more coming soon ---------- */
.soon {
  padding: clamp(72px, 10vw, 130px) 0;
  border-top: 1px solid var(--line);
  text-align: center;
}
.soon .label { display: block; margin-bottom: 24px; }
.soon h2 {
  font-size: clamp(44px, 8vw, 108px);
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}
.soon p {
  font-size: clamp(16px, 1.7vw, 20px);
  color: var(--ink-dim);
  max-width: 58ch;
  margin: 0 auto;
}

/* ---------- FAQ ---------- */
.faq { padding: clamp(64px, 9vw, 120px) 0; border-top: 1px solid var(--line); }
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
}
.faq-head .label { display: block; margin-bottom: 18px; }
.faq-head h2 { font-size: clamp(28px, 3.6vw, 44px); max-width: 15ch; }

.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item .faq-q {
  width: 100%;
  background: none;
  border: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  text-align: left;
  padding: 22px 44px 22px 4px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  line-height: 1.4;
}
.faq-item .faq-q:hover { color: var(--accent); }
.faq-item .faq-q::after {
  content: "+";
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.25s;
}
.faq-item.active .faq-q::after { transform: translateY(-50%) rotate(45deg); }
.faq-item .faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-item .faq-a p { padding: 0 4px 24px; font-size: 15px; color: var(--ink-dim); max-width: 64ch; }
.faq-item.active .faq-a { max-height: 340px; }

/* ---------- backed by ---------- */
.backed {
  background: var(--tint);
  padding: clamp(48px, 6vw, 76px) 0;
  border-top: 1px solid var(--line);
}
.backed .label { display: block; margin-bottom: 28px; }
.vc-row {
  display: flex;
  align-items: center;
  gap: clamp(36px, 6vw, 80px);
  flex-wrap: wrap;
}
/* the resting dim lives on the image: opacity on the anchor would be overwritten
   by .reveal / .reveal.in, which own that property */
.vc { display: block; }
.vc img { opacity: 0.78; transition: opacity 0.2s; }
.vc:hover img { opacity: 1; }
/* size by height so the two marks sit on a common baseline weight */
.vc img { width: auto; max-width: none; height: 30px; }
.vc:last-child img { height: 42px; }   /* Faber's mark is squarer than the wordmark */

/* ---------- build with us + footer ---------- */
.build {
  background: var(--accent);
  color: #fff;
  padding: clamp(80px, 11vw, 140px) 0 0;
}
.build .label { color: rgba(255, 255, 255, 0.8); display: block; margin-bottom: 22px; }
.build h2 { font-size: clamp(34px, 5.4vw, 68px); max-width: 16ch; margin-bottom: 24px; }
.build p { font-size: clamp(16px, 1.6vw, 19px); color: rgba(255, 255, 255, 0.85); max-width: 54ch; margin-bottom: 36px; }
.build .buttons { display: flex; gap: 14px; flex-wrap: wrap; }

.footer-wrap {
  margin-top: clamp(80px, 11vw, 130px);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  padding: clamp(44px, 6vw, 64px) 0 40px;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 2fr) minmax(0, 2fr) minmax(0, 3fr);
  gap: 40px;
  margin-bottom: 56px;
}
.footer-logo img { width: 232px; height: auto; }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: grid; gap: 10px; }
.footer-col a, .footer-col li { font-size: 14px; color: rgba(255, 255, 255, 0.85); }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-address {
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

.footer-bottom a:hover { text-decoration: underline; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  padding-top: 30px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.8);
}

/* ---------- contact page ---------- */
.contact-hero { padding: 150px 0 56px; }
.contact-hero .label { display: block; margin-bottom: 20px; }
.contact-hero h1 { font-size: clamp(40px, 6vw, 82px); margin-bottom: 18px; }
.contact-hero p { color: var(--ink-dim); max-width: 56ch; font-size: clamp(16px, 1.6vw, 19px); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(28px, 4vw, 60px);
  padding-bottom: clamp(72px, 9vw, 120px);
  align-items: start;
}
.contact-single { max-width: 760px; padding-bottom: clamp(72px, 9vw, 120px); }

/* ---------- legal pages ---------- */
.legal { padding-bottom: clamp(72px, 9vw, 120px); }
.legal-body { max-width: 76ch; }
.legal-body h2 {
  font-size: clamp(18px, 1.7vw, 21px);
  margin: 40px 0 12px;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body p { font-size: 15.5px; color: var(--ink-dim); line-height: 1.7; }
.legal-body a { color: var(--accent); text-decoration: underline; }
.legal-note {
  max-width: 76ch;
  margin-top: 48px;
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 20px;
  font-size: 14px;
  color: var(--ink-dim);
}
.form-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3.2vw, 40px);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.field input, .field textarea, .field select {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 13px 16px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(105, 11, 255, 0.16);
}
.field textarea { min-height: 140px; resize: vertical; }

.aside-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 16px;
}
.aside-block h5 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.aside-block p { font-size: 14.5px; color: var(--ink-dim); }

/* ---------- reveals ----------
   One base motion (a short rise) with a few variants, so different kinds of element
   arrive differently instead of every block doing the same fade-up: labels just fade,
   artwork settles in from a slight scale, side columns drift in from their own side,
   and the wide statements lift a little further and slower. */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.in { opacity: 1; transform: none; }

.reveal.r-fade { transform: none; transition-duration: 0.5s; }
.reveal.r-zoom { transform: scale(0.975); transition-duration: 0.85s; }
.reveal.r-left { transform: translateX(-28px); transition-duration: 0.7s; }
.reveal.r-right { transform: translateX(28px); transition-duration: 0.7s; }
.reveal.r-lift { transform: translateY(38px); transition-duration: 0.8s; }

/* the stage is both a reveal target and a hover target: .reveal would otherwise
   replace its border/shadow transition, so restate all four here */
.skill .skill-stage.reveal {
  transition: border-color 0.3s, box-shadow 0.3s,
              opacity 0.85s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.85s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal.d1 { transition-delay: 0.09s; }
.reveal.d2 { transition-delay: 0.18s; }
.reveal.d3 { transition-delay: 0.27s; }
.reveal.d4 { transition-delay: 0.36s; }

@media (max-width: 1000px) {
  /* sideways drift reads as a wobble once the columns stack */
  .reveal.r-left, .reveal.r-right { transform: translateY(22px); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.r-fade, .reveal.r-zoom, .reveal.r-left, .reveal.r-right, .reveal.r-lift {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .claim .led { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .skill, .skill.flip { grid-template-columns: 1fr; gap: 24px; }
  .skill.flip .skill-stage { order: 0; }
  .steps { grid-template-columns: 1fr; }
  .panel.wide ul { columns: 1; }
  .about-body, .faq-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav-burger { display: block; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 98px; left: 0; right: 0;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px var(--pad) 22px;
    gap: 2px;
  }
}

@media (max-width: 620px) {
  .footer-top { grid-template-columns: 1fr; gap: 30px; }
  .form-row { grid-template-columns: 1fr; }
  .nav .btn-primary { padding: 13px 18px; font-size: 11.5px; letter-spacing: 0.06em; }
  .vc img, .vc:last-child img { height: 26px; }
  .vc:last-child img { height: 36px; }
  .nav-logo img { height: 40px; }
  .footer-logo img { width: 190px; }
}
