/* Ferry, a Kybos Labs project. The same rules as the Kybos Labs site (kybos/site/README.md,
   "Design rules"): ink on paper, two ground tones for dithered texture, square corners, no
   shadows, gradients, blur or glass. The folder mark is 1-bit; screenshots are shown as they are.
   Type: Avenir Next, with Nunito Sans from assets/fonts where Avenir is missing (Kazemat is
   only for the name KYBOS LABS, which this site does not set). Sentence case, tabular figures for numbers.
   Text at least 15px (body 18px), small text at least 4.5:1, tap targets at least 44px.
   Text meant to be read is full ink; grey only for labels and meta. */
/* Nunito Sans (SIL Open Font License, assets/fonts/OFL.txt), served from this site: no Google request */
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url("assets/fonts/nunito-sans-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url("assets/fonts/nunito-sans-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #1c1a17;
  --paper: #f3ece2;
  --sans: "Avenir Next", "Nunito Sans", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: 40px;
  color-scheme: light;
  --ground: var(--paper);
  --ground-2: #e2d7c6;            /* the two darker steps of the dithered background */
  --ground-3: #cdbfaa;
  --text: var(--ink);
  --muted: #4a453e;                /* 8:1 on paper */
  --faint: #5c564e;                /* 6:1 on paper */
  --line: rgba(28, 26, 23, .2);
}
@media (max-width: 720px) { :root { --gutter: 16px; } .site-head { padding: 8px 0; } .nav { gap: 0 20px; } }
@media (max-width: 380px) { .nav { gap: 0 14px; } }

* { box-sizing: border-box; }
html { background: var(--ground); scroll-padding-top: 16px; }
body { margin: 0; background: var(--ground); color: var(--text); font: 400 18px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-kerning: normal;
  min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.skip { position: absolute; left: -999px; min-height: 44px; display: inline-flex; align-items: center; padding: 0 12px; }
.skip:focus { left: 16px; top: 16px; background: var(--text); color: var(--ground); z-index: 9; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); flex: 1; display: flex; flex-direction: column; }
main { flex: 1; outline: none; min-width: 0; }
.label { font-size: 16px; line-height: 1.3; color: var(--muted); }
code, kbd { font: 500 .9em/1.4 var(--mono); }
code { overflow-wrap: anywhere; }
kbd { display: inline-block; padding: 0 6px; border: 1px solid var(--line); white-space: nowrap; font-size: 15px; }

/* header: the folder mark (drawn in whole cells) and the name, set in Avenir */
.site-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap;
  padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-height: 44px; min-width: 44px; }
