/* Flowgear customers HubSpot-style preview - dark theme (mirrors comparison-preview / fg26) */
:root {
  --pitch: #0b0e1d;
  --ink: #fff;
  --soft: rgba(255, 255, 255, 0.82);
  --faint: rgba(255, 255, 255, 0.62);
  --teal: #29baab;
  --line: rgba(255, 255, 255, 0.085);
  --bg2: #0f1326;
  --surface: #141a2e;
  --surface-2: #1a2038;
  --r: 14px;
  --max: 1100px;
  --font: "Poppins", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--pitch);
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.preview-banner {
  background: rgba(41, 186, 171, 0.12);
  border-bottom: 1px solid rgba(41, 186, 171, 0.35);
  color: var(--soft);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  padding: 10px 16px;
}

.topbar {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 14, 29, 0.92);
  backdrop-filter: blur(10px);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 28px; width: auto; display: block; }
.brand-note {
  font-size: 12px; color: var(--faint); font-weight: 500;
  border-left: 1px solid var(--line); padding-left: 12px;
}
.topnav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; font-weight: 600; }
.topnav a { color: var(--soft); text-decoration: none; }
.topnav a:hover { color: var(--teal); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 16px;
}

.hero {
  padding: 64px 0 48px;
  background:
    radial-gradient(ellipse 82% 56% at 82% 8%, rgba(171, 138, 182, 0.12), transparent 72%),
    radial-gradient(ellipse 72% 52% at 16% 18%, rgba(41, 186, 171, 0.1), transparent 74%),
    var(--pitch);
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  margin: 0 0 18px; font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; max-width: 22ch;
}
.hero h1 .accent { color: var(--teal); }
.tldr {
  font-size: 1.1rem; color: var(--soft); max-width: 58ch; margin: 0 0 28px;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px; border-radius: 9px;
  font-size: 14.5px; font-weight: 700; border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--teal); color: var(--pitch); }
.btn-primary:hover { filter: brightness(1.05); text-decoration: none; }
.btn-secondary {
  background: transparent; color: var(--ink);
  border-color: rgba(255, 255, 255, 0.22);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.08); text-decoration: none; }
.btn-ghost {
  background: transparent; color: var(--soft);
  border-color: rgba(255, 255, 255, 0.14);
  font-size: 13px; min-height: 36px; padding: 0 14px;
}
.btn-ghost.is-active {
  border-color: var(--teal); color: var(--teal);
  background: rgba(41, 186, 171, 0.08);
}

.section { padding: 56px 0; border-bottom: 1px solid var(--line); }
.section.bg2 { background: var(--bg2); }
.section h2 {
  margin: 0 0 10px; font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  letter-spacing: -0.015em;
}
.section .lede { color: var(--soft); max-width: 62ch; margin: 0 0 28px; }

.checklist {
  display: grid; gap: 10px;
  margin: 0; padding: 0; list-style: none;
}
.checklist li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14.5px; color: var(--soft);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px;
}
.checklist input { margin-top: 3px; accent-color: var(--teal); }

/* Before / after compare */
.compare-toggle {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px;
}
.compare-panel[hidden] { display: none; }
.compare-note {
  font-size: 13px; color: var(--faint); margin: 0 0 18px; max-width: 70ch;
}

/* Filter */
.filter-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  margin-bottom: 24px;
}
.filter-label { font-size: 13px; font-weight: 600; color: var(--faint); }
.filter-select-wrap { position: relative; display: inline-flex; }
.filter-select {
  appearance: none;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid rgba(41, 186, 171, 0.45);
  border-radius: 10px;
  min-height: 42px;
  padding: 0 40px 0 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.filter-chevron {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-52%); color: var(--teal); pointer-events: none;
}
.result-count { font-size: 13px; color: var(--faint); margin-left: auto; }

/* Cards - proposed (HubSpot-style) */
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 960px) {
  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .story-grid { grid-template-columns: 1fr; }
}

