:root {
  --bg: #fbfbfa;
  --panel: #f3f3f1;
  --line: #e6e6e2;
  --text: #1f1f1d;
  --muted: #6b6b65;
  --accent: #c96442;
  --accent-soft: #f6e7e0;
  --code-bg: #f1f0ec;
  --radius: 12px;
  --sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1c1a;
    --panel: #242422;
    --line: #34342f;
    --text: #ecebe6;
    --muted: #a3a29b;
    --accent: #e08a6a;
    --accent-soft: #3a2a23;
    --code-bg: #2a2a27;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

.narrow {
  max-width: 760px;
}

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: 10px;
  height: 22px;
  border-radius: 3px;
  background: var(--accent);
}

nav.site {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 15px;
}

nav.site a {
  color: var(--muted);
  text-decoration: none;
}

nav.site a:hover {
  color: var(--text);
}

nav.site a.github {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
}

nav.site a.github:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero {
  padding: 48px 0 32px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5.2vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 680px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 20px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-block;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.shot {
  margin: 40px 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.caption {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

section {
  padding: 40px 0;
}

h2 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.card .tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.table-scroll {
  overflow-x: auto;
}

code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--code-bg);
  font: 0.88em var(--mono);
}

pre {
  overflow-x: auto;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--code-bg);
  font: 14px/1.5 var(--mono);
}

pre code {
  padding: 0;
  background: none;
  font: inherit;
}

ul.checks {
  padding: 0;
  list-style: none;
}

ul.checks li {
  position: relative;
  margin: 8px 0;
  padding-left: 28px;
}

ul.checks li::before {
  content: '';
  position: absolute;
  top: 0.55em;
  left: 4px;
  width: 10px;
  height: 6px;
  border-bottom: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  transform: rotate(-45deg);
}

article.guide {
  padding: 24px 0 48px;
}

article.guide h1 {
  font-size: clamp(30px, 4.4vw, 42px);
}

article.guide h2 {
  margin-top: 36px;
  font-size: 23px;
}

.steps {
  padding-left: 22px;
}

.steps li {
  margin: 10px 0;
}

details {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

summary {
  cursor: pointer;
  font-weight: 600;
}

details p {
  margin: 8px 0 0;
  color: var(--muted);
}

footer.site {
  margin-top: 40px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

footer.site .links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 10px;
}

footer.site a {
  color: var(--muted);
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .wrap {
    padding: 0 16px;
  }

  header.site {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding-top: 24px;
  }

  .lede {
    font-size: 18px;
  }
}

a.card {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.card:hover {
  border-color: var(--accent);
}

/* The home page: the film on a dark stage, whatever the visitor's theme, since the film itself is dark. */
body.home {
  --bg: #1c1c1a;
  --panel: #242422;
  --line: #34342f;
  --text: #ecebe6;
  --muted: #a3a29b;
  --accent: #e08a6a;
  --code-bg: #2a2a27;
  color-scheme: dark;
  background: var(--bg);
  color: var(--text);
}

.stage {
  padding: 8px 24px 0;
}

.screen {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #1c1c1a;
  box-shadow: 0 40px 140px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(224, 138, 106, 0.06);
}

.screen video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #1c1c1a;
}

.screen-bar {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.2s;
}

.screen:hover .screen-bar,
.screen:focus-within .screen-bar {
  opacity: 1;
}

.film-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(28, 28, 26, 0.82);
  color: var(--text);
  cursor: pointer;
}

.film-button:focus-visible,
.copy:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.film-button.sound {
  display: flex;
  gap: 6px;
  width: auto;
  padding: 0 12px;
  border-radius: 19px;
  font: 600 13px var(--sans);
}

.film-button.sound[aria-pressed='true'] {
  border-color: var(--accent);
  color: var(--accent);
}

.film-progress {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(236, 235, 230, 0.18);
  overflow: hidden;
}

.film-progress div {
  width: 0;
  height: 100%;
  background: var(--accent);
}

.pitch {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 0 8px;
  text-align: center;
}

.pitch .lede {
  margin: 0 auto;
}

.installs {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 0 8px;
}

.install {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 12px 0;
  padding: 14px 16px 14px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.install-where {
  flex: 0 0 190px;
  color: var(--muted);
  font-size: 15px;
}

.install code {
  flex: 1;
  min-width: 0;
  padding: 0;
  overflow-x: auto;
  background: none;
  white-space: nowrap;
  font-size: 15px;
}

.copy {
  flex: 0 0 auto;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font: 600 14px var(--sans);
  cursor: pointer;
}

.install-more {
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}

@media (max-width: 640px) {
  .stage {
    padding: 0;
  }

  .screen {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .screen-bar {
    right: 8px;
    bottom: 8px;
    left: 8px;
    gap: 8px;
    opacity: 1;
  }

  .film-button {
    width: 28px;
    height: 28px;
  }

  .film-button svg {
    width: 14px;
    height: 14px;
  }

  .film-progress {
    height: 3px;
  }

  .pitch {
    padding-top: 32px;
    text-align: left;
  }

  .install {
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .install-where {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .screen-bar {
    opacity: 1;
    transition: none;
  }
}
