/* =====================================================
   Flowkern — global styles
   Design tokens match the brand spec exactly.
   ===================================================== */

:root {
  --ink: #1a1a1a;
  --ink-muted: #5a5a5a;
  --ink-faint: #9a9a9a;
  --surface: #fafaf8;
  --surface-2: #f2f1ed;
  --accent: #1a3a2a;
  --accent-light: #e8f0ec;
  --rule: #e0dfd9;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Inter', 'DM Sans', system-ui, sans-serif;

  --max-text: 720px;
  --max-wide: 1120px;
  --pad: clamp(20px, 4vw, 32px);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.1;
}

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.container-text {
  width: 100%;
  max-width: var(--max-text);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* =====================================================
   Header
   ===================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav { display: flex; align-items: center; gap: 28px; }

.nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 15px;
  transition: color .15s ease;
}
.nav a:hover { color: var(--ink); }

/* button in nav keeps its white text — beat .nav a specificity */
.nav a.btn-accent { color: #fff; }
.nav a.btn-accent:hover { color: #fff; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover { background: #122b1f; }

.btn-light {
  background: #fff;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-light:hover { background: var(--surface-2); }

.btn-large {
  padding: 16px 24px;
  font-size: 16px;
}

.btn-arrow { transition: transform .2s ease; }
.btn:hover .btn-arrow { transform: translateX(2px); }

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--ink);
}

.site-header__mobile-cta {
  display: none;
}

@media (max-width: 720px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }

  /* persistent compact CTA always visible on mobile */
  .site-header__mobile-cta {
    display: inline-flex;
    margin-left: auto;
    margin-right: 4px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
  }

  .site-header.is-open .nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--rule);
    padding: 16px var(--pad) 24px;
  }
  .site-header.is-open .nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--rule);
    font-size: 17px;
    color: var(--ink);
  }
  .site-header.is-open .nav .btn {
    margin-top: 16px;
    justify-content: center;
  }
}

/* =====================================================
   Common section helpers
   ===================================================== */

section { padding: clamp(44px, 9vw, 96px) 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 28px;
}

.section-rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* =====================================================
   Hero
   ===================================================== */

.hero {
  padding: clamp(40px, 10vw, 120px) 0 clamp(56px, 10vw, 96px);
  position: relative;
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 32px;
}

@media (min-width: 1040px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 48px; }
}

.hero__art {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  width: 66%;
  max-width: 260px;
  margin: 0 auto;
  order: -1;
}
.hero__art svg { width: 100%; height: 100%; }

@media (min-width: 1040px) {
  .hero__art {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: 0;
    order: 0;
  }
}

.hero h1 {
  font-size: clamp(34px, 7.2vw, 64px);
  margin-bottom: 20px;
  line-height: 1.08;
}

.hero h1 .accent-italic {
  display: block;
  font-style: italic;
  color: var(--accent);
  margin-top: 10px;
}

.hero__subhead {
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--ink-muted);
  max-width: 560px;
  line-height: 1.55;
  margin-bottom: 28px;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

@media (max-width: 520px) {
  .hero__ctas { gap: 16px; }
  .hero__ctas .btn {
    width: 100%;
    justify-content: center;
  }
}

.text-link {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 15px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: color .15s ease, border-color .15s ease;
}
.text-link:hover { color: var(--ink); border-color: var(--ink); }

/* =====================================================
   Problem section
   ===================================================== */

.problem {
  border-top: 1px solid var(--rule);
  background: var(--surface);
}

.problem h2 {
  font-size: clamp(28px, 4vw, 36px);
  max-width: 640px;
  margin-bottom: 28px;
}

.problem .body {
  max-width: 640px;
  font-size: 17px;
  color: var(--ink);
}

/* =====================================================
   Stat strip
   ===================================================== */

