/* offnote.cc: one small stylesheet for every page. System fonts, light and dark, nothing external. */

:root {
  color-scheme: light dark;
  --bg: #FBFAF7;
  --ink: #1F1D1A;      /* 16:1 on --bg */
  --muted: #67625A;    /* 5.8:1 on --bg */
  --line: #E4E0D7;
  --soft: #F1EEE7;     /* behind kbd; --muted on it is 5.2:1 */
  --accent: #B53E22;   /* the icon's red; 5.5:1 on --bg, white on it 5.7:1 */
  --on-accent: #FFFFFF;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --ink: #ECE9E2;    /* 15:1 */
    --muted: #A29D93;  /* 6.8:1 */
    --line: #2D2B27;
    --soft: #22201D;
    --accent: #F0805F; /* 6.9:1 */
    --on-accent: #1A0F0A;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: .2em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
p, ul, ol, dl, figure { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
li { margin: .25em 0; }
h1, h2 { line-height: 1.3; letter-spacing: -.01em; }
h1 { margin: 0 0 .9em; font-size: 1.5rem; font-weight: 600; }
h2 { margin: 2.2em 0 .5em; font-size: 1.0625rem; font-weight: 600; }
code, kbd { font: .875em var(--mono); }
kbd { display: inline-block; padding: .05em .4em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--soft); font-family: var(--sans); font-weight: 600; line-height: 1.5; }

.col { width: min(36rem, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* the little name in the corner of every page but the home page */
.top { padding: 40px 0 0; margin-bottom: 56px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; }
.brand img { width: 24px; height: 24px; }

/* home */
.hello { padding-top: clamp(56px, 11vh, 120px); }
.hello h1 { display: flex; align-items: center; gap: 14px; margin-bottom: 1.2rem; font-size: 1.5rem; }
.hello h1 img { width: 48px; height: 48px; }
.pitch { font-size: 1.125rem; }
.get { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 1.75rem; }
.get p { margin: 0; }
.button {
  display: inline-block; padding: .55em 1.05em; border-radius: 8px; font-weight: 600; text-decoration: none;
  color: var(--on-accent); background: var(--accent);
}
.button:hover { filter: brightness(1.08); }

.film { width: min(760px, 100% - 40px); margin: 56px auto; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); background: #A9B8CC; }
/* The recording has a lot of desktop round the note, so it's shown a bit closer. */
.film video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.3); }

.words { list-style: none; padding: 0; margin: 0 0 1.5em; }
.words li { display: grid; grid-template-columns: 5.25rem minmax(0, 1fr); gap: 12px; margin: .35em 0; }
.words li > code { font-weight: 600; padding-top: .1em; }
@media (max-width: 520px) { .words li { grid-template-columns: 4.6rem minmax(0, 1fr); gap: 10px; } }

/* inner pages */
.lede { font-size: 1.0625rem; }
.date { color: var(--muted); font-size: .875rem; }
.pic { margin: 2em 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.pic img { aspect-ratio: 10 / 7; object-fit: cover; transform: scale(1.25); } /* closer in on the note, like the video; a still stands in with reduced motion */
.facts { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: .35em 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.shots figure { margin: 0; }
.shots a.thumb { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.shots a.thumb img { transform: scale(1.5); }
.shots figcaption { margin-top: 6px; font-size: .875rem; color: var(--muted); }
@media (max-width: 520px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts dd { margin-bottom: .6em; }
  .shots { grid-template-columns: minmax(0, 1fr); }
}

footer { margin-top: 88px; padding: 24px 0 48px; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); }
footer p { margin: 0 0 .4em; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); text-decoration: underline; }
.links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
