/* Runback website. Accent and base colors come from src/ui/components.tsx;
   layout and typography follow calm product pages such as t3.codes. */
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dm-sans.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #0c0d0c;
  --panel: #121412;
  --raised: #1a1d1a;
  --line: rgba(242, 244, 239, 0.08);
  --line-strong: rgba(242, 244, 239, 0.14);
  --text: #f2f4ef;
  --muted: #8f978d;
  --green: #a5d879;
  --ink: #14200e;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }
img { display: block; max-width: 100%; height: auto; }

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

h1, h2 { margin: 0; font-weight: 600; letter-spacing: -0.045em; line-height: 1.04; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h1 span { color: #7c8579; }
p { margin: 0; }

.eyebrow {
  font: 500 0.75rem/1 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 18px;
}
.sub { color: var(--muted); font-size: 1.12rem; max-width: 52ch; margin-top: 18px; }
.center .sub { margin-left: auto; margin-right: auto; }
.fine { color: var(--muted); font-size: 0.88rem; margin-top: 14px; }
.fine a { color: var(--muted); }
.caption { color: var(--muted); font-size: 0.82rem; text-align: center; margin-top: 28px; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(12, 13, 12, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.04em; text-decoration: none; }
.brand > span { color: var(--green); }
.brand.small { font-size: 1rem; }
.brand em { font: 400 0.85rem 'DM Sans', sans-serif; letter-spacing: 0; color: var(--muted); font-style: normal; margin-left: 10px; }
.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-link { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.nav-link:hover { color: var(--text); }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 6px 14px; font-size: 0.9rem; text-decoration: none; color: var(--text);
}
.pill:hover { border-color: rgba(242, 244, 239, 0.3); }
.lang { display: flex; gap: 2px; font: 500 0.78rem/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.08em; }
.lang a, .lang span { padding: 6px 7px; border-radius: 6px; text-decoration: none; color: var(--muted); }
.lang span { color: var(--text); background: rgba(242, 244, 239, 0.06); }
.lang a:hover { color: var(--text); }
.lang abbr { text-decoration: none; }

/* ---------- Buttons ---------- */
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.cta.left { justify-content: flex-start; align-items: center; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 50px; padding: 0 22px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: transparent;
  color: var(--text); font-weight: 600; font-size: 0.98rem; text-decoration: none;
}
.btn:hover { background: rgba(242, 244, 239, 0.04); }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--ink); }
.btn.primary:hover { background: #b6e290; }
.btn.light { background: var(--text); border-color: var(--text); color: #0c0d0c; min-height: 44px; }
.text-link { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.text-link:hover { color: var(--text); }

/* ---------- Checkmark lists ---------- */
.checks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 28px; color: #c9cfc7; }
.checks li::before {
  content: ''; position: absolute; left: 2px; top: 0.5em;
  width: 11px; height: 6px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}
.checks b { color: var(--text); font-weight: 600; }
.checks.inline { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin-top: 30px; }
.checks.inline li { color: var(--muted); font-size: 0.92rem; }
.checks.small { justify-content: flex-start; margin-top: 22px; }

/* ---------- Intro ---------- */
.hero { position: relative; text-align: center; padding: 110px 0 70px; isolation: isolate; }
.hero::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 760px; z-index: -1;
  background-image:
    linear-gradient(rgba(242, 244, 239, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 244, 239, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 40%, transparent 100%);
}
.lead { color: var(--muted); font-size: 1.2rem; max-width: 46ch; margin: 28px auto 0; }

/* Whole screens, uncropped, with a narrow device frame edge. */
.shot {
  border-radius: 34px;
  border: 7px solid #1b1e1b;
  outline: 1px solid var(--line-strong);
  background: #000;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
}
.hero-shots {
  display: flex; justify-content: center; align-items: flex-end; gap: 28px;
  margin-top: 80px;
}
.hero-shots .main { width: 310px; }
.hero-shots .side { width: 270px; opacity: 0.9; margin-bottom: 48px; }
@media (max-width: 860px) {
  .hero-shots .side { display: none; }
  .hero-shots .main { width: min(310px, 80vw); }
}

/* ---------- Sections ---------- */
section { border-top: 1px solid var(--line); padding: 120px 0; }
.center { text-align: center; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 72px; align-items: center; }
.split.reverse .copy { order: 2; }
.split > * { min-width: 0; }
@media (max-width: 920px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .split.reverse .copy { order: 0; }
}

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 270px)); justify-content: center; gap: 24px; align-items: start; }
.pair .shot:nth-child(2) { margin-top: 56px; }
.single { display: flex; justify-content: center; }
.single .shot { width: min(300px, 100%); }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 280px)); justify-content: center; gap: 26px; margin-top: 64px; }
.trio .shot:nth-child(2) { margin-top: 40px; }
@media (max-width: 760px) {
  .trio { grid-template-columns: minmax(0, 290px); }
  .trio .shot:nth-child(2) { margin-top: 0; }
  .pair .shot:nth-child(2) { margin-top: 32px; }
}

.watches { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 22px; }
.watch {
  width: 200px; border-radius: 50%;
  border: 10px solid #1b1e1b; outline: 1px solid var(--line-strong);
  background: #000;
}
.watches .watch:nth-child(2) { width: 230px; }
.watches.big .watch, .watches.big .watch:nth-child(2) { width: 250px; }
@media (max-width: 560px) { .watch, .watches .watch:nth-child(2), .watches.big .watch, .watches.big .watch:nth-child(2) { width: 148px; } }

/* ---------- Import sources ---------- */
.sources {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-top: 30px;
}
.sources div { padding: 16px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.sources div:nth-child(3n) { border-right: 0; }
.sources div:nth-last-child(-n + 3) { border-bottom: 0; }
.sources b { font-weight: 600; font-size: 0.98rem; }
.sources code { font: 0.76rem ui-monospace, Menlo, Consolas, monospace; color: var(--muted); }
@media (max-width: 480px) {
  .sources { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sources div, .sources div:nth-child(3n) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .sources div:nth-child(2n) { border-right: 0; }
  .sources div:last-child { border-bottom: 0; }
}

/* ---------- Data ---------- */
.cards4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 56px; text-align: left; }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: var(--panel); display: grid; gap: 6px; }
.card b { font-weight: 600; }
.card span { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 860px) { .cards4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .cards4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Open Source ---------- */
.os { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; margin-top: 56px; text-align: left; align-items: start; }
@media (max-width: 920px) { .os { grid-template-columns: minmax(0, 1fr); } }
.term { border: 1px solid var(--line); border-radius: 14px; background: #0f110f; overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a2e2a; }
.term-bar span { margin: 0 auto; padding-right: 50px; font: 0.78rem ui-monospace, Menlo, Consolas, monospace; color: var(--muted); }
.term pre { margin: 0; padding: 22px 20px 28px; overflow-x: auto; }
.term code { font: 0.86rem/2 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; color: #d7dcd5; }
.term code b { color: var(--green); font-weight: 400; margin-right: 6px; }
.os-card { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 28px; }
.os-card .checks { margin-top: 0; }
.mono { font: 0.78rem ui-monospace, Menlo, Consolas, monospace; color: var(--muted); margin-top: 24px; }

/* ---------- Closing ---------- */
.final { text-align: center; padding: 140px 0 150px; }
.final h2 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); }

.foot { border-top: 1px solid var(--line); padding: 32px 0 40px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 22px; }
.foot nav a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.foot nav a:hover { color: var(--text); }

@media (max-width: 600px) {
  section { padding: 84px 0; }
  .hero { padding-top: 72px; }
  .nav-link { display: none; }
}
