/* ═══════════════════════════════════════════════════════════════════
   LeanHQ — marketing site
   Editorial-technical: deep navy canvas, electric cyan signal,
   turmeric for money. Ledger-grid texture, grain, staggered reveals.
   Brand tokens mirror packages/shell-ui/src/brand.css in the product.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --navy: #001838;
  --navy-deep: #000e21;
  --navy-mid: #002348;
  --cyan: #00c1ff;
  --cyan-dark: #00a3d6;
  --turmeric: #d4a017;
  --cloud: #f5f7fa;
  --slate: #7a8fa6;
  --ink: #e8eef5;

  --edge: rgba(255, 255, 255, 0.09);
  --edge-bright: rgba(0, 193, 255, 0.28);

  --display: "Fraunces", Georgia, serif;
  --sans: "Archivo", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --max: 1180px;
}

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

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

body {
  margin: 0;
  background: var(--navy-deep);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grain + ledger grid: atmosphere without imagery */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }

img, svg { max-width: 100%; }

/* ── Layout ─────────────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

section { position: relative; z-index: 2; }

.rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--edge) 18%, var(--edge) 82%, transparent);
  border: 0;
  margin: 0;
}

/* ── Type ───────────────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 40;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 5.6vw, 4.35rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h3 { font-size: 1.24rem; font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 20; letter-spacing: -0.01em; }

p { margin: 0; text-wrap: pretty; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 1.15rem;
}
.eyebrow.muted { color: var(--slate); }

.lede { font-size: clamp(1.06rem, 1.9vw, 1.3rem); color: #b9c9da; max-width: 60ch; }

.dim { color: var(--slate); }

/* ── Header ─────────────────────────────────────────────────────── */
header.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(14px);
  background: rgba(0, 14, 33, 0.76);
  border-bottom: 1px solid var(--edge);
}
.nav-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.95rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand svg { height: 26px; width: auto; display: block; }
.brand span {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.16rem;
  letter-spacing: -0.03em;
  color: #fff;
}
.nav-links { display: flex; align-items: center; gap: 1.9rem; }
.nav-links a:not(.btn) {
  text-decoration: none;
  font-size: 0.9rem;
  color: #9fb2c6;
  transition: color 0.18s;
}
.nav-links a:not(.btn):hover { color: #fff; }
@media (max-width: 720px) { .nav-links a.hide-sm { display: none; } }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.35rem;
  border-radius: 999px;
  font-size: 0.93rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.18s cubic-bezier(.2,.8,.3,1), box-shadow 0.18s, background 0.18s, border-color 0.18s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--cyan);
  color: var(--navy);
  box-shadow: 0 0 0 0 rgba(0, 193, 255, 0.45);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 34px -8px rgba(0, 193, 255, 0.6);
}
.btn-ghost { border-color: var(--edge); color: var(--ink); }
.btn-ghost:hover { border-color: var(--edge-bright); background: rgba(0, 193, 255, 0.06); transform: translateY(-2px); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding-block: clamp(4.5rem, 11vw, 8.5rem) clamp(3.5rem, 8vw, 6rem);
  overflow: hidden;
}
/* Ledger grid + cyan aurora */
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 150%;
  background:
    radial-gradient(58% 42% at 72% 8%, rgba(0, 193, 255, 0.19), transparent 68%),
    radial-gradient(44% 36% at 8% 32%, rgba(212, 160, 23, 0.10), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--edge) 1px, transparent 1px),
    linear-gradient(90deg, var(--edge) 1px, transparent 1px);
  background-size: 100% 3.2rem, 7.5rem 100%;
  mask-image: radial-gradient(120% 78% at 50% 18%, #000 20%, transparent 76%);
  opacity: 0.5;
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 2; }

.hero h1 .accent {
  font-style: italic;
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 60;
  color: var(--cyan);
}
.hero-copy { max-width: 52ch; }
.hero .lede { margin-top: 1.6rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2.4rem; align-items: center; }
.hero-note { font-size: 0.85rem; color: var(--slate); margin-top: 1.15rem; }

/* Stat strip */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 1px;
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  background: var(--edge);
  border: 1px solid var(--edge);
  border-radius: 14px;
  overflow: hidden;
}
.stat { background: rgba(0, 22, 51, 0.72); padding: 1.5rem 1.35rem; }
.stat b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 2.05rem;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
  font-variation-settings: "WONK" 1, "opsz" 40;
}
.stat b .unit { font-size: 1.05rem; color: var(--cyan); }
.stat span { display: block; margin-top: 0.5rem; font-size: 0.82rem; color: var(--slate); line-height: 1.45; }

