/* rupu.sh — landing site
   Brand: the Auth-page language (near-black #0a0a0a, off-white, the ∞ glyph,
   "Don't code it, rupu it.") with violet #7c3aed as the accent that ties it to
   the product. Hand-written, no build step. */

:root {
  --bg: #0a0a0a;
  --bg-soft: #111113;
  --ink: #f5f5f5;
  --ink-dim: rgba(245, 245, 245, 0.62);
  --ink-mute: rgba(245, 245, 245, 0.40);
  --line: rgba(245, 245, 245, 0.10);
  --line-soft: rgba(245, 245, 245, 0.06);
  --violet: #7c3aed;
  --violet-lite: #a78bfa;
  --max: 1080px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

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

/* ── Top bar ─────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
  backdrop-filter: blur(8px);
  background: linear-gradient(to bottom, rgba(10,10,10,0.7), rgba(10,10,10,0));
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 400; letter-spacing: 0.02em; }
.brand .mark { font-size: 22px; font-weight: 200; color: var(--violet-lite); line-height: 1; }
.brand .name { font-size: 15px; }
.nav .soon {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-mute); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 120px 28px 80px;
  overflow: hidden;
}
/* soft violet glow behind the glyph */
.hero::before {
  content: ""; position: absolute; top: 30%; left: 50%; transform: translate(-50%, -50%);
  width: min(80vw, 720px); height: min(80vw, 720px);
  background: radial-gradient(circle, rgba(124,58,237,0.30), rgba(124,58,237,0.04) 55%, transparent 70%);
  filter: blur(20px); pointer-events: none; z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

.glyph {
  font-size: clamp(8rem, 30vw, 22rem); line-height: 0.9; font-weight: 200;
  letter-spacing: -0.03em; margin: 0; user-select: none;
  background: linear-gradient(100deg, #ffffff 0%, var(--violet-lite) 45%, var(--violet) 60%, #ffffff 100%);
  background-size: 220% auto; -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: shimmer 9s linear infinite;
}
@keyframes shimmer { to { background-position: 220% center; } }

.tagline {
  font-size: clamp(1.4rem, 4vw, 2.4rem); font-weight: 200; letter-spacing: 0.01em;
  margin: 1.5rem 0 0; color: var(--ink);
}
.subtagline {
  margin: 1.1rem auto 0; max-width: 30ch;
  font-size: clamp(1rem, 2.2vw, 1.15rem); font-weight: 300; color: var(--ink-dim);
}
.cta-row { margin-top: 2.4rem; display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 14px; letter-spacing: 0.02em; padding: 12px 22px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink);
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}
.btn:hover { border-color: rgba(167,139,250,0.6); background: rgba(124,58,237,0.10); transform: translateY(-1px); }
.btn.primary {
  border-color: transparent;
  background: linear-gradient(100deg, var(--violet), var(--violet-lite));
  color: #fff; font-weight: 500;
}
.btn.primary:hover { filter: brightness(1.08); }

.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  font-size: 20px; color: var(--ink-mute); animation: bob 2.4s ease-in-out infinite; z-index: 1;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ── Generic section ─────────────────────────────────────── */
section { padding: clamp(72px, 12vw, 140px) 0; border-top: 1px solid var(--line-soft); }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--violet-lite); margin: 0 0 18px;
}
.lede { font-size: clamp(1.5rem, 3.4vw, 2.5rem); font-weight: 200; letter-spacing: -0.01em; line-height: 1.3; margin: 0; max-width: 22ch; }
.lede .accent { color: var(--violet-lite); }
.section-note { margin: 22px 0 0; max-width: 56ch; font-weight: 300; color: var(--ink-dim); font-size: 1.05rem; }