.mark { width: 32px; height: 26px; display: block; fill: var(--text); shape-rendering: crispEdges; }
.brand-name { font-size: 22px; line-height: 1; font-weight: 700; letter-spacing: -.01em; }
.nav { display: flex; gap: 0 28px; flex-wrap: wrap; align-items: center; }
.nav a { font-size: 17px; line-height: 1; color: var(--muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { color: var(--text); }
@media (max-width: 420px) { .nav .wide { display: none; } }

/* animated dithered ground (bg.js), fixed behind everything */
.ground { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none;
  image-rendering: pixelated; image-rendering: crisp-edges; }
.ground-blur { filter: blur(5px); opacity: .6; }   /* the things behind long text (bg.js) */
.wrap, .band { position: relative; z-index: 1; }

/* hero */
.hero { min-height: min(68vh, 640px); display: flex; flex-direction: column; justify-content: center;
  padding: 64px 0 56px; }
.hero h1 { font-size: clamp(36px, 6.2vw, 80px); line-height: 1.02; letter-spacing: -.03em; margin: 0; max-width: 12em; }
.hero-sub { font-size: 21px; line-height: 1.5; color: var(--text); margin: 28px 0 36px; max-width: 34em; }
.hero-note { margin: 16px 0 0; font-size: 17px; color: var(--text); }
@media (max-width: 720px) {
  .hero { min-height: 0; padding: 40px 0 48px; }
  .hero-sub { font-size: 18px; }
}
.shot { margin: 0 0 24px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); }
.facts div { padding: 14px 16px 16px 0; border-bottom: 1px solid var(--line); }
.facts div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.facts dt { font-size: 16px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {   /* two by two on phones */
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div:nth-child(odd) { padding-left: 0; border-left: 0; }
}

/* blocks: a full ink rule above each heading */
.block { padding: 96px 0 0; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap;
  padding-top: 18px; border-top: 1px solid var(--text); margin-bottom: 40px; }
.block-head h2 { font-size: 32px; line-height: 1.1; letter-spacing: -.02em; margin: 0; }
.block-head p { margin: 0; color: var(--text); max-width: 34em; }

/* features: the picture on the left, the words on the right; one column on phones */
.feature { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 48px; padding: 0 0 64px; align-items: start; }
.feature + .feature { padding-top: 32px; border-top: 1px solid var(--line); }
.feature h3 { font-size: 24px; line-height: 1.2; letter-spacing: -.01em; margin: 0 0 12px; }
.feature p { margin: 0 0 14px; color: var(--text); font-size: 18px; line-height: 1.6; max-width: 34em; }
.feature p:last-child { margin-bottom: 0; }
.feature .tall { max-width: 360px; }
@media (min-width: 861px) { .feature.fig-narrow { grid-template-columns: 396px minmax(0, 1fr); } }   /* the settings shot is narrow: no hole beside it */
@media (min-width: 861px) {   /* 10% larger, drawn over its own padding so the lines stay put */
  .feature .tall { transform: scale(1.1); transform-origin: 0 0; }
}
@media (max-width: 860px) {
  .feature { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-bottom: 48px; }
}

/* more: a ruled list, the name on the left and the words beside it; stacked on phones */
.cards { border-bottom: 1px solid var(--line); }
.card { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 4px 40px; padding: 18px 0 20px; border-top: 1px solid var(--line); }
.card h3 { grid-column: 1; grid-row: 1 / span 3; font-size: 21px; line-height: 1.3; margin: 0; }
.card p { grid-column: 2; margin: 0; color: var(--text); font-size: 18px; line-height: 1.6; max-width: 40em; }
.card p + p { margin-top: 8px; }
@media (max-width: 860px) {
  .card { grid-template-columns: minmax(0, 1fr); }
  .card h3, .card p { grid-column: 1; grid-row: auto; }
  .card h3 { margin-bottom: 6px; }
}

/* keyboard shortcuts */
.keys { width: 100%; border-collapse: collapse; }
.keys th { text-align: left; font-size: 16px; font-weight: 500; color: var(--muted); padding: 10px 16px 10px 0; border-bottom: 1px solid var(--line); }
.keys td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; font-size: 17px; }
.keys td:first-child { width: 42%; }
.keys td:first-child kbd { margin: 2px 0; }
.keys-wrap { columns: 2; column-gap: 40px; }
.keys-wrap .keys { break-inside: avoid; }
.after { margin: 20px 0 0; color: var(--text); font-size: 18px; }
@media (max-width: 860px) { .keys-wrap { columns: 1; } }
@media (max-width: 480px) {
  .keys, .keys tbody, .keys tr, .keys td { display: block; width: auto !important; }
  .keys thead { display: none; }
  .keys tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .keys td { border: 0; padding: 0; }
  .keys td + td { color: var(--text); margin-top: 4px; }
}

/* licence: words on the left, a spec list on the right */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.split p { margin: 0 0 14px; max-width: 34em; }
.split .muted { color: var(--text); font-size: 18px; line-height: 1.6; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.spec { margin: 0 0 28px; border-top: 1px solid var(--line); }
.spec div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.spec dt { font-size: 17px; color: var(--muted); }
.spec dd { margin: 0; font-size: 17px; text-align: right; font-variant-numeric: tabular-nums; }
pre { margin: 0 0 20px; padding: 18px 20px; background: var(--ink); color: var(--paper); overflow-x: auto;
  font: 500 16px/1.6 var(--mono); }
pre code { font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
pre .c { color: var(--ground-3); } /* comments: a ground tone, 9:1 on ink */
.flags { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.flags li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 18px; color: var(--text); }
.flags code { color: var(--text); }

/* buttons */
.buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 20px; text-decoration: none;
  font: 600 17px/1 var(--sans); background: var(--text); color: var(--ground); border: 1px solid var(--text);
  transition: background-color 120ms, color 120ms; }
.button:hover { background: transparent; color: var(--text); }
.button.secondary { background: var(--ground); color: var(--text); }
.button.secondary:hover { background: var(--text); color: var(--ground); }

/* footer and band */
.site-foot { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; padding: 48px 0 32px;
  margin-top: 112px; border-top: 1px solid var(--line); font-size: 16px; color: var(--muted); }
.foot-label { margin: 0 0 12px; font-size: 15px; color: var(--muted); }
.foot-contact { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: 4px 16px; }
.foot-contact .foot-label { flex-basis: 100%; }
.foot-mail { font-size: clamp(22px, 2.6vw, 32px); font-weight: 600; letter-spacing: -.01em; color: var(--text);
  text-decoration: none; overflow-wrap: anywhere; min-height: 44px; display: inline-flex; align-items: center; }
.foot-mail:hover { text-decoration: underline; text-underline-offset: .15em; }
.copy { min-height: 44px; padding: 0 14px; font: 500 15px/1 var(--sans); color: var(--muted); background: var(--ground);
  border: 1px solid var(--line); cursor: pointer; }
.copy:hover { color: var(--text); border-color: var(--text); }
.foot-nav { display: flex; flex-direction: column; align-items: flex-start; }
.foot-nav a { min-height: 44px; display: inline-flex; align-items: center; color: var(--text); text-decoration: none; font-size: 17px; }
.foot-nav a:hover, .foot-meta a:hover { text-decoration: underline; text-underline-offset: .2em; }
.foot-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-top: 20px; border-top: 1px solid var(--line); }
.foot-meta a { color: var(--muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; margin: -12px 0; }
@media (max-width: 720px) {
  .site-foot { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 40px; margin-top: 80px; }
  .foot-meta { flex-direction: column; }
}
.band { height: 40px; background: var(--text); }
/* the desk of Kiris, the Kybos Labs mascot, above the band (desk.js, copied from the Kybos site) */
.desk { position: relative; z-index: 1; }
.desk-art { display: block; width: 100%; height: 220px; image-rendering: pixelated; image-rendering: crisp-edges; touch-action: manipulation; }
@media (max-width: 720px) { .desk-art { height: 212px; } }

/* screenshots: shown as they are. The app windows keep their own rounded corners (clipped to the
   radius measured in the screenshots: 24 px on 1600 x 976, 35 px on 1200 x 1790) with no frame,
   so no square box shows around them; the context menu crop is square and keeps a hairline. */
.fig { margin: 0; }
.fig img { display: block; width: 100%; height: auto; }
.fig.win img { border-radius: 1.5% / 2.46%; }
.fig.win-tall img { border-radius: 2.92% / 1.96%; }
.fig.plain { outline: 1px solid var(--line); }
.gap-top { margin-top: 20px; }

/* credits page */
.credits { padding: 32px 0 0; max-width: 46em; }
.credits h1 { font-size: 48px; line-height: 1.05; letter-spacing: -.02em; margin: 0 0 12px; }
.credits .lede { color: var(--text); margin: 0 0 40px; }
.credits .spec dd a { color: var(--text); }
@media (max-width: 720px) { .credits h1 { font-size: 36px; } }

/* legal pages */
.legal { padding: 32px 0 0; max-width: 40em; }
.legal h1 { font-size: 48px; line-height: 1.05; letter-spacing: -.02em; margin: 0 0 8px; }
.legal .updated { color: var(--muted); font-size: 16px; margin: 0 0 32px; }
.legal .lede { color: var(--text); font-size: 20px; line-height: 1.5; margin: 0 0 8px; }
.legal h2 { font-size: 24px; line-height: 1.25; margin: 40px 0 12px; }
.legal p, .legal li { line-height: 1.6; }
.legal ul { padding-left: 1.2em; margin: 0; }
.legal li + li { margin-top: 10px; }
.legal a { color: var(--text); }
@media (max-width: 720px) { .legal h1 { font-size: 36px; } }
.foot-legal { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.split.solo { grid-template-columns: minmax(0, 1fr); }

/* thanks.html: after the Download button. The scene (thanks.js) sits between the words and the steps. */
.thanks { padding: 48px 0 0; }
.thanks h1 { font-size: clamp(36px, 5.4vw, 64px); line-height: 1.04; letter-spacing: -.03em; margin: 0; max-width: 14em; }
.thanks-sub { font-size: 20px; line-height: 1.5; margin: 20px 0 0; max-width: 34em; }
.carry { display: block; width: 100%; height: 240px; margin: 32px 0 8px; image-rendering: pixelated; image-rendering: crisp-edges; }
.steps { list-style: none; padding: 0; margin: 0 0 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  counter-reset: step; border-top: 1px solid var(--text); padding-top: 24px; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: block; font: 600 15px/1 var(--mono); color: var(--muted); margin-bottom: 10px; }
.steps h2 { font-size: 22px; line-height: 1.25; margin: 0 0 6px; }
.steps p { margin: 0; color: var(--text); }
@media (max-width: 720px) {
  .thanks { padding-top: 24px; }
  .thanks-sub { font-size: 18px; }
  .carry { height: 180px; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
}
