/* ══════════════════════════════════════════
   LANDING (logged-out marketing page)
══════════════════════════════════════════ */

#landingView { display: none; }
body.logged-out #landingView { display: block; }
/* hide the app chrome until connected */
body.logged-out nav,
body.logged-out .sidebar,
body.logged-out .app-layout,
body.logged-out main { display: none !important; }

.lp {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px 80px;
  color: var(--text);
}

/* ── top bar ── */
.lp-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; gap: 12px;
}
.lp-brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; letter-spacing: -.5px; }
.lp-brand img { width: 30px; height: 30px; }

/* ── hero ── */
.lp-hero { text-align: center; padding: 56px 0 36px; }
.lp-hero .lp-icon { width: 96px; height: 96px; margin: 0 auto 22px; display: block; filter: drop-shadow(0 8px 30px rgba(252,76,2,.25)); }
.lp-hero h1 { font-size: clamp(34px, 6vw, 60px); line-height: 1.05; font-weight: 900; letter-spacing: -1.5px; margin: 0 0 16px; }
.lp-hero h1 .accent { color: var(--orange); }
.lp-hero p.sub { font-size: clamp(15px, 2.4vw, 20px); color: var(--muted); max-width: 640px; margin: 0 auto 30px; line-height: 1.55; }

/* ── connect button (Strava-style) ── */
.lp-connect {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--orange); color: #fff; font-weight: 800; font-size: 16px;
  padding: 14px 26px; border-radius: 12px; border: none; cursor: pointer;
  text-decoration: none; transition: transform .12s, box-shadow .12s, filter .12s;
  box-shadow: 0 10px 30px rgba(252,76,2,.30);
}
.lp-connect:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(252,76,2,.40); filter: brightness(1.05); }
.lp-connect:active { transform: translateY(0); }
.lp-connect svg { width: 20px; height: 20px; fill: currentColor; }
.lp-note { margin-top: 14px; font-size: 12px; color: var(--muted); }

/* ── steps ── */
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 56px 0; }
.lp-step { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.lp-step .n { width: 34px; height: 34px; border-radius: 9px; background: var(--orange-dim, rgba(252,76,2,.15)); color: var(--orange); font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.lp-step h4 { margin: 0 0 6px; font-size: 16px; }
.lp-step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ── section heading ── */
.lp-h2 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; letter-spacing: -.8px; text-align: center; margin: 64px 0 8px; }
.lp-h2-sub { text-align: center; color: var(--muted); margin: 0 0 28px; font-size: 15px; }

/* ── feature grid ── */
.lp-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-feat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px; transition: border-color .15s, transform .15s; }
.lp-feat:hover { border-color: var(--orange); transform: translateY(-3px); }
.lp-feat .ico { font-size: 24px; margin-bottom: 10px; line-height: 0; }
.lp-feat .ico svg { width: 26px; height: 26px; fill: none; stroke: var(--orange); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lp-feat h4 { margin: 0 0 6px; font-size: 16px; }
.lp-feat p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

/* flagship feature highlight */
.feat-star { border-color: var(--orange-mid); background: linear-gradient(180deg, var(--orange-dim), var(--surface)); }
.flag { display: inline-block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--orange); background: var(--orange-dim); border: 1px solid var(--orange-mid); border-radius: 6px; padding: 2px 6px; margin-left: 6px; vertical-align: middle; }

/* ── screenshots carousel ── */
.lp-carousel { position: relative; max-width: 980px; margin: 0 auto; }
.lp-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.lp-track::-webkit-scrollbar { display: none; }
.lp-slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; padding: 0 6px; }
.lp-slide .stage { width: 100%; height: 520px; display: flex; align-items: center; justify-content: center; }
.lp-slide .stage img { max-width: 100%; max-height: 100%; border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.lp-slide .stage.story img { border-radius: 18px; }
.lp-slide figcaption { margin-top: 14px; color: var(--muted); font-size: 14px; line-height: 1.55; text-align: center; max-width: 720px; min-height: 44px; }
.lp-slide figcaption b { color: var(--text); }
.lp-car-btn { position: absolute; top: 250px; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface2); color: var(--text); font-size: 24px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s, border-color .15s; }
.lp-car-btn:hover { background: var(--orange); border-color: var(--orange); color: #fff; }
.lp-car-btn.prev { left: -10px; }
.lp-car-btn.next { right: -10px; }
.lp-dots { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.lp-dots button { width: 8px; height: 8px; border-radius: 50%; border: none; background: var(--surface4); cursor: pointer; padding: 0; transition: background .15s, width .15s; }
.lp-dots button.active { background: var(--orange); width: 22px; border-radius: 4px; }
@media (max-width: 760px) { .lp-slide .stage { height: 62vh; } .lp-car-btn { display: none; } }

/* ── scroll-reveal + hero entrance animations ── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.lp-hero .lp-icon { animation: lpFadeUp .7s ease both; }
.lp-hero h1 { animation: lpFadeUp .7s .08s ease both; }
.lp-hero p.sub { animation: lpFadeUp .7s .16s ease both; }
.lp-hero .lp-connect { animation: lpFadeUp .7s .24s ease both; }
.lp-hero .lp-note { animation: lpFadeUp .7s .32s ease both; }
@keyframes lpFadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .lp-hero .lp-icon, .lp-hero h1, .lp-hero p.sub, .lp-hero .lp-connect, .lp-hero .lp-note { animation: none; }
}

/* ── FAQ ── */
.lp-faq { max-width: 820px; margin: 0 auto; }
.lp-faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.lp-faq summary { cursor: pointer; padding: 16px 18px; font-weight: 700; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: '+'; color: var(--orange); font-size: 22px; font-weight: 700; line-height: 1; }
.lp-faq details[open] summary::after { content: '−'; }
.lp-faq .ans { padding: 0 18px 16px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.lp-faq .ans a { color: var(--orange); font-weight: 700; }
.lp-faq code { background: var(--surface2); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* ── final CTA + footer ── */
.lp-cta { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 48px 24px; margin: 64px 0 36px; }
.lp-cta h2 { font-size: clamp(22px, 4vw, 32px); font-weight: 800; letter-spacing: -.8px; margin: 0 0 20px; }
.lp-foot { text-align: center; color: var(--muted); font-size: 13px; }
.lp-foot a { color: var(--orange); font-weight: 700; text-decoration: none; margin: 0 10px; }
.lp-foot .disclaim { margin-top: 12px; font-size: 11px; opacity: .8; }

@media (max-width: 760px) {
  .lp-steps, .lp-features { grid-template-columns: 1fr; }
  .lp-hero { padding: 36px 0 24px; }
}
