/* Underglass website: one stylesheet for every page. True black, SF Pro for words and
   SF Mono for small labels (the app's type), the dot-matrix face for the wordmark, and the
   amber glow as the one accent. No inline styles: the Content-Security-Policy in _headers
   allows this file only. */

@font-face {
  font-family: "Underglass Matrix";
  src: url("/assets/fonts/UnderglassMatrix-Regular.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #000;
  --plate: #0c0d0f;
  --rule: rgba(255, 255, 255, 0.09);
  --text: rgba(255, 255, 255, 0.94);
  --muted: rgba(255, 255, 255, 0.62);
  --faint: rgba(255, 255, 255, 0.42);
  --accent: #ffb340;
  --glow: rgba(255, 179, 64, 0.45);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", system-ui, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro", system-ui, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --matrix: "Underglass Matrix", var(--mono);
  --gutter: 20px;
}

@media (prefers-contrast: more) {
  :root { --rule: rgba(255, 255, 255, 0.32); --muted: rgba(255, 255, 255, 0.86); --faint: rgba(255, 255, 255, 0.7); }
}

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

html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

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

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

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

.skip {
  position: absolute; left: var(--gutter); top: -60px; padding: 8px 14px; border-radius: 10px;
  background: var(--accent); color: #000; font-weight: 600; text-decoration: none; z-index: 2;
}
.skip:focus { top: 12px; }

/* Header and footer */

.bar {
  max-width: 980px; margin: 0 auto; padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { width: 36px; height: 36px; border-radius: 22.37%; box-shadow: 0 0 0 1px var(--rule); }
.wordmark {
  font: 18px/1 var(--matrix); letter-spacing: 0.08em; color: var(--accent);
  text-shadow: 0 0 10px var(--glow);
}
.nav { display: flex; gap: 20px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 10px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

footer {
  max-width: 980px; margin: 72px auto 0; padding: 24px var(--gutter) 48px;
  border-top: 1px solid var(--rule); color: var(--faint); font-size: 14px;
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
}
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* Type */

main { display: block; }
.prose { max-width: 680px; margin: 0 auto; padding: 32px var(--gutter) 0; }

.kicker {
  font: 600 12px/1.2 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint);
  margin: 0;
}
.kicker.lit { color: var(--accent); }

h1, h2, h3 { font-family: var(--display); color: var(--text); text-wrap: balance; }
h1 { font-size: 36px; line-height: 1.1; letter-spacing: -0.02em; margin: 12px 0 14px; font-weight: 700; }
h2 { font-size: 26px; line-height: 1.2; letter-spacing: -0.01em; margin: 10px 0 12px; font-weight: 700; }
h3 { font-size: 18px; line-height: 1.3; margin: 0 0 6px; font-weight: 600; }
p { margin: 0 0 14px; text-wrap: pretty; }
.lede { color: var(--muted); font-size: 19px; line-height: 1.5; }
.muted { color: var(--muted); }
.small { font-size: 14px; color: var(--faint); }
ul, ol { padding-left: 22px; margin: 0 0 14px; }
li { margin: 6px 0; }
li::marker { color: var(--faint); }

@media (min-width: 720px) {
  h1 { font-size: 52px; }
  h2 { font-size: 32px; }
  .prose { padding-top: 48px; }
}

/* Landing */

.hero { max-width: 980px; margin: 0 auto; padding: 28px var(--gutter) 0; }
.hero .copy { max-width: 620px; }
.hero h1 { margin-top: 14px; }
.requires { font: 13px/1.4 var(--mono); color: var(--faint); margin: 18px 0 0; }

/* The App Store badge, once StoreLinks.appStore exists (index.html, tools/site/check_site.py). */
.store { display: inline-block; margin-top: 22px; }
.store img { height: 48px; width: auto; }

.stage { margin: 36px auto 0; max-width: 540px; }

.section { max-width: 980px; margin: 0 auto; padding: 72px var(--gutter) 0; }
.section .copy { max-width: 620px; }

.grid { display: grid; gap: 16px; margin-top: 28px; grid-template-columns: 1fr 1fr; align-items: start; }
.grid .wide { grid-column: 1 / -1; }
@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .grid .wide { grid-column: span 2; }
}

figure { margin: 0; }
figcaption { font: 12px/1.4 var(--mono); color: var(--faint); margin-top: 10px; letter-spacing: 0.02em; }

/* A widget on true black: a hairline traces its own corner, so a True Black widget still
   shows where it ends. The corners match the renders (iOS's widget radius at each size). */
.widget { border-radius: 14.1%; box-shadow: 0 0 0 1px var(--rule); }
.widget.medium { border-radius: 7.6% / 16.3%; }
.widget.bare { box-shadow: none; }

.note {
  margin-top: 28px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 14px;
  color: var(--muted); font-size: 14px; max-width: 620px;
}

.facts { display: grid; gap: 12px; margin: 24px 0 18px; }
@media (min-width: 720px) { .facts { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--plate); border: 1px solid var(--rule); border-radius: 18px; padding: 18px 20px;
}
.card p { color: var(--muted); margin: 0; }
.card p + p { margin-top: 10px; }
.prose .card { margin: 16px 0; }

/* Support */

.steps { list-style: none; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-left: 40px; margin: 12px 0; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--rule);
  font: 600 13px/24px var(--mono); text-align: center; color: var(--accent);
}

details { border-top: 1px solid var(--rule); }
details:last-of-type { border-bottom: 1px solid var(--rule); }
summary {
  cursor: pointer; list-style: none; padding: 16px 32px 16px 0; position: relative;
  font-weight: 600; font-family: var(--display);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 4px; top: 14px; font: 400 22px/1 var(--mono); color: var(--faint);
}
details[open] summary::after { content: "\2212"; }
details > div { padding: 0 0 18px; color: var(--muted); }
details > div p:last-child { margin-bottom: 0; }

.contact { font-size: 19px; }
