/* usefrontmost.com
   Layout: a white page with one thing to look at at a time: the iPhone with
   the app in use, then three scenes of what it does, each a short loop.
   Type is monospaced and lowercase, as the app; the iPhone and the scenes
   keep the app's dark look. */
:root {
  --page: oklch(0.995 0 0);
  --window: oklch(1 0 0);
  --bar: oklch(0.975 0 0);
  --sheet: oklch(0.960 0 0);
  --ink: oklch(0.18 0 0);
  --secondary: oklch(0.44 0 0);
  --hint: oklch(0.58 0 0);
  --rule: oklch(0.92 0 0);
  --accent: oklch(0.66 0.17 62);
  --accent-ink: oklch(0.58 0.16 58);
  --shadow: 0 1px 2px oklch(0 0 0 / 0.04), 0 24px 60px -20px oklch(0 0 0 / 0.18), 0 0 0 1px oklch(0 0 0 / 0.06);
  --phone-shadow: 0 50px 90px -30px oklch(0 0 0 / 0.35), 0 0 0 1px oklch(0 0 0 / 0.10);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 15px/1.6 var(--mono);
  padding-inline: 20px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--hint); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; }
.sec { color: var(--secondary); }
.hint { color: var(--hint); font-size: 12px; }
.acc { color: var(--accent); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

nav { max-width: 1040px; margin-inline: auto; display: flex; align-items: center; gap: 22px; padding-block: 22px; font-size: 13px; }
nav .home { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 15px; }
/* the mark on the page itself: its white melts into the white, only the [x] stays */
nav img { width: 30px; height: 30px; mix-blend-mode: multiply; }
nav .grow { flex: 1; }
nav a.link { text-decoration: none; color: var(--secondary); }
nav a.link:hover { color: var(--ink); }

/* hero: words and buttons first (no scrolling to reach them on a 13-inch
   Mac), then the iPhone with terminal lines typing on both sides */
.hero { max-width: 1100px; margin: 4px auto 0; display: grid; gap: 10px; justify-items: center; text-align: center; }
.hero h1 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.035em; line-height: 1.1; }
.hero .lead { color: var(--secondary); font-size: 13px; white-space: nowrap; }
.hero .lead b { color: var(--ink); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--rule); color: var(--ink); background: var(--window); text-decoration: none; font-size: 12px; transition: border-color .2s; }
.btn:hover { border-color: var(--hint); }
.btn.main { background: var(--ink); color: var(--page); border-color: var(--ink); }
.btn.main span { color: oklch(1 0 0 / 0.55); }
.btn span { color: var(--hint); }
.stage { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 48px; margin-top: 26px; }
.iphone { margin: 0; width: min(300px, 70vw, calc((100svh - 240px) * 0.46)); aspect-ratio: 1320 / 2868; border-radius: 14% / 6.5%; padding: 1.6%; background: oklch(0.12 0 0); box-shadow: var(--phone-shadow); }
.iphone video { display: block; width: 100%; height: 100%; border-radius: 13% / 6%; object-fit: cover; background: oklch(0.159 0 0); }

/* the terminal lines: a command typed, its answer, then the next */
.term { display: grid; gap: 6px; font-size: 13px; color: var(--secondary); min-height: 8em; align-content: center; }
.term.left { justify-items: end; text-align: right; }
.term.right { justify-items: start; text-align: left; }
.term .cmd::before { content: "› "; color: var(--accent); }
.term .out { color: var(--accent-ink); transition: opacity .4s; }
.term .out.hide { opacity: 0; }
.term .caret { display: inline-block; width: .6em; height: 1.1em; margin-left: 2px; vertical-align: -0.18em; background: var(--ink); animation: blink 1s steps(1) infinite; }
.term .gone { opacity: 0; transition: opacity .5s; }
@keyframes blink { 50% { opacity: 0; } }

/* what it does: a plain list in the app's own marks */
.what { max-width: 900px; margin: 110px auto 0; display: grid; gap: 22px; }
.what h2 { font-weight: 400; text-align: center; }
.list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 48px; }
.list li { display: grid; grid-template-columns: 9ch 1fr; gap: 14px; align-items: baseline; font-size: 14px; color: var(--secondary); }
.list .mk { color: var(--accent-ink); font-weight: 600; text-align: right; white-space: nowrap; }
.watch { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; vertical-align: -3px; }

footer { max-width: 1040px; margin: 130px auto 0; border-top: 1px solid var(--rule); padding-block: 24px 44px; display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--hint); font-size: 12px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

/* privacy: the same look as the home page. A small centred header, the
   languages as buttons, then each section's heading beside its text. */
.doc { max-width: 900px; margin: 10px auto 0; }
.doc-head { text-align: center; display: grid; gap: 10px; justify-items: center; margin-bottom: 18px; }
.doc-head h1 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.035em; line-height: 1.1; }
.doc-head .lead { color: var(--secondary); font-size: 13px; max-width: 62ch; }
.langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 64px; }
.langs a, .langs b { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--rule); font-size: 12px; text-decoration: none; color: var(--secondary); font-weight: 400; }
.langs a:hover { border-color: var(--hint); color: var(--ink); }
.langs b { background: var(--ink); border-color: var(--ink); color: var(--page); }
.doc .part { display: grid; grid-template-columns: 24ch 1fr; gap: 14px 40px; padding-block: 26px; border-top: 1px solid var(--rule); }
.doc .part h2 { font-size: 13px; color: var(--accent-ink); font-weight: 600; text-align: right; line-height: 1.6; }
.doc .part div { display: grid; gap: 12px; font-size: 14px; color: var(--secondary); }
.doc .part p, .doc .part ul { margin: 0; }
.doc .part ul { padding-left: 2ch; display: grid; gap: 10px; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc a { color: var(--ink); }

@media (max-width: 980px) {
  .stage { grid-template-columns: 1fr; justify-items: center; }
  .term { display: none; }
}
@media (max-width: 860px) {
  .doc .part { grid-template-columns: 1fr; gap: 10px; }
  .doc .part h2 { text-align: left; }
  .hero .lead { white-space: normal; max-width: 40ch; }
  .list { grid-template-columns: 1fr; gap: 14px; }
  .list li { grid-template-columns: 7ch 1fr; }
  .what { margin-top: 80px; }
  footer { margin-top: 96px; }
}
@media (prefers-reduced-motion: reduce) { .term .caret { animation: none; } }
