/* ============================================================================
   PLUMB — landing page. Brand register: committed, drenched, one voice.
   ========================================================================= */
:root { --lg-max: 1180px; }

body.lp {
  background: var(--brand-deep);
  color: oklch(93% 0.012 168);
  --lp-ink: oklch(96% 0.012 168);
  --lp-dim: oklch(76% 0.018 168);
  --lp-faint: oklch(60% 0.02 168);
  --lp-line: oklch(31% 0.028 168);
  --lp-surf: oklch(19% 0.036 168);
  /* One system across the landing and the app:
       green  = identity and primary action  (deep on light surfaces, light on this dark one)
       amber  = one meaning only — something needs a person's attention.
     Amber was previously doing both jobs here, which made it mean "click me"
     on the way in and "something is wrong" once you were inside. */
  /* exactly the app's dark-theme --brand, so "the green button" is the same
     green on both sides of the door — same hue (165), same lightness */
  --lp-act: oklch(72% 0.115 165);
  --lp-act-hover: oklch(80% 0.115 165);
  --lp-act-ink: oklch(15% 0.02 165);
  --lp-green: oklch(72% 0.115 165);
  --lp-amber: oklch(78% 0.155 66);
}
body.lp ::selection { background: var(--lp-act); color: var(--lp-act-ink); }

.wrap { max-width: var(--lg-max); margin: 0 auto; padding-inline: clamp(20px, 5vw, 48px); }
.lp section { position: relative; }
.rule { height: 1px; background: var(--lp-line); }

/* ── nav ─────────────────────────────────────────────────────────────── */
.lpnav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklch, var(--brand-deep) 84%, transparent);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--lp-line);
}
.lpnav > div { display: flex; align-items: center; gap: clamp(16px, 3vw, 36px); height: 60px; }
.lpmark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--lp-ink); }
.lpmark span {
  font-family: var(--font-display); font-variation-settings: "wdth" 120;
  font-weight: 580; font-size: 17px; letter-spacing: 0.075em; text-transform: uppercase;
}
.lpnav a.l { color: var(--lp-dim); text-decoration: none; font-size: 13.5px; }
.lpnav a.l:hover { color: var(--lp-ink); }
.lpnav .sp { flex: 1; }
.lpbtn {
  display: inline-flex; align-items: center; gap: 8px; padding: 0 18px; height: 36px;
  border-radius: 6px; font-size: 13.5px; font-weight: 500; text-decoration: none;
  background: var(--lp-act); color: var(--lp-act-ink); border: 1px solid var(--lp-act);
  transition: transform 120ms var(--ease-out), background-color 150ms var(--ease-out);
  white-space: nowrap;
}
.lpbtn:hover { background: var(--lp-act-hover); border-color: var(--lp-act-hover); color: var(--lp-act-ink); }
.lpbtn:active { transform: scale(0.97); }
.lpbtn--ghost { background: transparent; color: var(--lp-ink); border-color: var(--lp-line); }
.lpbtn--ghost:hover { background: var(--lp-surf); color: var(--lp-ink); border-color: var(--lp-faint); }
.lpbtn--lg { height: 44px; padding: 0 24px; font-size: 15px; }

/* ── hero ────────────────────────────────────────────────────────────── */
.hero { padding-top: clamp(56px, 9vw, 108px); padding-bottom: clamp(40px, 6vw, 72px); overflow: hidden; }
.hero__blue { position: absolute; inset: 0; pointer-events: none; opacity: .3; overflow: hidden; }
.hero__blue svg { position: absolute; right: -8%; top: -10%; width: min(760px, 82vw); height: auto; }
.hero h1 {
  font-family: var(--font-display); font-variation-settings: "wdth" 112;
  font-size: clamp(2.4rem, 6.4vw, 4.6rem); font-weight: 580; line-height: 0.98;
  letter-spacing: -0.035em; color: var(--lp-ink); max-width: 15ch; text-wrap: balance;
  margin-bottom: clamp(18px, 2.4vw, 26px);
}
.hero h1 em { font-style: normal; color: var(--lp-act); }
.hero p.lede {
  font-size: clamp(1rem, 1.55vw, 1.2rem); line-height: 1.6; color: var(--lp-dim);
  max-width: 56ch; margin-bottom: clamp(24px, 3vw, 34px); text-wrap: pretty;
}
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero__note { font-size: 12.5px; color: var(--lp-faint); margin-top: 18px; }

/* the product frame — 1px border, radial bed, masked fade. No perspective. */
.shot {
  position: relative; margin-top: clamp(36px, 5vw, 62px);
  border-radius: 14px; border: 1px solid var(--lp-line);
  background: radial-gradient(120% 100% at 50% 0%, oklch(28% 0.04 168) 0%, transparent 70%);
  padding: 10px;
}
.shot__inner {
  border-radius: 9px; overflow: hidden; border: 1px solid var(--lp-line);
  background: oklch(99% 0.004 162);
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
}
.shot__bar {
  display: flex; align-items: center; gap: 8px; padding: 9px 13px;
  background: oklch(96.6% 0.005 162); border-bottom: 1px solid oklch(90.5% 0.006 162);
}
.shot__bar i { width: 9px; height: 9px; border-radius: 50%; background: oklch(85% 0.008 162); }
.shot__url {
  margin-left: 8px; font-size: 11px; color: oklch(50% 0.01 162); font-family: var(--font-mono);
}