/* ── Capabilities grid ───────────────────────────────────── */
.cap-head { display: flex; flex-direction: column; gap: 0; margin-bottom: 48px; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  position: relative; padding: 28px 26px 30px; border: 1px solid var(--line);
  border-radius: 18px; background: linear-gradient(180deg, var(--bg-soft), var(--bg));
  transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.card:hover {
  border-color: rgba(167,139,250,0.45); transform: translateY(-3px);
  box-shadow: 0 18px 50px -28px rgba(124,58,237,0.6);
}
.card .ic { font-size: 22px; color: var(--violet-lite); line-height: 1; }
.card h3 { margin: 16px 0 8px; font-size: 1.2rem; font-weight: 500; letter-spacing: 0.01em; }
.card p { margin: 0; color: var(--ink-dim); font-weight: 300; font-size: 0.98rem; }

/* ── Steps / how ─────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; counter-reset: step; }
.step { padding-top: 22px; border-top: 1px solid var(--line); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: var(--violet-lite);
}
.step h4 { margin: 12px 0 6px; font-size: 1.05rem; font-weight: 500; }
.step p { margin: 0; color: var(--ink-dim); font-weight: 300; font-size: 0.95rem; }

/* ── Closing CTA ─────────────────────────────────────────── */
.closing { text-align: center; }
.closing .mark { font-size: clamp(3.5rem, 10vw, 6rem); font-weight: 200; color: var(--violet-lite); line-height: 1; }
.closing h2 { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 200; margin: 18px 0 0; letter-spacing: 0.01em; }
.closing p { color: var(--ink-dim); font-weight: 300; margin: 14px 0 0; }

/* ── Footer ──────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line-soft); padding: 40px 0 56px; }
.foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
        font-size: 13px; color: var(--ink-mute); }
.foot a { color: var(--ink-dim); transition: color .2s ease; }
.foot a:hover { color: var(--ink); }
.foot .links { display: flex; gap: 20px; }

/* ── Scroll reveal ───────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 720px) {
  .cards, .steps { grid-template-columns: 1fr; }
  .nav .soon { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ════════════════════════════════════════════════════════════
   Shared: nav links, download, code, diagrams, callouts, docs.
   ════════════════════════════════════════════════════════════ */

.nav .navlinks { display: flex; align-items: center; gap: 22px; }
.nav .navlinks a { font-size: 14px; color: var(--ink-dim); transition: color .2s ease; }
.nav .navlinks a:hover, .nav .navlinks a.active { color: var(--ink); }
.nav .navlinks .dl { color: var(--violet-lite); }
@media (max-width: 640px) { .nav .navlinks a.hide-sm { display: none; } }

/* ── Download ────────────────────────────────────────────── */
.download { text-align: center; }
.dl-card {
  margin: 40px auto 0; max-width: 560px; padding: 34px 30px;
  border: 1px solid var(--line); border-radius: 20px;
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
}
.dl-ver { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; color: var(--violet-lite); }
.dl-primary { margin-top: 16px; }
.dl-sub { margin-top: 14px; font-size: 13px; color: var(--ink-mute); }
.dl-or { margin: 26px 0 10px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); }
.code-line {
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  font-family: var(--mono); font-size: 13px; color: var(--ink);
  background: #000; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-align: left;
}
.code-line code { white-space: nowrap; overflow-x: auto; }
.copy-btn {
  flex-shrink: 0; font-family: var(--sans); font-size: 12px; color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; background: transparent; cursor: pointer;
  transition: color .2s, border-color .2s;
}
.copy-btn:hover { color: var(--ink); border-color: rgba(167,139,250,0.5); }

