/* Runlet — website styles. System fonts only; light and dark from prefers-color-scheme. */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #6e6e73;
  --line: rgba(0, 0, 0, 0.1);
  --accent: #5856d6;
  --accent-hover: #4846c0;
  --on-accent: #ffffff;
  --link: #5452cf;
  --badge-bg: rgba(88, 86, 214, 0.1);
  --badge-text: #4a48c2;
  --header-bg: rgba(255, 255, 255, 0.76);
  --kbd-bg: #ffffff;
  --kbd-line: rgba(0, 0, 0, 0.16);
  --window-ring: rgba(0, 0, 0, 0.16);
  --window-shadow: 0 2px 6px rgba(0, 0, 0, 0.05), 0 26px 70px -18px rgba(0, 0, 0, 0.28);
  --dot-teal: #30b0c7;
  --dot-green: #34c759;
  --dot-blue: #007aff;
  --dot-purple: #af52de;
  --c-comment: #8a8a8e;
  --c-keyword: #ad3da4;
  --c-type: #0b6e7a;
  --c-func: #326d74;
  --c-string: #c41a16;
  --c-var: #3f6e74;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(88px, 12vw, 160px);
  --radius-card: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #0e0e10;
    --surface: #1c1c1e;
    --surface-2: #161618;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #98989d;
    --line: rgba(255, 255, 255, 0.14);
    --accent: #5856d6;
    --accent-hover: #6866e0;
    --on-accent: #ffffff;
    --link: #a5a3ff;
    --badge-bg: rgba(125, 122, 255, 0.16);
    --badge-text: #b4b2ff;
    --header-bg: rgba(18, 18, 20, 0.72);
    --kbd-bg: #2c2c2e;
    --kbd-line: rgba(255, 255, 255, 0.18);
    --window-ring: rgba(255, 255, 255, 0.16);
    --window-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 30px 80px -20px rgba(0, 0, 0, 0.9);
    --dot-teal: #5ac8e0;
    --dot-green: #30d158;
    --dot-blue: #0a84ff;
    --dot-purple: #bf5af2;
    --c-comment: #7f8c98;
    --c-keyword: #ff7ab2;
    --c-type: #5dd8ff;
    --c-func: #67b7a4;
    --c-string: #fc6a5d;
    --c-var: #a2d1e0;
  }
}

