/* Leads Journey — marketing site
   Matte editorial dark. No glass, no glow, no coloured shadows.
   Depth comes from hairlines, type scale, and spacing rhythm only. */

:root {
  --bg: #000;
  --bg-2: #070707;
  --bg-3: #0b0b0b;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f7f7f8;
  --text-2: #c9cbd1;
  --muted: #8b8f98;
  --faint: #63666e;

  /* Brand teal — same family as the app mark (#0f766e) */
  --accent: #0f766e;
  --accent-2: #14b8a6;
  --accent-3: #5eead4;

  --max: 1200px;
  --narrow: 720px;
  --header: 68px;
  --font: "Figtree", system-ui, -apple-system, sans-serif;
  --head: "Poppins", "Figtree", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* `overflow-x: hidden` was removed here: it makes the computed overflow-y
     become `auto`, turning <body> into a scroll container for no benefit.
     Measured horizontal overflow is zero at 375 / 1440 / 1920. */
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--accent-3);
  font-size: 0.9em;
  background: rgba(20, 184, 166, 0.08);
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: 5px;
  padding: 0.12em 0.42em;
  white-space: nowrap;
}

::selection { background: rgba(20, 184, 166, 0.28); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; top: 0; }

/* ── Layout ──────────────────────────────────────────────────────────── */

.wrap {
  width: min(var(--max), calc(100% - 3rem));
  margin-inline: auto;
}
.wrap.narrow { max-width: var(--narrow); }

.section {
  padding: clamp(4.5rem, 9vw, 8rem) 0;
  position: relative;
}
.section.alt { background: var(--bg-2); }
.section.hair { border-top: 1px solid var(--line); }

/* Editorial section label: 01 / Product */
.sec-head { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.sec-head.center { text-align: center; }
.sec-head.center .lead { margin-inline: auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1.1rem;
  color: var(--accent-3);
  font-family: var(--head);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow .num {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.eyebrow .num::after {
  content: "";
  display: inline-block;
  width: 26px;
  height: 1px;
  background: var(--line-2);
  margin: 0 0 0.28em 0.7rem;
  vertical-align: middle;
}

h2 {
  margin: 0 0 1.1rem;
  font-family: var(--head);
  font-weight: 600;
  font-size: clamp(2rem, 4.4vw, 3.05rem);
  line-height: 1.1;
  letter-spacing: -0.032em;
  text-wrap: balance;
}
h2 em {
  font-style: normal;
  color: var(--muted);
}

h3 {
  margin: 0 0 0.5rem;
  font-family: var(--head);
  font-weight: 600;
  font-size: 1.06rem;
  letter-spacing: -0.012em;
}

.lead {
  margin: 0;
  color: var(--text-2);
  font-size: clamp(1.02rem, 1.4vw, 1.14rem);
  line-height: 1.62;
  max-width: 46rem;
}

/* ── Header ──────────────────────────────────────────────────────────── */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(1.1rem, 3vw, 2.25rem);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.site-header.is-solid {
  background: #000;
  border-bottom-color: var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 0.65rem; }
.brand-logo { width: 30px; height: 30px; flex-shrink: 0; }
.brand-text {
  font-family: var(--head);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.015em;
}

.nav-desktop { display: flex; align-items: center; gap: 0.35rem; }
.nav-desktop a {
  position: relative;
  padding: 0.5rem 0.85rem;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.18s;
}
.nav-desktop a:hover { color: var(--text); }
.nav-desktop a.is-current { color: var(--text); }
.nav-desktop a.is-current::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.15rem;
  height: 1.5px;
  background: var(--accent-2);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 9px;
  place-items: center;
  gap: 5px;
  flex-direction: column;
}
.nav-toggle span { display: block; width: 15px; height: 1.5px; background: #fff; }

.nav-drawer {
  position: fixed;
  top: calc(var(--header) - 6px);
  right: 1rem;
  left: 1rem;
  z-index: 59;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6rem;
}
.nav-drawer nav { display: grid; gap: 0.1rem; }
.nav-drawer a {
  padding: 0.85rem 0.8rem;
  border-radius: 9px;
  font-weight: 500;
  color: var(--text-2);
}
.nav-drawer a:hover { color: var(--text); background: rgba(255, 255, 255, 0.045); }
.nav-backdrop { position: fixed; inset: 0; z-index: 58; background: rgba(0, 0, 0, 0.72); }

/* ── Links ───────────────────────────────────────────────────────────── */

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #fff;
  font-family: var(--head);
  font-weight: 500;
  font-size: 1rem;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 3px;
  transition: border-color 0.18s, color 0.18s;
}
.text-link::after { content: "→"; transition: transform 0.25s var(--ease); }
.text-link:hover { color: var(--accent-3); border-bottom-color: var(--accent-2); }
.text-link:hover::after { transform: translateX(3px); }

/* ── Hero (strict: mark + name + one headline + one line) ────────────── */

/* Capped height: at 1080p a full 100svh hero left ~700px of dead black below
   the copy and read as an unfinished page. Capping it also lets the product
   shot peek into the fold, so the page reads as continuing. */
.hero {
  min-height: min(100svh, 800px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: calc(var(--header) + 3rem) 1.25rem clamp(2.5rem, 5vw, 4rem);
  background: #000;
  position: relative;
}
.hero-inner { max-width: 880px; }

.hero-mark {
  width: 62px;
  height: 62px;
  margin: 0 auto 1.7rem;
}

.hero-brand {
  margin: 0 0 1.5rem;
  font-family: var(--head);
  font-size: clamp(2.9rem, 8vw, 5.4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
}

.hero h1 {
  margin: 0 auto 1.4rem;
  max-width: 20ch;
  font-family: var(--head);
  font-weight: 500;
  font-size: clamp(1.35rem, 3.1vw, 2.05rem);
  line-height: 1.28;
  letter-spacing: -0.024em;
  color: var(--text);
  text-wrap: balance;
}

.hero-rule {
  width: 46px;
  height: 2px;
  background: var(--accent-2);
  margin: 0 auto 1.4rem;
}

.hero-sub {
  margin: 0 auto;
  max-width: 40rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  line-height: 1.62;
}

/* (scroll cue removed — manager feedback 2026-07-29) */

/* ── Screenshot frames (matte browser chrome, no shadow) ─────────────── */

.frame {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-3);
}
.frame-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: #0d0d0d;
}
.frame-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  flex-shrink: 0;
}
.frame-bar .addr {
  margin-left: 0.5rem;
  font-size: 0.72rem;
  color: var(--faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Crops have varied native ratios (see prepare_shots.py) — size naturally and
   rely on width/height attrs to reserve space, rather than forcing one crop. */
.frame img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.28s var(--ease);
}

/* Layered detail inset — a zoomed region of the same screen, offset over the
   wider shot. Matte only: hairline + solid backing, no glow or drop shadow. */
.shot-stack { position: relative; }
.shot-inset {
  position: absolute;
  right: -14px;
  bottom: -26px;
  width: 46%;
  max-width: 320px;
  margin: 0;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-3);
  outline: 6px solid var(--bg);
}
.section.alt .shot-inset { outline-color: var(--bg-2); }
.shot-inset img { width: 100%; height: auto; display: block; }
.shot-inset figcaption {
  padding: 0.5rem 0.7rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--head);
  font-weight: 600;
  background: #0d0d0d;
}
@media (max-width: 620px) {
  .shot-inset { display: none; }
}
.frame-cap {
  margin: 0.9rem 0 0;
  color: var(--faint);
  font-size: 0.85rem;
}

