/* Public landing page (templates/landing.html). Same palette as st.css, dark only like the app.
   See docs/landing.md. */
:root {
    --lp-bg: #0a0e1a;
    --lp-bg-2: #131829;
    --lp-card: #1e2440;
    --lp-line: #2d3561;
    --lp-fg: #e2e8f0;
    --lp-fg-2: #94a3b8;
    --lp-fg-3: #64748b;
    --lp-accent: #e8611a;
    --lp-accent-2: #f97316;
    --lp-win: #22c55e;
    --lp-wave: #a78bfa;
    --lp-display: 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
    --lp-body: 'Barlow', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color-scheme: dark;
}

* { box-sizing: border-box; }
/* padding-top: 0 undoes st.css's app header offset when the sign-in page shows this content behind its card. */
body { background: var(--lp-bg); color: var(--lp-fg); font-family: var(--lp-body); font-size: 16px; line-height: 1.55; margin: 0; padding-top: 0; }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--lp-display); line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }
form { margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.band { padding-block: 88px; }
.band-alt { background: var(--lp-bg-2); border-block: 1px solid var(--lp-line); }
.eyebrow { font-family: var(--lp-display); font-weight: 600; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lp-accent-2); }
.lead { color: var(--lp-fg-2); font-size: 18px; max-width: 58ch; }

.lp-btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 10px; border: 1px solid transparent; font-family: var(--lp-display); font-weight: 700; font-size: 17px; letter-spacing: 0.02em; text-decoration: none; cursor: pointer; transition: background-color 140ms ease, border-color 140ms ease; }
.lp-btn-primary { background: var(--lp-accent); color: #fff; }
.lp-btn-primary:hover { background: var(--lp-accent-2); }
.lp-btn-ghost { background: none; border-color: var(--lp-line); color: var(--lp-fg); }
.lp-btn-ghost:hover { border-color: var(--lp-fg-3); background: var(--lp-card); }
.lp-btn:focus-visible, .step:focus-visible, .skip:focus-visible { outline: 2px solid var(--lp-accent-2); outline-offset: 3px; }
.lp-btn[disabled] { opacity: 0.6; cursor: wait; }

/* Header */
.lp-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: rgba(10, 14, 26, 0.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--lp-line); }
.nav { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--lp-display); font-weight: 700; font-size: 24px; }
.brand img { width: 38px; height: auto; }
.brand span { color: var(--lp-accent-2); }
.nav-links { display: flex; gap: 24px; font-size: 15px; color: var(--lp-fg-2); margin-left: auto; }
.nav-links a { text-decoration: none; transition: color 140ms ease; }
.nav-links a:hover { color: var(--lp-fg); }
.nav .lp-btn { height: 40px; padding: 0 16px; font-size: 15px; }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.lp-lang { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 10px; color: var(--lp-fg-2); font-family: var(--lp-display); font-weight: 700; font-size: 15px; letter-spacing: 0.06em; text-decoration: none; transition: background-color 140ms ease, color 140ms ease; }
.lp-lang:hover { background: var(--lp-card); color: var(--lp-fg); }
.lp-lang:focus-visible { outline: 2px solid var(--lp-accent-2); outline-offset: 3px; }

.lp-error { background: rgba(239, 68, 68, 0.12); border-bottom: 1px solid rgba(239, 68, 68, 0.4); color: #fca5a5; font-size: 14px; text-align: center; padding-block: 10px; }

/* Hero */
.hero { padding-block: 72px 88px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.hero h1 { font-size: clamp(44px, 6.4vw, 76px); font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--lp-accent-2); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--lp-fg-3); font-size: 14px; }
.hero-facts span::before { content: "✓"; color: var(--lp-win); margin-right: 6px; font-weight: 600; }
.hero-phones { position: relative; height: 560px; }
.phone { position: absolute; width: 250px; border-radius: 34px; padding: 8px; background: #05070d; border: 1px solid var(--lp-line); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7); }
.phone img { display: block; width: 100%; border-radius: 26px; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; }
.hero-phones .p1 { left: 4%; top: 30px; transform: rotate(-4deg); }
.hero-phones .p2 { right: 4%; top: 0; transform: rotate(3deg); z-index: 2; }
.score-chip { position: absolute; z-index: 3; left: 30%; bottom: 18px; background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: 12px; padding: 10px 14px; display: grid; grid-template-columns: auto auto; gap: 2px 18px; font-size: 13px; box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.6); }
.score-chip .w { color: var(--lp-fg); font-weight: 600; }
.score-chip .l { color: var(--lp-fg-3); }
.score-chip .n { font-family: var(--lp-display); font-weight: 700; font-size: 20px; text-align: right; line-height: 1.1; font-variant-numeric: tabular-nums; }
.score-chip .w + .n { color: var(--lp-win); }
.score-chip .tag { grid-column: 1 / -1; font-family: var(--lp-display); font-size: 11px; letter-spacing: 0.14em; color: var(--lp-wave); font-weight: 700; }

