/* Renso — refined palette, MOBILE-FIRST.
   Base rules (no media query) are the small-screen layout: single-column
   stacks, a wrapping nav, and type that fits a 320px phone. Two
   `@media (min-width: …)` blocks at the very end progressively restore the
   tablet and the original 1440px desktop artboard verbatim, so desktop is
   unchanged while phones get a first-class layout.
   Inspiration: x.ai (quiet, ultra-minimal, generous space, hairline
   rules, large restrained type) + Robinhood (confident product density,
   clean data panels). Shared tokens, per-artboard overrides via
   [data-variant]. */

:root {
  --r-bg: #0a0a0a;
  --r-ink: #ffffff;
  --r-ink-2: rgba(255,255,255,0.72);
  --r-ink-3: rgba(255,255,255,0.48);
  --r-ink-4: rgba(255,255,255,0.28);
  --r-line: rgba(255,255,255,0.08);
  --r-line-2: rgba(255,255,255,0.14);
  --r-chip: rgba(255,255,255,0.04);
  --r-accent: #c8ff4a;          /* Robinhood-adjacent signal green */
  --r-accent-ink: #0a0a0a;
  --r-sans: "Inter Tight", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  /* Gutter shrinks to 20px on phones (was 40px) so narrow screens keep
     more content width; 9vw still dominates from tablet up, so desktop
     padding is unchanged. */
  --r-gutter: clamp(20px, 9vw, 160px);
}

[data-variant="light"] {
  --r-bg: #fafaf7;
  --r-ink: #0a0a0a;
  --r-ink-2: rgba(10,10,10,0.72);
  --r-ink-3: rgba(10,10,10,0.48);
  --r-ink-4: rgba(10,10,10,0.24);
  --r-line: rgba(10,10,10,0.08);
  --r-line-2: rgba(10,10,10,0.14);
  --r-chip: rgba(10,10,10,0.04);
  --r-accent: #0a0a0a;
  --r-accent-ink: #ffffff;
  --r-signal: #15803d;
}

[data-variant="editorial"] {
  --r-bg: #f5f3ee;
  --r-ink: #111111;
  --r-ink-2: rgba(17,17,17,0.7);
  --r-ink-3: rgba(17,17,17,0.5);
  --r-ink-4: rgba(17,17,17,0.25);
  --r-line: rgba(17,17,17,0.1);
  --r-line-2: rgba(17,17,17,0.18);
  --r-chip: rgba(17,17,17,0.04);
  --r-accent: #c8ff4a;
  --r-accent-ink: #111;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body.renso {
  background: var(--r-bg);
  color: var(--r-ink);
  font-family: var(--r-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  /* Safety net: never let a stray wide element scroll the page sideways
     on a phone. */
  overflow-x: hidden;
}

.r-shell {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--r-gutter);
}

/* ─── nav (mobile: brand + CG on row 1, links wrap onto row 2) ─────── */
.r-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 16px;
  padding-block: 16px;
  border-bottom: 1px solid var(--r-line);
}