.story-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px 22px 22px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.16s, transform 0.16s, box-shadow 0.16s;
  overflow: hidden;
}
.story-card:hover {
  border-color: var(--teal);
  transform: translateY(-3px);
  text-decoration: none;
  box-shadow: 0 24px 44px -24px rgba(0, 0, 0, 0.82);
}
.story-card-identity {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 16px;
}
.logo-tile {
  display: flex; align-items: center; justify-content: center;
  width: 100px; height: 100px; flex: none;
  border: 1.5px solid rgba(41, 186, 171, 0.45);
  border-radius: 14px; background: #fff; padding: 10px;
}
.logo-tile img {
  display: block; max-width: 100%; max-height: 100%;
  width: auto; height: auto; object-fit: contain;
}
.story-card-company {
  margin: 0; font-size: 14px; font-weight: 600; color: var(--ink);
  letter-spacing: -0.01em; line-height: 1.3;
}
.story-card h3 {
  margin: 0 0 10px;
  font-size: 19px; line-height: 1.28; letter-spacing: -0.018em;
  color: var(--ink); font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-card:hover h3 { color: var(--teal); }
.story-card-stat {
  margin: 0 0 10px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--teal);
}
.story-card-sector {
  margin: 0 0 4px; font-size: 12.5px; color: var(--faint);
}
.story-card-link {
  margin-top: auto; padding-top: 18px;
  font-size: 13.5px; font-weight: 700; color: var(--teal);
  display: inline-flex; align-items: center; gap: 6px;
}
.story-card:hover .story-card-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Cards - current (before) */
.story-card--before {
  min-height: 320px;
  background: var(--pitch);
  border-color: rgba(41, 186, 171, 0.5);
}
.story-card--before .logo-tile {
  width: 100px; height: 100px; margin-bottom: 20px;
  border: 1.5px solid var(--teal);
  border-radius: 12px; padding: 8px;
}
.story-card--before h3 {
  font-size: 20px; color: var(--teal); margin-bottom: 10px;
  display: block; -webkit-line-clamp: unset;
}
.story-card--before p {
  margin: 0;
  font-size: 14.5px; color: var(--soft); line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Themes strip */
.themes {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
@media (max-width: 900px) {
  .themes { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .themes { grid-template-columns: 1fr; }
}
.theme {
  padding-top: 18px; border-top: 2px solid var(--teal);
}
.theme h3 { margin: 0 0 8px; font-size: 15.5px; }
.theme p { margin: 0; font-size: 14px; color: var(--soft); line-height: 1.62; }

.cta-band {
  padding: 64px 0;
  background:
    radial-gradient(ellipse 70% 80% at 50% 120%, rgba(41, 186, 171, 0.16), transparent 60%),
    var(--pitch);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.cta-band h2 { margin: 0 0 12px; font-size: clamp(1.4rem, 2.5vw, 1.85rem); }
.cta-band p { margin: 0 auto 24px; color: var(--soft); max-width: 52ch; }

.footer {
  padding: 36px 0 48px;
  color: var(--faint); font-size: 13.5px;
}
.footer p { margin: 0 0 10px; max-width: 70ch; }
.meta-line { color: rgba(255, 255, 255, 0.4); }

/* ---- Detail story pages ---- */
.story-hero { padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.story-identity {
  display: flex; align-items: center; gap: 16px; margin-bottom: 18px;
}
.story-logo {
  display: flex; align-items: center; justify-content: center;
  width: 88px; height: 88px;
  background: #fff; border: 1.5px solid var(--teal);
  border-radius: 14px; padding: 10px;
}
.story-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.story-company-name {
  display: block; font-size: 18px; font-weight: 700; margin-top: 4px;
}
.story-meta-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px;
}
.chip {
  font-size: 12px; font-weight: 600; color: var(--soft);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px; padding: 4px 11px;
}
.outcome-beat {
  display: grid; gap: 6px;
  background: rgba(41, 186, 171, 0.08);
  border: 1px solid rgba(41, 186, 171, 0.35);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 22px;
  max-width: 70ch;
}
.outcome-beat-k {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--teal);
}
.outcome-beat-v {
  font-size: 1.15rem; font-weight: 600; line-height: 1.4; color: var(--ink);
}
.story-hero h1 {
  margin: 0 0 16px; font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  line-height: 1.15; letter-spacing: -0.02em; max-width: 28ch;
}
.story-hero .intro {
  margin: 0 0 24px; color: var(--soft); max-width: 68ch; font-size: 1.05rem;
}

.systems-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px;
}
.sys-chip {
  font-size: 12.5px; color: var(--soft);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px; padding: 5px 12px;
}

.story-arc { display: grid; gap: 28px; max-width: 780px; }
.story-step {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding-top: 8px;
}
@media (max-width: 700px) {
  .story-step { grid-template-columns: 1fr; gap: 8px; }
}
.story-step-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--teal);
}
.story-step-body h2 {
  margin: 0 0 12px; font-size: 1.25rem; letter-spacing: -0.015em;
}
.story-step-body p {
  margin: 0 0 12px; color: var(--soft); font-size: 15px;
}
.story-step-body p:last-child { margin-bottom: 0; }
.story-points {
  margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 10px;
}
.story-points li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14.5px; color: var(--soft);
}
.story-points li::before {
  content: "";
  flex: none;
  width: 8px; height: 8px; margin-top: 7px;
  border-radius: 50%;
  background: var(--teal);
}

.story-quote {
  margin: 0; max-width: 820px;
}
.story-quote p {
  margin: 0 0 18px;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  line-height: 1.45; font-weight: 500; letter-spacing: -0.01em;
}
.story-quote p span { color: var(--teal); }
.story-quote footer {
  display: flex; flex-direction: column; gap: 2px;
}
.story-quote-name { font-weight: 700; color: var(--ink); }
.story-quote-role { font-size: 14px; color: var(--faint); }

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 800px) {
  .related-grid { grid-template-columns: 1fr; }
}
.related-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  min-height: 180px;
}
.related-card:hover { border-color: var(--teal); text-decoration: none; }
.related-card h3 {
  margin: 10px 0 8px; font-size: 15px; line-height: 1.35; color: var(--ink);
}
.related-card .company { font-size: 13px; color: var(--teal); font-weight: 600; }
.related-card .go {
  margin-top: auto; padding-top: 14px;
  font-size: 13px; font-weight: 700; color: var(--teal);
}

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; color: var(--soft);
  margin-bottom: 20px;
}
.back-link:hover { color: var(--teal); }
