/* Bahi marketing site - Ramp-language world (see DESIGN.md): warm cream ground,
   near-black ink, two-tone headlines, one acid-lime accent owned by the CTAs,
   white bento cards on hairlines, Inter. No framework. */

:root {
  --paper: #f7f6f1;
  --card: #ffffff;
  --ink: #100f0d;
  --ink-soft: #5b5951;
  --ink-faint: #6f6d64;
  --dim: #85837b;
  --hairline: #dcdbd6;
  --lime: #eff02a;
  --lime-deep: #e0e11b;
  --green: #0f7b4d;
  --red: #b0463e;
  --amber: #8f6316;
  --black: #1a1918;
  --shadow: 0 16px 40px -16px rgb(31 30 27 / 0.25);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --measure: 42rem;
  /* ONE corner everywhere (owner-specified): buttons, cards, pills, tiles, chips */
  --radius: 5px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.12; text-wrap: balance; margin: 0 0 0.5em; font-weight: 600; }
h2 { font-size: clamp(1.875rem, 3.6vw, 2.5rem); letter-spacing: -0.03em; }
h3 { font-size: 1.1875rem; letter-spacing: -0.015em; }
/* the two-tone headline: bold ink phrase, muted continuation */
.dim { color: var(--dim); }
/* the highlight headline: solid solar behind the phrase (hero only) */
.hl {
  background: var(--lime);
  padding: 0 0.1em;
  /* slimmer than the line advance (1.14), so wrapped lines keep a visible gap
     and the band hugs the glyphs instead of filling the whole line box */
  line-height: 1.02;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ---------- shared ---------- */
.btn {
  display: inline-block;
  border-radius: var(--radius);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}
.btn-primary { background: var(--lime); color: var(--ink); }
.btn-primary:hover { background: var(--lime-deep); }
.btn-primary:focus-visible,
.btn-ghost:focus-visible,
.nav a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.btn-ghost { color: var(--ink); background: #eceae5; }
.btn-ghost:hover { background: #e2e0da; }
.btn-small { padding: 0.5rem 1.1rem; font-size: 0.9375rem; }
.btn-large { padding: 0.9rem 2rem; font-size: 1.125rem; }

.section-head { max-width: var(--measure); margin: 0 auto 2.5rem; text-align: center; }
.section-head p { color: var(--ink-soft); margin: 0; }

.wordmark {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 700; font-size: 1.1875rem; color: var(--ink); text-decoration: none;
  letter-spacing: -0.02em;
}
.wordmark-mark {
  display: inline-grid; place-items: center;
  width: 1.7rem; height: 1.7rem; border-radius: var(--radius);
  background: var(--black); color: var(--lime); font-size: 1.05rem; line-height: 1;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 2rem;
  padding: 0.85rem clamp(1.25rem, 4vw, 3rem);
  background: rgb(247 246 241 / 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav nav { display: flex; gap: 1.5rem; margin-left: auto; }
.nav nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.9375rem; font-weight: 500; padding: 0.5rem 0.1rem; }
.nav nav a:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(20rem, 30rem) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5.5rem);
  max-width: 82rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 7rem) clamp(1.25rem, 4vw, 3rem) clamp(3.5rem, 8vh, 5.5rem);
  /* the dotted working-paper grid, the world's own hero material */
  background-image: radial-gradient(circle, rgb(31 30 27 / 0.10) 1px, transparent 1.2px);
  background-size: 26px 26px;
}
.hero h1 {
  font-size: clamp(2.75rem, 6.4vw, 4.5rem);
  font-weight: 550;
  letter-spacing: -0.022em;
  line-height: 1.14;
}
.hero-sub { color: var(--ink-soft); font-size: 1.1875rem; max-width: 28rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.hero-note { color: var(--ink-faint); font-size: 0.875rem; margin-top: 1.25rem; }

/* ---------- pipeline ---------- */
.pipeline { position: relative; min-width: 0; }
.pipeline-svg { width: 100%; height: auto; display: block; }
.lane {
  fill: none; stroke: #d4d2c8; stroke-width: 2;
  stroke-dasharray: 6 7; stroke-linecap: round;
}
.source-pill { fill: var(--card); stroke: var(--hairline); }
.sources text {
  fill: var(--ink); font-size: 17px; font-weight: 600;
  text-anchor: start; dominant-baseline: middle;
  font-family: 'Inter', ui-sans-serif, -apple-system, sans-serif;
}
.sources .lettermark { fill: #fff; font-size: 17px; font-weight: 700; text-anchor: middle; }
.dots circle { fill: var(--ink); opacity: 0.85; }
.node-halo { fill: var(--lime); opacity: 0.35; }
.node-core { fill: var(--black); }
.node-glyph { fill: var(--lime); font-size: 38px; font-weight: 700; text-anchor: middle; }
.node { animation: node-breathe 2.8s var(--ease-out) infinite; }
@keyframes node-breathe {
  0%, 78%, 100% { transform: translate(500px, 280px) scale(1); }
  86% { transform: translate(500px, 280px) scale(1.045); }
}
.chips {
  position: absolute; right: 0; top: 13%; height: 74%;
  width: 26%;
  display: flex; flex-direction: column; justify-content: space-between;
}
.chip {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.65rem 0.95rem;
  display: grid;
  gap: 0.05rem;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  animation: chip-in 600ms var(--ease-out) both;
}
.chip strong { font-size: 1.0625rem; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.chip-kicker { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.chip-red .chip-kicker { color: var(--red); }
.chip-amber .chip-kicker { color: var(--amber); }
.chip-green .chip-kicker { color: var(--green); }
.chips .chip:nth-child(1) { animation-delay: 500ms; }
.chips .chip:nth-child(2) { animation-delay: 800ms; }
.chips .chip:nth-child(3) { animation-delay: 1100ms; }
@keyframes chip-in {
  from { opacity: 0; transform: translateX(-14px); }
  to { opacity: 1; transform: none; }
}

.pipeline-m { display: none; }

/* ---------- trust ---------- */
.trust {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.1875rem;
  border-top: 1px solid var(--hairline);
}
.trust strong { color: var(--ink); }

/* ---------- product screens ---------- */
.screens { padding: clamp(3rem, 7vh, 5rem) clamp(1.25rem, 4vw, 3rem); }
.shot { margin: 0 auto 2.5rem; max-width: 64rem; }
.browser-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--card);
  border: 1px solid var(--hairline);
}
.browser-bar {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
}
.browser-bar i { width: 0.6rem; height: 0.6rem; border-radius: 50%; border: 1px solid var(--hairline); background: var(--card); }
.browser-url {
  margin-left: 0.6rem;
  font-size: 0.75rem; color: var(--ink-faint);
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 0.1rem 0.7rem;
}
.shot figcaption { color: var(--ink-soft); font-size: 0.9375rem; margin-top: 0.9rem; text-align: center; }
.shot-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2rem; max-width: 72rem; margin: 0 auto;
}
.shot-row .shot { margin-bottom: 0; }

.mobile-moment {
  display: grid; grid-template-columns: auto minmax(16rem, 26rem);
  align-items: center; justify-content: center;
  gap: clamp(2rem, 5vw, 4rem);
  margin: 4rem auto 0; max-width: 60rem;
}
.phone-frame {
  width: clamp(13rem, 22vw, 16rem);
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: var(--shadow), inset 0 0 0 6px var(--black);
  padding: 6px; background: var(--black);
}
.phone-frame img { border-radius: 1.6rem; }
.mobile-copy p { color: var(--ink-soft); margin: 0; }

/* ---------- features (bento cards) ---------- */
.features { padding: clamp(3rem, 7vh, 5rem) clamp(1.25rem, 4vw, 3rem); }
.feature {
  display: grid; grid-template-columns: minmax(18rem, 26rem) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem); align-items: center;
  max-width: 70rem; margin: 0 auto 1.5rem;
  padding: clamp(1.75rem, 3vw, 2.75rem);
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.feature-flip .feature-copy { order: 2; }
.feature h3 { font-size: 1.375rem; }
.feature-what { color: var(--ink-soft); margin: 0 0 1rem; }
.feature-worth { color: var(--ink-soft); margin: 0; }
.feature-worth strong { color: var(--ink); }
.feature-video {
  width: 100%; height: auto; border-radius: var(--radius);
  border: 1px solid var(--hairline);
  background: var(--card);
}
.feature-pair {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 70rem; margin: 0 auto;
}
.feature-pair > div {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 3vw, 2.5rem);
}
.feature-pair h3 { font-size: 1.25rem; }
.feature-pair p { color: var(--ink-soft); margin: 0; }

/* ---------- exactness: the black moment ---------- */
.exact { text-align: center; padding: clamp(3.5rem, 9vh, 6rem) 1.25rem; background: var(--black); color: #f4f3ee; }
.kicker {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--lime); margin: 0 0 1rem;
}
.exact-figure {
  font-size: clamp(2.25rem, 7vw, 4.75rem);
  font-weight: 650; letter-spacing: -0.03em; line-height: 1.05;
  font-variant-numeric: tabular-nums; margin: 0; color: var(--lime);
}
.exact-line { font-size: clamp(1.125rem, 2.5vw, 1.5rem); color: #b9b7ac; margin: 0.5rem 0 1.5rem; }
.exact-body { max-width: 36rem; margin: 0 auto; color: #b9b7ac; }

/* ---------- how ---------- */
.how { padding: clamp(3rem, 7vh, 5rem) clamp(1.25rem, 4vw, 3rem); }
.steps {
  list-style: none; counter-reset: step;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem; max-width: 70rem; margin: 0 auto; padding: 0;
}
.steps li {
  counter-increment: step;
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 1.75rem;
}
.steps h3 { display: flex; align-items: flex-start; gap: 0.65rem; }
.steps h3::before {
  content: counter(step);
  flex: none;
  display: inline-grid; place-items: center;
  width: 1.7rem; height: 1.7rem;
  border-radius: 50%;
  background: var(--lime);
  font-size: 0.875rem; font-weight: 700; color: var(--ink);
  transform: translateY(0.05em);
}
.steps p { color: var(--ink-soft); margin: 0; }
.connector-note {
  max-width: var(--measure); margin: 3rem auto 0;
  text-align: center; color: var(--ink-soft);
  padding-top: 2rem; border-top: 1px solid var(--hairline);
}

/* ---------- security ---------- */
.security { padding: clamp(3rem, 7vh, 5rem) clamp(1.25rem, 4vw, 3rem); }
.security h2 { text-align: center; }
.security-lede { text-align: center; color: var(--ink-soft); max-width: 36rem; margin: 0 auto; }
.security-list {
  list-style: none; padding: 0;
  max-width: 46rem; margin: 2.25rem auto 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
  color: var(--ink-soft);
}
.security-list li {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 1.5rem;
}
.security-list h3 { font-size: 1.0625rem; margin: 0 0 0.4rem; }
.security-list p { margin: 0; }
.li-icon {
  flex: none; width: 1.5rem; height: 1.5rem; margin-top: 0.15rem;
  fill: none; stroke: var(--ink); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- close + footer ---------- */
.close { text-align: center; padding: clamp(4rem, 10vh, 6.5rem) 1.25rem; }
.close h2 { font-size: clamp(2.25rem, 5.4vw, 3.25rem); letter-spacing: -0.025em; font-weight: 600; }
.close p { color: var(--ink-soft); margin: 0 0 2rem; }

.footer {
  border-top: 1px solid var(--hairline);
  padding: 2.5rem clamp(1.25rem, 4vw, 3rem) 3rem;
  display: grid; gap: 0.75rem;
}
.footer-brand { display: flex; align-items: baseline; gap: 1rem; color: var(--ink-faint); font-size: 0.875rem; }
.footer-small { color: var(--ink-faint); font-size: 0.8125rem; margin: 0; max-width: 46rem; }
.footer-small a { color: var(--ink-faint); }

/* ---------- entrances ---------- */
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-ctas { justify-content: center; }
  .shot-row { grid-template-columns: 1fr; gap: 2.5rem; }
  .steps { grid-template-columns: 1fr; }
  .mobile-moment { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .feature { grid-template-columns: 1fr; }
  .feature-flip .feature-copy { order: 0; }
  .feature-pair { grid-template-columns: 1fr; }
  .security-list { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav { flex-wrap: wrap; gap: 0.5rem 0.9rem; row-gap: 0; padding-top: 0.6rem; padding-bottom: 0.35rem; }
  .nav .btn-small { margin-left: auto; }
  .nav nav {
    order: 3; flex-basis: 100%;
    justify-content: center; gap: 1.1rem; margin-left: 0;
  }
  .nav nav a { font-size: 0.8125rem; }
  .pipeline-svg { display: none; }
  .pipeline-m { display: block; }
  .pm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .pm-pill {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
    background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius);
    height: 46px; padding: 0.35rem 0.6rem; min-width: 0;
  }
  .pm-pill img { max-height: 26px; width: auto; max-width: 100%; }
  .pm-pill .pm-icon { max-height: 22px; }
  .pm-name { font-size: 0.75rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
  .pm-funnel { display: block; width: 100%; height: auto; }
  .pm-glyph { font-size: 20px; }
  .chips { position: static; width: auto; gap: 0.75rem; display: flex; flex-direction: column; }
  .pipeline { display: block; }
}

/* ---------- reduced motion: the finished diagram, no travel ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dots { display: none; }
  .node { animation: none; }
  .chip { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
