/* Tokens. Neutrals are the dark slate of the app's logo tile; the one accent is the logo's ember;
   brass is spent in one place only (the Valve caution). */
@font-face {
  font-family: "Big Shoulders Display";
  src: url("/assets/big-shoulders-display.075292b13a.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/instrument-sans.2ee17598a9.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  scrollbar-color: #4a5260 #171a20;

  --bg: #101216;
  --surface: #171a20;
  --raised: #1e232b;
  --line: #2c333d;
  --text: #e6e8ec;
  --muted: #9aa3b0;
  --accent: #f26a3f;
  --accent-fill: #e55a34;
  --on-accent: #0e0f12;
  --brass: #e3b04b;

  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, monospace;

  /* type scale, ratio 1.25 */
  --t-sm: 0.875rem;
  --t-base: 1rem;
  --t-md: 1.25rem;
  --t-lg: 1.5625rem;
  --t-xl: clamp(1.9rem, 1.3rem + 2vw, 2.75rem);
  --t-hero: clamp(2.5rem, 1.4rem + 4.2vw, 4.25rem);

  /* spacing scale */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4rem;
  --s9: 6rem;

  --r1: 6px;
  --r2: 12px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 16px 40px rgb(0 0 0 / 0.35);
  --gutter: 1.25rem;
  --page: 75rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--s5); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--t-base) / 1.65 var(--font-body);
}
img { display: block; max-width: 100%; height: auto; }
h1, h2 { margin: 0; font-family: var(--font-display); font-weight: 800; line-height: 1; text-wrap: balance; }
h2 { font-size: var(--t-xl); font-weight: 700; }
p { margin: 0; text-wrap: pretty; }
p + p, .body > * + * { margin-top: var(--s5); }
ul, ol { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 600; }
code { font: var(--t-sm) / 1.5 var(--font-mono); background: var(--raised); padding: 0.1em 0.4em; border-radius: 4px; overflow-wrap: anywhere; }

a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--page)); margin-inline: auto; }
.accent { color: var(--accent); }

.skip { position: absolute; left: var(--s4); top: -4rem; z-index: 10; padding: var(--s3) var(--s4); background: var(--accent-fill); color: var(--on-accent); font-weight: 600; border-radius: var(--r1); }
.skip:focus { top: var(--s4); }

/* Top bar */
.bar { border-bottom: 1px solid var(--line); }
.bar-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); padding-block: var(--s4); }
.brand { display: flex; align-items: center; gap: var(--s3); color: var(--text); text-decoration: none; font: 700 var(--t-lg) / 1 var(--font-display); }
.brand img { border-radius: 10px; }
.bar nav ul { display: flex; gap: var(--s5); }
.bar nav a { display: block; padding-block: var(--s2); color: var(--muted); text-decoration: none; font-size: var(--t-sm); font-weight: 500; }
.bar nav a:hover { color: var(--text); }
@media (max-width: 56rem) { .bar nav li:not(:last-child) { display: none; } }

/* Hero */
.hero { display: grid; gap: var(--s7); padding-block: var(--s7) var(--s8); align-items: center; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s5); }
.hero h1 { font-size: var(--t-hero); }
.download {
  display: inline-flex; flex-direction: column; gap: var(--s1);
  padding: var(--s4) var(--s6);
  background: var(--accent-fill); color: var(--on-accent);
  border-radius: var(--r1); text-decoration: none;
  transition: background-color 150ms ease-out, translate 150ms ease-out;
}
.download:hover { background: var(--accent); }
.download:active { translate: 0 1px; }
.download-title { font: 800 var(--t-xl) / 1 var(--font-display); }
.download-sub { font-size: var(--t-sm); font-weight: 600; }
.hero-meta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); font-size: var(--t-sm); color: var(--muted); }
.hero-meta + .hero-meta { margin-top: calc(var(--s3) * -1); }
.hero-meta a { color: var(--text); }

.demo { margin: 0; display: flex; flex-direction: column; align-items: flex-end; gap: var(--s3); }
.demo-frame { position: relative; width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--shadow); }
.demo-frame img { width: 100%; }
.demo-live { position: absolute; inset: 0; height: 100%; }
.demo-toggle {
  padding: var(--s2) var(--s4);
  background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: var(--r1);
  font: 500 var(--t-sm) / 1.4 var(--font-body); cursor: pointer;
  transition: color 150ms ease-out, border-color 150ms ease-out;
}
.demo-toggle:hover { color: var(--text); border-color: var(--accent); }
.demo-toggle[hidden] { display: none; }
@media (min-width: 60rem) { .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s8); } }