.product-shot { padding: 0 0 clamp(3rem, 6vw, 5rem); background: #000; }

/* ── Metric strip ────────────────────────────────────────────────────── */

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.metrics div {
  padding: clamp(1.6rem, 3vw, 2.4rem) 1.4rem;
}
.metrics div + div { border-left: 1px solid var(--line); }
.metrics dt {
  font-family: var(--head);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--accent-3);
  margin-bottom: 0.35rem;
}
.metrics dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ── Feature rows (alternating) ──────────────────────────────────────── */

.feature {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}
.feature + .feature { margin-top: clamp(4rem, 8vw, 6.5rem); }
.feature.flip .feature-copy { order: 2; }

.feature-copy h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  letter-spacing: -0.026em;
  margin-bottom: 0.85rem;
  line-height: 1.2;
}
.feature-copy p {
  margin: 0 0 1.4rem;
  color: var(--text-2);
  font-size: 1.02rem;
  line-height: 1.62;
}

.bullets { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.7rem; }
.bullets li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}

/* ── Capability tiles ────────────────────────────────────────────────── */

.caps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.caps article {
  background: var(--bg);
  padding: clamp(1.5rem, 2.6vw, 2rem);
  transition: background 0.2s;
}
.section.alt .caps article { background: var(--bg-2); }
.caps article:hover { background: var(--bg-3); }
.caps .ico {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 9px;
  margin-bottom: 1rem;
  color: var(--accent-3);
}
.caps .ico svg { width: 17px; height: 17px; }
.caps p { margin: 0; color: var(--muted); font-size: 0.93rem; line-height: 1.55; }

/* ── Steps ───────────────────────────────────────────────────────────── */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
  counter-reset: step;
}
.steps li {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-2);
}
.steps .n {
  font-family: var(--head);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent-3);
}
.steps strong { font-family: var(--head); font-weight: 600; font-size: 1.02rem; letter-spacing: -0.012em; }
.steps p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }

/* ── Gallery ─────────────────────────────────────────────────────────── */

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
}
.thumbs button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.95rem;
  color: var(--muted);
  font-size: 0.87rem;
  font-weight: 500;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.thumbs button:hover { color: var(--text); border-color: var(--line-2); }
