/*
 * SoldFlow site design system.
 *
 * One stylesheet for every page. Before this, each page carried its own copy of
 * the palette, its own header and its own footer, so they drifted apart: the
 * download page had no nav at all, three pages disagreed about button padding,
 * and every new page started by pasting the last one. Tokens and components
 * live here now, and a page only carries CSS that is genuinely its own.
 *
 * Cached immutable for a year by public/_headers, so the link tags carry ?v=N.
 * Bump that number on every page when this file changes.
 *
 * Signal Mint palette. Mint is the brand and is reserved for action and
 * emphasis: if everything is mint, nothing is. Coral marks trouble, amber marks
 * "pay attention", and that is the whole colour vocabulary.
 */

:root {
  /* surfaces, darkest to lightest */
  --bg: #080b11;
  --bg-soft: #0b1019;
  --panel: #10161f;
  --card: #131b26;
  --card-hi: #18212e;
  --line: #202b3a;

  /* text */
  --ink: #eaf0f7;
  --dim: #8595ab;
  --dim2: #7a8aa3;

  /* brand and status */
  --accent: #3ee6b0;
  --accent-ink: #04221a;
  --accent-soft: rgba(62, 230, 176, 0.10);
  --accent-edge: rgba(62, 230, 176, 0.35);
  --warn: #ffb454;
  --warn-soft: rgba(255, 180, 84, 0.08);
  --err: #ff5c7a;
  --err-soft: rgba(255, 92, 122, 0.08);

  /* type */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, Menlo, monospace;

  /* rhythm */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;
  --wrap: 1120px;
  --wrap-narrow: 720px;
}

/* ----------------------------------------------------------------- base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; font-weight: 800; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.mono { font-family: var(--mono); }

/* A visible focus ring on everything interactive. Keyboard users are not an
   afterthought, and this is the cheapest accessibility win on the site. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: var(--wrap-narrow); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section.tight { padding: 52px 0; }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 10px; }
.section-head p { color: var(--dim); font-size: 16.5px; margin: 0; }

/* --------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 11, 17, 0.86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 66px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.brand .word { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.brand .word .sold { color: var(--ink); }
.brand .word .flow { color: var(--accent); }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: var(--dim);
  font-size: 14.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); background: var(--panel); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav .cta {
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 800;
  padding: 9px 16px;
  margin-left: 8px;
}
.site-nav .cta:hover { color: var(--accent-ink); filter: brightness(1.08); }
@media (max-width: 640px) {
  .site-header .wrap { height: auto; padding-top: 12px; padding-bottom: 12px; }
  .site-nav { gap: 0; }
  .site-nav a { padding: 7px 8px; font-size: 13.5px; }
  .site-nav .cta { padding: 8px 13px; margin-left: 4px; }
  .site-nav a.hide-sm { display: none; }
}

/* --------------------------------------------------------------- footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 52px 0 34px;
  margin-top: 40px;
}
.site-footer .cols {
  display: grid;
  grid-template-columns: 1.7fr repeat(3, 1fr);
  gap: 32px;
}
.site-footer .about .word { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.site-footer .about .word .sold { color: var(--ink); }
.site-footer .about .word .flow { color: var(--accent); }
.site-footer .about p { color: var(--dim2); font-size: 13.5px; margin: 10px 0 0; max-width: 36ch; }
.site-footer h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.13em;
  color: var(--dim2); font-weight: 800; margin: 0 0 12px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer li a { color: var(--dim); font-size: 14px; }
.site-footer li a:hover { color: var(--accent); }
.site-footer .bar {
  margin-top: 38px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  color: var(--dim2); font-size: 13px;
}
.site-footer .bar .tag { margin-left: auto; }
@media (max-width: 760px) {
  .site-footer .cols { grid-template-columns: 1fr 1fr; gap: 26px; }
  .site-footer .about { grid-column: 1 / -1; }
  .site-footer .bar .tag { margin-left: 0; }
}

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid transparent; border-radius: var(--r-md);
  padding: 13px 22px; font-size: 15px; font-weight: 800; font-family: inherit;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: filter 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: default; filter: none; pointer-events: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.btn.sm { padding: 8px 14px; font-size: 13px; border-radius: var(--r-sm); }
.btn.lg { padding: 15px 28px; font-size: 16px; }

/* ---------------------------------------------------------------- cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
}
.card h3 { font-size: 17px; margin: 0 0 8px; }
.card p { color: var(--dim); font-size: 14.5px; margin: 0; }

/* Feature tiles: an even grid where every card is the same height, because a
   ragged bottom edge is what makes a landing page look homemade. */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 18px;
  align-items: stretch;
}
.grid .card {
  display: flex; flex-direction: column;
  transition: border-color 140ms ease, transform 140ms ease;
}
.grid .card:hover { border-color: var(--accent-edge); transform: translateY(-2px); }

/* Icon tile. Inline SVG, never emoji: emoji render differently on every machine
   and sit at a different weight than the brand mark beside them. */
.tile {
  width: 40px; height: 40px; border-radius: var(--r-md);
  background: var(--accent-soft); border: 1px solid var(--accent-edge);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; flex: 0 0 auto;
}
.tile svg {
  width: 20px; height: 20px; stroke: var(--accent); fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ----------------------------------------------------------------- bits */
.chip {
  display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; border-radius: var(--r-pill); padding: 3px 10px;
  vertical-align: middle;
}
.chip.plan { background: var(--accent); color: var(--accent-ink); }
.chip.ok { color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-edge); }
.chip.gray { color: var(--dim); background: var(--panel); border: 1px solid var(--line); }
.chip.warn { color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn); }
.chip.bad { color: var(--err); background: var(--err-soft); border: 1px solid var(--err); }

.muted { color: var(--dim2); font-size: 13px; }
.note { color: var(--dim2); font-size: 13px; margin-top: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.spacer { flex: 1; }

input[type=email], input[type=text], input[type=password], select, textarea {
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  border-radius: var(--r-md); padding: 12px 14px; font-size: 15px;
  font-family: inherit; outline: none; min-width: 0;
}
input::placeholder { color: var(--dim2); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }

.banner { border-radius: var(--r-md); padding: 12px 16px; font-size: 14.5px; margin: 0 0 18px; display: none; }
.banner.ok { display: block; background: var(--accent-soft); border: 1px solid var(--accent); color: var(--accent); }
.banner.err { display: block; background: var(--err-soft); border: 1px solid var(--err); color: var(--err); }
.banner.warn { display: block; background: var(--warn-soft); border: 1px solid var(--warn); color: var(--warn); }

/* Respect a reduced-motion preference. Nothing here is load bearing. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .grid .card:hover { transform: none; }
}
