/* White page, Avenir Next, neutral company chrome. The page opens on
   the featured app and its live demo; other apps follow as smaller cards.

   Color rule: the company owns only white, ink and gray, and every button is
   ink. Apps take their color from a fixed set of six soft colors, in the
   order of the classic six-color rainbow. Color belongs to the position on
   the page, not to the app: shared/color.js picks
   the featured color at random on each load (data-c on the root element) and
   the cards continue around the six from there. Without JavaScript the
   featured app is blue and the cards run green to purple. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #15171c;
  --muted: #5a5f6b;
  --line: #e2e4ea;
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
}
:root, [data-c="0"], html:not([data-c]) .cards > li:nth-child(6n) { --tint: #e6effb; --tint-strong: #c9dcf5; --accent: #1f5aa8; --wall: #7ea6d8; }
[data-c="1"], html:not([data-c]) .cards > li:nth-child(6n + 1) { --tint: #e9f5e6; --tint-strong: #cfe8c9; --accent: #2f6b2a; --wall: #86b47d; }
[data-c="2"], html:not([data-c]) .cards > li:nth-child(6n + 2) { --tint: #fdf4d3; --tint-strong: #f7e3a1; --accent: #7a5b00; --wall: #dcc068; }
[data-c="3"], html:not([data-c]) .cards > li:nth-child(6n + 3) { --tint: #fdebd9; --tint-strong: #f8d2ae; --accent: #9a4a00; --wall: #dfa26a; }
[data-c="4"], html:not([data-c]) .cards > li:nth-child(6n + 4) { --tint: #fce6e4; --tint-strong: #f6c6c2; --accent: #a32a25; --wall: #d98a85; }
[data-c="5"], html:not([data-c]) .cards > li:nth-child(6n + 5) { --tint: #f0e8f8; --tint-strong: #dccbee; --accent: #6a3a9c; --wall: #a88dcc; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 1.0625rem; line-height: 1.55; }
a { color: inherit; text-underline-offset: 0.22em; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip { position: absolute; left: 1rem; top: -5rem; padding: 0.75rem 1rem; background: var(--bg); z-index: 10; }
.skip:focus { top: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: min(100% - 5rem, 74rem); margin-inline: auto; }

.site-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-block: 1.1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.01em; text-decoration: none; }
.tile { display: block; flex: none; width: 2.1rem; height: 2.1rem; border-radius: 22%; background: var(--ink); overflow: hidden; }
.tile svg { display: block; width: 100%; height: 100%; }
.tile text { font-size: 52px; font-weight: 700; text-anchor: middle; fill: #fff; }
/* The second impression takes the page color, and the mark comes into
   register while the pointer is on it. */
.tile .second { fill: var(--wall); transition: transform 0.25s ease; }
.brand:hover .second, .brand:focus-visible .second { transform: translate(-6px, -4px); }
@media (prefers-reduced-motion: reduce) { .tile .second { transition: none; } }
.site-head nav { display: flex; gap: 1.75rem; font-weight: 500; }
.site-head nav a { text-decoration: none; padding-block: 0.5rem; }
.site-head nav a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0; font-weight: 600; }
h1 { font-size: clamp(2rem, 3.9vw, 3.25rem); line-height: 1.1; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 1.25rem; }
h3 { font-size: 1.125rem; line-height: 1.35; margin-bottom: 0.3rem; }
p { margin: 0 0 1rem; }
.muted, .fine { color: var(--muted); }
.fine { font-size: 0.9375rem; line-height: 1.5; margin: 0.9rem 0 0; }
.label { font-size: 0.9375rem; font-weight: 600; color: var(--muted); margin: 0 0 0.6rem; letter-spacing: 0; }
.platform { font-weight: 600; color: var(--accent); }

