/* Ink and highlighter: the same tokens as the app. */
@font-face {
  font-family: 'Bricolage';
  src: url('fonts/bricolage.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument';
  src: url('fonts/instrument.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'Mono';
  src: url('fonts/mono.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --line: #dfe2f0;
  --text: #14162e;
  --muted: #565a7d;
  --faint: #868aa9;
  --mark: #ffd43b;
  --mark-soft: #fff1b0;
  --mark-soft-ink: #14162e;
  --iris: #574ee6;
  --shadow: 0 2px 6px rgb(20 22 46 / 0.06), 0 30px 70px -24px rgb(20 22 46 / 0.3);
  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1022;
    --surface: #14162e;
    --line: #262a4e;
    --text: #ecedf7;
    --muted: #a6aacb;
    --faint: #7377a0;
    --mark-soft: rgb(255 212 59 / 0.15);
    --mark-soft-ink: #ffe38a;
    --iris: #9d97ff;
    --shadow: 0 2px 6px rgb(0 0 0 / 0.4), 0 30px 70px -24px rgb(0 0 0 / 0.8);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    400 17px/1.6 'Instrument',
    ui-sans-serif,
    system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--iris);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--iris);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--mark);
  color: #14162e;
}

h1,
h2,
h3 {
  font-family: 'Bricolage', 'Instrument', sans-serif;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(3rem, 8.5vw, 5.75rem);
  letter-spacing: -0.04em;
  line-height: 0.98;
}

h2 {
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
}

h3 {
  font-size: 1.2rem;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
  max-width: 62ch;
}

code {
  font-family: 'Mono', ui-monospace, monospace;
  font-size: 0.9em;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 12px;
}

.top,
main > section,
main > figure,
footer {
  width: min(var(--wrap), 100% - 40px);
  margin-inline: auto;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font:
    600 1.3rem 'Bricolage',
    sans-serif;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.mark-short {
  fill: var(--mark);
}

.mark-long {
  fill: currentColor;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 28px);
  font-size: 0.95rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
}

nav a:hover {
  color: var(--text);
}

nav .gh {
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding-block: clamp(36px, 8vw, 96px) clamp(40px, 7vw, 80px);
}

.lead {
  margin-top: 24px;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.5;
  color: var(--muted);
  max-width: 34em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: var(--faint);
}

.button:active {
  transform: translateY(0);
}

.button.primary {
  background: var(--mark);
  border-color: var(--mark);
  color: #14162e;
}

.fine {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--faint);
}

/* The sheet of paper: the trigger is typed, then unfolds. */
.sheet {
  border: 1px solid var(--line);
  border-radius: 24px;
  background-color: var(--surface);
  padding: 22px 28px 30px;
  box-shadow: var(--shadow);
  min-height: 300px;
}

.sheet-label {
  font-size: 0.85rem;
  color: var(--faint);
}

.sheet-label + .sheet-line,
.sheet-label + .sheet-text {
  margin-top: 4px;
}

.sheet-line {
  min-height: 44px;
  margin-bottom: 20px;
  font-size: 1.35rem;
  line-height: 44px;
}

.sheet-text {
  font-size: 1.35rem;
  line-height: 44px;
  white-space: pre-wrap;
  min-height: 132px;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 43px,
    var(--line) 43px,
    var(--line) 44px
  );
  clip-path: inset(0 100% 0 0);
}

.sheet-text.open {
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.marker {
  position: relative;
  display: inline-block;
  padding: 0 0.42em;
  font-family: 'Mono', ui-monospace, monospace;
  font-weight: 600;
  color: #14162e;
  white-space: pre;
  isolation: isolate;
}

.marker:empty {
  padding: 0;
}

.marker::before {
  content: '';
  position: absolute;
  inset: 0.16em -0.04em 0.12em;
  z-index: -1;
  background: var(--mark);
  border-radius: 0.5em 0.22em 0.55em 0.2em / 0.4em 0.5em 0.35em 0.55em;
  transform: rotate(-0.8deg);
}

.marker.quiet {
  color: var(--mark-soft-ink);
}

.marker.quiet::before {
  background: var(--mark-soft);
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.18em;
  background: var(--iris);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Screenshots */
.shot {
  margin-block: 0 clamp(56px, 10vw, 128px);
}

.shot img,
.split img {
  border: 1px solid var(--line);
  border-radius: clamp(10px, 1.6vw, 18px);
  box-shadow: var(--shadow);
}

.shot.small {
  margin: clamp(32px, 5vw, 56px) 0 0;
}

/* Text beside a picture */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding-block: clamp(40px, 7vw, 88px);
}

.split.reverse > div {
  order: 2;
}

.split p,
.checks-copy p,
.get .lead {
  margin-top: 18px;
  color: var(--muted);
}

/* The findings list */
.checks {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 72px);
  padding-block: clamp(40px, 7vw, 88px);
}

.findings {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.findings li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  align-items: baseline;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}

.findings li:last-child {
  border-bottom: 0;
}

.findings .marker {
  justify-self: start;
  font-size: 0.95rem;
}

.findings p span {
  display: block;
  font-size: 0.92rem;
  color: var(--faint);
}

/* Promises */
.files {
  padding-block: clamp(40px, 7vw, 88px);
}

.promises {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px) clamp(28px, 5vw, 72px);
  margin-top: clamp(28px, 4vw, 48px);
}

.promises p {
  margin-top: 8px;
  color: var(--muted);
}

/* Download */
.get {
  padding-block: clamp(48px, 8vw, 104px);
  border-top: 1px solid var(--line);
}

.downloads {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.os {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}

.os:hover {
  transform: translateY(-2px);
  border-color: var(--faint);
}

.os span {
  font-size: 0.9rem;
  color: var(--muted);
}

.os.yours {
  border-color: var(--mark);
  box-shadow: inset 0 0 0 1px var(--mark);
}

.or {
  margin-top: 32px;
  color: var(--muted);
}

.command {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  padding: 10px 10px 10px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font-size: 1.05rem;
}

.command button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.get .fine {
  max-width: 62ch;
  margin-top: 28px;
}

footer {
  padding-block: 36px 56px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--faint);
}

footer p + p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 14px;
}

footer a {
  color: var(--muted);
}

@media (max-width: 860px) {
  .hero,
  .split,
  .checks {
    grid-template-columns: minmax(0, 1fr);
  }

  .split.reverse > div {
    order: 0;
  }

  .downloads {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  nav a:not(.gh) {
    display: none;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  .promises {
    grid-template-columns: minmax(0, 1fr);
  }

  .findings li {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .sheet {
    padding: 18px 20px 24px;
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .caret {
    animation: none;
  }

  .sheet-text.open,
  .button,
  .os {
    transition: none;
  }
}