/* ── Generic section ────────────────────────────────────────────── */
.band { padding-block: clamp(4rem, 9vw, 7rem); }
.band-head { max-width: 62ch; margin-bottom: clamp(2.4rem, 5vw, 3.6rem); }
.band-head p { margin-top: 1.1rem; color: #a8bacd; }

/* ── Departments ────────────────────────────────────────────────── */
.dept { margin-bottom: 3.2rem; }
.dept-label {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--edge);
}
.dept-label h3 {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 500;
}
.dept-label em { font-style: normal; font-size: 0.82rem; color: var(--slate); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 1.1rem; }
.card {
  position: relative;
  padding: 1.6rem 1.5rem 1.5rem;
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: linear-gradient(163deg, rgba(0, 35, 72, 0.55), rgba(0, 14, 33, 0.35));
  transition: border-color 0.22s, transform 0.22s cubic-bezier(.2,.8,.3,1), background 0.22s;
}
.card:hover {
  border-color: var(--edge-bright);
  transform: translateY(-3px);
  background: linear-gradient(163deg, rgba(0, 45, 92, 0.65), rgba(0, 14, 33, 0.4));
}
.card h3 { margin-bottom: 0.55rem; color: #fff; }
.card p { font-size: 0.93rem; color: #9fb2c6; }
.card .tag {
  position: absolute;
  top: 1.35rem;
  right: 1.4rem;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--turmeric);
  border: 1px solid rgba(212, 160, 23, 0.32);
  border-radius: 999px;
  padding: 0.16rem 0.55rem;
}
.card.soon { opacity: 0.58; }
.card.soon .tag { color: var(--slate); border-color: var(--edge); }

/* ── Flow (reconciliation signature visual) ─────────────────────── */
.flow-wrap {
  border: 1px solid var(--edge);
  border-radius: 18px;
  background:
    radial-gradient(70% 100% at 50% 0%, rgba(0, 193, 255, 0.09), transparent 70%),
    rgba(0, 20, 46, 0.5);
  padding: clamp(1.6rem, 4vw, 2.8rem);
}
.flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}
@media (max-width: 760px) { .flow { grid-template-columns: 1fr; } }
.flow-node {
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 1.1rem 1.15rem;
  background: rgba(0, 14, 33, 0.55);
}
.flow-node .k {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}
.flow-node .v { display: block; margin-top: 0.4rem; font-size: 0.96rem; color: #fff; }
.flow-node .m { display: block; margin-top: 0.15rem; font-size: 0.82rem; color: var(--slate); }

.flow-join {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: 1.4rem 0;
  color: var(--slate);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.flow-join::before, .flow-join::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--edge-bright), transparent);
}
.flow-out {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.85rem;
}
.flow-out div {
  border-radius: 10px;
  padding: 0.95rem 1.05rem;
  font-size: 0.9rem;
  border: 1px solid var(--edge);
  background: rgba(0, 30, 62, 0.5);
}
.flow-out .ok { border-color: rgba(0, 193, 255, 0.3); }
.flow-out .ok b { color: var(--cyan); }
.flow-out .warn { border-color: rgba(212, 160, 23, 0.3); }
.flow-out .warn b { color: var(--turmeric); }
.flow-out b { display: block; font-weight: 600; margin-bottom: 0.15rem; }
.flow-out span { color: var(--slate); font-size: 0.84rem; }

