/* =========================================================================
   AISpend marketing — page-level layout primitives.
   Loaded AFTER colors_and_type.css.
   ========================================================================= */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--font-sans); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

img { display: block; max-width: 100%; }

/* ---------- Layout primitives ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 920px; margin: 0 auto; padding: 0 32px; }

.section { padding: 96px 0; }
.section + .section { border-top: 1px solid var(--hairline); }

.section-dark { background: #0E0F12; color: var(--paper); border-top: 1px solid #0E0F12 !important; }
.section-dark + .section { border-top: 1px solid var(--hairline); }
.section-dark .eyebrow { color: var(--green-300); }

.sec-head { display: flex; align-items: end; gap: 24px; margin-bottom: 48px; }
.sec-head .label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green-600);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.section-dark .sec-head .label { color: var(--green-300); }
.sec-head h2 {
  font-size: 44px;
  letter-spacing: -0.025em;
  line-height: 1.05;
  font-weight: 600;
  text-wrap: balance;
  flex: 1;
}
.sec-head .rule { flex: 0 0 80px; height: 1px; background: var(--hairline); margin-bottom: 14px; }
.section-dark .sec-head .rule { background: rgba(251,250,247,0.12); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 247, 0.86);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  max-width: 1180px; margin: 0 auto;
  padding: 0 32px;
}
.nav-left { display: flex; align-items: center; gap: 36px; }
.nav-logo { display: flex; align-items: center; gap: 8px; }
.nav-logo img { height: 22px; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 10px; }

.btn {
  font-size: 13.5px; font-weight: 500;
  padding: 9px 16px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 8px;
  line-height: 1;
  transition: background 120ms ease-out;
}
.btn-primary { background: var(--green-500); color: white; }
.btn-primary:hover { background: var(--green-600); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--hairline-strong); }
.btn-secondary:hover { background: var(--paper-sunk); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { color: var(--ink); }
.btn-lg { padding: 13px 22px; font-size: 15px; border-radius: var(--r-md); }
.section-dark .btn-secondary { color: var(--paper); border-color: rgba(251,250,247,0.18); }
.section-dark .btn-secondary:hover { background: rgba(251,250,247,0.06); }
.section-dark .btn-ghost { color: var(--ink-5); }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 80px; align-items: center; }
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green-600);
  letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 5px 12px 5px 8px;
  background: var(--green-50);
  border-radius: var(--r-pill);
  margin-bottom: 28px;
}
.hero-eyebrow .pip { width: 7px; height: 7px; background: var(--green-500); border-radius: 50%; }
.hero h1 {
  font-size: 80px;
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--green-600); }
.hero .sub {
  font-size: 19px;
  line-height: 1.45;
  color: var(--ink-3);
  margin: 26px 0 36px;
  max-width: 520px;
}
.hero .sub b { color: var(--ink); font-weight: 500; }
.hero .ctas { display: flex; align-items: center; gap: 12px; }
.hero .micro { margin-top: 16px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-4); letter-spacing: -0.01em; }

/* ---------- Hero "live tile" mock ---------- */
.hero-tile {
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: 26px 28px 24px;
  box-shadow: 0 1px 0 rgba(14,15,18,0.04), 0 30px 60px -30px rgba(14,15,18,0.18);
  position: relative;
}
.hero-tile::after {
  /* subtle base shadow strip */
  content: "";
  position: absolute;
  inset: auto 30px -16px 30px;
  height: 16px;
  background: rgba(14,15,18,0.08);
  filter: blur(20px);
  border-radius: 50%;
  z-index: -1;
}
.tile-row1 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.tile-name { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.tile-tag {
  font-family: var(--font-mono); font-size: 10px; color: var(--green-700);
  background: var(--green-50); padding: 3px 9px; border-radius: var(--r-pill);
  letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.tile-tag .pulse {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green-500);
  box-shadow: 0 0 0 0 rgba(31,157,92,0.5);
  animation: pulse 1800ms ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(31,157,92,0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(31,157,92,0); }
  100% { box-shadow: 0 0 0 0 rgba(31,157,92,0); }
}
.tile-num {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 64px; line-height: 1; letter-spacing: -0.035em; font-weight: 500;
  margin-bottom: 6px;
}
.tile-num .curr { color: var(--ink-4); font-size: 0.55em; margin-right: 2px; vertical-align: 5px; }
.tile-num .cents { color: var(--ink-4); font-size: 0.45em; }
.tile-delta { font-family: var(--font-mono); font-size: 13px; color: var(--green-600); }
.tile-delta s { color: var(--ink-5); text-decoration: line-through; font-size: 12px; margin-left: 8px; }

.tile-stack { margin: 22px 0 12px; height: 14px; display: flex; border-radius: var(--r-pill); overflow: hidden; border: 1px solid var(--hairline); }
.tile-stack > div { height: 100%; }
.tile-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; }
.tl-item { display: grid; grid-template-columns: 8px 1fr auto; gap: 9px; align-items: center; padding: 4px 0; }
.tl-sw { width: 8px; height: 8px; border-radius: 2px; }
.tl-name { font-size: 12px; color: var(--ink-2); }
.tl-val { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 12px; color: var(--ink); font-weight: 500; }