/* ── Code blocks (docs) ──────────────────────────────────── */
pre.code {
  margin: 18px 0; padding: 18px 20px; background: #000; border: 1px solid var(--line);
  border-radius: 14px; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.6;
  color: #e6e6e6;
}
pre.code .c { color: var(--ink-mute); }      /* comment */
pre.code .k { color: var(--violet-lite); }   /* key / keyword */
pre.code .s { color: #86efac; }              /* string */
pre.code .v { color: #fcd34d; }              /* value / expr */
code.inline {
  font-family: var(--mono); font-size: 0.9em; background: rgba(245,245,245,0.07);
  border: 1px solid var(--line-soft); border-radius: 6px; padding: 1px 6px; color: var(--violet-lite);
}

/* ── Callouts ────────────────────────────────────────────── */
.callout {
  margin: 22px 0; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line);
  border-left: 3px solid var(--violet); background: rgba(124,58,237,0.06);
  font-size: 0.95rem; font-weight: 300; color: var(--ink-dim);
}
.callout strong { color: var(--ink); font-weight: 500; }

/* ── Diagram figures ─────────────────────────────────────── */
figure.diagram { margin: 28px 0; padding: 24px; border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(180deg, var(--bg-soft), var(--bg)); }
figure.diagram svg { display: block; width: 100%; height: auto; }
figure.diagram figcaption { margin-top: 14px; font-size: 13px; color: var(--ink-mute); text-align: center; }
/* shared SVG diagram tokens (use these classes inside inline <svg>) */
.d-box { fill: #111113; stroke: rgba(245,245,245,0.16); }
.d-box-accent { fill: rgba(124,58,237,0.12); stroke: rgba(167,139,250,0.6); }
.d-label { fill: #f5f5f5; font-family: var(--sans); font-size: 13px; font-weight: 400; }
.d-sub { fill: rgba(245,245,245,0.55); font-family: var(--mono); font-size: 11px; }
.d-edge { stroke: rgba(167,139,250,0.55); stroke-width: 1.6; fill: none; }
.d-arrow { fill: rgba(167,139,250,0.8); }

/* ── Docs layout ─────────────────────────────────────────── */
.docs-shell { display: grid; grid-template-columns: 248px 1fr; gap: 0; min-height: 100svh; }
.docs-side {
  position: sticky; top: 0; align-self: start; height: 100svh; overflow-y: auto;
  border-right: 1px solid var(--line-soft); padding: 26px 22px; background: var(--bg);
}
.docs-side .brand { margin-bottom: 26px; }
.docs-side .grp { margin: 20px 0 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-mute); }
.docs-side a.item { display: block; padding: 7px 12px; border-radius: 8px; font-size: 14px; color: var(--ink-dim);
  transition: background .18s, color .18s; }
.docs-side a.item:hover { background: rgba(245,245,245,0.05); color: var(--ink); }
.docs-side a.item.active { background: rgba(124,58,237,0.14); color: #fff; }
.docs-main { min-width: 0; padding: 64px clamp(28px, 6vw, 88px) 100px; max-width: 920px; }
.docs-main h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 200; letter-spacing: -0.01em; margin: 0 0 8px; }
.docs-main h2 { font-size: 1.5rem; font-weight: 400; margin: 52px 0 8px; padding-top: 12px; }
.docs-main h3 { font-size: 1.12rem; font-weight: 500; margin: 32px 0 6px; }
.docs-main p, .docs-main li { color: var(--ink-dim); font-weight: 300; font-size: 1.02rem; }
.docs-main strong { color: var(--ink); font-weight: 500; }
.docs-main a.link { color: var(--violet-lite); border-bottom: 1px solid rgba(167,139,250,0.3); }
.docs-main a.link:hover { border-color: var(--violet-lite); }
.docs-main .intro { font-size: 1.2rem; font-weight: 300; color: var(--ink); margin-top: 4px; }
.docs-main table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.95rem; }
.docs-main th, .docs-main td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.docs-main th { color: var(--ink-mute); font-weight: 500; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; }
.docs-main td { color: var(--ink-dim); font-weight: 300; }
.docs-main td code, .docs-main th code { font-family: var(--mono); color: var(--violet-lite); font-size: 0.88em; }
.doc-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line); }
.doc-nav a { font-size: 14px; color: var(--ink-dim); } .doc-nav a:hover { color: var(--ink); }
.docs-toggle { display: none; }

/* docs cards (hub index) */
.doc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 28px; }
.doc-grid a.card { display: block; }
.doc-grid .card h3 { margin: 10px 0 6px; }

@media (max-width: 860px) {
  .docs-shell { grid-template-columns: 1fr; }
  .docs-side { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--line-soft); }
  .doc-grid { grid-template-columns: 1fr; }
}

/* ── Landing: "works with your stack" showcase ───────────── */
.stack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.stack-col {
  padding: 24px 22px; border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
}
.stack-col h3 { margin: 0 0 4px; font-size: 1.05rem; font-weight: 500; }
.stack-col .blurb { margin: 0 0 16px; font-size: 0.9rem; font-weight: 300; color: var(--ink-mute); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 13px; font-weight: 300; color: var(--ink); padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(245,245,245,0.03);
}
.chip.accent { border-color: rgba(167,139,250,0.45); color: var(--violet-lite); background: rgba(124,58,237,0.08); }
.chip .soon { color: var(--ink-mute); font-size: 11px; }
@media (max-width: 760px) { .stack-grid { grid-template-columns: 1fr; } }