.stats {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: clamp(48px, 7vw, 72px) 0 clamp(36px, 5vw, 56px);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.stats__cell {
  padding: 24px clamp(16px, 3vw, 32px);
  text-align: left;
  border-left: 1px solid var(--rule);
}
.stats__cell:first-child { border-left: 0; padding-left: 0; }
.stats__cell:last-child { padding-right: 0; }

.stats__num {
  font-family: var(--serif);
  font-size: clamp(48px, 7vw, 72px);
  line-height: 1;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.stats__label {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.5;
  max-width: 280px;
}

.stats__source {
  margin-top: 32px;
  font-size: 13px;
  color: var(--ink-faint);
  font-style: italic;
}

@media (max-width: 720px) {
  .stats__grid { grid-template-columns: 1fr; }
  .stats__cell {
    border-left: 0;
    border-top: 1px solid var(--rule);
    padding: 28px 0;
  }
  .stats__cell:first-child { border-top: 0; padding-top: 0; }
}

/* =====================================================
   What we do
   ===================================================== */

.what h2 {
  font-size: clamp(28px, 4vw, 36px);
  max-width: 820px;
  margin-bottom: 24px;
}

.what__intro {
  max-width: 640px;
  font-size: 17px;
  color: var(--ink-muted);
  margin-bottom: 56px;
}

.areas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.area {
  padding: 36px 32px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: #fff;
  position: relative;
}

.area__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--accent);
  margin-bottom: 20px;
  flex-shrink: 0;
}
.area__icon svg { width: 24px; height: 24px; }

.area h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.area p {
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 960px) {
  .areas { grid-template-columns: repeat(2, 1fr); }
}

/* On small screens flip each card to a horizontal layout:
   icon left, heading + paragraph on the right.
   Shows more cards per viewport and reads faster. */
@media (max-width: 640px) {
  .areas { grid-template-columns: 1fr; }

  .area {
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 18px;
    align-items: start;
    padding: 22px 20px;
  }
  .area__icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    margin-bottom: 0;
  }
  .area__icon svg { width: 22px; height: 22px; }
  .area h3 {
    font-size: 18px;
    line-height: 1.25;
    margin-bottom: 6px;
  }
  .area p {
    font-size: 14.5px;
    grid-column: 2;
  }
  .area h3 { grid-column: 2; }
}

/* =====================================================
   Process / Audit steps
   ===================================================== */

.process {
  background: var(--surface-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.process h2 {
  font-size: clamp(28px, 4vw, 36px);
  margin-bottom: 56px;
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 820px;
  position: relative;
}

/* vertical rail connecting the step numerals */
.steps::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 20px;
  bottom: 20px;
  width: 1px;
  background: var(--rule);
}

.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  position: relative;
}
.step:first-child { border-top: 0; padding-top: 0; }

.step__num {
  font-family: var(--serif);
  font-size: 32px;
  color: var(--accent);
  line-height: 1;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 50%;
  position: relative;
  z-index: 1;
}

.step h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.step p {
  color: var(--ink-muted);
  font-size: 16px;
  margin: 0;
}

.process__note {
  margin-top: 40px;
  font-size: 14px;
  font-style: italic;
  color: var(--ink-faint);
  max-width: 640px;
}

/* =====================================================
   Audience fit
   ===================================================== */

.fit h2 {
  font-size: clamp(28px, 4vw, 36px);
  margin-bottom: 48px;
}

.fit__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 960px;
}

.fit__col { padding-right: 48px; }
.fit__col + .fit__col {
  padding-right: 0;
  padding-left: 48px;
  border-left: 1px solid var(--rule);
}

.fit__col h3 {
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 20px;
  font-weight: 500;
}

.fit__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fit__col li {
  padding: 14px 0 14px 32px;
  border-top: 1px solid var(--rule);
  font-size: 16px;
  color: var(--ink);
  position: relative;
}
.fit__col li:first-child { border-top: 0; padding-top: 0; }

.fit__col li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-repeat: no-repeat;
  background-position: center;
}
.fit__col li:first-child::before { top: calc(50% - 7px); }

.fit__col--good li::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%231a3a2a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 10l4 4 8-9'/></svg>");
}
.fit__col:not(.fit__col--good) li::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%239a9a9a' stroke-width='2' stroke-linecap='round'><path d='M5 10h10'/></svg>");
}

.fit__col--good h3 { color: var(--accent); }

@media (max-width: 720px) {
  .fit__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .fit__col + .fit__col {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--rule);
  }
}

/* =====================================================
   FAQ
   ===================================================== */

.faq {
  background: var(--surface);
  border-top: 1px solid var(--rule);
}

.faq h2 {
  font-size: clamp(28px, 4vw, 36px);
  margin-bottom: 40px;
}

