/* Flowix landing.
   Tokens mirror brand/tokens.css — change colours there first, then here.
   System: editorial, left-aligned, hairline rules, numbered section indices,
   short corners (brand: controls max 8px), one glow only (Método line). */

:root {
  --fx-ink: #01010d;
  --fx-blue: #1a6eff;
  --fx-white: #ffffff;

  /* Derived */
  --fx-surface: #07091a;
  --fx-line: rgba(255, 255, 255, 0.1);
  --fx-line-strong: rgba(255, 255, 255, 0.18);
  --fx-text: var(--fx-white);
  --fx-text-muted: rgba(255, 255, 255, 0.7);
  --fx-text-dim: rgba(255, 255, 255, 0.6);   /* AA on ink at small sizes */

  /* Accent from the 2026 social posts (caption underline). Decoration only, never text. */
  --fx-flow: linear-gradient(90deg, #03d8ba 0%, #4085c2 50%, #7e32cb 100%);

  --fx-font: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --r-node: 1px;
  --r-control: 6px;
  --r-card: 4px;
  --wrap: 1200px;
  --gutter: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fx-ink);
  color: var(--fx-text);
  font-family: var(--fx-font);
  font-weight: 400;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
h1, h2 { font-weight: 400; letter-spacing: -0.045em; line-height: 0.98; text-wrap: balance; }
h3 { font-weight: 500; font-size: 20px; letter-spacing: -0.015em; line-height: 1.2; }
p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
::selection { background: var(--fx-blue); color: #fff; }
:focus-visible { outline: 2px solid var(--fx-blue); outline-offset: 3px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--fx-blue); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Primitives ---------- */
/* Section index / label: plain text, no box */
.idx {
  font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  font-variant-numeric: tabular-nums; color: var(--fx-text-muted);
}
.idx--dim { color: var(--fx-text-dim); }

.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 22px;
  font: 500 15px/1 var(--fx-font);
  text-decoration: none; cursor: pointer;
  border-radius: var(--r-control);
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn--primary { background: var(--fx-blue); color: #fff; }
.btn--primary:hover { background: #0f5fe8; }
.btn--ghost { background: transparent; color: #fff; border-color: var(--fx-line-strong); }
.btn--ghost:hover { border-color: rgba(255,255,255,0.45); }
.btn--sm { --h: 38px; padding: 0 16px; font-size: 14px; }
.btn--xs { --h: 30px; padding: 0 12px; font-size: 13px; }

/* Gradient underline, as in the social posts. Hero word and footer only. */
.u-flow { position: relative; white-space: nowrap; }
.u-flow::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.04em; height: 0.06em; min-height: 2px;
  background: var(--fx-flow);
  transform-origin: left; transform: scaleX(0);
  transition: transform 1.1s var(--ease) 0.5s;
}
.is-in .u-flow::after, .footer .u-flow::after { transform: scaleX(1); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 10px 0 auto; z-index: 50; pointer-events: none; }
.nav__inner {
  pointer-events: auto;
  /* 18px inner padding sits outside the content edge, so the logo lines up with .wrap */
  width: min(100% - 8px, calc(var(--wrap) + 36px)); margin-inline: auto;
  display: flex; align-items: center; gap: 24px;
  height: 60px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--r-control);
  transition: background 0.3s, border-color 0.3s;
}
.nav.is-scrolled .nav__inner { background: rgba(1, 1, 13, 0.88); border-color: var(--fx-line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.nav__logo img { height: 26px; width: auto; }
.nav__links { display: flex; gap: 28px; margin-left: auto; margin-right: 12px; }
.nav__links a { text-decoration: none; font-size: 14px; color: var(--fx-text-muted); padding: 6px 0; border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.nav__links a:hover { color: #fff; }
.nav__links a.is-active { color: #fff; border-bottom-color: var(--fx-blue); }
.nav__toggle { display: none; margin-left: auto; width: 42px; height: 42px; background: transparent; border: 1px solid var(--fx-line-strong); border-radius: var(--r-control); cursor: pointer; padding: 0; }
.nav__toggle span { display: block; width: 18px; height: 1.5px; background: #fff; margin: 5px auto; transition: transform 0.3s var(--ease); }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
.nav__menu {
  pointer-events: auto;
  width: min(100% - 8px, calc(var(--wrap) + 36px)); margin: 6px auto 0;
  display: grid; padding: 8px 18px 18px;
  background: var(--fx-ink); border: 1px solid var(--fx-line); border-radius: var(--r-control);
}
.nav__menu[hidden] { display: none; }
.nav__menu a:not(.btn) { text-decoration: none; padding: 14px 0; font-size: 18px; border-bottom: 1px solid var(--fx-line); }
.nav__menu .btn { margin-top: 18px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 168px 0 64px; overflow: hidden; isolation: isolate; }
.hero__flow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::after { /* fade into page */
  content: ""; position: absolute; inset: auto 0 0; height: 160px; z-index: -1;
  background: linear-gradient(transparent, var(--fx-ink));
}
.hero__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); align-items: center; }
.hero__copy { grid-column: 1 / span 7; display: grid; gap: 28px; justify-items: start; }
.hero__title { font-size: clamp(42px, 5.6vw, 80px); }
.hero__lede { font-size: clamp(17px, 1.5vw, 20px); color: var(--fx-text-muted); max-width: 34ch; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.hero__copy .reveal:nth-child(2) { transition-delay: 0.1s; }
.hero__copy .reveal:nth-child(3) { transition-delay: 0.2s; }

/* Flow card: steps joined by a rail, nodes are the mark's squares */
.flowcard {
  grid-column: 8 / span 5;
  margin: 0; padding: 22px 24px 20px;
  background: var(--fx-surface);
  border: 1px solid var(--fx-line-strong);
  border-radius: var(--r-card);
  transition-delay: 0.3s;
}
.flowcard__top { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--fx-line); }
.flowcard__steps { position: relative; display: grid; gap: 0; margin: 8px 0; --fill: 0; }
.flowcard__steps::before, .flowcard__steps::after { /* rail, then its blue fill */
  content: ""; position: absolute; left: 4px; top: 26px; bottom: 26px; width: 1px; background: var(--fx-line-strong);
}
.flowcard__steps::after { background: var(--fx-blue); transform-origin: top; transform: scaleY(var(--fill)); transition: transform 0.9s var(--ease); }
.fstep {
  position: relative;
  display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 18px;
  padding: 14px 0;
  color: var(--fx-text-dim);
  transition: color 0.4s;
}
.fstep__node {
  width: 9px; height: 9px; border-radius: var(--r-node); position: relative; z-index: 1;
  background: var(--fx-surface); border: 1px solid rgba(255,255,255,0.35);
  transition: background 0.3s, border-color 0.3s;
}
.fstep strong { display: block; font-weight: 500; font-size: 15px; color: rgba(255,255,255,0.55); transition: color 0.4s; }
.fstep small { display: block; font-size: 13px; }
.fstep__t { font-size: 12px; font-variant-numeric: tabular-nums; }
.fstep.is-done .fstep__node, .fstep.is-active .fstep__node { background: var(--fx-blue); border-color: var(--fx-blue); }
.fstep.is-done strong { color: rgba(255,255,255,0.85); }
.fstep.is-active strong { color: #fff; }
.fstep.is-active { color: var(--fx-text-muted); }
.fstep.is-active .fstep__t { color: #8fb5ff; }
.flowcard__foot {
  display: flex; justify-content: space-between; gap: 8px; padding-top: 16px;
  border-top: 1px solid var(--fx-line); font-size: 13px; color: var(--fx-text-dim);
}
.flowcard__foot strong { color: #fff; font-weight: 500; font-variant-numeric: tabular-nums; margin-left: 6px; }

/* Partners */
.partners { margin-top: 112px; display: flex; flex-wrap: wrap; align-items: center; gap: 24px 56px; padding-top: 28px; border-top: 1px solid var(--fx-line); }
.partners ul { display: flex; flex-wrap: wrap; align-items: center; gap: 28px 56px; }
.partners img { width: auto; opacity: 0.65; filter: grayscale(1) brightness(1.6); transition: opacity 0.3s; }
.partners img:hover { opacity: 1; }

/* ---------- About (words light up with scroll) ---------- */
.about { padding: 160px 0; }
.about__text { font-size: clamp(30px, 4.2vw, 56px); font-weight: 300; letter-spacing: -0.035em; line-height: 1.12; max-width: 24ch; }
.about__text .w { color: rgba(255,255,255,0.18); transition: color 0.4s; }
.about__text .w.on { color: #fff; }
.about__text .w.brand.on { color: var(--fx-blue); }

/* ---------- Sections ---------- */
.section { padding: 104px 0; position: relative; }
.section--tight { padding: 96px 0; }
.section--wide { padding: 140px 0 160px; }

/* Section head: rule across the wrap, index at left, heading on the grid */
.sh {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter);
  padding-top: 20px; border-top: 1px solid var(--fx-line); margin-bottom: 64px;
}
.sh > .idx { grid-column: 1 / span 3; }
.sh > div { grid-column: 4 / span 9; display: grid; gap: 20px; justify-items: start; }
.sh h2 { font-size: clamp(36px, 4.8vw, 64px); max-width: 16ch; }
.sh p { color: var(--fx-text-muted); font-size: 17px; max-width: 44ch; }

/* Cards */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: auto auto; gap: var(--gutter); }
.card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px 22px 26px;
  background: var(--fx-surface);
  border: 1px solid var(--fx-line); border-radius: var(--r-card);
  transition: border-color 0.3s;
}
.card:hover { border-color: var(--fx-line-strong); }
.card p { color: var(--fx-text-muted); font-size: 15px; max-width: 46ch; }
.card--chat { grid-column: 1 / span 7; grid-row: 1 / span 2; }
.card--crm, .card--inv { grid-column: 8 / span 5; }
.bento .reveal:nth-child(2) { transition-delay: 0.1s; }
.bento .reveal:nth-child(3) { transition-delay: 0.2s; }

.demo {
  margin-bottom: 14px; padding: 16px;
  background: var(--fx-ink); border: 1px solid var(--fx-line); border-radius: var(--r-card);
  display: flex; flex-direction: column; gap: 10px; overflow: hidden;
}
/* chat */
.demo--chat { flex: 1; min-height: 340px; justify-content: flex-end; }
.demo__head { display: flex; justify-content: space-between; margin-bottom: auto; padding-bottom: 12px; border-bottom: 1px solid var(--fx-line); }
.bubble { max-width: 78%; font-size: 14px; line-height: 1.45; padding: 9px 13px; border-radius: 4px; opacity: 0; transform: translateY(8px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.bubble--in { align-self: flex-start; background: rgba(255,255,255,0.07); }
.bubble--out { align-self: flex-end; background: var(--fx-blue); }
.bubble.show { opacity: 1; transform: none; }
.demo__input { margin-top: 6px; font-size: 13px; color: var(--fx-text-dim); padding: 11px 0 2px; border-top: 1px solid var(--fx-line); }
/* rows (crm, invoices) */
.rows li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--fx-line); font-size: 13px; color: var(--fx-text-muted); }
.rows li:first-child { padding-top: 2px; }
.rows strong { display: block; font-size: 14px; font-weight: 500; color: #fff; }
.rows small { font-size: 12px; color: var(--fx-text-dim); }
.rows em { font-style: normal; font-size: 12px; color: var(--fx-text-dim); white-space: nowrap; }
.demo--crm .btn { align-self: flex-start; margin-top: 6px; }
.demo--crm .btn.is-sent { background: transparent; border-color: var(--fx-blue); color: #8fb5ff; }
/* invoices */
.demo__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--fx-text-muted); padding-bottom: 12px; border-bottom: 1px solid var(--fx-line); }
.inv li { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; }
.inv b { font-weight: 500; color: #fff; opacity: 0; transition: opacity 0.4s; font-variant-numeric: tabular-nums; }
.inv__bar { height: 2px; background: rgba(255,255,255,0.08); overflow: hidden; }
.inv__bar i { display: block; height: 100%; width: 0; background: var(--fx-blue); transition: width 0.9s var(--ease); }
.inv li.done .inv__bar i { width: 100%; }
.inv li.done b { opacity: 1; }

/* Impact */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--fx-line); }
.stat { padding: 8px 32px 44px 0; display: grid; gap: 16px; align-content: start; }
.stat + .stat { border-left: 1px solid var(--fx-line); padding-left: 32px; }
.stat__num { font-size: clamp(64px, 8vw, 112px); font-weight: 300; letter-spacing: -0.05em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.stat__num small { font-size: 0.22em; font-weight: 400; letter-spacing: 0; color: var(--fx-text-muted); margin-left: 8px; }
.stat p { color: var(--fx-text-muted); font-size: 15px; max-width: 30ch; }
.stats .reveal:nth-child(2) { transition-delay: 0.1s; }
.stats .reveal:nth-child(3) { transition-delay: 0.2s; }

/* Method — the one glow on the page is this line */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); position: relative; }
.steps::before, .steps::after { content: ""; position: absolute; top: 5px; left: 0; right: 0; height: 1px; background: var(--fx-line-strong); }
.steps::after { background: var(--fx-blue); box-shadow: 0 0 12px var(--fx-blue); transform-origin: left; transform: scaleX(var(--p, 0)); }
.step { position: relative; display: grid; gap: 12px; align-content: start; padding-right: 24px; }
.step__node {
  width: 11px; height: 11px; margin-bottom: 28px; border-radius: var(--r-node);
  background: var(--fx-ink); border: 1px solid rgba(255,255,255,0.4);
  position: relative; z-index: 1; transition: background 0.4s, border-color 0.4s;
}
.step.is-lit .step__node { background: var(--fx-blue); border-color: var(--fx-blue); }
.step h3 { font-size: 22px; }
.step p { color: var(--fx-text-muted); font-size: 15px; max-width: 34ch; }
.step .step__criteria { color: var(--fx-text-dim); font-size: 13px; letter-spacing: 0.02em; }

/* Perks: editorial rows, no icons */
.perks { border-bottom: 1px solid var(--fx-line); }
.perk { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); padding: 28px 0; border-top: 1px solid var(--fx-line); }
.perk h3 { grid-column: 4 / span 3; font-size: 22px; }
.perk p { grid-column: 7 / span 6; color: var(--fx-text-muted); font-size: 16px; max-width: 48ch; }

/* FAQ: rows, square marker */
.faq { margin-left: calc((100% + var(--gutter)) / 12 * 3); border-bottom: 1px solid var(--fx-line); }
.faq details { border-top: 1px solid var(--fx-line); }
.faq summary { list-style: none; cursor: pointer; padding: 24px 0; font-size: 19px; font-weight: 400; display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 9px; height: 9px; border: 1px solid rgba(255,255,255,0.5); border-radius: var(--r-node); transition: background 0.2s, border-color 0.2s, transform 0.3s var(--ease); }
.faq summary:hover::after { border-color: #fff; }
.faq details[open] summary::after { background: var(--fx-blue); border-color: var(--fx-blue); transform: rotate(45deg); }
.faq details p { padding: 0 0 26px; color: var(--fx-text-muted); max-width: 60ch; }
.faq details a { color: #8fb5ff; }

/* Contact */
.contact .sh { margin-bottom: 56px; }
.contact__mail { font-size: clamp(20px, 2vw, 26px); text-decoration: none; border-bottom: 1px solid var(--fx-line-strong); padding-bottom: 2px; margin-top: 4px; }
.contact__mail:hover { border-color: var(--fx-blue); }
.form { margin-left: calc((100% + var(--gutter)) / 12 * 3); display: grid; grid-template-columns: 1fr 1fr; gap: 32px var(--gutter); }
.form__full { grid-column: 1 / -1; }
.form label { display: grid; gap: 8px; }
.form input, .form textarea {
  font: inherit; font-size: 18px; color: #fff;
  background: transparent; border: 0; border-bottom: 1px solid var(--fx-line-strong); border-radius: 0;
  padding: 8px 0 12px; resize: vertical; transition: border-color 0.2s;
}
.form input::placeholder, .form textarea::placeholder { color: rgba(255,255,255,0.35); }
.form input:focus, .form textarea:focus { outline: none; border-bottom-color: var(--fx-blue); }
.form .is-invalid { border-bottom-color: #ff6b6b; }
.form__send { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.form__note { font-size: 13px; color: var(--fx-text-muted); }

/* Footer */
.footer { border-top: 1px solid var(--fx-line); padding: 72px 0 28px; }
.footer__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); }
.footer__grid > :first-child { grid-column: 1 / span 6; }
.footer__grid > :nth-child(2) { grid-column: 7 / span 3; }
.footer__grid > :nth-child(3) { grid-column: 10 / span 3; }
.footer__logo { width: 200px; height: auto; margin-left: -9px; /* SVG has built-in side padding */ }
.footer__tag { margin-top: 18px; color: var(--fx-text-muted); font-size: 17px; }
.footer__nav { display: grid; gap: 10px; align-content: start; }
.footer__nav .idx { margin-bottom: 6px; }
.footer__nav a { text-decoration: none; color: var(--fx-text-muted); font-size: 15px; width: fit-content; }
.footer__nav a:hover { color: #fff; }
.footer__base { display: flex; justify-content: space-between; gap: 16px; margin-top: 72px; padding-top: 20px; border-top: 1px solid var(--fx-line); font-size: 13px; color: var(--fx-text-dim); }
.footer__base a { text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero__copy, .flowcard { grid-column: 1 / -1; }
  .hero__grid { row-gap: 56px; }
  .flowcard { max-width: 560px; }
  .card--chat, .card--crm, .card--inv { grid-column: 1 / -1; grid-row: auto; }
  .demo--chat { min-height: 280px; }
  .sh > .idx { grid-column: 1 / -1; }
  .sh > div { grid-column: 1 / -1; }
  .perk h3 { grid-column: 1 / span 4; }
  .perk p { grid-column: 5 / -1; }
  .faq, .form { margin-left: 0; }
}
@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: block; }
}
@media (max-width: 720px) {
  .hero { padding: 128px 0 48px; }
  .about { padding: 96px 0; }
  .section, .section--tight { padding: 80px 0; }
  .section--wide { padding: 96px 0 112px; }
  .sh { margin-bottom: 40px; row-gap: 20px; }
  .stats, .steps { grid-template-columns: 1fr; }
  .stat, .stat + .stat { border-left: 0; padding: 28px 0 32px; }
  .stat + .stat { border-top: 1px solid var(--fx-line); }
  .steps { gap: 36px; }
  .steps::before, .steps::after { top: 0; bottom: 0; left: 5px; right: auto; width: 1px; height: auto; transform-origin: top; transform: scaleY(var(--p, 0)); }
  .steps::before { transform: none; }
  .step { padding: 0 0 0 36px; }
  .step__node { position: absolute; left: 0; top: 4px; margin: 0; }
  .perk { grid-template-columns: 1fr; gap: 10px; padding: 24px 0; }
  .perk h3, .perk p { grid-column: 1; }
  .fstep__t { display: none; }
  .fstep { grid-template-columns: 9px 1fr; }
  .partners { margin-top: 72px; }
  .partners ul { gap: 24px 36px; }
  .form { grid-template-columns: 1fr; }
  .form__send { flex-direction: column-reverse; align-items: stretch; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
  .footer__grid > :nth-child(2), .footer__grid > :nth-child(3) { grid-column: span 6; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .u-flow::after { transform: scaleX(1); }
  .bubble { opacity: 1; transform: none; }
}
