/* Rally landing — clean, consistent, mobile-first.
   One content width everywhere; grids auto-fit; no vw widths; overflow-safe. */

:root {
  color-scheme: dark;
  --bg: #08090b;
  --panel: #101318;
  --panel-2: #151922;
  --text: #f5f7fa;
  --muted: #a7b0bd;
  --subtle: #6f7885;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.14);
  --blue: #0a84ff;
  --blue-2: #4aa3ff;
  --green: #34c759;
  --radius: 16px;
  --content: 1120px; /* shared content width for every section */
  --pad: clamp(20px, 5vw, 40px); /* shared side gutter */
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}
html {
  scroll-behavior: smooth;
}
html,
body {
  /* Safety net: no horizontal scroll can ever shift the page sideways. */
  overflow-x: clip;
  max-width: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
code {
  font-family: 'SF Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* One container for every top-level block → consistent left/right alignment. */
.nav-inner,
.hero,
.trust,
.band,
.site-footer {
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 26px rgba(10, 132, 255, 0.35);
}
.btn-primary:hover {
  background: #0b74e0;
}
.btn-ghost {
  color: var(--text);
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.03);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
}
.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
  background: var(--blue);
  color: #fff;
}
.btn-lg {
  padding: 15px 30px;
  font-size: 16px;
}

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 9, 11, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 17px;
}
.brand img {
  border-radius: 7px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 26px);
}
.nav-links a:not(.btn) {
  font-size: 14.5px;
  color: var(--muted);
}
.nav-links a:not(.btn):hover {
  color: var(--text);
}

/* ---- Hero ---- */
.hero {
  text-align: center;
  padding-top: clamp(56px, 9vw, 110px);
  padding-bottom: 8px;
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--blue-2);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -1.5px;
}
.lede {
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--muted);
  max-width: 640px;
  margin: 20px auto 0;
}
.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}
.hero-meta {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--subtle);
}

/* ---- Product screenshot (own block, centered in full width) ---- */
.shot-frame {
  position: relative;
  width: 100%;
  max-width: calc(1360px + 2 * var(--pad));
  margin: clamp(36px, 6vw, 60px) auto 0;
  padding-inline: var(--pad);
}
.shot-glow {
  position: absolute;
  inset: 0 var(--pad) 24%;
  background: radial-gradient(60% 60% at 50% 0%, rgba(10, 132, 255, 0.32), transparent 70%);
  filter: blur(55px);
  z-index: 0;
  pointer-events: none;
}
.shot-window {
  position: relative;
  z-index: 1;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.shot-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: #0e1116;
  border-bottom: 1px solid var(--line);
}
.shot-bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.shot-bar span:nth-child(1) {
  background: #ff5f57;
}
.shot-bar span:nth-child(2) {
  background: #febc2e;
}
.shot-bar span:nth-child(3) {
  background: #28c840;
}
.shot-window img {
  width: 100%;
}

/* ---- Trust ---- */
.trust {
  text-align: center;
  padding-block: clamp(48px, 7vw, 72px) 8px;
}
.trust-label {
  font-size: 13px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--subtle);
}
.trust-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 14px 0 10px;
  font-size: clamp(17px, 3vw, 22px);
  font-weight: 600;
}
.trust-row .dot {
  color: var(--subtle);
}
.trust-note {
  color: var(--muted);
  font-size: 14.5px;
}

/* ---- Section scaffold ---- */
.band {
  padding-block: clamp(56px, 9vw, 96px);
}
.section-head {
  max-width: 680px;
  margin: 0 auto clamp(32px, 5vw, 44px);
  text-align: center;
}
.kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--blue-2);
  margin-bottom: 12px;
}
.band h2 {
  font-size: clamp(26px, 4.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.12;
}
.section-sub {
  color: var(--muted);
  font-size: clamp(15px, 2vw, 18px);
  margin-top: 16px;
}
.fineprint {
  color: var(--subtle);
  font-size: 13.5px;
  margin-top: 14px;
}

/* Shared card look */
.compare-card,
.steps li,
.feature-grid article,
.how-steps li,
.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

/* ---- Compare (auto 2-up, stacks on narrow) ---- */
.compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}
.compare-card {
  padding: 26px 26px 20px;
}
.compare-card.after {
  border-color: rgba(10, 132, 255, 0.4);
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.08), var(--panel));
}
.compare-card h3 {
  font-size: 15px;
  margin-bottom: 14px;
  color: var(--muted);
}
.compare-card.after h3 {
  color: var(--blue-2);
}
.compare-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.compare-card li {
  font-size: 15.5px;
  padding-left: 22px;
  position: relative;
}
.compare-card.before li::before {
  content: '×';
  position: absolute;
  left: 0;
  color: var(--subtle);
}
.compare-card.after li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--blue-2);
}