/* Base */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.18em; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 { margin: 0; color: var(--text); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.lede, .sublede, .feature-intro p, figcaption { text-wrap: balance; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  letter-spacing: 0;
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.05em 0.4em;
  margin: 0 0.08em;
  font-family: var(--font);
  font-size: 0.82em;
  line-height: 1.5;
  text-align: center;
  color: var(--text);
  background: var(--kbd-bg);
  border: 1px solid var(--kbd-line);
  border-bottom-width: 2px;
  border-radius: 6px;
}

.keys { white-space: nowrap; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 10px;
  font-weight: 600;
}
.skip-link:focus { top: 12px; text-decoration: none; }

.container, .container-wide {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container { max-width: calc(1020px + 2 * var(--gutter)); }
.container-wide { max-width: calc(1200px + 2 * var(--gutter)); }
.narrow { max-width: calc(760px + 2 * var(--gutter)); }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: calc(1200px + 2 * var(--gutter));
  height: 56px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand img { display: block; border-radius: 7px; }

.nav-links {
  display: flex;
  gap: 28px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
  font-size: 14px;
}
.nav-links a { color: var(--text-2); }
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: 8px;
}

.icon-link {
  display: inline-flex;
  padding: 6px;
  color: var(--text-2);
  border-radius: 8px;
}
.icon-link:hover { color: var(--text); }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 980px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.button:hover { background: var(--accent-hover); text-decoration: none; }
.button:active { transform: scale(0.98); }
.button:focus-visible { border-radius: 980px; }

.button-secondary {
  background: transparent;
  color: var(--link);
  border-color: currentColor;
}
.button-secondary:hover { background: var(--badge-bg); }

.button-small {
  min-height: 0;
  padding: 6px 14px;
  font-size: 14px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
}

/* Hero */

.hero {
  padding-top: clamp(56px, 9vw, 104px);
  padding-bottom: var(--section);
  text-align: center;
  overflow: hidden;
}

.badge {
  display: inline-block;
  margin-bottom: 22px;
  padding: 5px 14px;
  border-radius: 980px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

.hero h1 {
  font-size: clamp(56px, 10vw, 104px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.lede {
  max-width: 820px;
  margin: 18px auto 0;
  font-size: clamp(26px, 3.8vw, 44px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.sublede {
  max-width: 680px;
  margin: 22px auto 0;
  color: var(--text-2);
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.45;
}

.meta {
  margin-top: 10px;
  color: var(--text-3);
  font-size: 14px;
}
.cta + .meta { margin-top: 22px; }
.meta strong { color: var(--text); font-weight: 600; }

.window.hero-window { margin-top: clamp(48px, 7vw, 80px); }

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 4vw, 48px);
  margin-top: clamp(56px, 8vw, 96px);
  padding-top: 0;
  padding-bottom: 0;
  list-style: none;
  text-align: left;
  color: var(--text-2);
  font-size: 17px;
}
.pillars strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 19px; }

@media (max-width: 760px) {
  .pillars { grid-template-columns: 1fr; }
}

/* Windows (screenshots) */

.window {
  margin: 0;
  container-type: inline-size;
}
.window picture { display: block; }
.window img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border-radius: clamp(5px, 1.2cqi, 16px);
  box-shadow: 0 0 0 0.5px var(--window-ring), var(--window-shadow);
  background: var(--surface-2);
}
.window figcaption {
  max-width: 640px;
  margin: 26px auto 0;
  color: var(--text-2);
  font-size: 15px;
  text-align: center;
}

/* Feature sections */

.feature { padding-block: var(--section); }
.feature-alt { background: var(--bg-alt); }

.feature-intro {
  margin-bottom: clamp(40px, 6vw, 64px);
  text-align: center;
}
.feature-intro p:last-child {
  max-width: 720px;
  margin: 20px auto 0;
  color: var(--text-2);
  font-size: clamp(18px, 2vw, 21px);
}

.eyebrow {
  margin-bottom: 12px !important;
  color: var(--accent);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
@media (prefers-color-scheme: dark) {
  .eyebrow { color: var(--link); }
}

h2 {
  font-size: clamp(36px, 5.6vw, 64px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.035em;
}

h3 {
  font-size: 21px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.targets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: clamp(48px, 7vw, 72px);
}
.target {
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--bg-alt);
}
.target h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}
.target p { margin-top: 10px; color: var(--text-2); font-size: 15px; }

.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.dot-teal { background: var(--dot-teal); }
.dot-green { background: var(--dot-green); }
.dot-blue { background: var(--dot-blue); }
.dot-purple { background: var(--dot-purple); }

@media (max-width: 960px) {
  .targets { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .targets { grid-template-columns: 1fr; }
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  max-width: calc(1200px + 2 * var(--gutter));
  margin-top: clamp(72px, 10vw, 128px);
}
.split .code { max-width: 640px; }
.split-reverse { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.split-reverse .split-text { order: 2; }
.split-text h3 { font-size: clamp(26px, 3vw, 32px); letter-spacing: -0.03em; }
.split-text p { margin-top: 16px; color: var(--text-2); font-size: 17px; }
.split-text p + p { margin-top: 18px; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split-reverse .split-text { order: 0; }
}

.checks {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-2);
  font-size: 16px;
}
.checks li {
  position: relative;
  padding-left: 28px;
  margin-top: 12px;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.38em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--badge-bg);
  -webkit-mask: none;
}
.checks li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: calc(0.38em + 4px);
  width: 4px;
  height: 7px;
  border: solid var(--link);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.link-arrow { font-weight: 500; }
.link-arrow::after { content: " ›"; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 48px);
  margin-top: clamp(64px, 9vw, 112px);
  padding-top: clamp(40px, 5vw, 56px);
  border-top: 1px solid var(--line);
}
.mini h3 { font-size: 19px; }
.mini p { margin-top: 8px; color: var(--text-2); font-size: 16px; }

@media (max-width: 760px) {
  .grid-3 { grid-template-columns: 1fr; }
}

/* Code sample */

.code {
  margin: 0;
  padding: 24px 26px;
  overflow-x: auto;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0;
  tab-size: 4;
  color: var(--text);
}
.code code { font-size: inherit; }
.code .c { color: var(--c-comment); font-style: italic; }
.code .k { color: var(--c-keyword); font-weight: 600; }
.code .t { color: var(--c-type); }
.code .f { color: var(--c-func); }
.code .s { color: var(--c-string); }
.code .v { color: var(--c-var); }

/* More features */

.more { padding-block: var(--section); }
.more h2 { text-align: center; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: clamp(40px, 6vw, 64px) 0 0;
  padding: 0;
  list-style: none;
}
.feature-grid li {
  padding: 28px 26px;
  border-radius: var(--radius-card);
  background: var(--bg-alt);
}
.feature-grid svg {
  width: 30px;
  height: 30px;
  margin-bottom: 14px;
  fill: none;
  stroke: var(--link);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature-grid h3 { font-size: 18px; }
.feature-grid p { margin-top: 8px; color: var(--text-2); font-size: 15px; }

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* Open source */

.open-source {
  padding-block: var(--section);
  background: var(--bg-alt);
  text-align: center;
}
.open-source h2 + p {
  margin: 20px auto 0;
  color: var(--text-2);
  font-size: clamp(18px, 2vw, 21px);
}
.links-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  font-size: 17px;
}
.fine {
  margin-top: 32px !important;
  color: var(--text-3);
  font-size: 13px;
}

/* Install */

.install { padding-block: var(--section); }

.steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 28px 28px 28px 80px;
  border-radius: var(--radius-card);
  background: var(--bg-alt);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 28px;
  top: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 16px;
  font-weight: 600;
}
.steps h3 { font-size: 21px; }
.steps p { margin-top: 8px; color: var(--text-2); font-size: 17px; }