/* ── Memory / split feature ─────────────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.quote-stack { display: grid; gap: 0.75rem; }
.qnote {
  border-left: 2px solid var(--cyan);
  background: rgba(0, 30, 62, 0.45);
  border-radius: 0 12px 12px 0;
  padding: 0.95rem 1.2rem;
}
.qnote .who {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 0.3rem;
}
.qnote p { font-size: 0.94rem; color: #d6e2ee; }
.qnote.prior { border-left-color: var(--turmeric); opacity: 0.82; }

/* ── Pricing ────────────────────────────────────────────────────── */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 1.1rem; }
.tier {
  border: 1px solid var(--edge);
  border-radius: 16px;
  padding: 1.8rem 1.6rem;
  background: rgba(0, 22, 51, 0.5);
  transition: border-color 0.22s, transform 0.22s;
}
.tier:hover { border-color: var(--edge-bright); transform: translateY(-3px); }
.tier.feature { border-color: rgba(0, 193, 255, 0.4); background: rgba(0, 35, 72, 0.62); }
.tier .n { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--slate); }
.tier .amt {
  font-family: var(--display);
  font-size: 2.5rem;
  color: #fff;
  margin: 0.55rem 0 0.1rem;
  font-variation-settings: "WONK" 1, "opsz" 40;
}
.tier .cr { color: var(--cyan); font-size: 0.92rem; }
.tier ul { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 0.5rem; }
.tier li { font-size: 0.88rem; color: #9fb2c6; padding-left: 1.15rem; position: relative; }
.tier li::before { content: "→"; position: absolute; left: 0; color: var(--cyan); }

.price-note {
  margin-top: 1.8rem;
  font-size: 0.88rem;
  color: var(--slate);
  border-left: 2px solid var(--edge);
  padding-left: 1rem;
  max-width: 68ch;
}

/* ── Trust ──────────────────────────────────────────────────────── */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 1.6rem 2.4rem; }
.trust div h3 { font-size: 1.02rem; color: #fff; margin-bottom: 0.45rem; }
.trust div p { font-size: 0.9rem; color: #9fb2c6; }
.trust .ic { color: var(--cyan); font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; margin-bottom: 0.6rem; }

/* ── CTA ────────────────────────────────────────────────────────── */
.cta-band {
  border: 1px solid var(--edge-bright);
  border-radius: 20px;
  padding: clamp(2.4rem, 6vw, 4rem);
  text-align: center;
  background:
    radial-gradient(80% 130% at 50% 0%, rgba(0, 193, 255, 0.16), transparent 68%),
    rgba(0, 22, 51, 0.55);
}
.cta-band p { margin: 1.1rem auto 0; max-width: 52ch; color: #b9c9da; }
.cta-band .hero-cta { justify-content: center; }

/* ── Footer ─────────────────────────────────────────────────────── */
footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--edge);
  padding-block: 3rem 2.4rem;
  margin-top: clamp(3rem, 7vw, 5rem);
}
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 2.6rem;
  justify-content: space-between;
  align-items: flex-start;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.foot-links a { font-size: 0.88rem; color: #9fb2c6; text-decoration: none; }
.foot-links a:hover { color: var(--cyan); }
.foot-legal { font-size: 0.8rem; color: var(--slate); margin-top: 1.8rem; line-height: 1.7; }

/* ── Legal pages (privacy / terms) ──────────────────────────────── */
.legal { padding-block: clamp(3rem, 7vw, 5rem); }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 0.75rem; }
.legal .updated { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate); }
.legal h2 {
  font-size: 1.35rem;
  margin-top: 2.8rem;
  margin-bottom: 0.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--edge);
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 24;
}
.legal h3 { font-size: 1.02rem; margin-top: 1.6rem; margin-bottom: 0.5rem; color: #fff; }
.legal p, .legal li { color: #b0c1d2; font-size: 0.97rem; }
.legal p + p { margin-top: 0.9rem; }
.legal ul { padding-left: 1.15rem; margin: 0.8rem 0 0; display: grid; gap: 0.45rem; }
.legal li::marker { color: var(--cyan); }
.legal a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.legal strong { color: #fff; font-weight: 600; }

.callout {
  border: 1px solid var(--edge-bright);
  border-radius: 12px;
  background: rgba(0, 193, 255, 0.06);
  padding: 1.2rem 1.35rem;
  margin-top: 1.2rem;
}
.callout p { color: #d6e2ee; }

.legal table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.9rem; }
.legal th, .legal td { text-align: left; padding: 0.65rem 0.7rem; border-bottom: 1px solid var(--edge); vertical-align: top; }
.legal th { color: #fff; font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; }
.legal td { color: #a8bacd; }

/* Unfilled legal facts — deliberately loud so they can't ship unnoticed */
.todo {
  background: rgba(212, 160, 23, 0.16);
  border-bottom: 2px dashed var(--turmeric);
  color: var(--turmeric);
  padding: 0 0.25rem;
  font-family: var(--mono);
  font-size: 0.88em;
}

/* ── Reveal on scroll ───────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.8,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* Staggered page-load entrance */
.enter { opacity: 0; animation: rise 0.85s cubic-bezier(.2,.8,.3,1) forwards; }
.enter:nth-child(1) { animation-delay: 0.05s; }
.enter:nth-child(2) { animation-delay: 0.15s; }
.enter:nth-child(3) { animation-delay: 0.25s; }
.enter:nth-child(4) { animation-delay: 0.35s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.enter { transform: translateY(20px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .enter { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }


/* ── Platform pillars (how the platform works) ──────────────────── */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 1px; background: var(--edge); border: 1px solid var(--edge); border-radius: 16px; overflow: hidden; }
.pillar { background: rgba(0, 22, 51, 0.6); padding: 2rem 1.7rem; }
.pillar .n { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em; color: var(--cyan); }
.pillar h3 { margin: 0.85rem 0 0.6rem; color: #fff; }
.pillar p { font-size: 0.93rem; color: #9fb2c6; }

/* ── Skills library: department rows + roadmap chips ────────────── */
.dept-label .status {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
}
.status.live { color: var(--cyan); border: 1px solid var(--edge-bright); background: rgba(0, 193, 255, 0.07); }
.status.building { color: var(--slate); border: 1px solid var(--edge); }

.roadmap { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.4rem; }
.chip {
  font-size: 0.88rem;
  color: #9fb2c6;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0.5rem 1.05rem;
  background: rgba(0, 20, 46, 0.4);
}
.chip.next { color: var(--turmeric); border-color: rgba(212, 160, 23, 0.35); border-style: solid; }
.roadmap-note { margin-top: 1.15rem; font-size: 0.88rem; color: var(--slate); max-width: 62ch; }
