/* bokfink.se: colours from the app icon (paper, navy wing, robin orange). No external requests. */
:root {
  --paper: #f7f1e6;
  --card: #fffdf9;
  --ink: #232a3d;
  --muted: #6b7080;
  --faint: #9a9da8;
  --rule: #e2dcd2;
  --robin: #d9692a;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16181d;
    --card: #20232b;
    --ink: #ebe7e0;
    --muted: #9da1ac;
    --faint: #6f737e;
    --rule: #2c2f37;
    --robin: #ef9660;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: .2em; }
img { max-width: 100%; height: auto; display: block; }
b, strong { font-weight: 600; }
p { margin: 0; }

.page { width: min(920px, 100% - 32px); margin-inline: auto; }
.text { max-width: 36rem; }
.feature .text { max-width: none; }

h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.25rem); line-height: 1.12; }
h2 { font-size: 1.35rem; line-height: 1.3; }

/* The watercolour chaffinch behind the top of the page. It belongs to the page, not the
   window: it scrolls away with the intro and fades into the paper below. */
.backdrop {
  position: absolute; top: 0; left: 0; right: 0; height: max(640px, min(100vh, 66vw));
  background: url(/hero.jpg) 72% top / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
  pointer-events: none; z-index: 0;
}
@media (prefers-color-scheme: dark) { .backdrop { opacity: 0.08; } }
/* A soft wash of paper behind the intro's text, so twigs and leaves give way to it. */
.intro { position: relative; }
.intro::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 46%; translate: -50% -50%;
  width: min(820px, 120%); height: 82%;
  background: radial-gradient(closest-side, rgb(247 241 230 / 0.92) 45%, rgb(247 241 230 / 0));
}
@media (prefers-color-scheme: dark) { .intro::before { display: none; } }
@media (max-width: 640px) { .intro::before { top: 70%; height: 52%; width: 110%; } }
body > main { position: relative; z-index: 1; }

/* Intro */
.intro { padding: clamp(48px, 10vw, 104px) 0 56px; text-align: center; }
/* The landing page: no icon, the painting carries the top. The text starts below the bird's
   branch, which sits in the top third of the painting at every width. */
.intro.hero { padding: clamp(170px, 17vw, 250px) 0 72px; }
@media (max-width: 640px) { .intro.hero { padding-top: 230px; } }
.intro.hero h1 { font-size: clamp(2.8rem, 8vw, 4.6rem); }
.intro .icon { width: 112px; height: 112px; margin: 0 auto 24px; filter: drop-shadow(0 8px 20px rgb(35 42 61 / 14%)); }
.quote { margin: 28px auto 0; max-width: 40rem; text-wrap: balance; }
.quote blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 3vw, 1.55rem); line-height: 1.4; color: var(--muted); }
.quote blockquote p::before { content: "”"; }
.quote blockquote p::after { content: "”"; }
.quote figcaption { margin-top: 10px; font-size: 14px; color: var(--faint); }
.facts { margin-top: 20px; font-size: 14px; color: var(--faint); }

/* Screenshot, cropped below the content and faded out */
.shot .frame {
  aspect-ratio: 1600 / 780; overflow: hidden; border-radius: 12px 12px 0 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
}
.shot img { border-radius: 12px; box-shadow: 0 0 0 1px rgb(35 42 61 / 10%); }
@media (prefers-color-scheme: dark) { .shot img { box-shadow: 0 0 0 1px rgb(255 255 255 / 10%); } }

/* Sections in the style of a ledger: a name in the margin, hairline rules between rows */
section { padding: 56px 0 0; }
section > h2 { margin-bottom: 18px; }
.ledger { margin: 0; border-top: 1px solid var(--ink); }
.ledger div {
  display: grid; grid-template-columns: 11rem 1fr; gap: 4px 32px;
  padding: 16px 0; border-bottom: 1px solid var(--rule);
}
.ledger dt { font-family: var(--serif); font-size: 1.1rem; }
.ledger dd { margin: 0; color: var(--muted); max-width: 36rem; }
.prose { color: var(--muted); }
.prose + .prose { margin-top: 14px; }