/* ---- Steps (Input Harness) ---- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 16px;
}
.steps li {
  padding: 24px 22px;
}
.step-n {
  font-family: 'SF Mono', ui-monospace, monospace;
  font-size: 13px;
  color: var(--blue-2);
}
.steps h3 {
  font-size: 18px;
  margin: 12px 0 8px;
}
.steps p {
  font-size: 14.5px;
  color: var(--muted);
}

/* ---- Feature grid (auto 3-up) ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}
.feature-grid article {
  padding: 24px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.feature-grid article:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
}
.feature-grid h3 {
  font-size: 16.5px;
  margin-bottom: 8px;
}
.feature-grid p {
  font-size: 14.5px;
  color: var(--muted);
}

/* ---- How it works ---- */
.how-steps {
  list-style: none;
  counter-reset: how;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 18px;
}
.how-steps li {
  counter-increment: how;
  padding: 26px 24px;
}
.how-steps li::before {
  content: counter(how);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(10, 132, 255, 0.14);
  color: var(--blue-2);
  font-weight: 700;
  margin-bottom: 16px;
}
.how-steps strong {
  display: block;
  font-size: 16.5px;
  margin-bottom: 6px;
}
.how-steps span {
  color: var(--muted);
  font-size: 14.5px;
}

/* ---- Local-first ---- */
.local .section-head {
  margin-bottom: 0;
}

/* ---- Download ---- */
.download {
  display: flex;
  justify-content: center;
}
.download-card {
  width: 100%;
  max-width: 520px;
  text-align: center;
  padding: clamp(28px, 5vw, 40px) clamp(22px, 4vw, 34px) 30px;
  border: 1px solid var(--line-2);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: var(--shadow);
}
.dl-icon {
  margin: 0 auto 16px;
  border-radius: 16px;
}
.download-card h2 {
  font-size: 28px;
}
.dl-meta {
  color: var(--muted);
  font-size: 14px;
  margin: 6px 0 22px;
}
.install-note {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  color: var(--muted);
}
.install-note p + p {
  margin-top: 6px;
}
.install-note .muted {
  color: var(--subtle);
  margin-top: 10px;
}
.install-steps {
  margin: 10px 0 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.install-steps li {
  font-size: 13px;
  line-height: 1.5;
}
.install-steps strong {
  color: var(--text);
  font-weight: 600;
}

/* Lead-capture form */
.lead-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.lead-input {
  width: 100%;
  padding: 13px 15px;
  font-size: 15px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  outline: none;
}
.lead-input::placeholder {
  color: var(--subtle);
}
.lead-input:focus {
  border-color: rgba(10, 132, 255, 0.65);
  background: rgba(10, 132, 255, 0.07);
}
select.lead-input {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236f7885' d='M6 8 0 2l1.4-1.4L6 5.2 10.6.6 12 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 38px;
}
select.lead-input option {
  color: #111;
}
.lead-form .btn {
  width: 100%;
}
.lead-note {
  font-size: 12px;
  color: var(--subtle);
}
.lead-done {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lead-thanks {
  font-size: 15px;
  font-weight: 600;
  color: var(--green);
}
.lead-sub {
  font-size: 13.5px;
  color: var(--muted);
}
.lead-sub a {
  color: var(--blue-2);
  font-weight: 600;
}
.lead-sub a:hover {
  text-decoration: underline;
}

/* ---- FAQ ---- */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-list details {
  padding: 4px 20px;
}
.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary::after {
  content: '+';
  color: var(--subtle);
  font-weight: 400;
  font-size: 20px;
}
.faq-list details[open] summary::after {
  content: '–';
}
.faq-list details p {
  padding: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
}

/* ---- Closing ---- */
.closing {
  text-align: center;
}
.closing h2 {
  margin-bottom: 26px;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 34px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--subtle);
  font-size: 13.5px;
}
.foot-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
}
.foot-brand img {
  border-radius: 6px;
}
.foot-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.foot-links a:hover {
  color: var(--text);
}
.foot-copy {
  margin-left: auto;
}

/* ---- Small screens ---- */
@media (max-width: 640px) {
  .nav-links a:not(.btn) {
    display: none;
  }
  .foot-copy {
    margin-left: 0;
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn,
  .feature-grid article {
    transition: none;
  }
}
