/* Rider OS web. Same palette as the app: night ground, one orange accent.
   Dark only, on purpose — the app is used at night and the site should look
   like the product, not like a different company's landing page. */

:root {
  --bg: #0a0c0f;
  --bg-soft: #0e1116;
  --surface: #14181f;
  --surface-raised: #1c222c;
  --border: #222937;
  --border-bright: #333d4f;
  --text: #f4f6f8;
  --muted: #98a2b3;
  --faint: #6b7686;
  --accent: #ff6a00;
  --accent-soft: rgba(255, 106, 0, 0.12);
  --danger: #ff3b30;
  --ok: #30d158;
  --max: 68rem;
  --radius: 16px;
  --radius-lg: 22px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: var(--accent); }
img { max-width: 100%; }

h1, h2, h3 { letter-spacing: -0.022em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 46rem; }

/* Keyboard users must be able to see where they are. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.7rem 1rem;
  z-index: 100;
  border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

/* ---------- header ---------- */

header.site {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(10, 12, 15, 0.82);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  z-index: 20;
}

.bar { display: flex; align-items: center; gap: 0.7rem; padding: 0.9rem 0; }
.bar .brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); }
.bar .brand img { width: 32px; height: 32px; }
.bar .brand strong { font-size: 1.05rem; letter-spacing: -0.02em; }

.bar nav { margin-left: auto; display: flex; gap: 1.4rem; align-items: center; }
.bar nav a { color: var(--muted); text-decoration: none; font-size: 0.94rem; }
.bar nav a:hover { color: var(--text); }

.lang-link {
  background: var(--surface-raised);
  border: 1px solid var(--border-bright);
  color: var(--muted) !important;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.82rem !important;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.lang-link:hover { color: var(--text) !important; border-color: var(--faint); }

@media (max-width: 44rem) {
  .bar nav { gap: 0.9rem; }
  .bar nav a.hide-sm { display: none; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 4.5rem 0 3rem;
  overflow: hidden;
}
@media (max-width: 44rem) {
  .hero { padding: 2.5rem 0 2rem; }
  .hero-grid { gap: 2rem; }
  section.block { padding: 3rem 0; }
}

/* One warm light source behind the headline, like a headlamp. */
.hero::before {
  content: "";
  position: absolute;
  top: -18rem;
  left: 50%;
  width: 60rem;
  height: 34rem;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 106, 0, 0.16), transparent 70%);
  pointer-events: none;
}

.hero > * { position: relative; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 106, 0, 0.28);
  color: #ffb37a;
  border-radius: 999px;
  padding: 0.32rem 0.85rem;
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 1.4rem;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.18);
}

h1 {
  font-size: clamp(2.3rem, 6.2vw, 3.9rem);
  line-height: 1.06;
  margin: 0 0 1.1rem;
  max-width: 18em;
}
h1 .hl { color: var(--accent); }

.lede {
  font-size: clamp(1.08rem, 2.2vw, 1.24rem);
  color: var(--muted);
  max-width: 38rem;
  margin: 0 0 2rem;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 650;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.cta.secondary {
  background: var(--surface-raised);
  color: var(--text);
  border-color: var(--border-bright);
}

.note { color: var(--faint); font-size: 0.9rem; margin-top: 1.1rem; }

/* ---------- the illustration beside the hero ---------- */

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
}

.scene {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-soft) 100%);
  padding: 1rem;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9);
}
.scene svg { display: block; width: 100%; height: auto; border-radius: 14px; }
.scene figcaption {
  color: var(--faint);
  font-size: 0.8rem;
  text-align: center;
  padding: 0.7rem 0 0.2rem;
}

/* ---------- strip of plain facts ---------- */

.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1rem 0 4rem;
}
.strip div { background: var(--bg-soft); padding: 1.2rem 1.3rem; }
.strip dt { color: var(--text); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em; }
.strip dd { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.9rem; }

/* ---------- sections ---------- */

section.block { padding: 4rem 0; border-top: 1px solid var(--border); }

/* The header is sticky, so anything jumped to needs room above it. */
[id] { scroll-margin-top: 5rem; }
section.block > .wrap > h2 {
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  margin: 0 0 0.75rem;
  max-width: 20em;
}
.section-lede { color: var(--muted); max-width: 40rem; margin: 0 0 2.5rem; }