/* ── numbers band ────────────────────────────────────────────────────── */
.band { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.band > div { padding: clamp(24px, 3vw, 34px) 0; padding-right: 24px; border-top: 1px solid var(--lp-line); }
.band b {
  display: block; font-family: var(--font-display); font-variation-settings: "wdth" 114;
  font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 500; line-height: 1;
  letter-spacing: -0.03em; color: var(--lp-ink); font-variant-numeric: tabular-nums;
}
.band span { display: block; font-size: 13px; color: var(--lp-dim); margin-top: 10px; max-width: 26ch; line-height: 1.45; }

/* ── section scaffolding ─────────────────────────────────────────────── */
.sec { padding-block: clamp(56px, 8vw, 104px); }
.sec h2 {
  font-family: var(--font-display); font-variation-settings: "wdth" 108;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 560; line-height: 1.06;
  letter-spacing: -0.03em; color: var(--lp-ink); max-width: 20ch; text-wrap: balance;
}
.sec .sub { font-size: clamp(0.95rem, 1.3vw, 1.05rem); color: var(--lp-dim); max-width: 60ch;
  margin-top: 16px; line-height: 1.65; text-wrap: pretty; }
.sechead { margin-bottom: clamp(30px, 4vw, 48px); }

/* ── pipeline: a real sequence, so the numbers earn their place ──────── */
/* eight stages, so four across and two down fills exactly — auto-fit would
   leave lit empty cells wherever the count does not divide */
.pipe { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  background: var(--lp-line); border: 1px solid var(--lp-line); border-radius: 12px; overflow: hidden; }
@media (max-width: 900px) { .pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .pipe { grid-template-columns: minmax(0, 1fr); } }
.pipe > div { background: var(--brand-deep); padding: 22px 18px 24px; }
.pipe .n { font-family: var(--font-mono); font-size: 11px; color: var(--lp-faint); }
.pipe h3 { font-family: var(--font-ui); font-size: 14.5px; font-weight: 560; color: var(--lp-ink);
  margin: 8px 0 8px; letter-spacing: -0.008em; }
.pipe p { font-size: 12.5px; color: var(--lp-dim); line-height: 1.5; }
.pipe code { display: block; font-size: 10.5px; color: var(--lp-green); margin-top: 12px;
  font-family: var(--font-mono); overflow-wrap: anywhere; }

/* ── modules ─────────────────────────────────────────────────────────── */
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 12px; }
.mod {
  display: block; text-decoration: none; padding: 20px; border-radius: 10px;
  border: 1px solid var(--lp-line); background: var(--lp-surf); color: inherit;
  transition: border-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.mod:hover { border-color: var(--lp-faint); transform: translateY(-2px); color: inherit; }
.mod:active { transform: translateY(0) scale(0.99); }
.mod svg { width: 17px; height: 17px; color: var(--lp-green); }
.mod b { display: block; font-size: 14.5px; font-weight: 560; color: var(--lp-ink); margin: 12px 0 6px; }
.mod span { font-size: 12.5px; color: var(--lp-dim); line-height: 1.5; }
.mod em { display: block; font-style: normal; font-size: 11px; color: var(--lp-faint); margin-top: 10px; }
.mod i { font-style: italic; color: var(--lp-ink); }

/* ── prompts ─────────────────────────────────────────────────────────── */
.prompts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: var(--lp-line); border: 1px solid var(--lp-line); border-radius: 12px; overflow: hidden; }
.prompts > div { background: var(--brand-deep); padding: 24px; }
.prompts h4 { font-family: var(--font-mono); font-size: 12px; color: var(--lp-green); font-weight: 500; }
.prompts p { font-size: 13px; color: var(--lp-dim); line-height: 1.55; margin: 10px 0 14px; }
.prompts .io { font-family: var(--font-mono); font-size: 11px; line-height: 1.65; color: var(--lp-ink);
  background: oklch(15% 0.03 168); border: 1px solid var(--lp-line); border-radius: 7px; padding: 12px;
  overflow-x: auto; }
.prompts .io u { text-decoration: none; color: var(--lp-faint); }

/* ── photo band ──────────────────────────────────────────────────────── */
.photo { position: relative; min-height: clamp(300px, 44vw, 460px); display: grid; align-items: end;
  overflow: hidden; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.06); opacity: .3; }
.photo::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--brand-deep) 0%, transparent 38%, oklch(22% .045 168 / .82) 88%, var(--brand-deep) 100%); }
.photo > .wrap { position: relative; z-index: 1; padding-block: clamp(40px, 6vw, 72px); }

