/* =====================================================================
   Public site (landing + /product). Loaded only on those pages.
   Deliberate differences from the app's rules in app.css:
   - Calls to action are squared (--r-sm), editorial style, with an arrow.
   - Section labels use a numbered/slashed format ("01 / Measure").
   Everything else follows app.css: Figtree headlines at 700 with tight
   tracking, one green accent, the same greys.
   ===================================================================== */
.is-landing {
  --display: var(--sans);
  background:
    radial-gradient(ellipse 55% 40% at 6% 4%, rgba(31, 122, 92, 0.13), transparent 62%),
    radial-gradient(ellipse 60% 40% at 96% 0%, rgba(120, 160, 140, 0.16), transparent 60%),
    linear-gradient(180deg, #fbfcfb 0%, var(--bg) 40%, #eaf0ec 100%);
}

/* ---------- Top bar: near-black, sticky ---------- */
.is-landing .topbar {
  background: var(--night);
  color: var(--night-ink);
  padding: 0 max(24px, calc((100% - 1160px) / 2));
  height: 64px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--night-line);
  backdrop-filter: none;
}
.is-landing .brand-row { width: 100%; }
.is-landing .topbar .mark { color: #fff; }
.is-landing .site-nav a,
.is-landing .site-login { color: var(--night-muted); }
.is-landing .site-nav a:hover,
.is-landing .site-login:hover { color: #fff; }
.is-landing .site-actions .btn.primary {
  border-radius: var(--r-sm);
  background: var(--accent);
  border-color: var(--accent);
}

/* ---------- Shared pieces ---------- */
.lp-wrap { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }
.is-landing .lp-hero h1,
.is-landing .lp-sub h1,
.is-landing .lp-section h2,
.is-landing .lp-close-mini h2,
.is-landing .lp-steps h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
  text-align: left;
  margin: 0;
  max-width: none;
  padding: 0;
}
.lp-label {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--muted);
}
.lp-label span {
  color: var(--accent);
  font-weight: 600;
}
.lp-label span::after { content: " /"; color: var(--muted-2); font-weight: 400; }
.lp-label span:only-child::after { content: ""; }
.lp-lede {
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.55;
  max-width: 34rem;
  margin: 0;
}
.lp-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink);
  font: 600 16px/1 var(--sans);
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}
.lp-btn span { font-size: 20px; transition: transform 0.2s var(--ease); }
.lp-btn:hover span { transform: translateX(3px); }
.lp-btn:active { transform: scale(0.98); }
.lp-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.lp-btn.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.lp-link {
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}
.lp-link:hover { border-color: var(--ink); }

/* ---------- Hero ---------- */
.lp-hero { padding: clamp(56px, 9vw, 112px) 0 72px; }
.is-landing .lp-hero h1 {
  font-size: clamp(36px, 5.6vw, 64px);
  max-width: 16ch;
}
.lp-hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px 48px;
  align-items: end;
  margin: 36px 0 56px;
}