/* ---------- Logo strip ---------- */
.logos {
  padding: 36px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: var(--paper-sunk);
}
.logos-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.logos-lbl { font-family: var(--font-mono); font-size: 11px; color: var(--ink-4); letter-spacing: -0.01em; }
.logos-set { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.logo-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px;
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
}
.logo-chip .mk { width: 20px; height: 20px; border-radius: 4px; display: grid; place-items: center; color: white; font-family: var(--font-mono); font-size: 10px; font-weight: 600; }
.logo-chip span { font-size: 12.5px; color: var(--ink-2); font-weight: 500; letter-spacing: -0.01em; }

/* ---------- Problem grid ---------- */
.prob-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: var(--r-xl); overflow: hidden; }
.prob-cell { background: var(--paper-raised); padding: 32px 28px 30px; display: flex; flex-direction: column; gap: 16px; min-height: 280px; }
.prob-cell .num {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 11px; color: var(--ink-4); letter-spacing: 0.04em; text-transform: uppercase;
}
.prob-cell h3 { font-size: 20px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 600; }
.prob-cell p { font-size: 14.5px; line-height: 1.55; color: var(--ink-3); }
.prob-cell .stat {
  margin-top: auto; padding-top: 18px;
  border-top: 1px dashed var(--hairline);
  display: flex; align-items: baseline; gap: 10px;
}
.prob-cell .stat .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 24px; letter-spacing: -0.025em; font-weight: 500; color: var(--red-500); }
.prob-cell .stat .l { font-size: 12px; color: var(--ink-4); }

/* ---------- Feature row (alternating) ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; padding: 64px 0; border-bottom: 1px solid var(--hairline); }
.feature:last-child { border-bottom: 0; }
.feature.reverse > :first-child { order: 2; }
.feature-text .label { font-family: var(--font-mono); font-size: 12px; color: var(--green-600); letter-spacing: -0.01em; margin-bottom: 14px; display: inline-block; }
.feature-text h3 { font-size: 36px; line-height: 1.1; letter-spacing: -0.022em; font-weight: 600; margin-bottom: 16px; text-wrap: balance; }
.feature-text p { font-size: 16px; line-height: 1.55; color: var(--ink-3); margin-bottom: 22px; max-width: 460px; }
.feature-text p b { color: var(--ink); font-weight: 500; }
.feature-text .bullets { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.feature-text .bullets li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.feature-text .bullets li .ck { color: var(--green-600); font-family: var(--font-mono); flex-shrink: 0; }

/* ---------- Mock containers (re-used product visuals) ---------- */
.mock {
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.mock-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--hairline); }
.mock-eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-4); }
.mock-meta { font-family: var(--font-mono); font-size: 10px; color: var(--ink-4); letter-spacing: -0.01em; }

/* Connect mock */
.mock-keys { display: flex; flex-direction: column; gap: 8px; }
.mk-row {
  display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center;
  padding: 9px 12px;
  background: var(--paper-sunk);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
}
.mk-row .mk { width: 20px; height: 20px; border-radius: 4px; display: grid; place-items: center; color: white; font-family: var(--font-mono); font-size: 10px; font-weight: 600; }
.mk-row .val { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); letter-spacing: -0.01em; }
.mk-row .state { font-family: var(--font-mono); font-size: 11px; color: var(--green-600); }
.mk-row .state.warn { color: var(--amber-700); }
.mk-row .state.idle { color: var(--ink-4); }

/* Tag mock */
.mock-tags { display: flex; flex-wrap: wrap; gap: 6px 8px; padding: 8px 4px; }
.mt {
  font-size: 12px; padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--paper-sunk);
  border: 1px solid var(--hairline);
  color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 7px;
}
.mt .sw { width: 7px; height: 7px; border-radius: 50%; }
.mt .num { font-family: var(--font-mono); color: var(--ink-4); margin-left: 2px; font-size: 10.5px; }

/* Budget mock */
.mock-budgets { display: flex; flex-direction: column; gap: 12px; }
.mb-row { display: flex; flex-direction: column; gap: 5px; }
.mb-l { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--ink-2); }
.mb-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 11.5px; color: var(--ink-4); }
.mb-bar { height: 7px; background: var(--paper-sunk); border-radius: var(--r-pill); overflow: hidden; display: flex; }
.mb-fill { height: 100%; }
.mb-fill.ok { background: var(--green-500); }
.mb-fill.warn { background: var(--amber-500); }
.mb-fill.over { background: var(--red-500); }
.mb-fill.over-extra { background: var(--red-500); opacity: 0.5; }

