/* ============================================================
   QueryFlow — Shared styles for backpages
   Loaded by all /pages/*.html
   The homepage at / has these styles inline for performance
   ============================================================ */

:root {
  --bg-base:        #050810;
  --bg-mid:         #0A0E1A;
  --bg-highlight:   #161C32;
  --surface-1:      rgba(20, 24, 38, 0.6);
  --surface-2:      rgba(28, 34, 56, 0.8);
  --text-primary:   #F0F4FF;
  --text-secondary: #8B92A9;
  --text-tertiary:  #5A6178;
  --text-faint:     #3A4258;
  --accent-cyan:    #00E5FF;
  --accent-magenta: #B14EFF;
  --accent-green:   #39FF88;
  --accent-blue:    #4A8EFF;
  --hairline:       rgba(255, 255, 255, 0.08);
  --hairline-bold:  rgba(255, 255, 255, 0.14);
  --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;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 800px 600px at 20% 30%, rgba(0, 229, 255, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 700px 500px at 85% 70%, rgba(177, 78, 255, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 900px 700px at 50% 100%, rgba(57, 255, 136, 0.04) 0%, transparent 60%);
}

#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

.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(5, 8, 16, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--hairline);
}

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

.nav-psi {
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-wordmark {
  font-weight: 700;
  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(--bg-base) !important;
  background: var(--text-primary);
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 200ms;
}

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

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-cyan);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 32px;
  display: inline-block;
  padding: 6px 14px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
  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 {
  background: linear-gradient(135deg, var(--accent-magenta), var(--accent-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.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(--bg-base);
  background: var(--text-primary);
  padding: 16px 28px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 200ms;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.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: 12px;
  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;
}

/* 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 {
  background: linear-gradient(135deg, var(--accent-magenta), var(--accent-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.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: 18px;
  border: 1px solid var(--hairline);
  background: var(--surface-1);
  backdrop-filter: blur(24px);
}

.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.2);
}

.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-green); font-weight: 600; }

.snippet-block {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  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;
}

/* 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: 18px;
  padding: 26px 32px;
  backdrop-filter: blur(24px);
}

.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 {
  background: linear-gradient(135deg, var(--accent-magenta), var(--accent-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.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: 10px;
  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 */
.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);
}

/* 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; }
}