/* The live product moment */
.lp-show {
  margin: 0;
  background:
    radial-gradient(ellipse 60% 70% at 85% 0%, rgba(79, 211, 155, 0.16), transparent 60%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(31, 122, 92, 0.30), transparent 65%),
    var(--night);
  color: var(--night-ink);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(12, 20, 16, 0.55);
}
.lp-show-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--night-line);
}
.lp-show-tabs button {
  position: relative;
  background: none;
  border: 0;
  border-right: 1px solid var(--night-line);
  color: var(--night-muted);
  padding: 18px 24px;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.lp-show-tabs button:last-child { border-right: 0; }
.lp-show-tabs em { font-style: normal; font-weight: 400; margin-right: 8px; opacity: 0.6; }
.lp-show-tabs [aria-selected="true"] { color: #fff; }
.lp-show-tabs i {
  position: absolute;
  left: 0; bottom: -1px;
  height: 2px; width: 0;
  background: var(--glow);
}
.lp-show-tabs [aria-selected="true"] i { width: 100%; }
.lp-show.live:not(.paused) [aria-selected="true"] i { animation: lp-fill var(--step, 5s) linear both; }
@keyframes lp-fill { from { width: 0; } to { width: 100%; } }

.lp-show-stage { position: relative; min-height: 340px; padding: 36px clamp(20px, 4vw, 48px); }
.lp-pane { display: none; }
.lp-pane.on { display: grid; gap: 28px; animation: lp-in 0.6s var(--ease) both; }
.lp-pane[data-pane="0"].on { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; }
@keyframes lp-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.lp-watch span, .lp-watch em, .lp-pane-head, .lp-pane-note, .lp-big > span {
  color: var(--night-muted);
  font-size: 14px;
  font-style: normal;
}
.lp-watch b {
  display: block;
  margin: 6px 0;
  font: 700 clamp(44px, 6vw, 72px)/1 var(--sans);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.lp-rows { list-style: none; margin: 0; padding: 0; }
.lp-rows li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 9.5rem;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--night-line);
  font-size: 15px;
}
.lp-rows li:last-child { border-bottom: 1px solid var(--night-line); }
.lp-rows b { font-weight: 600; font-variant-numeric: tabular-nums; }
.lp-rows i { font-style: normal; font-size: 13px; color: var(--night-muted); text-align: right; }
.lp-rows i.ok { color: var(--glow); }
.lp-rows i.warn { color: #f2b56b; }
.lp-pane.on .lp-rows li { animation: lp-in 0.5s var(--ease) both; }
.lp-pane.on .lp-rows li:nth-child(2) { animation-delay: 0.35s; }
.lp-pane.on .lp-rows li:nth-child(3) { animation-delay: 0.7s; }
.lp-pane.on .lp-rows li:nth-child(4) { animation-delay: 1.05s; }

.lp-pane-head { display: flex; justify-content: space-between; gap: 16px; margin: 0; }
.lp-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.lp-bars li, .lp-ba > div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) 4rem 6.5rem;
  gap: 16px;
  align-items: center;
  font-size: 15px;
}
.lp-bars li > div, .lp-ba > div > div {
  position: relative;
  height: 12px;
  border-radius: var(--r-pill);
  background:
    linear-gradient(90deg, transparent 70%, rgba(79, 211, 155, 0.16) 70%, rgba(79, 211, 155, 0.16) 95%, transparent 95%),
    rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.lp-bars i, .lp-ba i {
  position: absolute; inset: 0 auto 0 0;
  width: var(--w);
  border-radius: inherit;
  background: var(--glow);
}
.lp-bars i.bad, .lp-ba i.bad { background: #ef7a6e; }
.lp-bars i.warn { background: #f2b56b; }
.lp-pane.on .lp-bars i { animation: lp-grow 1.2s var(--ease) both; }
.lp-pane.on .lp-bars li:nth-child(2) i { animation-delay: 0.15s; }
.lp-pane.on .lp-bars li:nth-child(3) i { animation-delay: 0.3s; }
@keyframes lp-grow { from { width: 0; } }
.lp-bars b, .lp-ba b { font-variant-numeric: tabular-nums; text-align: right; }
.lp-bars em { font-style: normal; font-size: 13px; color: var(--glow); }
.lp-bars em.bad, .lp-ba b.bad { color: #ef7a6e; }
.lp-bars em.warn { color: #f2b56b; }
.lp-pane-note { margin: 0; }

.lp-big b {
  display: block;
  font: 700 clamp(48px, 7vw, 88px)/1 var(--sans);
  letter-spacing: -0.04em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.lp-big > span { display: block; margin-top: 10px; font-size: 16px; }

.lp-show figcaption {
  padding: 14px clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--night-line);
  color: var(--night-muted);
  font-size: 13px;
}

/* ---------- Sections ---------- */
.lp-section { padding: clamp(72px, 10vw, 128px) 0; border-top: 1px solid var(--line); }
.is-landing .lp-section h2 { font-size: clamp(28px, 3.8vw, 42px); }
.lp-h2-wide { max-width: 18ch; }
.lp-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px 72px;
  align-items: start;
}
.lp-split h2 { max-width: 14ch; }

.lp-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lp-compare > div {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.6);
}
.lp-compare > div.with { background: var(--surface); border-color: var(--accent-line); }
.lp-compare span { display: block; margin-bottom: 12px; font-size: 14px; font-weight: 600; color: var(--muted); }
.lp-compare .with span { color: var(--accent); }
.lp-compare p { margin: 0; padding: 12px 0; border-top: 1px solid var(--line); font-size: 16px; }

.lp-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 56px;
}
.lp-steps article {
  padding: 28px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.lp-steps article:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.lp-steps em { font-style: normal; font-size: 14px; color: var(--accent); font-weight: 600; margin-bottom: auto; padding-bottom: 40px; }
.is-landing .lp-steps h3 { font-size: 20px; letter-spacing: -0.02em; margin-bottom: 10px; }
.lp-steps p { margin: 0; color: var(--muted); font-size: 16px; }
.lp-more { display: inline-block; margin-top: 32px; }

.lp-dark {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  padding: clamp(28px, 5vw, 64px);
  border-radius: var(--r-lg);
  background:
    radial-gradient(ellipse 60% 80% at 100% 100%, rgba(79, 211, 155, 0.14), transparent 60%),
    var(--night);
  color: var(--night-ink);
}
.lp-dark .lp-label { color: var(--night-muted); }
.lp-dark .lp-label span { color: var(--glow); }
.is-landing .lp-dark h2 { color: #fff; font-size: clamp(28px, 3.4vw, 40px); }
.lp-dark ol { margin: 32px 0 0; padding: 0; list-style: none; counter-reset: s; }
.lp-dark ol li {
  counter-increment: s;
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--night-line);
  color: var(--night-ink);
}
.lp-dark ol li::before { content: "0" counter(s); color: var(--night-muted); font-variant-numeric: tabular-nums; }
.lp-dark-art { display: grid; gap: 24px; align-content: center; }
.lp-ba { display: grid; gap: 16px; }
.lp-ba > div { grid-template-columns: 7rem minmax(0, 1fr) 4rem; }
.lp-ba span { color: var(--night-muted); font-size: 14px; }

.lp-note { margin: 0; }
.lp-note p {
  margin: 0 0 22px;
  font: 400 clamp(18px, 2vw, 22px)/1.55 var(--sans);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.lp-note p:first-child::before { content: "“"; color: var(--accent); }
.lp-note p:last-of-type::after { content: "”"; color: var(--accent); }
.lp-note footer { color: var(--muted); font-size: 15px; padding-top: 6px; }
.lp-note footer::before { content: "— "; }

.lp-request .lp-lede { margin-top: 20px; }
.lp-faq { margin: 40px 0 0; }
.lp-faq div { padding: 16px 0; border-top: 1px solid var(--line); }
.lp-faq dt { font-weight: 600; }
.lp-faq dd { margin: 4px 0 0; color: var(--muted); }
.lp-faq a { color: var(--accent); }
.lp-form-card {
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: 0 24px 60px -36px rgba(12, 20, 16, 0.35);
}
.lp-form { display: grid; gap: 18px; }
.lp-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.lp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lp-form .lp-btn { width: 100%; }
.lp-form-help { margin: 0; color: var(--muted); font-size: 14px; }
.lp-form-help a { color: var(--accent); font-weight: 600; }

/* Fade-up as sections scroll in (skipped for reduced motion by the script) */
.lp-section.rise { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.lp-section.rise.in { opacity: 1; transform: none; }

/* ---------- /product page ---------- */
.lp-sub { padding: clamp(56px, 8vw, 96px) 0 40px; }
.is-landing .lp-sub h1 { font-size: clamp(36px, 5.6vw, 64px); max-width: 19ch; }
.lp-sub .lp-lede { margin: 28px 0 32px; }
.lp-close-mini { padding: 96px 0; border-top: 1px solid var(--line); }
.lp-close-mini .lp-wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.is-landing .lp-close-mini h2 { font-size: clamp(28px, 3.8vw, 42px); }

/* ---------- Footer ---------- */
.lp-foot { background: var(--night); color: var(--night-muted); padding: 64px 0 72px; }
.lp-foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.lp-foot strong { color: #fff; font: 700 20px/1 var(--sans); letter-spacing: -0.02em; }
.lp-foot-brand p { max-width: 22rem; margin: 14px 0 0; font-size: 14px; }
.lp-foot-grid > div:not(.lp-foot-brand) { display: grid; gap: 10px; align-content: start; font-size: 14px; }
.lp-foot span { color: #fff; font-weight: 600; margin-bottom: 4px; }
.lp-foot a:hover { color: #fff; }
.lp-foot-legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--night-line); }
.lp-foot-legal p { margin: 0; font-size: 13px; }
.is-landing .help-fab summary { background: var(--accent); }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .lp-hero-foot, .lp-split, .lp-dark, .lp-compare { grid-template-columns: 1fr; }
  .lp-steps { grid-template-columns: 1fr; }
  .lp-steps article { min-height: 0; }
  .lp-steps em { padding-bottom: 20px; }
  .lp-pane[data-pane="0"].on { grid-template-columns: 1fr; }
  .lp-foot-grid { grid-template-columns: 1fr 1fr; }
  .lp-foot-brand { grid-column: 1 / -1; }
  .is-landing .site-nav { display: none; }
}
@media (max-width: 600px) {
  .lp-wrap { width: calc(100% - 32px); }
  .lp-show-tabs button { padding: 14px 12px; font-size: 14px; }
  .lp-show-tabs em { display: block; margin: 0 0 2px; }
  .lp-rows li { grid-template-columns: minmax(0, 1fr) auto; }
  .lp-rows i { grid-column: 1 / -1; text-align: left; margin-top: -8px; }
  .lp-bars li { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .lp-bars li > div { grid-column: 1 / -1; grid-row: 2; }
  .lp-bars em { display: none; }
  .lp-ba > div { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .lp-ba > div > div { grid-column: 1 / -1; grid-row: 2; }
  .lp-form-row { grid-template-columns: 1fr; }
  .lp-cta .lp-btn { width: 100%; }
  .is-landing .site-login { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-pane.on, .lp-pane.on .lp-rows li, .lp-pane.on .lp-bars i { animation: none; }
}