/* ---------- Why-not-Helicone comparison ---------- */
.compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid rgba(251,250,247,0.08);
}
.compare .col { padding: 36px 36px 38px; }
.compare .col.them { background: rgba(251,250,247,0.04); }
.compare .col.us { background: var(--green-900); }
.compare .col h4 { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; margin-bottom: 18px; opacity: 0.7; }
.compare .col.us h4 { color: var(--green-300); opacity: 1; }
.compare .col .name { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 24px; }
.compare ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.compare li {
  display: grid; grid-template-columns: 18px 1fr; gap: 12px;
  align-items: flex-start;
  font-size: 14.5px; line-height: 1.45;
}
.compare li .ic { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-family: var(--font-mono); flex-shrink: 0; margin-top: 1px; }
.compare .them li .ic { background: rgba(251,250,247,0.08); color: var(--ink-5); }
.compare .us li .ic { background: var(--green-500); color: var(--green-900); font-weight: 700; }
.compare li b { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 500; }
.compare .them li { color: rgba(251,250,247,0.7); }
.compare .them li b { color: var(--ink-5); }
.compare .us li { color: rgba(251,250,247,0.92); }
.compare .us li b { color: var(--green-300); }
.compare .col .foot { margin-top: 28px; padding-top: 22px; border-top: 1px solid rgba(251,250,247,0.08); font-family: var(--font-mono); font-size: 12px; }
.compare .them .foot { color: var(--ink-5); }
.compare .us .foot { color: var(--green-300); }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan { background: var(--paper-raised); border: 1px solid var(--hairline); border-radius: var(--r-xl); padding: 32px 30px 32px; display: flex; flex-direction: column; gap: 18px; }
.plan.featured {
  background: #0E0F12; color: var(--paper); border-color: #0E0F12;
  box-shadow: 0 1px 0 rgba(14,15,18,0.06), 0 0 0 4px var(--green-50);
  position: relative;
  transform: translateY(-8px);
}
.plan.featured .pname { color: var(--green-300); }
.plan.featured .price { color: var(--paper); }
.plan.featured .sub { color: rgba(251,250,247,0.6); }
.plan.featured li { color: rgba(251,250,247,0.86); }
.plan.featured li .ck { color: var(--green-300); }
.plan.featured .cta { background: var(--green-500); color: white; border-color: var(--green-500); }
.plan.featured .cta:hover { background: var(--green-600); }
.plan.featured .badge-most {
  position: absolute; top: -12px; right: 24px;
  font-family: var(--font-mono); font-size: 10px; padding: 4px 10px;
  background: var(--green-500); color: white; border-radius: var(--r-pill);
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600;
}

.plan .pname { font-size: 12px; font-weight: 600; color: var(--ink-2); letter-spacing: 0.06em; text-transform: uppercase; }
.plan .price-row { display: flex; align-items: baseline; gap: 8px; }
.plan .price { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 56px; line-height: 1; letter-spacing: -0.035em; font-weight: 500; color: var(--ink); }
.plan .per { font-size: 13.5px; color: var(--ink-4); }
.plan .sub { font-size: 13.5px; line-height: 1.5; color: var(--ink-3); }
.plan ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.plan li { font-size: 14px; line-height: 1.4; color: var(--ink-2); display: flex; gap: 10px; align-items: flex-start; }
.plan li .ck { color: var(--green-600); font-family: var(--font-mono); flex-shrink: 0; }
.plan li b { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 500; color: inherit; }
.plan .cta {
  margin-top: auto;
  align-self: stretch;
  text-align: center;
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 14px; font-weight: 500;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
}
.plan .cta:hover { background: var(--paper-sunk); }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; }
.faq-item { padding: 24px 0; border-bottom: 1px solid var(--hairline); display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: start; }
.faq-item:first-child { border-top: 1px solid var(--hairline); }
.faq-item h4 { font-size: 18px; line-height: 1.3; letter-spacing: -0.015em; font-weight: 600; }
.faq-item p { font-size: 14.5px; line-height: 1.55; color: var(--ink-3); }
.faq-item p b { color: var(--ink); font-weight: 500; }
.faq-item p .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- CTA ---------- */
.cta-band {
  padding: 96px 0;
  text-align: center;
}
.cta-band h2 {
  font-size: 64px; line-height: 1.02; letter-spacing: -0.03em; font-weight: 600;
  text-wrap: balance;
  margin: 0 auto 18px; max-width: 800px;
}
.cta-band p {
  font-size: 17px; color: var(--ink-3); line-height: 1.45;
  max-width: 540px; margin: 0 auto 32px;
}
.section-dark.cta-band p { color: rgba(251,250,247,0.6); }
.cta-band .ctas { display: inline-flex; gap: 12px; }
.cta-band .micro { margin-top: 18px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-4); letter-spacing: -0.01em; }
.section-dark.cta-band .micro { color: rgba(251,250,247,0.4); }

/* ---------- Footer ---------- */
.footer { padding: 56px 0 40px; border-top: 1px solid var(--hairline); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer h5 { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--ink-4); margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.footer ul a { font-size: 13.5px; color: var(--ink-2); }
.footer ul a:hover { color: var(--ink); }
.footer-brand img { height: 22px; margin-bottom: 14px; }
.footer-brand p { font-size: 13px; line-height: 1.5; color: var(--ink-3); max-width: 280px; }
.footer-bottom {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-4); letter-spacing: -0.01em;
}
.footer-bottom .links { display: flex; gap: 22px; }
