/* ============================================================
   QueryFlow — Shared styles for backpages
   Loaded by all /pages/*.html
   Design system: dark, mint accent, no gradients, no starfield.
   ============================================================ */

:root {
  --bg-base:        #15161A;
  --bg-mid:         #15161A;
  --bg-highlight:   #24262C;
  --surface-1:      #1C1D22;
  --surface-2:      #24262C;
  --elevated:       #24262C;
  --text-primary:   #ECEDEF;
  --text-secondary: #A2A6AE;
  --text-tertiary:  #6B7079;
  --text-faint:     #6B7079;
  --accent:         #3DFF8A;
  --accent-dim:     rgba(61, 255, 138, 0.14);
  --on-accent:      #06120B;
  --danger:         #FF5C5C;
  --warn:           #FFB547;
  --info:           #8FD3FF;
  /* legacy aliases kept so any inline reference still resolves sanely */
  --accent-cyan:    #3DFF8A;
  --accent-magenta: #3DFF8A;
  --accent-green:   #3DFF8A;
  --accent-blue:    #8FD3FF;
  --hairline:       rgba(255, 255, 255, 0.07);
  --hairline-bold:  rgba(255, 255, 255, 0.14);
  --radius-lg:      12px;
  --radius-sm:      8px;
  --font-display:   'Inter', -apple-system, system-ui, sans-serif;
  --font-mono:      'JetBrains Mono', 'SF Mono', Menlo, monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  letter-spacing: -0.01em;
  line-height: 1.5;
}

/* Flat background — no starfield, no radial glows */
body::before { content: none; }
#stars { display: none; }

.z { position: relative; z-index: 1; }

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(21, 22, 26, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: background 200ms, border-color 200ms;
}

nav.scrolled {
  background: rgba(21, 22, 26, 0.92);
  border-bottom: 1px solid var(--hairline);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-mark {
  color: var(--accent);
  flex-shrink: 0;
}

/* legacy class kept in case any markup still references it */
.nav-psi {
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  color: var(--accent);
}

.nav-wordmark {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 200ms;
}

.nav-links a:hover { color: var(--text-primary); }

.nav-cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--on-accent) !important;
  background: var(--accent);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 200ms;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(61, 255, 138, 0.25);
}

/* Hero */
.hero {
  padding: 160px 32px 80px;
  text-align: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 32px;
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent-dim);
  border: 1px solid rgba(61, 255, 138, 0.25);
  border-radius: 100px;
}

.hero h1 {
  font-weight: 700;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  max-width: 900px;
  margin: 0 auto 24px;
}

.hero h1 .accent { color: var(--accent); }

.hero p.lead {
  font-size: clamp(17px, 1.5vw, 20px);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 48px;
  line-height: 1.5;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary {
  font-size: 16px;
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent);
  padding: 16px 28px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all 200ms;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(61, 255, 138, 0.3);
}

.btn-secondary {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--elevated);
  border: 1px solid var(--hairline);
  padding: 16px 28px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all 200ms;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--hairline-bold);
}

.btn-ghost {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  text-decoration: none;
  transition: color 200ms;
}

.btn-ghost:hover { color: var(--text-primary); }

.btn-app-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 200ms;
  height: 54px;
}

.btn-app-store:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-app-store .as-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1;
}

.btn-app-store .as-small {
  font-size: 10px;
  opacity: 0.8;
  margin-bottom: 3px;
}

.btn-app-store .as-large {
  font-size: 17px;
  font-weight: 600;
}

.hero-meta {
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
}

.cta-fine {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* Direct answer / "Quick answer" box (AEO surface) */
.direct-answer {
  background: var(--accent-dim) !important;
  border-left: 2px solid var(--accent) !important;
  color: var(--text-primary) !important;
}
.direct-answer p { color: var(--text-primary) !important; }

/* Article body */
section.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 32px;
}

.article .section-title {
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 60px 0 16px;
}

.article .section-title:first-child {
  margin-top: 0;
}

.article .section-title .accent { color: var(--accent); }

.article .section-h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 56px 0 16px;
  color: var(--text-primary);
}