.thumbs button.is-active {
  color: #04221f;
  border-color: var(--accent-2);
  background: var(--accent-2);
  font-weight: 600;
}

/* ── Roles ───────────────────────────────────────────────────────────── */

.roles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.roles.three { grid-template-columns: repeat(3, 1fr); }
.roles article { background: var(--bg); padding: clamp(1.5rem, 2.6vw, 2rem) 1.4rem; }
.section.alt .roles article { background: var(--bg-2); }
.roles p { margin: 0; color: var(--muted); font-size: 0.93rem; line-height: 1.55; }

/* ── Demo block ──────────────────────────────────────────────────────── */

.demo-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(2rem, 4vw, 3rem);
  background: var(--bg-2);
  text-align: center;
}
.section.alt .demo-panel { background: var(--bg); }
.demo-creds {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.5rem;
  margin: 1.75rem 0;
  padding: 1.25rem 0;
  border-block: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}
.demo-creds span { color: var(--muted); }
.demo-creds b { color: var(--text-2); font-weight: 500; }
.note { margin: 1.5rem 0 0; color: var(--faint); font-size: 0.85rem; }

/* ── Footer ──────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(3rem, 5vw, 4rem) 0 2.5rem;
  background: #000;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}
.footer-about { max-width: 30rem; color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
.footer-about p { margin: 1rem 0 0; }
.footer-col h4 {
  margin: 0 0 1rem;
  font-family: var(--head);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.footer-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.65rem; }
.footer-col a { color: var(--muted); font-size: 0.93rem; transition: color 0.18s; }
.footer-col a:hover { color: var(--text); }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.75rem;
}
.byline { margin: 0; color: var(--muted); display: flex; align-items: center; gap: 0.45rem; font-size: 0.92rem; }
.sl-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
  font-family: var(--head);
  font-weight: 600;
}
.sl-brand:hover { color: var(--accent-3); }
.copy { margin: 0; color: var(--faint); font-size: 0.85rem; }

/* ── Scroll reveal ───────────────────────────────────────────────────── */

/* Only hide when JS is confirmed running — a failed/blocked main.js must never
   leave the page blank below the hero. */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.62s var(--ease), transform 0.62s var(--ease);
  will-change: opacity, transform;
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* Frames settle in rather than sliding — reads heavier, suits a product shot */
.js .frame.reveal { transform: translateY(24px) scale(0.988); transform-origin: 50% 0; }
.js .frame.reveal.is-in { transform: none; }

/* Staggered children. --i is set per item in main.js. */
.js .metrics.reveal > div,
.js .caps.reveal > article,
.js .roles.reveal > article,
.js .steps.reveal > li,
.js .feature.reveal > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js .metrics.reveal.is-in > div,
.js .caps.reveal.is-in > article,
.js .roles.reveal.is-in > article,
.js .steps.reveal.is-in > li,
.js .feature.reveal.is-in > * {
  opacity: 1;
  transform: none;
}

/* Hairline rules draw in above each step */
.js .steps.reveal > li {
  background-image: linear-gradient(var(--line-2), var(--line-2));
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 0% 1px;
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease),
              background-size 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
  border-top-color: transparent;
}
.js .steps.reveal.is-in > li { background-size: 100% 1px; }

/* Interaction feedback */
.caps article,
.thumbs button,
.frame { transition: background 0.22s var(--ease), border-color 0.22s var(--ease), transform 0.3s var(--ease); }
.caps article:hover { border-color: var(--line-2); }
.caps article:hover .ico { border-color: var(--accent-2); color: var(--accent-3); }
.caps .ico { transition: border-color 0.22s var(--ease), color 0.22s var(--ease); }
.metrics div { transition: background 0.22s var(--ease); }
.metrics div:hover { background: var(--bg-3); }

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 1000px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: grid; }
  .feature { grid-template-columns: 1fr; gap: 2rem; }
  .feature.flip .feature-copy { order: 0; }
  .caps { grid-template-columns: repeat(2, 1fr); }
  .roles, .roles.three { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .wrap { width: calc(100% - 2.25rem); }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metrics div:nth-child(3) { border-left: 0; }
  .metrics div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .caps, .roles, .roles.three, .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .demo-creds { flex-direction: column; gap: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Neutralise every animated state, including staggered children */
  .js .reveal,
  .js .frame.reveal,
  .js .metrics.reveal > div,
  .js .caps.reveal > article,
  .js .roles.reveal > article,
  .js .steps.reveal > li,
  .js .feature.reveal > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    transition-delay: 0s !important;
  }
  .js .steps.reveal > li { background-size: 100% 1px !important; border-top-color: var(--line-2); }
  .text-link::after,
  .caps article,
  .thumbs button,
  .frame,
  .metrics div { transition: none !important; }
}

@media (min-width: 1001px) {
  .nav-drawer, .nav-backdrop { display: none !important; }
}