.r-brand {
  order: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--r-ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.r-brand img { width: 32px; height: 32px; display: block; }
.r-brand--lg img { width: 56px; height: 56px; display: block; }

.r-nav__cg { order: 2; display: inline-flex; align-items: center; }
.r-nav__cg img { width: 27px; height: 27px; display: block; transition: opacity 160ms ease; }
.r-nav__cg:hover img { opacity: 0.55; }

.r-brand .sub {
  color: var(--r-ink-3);
  font-weight: 500;
  padding-left: 10px;
  margin-left: 4px;
  border-left: 1px solid var(--r-line-2);
}

.r-navlinks {
  order: 3;
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.r-navlinks a {
  color: var(--r-ink-2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 160ms ease;
}

.r-navlinks a:hover, .r-navlinks a.active { color: var(--r-ink); }

.r-navcta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--r-accent);
  color: var(--r-accent-ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.005em;
}

.r-navcta .arrow { font-size: 15px; line-height: 1; transform: translateY(-0.5px); }

/* ─── typography primitives ───────────────────────────── */
.r-eyebrow {
  display: inline-block;
  font-family: var(--r-mono);
  color: var(--r-ink-3);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.r-display {
  /* Lower min (was 56px) so long words like "architecture." fit a 320px
     screen without horizontal scroll; 8vw still governs from ~475px up,
     so tablet/desktop sizing is unchanged. */
  font-size: clamp(38px, 8vw, 128px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 0;
  overflow-wrap: break-word;
}

.r-display em {
  font-style: normal;
  color: var(--r-ink-3);
}

.r-h2 {
  font-size: clamp(30px, 5vw, 72px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0;
  overflow-wrap: break-word;
}

.r-h3 {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0;
}

.r-lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--r-ink-2);
  max-width: 56ch;
  margin: 0;
  letter-spacing: -0.005em;
}

.r-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--r-ink-2);
  margin: 0;
}

.r-mono {
  font-family: var(--r-mono);
  font-size: 12px;
  color: var(--r-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ─── buttons ─────────────────────────────────────────── */
.r-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.r-btn--primary {
  background: var(--r-accent);
  color: var(--r-accent-ink);
}

.r-btn--primary:hover { transform: translateY(-1px); }

.r-btn--ghost {
  background: transparent;
  color: var(--r-ink);
  border: 1px solid var(--r-line-2);
}

.r-btn--ghost:hover { background: var(--r-chip); }

.r-btn .arrow {
  font-family: var(--r-sans);
  font-weight: 400;
  transform: translateY(-0.5px);
}

.r-btn .btn-mark { width: 18px; height: 18px; flex: none; margin-left: -2px; }

/* ─── hero (mobile: stacked) ──────────────────────────── */
.r-hero {
  padding: clamp(48px, 9vh, 80px) 0 clamp(40px, 7vh, 64px);
}

.r-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.r-hero__meta .right {
  display: flex;
  gap: 32px;
  color: var(--r-ink-3);
  font-family: var(--r-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.r-hero__meta .right span::before {
  content: "◦ ";
  color: var(--r-ink-4);
}

.r-hero__sub {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 32px;
}

.r-hero__actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  justify-self: start;
  justify-content: flex-start;
}

/* ─── section scaffolding (mobile: stacked head) ──────── */
.r-sec {
  padding: clamp(48px, 10vw, 140px) 0;
  border-top: 1px solid var(--r-line);
}

.r-sec__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: clamp(40px, 8vw, 96px);
}

.r-sec__head .r-eyebrow { padding-top: 6px; }

/* ─── stat rail (mobile: stacked) ─────────────────────── */
.r-rail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--r-line);
  border-bottom: 1px solid var(--r-line);
}

.r-rail__cell {
  padding: 24px 0;
  border-bottom: 1px solid var(--r-line);
}

.r-rail__cell:last-child { border-bottom: none; }

.r-rail__cell .k {
  display: block;
  font-family: var(--r-mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--r-ink-3);
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.r-rail__cell .v {
  font-size: clamp(36px, 4.2vw, 56px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}

.r-rail__cell .v em {
  font-style: normal;
  color: var(--r-ink-3);
  font-weight: 400;
}

/* ─── wide split feature list (mobile: one column) ────── */
.r-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.r-feature {
  padding-top: 24px;
  border-top: 1px solid var(--r-line);
  max-width: 40ch;
}

.r-feature .idx {
  display: inline-block;
  font-family: var(--r-mono);
  color: var(--r-ink-3);
  font-size: 11px;
  margin-bottom: 28px;
}

.r-feature h3 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 12px;
}

.r-feature p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--r-ink-2);
}

/* ─── list rows (mobile: stacked) ─────────────────────── */
.r-rows {
  display: grid;
  border-top: 1px solid var(--r-line);
}

.r-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--r-line);
}

.r-row .num {
  font-family: var(--r-mono);
  color: var(--r-ink-3);
  font-size: 12px;
  padding-top: 0;
}

.r-row h4 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.r-row p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--r-ink-2);
  max-width: none;
}