.kicker {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.7rem;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--border-bright); transform: translateY(-2px); }
.card .ico {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 106, 0, 0.25);
  margin-bottom: 0.9rem;
}
.card .ico svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin: 0 0 0.4rem; font-size: 1.06rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.96rem; }
.card .soon {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  border: 1px solid var(--border-bright);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

/* numbered steps */
.steps { counter-reset: step; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.steps li {
  list-style: none;
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.9rem;
}
.steps h3 { margin: 0 0 0.35rem; font-size: 1.04rem; }
.steps p { margin: 0; color: var(--muted); font-size: 0.96rem; }
.steps { padding: 0; margin: 0; }

/* two-column "what it replaces" */
.compare { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.compare > div { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; background: var(--surface); }
.compare h3 { margin: 0 0 0.9rem; font-size: 1rem; color: var(--muted); font-weight: 600; }
.compare ul { margin: 0; padding: 0; list-style: none; }
.compare li { padding: 0.45rem 0 0.45rem 1.7rem; position: relative; color: var(--muted); font-size: 0.96rem; }
.compare li::before { position: absolute; left: 0; top: 0.45rem; }
.compare .before li::before { content: "×"; color: var(--faint); font-size: 1.1rem; line-height: 1.4; }
.compare .after { border-color: rgba(255, 106, 0, 0.3); background: linear-gradient(180deg, rgba(255,106,0,0.05), var(--surface)); }
.compare .after h3 { color: var(--accent); }
.compare .after li { color: var(--text); }
.compare .after li::before { content: "✓"; color: var(--accent); font-weight: 700; }

/* safety callout */
.callout {
  border: 1px solid rgba(255, 59, 48, 0.35);
  background: rgba(255, 59, 48, 0.07);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  margin: 2rem 0 0;
}
.callout strong { color: #ff9d96; }
.callout p { margin: 0; color: var(--muted); font-size: 0.96rem; }

/* FAQ */
.faq { border-top: 1px solid var(--border); }
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 1.15rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  margin-left: auto;
  color: var(--accent);
  font-size: 1.3rem;
  line-height: 1;
  flex: none;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 0.8rem 0 0; font-size: 0.97rem; }

/* closing call to action */
.final {
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(255, 106, 0, 0.14), transparent 60%),
    var(--surface);
  padding: 3rem 2rem;
  text-align: center;
  margin: 4rem 0;
}
.final h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 0.8rem; }
.final p { color: var(--muted); max-width: 34rem; margin: 0 auto 1.8rem; }
.final .actions { justify-content: center; }

/* ---------- long-form documents ---------- */

section.doc { padding: 3.5rem 0 4rem; max-width: 46rem; }
section.doc h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); max-width: none; }
section.doc h2 { font-size: 1.22rem; margin: 2.6rem 0 0.7rem; }
section.doc h3 { font-size: 1.02rem; margin: 1.8rem 0 0.5rem; }
section.doc p, section.doc li { color: var(--muted); }
section.doc strong { color: var(--text); }
section.doc ul, section.doc ol { padding-left: 1.25rem; }
section.doc li { margin-bottom: 0.45rem; }

.updated { color: var(--faint); font-size: 0.9rem; }

.summary-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.2rem 1.4rem;
  margin: 1.5rem 0 2rem;
}
.summary-box p { margin: 0; }

.toc {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  margin: 2rem 0;
}
.toc p { margin: 0 0 0.6rem; color: var(--text); font-weight: 600; font-size: 0.95rem; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin-bottom: 0.3rem; font-size: 0.95rem; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--accent); }

table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: 0.94rem; }
th, td { text-align: left; padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--text); font-weight: 600; }
td { color: var(--muted); }
.table-scroll { overflow-x: auto; }

/* ---------- utility pages: invite, confirm, 404 ---------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  margin: 3rem auto;
  max-width: 34rem;
  text-align: center;
}
.panel img.mark { width: 56px; height: 56px; margin-bottom: 1.2rem; }
.panel h1 { font-size: clamp(1.5rem, 4vw, 2rem); margin: 0 0 0.6rem; max-width: none; }
.panel .code {
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  margin: 1rem 0;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.panel .meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.5rem; }

.err-code {
  font-size: clamp(4rem, 18vw, 8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--surface-raised);
  margin: 0;
}

/* ---------- footer ---------- */

footer.site {
  border-top: 1px solid var(--border);
  padding: 3rem 0 3.5rem;
  color: var(--faint);
  font-size: 0.92rem;
  background: var(--bg-soft);
}
.foot-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  margin-bottom: 2.5rem;
}
.foot-grid h4 {
  margin: 0 0 0.8rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.foot-grid a { display: block; color: var(--muted); text-decoration: none; padding: 0.28rem 0; }
.foot-grid a:hover { color: var(--accent); }
.foot-brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.7rem; }
.foot-brand img { width: 28px; height: 28px; }
.foot-brand strong { color: var(--text); }
.foot-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.5rem;
  align-items: center;
}
.foot-bottom p { margin: 0; }
.foot-bottom a { color: var(--muted); margin-right: 1.1rem; }
.foot-bottom a:last-child { margin-right: 0; }

/* ---------- bilingual utility pages keep the old toggle ---------- */

[data-lang] { display: none; }
[data-lang].on { display: block; }
span[data-lang].on, a[data-lang].on { display: inline; }

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