/* ── integrations ────────────────────────────────────────────────────── */
.ints { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) { .ints { grid-template-columns: minmax(0, 1fr); } }
.int { border: 1px solid var(--lp-line); border-radius: 10px; padding: 24px; background: var(--lp-surf); }
.int h4 { font-family: var(--font-ui); font-size: 15px; font-weight: 560; color: var(--lp-ink); margin-bottom: 12px; }
.int ul { list-style: none; padding: 0; }
.int li { font-size: 12.5px; color: var(--lp-dim); line-height: 1.55; padding: 7px 0;
  border-top: 1px solid var(--lp-line); }
.int li:first-child { border-top: 0; }
.int li code { font-family: var(--font-mono); font-size: 11px; color: var(--lp-green); }

/* ── calculator ──────────────────────────────────────────────────────── */
.calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(28px, 4vw, 56px);
  align-items: start; }
.calc__in label { display: block; font-size: 13px; color: var(--lp-dim); margin-bottom: 8px; }
.calc__in .r { display: flex; justify-content: space-between; align-items: baseline; }
.calc__in .r b { font-family: var(--font-display); font-variation-settings: "wdth" 112;
  font-size: 19px; color: var(--lp-ink); font-variant-numeric: tabular-nums; }
.calc__in > div { margin-bottom: 26px; }
.calc input[type=range] { --track: var(--lp-line); }
.calc input[type=range]::-webkit-slider-runnable-track { background: var(--lp-line); }
.calc input[type=range]::-moz-range-track { background: var(--lp-line); }
.calc input[type=range]::-webkit-slider-thumb { background: var(--lp-act); border-color: var(--brand-deep); }
.calc input[type=range]::-moz-range-thumb { background: var(--lp-act); border-color: var(--brand-deep); }
.calc__out { border: 1px solid var(--lp-line); border-radius: 12px; padding: clamp(22px, 3vw, 32px);
  background: var(--lp-surf); }
.calc__out .big { font-family: var(--font-display); font-variation-settings: "wdth" 114;
  font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 500; line-height: 1; letter-spacing: -0.035em;
  color: var(--lp-act); font-variant-numeric: tabular-nums; }
.calc__out .row2 { display: flex; justify-content: space-between; padding: 12px 0;
  border-top: 1px solid var(--lp-line); font-size: 13px; color: var(--lp-dim); }
.calc__out .row2 b { color: var(--lp-ink); font-variant-numeric: tabular-nums; }

/* ── architecture ────────────────────────────────────────────────────── */
.arch { border: 1px solid var(--lp-line); border-radius: 12px; padding: clamp(18px, 3vw, 30px);
  background: var(--lp-surf); overflow-x: auto; }
.arch svg { min-width: 660px; width: 100%; height: auto; }

/* ── controls ────────────────────────────────────────────────────────── */
.ctrls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  background: var(--lp-line); border-block: 1px solid var(--lp-line); }
.ctrls > div { background: var(--brand-deep); padding: 26px 24px 28px; }
.ctrls h4 { font-family: var(--font-ui); font-size: 14.5px; font-weight: 560; color: var(--lp-ink); margin-bottom: 9px; }
.ctrls p { font-size: 12.5px; color: var(--lp-dim); line-height: 1.55; }

/* ── scope note + footer ─────────────────────────────────────────────── */
.scope { border: 1px solid var(--lp-line); border-radius: 12px; padding: clamp(22px, 3vw, 34px);
  background: var(--lp-surf); }
.scope h3 { font-family: var(--font-ui); font-size: 16px; font-weight: 560; color: var(--lp-ink); margin-bottom: 14px; }
.scope div.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 26px; }
.scope ul { padding: 0; margin: 0; }
.scope li { font-size: 13px; color: var(--lp-dim); line-height: 1.6; padding: 5px 0; list-style: none; }
.scope li::before { content: "— "; color: var(--lp-faint); }

.lpfoot { border-top: 1px solid var(--lp-line); padding-block: 40px 56px; }
.lpfoot .r { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--lp-faint); }

/* ── scroll-driven reveal ─────────────────────────────────────────────────
   The content is fully visible by default and the animation only adds a small
   lift. Never gate opacity on the timeline: a hidden tab, a headless renderer
   or a print never fires it, and the section ships blank. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: rv linear both; animation-timeline: view(); animation-range: entry 4% cover 22%; }
    @keyframes rv { from { transform: translateY(16px); } to { transform: none; } }
  }
}

/* the 1px-gap grids need explicit counts at every breakpoint for the same
   reason the pipeline does: a partly-filled row paints as a lit empty block */
@media (max-width: 1000px) { .prompts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ctrls { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .prompts, .ctrls { grid-template-columns: minmax(0, 1fr); } }

/* landing: nothing may push the page wider than the viewport */
@media (max-width: 760px) {
  .calc, .ints, .scope div.cols { grid-template-columns: minmax(0, 1fr) !important; }
  .band { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .lpnav a.l { display: none; }
  .hero__blue { display: none; }
  .shot { padding: 6px; }
  .shot__inner > div { grid-template-columns: minmax(0,1fr) !important; }
}
/* the topology diagram is wider than a phone by design — let it scroll itself */
.arch { max-width: 100%; }
.prompts .io, .code, .iif { max-width: 100%; }
