:root {
  --bg: #fbfbfa;
  --text: #18181a;
  --muted: #66666b;
  --line: #dcdcd8;
  --link: #c4122f;
  --serif: ui-serif, Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #19191b;
    --text: #ececea;
    --muted: #a2a29e;
    --line: #333335;
    --link: #ff6b7d;
  }
}

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 680px; margin: 0 auto; padding: 0 16px 64px; }
.wrap.wide { max-width: 1180px; }
@media (min-width: 1024px) { .wrap.wide { padding-left: 24px; padding-right: 24px; } }

header { display: flex; align-items: center; gap: 10px; height: 64px; border-bottom: 1px solid var(--line); }
header img { width: 26px; height: 26px; }
header a { color: var(--text); text-decoration: none; }
header > a { font-weight: 600; margin-right: auto; }
header nav a { font-size: 15px; }
header nav a[aria-current] { color: var(--muted); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h1 { font-size: 40px; line-height: 1.1; letter-spacing: -.01em; margin: 40px 0 12px; }
h2 { font-size: 24px; line-height: 1.25; margin: 32px 0 8px; }
p, li { margin: 0 0 12px; }
ul { padding-left: 22px; }
a { color: var(--link); }
.muted { color: var(--muted); }

/* The home page: a photo book, the words on the left, the pictures on the right. */
.book { display: flex; flex-direction: column; gap: 32px; padding-top: 40px; }
.book .words, .book .pictures { display: contents; }
.book h1 { order: 1; margin: 0; }
.book .pictures .pair:first-child { order: 2; }
.book .words div { order: 3; max-width: 600px; }
.book .pictures .pair { order: 4; }
.words p { color: var(--muted); }
.words strong { color: var(--text); }

@media (min-width: 1024px) {
  .book { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 56px; padding-top: 56px; }
  .book .words { display: block; align-self: start; }
  .book .words h1 { font-size: 44px; margin: 0 0 28px; }
  .book .words p { font-size: 16px; line-height: 1.65; margin-bottom: 16px; }
  .book .pictures { display: grid; gap: 48px; }
}
@media (min-width: 1024px) and (min-height: 760px) {
  .book .words { position: sticky; top: 0; }
}

.pair { position: relative; margin: 0; }
.pair > p { margin: 10px 0 0; font: italic 15px/1.4 var(--serif); color: var(--muted); }
.split { position: relative; overflow: hidden; border-radius: 3px; background: var(--line); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.split .photo { aspect-ratio: 3 / 2; background: center / cover no-repeat; }
.js .split[data-later] .photo { background-image: none !important; } /* the page's script loads it on scroll */
.split .before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.split::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--pos, 50%) - 1px); width: 2px; background: #fff; box-shadow: 0 0 8px rgba(0, 0, 0, .35); pointer-events: none; }
.split:has(input:not([hidden]))::before {
  content: ""; position: absolute; z-index: 1; top: 50%; left: var(--pos, 50%); width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border: 2px solid #fff; border-radius: 50%; box-sizing: border-box; pointer-events: none;
  background: rgba(0, 0, 0, .2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.5 6 3.5 10l4 4M12.5 6l4 4-4 4'/%3E%3C/svg%3E") center / 20px no-repeat;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 2px 12px rgba(0, 0, 0, .3);
}
.split:has(input:focus-visible)::before { outline: 2px solid var(--link); outline-offset: 2px; }
.split input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; -webkit-appearance: none; appearance: none; background: none; }
.split input::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 44px; }
.split input::-moz-range-thumb { width: 44px; height: 44px; border: 0; }
.split .tags { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: space-between; pointer-events: none; }
.split .tags span {
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .02em; line-height: 1.5;
  color: #fff; background: rgba(0, 0, 0, .3); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

.points { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line); }
.points h2 { font-size: 22px; line-height: 1.2; margin: 0 0 8px; }
.points p { margin: 0; color: var(--muted); font-size: 15px; }
@media (min-width: 600px) { .points { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (min-width: 1024px) { .points { grid-template-columns: repeat(4, 1fr); gap: 40px; margin-top: 88px; } }

.window { display: block; margin-top: 64px; }
html:not(.js) .window[data-later] { display: none; } /* with no script the <noscript> copy shows */
.window img { display: block; width: 100%; height: auto; }
.window img:not([src]) { visibility: hidden; } /* its room kept, no broken-image icon before it loads */

.coming { display: grid; gap: 16px; margin-top: 64px; }
.coming img { width: 72px; height: 72px; }
.coming p { margin: 0; font: clamp(28px, 4vw, 40px)/1.15 var(--serif); }
.coming p span { display: block; margin-top: 8px; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; color: var(--muted); }
@media (min-width: 1024px) {
  .coming { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 56px; align-items: center; margin-top: 88px; }
  .coming img { width: 96px; height: 96px; justify-self: end; }
}

footer { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
footer a { color: var(--muted); margin-right: 16px; }
footer a, footer span { display: inline-block; }
footer p { margin: 12px 0 0; }
.wide footer { margin-top: 88px; }