.faq__list { max-width: 820px; }

.faq details {
  border-top: 1px solid var(--rule);
  padding: 20px 0;
}
.faq details:last-child { border-bottom: 1px solid var(--rule); }

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--serif);
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--ink);
  line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: '+';
  font-family: var(--sans);
  font-size: 24px;
  color: var(--accent);
  flex-shrink: 0;
  line-height: 1;
  transition: transform .2s ease;
}

.faq details[open] summary::after {
  content: '–';
  transform: translateY(-2px);
}

.faq details > p,
.faq details > div {
  margin-top: 16px;
  color: var(--ink-muted);
  font-size: 16px;
  max-width: 680px;
}

/* =====================================================
   Final CTA
   ===================================================== */

.final-cta {
  background: var(--ink);
  color: #fff;
  padding: clamp(72px, 10vw, 112px) 0;
  position: relative;
  overflow: hidden;
}

/* faint concentric rings on the right so the block doesn't feel flat */
.final-cta__deco {
  position: absolute;
  top: 50%;
  right: -140px;
  transform: translateY(-50%);
  width: 560px;
  height: 560px;
  pointer-events: none;
  opacity: 0.7;
}
.final-cta__deco svg { width: 100%; height: 100%; }

.final-cta__inner {
  max-width: 720px;
  position: relative;
  z-index: 1;
}

.final-cta h2 {
  color: #fff;
  font-size: clamp(32px, 5vw, 44px);
  margin-bottom: 24px;
}

.final-cta p {
  color: rgba(255,255,255,0.78);
  font-size: 17px;
  max-width: 560px;
  margin-bottom: 36px;
}

/* =====================================================
   Footer
   ===================================================== */

.site-footer {
  background: var(--surface);
  padding: 56px 0 28px;
  border-top: 1px solid var(--rule);
}

.site-footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.site-footer__brand .brand { display: block; margin-bottom: 6px; }
.site-footer__claim {
  color: var(--ink-muted);
  font-size: 14px;
  margin: 0;
}

.site-footer__links {
  display: flex;
  gap: 28px;
}
.site-footer__links a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 14px;
}
.site-footer__links a:hover { color: var(--ink); }

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  color: var(--ink-faint);
  font-size: 13px;
}

/* =====================================================
   Blog post
   ===================================================== */

.post {
  padding: clamp(56px, 8vw, 88px) 0 clamp(48px, 6vw, 72px);
}

.post__meta {
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.post h1 {
  font-size: clamp(36px, 5.4vw, 56px);
  margin-bottom: 24px;
}

.post h1 .accent-italic {
  display: block;
  font-style: italic;
  color: var(--accent);
  margin-top: 8px;
}

.post__lede {
  font-size: 19px;
  color: var(--ink-muted);
  line-height: 1.55;
  margin-bottom: 40px;
}

.post__byline {
  font-size: 14px;
  color: var(--ink-faint);
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 48px;
}

.post-body p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 1.4em;
}

.post-body h2 {
  font-size: clamp(26px, 3.4vw, 32px);
  margin-top: 56px;
  margin-bottom: 20px;
}

.post-body h3 {
  font-size: 22px;
  margin-top: 36px;
  margin-bottom: 14px;
}

.post-body blockquote {
  margin: 32px 0;
  padding: 20px 0 20px 24px;
  border-left: 3px solid var(--accent);
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
  line-height: 1.4;
}

.post-body ul, .post-body ol {
  padding-left: 22px;
  margin-bottom: 1.4em;
}
.post-body li { margin-bottom: 0.5em; line-height: 1.6; }

.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.post .stats {
  margin: 56px 0;
  padding-left: 0;
  padding-right: 0;
}

/* Post-internal CTA matches final-cta visual treatment */
.post-cta {
  background: var(--ink);
  color: #fff;
  padding: clamp(48px, 7vw, 72px) clamp(28px, 5vw, 56px);
  margin: 64px 0 0;
  border-radius: 4px;
}

.post-cta h3 {
  font-family: var(--serif);
  font-size: clamp(26px, 3.4vw, 32px);
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.2;
}

.post-cta p {
  color: rgba(255,255,255,0.78);
  font-size: 16px;
  margin-bottom: 28px;
  max-width: 540px;
}
