/* Rally marketing site — single dark theme, no build step, no external assets. */

:root {
  --bg: #08080f;
  --bg-soft: #0e0e1b;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f5fa;
  --muted: #a1a1b8;
  --faint: #70708c;
  --brand: #6366f1;
  --brand-deep: #4f46e5;
  --brand-soft: #a5b4fc;
  --violet: #a78bfa;
  --mint: #34d399;
  --amber: #fbbf24;

  /* in-app mockup palette — mirrors apps/mobile/src/components/ui.tsx */
  --app-bg: #f7f7fb;
  --app-card: #ffffff;
  --app-border: #e5e7eb;
  --app-text: #111827;
  --app-muted: #6b7280;
  --app-primary: #4f46e5;
  --app-success: #16a34a;
  --app-warning: #d97706;

  --radius: 16px;
  --maxw: 1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient light behind the top of the page */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 820px;
  background:
    radial-gradient(820px 520px at 22% 12%, rgba(99, 102, 241, 0.34), transparent 66%),
    radial-gradient(680px 460px at 80% 2%, rgba(167, 139, 250, 0.26), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

main, header, footer { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.022em; font-weight: 700; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

section { padding: 96px 0; }
@media (max-width: 720px) { section { padding: 64px 0; } }

/* ---------- Shared bits ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-soft);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 14px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15);
}

.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); margin-top: 18px; }
.section-head p { color: var(--muted); font-size: 18px; margin-top: 16px; }

.lede { color: var(--muted); font-size: 19px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 650;
  padding: 13px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(180deg, #6d68f5, var(--brand-deep));
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 36px -12px rgba(99, 102, 241, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-strong); border-color: rgba(255, 255, 255, 0.26); }
.btn-sm { padding: 9px 16px; font-size: 14px; border-radius: 10px; }

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
}

/* ---------- Header ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(8, 8, 15, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; border-radius: 9px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--muted); font-size: 15px; font-weight: 550; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
@media (max-width: 900px) { .nav-links { display: none; } }
@media (max-width: 420px) { .nav-cta .btn-ghost { display: none; } }

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

.hero { padding: 84px 0 72px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(34px, 4.3vw, 54px);
  margin-top: 22px;
  letter-spacing: -0.035em;
}
.hero h1 .grad {
  background: linear-gradient(100deg, #c7d2fe 8%, #a78bfa 52%, #67e8f9 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lede { margin-top: 22px; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note {
  margin-top: 20px;
  font-size: 14px;
  color: var(--faint);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.hero-note svg { flex: 0 0 16px; margin-top: 4px; }
.hero-note strong { color: var(--muted); font-weight: 600; }

.hero-stats { display: flex; gap: 32px; margin-top: 44px; flex-wrap: wrap; }
.hero-stats div { min-width: 96px; }
.hero-stats .n { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.hero-stats .l { font-size: 13px; color: var(--faint); line-height: 1.35; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero { padding: 56px 0 40px; }
}

/* ---------- Phone mockups ---------- */

.stage { position: relative; display: flex; justify-content: center; }
.stage::after {
  content: "";
  position: absolute;
  width: 78%;
  height: 72%;
  left: 11%;
  top: 14%;
  background: radial-gradient(closest-side, rgba(99, 102, 241, 0.5), transparent);
  filter: blur(60px);
  z-index: 0;
}
.phone {
  position: relative;
  z-index: 1;
  width: 300px;
  flex: 0 0 300px;
  background: #16161f;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 42px;
  padding: 11px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.phone-screen {
  position: relative;
  background: var(--app-bg);
  border-radius: 32px;
  overflow: hidden;
  color: var(--app-text);
  font-size: 13px;
  line-height: 1.45;
  height: 596px;
  display: flex;
  flex-direction: column;
}
.phone-notch {
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 96px; height: 22px;
  background: #16161f;
  border-radius: 999px;
  z-index: 3;
}
.status-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px 6px;
  font-size: 11px; font-weight: 700; color: var(--app-text);
}
.status-bar .icons { display: flex; gap: 4px; align-items: center; }
.status-bar .icons i { display: block; width: 4px; height: 9px; background: var(--app-text); border-radius: 1px; opacity: 0.35; }
.status-bar .icons i:nth-child(2) { height: 11px; opacity: 0.55; }
.status-bar .icons i:nth-child(3) { height: 13px; opacity: 0.85; }
.status-bar .icons i:nth-child(4) { width: 16px; height: 9px; border-radius: 2px; opacity: 0.85; }

.app-head {
  padding: 4px 16px 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.app-head h4 { font-size: 19px; font-weight: 800; color: var(--app-text); }
.app-head .pill {
  font-size: 10px; font-weight: 700; color: var(--app-primary);
  background: rgba(79, 70, 229, 0.1);
  border-radius: 999px; padding: 4px 9px;
}
.app-body { flex: 1; overflow: hidden; padding: 0 14px; }
.app-body.scroll-fade { -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent); mask-image: linear-gradient(180deg, #000 82%, transparent); }

.a-card {
  background: var(--app-card);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}
.a-row { display: flex; gap: 10px; }
.a-thumb {
  width: 52px; height: 52px; border-radius: 8px; flex: 0 0 52px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff; letter-spacing: 0.04em;
}
/* Platform tiles. The t-* class carries the brand gradient; the glyph inside
   is a white <use> of the sprite in index.html, sized as a share of the tile
   so the same markup works at chip (20px) and card (34px) scale. */
.sq { display: inline-flex; align-items: center; justify-content: center; }
.sq svg { width: 62%; height: 62%; display: block; fill: #fff; }

.t-reddit { background: linear-gradient(140deg, #ff6b3d, #ff4500); }
.t-youtube { background: linear-gradient(140deg, #ff5a5a, #dc2626); }
.t-x { background: linear-gradient(140deg, #3f3f46, #09090b); }
.t-instagram { background: linear-gradient(140deg, #f9ce34, #ee2a7b 55%, #6228d7); }
.t-linkedin { background: linear-gradient(140deg, #38bdf8, #0a66c2); }
.a-title { font-weight: 650; font-size: 12.5px; color: var(--app-text); }
.a-sub { font-size: 11px; color: var(--app-muted); margin-top: 3px; }
.a-badges { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.a-badge {
  font-size: 9.5px; font-weight: 700; border: 1px solid var(--app-muted);
  color: var(--app-muted); border-radius: 999px; padding: 1.5px 7px;
}
.a-badge.success { color: var(--app-success); border-color: var(--app-success); }
.a-badge.warn { color: var(--app-warning); border-color: var(--app-warning); }
.a-badge.brand { color: var(--app-primary); border-color: var(--app-primary); }
.a-btn {
  background: var(--app-primary); color: #fff; font-size: 12px; font-weight: 650;
  border-radius: 10px; padding: 10px; text-align: center;
}
.a-btn.secondary { background: #fff; color: var(--app-text); border: 1px solid var(--app-border); }
.a-label { font-size: 10.5px; font-weight: 700; color: var(--app-muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 14px 0 7px; }
.a-quote {
  background: var(--app-card); border: 1px solid var(--app-border); border-left: 3px solid var(--app-primary);
  border-radius: 8px; padding: 9px 10px; font-size: 11.5px; color: #374151; margin-bottom: 7px;
}
.a-stats { display: flex; gap: 8px; margin-bottom: 4px; }
.a-stat {
  flex: 1; background: var(--app-card); border: 1px solid var(--app-border);
  border-radius: 12px; padding: 11px 6px; text-align: center;
}
.a-stat .v { font-size: 17px; font-weight: 800; color: var(--app-primary); }
.a-stat .k { font-size: 9px; color: var(--app-muted); margin-top: 2px; line-height: 1.25; }
.a-bar { height: 5px; border-radius: 999px; background: var(--app-border); overflow: hidden; margin-top: 7px; }
.a-bar span { display: block; height: 100%; border-radius: 999px; background: var(--app-primary); }
.a-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; color: #fff; background: #4f46e5;
}
.a-tabbar {
  display: flex; border-top: 1px solid var(--app-border); background: var(--app-card);
  padding: 9px 0 11px;
}
.a-tabbar div { flex: 1; text-align: center; font-size: 10px; font-weight: 700; color: var(--app-muted); }
.a-tabbar div.on { color: var(--app-primary); }

/* Floating chips around the hero phone */
.float {
  position: absolute;
  z-index: 2;
  background: rgba(20, 20, 32, 0.9);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 12px 14px;
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 50px -22px rgba(0, 0, 0, 0.95);
  animation: bob 6s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.float-push { top: -52px; left: -92px; width: 244px; display: flex; gap: 10px; align-items: flex-start; }
.float-push img { width: 26px; height: 26px; border-radius: 8px; }
.float-push .t { font-size: 12.5px; font-weight: 700; }
.float-push .b { font-size: 11.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.float-push .time { font-size: 10px; color: var(--faint); margin-left: auto; }
.float-done { bottom: 58px; right: -38px; width: 186px; animation-delay: -3s; }
.float-done .t { font-size: 12px; color: var(--muted); font-weight: 600; }
.float-done .n { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; margin-top: 2px; }
.float-done .n em { font-style: normal; color: var(--mint); }
.float-done .bar { height: 5px; background: rgba(255, 255, 255, 0.12); border-radius: 999px; margin-top: 9px; overflow: hidden; }
.float-done .bar span { display: block; height: 100%; width: 80%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--mint)); }
@media (max-width: 1080px) { .float-push { left: -24px; } .float-done { right: -8px; } }
@media (max-width: 560px) {
  .phone { width: 100%; max-width: 300px; flex-basis: auto; }
  .stage { flex-direction: column; align-items: center; }
  .float-push {
    position: relative; top: auto; left: auto;
    width: 100%; max-width: 300px; margin-bottom: 16px; animation: none;
  }
  .float-done {
    position: relative; bottom: auto; right: auto;
    width: 100%; max-width: 300px; margin-top: 16px; animation: none;
  }
}

/* ---------- Logo strip ---------- */

.strip { padding: 10px 0 40px; }
.strip-inner {
  display: flex; align-items: center; justify-content: center; gap: 14px 34px; flex-wrap: wrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.strip-label { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.chip { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.chip .sq { width: 20px; height: 20px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }

/* ---------- Generic grids ---------- */

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Two paths ---------- */

.path { position: relative; overflow: hidden; padding: 32px; display: flex; flex-direction: column; }
.path.featured { border-color: rgba(129, 140, 248, 0.42); background: linear-gradient(180deg, rgba(99, 102, 241, 0.16), rgba(255, 255, 255, 0.02)); }
.path .tag {
  position: absolute; top: 24px; right: 24px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: #0b0b14; background: var(--brand-soft); border-radius: 999px; padding: 4px 10px;
}
.path .icon {
  width: 44px; height: 44px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(99, 102, 241, 0.16); border: 1px solid rgba(129, 140, 248, 0.34);
  margin-bottom: 18px;
}
.path h3 { font-size: 24px; }
.path > p { color: var(--muted); margin-top: 12px; font-size: 16px; }
.ticks { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 11px; }
.ticks li { display: flex; gap: 11px; font-size: 15px; color: var(--muted); line-height: 1.5; }
.ticks li svg { flex: 0 0 18px; margin-top: 3px; }
.ticks li b { color: var(--text); font-weight: 650; }
.path > .btn { align-self: flex-start; margin-top: auto; }

/* ---------- Steps ---------- */

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 26px 22px; }
.step .n {
  font-size: 13px; font-weight: 800; color: var(--brand-soft);
  border: 1px solid rgba(129, 140, 248, 0.35); background: rgba(99, 102, 241, 0.12);
  width: 32px; height: 32px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.step h3 { font-size: 17px; }
.step p { color: var(--muted); font-size: 14.5px; margin-top: 9px; }

/* ---------- Screenshots ---------- */

.shots { display: flex; gap: 34px; justify-content: center; flex-wrap: wrap; align-items: flex-start; }
.shot { width: 300px; }
.shot .caption { margin-top: 22px; }
.shot .caption h3 { font-size: 17px; }
.shot .caption p { color: var(--muted); font-size: 14.5px; margin-top: 7px; }
.shot .stage::after { opacity: 0.55; }

/* ---------- Platforms ---------- */

.plat { padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.plat-head { display: flex; align-items: center; gap: 12px; }
.plat-head .sq { width: 34px; height: 34px; border-radius: 10px; flex: 0 0 34px; }
.plat-head h3 { font-size: 18px; }
.plat .window { font-size: 12px; font-weight: 700; color: var(--brand-soft); letter-spacing: 0.04em; }
.plat p { color: var(--muted); font-size: 15px; }
.plat .ask {
  margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line-strong);
  font-size: 13.5px; color: var(--faint);
}
.plat .ask b { color: var(--text); font-weight: 650; }

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

.feat { padding: 24px; }
.feat .ico { width: 20px; height: 20px; margin-bottom: 14px; }
.feat h3 { font-size: 16px; }
.feat p { color: var(--muted); font-size: 14.5px; margin-top: 8px; }

/* ---------- Guardrails ---------- */

.guard { background: linear-gradient(180deg, rgba(52, 211, 153, 0.08), rgba(255, 255, 255, 0.02)); border-color: rgba(52, 211, 153, 0.26); }
.guard-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .guard-list { grid-template-columns: 1fr; } }
.guard-list li { display: flex; gap: 12px; color: var(--muted); font-size: 15px; }
.guard-list li b { color: var(--text); font-weight: 650; }
.guard-list .x { flex: 0 0 20px; margin-top: 2px; }

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

.faq { max-width: 780px; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.faq summary {
  cursor: pointer; list-style: none; font-size: 17px; font-weight: 650;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; color: var(--brand-soft); font-size: 22px; font-weight: 400; line-height: 1;
}
.faq details[open] summary::after { content: "\2013"; }
.faq p { color: var(--muted); font-size: 15.5px; margin-top: 12px; }

/* ---------- CTA + footer ---------- */

.cta-band {
  text-align: center;
  border-radius: 28px;
  padding: 64px 32px;
  border: 1px solid rgba(129, 140, 248, 0.34);
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(99, 102, 241, 0.34), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
}
.cta-band h2 { font-size: clamp(28px, 4vw, 42px); }
.cta-band p { color: var(--muted); margin: 18px auto 0; max-width: 560px; font-size: 18px; }
.cta-band .hero-actions { justify-content: center; }

footer { border-top: 1px solid var(--line); padding: 44px 0 56px; margin-top: 32px; }
.foot { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; align-items: flex-start; }
.foot p { color: var(--faint); font-size: 14px; margin-top: 12px; max-width: 320px; }
.foot-links { display: flex; gap: 48px; flex-wrap: wrap; }
.foot-links h4 { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.foot-links a { display: block; color: var(--muted); font-size: 14.5px; padding: 4px 0; }
.foot-links a:hover { color: var(--text); }
.foot-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13.5px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
