/* Flow AI shared page system. One face, three inks, centered stacks, air.
   Loaded by every page after site-header.css and site-footer.css. Page-specific
   rules stay inline in the page and build on these tokens and classes. */

@font-face {
  font-family: "Google Sans Flex";
  src: url("/fonts/google-sans-flex-vf.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Three inks, one face. Warm Ink is the ground, Cream is the type,
   Amber has one job on each screen: the filled button. */
:root {
  --bg: #0e0e0d;
  --surface: #171715;
  --surface-strong: #1d1c19;
  --fg: #faf8f3;
  --muted: rgba(250, 248, 243, 0.72);
  --soft: rgba(250, 248, 243, 0.54);
  --hair: rgba(250, 248, 243, 0.09);
  --hair-strong: rgba(250, 248, 243, 0.2);
  --accent: #e4a43c;
  --accent-soft: rgba(228, 164, 60, 0.14);
  --ink: #0e0e0d;
  --font: "Google Sans Flex", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: clamp(2.75rem, 5.6vw, 5rem);        /* 80px at desktop */
  --h2: clamp(2rem, 3.4vw, 3rem);                /* 48px */
  --h3: clamp(1.5rem, 2.4vw, 2.125rem);          /* 34px */
  --lead: clamp(1.125rem, 1.5vw, 1.3125rem);     /* 21px */
  --section: clamp(6rem, 13vw, 11rem);
  --radius: 12px;
  --pill: 999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--muted);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
strong { color: var(--fg); font-weight: 600; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.wrap { width: min(100% - 48px, 1080px); margin-inline: auto; }
.narrow { width: min(100%, 44rem); margin-inline: auto; }

.skip-link {
  position: fixed; z-index: 100; top: 12px; left: 12px;
  padding: 10px 16px; border-radius: var(--pill);
  background: var(--fg); color: var(--ink); font-weight: 600;
  transform: translateY(-160%); transition: transform 180ms var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* Film grain on the substrate, well under the brand's 4% ceiling */
.grain {
  position: fixed; z-index: 60; inset: -50%; pointer-events: none; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Type ------------------------------------------------------- */
.eyebrow {
  color: var(--soft);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
h1, h2 {
  color: var(--fg);
  font-weight: 640;
  letter-spacing: -0.022em;
  line-height: 0.98;
  font-feature-settings: "kern", "liga";
  text-wrap: balance;
}
h1 { font-size: var(--display); }
h2 { font-size: var(--h2); }
h3 {
  color: var(--fg);
  font-size: var(--h3);
  font-weight: 600;
  letter-spacing: -0.014em;
  line-height: 1.06;
}
.lead {
  color: var(--muted);
  font-size: var(--lead);
  font-weight: 300;
  line-height: 1.45;
  text-wrap: pretty;
}
.small { color: var(--soft); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---- Sections --------------------------------------------------- */
section { position: relative; padding-block: var(--section) calc(var(--section) * 0.92); }
section + section::before {
  content: ""; position: absolute; top: 0; left: 50%; width: min(100% - 48px, 1080px);
  height: 1px; background: var(--hair); transform: translateX(-50%);
}
.centered { text-align: center; }
.centered .lead, .centered .small { margin-inline: auto; }
.stack > * + * { margin-top: 1.25rem; }
.stack > .eyebrow + h1, .stack > .eyebrow + h2 { margin-top: 1.5rem; }
.stack > h1 + .lead, .stack > h2 + .lead { margin-top: 1.75rem; }
.stack > .lead + .cta-row, .stack > h2 + .cta-row { margin-top: 2.5rem; }
.stack > .hero-proof + .cta-row { margin-top: 2.25rem; }
.lead { max-width: 36ch; }

/* ---- Hero ------------------------------------------------------- */
.hero {
  padding-block: clamp(5rem, 12vw, 9rem) 0;
}
.hero .stack { max-width: 60rem; margin-inline: auto; }
.hero h1 { max-width: 22ch; margin-inline: auto; }
.hero-art {
  width: min(100%, 52rem);
  margin: clamp(4rem, 8vw, 6rem) auto 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
}
.hero-art img { width: 100%; height: auto; }
.hero-art figcaption {
  padding: 0.9rem 0 0; color: var(--soft); font-size: 12px; letter-spacing: 0.06em; text-align: center;
}
.hero-art { background: none; }

/* ---- Buttons and links ------------------------------------------ */
.cta-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 1rem 1.75rem;
}
.btn {
  display: inline-flex; min-height: 48px; align-items: center; justify-content: center;
  padding: 0 24px; border: 1px solid transparent; border-radius: var(--pill);
  font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em; line-height: 1; white-space: nowrap;
  transition: transform 200ms var(--ease), filter 200ms ease, border-color 200ms ease, background-color 200ms ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-primary { background: var(--accent); color: var(--ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { border-color: var(--hair-strong); color: var(--fg); }
.btn-secondary:hover { border-color: var(--fg); }
.text-link {
  color: var(--fg); font-weight: 500;
  border-bottom: 1px solid var(--hair-strong);
  padding-bottom: 2px;
  transition: border-color 180ms ease;
}
.text-link:hover { border-color: var(--fg); }

/* ---- Clients ---------------------------------------------------- */
.clients { padding-block: clamp(3rem, 6vw, 4.5rem); }
.clients p {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 2.25rem;
  color: var(--soft); font-size: 14px;
}
.clients a { color: var(--muted); font-weight: 500; }
.clients a:hover { color: var(--fg); }
.clients a span { color: var(--soft); font-weight: 400; }

/* ---- Grids ------------------------------------------------------ */
.grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3.5rem); margin-top: clamp(3.5rem, 7vw, 5.5rem); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Five parts on a six-column grid: three across, then two wider. No empty cell. */
.grid-5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-5 > * { grid-column: span 2; }
.grid-5 > *:nth-child(4), .grid-5 > *:nth-child(5) { grid-column: span 3; }
.grid-5 > *:nth-child(4) .part-inner, .grid-5 > *:nth-child(5) .part-inner { max-width: 26rem; }
.grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Framed text cards: a small label row, then the object */
.proof-text { padding: 1.75rem 1.75rem 1.9rem; }
.proof-text h3, .proof-text p, .proof-text .text-link { margin-left: 0; margin-right: 0; }
.proof-text::before { content: "Open source"; display: block; margin-bottom: 1.25rem; color: var(--soft); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; }

.part, .step, .proof-card { display: block; }
.part p, .step p, .proof-card p { margin-top: 0.75rem; color: var(--muted); font-size: 15px; line-height: 1.55; text-wrap: pretty; }
.part .text-link, .proof-card .text-link { display: inline-block; margin-top: 1rem; font-size: 15px; }
.part:hover h3, .proof-card:hover h3 { color: var(--fg); }
.part:hover .text-link, .proof-card:hover .text-link { border-color: var(--fg); }
.step .small { display: block; margin-bottom: 0.75rem; font-weight: 500; letter-spacing: 0.12em; }

/* ---- Proof ------------------------------------------------------ */
.proof-card {
  padding: 1rem 1rem 1.5rem; border: 1px solid var(--hair); border-radius: var(--radius);
  transition: border-color 220ms ease;
}
.proof-card:hover { border-color: var(--hair-strong); }
.proof-card h3, .proof-card p, .proof-card .text-link { margin-left: 0.25rem; margin-right: 0.25rem; }
.proof-card img {
  width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover;
  margin-bottom: 1.5rem; border-radius: calc(var(--radius) - 4px); background: var(--surface);
  /* Printed as Cream on Warm Ink: the card is inverted into the page's own ground, so no white slab sits on the dark page */
  filter: grayscale(1) invert(0.93) contrast(0.92);
}

/* Amber has one job per screen. In the hero that job is the rotating word, so the
   primary button takes the cream fill here and stays amber everywhere else. */
.hero .btn-primary { background: var(--accent); color: var(--ink); }
.hero .btn-primary:hover { filter: brightness(1.08); }

/* Inline proof, the one element worth borrowing from a light-mode reference */
.hero-proof {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.75rem;
  margin: 2rem 0 0; padding: 0; list-style: none;
  color: var(--soft); font-size: 13px;
}
.hero-proof li { position: relative; }
.hero-note { max-width: 46ch; margin: 1.75rem auto 0; line-height: 1.5; }
.hero-note .text-link { font-size: inherit; }
.hero-proof li + li::before { content: ""; position: absolute; left: -0.9rem; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: var(--hair-strong); transform: translateY(-50%); }

@media (max-width: 720px) {
  .hero-proof { gap: 0.35rem 1.25rem; font-size: 12px; }
}

/* ---- Blueprint rails ---------------------------------------------------
   Profound runs two dashed verticals down the page at the container edges, so
   the content reads as drawn on a technical sheet rather than floating. Pure
   decoration, so it is hidden from assistive tech and dropped on small screens. */
body::before, body::after {
  content: ""; position: fixed; top: 0; bottom: 0; width: 0;
  border-left: 1px dashed rgba(250, 248, 243, 0.07);
  pointer-events: none; z-index: 1;
}
body::before { left: max(24px, calc(50% - 540px)); }
body::after { right: max(24px, calc(50% - 540px)); }

/* ---- Feature rows: label left, detail right, dashed divider between ---- */
.rows { margin-top: clamp(3.5rem, 7vw, 5.5rem); text-align: left; }
.row {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
  border-top: 1px solid var(--hair);
  position: relative;
}
.row:last-child { border-bottom: 1px solid var(--hair); }
/* the dashed divider between the two columns, the row's own vertical rule */
.row::after {
  content: ""; position: absolute; top: clamp(2.5rem, 5vw, 3.5rem); bottom: clamp(2.5rem, 5vw, 3.5rem);
  left: calc(41.666% - clamp(1rem, 2.5vw, 2rem));
  border-left: 1px dashed var(--hair);
}
.row-label h3 { margin-bottom: 0.75rem; }
.row-label p { color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 34ch; text-wrap: pretty; }
.pill {
  display: inline-flex; align-items: center; min-height: 36px; margin-top: 1.25rem;
  padding: 0 1rem; border-radius: var(--pill); background: var(--surface-strong);
  color: var(--fg); font-size: 13.5px; font-weight: 600;
  transition: background-color 200ms ease;
}
.pill:hover { background: #24231f; }

.systems { margin: 0; padding: 0; list-style: none; }
.systems li { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 0.35rem 1.5rem; padding: 0.85rem 0; border-top: 1px solid var(--hair); }
.systems li:first-child { border-top: 0; padding-top: 0; }
.systems b { color: var(--fg); font-weight: 600; font-size: 15px; }
.systems span { color: var(--muted); font-size: 15px; line-height: 1.5; text-wrap: pretty; }

@media (max-width: 900px) {
  body::before, body::after { display: none; }
  .row { grid-template-columns: 1fr; gap: 2rem; }
  .row::after { display: none; }
  .systems li { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* ---- Versus: the agency side recedes, the Flow side is raised ----------- */
.versus {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  column-gap: 0; margin-top: clamp(3.5rem, 7vw, 5.5rem); text-align: left;
}
/* the raised panel behind the whole Flow column */
.versus::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; right: 0; z-index: 0;
  background: var(--surface); border: 1px solid var(--hair-strong); border-radius: var(--radius);
}
.versus > * { position: relative; z-index: 1; }
.versus-head {
  padding: 1.35rem 1.75rem 1.1rem; margin: 0;
  color: var(--soft); font-size: 12px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
  border-bottom: 1px solid var(--hair);
}
.versus-us-head { color: var(--fg); display: flex; align-items: center; gap: 0.6rem; }
.versus-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
/* each criterion spans both columns, set above its pair */
.versus-label {
  grid-column: 1 / -1; margin: 0; padding: 1.5rem 1.75rem 0.4rem;
  color: var(--soft); font-size: 11px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
}
.versus-them, .versus-us { padding: 0 1.75rem 1.5rem; font-size: 15.5px; line-height: 1.5; text-wrap: pretty; }
.versus-them { color: var(--soft); border-right: 1px dashed var(--hair); }
.versus-us { color: var(--fg); }
/* hairline between criteria, on both columns */
.versus-label:not(:nth-of-type(1)) { border-top: 1px solid var(--hair); }

@media (max-width: 720px) {
  .versus { grid-template-columns: 1fr; }
  .versus::before { left: 0; top: auto; bottom: auto; display: none; }
  .versus-head { display: none; }
  .versus-them, .versus-us { padding-left: 0; padding-right: 0; border-right: 0; }
  .versus-them::before { content: "Agency: "; color: var(--soft); font-weight: 600; }
  .versus-us::before { content: "Flow AI: "; color: var(--fg); font-weight: 600; }
  .versus-us { padding-top: 0.25rem; }
  .versus-label { padding-left: 0; padding-right: 0; }
}

/* Three outcome pillars */
.pillar { border-top: 1px solid var(--hair); padding-top: 1.35rem; }
.pillar h3 { margin-bottom: 0.6rem; }
.pillar p { color: var(--muted); font-size: 15px; line-height: 1.55; text-wrap: pretty; }
.pillar p.small { margin-top: 0.85rem; color: var(--soft); }
.pillar .text-link { display: inline-block; margin-top: 1rem; font-size: 15px; }

/* Comparison table, on hairlines like everything else */
.tablewrap { overflow-x: auto; margin-top: clamp(3rem, 6vw, 4.5rem); }
.tablewrap table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.tablewrap th { padding: 0 1.25rem 0.85rem 0; border-bottom: 1px solid var(--hair-strong); color: var(--fg); font-weight: 600; text-align: left; }
.tablewrap td { padding: 0.95rem 1.25rem 0.95rem 0; border-bottom: 1px solid var(--hair); color: var(--muted); vertical-align: top; }
.tablewrap th:last-child, .tablewrap td:last-child { padding-right: 0; }
.tablewrap tbody tr:last-child td { border-bottom: 0; }

/* Ten departments as hairline rows, two columns on desktop */
.dept-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 5vw, 4.5rem); margin-top: clamp(3.5rem, 7vw, 5.5rem); text-align: left; }
.dept { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name meta" "line line"; gap: 0.35rem 1.5rem; padding: 1.35rem 0; border-top: 1px solid var(--hair); transition: border-color 220ms ease; }
.dept:nth-last-child(-n+2) { border-bottom: 1px solid var(--hair); }
.dept:hover { border-color: var(--hair-strong); }
.dept-name { grid-area: name; color: var(--fg); font-size: 1.2rem; font-weight: 600; letter-spacing: -0.014em; }
.dept-line { grid-area: line; color: var(--muted); font-size: 15px; line-height: 1.5; text-wrap: pretty; }
.dept-meta { grid-area: meta; align-self: baseline; letter-spacing: 0.06em; text-transform: uppercase; font-size: 11px; }
@media (max-width: 720px) { .dept-list { grid-template-columns: 1fr; } .dept:nth-last-child(2) { border-bottom: 0; } }
.guide-card img { filter: grayscale(1); }

.proof-case {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2rem;
  margin-top: clamp(3.5rem, 7vw, 5.5rem); padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--hair);
}
.install {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.75rem 1rem;
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
}
.install code {
  padding: 0.7rem 1rem; border: 1px solid var(--hair); border-radius: var(--radius);
  color: var(--fg); font-family: "SFMono-Regular", Consolas, monospace; font-size: 14px;
}
.copy-button {
  padding: 0.6rem 1rem; border: 1px solid var(--hair-strong); border-radius: var(--pill);
  background: none; color: var(--fg); font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: border-color 180ms ease, transform 200ms var(--ease);
}
.copy-button:hover { border-color: var(--fg); }
.copy-button:active { transform: translateY(1px); }
.install .small { flex-basis: 100%; text-align: center; }

/* ---- Pricing ---------------------------------------------------- */
.plan { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; }
.plan-name { color: var(--soft); font-size: 14px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.plan-price { color: var(--fg); font-size: clamp(2.5rem, 4.6vw, 3.75rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.plan-price small { margin-left: 0.5rem; color: var(--soft); font-size: 1rem; font-weight: 400; letter-spacing: 0; }
.plan p { color: var(--muted); text-wrap: pretty; }
.plan ul { padding: 0; list-style: none; color: var(--muted); }
.plan li { padding: 0.55rem 0; border-top: 1px solid var(--hair); }
.plan li:last-child { border-bottom: 1px solid var(--hair); }
.plan .btn { margin-top: 0.5rem; }
.pricing-note { margin-top: clamp(2.5rem, 5vw, 3.5rem); text-align: center; }

/* ---- FAQ -------------------------------------------------------- */
.faq { max-width: 44rem; margin: clamp(3rem, 6vw, 4.5rem) auto 0; }
.faq details { border-top: 1px solid var(--hair); }
.faq details:last-child { border-bottom: 1px solid var(--hair); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.25rem 0; color: var(--fg); font-size: 1.05rem; font-weight: 600; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--soft); font-size: 1.4rem; font-weight: 300; line-height: 1; transition: transform 220ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 1.5rem; color: var(--muted); max-width: 60ch; }

/* ---- Contact ---------------------------------------------------- */
.contact .small { margin-top: 2.5rem; }

/* ---- Reveal ----------------------------------------------------- */
.reveal { transition: opacity 680ms var(--ease), transform 680ms var(--ease); }
.reveal.is-hidden { opacity: 0; transform: translateY(16px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .btn, .copy-button { transition: none; }
  .reveal.is-hidden { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .grid-3, .grid-6 { grid-template-columns: 1fr; }
  .grid-5 > *, .grid-5 > *:nth-child(4), .grid-5 > *:nth-child(5) { grid-column: span 3; }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .copy-button, .share-button, .share-link, .share-control, .filter { min-height: 44px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-5 > *, .grid-5 > *:nth-child(4), .grid-5 > *:nth-child(5) { grid-column: span 6; }
  .proof-case { grid-template-columns: 1fr; align-items: start; }
  .eyebrow { letter-spacing: 0.24em; }
  .btn { width: 100%; }
  .cta-row { flex-direction: column; }
}
