/*
 * aperturenvr.com. Design plan: ../DESIGN.md.
 * The ground is the app's own page tone, so screenshots sit flush. Blue means action, red means recording, green
 * means online: nothing else gets colour. IBM Plex Sans for text, IBM Plex Mono only for real data.
 */
@font-face { font-family: "Plex Sans"; src: url("/fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 100 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light dark;
  --ground: light-dark(#f5f6f7, #101214);
  --housing: light-dark(#ffffff, #1a1d20);
  --housing-2: light-dark(#eceef0, #222528);
  --signal: light-dark(#121416, #eceef0);
  --overlay: light-dark(#4b5056, #b0b5ba);
  --faint: light-dark(#6a7076, #868b91);
  --rule: light-dark(rgba(18, 20, 22, 0.12), rgba(236, 238, 240, 0.1));
  --rule-strong: light-dark(rgba(18, 20, 22, 0.22), rgba(236, 238, 240, 0.2));
  --live: light-dark(#0b5fcc, #4797ff);
  --live-ink: light-dark(#ffffff, #071a33);
  --rec: #f0494e;
  --online: light-dark(#1f9d52, #39c66d);
  --sans: "Plex Sans", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --page: min(1180px, 100% - 48px);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--signal);
  font: 400 17px/1.6 var(--sans);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
a { color: var(--live); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: color-mix(in srgb, var(--live) 35%, transparent); color: var(--signal); }
:focus-visible { outline: 2px solid var(--live); outline-offset: 3px; border-radius: 4px; }
html { scrollbar-color: var(--rule-strong) transparent; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 8px 12px; border-radius: 6px; background: var(--signal); color: var(--ground); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.page { width: var(--page); margin-inline: auto; }

h1, h2, h3 { margin: 0; font-weight: 580; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(38px, 4.4vw, 60px); line-height: 1.06; letter-spacing: -0.028em; font-weight: 600; }
h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.12; }
h3 { font-size: 17px; line-height: 1.4; font-weight: 600; letter-spacing: -0.005em; }
p { margin: 0; text-wrap: pretty; }
.lede { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.55; color: var(--overlay); max-width: 34em; }
.body { color: var(--overlay); max-width: 36em; }
.body + .body { margin-top: 14px; }
code, kbd, pre, .data { font-family: var(--mono); font-variant-ligatures: none; }
.data { font-size: 0.9em; letter-spacing: 0; font-variant-numeric: tabular-nums; }
:not(pre) > code { font-size: 0.88em; padding: 0.1em 0.35em; border-radius: 4px; background: var(--housing-2); }

/* Header: wordmark left, three plain links, the theme switch. */
.top { position: sticky; top: 0; z-index: 20; background: var(--ground); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.top.scrolled { border-bottom-color: var(--rule); }
.top .page { display: flex; align-items: center; height: 60px; gap: 28px; }
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--signal); text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.mark svg { width: 24px; height: 24px; color: var(--live); }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 26px; font-size: 15px; }
.top nav a { color: var(--overlay); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--signal); }
.theme { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-left: -6px; border: 0; border-radius: 6px; background: none; color: var(--overlay); cursor: pointer; }
.theme:hover { color: var(--signal); background: var(--housing-2); }
.theme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-sun { display: block; } :root:not([data-theme="light"]) .i-moon { display: none; } }
@media (max-width: 640px) { .top nav { gap: 18px; } .top nav .hide-sm { display: none; } }

/* Hero: text left, the live wall bleeding off the right edge. */
.hero { padding: 72px 0 96px; }
.hero .page { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); gap: 56px; align-items: start; }
.hero h1 { max-width: 11em; }
.hero .lede { margin-top: 24px; }
.hero-media { margin: 0 calc((100vw - min(1180px, 100vw - 48px)) / -2) 0 0; }
.hero-media video, .hero-media img { width: 100%; height: auto; border-radius: 10px 0 0 10px; border: 1px solid var(--rule); border-right: 0; background: #0c0d0e; }
.hero-media figcaption { margin-top: 12px; font-size: 14px; color: var(--faint); max-width: 44em; }
@media (max-width: 980px) {
  .hero .page { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-media { margin-right: -24px; }
}

/* The install command: the page's one primary action. */
.cmd { margin-top: 32px; display: flex; align-items: stretch; max-width: 40em; border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--housing); overflow: hidden; }
.cmd code { flex: 1; min-width: 0; padding: 14px 12px; font-size: 13px; line-height: 1.5; white-space: nowrap; overflow-x: auto; scrollbar-width: none; background: none; border-radius: 0; color: var(--signal); }
.cmd code::-webkit-scrollbar { display: none; }
.cmd code .p { color: var(--faint); user-select: none; }
.cmd button { flex: none; padding: 0 16px; border: 0; border-left: 1px solid var(--rule-strong); background: var(--live); color: var(--live-ink); font: 600 14px/1 var(--sans); cursor: pointer; }
.cmd button:hover { filter: brightness(1.08); }
.cmd button[data-done] { background: var(--online); }
.after-cmd { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 15px; }
.note { margin-top: 10px; font-size: 14px; color: var(--faint); max-width: 34em; }

/* Sections: a rule above, a heading column and a content column. */
.sec { padding: 88px 0; border-top: 1px solid var(--rule); }
.sec .page { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 56px; }
.sec .page > header p { margin-top: 16px; }
.sec.full .page { grid-template-columns: minmax(0, 1fr); gap: 36px; }
.sec.full .page > header { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 56px; align-items: end; }
.sec.full .page > header p { margin-top: 0; }
@media (max-width: 900px) {
  .sec { padding: 64px 0; }
  .sec .page, .sec.full .page > header { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

.shot { margin: 0; }
.shot img, .shot video { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--rule); background: #0c0d0e; }
.shot figcaption { margin-top: 12px; font-size: 14px; color: var(--faint); }

.facts { margin: 28px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.facts li { display: grid; grid-template-columns: minmax(0, 13em) minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 15.5px; color: var(--overlay); }
.facts li b { color: var(--signal); font-weight: 560; }
@media (max-width: 560px) { .facts li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

pre.term { margin: 0; padding: 20px 22px; border-radius: 8px; background: var(--housing); border: 1px solid var(--rule); font-size: 13.5px; line-height: 1.7; color: var(--overlay); overflow-x: auto; white-space: pre; }
pre.term .c { color: var(--faint); }
pre.term .s { color: var(--signal); }
pre.term .v { color: var(--live); }
.term-title { display: block; margin-bottom: 10px; font-size: 14px; color: var(--faint); }

/* Tables for anything tabular: timings, compatibility. */
.tbl { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.tbl caption { text-align: left; padding-bottom: 10px; font-size: 14px; color: var(--faint); caption-side: top; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--rule); }
.tbl thead th { font-size: 14px; font-weight: 560; color: var(--faint); border-bottom-color: var(--rule-strong); }
.tbl tbody th { font-weight: 560; color: var(--signal); width: 12em; }
.tbl td { color: var(--overlay); }
.tbl .num { font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scroll-x { overflow-x: auto; }

.phones { display: block; max-width: 760px; }
/* iPhone screenshots: the phone's own rounded screen corners, circular at 1320x2868. */
.app-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; max-width: 760px; align-content: start; }
.app-shots figure { margin: 0; }
.app-shots img { display: block; width: 100%; height: auto; border-radius: 12% / 5.52%; background: #0c0d0e; }
.app-shots figcaption { margin-top: 12px; font-size: 14px; color: var(--overlay); }
@media (max-width: 640px) {
  .app-shots { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 64%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .app-shots figure { scroll-snap-align: start; }
}

.cols2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.cols2 h3 { margin-bottom: 10px; }
.plain { margin: 0; padding: 0 0 0 1.1em; color: var(--overlay); }
.plain li + li { margin-top: 8px; }
@media (max-width: 760px) { .cols2 { grid-template-columns: minmax(0, 1fr); } }

/* Questions */
.qa details { border-bottom: 1px solid var(--rule); }
.qa details:first-child { border-top: 1px solid var(--rule); }
.qa summary { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; cursor: pointer; list-style: none; font-weight: 560; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font-family: var(--mono); color: var(--faint); }
.qa details[open] summary::after { content: "−"; }
.qa details p { padding: 0 0 20px; color: var(--overlay); max-width: 40em; }

/* Footer */
.foot { padding: 56px 0 40px; border-top: 1px solid var(--rule); font-size: 15px; }
.foot .page { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.foot h2 { font-size: 15px; letter-spacing: 0; font-weight: 600; margin-bottom: 10px; }
.foot ul { margin: 0; padding: 0; list-style: none; }
.foot li + li { margin-top: 6px; }
.foot ul a { color: var(--overlay); text-decoration: none; }
.foot ul a:hover { color: var(--signal); text-decoration: underline; }
.foot .about { color: var(--overlay); max-width: 24em; margin-top: 12px; }
.legal { grid-column: 1 / -1; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 13.5px; color: var(--faint); max-width: 70em; }
.legal a { color: var(--overlay); }
@media (max-width: 760px) { .foot .page { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .foot .page > :first-child { grid-column: 1 / -1; } }

/* Install page */
.page-head { padding: 64px 0 24px; }
.page-head .lede { margin-top: 18px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.2em minmax(0, 1fr); gap: 4px 12px; padding: 16px 0; border-top: 1px solid var(--rule); }
.steps li::before { content: counter(s); grid-row: span 2; font-family: var(--mono); font-size: 15px; color: var(--faint); }
.steps h3 { font-size: 16px; }
.steps p { color: var(--overlay); font-size: 15.5px; }

/* 404 */
.lost { padding: 120px 0; }
.lost .lede { margin-top: 18px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.spaced { margin-top: 28px; }
.after-cmd.spaced { margin-top: 20px; }
.cols2 .after-cmd { margin-top: 14px; }
h3 + .body { margin-top: 8px; }
/* The App Store link: the one primary action of the phone section. */
.store-row { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.store { display: inline-block; padding: 10px 16px; border-radius: 6px; background: var(--live); color: var(--live-ink); font-weight: 560; text-decoration: none; }
.store:hover { filter: brightness(1.08); }
.store:focus-visible { outline: 2px solid var(--live); outline-offset: 3px; }
.store-row span { font-size: 14px; color: var(--overlay); }
.sec .page > header .note { margin-top: 20px; }
/* The demo's guest login: two copyable rows. */
#demo .cmd { margin-top: 0; }
#demo .cmd.spaced { margin-top: 12px; }