/* How it works */
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(34px, 4.4vw, 50px); font-weight: 700; }
.how { display: grid; grid-template-columns: 1fr 320px; gap: 56px; align-items: center; }
.steps { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 4px 16px; text-align: left; background: none; border: 1px solid transparent; border-radius: 14px; padding: 18px 20px; color: inherit; font: inherit; cursor: pointer; transition: background-color 140ms ease, border-color 140ms ease; }
.step:hover { background: rgba(30, 36, 64, 0.5); }
.step[aria-selected="true"] { background: var(--lp-card); border-color: var(--lp-line); }
.step-num { grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--lp-display); font-weight: 700; font-size: 20px; border: 1px solid var(--lp-line); color: var(--lp-fg-3); transition: background-color 140ms ease, color 140ms ease; }
.step[aria-selected="true"] .step-num { background: var(--lp-accent); border-color: var(--lp-accent); color: #fff; }
.step h3 { font-size: 23px; font-weight: 700; align-self: end; }
.step p { color: var(--lp-fg-2); font-size: 15px; }
.step:not([aria-selected="true"]) h3 { color: var(--lp-fg-2); }
.how-phone { justify-self: center; }
.how-phone .phone { position: relative; width: 300px; }
.how-phone img { transition: opacity 200ms ease; }

/* Modules hub */
.hub { position: relative; height: 560px; max-width: 820px; margin: 0 auto; }
.hub > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hub-core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #252d4a, var(--lp-bg)); border: 1px solid var(--lp-accent); display: grid; place-items: center; box-shadow: 0 0 0 10px rgba(232, 97, 26, 0.08), 0 0 60px rgba(232, 97, 26, 0.18); }
.hub-core img { width: 74px; }
.mod { position: absolute; transform: translate(-50%, -50%); width: 200px; background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.mod h3 { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.mod p { font-size: 13.5px; color: var(--lp-fg-2); line-height: 1.4; }
.mod .ic { width: 22px; height: 22px; color: var(--lp-accent-2); flex: none; }
.mod.addon { border-style: dashed; border-color: var(--lp-accent); }
.mod .badge { font-family: var(--lp-display); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lp-accent-2); }
.mod-1 { left: 50%; top: 11%; }
.mod-2 { left: 84%; top: 25%; }
.mod-3 { left: 86%; top: 61%; }
.mod-4 { left: 68%; top: 89%; }
.mod-5 { left: 32%; top: 89%; }
.mod-6 { left: 14%; top: 61%; }
.mod-7 { left: 16%; top: 25%; }

/* Modules on a phone: the same hub as a ring of icons, the tapped one explained in a card below. */
.hub-m { display: none; }
.hub-m-ring { position: relative; width: min(100%, 400px); aspect-ratio: 1; margin: 0 auto; }
.hub-m-ring > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hub-m-core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 28%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #252d4a, var(--lp-bg)); border: 1px solid var(--lp-accent); display: grid; place-items: center; box-shadow: 0 0 0 8px rgba(232, 97, 26, 0.08), 0 0 40px rgba(232, 97, 26, 0.2); }
.hub-m-core img { width: 58%; }
.hub-m-node { position: absolute; transform: translate(-50%, -22px); display: flex; flex-direction: column; align-items: center; gap: 6px; width: 84px; background: none; border: 0; padding: 0; color: var(--lp-fg-2); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hub-m-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--lp-card); border: 1px solid var(--lp-line); color: var(--lp-accent-2); transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease; }
.hub-m-icon svg { width: 20px; height: 20px; }
.hub-m-node.addon .hub-m-icon { border-style: dashed; border-color: var(--lp-accent); }
.hub-m-label { font-family: var(--lp-display); font-weight: 700; font-size: 13px; line-height: 1.1; white-space: nowrap; transition: color 140ms ease; }
.hub-m-node[aria-pressed="true"] .hub-m-icon { background: var(--lp-accent); border-color: var(--lp-accent); color: #fff; box-shadow: 0 0 0 6px rgba(232, 97, 26, 0.15); }
.hub-m-node[aria-pressed="true"] .hub-m-label { color: var(--lp-fg); }
.hub-m-node:focus-visible { outline: none; }
.hub-m-node:focus-visible .hub-m-icon { outline: 2px solid var(--lp-accent-2); outline-offset: 3px; }
.hub-m-detail { margin: 16px auto 0; max-width: 400px; background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-height: 96px; }
.hub-m-detail.addon { border-style: dashed; border-color: var(--lp-accent); }
.hub-m-detail h3 { font-size: 21px; font-weight: 700; }
.hub-m-detail p { color: var(--lp-fg-2); font-size: 15px; line-height: 1.45; }
.hub-m-detail .badge { font-family: var(--lp-display); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lp-accent-2); }
.hub-m-hint { margin-top: 10px; text-align: center; color: var(--lp-fg-3); font-size: 13px; }

/* After the evening */
.story { display: grid; grid-template-columns: auto 1fr; gap: 64px; align-items: center; }
.story-phones { display: flex; gap: 20px; }
.story-phones .phone { position: relative; width: 230px; }
.story-phones .phone:nth-child(2) { margin-top: 56px; }
.story-list { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.story-list h2 { font-size: clamp(32px, 4vw, 46px); font-weight: 700; }
.story-item { display: grid; grid-template-columns: 4px 1fr; gap: 18px; }
.story-item::before { content: ""; border-radius: 2px; background: var(--lp-line); }
.story-item:first-of-type::before { background: var(--lp-accent); }
.story-item h3 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.story-item p { color: var(--lp-fg-2); }
.story-item .quote { font-family: var(--lp-display); font-size: 21px; font-weight: 600; color: var(--lp-fg); line-height: 1.3; }
.quote small { display: block; font-family: var(--lp-body); font-size: 13px; font-weight: 400; color: var(--lp-fg-3); margin-top: 6px; }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan { background: var(--lp-bg); border: 1px solid var(--lp-line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.plan.featured { border-color: var(--lp-accent); }
.plan-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.plan h3 { font-size: 28px; font-weight: 700; }
.plan .pill { font-family: var(--lp-display); font-weight: 700; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lp-accent-2); border: 1px solid var(--lp-accent); border-radius: 999px; padding: 2px 10px; }
.plan .price { font-family: var(--lp-display); font-weight: 600; font-size: 22px; color: var(--lp-fg-3); }
.plan .scope { color: var(--lp-fg-2); font-size: 15px; }
.plan ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.plan li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; }
.plan li::before { content: "✓"; color: var(--lp-win); font-weight: 600; }
.plan li.inc { color: var(--lp-fg-3); }
.plan li.inc::before { content: "+"; color: var(--lp-fg-3); }
.plan .lp-btn { margin-top: auto; }

/* Final call to action */
.final-box { background: linear-gradient(120deg, rgba(232, 97, 26, 0.16), rgba(30, 36, 64, 0.4) 60%); border: 1px solid var(--lp-line); border-radius: 20px; padding: 48px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.final-box h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; }
.final-box p { color: var(--lp-fg-2); margin-top: 8px; max-width: 52ch; }
.final-ctas { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.skip { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: var(--lp-fg-2); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--lp-line); }
.skip:hover { color: var(--lp-fg); }

.lp-footer { padding-block: 40px 56px; color: var(--lp-fg-3); font-size: 14px; }
.foot { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--lp-fg); }

@media (max-width: 900px) {
    .nav-links { display: none; }
    .nav-cta { margin-left: auto; }
    .hero-grid, .how, .story { grid-template-columns: 1fr; }
    .hero-phones { height: 470px; max-width: 460px; width: 100%; margin: 0 auto; }
    .hero-phones .phone { width: 210px; }
    .how-phone { order: -1; }
    .how-phone .phone { width: 250px; }
    .story-phones { justify-content: center; }
    .story-phones .phone { width: 46%; max-width: 220px; }
    .plans { grid-template-columns: 1fr; }
    .hub { display: none; }
    .hub-m { display: block; }
}

@media (max-width: 520px) {
    .band { padding-block: 64px; }
    .hero { padding-block: 40px 64px; }
    /* Not enough room for both: members need sign-in at hand, the hero shows the tour button right below. */
    .nav-cta .lp-btn-primary { display: none; }
    .nav { gap: 12px; }
    .nav-cta { gap: 4px; }
    .lp-lang { min-width: 34px; padding: 0 6px; }
    .hero-phones { height: 400px; }
    .hero-phones .phone { width: 180px; padding: 6px; border-radius: 28px; }
    .hero-phones .phone img { border-radius: 22px; }
    .hero-phones .p1 { left: 0; }
    .hero-phones .p2 { right: 0; }
    .score-chip { left: 50%; transform: translateX(-50%); bottom: 0; }
    .final-box { padding: 28px; }
    .step { padding: 14px; grid-template-columns: 38px 1fr; }
    .step-num { width: 38px; height: 38px; font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