.article-lead {
  font-size: 21px;
  line-height: 1.55;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.article p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.article p strong {
  color: var(--text-primary);
  font-weight: 600;
}

.feature-compare {
  margin: 32px 0;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  background: var(--surface-1);
}

.feature-compare table {
  width: 100%;
  border-collapse: collapse;
}

.feature-compare th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 18px 22px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(0, 0, 0, 0.15);
}

.feature-compare td {
  padding: 16px 22px;
  border-bottom: 1px solid var(--hairline);
  color: var(--text-secondary);
  font-size: 14px;
}

.feature-compare tr:last-child td { border-bottom: none; }
.feature-compare td:first-child { font-weight: 600; color: var(--text-primary); }
.feature-compare td:last-child  { color: var(--accent); font-weight: 600; }

.snippet-block {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 24px 0;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  overflow-x: auto;
}

/* Mini pricing block — inserted on *-alternative pages */
.mini-pricing {
  margin: 32px 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  overflow: hidden;
}

.mini-pricing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--hairline);
  flex-wrap: wrap;
}

.mini-pricing-row:last-of-type { border-bottom: none; }

.mini-pricing-row .mp-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 15px;
}

.mini-pricing-row .mp-price {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-secondary);
}

.mini-pricing-row.mp-pipelines {
  background: var(--accent-dim);
}

.mini-pricing-row.mp-pipelines .mp-price { color: var(--accent); font-weight: 600; }

.mini-pricing-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 24px;
}

.mini-pricing-cta a {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  transition: all 200ms;
}

.mini-pricing-cta a.mp-studio {
  background: var(--accent);
  color: var(--on-accent);
}

.mini-pricing-cta a.mp-studio:hover { transform: translateY(-1px); }

.mini-pricing-cta a.mp-pipelines {
  background: var(--elevated);
  color: var(--text-primary);
  border: 1px solid var(--hairline);
}

.mini-pricing-cta a.mp-pipelines:hover { border-color: var(--hairline-bold); }

/* FAQ */
.faq-section {
  max-width: 900px;
  margin: 0 auto;
}

.faq-section .section-title {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 40px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 26px 32px;
}

.faq-item h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.faq-item p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* Final CTA */
.final-cta {
  text-align: center;
  padding: 120px 32px;
  max-width: 1100px;
  margin: 0 auto;
}

.final-cta h2 {
  font-size: clamp(36px, 5.5vw, 72px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 24px;
}

.final-cta h2 .accent { color: var(--accent); }

.final-cta p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.final-ctas {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Footer */
footer {
  border-top: 1px solid var(--hairline);
  padding: 48px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 200ms;
}

.footer-links a:hover { color: var(--text-primary); }

.footer-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}

/* Reveals (scroll motion, shared with homepage) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms cubic-bezier(0.32, 0.72, 0, 1),
              transform 600ms cubic-bezier(0.32, 0.72, 0, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Sticky mobile bar (brief §8) */
.sticky-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 200;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: rgba(28, 29, 34, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--hairline);
}

.sticky-bar .price-line {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.3;
}

.sticky-bar .btn-primary {
  padding: 10px 18px;
  font-size: 14px;
  flex-shrink: 0;
}

/* Mobile */
@media (max-width: 700px) {
  nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .hero { padding: 120px 20px 60px; }
  section.container { padding: 60px 20px; }
  .article .section-h2 { font-size: 22px; }
  .article p { font-size: 16px; }
  .faq-item { padding: 22px 24px; }
  footer { flex-direction: column; text-align: center; padding: 32px 20px 96px; }
  .sticky-bar { display: flex; }
  body { padding-bottom: 0; }
}

.byline{font-size:13px;color:#9A9CA3;margin:-10px 0 22px;}

/* Quick-answer wrapper section must not inherit the green box styling */
section.direct-answer-section { padding-top: 0; padding-bottom: 0; background: none; border: 0; }

/* Breadcrumb (a plain div; bare <nav> is the fixed site header) */
.breadcrumb {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 32px 16px;
  text-align: left;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-tertiary);
}
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb > span { margin: 0 6px; }
.breadcrumb > span[aria-current] { margin: 0; color: var(--text-tertiary); }