.button { display: inline-block; padding: 0.75rem 1.25rem; border: 1.5px solid var(--ink); border-radius: 0.65rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.button:hover { color: inherit; background: rgba(0, 0, 0, 0.06); }
.button.primary { background: var(--ink); color: #fff; }
.button.primary:hover { color: #fff; background: #000; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.notice { margin: 1.5rem 0 0; padding: 0.85rem 1.1rem; border-radius: 0.65rem; background: var(--tint-strong); font-weight: 600; }

/* Home: the featured app */
.feature { background: var(--tint); padding-block: 3rem; }
.feature-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3.5rem; align-items: center; }
.feature-text img { display: block; width: 5.5rem; height: 5.5rem; margin-bottom: 1.25rem; }
.feature-text h2 { font-size: clamp(2.25rem, 4.2vw, 3.5rem); letter-spacing: -0.03em; margin-bottom: 0.15rem; }
.feature-text h2 a { text-decoration: none; }
.what { font-size: 1.25rem; line-height: 1.45; max-width: 30rem; margin-top: 0.9rem; }
.what b { font-weight: 600; }

/* Home: the other apps */
.more { padding-block: 3rem 1rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.card { background: var(--tint); border-radius: 1rem; padding: 1.1rem 1.1rem 1.3rem; }
.card .shot { aspect-ratio: 16 / 9; border-radius: 0.6rem; background: var(--tint-strong); display: grid; place-items: center; color: var(--accent); font-size: 0.9375rem; font-weight: 600; margin-bottom: 1rem; }
.card-head { display: flex; align-items: center; gap: 0.75rem; }
.card .ph { flex: none; width: 2.75rem; height: 2.75rem; border-radius: 22%; background: var(--accent); }
.card h3 { font-size: 1.25rem; margin: 0; line-height: 1.2; }
.card .platform { font-size: 0.9375rem; margin: 0; }
.card p.desc { margin: 0.75rem 0 0; }

.company { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; padding-block: 3rem 4rem; }
.company p { max-width: 38rem; }

/* Demo */
.ffm { --ffm-wall: var(--wall); --ffm-accent: var(--accent); --ffm-track: var(--tint-strong); --ffm-text: var(--ink); --ffm-muted: var(--muted); --ffm-ui: "Avenir Next", Avenir, system-ui, sans-serif; }
/* Room for the longest mode description, so the desk does not move when the mode changes. */
.ffm-hint { min-height: 3em; }
.ffm-desk, .ffm-desk * { font-family: system-ui, -apple-system, sans-serif; }
.ffm-win[data-id="terminal"] .ffm-body, .ffm-win[data-id="terminal"] .ffm-body * { font-family: var(--ffm-mono); }

/* App page */
.app-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3.5rem; align-items: start; padding-block: 3rem 3.5rem;
  background: var(--tint); box-shadow: 0 0 0 100vmax var(--tint); clip-path: inset(0 -100vmax); }
.app-line { display: flex; align-items: center; gap: 0.8rem; margin: 0 0 1.4rem; color: var(--muted); }
.app-line img { width: 3.5rem; height: 3.5rem; }
.app-line b { color: var(--ink); font-weight: 700; }
.lede { font-size: 1.1875rem; margin: 1.25rem 0 0; }
.sec { padding-block: 3rem; border-top: 1px solid var(--line); }
.app-hero + .sec { border-top: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.two p, .details dd { margin: 0; }
.sec > .muted { max-width: 40rem; margin-bottom: 1.75rem; }
.details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem 2.5rem; margin: 0; }
.details dt { font-weight: 600; margin-bottom: 0.2rem; }
.buy { display: grid; grid-template-columns: 7fr 5fr; gap: 3rem; align-items: start; }
.price-box { background: var(--tint); padding: 2rem; border-radius: 0.9rem; }
.price { font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; margin: 0 0 1rem; }
.plain { margin: 0; padding-left: 1.1rem; }
.plain li { margin-bottom: 0.4rem; }
.plain li:last-child { margin-bottom: 0; }
.two p + p { margin-top: 0.6rem; }
.after { margin: 1.75rem 0 0; color: var(--muted); }
.needs h3 { margin-top: 1.5rem; }
.needs h3:first-child { margin-top: 0; }

.site-foot { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; border-top: 1px solid var(--line); padding-block: 1.4rem 2.5rem; color: var(--muted); font-size: 0.9375rem; }
.site-foot span { flex: 1; }

/* Policy pages */
.doc { padding-block: 3rem 4rem; }
.doc > * { max-width: 44rem; }
.doc h1 { margin-bottom: 1.25rem; }
.doc h2 { font-size: 1.25rem; letter-spacing: -0.01em; margin: 2rem 0 0.4rem; }
.price-box .muted { margin: -0.4rem 0 1rem; }

@media (max-width: 860px) {
  .wrap { width: calc(100% - 2.5rem); }
  .feature { padding-block: 2rem; }
  .feature-grid, .company, .app-hero, .two, .details, .buy { grid-template-columns: 1fr; gap: 1.75rem; }
  .feature-text img { width: 4.5rem; height: 4.5rem; margin-bottom: 1rem; }
  .app-hero { padding-block: 2rem 2.5rem; }
  .more { padding-top: 2rem; }
  .sec { padding-block: 2rem; }
  .site-head nav { gap: 1.1rem; }
  .ffm-hint { min-height: 4.5em; }
}
