/* simstim.tech
   Same palette and type as the app: system fonts, white or near-black
   surfaces, one blue accent. Colors are tokens so both themes stay in sync. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1d1d1f;
  --fg-quiet: #3a3a3c;
  --fg-muted: #6e6e73;
  --surface: #f5f5f7;
  --surface-2: #ececef;
  --border: rgb(0 0 0 / 10%);
  --accent: #007aff;
  --accent-hover: #0062cc;
  --accent-fg: #ffffff;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 24px 60px -24px rgb(0 0 0 / 25%);
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --measure: 38rem;
  --page: 76rem;
  --gutter: 1rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1e1e;
    --fg: #e8e8ed;
    --fg-quiet: #aeaeb2;
    --fg-muted: #98989d;
    --surface: #2c2c2e;
    --surface-2: #3a3a3c;
    --border: rgb(255 255 255 / 10%);
    --accent: #0a84ff;
    --accent-hover: #3d9bff;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 24px 60px -24px rgb(0 0 0 / 70%);
  }
}

@media (min-width: 48rem) {
  :root {
    --gutter: 2rem;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 1.5rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.6 var(--font-ui);
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
}

img,
picture {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.16em;
}

a:hover {
  text-decoration: underline;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.15;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
}

h3 {
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

p + p {
  margin-top: 0.9em;
}

code,
pre {
  font-family: var(--font-mono);
  font-size: 0.86em;
}

pre {
  margin: 0;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  line-height: 1.55;
  tab-size: 2;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  top: 1rem;
}

/* Header */

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem 1rem;
  max-width: var(--page);
  margin: 0 auto;
  padding: 1.1rem var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--fg);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  border-radius: 7px;
}

/* On phones the links take their own row under the name instead of
   squeezing beside it. */
.top nav {
  display: flex;
  flex-wrap: wrap;
  flex-basis: 100%;
  gap: 0.25rem 1.25rem;
  font-size: 0.95rem;
}

@media (min-width: 40rem) {
  .top nav {
    flex-basis: auto;
  }
}

.top nav a {
  color: var(--fg-quiet);
}

.top nav a:hover {
  color: var(--fg);
}

/* Hero */

.hero {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(2.5rem, 2rem + 4vw, 5.5rem) var(--gutter) 0;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.25rem, 1.4rem + 4.5vw, 4.25rem);
  letter-spacing: -0.025em;
}

.lede {
  max-width: var(--measure);
  margin: 1.25rem auto 0;
  color: var(--fg-quiet);
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.5;
}

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.5rem;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 1.0625rem;
  font-weight: 600;
  border-radius: 999px;
  transition: background-color 120ms ease, transform 120ms ease;
}

.button:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.button:active {
  transform: translateY(1px);
}

.meta {
  color: var(--fg-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.fine {
  color: var(--fg-muted);
  font-size: 0.9rem;
}

.shot {
  margin: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0 0;
}

.shot img {
  width: 100%;
  border-radius: 12px;
  filter: drop-shadow(0 24px 48px rgb(0 0 0 / 18%));
}

/* Sections */

.section {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(3.5rem, 2.5rem + 4vw, 6.5rem) var(--gutter) 0;
}

.section > h2 + p,
.section > h2 + .columns,
.section > h2 + .steps {
  margin-top: 1.5rem;
}

.steps {
  display: grid;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
}

.steps h3::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 0.9rem;
  color: var(--fg-muted);
  font: 500 0.85rem/1 var(--font-mono);
  letter-spacing: 0.04em;
}

.steps p {
  margin-top: 0.6rem;
  color: var(--fg-quiet);
}

@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

.columns {
  display: grid;
  gap: 2rem;
}

.columns > div > p,
.columns > div > h3 + ul {
  color: var(--fg-quiet);
}

.columns h3 {
  margin-bottom: 0.75rem;
}

@media (min-width: 48rem) {
  .columns {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.facts {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--fg-quiet);
}

.facts li {
  position: relative;
  padding-left: 1.4rem;
}

.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.85;
}

.facts li + li {
  margin-top: 0.7rem;
}

.facts strong {
  color: var(--fg);
  font-weight: 600;
}

.more {
  margin-top: 1.75rem;
  color: var(--fg-quiet);
}

/* Files */

.files {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

.files-text p {
  color: var(--fg-quiet);
}

.files-text h2 + p {
  margin-top: 1.5rem;
}

.tree {
  margin-top: 1.5rem;
}

.note {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.note figcaption {
  padding: 0.65rem 1.15rem;
  border-bottom: 1px solid var(--border);
  color: var(--fg-muted);
  font: 500 0.8rem/1.4 var(--font-mono);
}

.note pre {
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.82rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (min-width: 60rem) {
  .files {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 4rem;
  }
}

/* Download */

.download {
  text-align: center;
}

.download > h2 + p {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
  color: var(--fg-quiet);
}

.download .cta {
  margin-top: 1.75rem;
}

.install {
  max-width: var(--measure);
  margin: 2.5rem auto 0;
  padding-left: 1.4rem;
  text-align: left;
  color: var(--fg-quiet);
}

.install li + li {
  margin-top: 0.5rem;
}

.download details {
  max-width: var(--measure);
  margin: 2rem auto 0;
  text-align: left;
}

.download summary {
  cursor: pointer;
  color: var(--fg-quiet);
  font-weight: 500;
}

.download summary:hover {
  color: var(--fg);
}

.download details p {
  margin-top: 0.75rem;
  color: var(--fg-quiet);
}

.download details pre {
  margin-top: 0.75rem;
}

.download .fine {
  max-width: var(--measure);
  margin: 1.5rem auto 0;
}

/* Footer */

.bottom {
  max-width: var(--page);
  margin: clamp(4rem, 3rem + 4vw, 7rem) auto 0;
  padding: 2rem var(--gutter) 3rem;
  border-top: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 0.9rem;
}

.bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
}

.bottom nav a {
  color: var(--fg-quiet);
}

.bottom p {
  max-width: 48rem;
  margin-top: 1.25rem;
}
