/* Runvale site. Identity: an architect's drawing on blueprint or drafting paper, marked up in safety orange. */

/* Fonts are self-hosted (latin subset, SIL Open Font License) so the page makes no third-party requests. */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; src: url(fonts/bricolage.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 100 700; font-display: swap; src: url(fonts/plex-sans.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/plex-mono-400.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/plex-mono-500.woff2) format('woff2'); }

:root {
  --bg: #F3EFE4;
  --bg-2: #FBF9F3;
  --bg-3: #EAE4D4;
  --ink: #0F2342;
  --muted: #4E5F78;
  --line: rgba(15, 35, 66, 0.14);
  --line-strong: rgba(15, 35, 66, 0.42);
  --grid: rgba(20, 70, 160, 0.055);
  --grid-major: rgba(20, 70, 160, 0.1);
  --accent: #C2410C;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(194, 65, 12, 0.1);
  --shadow: 0 1px 0 rgba(15, 35, 66, 0.04), 0 24px 60px -24px rgba(15, 35, 66, 0.28);
  --display: 'Bricolage Grotesque', 'Avenir Next', system-ui, sans-serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --radius: 6px;
  --wrap: 1180px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1A33;
    --bg-2: #0E2242;
    --bg-3: #0C1E3B;
    --ink: #E8EEF7;
    --muted: #9DB0CB;
    --line: rgba(160, 196, 255, 0.16);
    --line-strong: rgba(190, 215, 255, 0.42);
    --grid: rgba(120, 170, 255, 0.06);
    --grid-major: rgba(120, 170, 255, 0.11);
    --accent: #FF5A1F;
    --accent-ink: #1A0A03;
    --accent-soft: rgba(255, 90, 31, 0.12);
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 30px 80px -30px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0A1A33;
  --bg-2: #0E2242;
  --bg-3: #0C1E3B;
  --ink: #E8EEF7;
  --muted: #9DB0CB;
  --line: rgba(160, 196, 255, 0.16);
  --line-strong: rgba(190, 215, 255, 0.42);
  --grid: rgba(120, 170, 255, 0.06);
  --grid-major: rgba(120, 170, 255, 0.11);
  --accent: #FF5A1F;
  --accent-ink: #1A0A03;
  --accent-soft: rgba(255, 90, 31, 0.12);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 30px 80px -30px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 17px/1.65 var(--sans);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
code { font-family: var(--mono); font-size: 0.9em; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 860px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 19px/1 var(--display); text-decoration: none; letter-spacing: -0.01em; }
.brand-mark { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark .brand-axis { stroke: var(--accent); stroke-dasharray: 2 3; stroke-width: 1.6; }
.brand-mark .brand-dot { fill: var(--accent); stroke: none; }
.nav nav { display: flex; gap: 24px; margin-left: auto; }
.nav nav a { font-size: 15px; color: var(--muted); text-decoration: none; }
.nav nav a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--ink); cursor: pointer;
}
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.theme-toggle:hover { border-color: var(--line-strong); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
  font: 600 16px/1 var(--sans); text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn:hover { color: var(--accent-ink); transform: translateY(-2px); box-shadow: 0 10px 24px -10px var(--accent); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { color: var(--ink); border-color: var(--ink); box-shadow: none; }
.btn-small { padding: 10px 14px; font-size: 14px; }

/* Hero */
.hero { padding: 80px 0 96px; }
.hero-grid { max-width: 1360px; display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 56px; align-items: center; }
.proof { margin: 28px 0 0; font: 400 13px/1.6 var(--mono); color: var(--muted); max-width: 46ch; padding-left: 14px; border-left: 2px solid var(--accent); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 28px;
  font: 500 13px/1 var(--mono); letter-spacing: 0.04em; color: var(--muted);
  padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 {
  font-size: clamp(46px, 5.2vw, 80px); line-height: 1.02; font-weight: 700; letter-spacing: -0.025em;
  max-width: 12ch; margin-bottom: 26px; text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--muted); max-width: 58ch; margin: 0 0 36px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.stage { margin: 0; position: relative; }
.dim { position: relative; height: 26px; margin-bottom: 14px; color: var(--muted); }
.dim-line { position: absolute; inset: 8px 0 auto; width: 100%; height: 10px; overflow: visible; }
.dim-line path { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.dim-line .dim-ends { stroke: var(--accent); }
.dim-label {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  font: 500 12px/26px var(--mono); padding: 0 10px; background: var(--bg); color: var(--muted); white-space: nowrap;
}
.dim-label [data-width] { color: var(--accent); }

.window { border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow); }
.window-bar { display: flex; align-items: center; gap: 14px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--bg-3); }
.lights { display: flex; gap: 7px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid var(--line-strong); }
.lights i:first-child { background: var(--accent); border-color: var(--accent); }
.url {
  flex: 0 1 340px; margin: 0 auto; text-align: center; font: 12px/24px var(--mono); color: var(--muted);
  border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2);
  transform: translateX(-28px);
}
.demo { width: 100%; aspect-ratio: 16 / 9; background: #0c1729; }

.legend { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 28px; padding: 0; margin: 22px 0 0; font: 500 13px/1 var(--mono); color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 2px solid transparent; transition: color 0.3s ease, border-color 0.3s ease; }
.legend b { font-weight: 500; color: var(--line-strong); transition: color 0.3s ease; }
.legend li.on { color: var(--ink); border-color: var(--accent); }
.legend li.on b { color: var(--accent); }
.note { text-align: center; margin-top: 10px; font-size: 14px; color: var(--muted); }

/* Sections */
.section { padding: 120px 0; border-top: 1px solid var(--line); }
.section-alt { background: color-mix(in srgb, var(--bg-2) 70%, transparent); }
.section-head { max-width: 760px; margin-bottom: 64px; }
.kicker { font: 500 13px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
.section h2 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.05; text-wrap: balance; }
.section-sub { color: var(--muted); font-size: 18px; margin: 18px 0 0; }

/* Steps */
.steps { display: grid; gap: 120px; }
.step { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
.step-flip .step-text { order: 2; }
.step-no { display: block; font: 500 14px/1 var(--mono); color: var(--accent); margin-bottom: 18px; }
.step-no::after { content: ''; display: inline-block; width: 48px; height: 1px; background: var(--accent); vertical-align: middle; margin-left: 12px; }
.step h3 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.12; margin-bottom: 18px; }
.step p { color: var(--muted); margin: 0; }

.shot { position: relative; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow); }
.shot img { width: 100%; }

/* Crop marks: the drawing's registration corners, used on screenshots and cards */
.shot::before, .shot::after, .card::before, .card::after {
  content: ''; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border-color: var(--accent); border-style: solid; opacity: 0; transition: opacity 0.3s ease, transform 0.3s ease;
}
.shot::before, .card::before { top: 8px; left: 8px; border-width: 1.5px 0 0 1.5px; transform: translate(4px, 4px); }
.shot::after, .card::after { bottom: 8px; right: 8px; border-width: 0 1.5px 1.5px 0; transform: translate(-4px, -4px); }
.shot:hover::before, .shot:hover::after, .card:hover::before, .card:hover::after { opacity: 1; transform: none; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative; padding: 32px 28px 30px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.icon { width: 44px; height: 44px; margin-bottom: 22px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon .accent-stroke { stroke: var(--accent); }
.card h3 { font-size: 21px; line-height: 1.2; margin-bottom: 10px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }

.wide-shot { display: grid; grid-template-columns: 4fr 7fr; gap: 56px; align-items: center; margin-top: 88px; }
.wide-text h3 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.12; margin-bottom: 16px; }
.wide-text p:not(.kicker) { color: var(--muted); margin: 0; }

/* Install */
.code-group { margin-bottom: 48px; }
.code-group h3 { font-size: 22px; margin-bottom: 10px; }
.code-group p { color: var(--muted); margin: 0 0 14px; }
.code { position: relative; margin-bottom: 18px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg-3); }
.code pre { margin: 0; padding: 18px 96px 18px 20px; overflow-x: auto; font: 14px/1.7 var(--mono); }
.copy {
  position: absolute; top: 10px; right: 10px; min-width: 72px; height: 32px; padding: 0 12px;
  font: 500 13px/1 var(--mono); color: var(--ink); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 6px; cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease;
}
.copy:hover { border-color: var(--line-strong); }
.copy.done { color: var(--accent); border-color: var(--accent); }

/* FAQ */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 24px 40px 24px 0; position: relative;
  font: 600 19px/1.35 var(--display); letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(45deg); transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq details p { margin: 0 0 24px; color: var(--muted); max-width: 68ch; }

/* Footer title block */
.footer { padding: 72px 0 56px; border-top: 1px solid var(--line); }
.titleblock { display: grid; grid-template-columns: 1.3fr 1fr 1.4fr 1fr; border: 1.5px solid var(--line-strong); background: var(--bg-2); }
.tb-cell { padding: 16px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: 14px; min-width: 0; }
.tb-cell:nth-child(4) { border-right: 0; }
.tb-wide { grid-column: 1 / -1; border-right: 0; border-bottom: 0; color: var(--muted); }
.tb-label { font: 500 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.tb-title strong { font: 800 24px/1 var(--display); letter-spacing: -0.02em; }
.tb-small { font-size: 13px; color: var(--muted); }
.tb-cell a { overflow-wrap: anywhere; }

/* Motion */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.js-off .reveal { opacity: 1; transform: none; }
.dim-line path:not(.dim-ends) { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s cubic-bezier(0.6, 0, 0.2, 1) 0.3s; }
.stage.drawn .dim-line path { stroke-dashoffset: 0; }
.dim-label { opacity: 0; transition: opacity 0.5s ease 1.1s; }
.stage.drawn .dim-label { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .dim-line path { stroke-dashoffset: 0; }
  .dim-label { opacity: 1; }
  .btn:hover, .card:hover { transform: none; }
}

/* Responsive */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero h1 { font-size: clamp(46px, 8vw, 84px); max-width: 13ch; }
}
@media (max-width: 980px) {
  .features { grid-template-columns: 1fr 1fr; }
  .step, .wide-shot { grid-template-columns: 1fr; gap: 32px; }
  .step-flip .step-text { order: 0; }
  .steps { gap: 88px; }
  .titleblock { grid-template-columns: 1fr 1fr; }
  .tb-cell:nth-child(2), .tb-cell:nth-child(4) { border-right: 0; }
}
@media (max-width: 760px) {
  .nav nav { display: none; }
  .nav-actions { margin-left: auto; }
  .hero { padding: 56px 0 48px; }
  .stage { margin-top: 48px; }
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 40px; }
  .features { grid-template-columns: 1fr; }
  .url { display: none; }
  .wrap { padding: 0 16px; }
  .eyebrow { font-size: 12px; }
  .legend { gap: 4px 18px; }
}
@media (max-width: 520px) {
  .titleblock { grid-template-columns: 1fr; }
  .tb-cell { border-right: 0; }
  .cta .btn { flex: 1 1 auto; justify-content: center; }
  .code pre { padding-right: 20px; padding-top: 52px; }
  .eyebrow-more { display: none; }
}