footer { padding: 72px 0 56px; font-size: 14px; color: var(--faint); }

/* Features: text beside a picture of it */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding-top: 88px; }
.feature.reverse .text { order: 2; }
.feature h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); margin-bottom: 14px; }
section.text + section.text { padding-top: 40px; }
section.text { padding-top: 88px; }

/* An example conversation, deliberately plain: no particular AI's look */
.chat { margin: 0; display: grid; gap: 10px; }
.chat p { margin: 0; padding: 11px 15px; border-radius: 16px; font-size: 15px; max-width: 85%; }
.chat .you { justify-self: end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 5px; }
.chat .ai { justify-self: start; background: var(--card); border: 1px solid var(--rule); border-bottom-left-radius: 5px; }
.draft { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 14px 16px; font-size: 14px; box-shadow: 0 8px 24px rgb(35 42 61 / 8%); }
.draft-head, .draft-foot { display: flex; justify-content: space-between; color: var(--muted); }
.draft-head { font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.draft-head span:last-child { font-weight: 400; color: var(--muted); }
.draft table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.draft td { padding: 5px 0; border-top: 1px solid var(--rule); }
.draft td:first-child { color: var(--muted); width: 3.5rem; }
.draft td:last-child { text-align: right; }
.draft-foot { margin-top: 8px; font-size: 13px; color: var(--robin); }

/* The phone camera in a phone-shaped frame */
.phone { margin: 0 auto; width: min(290px, 100%); border-radius: 40px; padding: 10px; background: var(--ink); box-shadow: 0 18px 40px rgb(35 42 61 / 18%); }
.phone img { border-radius: 30px; width: 100%; }
@media (prefers-color-scheme: dark) { .phone { background: #2c2f37; } }

/* Download page */
.button {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--robin); color: #fff; text-decoration: none; font-weight: 600;
  padding: 12px 22px; border-radius: 10px;
}
.button:hover { filter: brightness(1.06); }
.button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-color-scheme: dark) { .button { color: #1b1208; } }
/* The landing page's download, in the style of Apple's download badges */
.mac-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; color: #fff; text-decoration: none;
  padding: 9px 22px 9px 16px; border-radius: 12px;
  box-shadow: 0 6px 18px rgb(0 0 0 / 14%);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  transition: transform .15s ease, box-shadow .15s ease;
}
.mac-badge:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgb(0 0 0 / 18%); }
.mac-badge svg { width: 26px; height: 26px; fill: currentColor; margin-top: -3px; }
.mac-badge span { display: flex; flex-direction: column; text-align: left; font-size: 19px; font-weight: 600; line-height: 1.1; letter-spacing: -.01em; }
a.mac-badge small { font-size: 12px; font-weight: 500; letter-spacing: .01em; color: inherit; }
@media (prefers-color-scheme: dark) { .mac-badge { background: #fff; color: #000; box-shadow: none; } }
.download { margin-top: 24px; display: flex; justify-content: center; align-items: center; gap: 10px 20px; flex-wrap: wrap; }
.download small { color: var(--faint); font-size: 14px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ink); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.25rem 1fr; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.steps li::before { content: counter(step); font-family: var(--serif); font-size: 1.1rem; color: var(--faint); }
.steps small { display: block; color: var(--muted); font-size: 15px; margin-top: 2px; }
.notes ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.notes li { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.notes small { display: block; color: var(--muted); font-size: 15px; margin-top: 2px; }

@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; gap: 32px; padding-top: 64px; }
  .feature.reverse .text { order: 0; }
}

@media (max-width: 640px) {
  .ledger div { grid-template-columns: 1fr; }
  .intro .icon { width: 96px; height: 96px; }
}