@media (max-width: 560px) {
  .steps li { padding: 72px 22px 24px; }
  .steps li::before { left: 22px; top: 24px; }
}

.command {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}
.command code {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.copy {
  flex: none;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--link);
  font: 500 13px/1.4 var(--font);
  cursor: pointer;
}
.copy:hover { background: var(--badge-bg); }

.requirements {
  margin-top: 16px;
  padding: 28px 26px;
  border-radius: var(--radius-card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.requirements h3 { font-size: 19px; }
.requirements ul {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 32px;
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--text-2);
  font-size: 16px;
}
@media (max-width: 760px) {
  .requirements ul { grid-template-columns: 1fr; }
}

/* FAQ */

.faq { padding-block: 0 var(--section); }
.faq h2 { text-align: center; margin-bottom: clamp(32px, 5vw, 48px); }

.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  padding: 22px 44px 22px 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 10px;
  height: 10px;
  border: solid var(--text-2);
  border-width: 0 2px 2px 0;
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: translateY(-20%) rotate(-135deg); }
.faq summary:hover { color: var(--link); }
.faq details p {
  padding: 0 0 24px;
  color: var(--text-2);
  font-size: 17px;
}

/* Footer */

.site-footer {
  padding-block: 40px 56px;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--text-2);
  font-size: 14px;
}
.footer-inner { display: grid; gap: 14px; }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 17px;
}
.footer-brand img { border-radius: 6px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer .fine { margin-top: 6px !important; }

/* Motion: content fades up once as it scrolls in (only with JavaScript, never with
   reduced motion). */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .button, .faq summary::after { transition: none; }
}