/* One orchestrated reveal on load; without motion the page is simply there. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes reveal { from { opacity: 0; translate: 0 var(--s4); } }
  .hero-copy > * { animation: reveal 600ms cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
  .hero-copy > :nth-child(2) { animation-delay: 80ms; }
  .hero-copy > :nth-child(3) { animation-delay: 160ms; }
  .hero-copy > :nth-child(4) { animation-delay: 220ms; }
  html { scroll-behavior: smooth; }
}

/* Valve caution: the only brass on the page */
.caution {
  display: grid; gap: var(--s3) var(--s6);
  padding: var(--s5) var(--s5) var(--s5) var(--s6);
  background: color-mix(in srgb, var(--brass) 9%, var(--bg));
  border-inline-start: 4px solid var(--brass);
  border-radius: 0 var(--r1) var(--r1) 0;
}
.caution { margin-bottom: var(--s8); }
.caution h2 { font-size: var(--t-lg); color: var(--brass); font-weight: 700; }
@media (min-width: 48rem) { .caution { grid-template-columns: 14rem minmax(0, 1fr); align-items: baseline; } }

/* Sections: a label on the left, the content beside it */
.section { display: grid; gap: var(--s5); padding-block: var(--s8); border-top: 1px solid var(--line); }
.section .body { max-width: 44rem; }
@media (min-width: 56rem) {
  .section { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: var(--s8); padding-block: var(--s9); }
  .section h2 { position: sticky; top: var(--s6); align-self: start; }
}

.steps { counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem minmax(0, 1fr); align-items: baseline; padding-block: var(--s4); border-bottom: 1px solid var(--line); }
.steps li:first-child { padding-top: 0; }
.steps li::before { content: counter(step); font: 800 var(--t-xl) / 1 var(--font-display); color: var(--accent); }
.key { display: inline-block; padding: 0 var(--s2); background: var(--raised); color: var(--accent); border: 1px solid var(--line); border-bottom-width: 3px; border-radius: var(--r1); }
.note { padding: var(--s4) var(--s5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r1); }

.ticks li { position: relative; padding: var(--s2) 0 var(--s2) var(--s5); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 1.05em; width: 0.5rem; height: 0.5rem; background: var(--accent); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }

/* Screenshots span the full page width */
.shots { grid-template-columns: minmax(0, 1fr); }
.shots-grid { display: grid; gap: var(--s6) var(--s5); }
.shots-grid figure { margin: 0; }
.shots-grid img { width: 100%; border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--shadow); }
.shots-grid figcaption { margin-top: var(--s3); color: var(--muted); font-size: var(--t-sm); }
@media (min-width: 56rem) {
  .shots-grid { grid-template-columns: 1fr 1fr; }
  .shots-grid .wide { grid-column: 1 / -1; }
}

table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
th, td { padding: var(--s3) var(--s4) var(--s3) 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { color: var(--muted); font-weight: 500; }
tbody th { width: 40%; font-weight: 600; }
.address { display: inline-block; user-select: all; overflow-wrap: anywhere; }

.button { display: inline-block; padding: var(--s3) var(--s5); background: var(--raised); color: var(--text); border: 1px solid var(--line); border-radius: var(--r1); font-weight: 600; text-decoration: none; transition: border-color 150ms ease-out; }
.button:hover { border-color: var(--accent); }

.faq details { border-bottom: 1px solid var(--line); }
.faq > * + * { margin-top: 0; }
.faq summary { display: flex; justify-content: space-between; gap: var(--s4); padding-block: var(--s4); font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: var(--s4); margin-top: 0; }

/* Footer */
.foot { margin-top: var(--s8); padding-block: var(--s8); background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--t-sm); }
.foot-inner { display: grid; gap: var(--s7); }
.foot h2 { margin-bottom: var(--s4); font-size: var(--t-md); color: var(--text); font-weight: 700; }
.foot p { max-width: 60ch; }
.foot p + p { margin-top: var(--s3); }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); align-content: start; }
@media (min-width: 56rem) { .foot-inner { grid-template-columns: minmax(0, 1fr) auto; } .foot-links { flex-direction: column; } }

/* 404 */
.lost { display: grid; gap: var(--s5); justify-items: start; padding-block: var(--s9); }
