/* Sebastian's site: cream paper, terracotta ink, the bow tie's colors. */
:root {
  --paper: oklch(97.5% 0.012 75);
  --paper-2: oklch(94% 0.02 70);
  --card: oklch(99.5% 0.006 80);
  --ink: oklch(25% 0.025 40);
  --ink-2: oklch(46% 0.025 45);
  --ink-3: oklch(60% 0.02 50);
  --rule: oklch(25% 0.025 40 / 0.12);
  --terra: oklch(57% 0.145 38);
  --terra-deep: oklch(48% 0.135 36);
  --terra-wash: oklch(57% 0.145 38 / 0.1);
  --on-terra: oklch(98% 0.015 80);
  --shot-outline: rgba(60, 30, 15, 0.12);
  --shadow: 0 1px 2px oklch(25% 0.04 40 / 0.08), 0 12px 32px -8px oklch(25% 0.05 40 / 0.18);
  --shadow-lg: 0 2px 4px oklch(25% 0.04 40 / 0.06), 0 30px 70px -20px oklch(30% 0.08 40 / 0.35);
  --r-sm: 6px; --r-md: 12px; --r-lg: 20px;
  --serif: "Young Serif", "Songti SC", "STSong", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: oklch(18.5% 0.014 45);
    --paper-2: oklch(22% 0.018 45);
    --card: oklch(24% 0.018 45);
    --ink: oklch(93% 0.015 75);
    --ink-2: oklch(76% 0.018 65);
    --ink-3: oklch(62% 0.018 60);
    --rule: oklch(93% 0.015 75 / 0.1);
    --terra: oklch(68% 0.135 40);
    --terra-deep: oklch(74% 0.12 42);
    --terra-wash: oklch(68% 0.135 40 / 0.14);
    --on-terra: oklch(18% 0.03 40);
    --shot-outline: rgba(255, 240, 225, 0.1);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -8px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, 0.7);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--terra-deep); text-underline-offset: 3px; }
code, kbd, pre { font-family: var(--mono); font-size: 0.86em; }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(1120px, 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: var(--r-sm); z-index: 10; }
.skip:focus { left: 12px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(44px, 7vw, 84px); line-height: 1.02; letter-spacing: -0.025em; }
h2 { font-size: clamp(32px, 4.4vw, 50px); line-height: 1.08; letter-spacing: -0.022em; }
h3 { font-size: 22px; line-height: 1.25; letter-spacing: -0.012em; }
p { margin: 0; text-wrap: pretty; }
.kicker { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--terra-deep); margin-bottom: 14px; }
:lang(zh-CN) .kicker { letter-spacing: 0.12em; }
.lede { font-size: 20px; color: var(--ink-2); max-width: 34em; }

/* Top bar: the name on the left, the rest out of the way. */
.top { padding: 22px 0; }
.top .wrap { display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font: 22px var(--serif); color: var(--ink); text-decoration: none; margin-right: auto; }
.brand img { width: 34px; height: 34px; }
.top a.plain { color: var(--ink-2); text-decoration: none; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
@media (hover: hover) { .top a.plain:hover { color: var(--ink); } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px 0 18px;
  border-radius: 999px; font-weight: 600; font-size: 16px; text-decoration: none; border: 0; cursor: pointer;
  transition-property: transform, background-color, box-shadow; transition-duration: 160ms; transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:active { transform: scale(0.96); }
.btn-main { background: var(--terra); color: var(--on-terra); box-shadow: 0 1px 0 oklch(100% 0 0 / 0.25) inset, 0 8px 20px -8px var(--terra); }
@media (hover: hover) { .btn-main:hover { background: var(--terra-deep); } }
.btn-quiet { color: var(--ink); background: var(--terra-wash); }
.btn svg { flex: none; }
.dl-meta { font-size: 14px; color: var(--ink-3); margin-top: 12px; font-variant-numeric: tabular-nums; }

/* Hero: the words, the calling card, then the window itself. */
.hero { padding: 48px 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 56px; align-items: end; }
.hero h1 em { font-style: normal; color: var(--terra); }
.hero .lede { margin-top: 24px; }
.hero .cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.card-note {
  background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 22px 24px 20px;
  transform: rotate(1.6deg); position: relative;
}
.card-note::before { /* the bow tie, in miniature, pinned to the card */
  content: ""; position: absolute; top: -14px; left: 24px; width: 46px; height: 28px;
  background: url(/logo-192.png) center/cover; border-radius: 8px; box-shadow: var(--shadow);
}
.card-note .from { font: 15px var(--serif); color: var(--ink-2); margin: 8px 0 12px; }
.card-note ul { list-style: none; margin: 0; padding: 0; }
.card-note li { display: flex; gap: 12px; align-items: flex-start; padding: 7px 0; font-size: 15px; line-height: 1.4; border-top: 1px solid var(--rule); }
.card-note li:first-child { border-top: 0; }
.tick { flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px var(--ink-3); position: relative; }
.tick::after {
  content: ""; position: absolute; inset: 0; border-radius: 5px; background: var(--terra)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4.5 9.5l3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
  opacity: 0; transform: scale(0.5);
  transition: opacity 220ms cubic-bezier(0.16, 1, 0.3, 1), transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
.card-note li.done .tick::after { opacity: 1; transform: scale(1); }
.card-note li span { transition: color 300ms; }
.card-note li.done span { color: var(--ink-3); }
.card-note .moved { font-size: 13px; color: var(--terra-deep); white-space: nowrap; margin-left: auto; padding-left: 8px; }

.shot { border-radius: var(--r-md); box-shadow: var(--shadow-lg); outline: 1px solid var(--shot-outline); outline-offset: -1px; background: var(--paper-2); }
.hero-shot { margin-top: 64px; position: relative; }
.hero-shot::before { /* a terracotta table for the window to rest on */
  content: ""; position: absolute; inset: 18% -4vw -48px; background: var(--terra); border-radius: var(--r-lg); z-index: -1; opacity: 0.92;
}
.hero-shot .shot { border-radius: var(--r-lg); }

/* Sections */
section { padding: 120px 0 0; }
.split { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; align-items: center; }
.split.flip { grid-template-columns: 1.15fr 0.85fr; }
.split.flip > :first-child { order: 2; }
.split .body { display: grid; gap: 18px; }
.split .body > p { color: var(--ink-2); font-size: 18px; }
.asks { display: grid; gap: 10px; margin-top: 8px; }
.asks p { font: 17px var(--serif); padding: 12px 18px; border-radius: 18px 18px 18px 6px; background: var(--terra-wash); width: fit-content; max-width: 100%; }
.asks p:nth-child(2) { margin-left: 28px; }
.asks p:nth-child(3) { margin-left: 12px; }
.fine { font-size: 15px; color: var(--ink-3); }

/* The folder: a file as it is on disk, next to where it lives. */
.file { background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); overflow: hidden; }
.file .name { display: flex; align-items: center; gap: 8px; padding: 12px 18px; font: 13px var(--mono); color: var(--ink-2); background: var(--paper-2); }
.file .name::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--terra); }
.file pre { margin: 0; padding: 18px 20px 22px; font-size: 14px; line-height: 1.7; overflow-x: auto; color: var(--ink); }
.file .k { color: var(--terra-deep); }
.file .c { color: var(--ink-3); }
.places { display: flex; flex-wrap: wrap; gap: 8px; }
.places span { font-size: 14px; padding: 6px 12px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }

/* The lists: three windows in a row, on the paper. */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 48px; }
.trio figure { margin: 0; }
.trio figure:nth-child(2) { transform: translateY(32px); }
.trio figcaption { margin-top: 16px; font-size: 15px; color: var(--ink-2); }
.trio figcaption b { display: block; font: 19px var(--serif); color: var(--ink); font-weight: 400; margin-bottom: 2px; }
.keys { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 88px; padding-top: 28px; border-top: 1px solid var(--rule); font-size: 15px; color: var(--ink-2); }
kbd { display: inline-block; min-width: 26px; padding: 2px 7px; margin-right: 6px; border-radius: var(--r-sm); background: var(--card); box-shadow: 0 1px 0 var(--rule), inset 0 0 0 1px var(--rule); color: var(--ink); text-align: center; font-size: 13px; }

/* Bring your own model */
.models { display: flex; flex-wrap: wrap; gap: 10px; }
.models span { font: 18px var(--serif); padding: 10px 18px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule); }
.cmd { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 6px 6px 6px 18px; }
.cmd code { flex: 1; overflow-x: auto; white-space: nowrap; font-size: 14px; padding: 10px 0; }
.copy { flex: none; min-height: 40px; padding: 0 14px; border: 0; border-radius: 8px; background: var(--paper-2); color: var(--ink); font: 600 13px var(--sans); cursor: pointer; transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1); }
.copy:active { transform: scale(0.96); }

/* Install: the last call, on terracotta. */
.install { margin-top: 140px; background: var(--terra); color: var(--on-terra); padding: 88px 0 96px; }
.install h2 { max-width: 14em; }
.install .lede { color: var(--on-terra); opacity: 0.85; margin-top: 18px; }
.install .btn-main { background: var(--on-terra); color: var(--terra-deep); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.4); }
@media (hover: hover) { .install .btn-main:hover { background: var(--card); } }
.install .dl-meta { color: var(--on-terra); opacity: 0.75; }
.install .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 64px; padding-top: 32px; border-top: 1px solid oklch(100% 0 0 / 0.25); }
.install .steps h3 { font-size: 20px; margin-bottom: 10px; }
.install .steps p { font-size: 15px; opacity: 0.88; }
.install .cmd { background: oklch(0% 0 0 / 0.16); box-shadow: none; margin-top: 12px; }
.install .cmd code { color: var(--on-terra); }
.install .copy { background: oklch(100% 0 0 / 0.18); color: var(--on-terra); }
.install a { color: var(--on-terra); }
.install .row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 36px; }

footer { padding: 36px 0 48px; font-size: 14px; color: var(--ink-3); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; }
footer a { color: var(--ink-2); }
footer .grow { margin-right: auto; }

/* Coming into view */
.rv { opacity: 0; transform: translateY(14px); transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .tick::after, .btn, .copy { transition: none; }
}

@media (max-width: 900px) {
  .hero-grid, .split, .split.flip { grid-template-columns: 1fr; gap: 40px; }
  .split.flip > :first-child { order: 0; }
  .card-note { max-width: 420px; }
  .trio { grid-template-columns: 1fr; gap: 40px; }
  .trio figure:nth-child(2) { transform: none; }
  .install .steps { grid-template-columns: 1fr; }
  section { padding-top: 88px; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .top .plain.gh span { display: none; }
  .hero { padding-top: 24px; }
  .lede { font-size: 18px; }
  .hero-shot { margin-top: 48px; }
  .hero-shot::before { inset: 22% -16px -28px; }
  .keys { margin-top: 48px; }
  .install { padding: 64px 0 72px; }
}