.r-row .tag {
  justify-self: start;
  font-family: var(--r-mono);
  font-size: 11px;
  color: var(--r-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 4px;
}

/* ─── massive product card (mobile: stacked) ──────────── */
.r-showcase {
  border: 1px solid var(--r-line);
  border-radius: 20px;
  padding: clamp(28px, 7vw, 64px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
}

.r-showcase__copy .r-eyebrow { margin-bottom: 32px; }

.r-showcase__copy h2 {
  font-size: clamp(30px, 4vw, 56px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin: 0 0 24px;
}

.r-showcase__copy p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--r-ink-2);
  max-width: 42ch;
  margin: 0 0 36px;
}

.r-showcase__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* terminal-ish preview */
.r-preview {
  aspect-ratio: 4 / 3.2;
  background: var(--r-chip);
  border: 1px solid var(--r-line);
  border-radius: 16px;
  padding: 20px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
  font-family: var(--r-mono);
  font-size: 12px;
  color: var(--r-ink-2);
}

.r-preview__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--r-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
}

.r-preview__head .dot {
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--r-accent);
  margin-right: 8px;
  vertical-align: middle;
}

[data-variant="light"] .r-preview__head .dot { background: var(--r-signal, #15803d); }

.r-preview__body {
  display: grid;
  gap: 10px;
  align-content: start;
  line-height: 1.6;
}

.r-preview__body .muted { color: var(--r-ink-4); }
.r-preview__body .acc { color: var(--r-accent); }
[data-variant="light"] .r-preview__body .acc { color: var(--r-ink); font-weight: 600; }

/* ─── quiet CTA band (mobile: stacked) ────────────────── */
.r-cta {
  padding: clamp(64px, 16vh, 180px) 0;
  border-top: 1px solid var(--r-line);
  text-align: left;
}

.r-cta__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}

.r-cta h2 {
  font-size: clamp(34px, 6.5vw, 104px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.96;
  margin: 0;
  overflow-wrap: break-word;
}

.r-cta__aside {
  display: grid;
  gap: 20px;
  padding-bottom: 8px;
}

.r-cta__aside p { max-width: 36ch; }

/* ─── footer (mobile: stacked) ────────────────────────── */
.r-foot {
  padding: 36px 0 44px;
  border-top: 1px solid var(--r-line);
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 18px;
}

.r-foot .copy {
  font-family: var(--r-mono);
  font-size: 11px;
  color: var(--r-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.r-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
}

.r-foot nav a {
  font-size: 13px;
  color: var(--r-ink-2);
  text-decoration: none;
}

.r-foot nav a:hover { color: var(--r-ink); }

/* ─── data / market table (mobile: stacked cards) ─────── */
.r-table {
  border-top: 1px solid var(--r-line);
  border-bottom: 1px solid var(--r-line);
}

.r-table__row {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px 14px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--r-line);
}

.r-table__row:last-child { border-bottom: none; }

/* The header row labels columns; meaningless once the row is stacked. */
.r-table__row.head { display: none; }

.r-table__row .glyph {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--r-chip);
  display: grid;
  place-items: center;
  font-family: var(--r-mono);
  color: var(--r-ink-2);
  font-size: 12px;
}

.r-table__row .name {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.r-table__row .name img { width: 24px; height: 24px; flex: none; }

.r-table__row .desc {
  grid-column: 1 / -1;
  font-size: 13.5px;
  color: var(--r-ink-2);
  line-height: 1.45;
}

.r-table__row .status {
  grid-column: 1 / -1;
  font-family: var(--r-mono);
  font-size: 11px;
  color: var(--r-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.r-table__row .status.live::before {
  content: "●  ";
  color: var(--r-accent);
}
[data-variant="light"] .r-table__row .status.live::before { color: #0a8a2e; }

.r-table__row .right {
  grid-column: 1 / -1;
  text-align: left;
  font-family: var(--r-mono);
  font-size: 12.5px;
  color: var(--r-ink-2);
  letter-spacing: 0.02em;
}

/* ─── roadmap suite banner ────────────────────────────── */
.r-roadmap-banner {
  margin: 0 0 40px;
  border: 1px solid var(--r-line);
  border-radius: 24px;
  overflow: hidden;
  background: #0B1020;
}
.r-roadmap-banner img {
  display: block;
  width: 100%;
  height: clamp(180px, 44vw, 400px);
  object-fit: cover;
  object-position: center;
}

/* linked product name in roadmap table */
.r-table__row .name a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--r-line-2);
  transition: border-color 160ms ease, color 160ms ease;
}
.r-table__row .name a:hover { border-bottom-color: currentColor; }
.r-table__row .name a .ext { font-size: 0.78em; opacity: 0.55; }
.r-roadmap-cta { margin-top: 40px; }

/* ─── logo mark sizing helpers ────────────────────────── */
.r-mark { width: 26px; height: 26px; display: inline-block; }
.r-mark--lg { width: 64px; height: 64px; }

/* ════════════════════════════════════════════════════════════════════
   ≥768px — tablet: single-row nav, two-column content, generous spacing.
   ════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  /* Nav back to one row (brand · links · CG), original spacing. */
  .r-nav { flex-wrap: nowrap; height: 72px; padding-block: 0; gap: 0; }
  .r-brand, .r-nav__cg, .r-navlinks { order: 0; }
  .r-navlinks { flex-basis: auto; flex-wrap: nowrap; gap: 36px; }

  .r-hero { padding: clamp(80px, 14vh, 180px) 0 clamp(80px, 12vh, 140px); }
  .r-hero__meta { margin-bottom: 56px; }
  .r-hero__sub { grid-template-columns: 1fr 1fr; gap: 64px; align-items: end; margin-top: 56px; }
  .r-hero__actions { justify-self: end; justify-content: flex-end; }

  .r-sec__head { grid-template-columns: 0.4fr 1.4fr; gap: 64px; margin-bottom: clamp(56px, 8vw, 96px); }

  .r-rail { grid-template-columns: repeat(3, 1fr); }
  .r-rail__cell { padding: 32px; border-right: 1px solid var(--r-line); border-bottom: none; }
  .r-rail__cell:first-child { padding-left: 0; }
  .r-rail__cell:last-child { border-right: none; padding-right: 0; }

  .r-features { grid-template-columns: repeat(2, 1fr); gap: 40px 48px; }

  .r-showcase { grid-template-columns: 0.9fr 1.1fr; gap: 64px; padding: clamp(40px, 5vw, 64px); border-radius: 24px; }

  .r-cta { padding: clamp(96px, 16vh, 180px) 0; }
  .r-cta__grid { grid-template-columns: 1.2fr 1fr; gap: 96px; align-items: end; }
}

/* ════════════════════════════════════════════════════════════════════
   ≥1024px — desktop: the full 1440px artboard (dense multi-column grids).
   These values match the original desktop design exactly.
   ════════════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  .r-features { grid-template-columns: repeat(3, 1fr); gap: 48px 64px; }

  /* List rows: number · title · body · tag. */
  .r-row { grid-template-columns: 120px 1.6fr 2fr 120px; gap: 48px; padding: 32px 0; }
  .r-row .num { padding-top: 4px; }
  .r-row p { max-width: 48ch; }
  .r-row .tag { justify-self: end; padding-top: 6px; }

  /* Roadmap / principles table: restore the columnar layout + header. */
  .r-table__row { grid-template-columns: 36px 1.4fr 2.2fr 1fr 1fr; gap: 32px; padding: 22px 0; }
  .r-table__row.head {
    display: grid;
    font-family: var(--r-mono);
    font-size: 11px;
    color: var(--r-ink-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .r-table__row .desc, .r-table__row .status { grid-column: auto; }
  .r-table__row .right { grid-column: auto; text-align: right; }
  .r-table--principles .r-table__row { grid-template-columns: 36px 1.4fr 2.6fr; }

  .r-roadmap-banner img { height: clamp(220px, 30vw, 400px); }

  /* Footer back to one row (copy · nav). */
  .r-foot { grid-template-columns: 1fr auto; align-items: center; gap: 24px; padding: 48px 0 56px; }
  .r-foot nav { flex-wrap: nowrap; gap: 28px; }
}
