/* LeanFrame — performance lab theme */

:root {
  --bg: #0E1116;
  --card: #171B21;
  --card-2: #171C24;
  --ink: #FFFFFF;
  --muted: #8A93A0;
  --accent: #30E88B;
  --on-accent: #07130C;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent-soft: rgba(48, 232, 139, 0.10);
  /* No condensed cosplay: browsers synthesize font-stretch on system faces
     and it reads as distorted. Heavy weight + tight tracking on the native
     stack matches the app's caption typography honestly. */
  --display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* height:auto is load-bearing: the width/height HTML attributes become
   presentational hints, and CSS that overrides only width leaves the
   attribute height in force — vertically stretching every screenshot. */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- Type roles ---------- */

.display {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.022em;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow .tick { color: var(--accent); }

.kw { color: var(--accent); }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 17, 22, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-icon { display: block; border-radius: 22%; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }

.nav-cta {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent) !important;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 999px;
  white-space: nowrap;
}
.nav-cta:hover { text-decoration: none; filter: brightness(1.08); }

@media (max-width: 680px) {
  .nav-links li.hide-m { display: none; }
}

/* ---------- Hero ---------- */

.hero { padding: 36px 0 28px; overflow: hidden; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.1rem);
  margin: 18px 0 20px;
}

.hero .lede {
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 34em;
  margin-bottom: 28px;
}

.hero .lede strong { color: var(--ink); font-weight: 600; }

.cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.trial-note {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

/* App Store badge */
.as-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: #000;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 9px 18px 9px 15px;
  color: var(--ink);
  line-height: 1.15;
}
.as-badge:hover { text-decoration: none; border-color: rgba(255, 255, 255, 0.35); }
.as-badge svg { flex: none; }
.as-badge .small { display: block; font-size: 0.62rem; color: #c9cfd8; letter-spacing: 0.02em; }
.as-badge .big { display: block; font-size: 1.12rem; font-weight: 600; letter-spacing: 0.01em; }

/* Device frame + readout */

.hero-visual { position: relative; display: flex; justify-content: center; }

.device {
  width: min(300px, 78vw);
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 44px;
  padding: 9px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
}
.device img { border-radius: 36px; width: 100%; }

.device-sm { width: min(260px, 70vw); border-radius: 38px; padding: 8px; }
.device-sm img { border-radius: 31px; }

.readout {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 24px;
  width: 100%;
  max-width: 460px;
}
.readout li { background: var(--card); padding: 14px 12px; text-align: center; }
.readout .val {
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}
.readout .lbl {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (min-width: 900px) {
  .hero { padding: 44px 0 44px; }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; align-items: start; }
  .hero-copy { padding-top: 20px; }
}

/* ---------- Section scaffolding ---------- */

.section { padding: 44px 0; border-top: 1px solid var(--line); }

.section-head { margin-bottom: 26px; max-width: 40em; }
.section-head h2 { font-size: clamp(1.8rem, 4.5vw, 2.7rem); margin: 14px 0 12px; }
.section-head p { color: var(--muted); }

/* tick rule — measurement divider */
.rule {
  height: 10px;
  background:
    repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 24px)
    bottom / 100% 6px no-repeat;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 18px;
  max-width: 220px;
}

/* ---------- Features ---------- */

.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
  padding: 28px 0;
}
.feature + .feature { border-top: 1px solid var(--line); }

.feature h3 { font-size: clamp(1.5rem, 3.8vw, 2.1rem); margin: 12px 0 14px; }
.feature p { color: var(--muted); max-width: 34em; }
.feature p strong { color: var(--ink); font-weight: 600; }

.spec {
  list-style: none;
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.spec li {
  padding: 8px 0 8px 20px;
  border-top: 1px dashed var(--line);
  position: relative;
}
.spec li::before {
  content: "+";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.feature-visual { display: flex; justify-content: center; }

@media (min-width: 820px) {
  .feature { grid-template-columns: 1.1fr 0.9fr; gap: 40px; padding: 36px 0; }
  .feature.flip .feature-visual { order: -1; }
}

/* ---------- Evidence band ---------- */

.evidence {
  border: 1px solid rgba(48, 232, 139, 0.28);
  background: var(--accent-soft);
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
}
.evidence .stat {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 4rem);
  color: var(--accent);
  line-height: 1;
}
.evidence .claim {
  margin: 14px auto 10px;
  max-width: 36em;
  font-size: 1.05rem;
  color: var(--ink);
}
.evidence .cite {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Pricing ---------- */

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: stretch;
}
@media (min-width: 760px) {
  .pricing-grid { grid-template-columns: 1fr 1fr; }
}

.plan {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
}
.plan.pro { background: var(--card-2); border-color: rgba(48, 232, 139, 0.45); }

.plan-name { font-size: 1.5rem; letter-spacing: 0.04em; }
.plan-tag {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}
.plan.pro .plan-tag { color: var(--accent); }

.price { margin: 20px 0 4px; font-weight: 700; font-size: 2rem; letter-spacing: -0.01em; }
.price .per { font-size: 0.95rem; font-weight: 400; color: var(--muted); }
.price-alt { color: var(--muted); font-size: 0.9rem; margin-bottom: 4px; }

.plan ul { list-style: none; margin: 22px 0 26px; flex: 1; }
.plan li {
  padding: 9px 0 9px 26px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  position: relative;
}
.plan li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 15px;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.plan li.na { color: var(--muted); }
.plan li.na::before { border-color: var(--muted); opacity: 0.45; }

.plan-cta {
  display: block;
  text-align: center;
  padding: 13px;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid var(--line-strong);
  color: var(--ink);
}
.plan-cta:hover { text-decoration: none; border-color: rgba(255, 255, 255, 0.4); }
.plan.pro .plan-cta { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.plan.pro .plan-cta:hover { filter: brightness(1.08); }

.pricing-note {
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- FAQ ---------- */

.faq { max-width: 760px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 36px 18px 0;
  font-weight: 600;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.2rem;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); padding: 0 0 20px; max-width: 42em; }
.faq details p + p { margin-top: -8px; }

/* ---------- Final CTA ---------- */

.final-cta { text-align: center; padding: 52px 0; }
.final-cta h2 { font-size: clamp(2rem, 5.5vw, 3.2rem); margin-bottom: 14px; }
.final-cta p { color: var(--muted); margin-bottom: 28px; }
.final-cta .cta-row { justify-content: center; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--line); padding: 32px 0 40px; }
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer .brand { font-size: 1rem; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: var(--muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--ink); }
.fineprint {
  margin-top: 28px;
  font-size: 0.75rem;
  color: var(--muted);
  max-width: 56em;
  line-height: 1.7;
}

/* ---------- Legal / prose pages ---------- */

.prose { max-width: 760px; padding: 56px 0 80px; }
.prose h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin: 14px 0 8px; }
.prose .updated {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 36px;
}
.prose h2 {
  font-size: 1.25rem;
  margin: 40px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.prose p, .prose li { color: #c3c9d2; font-size: 0.97rem; }
.prose p { margin-bottom: 14px; }
.prose ul { margin: 0 0 14px 20px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--ink); }
.prose .callout {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 20px 0;
}

/* ---------- Reveal (JS-gated, motion-safe) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .js .reveal.in { opacity: 1; transform: none; }
}
