/* Room, the website.
   Paper and ink: the page is a sheet of risograph paper, the prints sit beneath it,
   and Room's mark is the hole that shows them. One accent (riso red), one radius scale
   (windows keep macOS's own corners; panels 28, cells 22, controls are pills). */

@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-ext-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Kalam";
  src: url("../fonts/kalam-300.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Kalam";
  src: url("../fonts/kalam-ext-300.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Kalam";
  src: url("../fonts/kalam-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Kalam";
  src: url("../fonts/kalam-ext-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-ext-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #f3ece0;
  --paper-2: #ebe2d2;
  --paper-3: #e2d6c2;
  --ink: #221e1a;
  --ink-2: #5a5148;
  --ink-3: #857a6d;
  --line: rgb(34 30 26 / 0.12);
  --accent: #e4572e;
  --accent-text: #b8401c;
  --button: #221e1a;
  --button-ink: #f6f0e6;
  --key: #fbf7f0;
  --key-edge: rgb(34 30 26 / 0.18);
  --shadow-ink: 40 28 16;
  --serif: "Newsreader", "New York", ui-serif, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(20px, 5vw, 72px);
  --max: 1240px;
  --mark: url("../mark.svg");
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161411;
    --paper-2: #1f1c18;
    --paper-3: #2a2621;
    --ink: #f1e9db;
    --ink-2: #bdb2a1;
    --ink-3: #8c8273;
    --line: rgb(241 233 219 / 0.12);
    --accent: #ff7a4d;
    --accent-text: #ff8c63;
    --button: #f1e9db;
    --button-ink: #1b1815;
    --key: #2a2621;
    --key-edge: rgb(241 233 219 / 0.16);
    --shadow-ink: 0 0 0;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
::selection { background: color-mix(in oklab, var(--accent) 35%, transparent); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Paper grain over everything, fixed so it never repaints on scroll. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.32;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.38  0 0 0 0 0.3  0 0 0 0.16 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  body::after { mix-blend-mode: screen; opacity: 0.22; }
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--button); color: var(--button-ink);
  padding: 10px 16px; border-radius: 999px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Type ---------- */

.section-title {
  font: 400 clamp(36px, 5.2vw, 68px)/1.04 var(--serif);
  font-optical-sizing: auto;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.section-title em {
  font-style: italic;
  color: var(--ink-2);
  letter-spacing: -0.015em;
}
h3 {
  font: 500 clamp(22px, 2vw, 26px)/1.18 var(--serif);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
p { text-wrap: pretty; }

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.7em;
  height: 1.7em;
  padding: 0 0.42em;
  margin: 0 0.08em;
  font: 500 0.78em/1 var(--sans);
  color: var(--ink);
  background: var(--key);
  border: 1px solid var(--key-edge);
  border-bottom-width: 2px;
  border-radius: 0.42em;
  vertical-align: 0.12em;
}
h3 kbd { font-size: 0.62em; vertical-align: 0.3em; }
code {
  font: 500 0.88em var(--mono);
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: var(--paper-2);
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 26px 0 22px;
  border-radius: 999px;
  background: var(--button);
  color: var(--button-ink);
  font: 600 16px/1 var(--sans);
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.12) inset, 0 10px 24px -12px rgb(var(--shadow-ink) / 0.55);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.2s;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgb(255 255 255 / 0.12) inset, 0 16px 30px -14px rgb(var(--shadow-ink) / 0.6); }
.button:active { transform: translateY(0) scale(0.985); }
.button-icon { width: 17px; height: 17px; margin-top: -2px; }
.button-small { height: 36px; padding: 0 16px; font-size: 14px; }
.button-paper { background: #f6f0e6; color: #221e1a; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; text-decoration: none; color: var(--accent-text);
}
.link-arrow::after { content: "→"; transition: transform 0.25s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- The mark ---------- */

.mark {
  display: inline-block;
  width: 22px; height: 22px;
  background: url("../icons/room-glyph.webp") center / cover;
  -webkit-mask: var(--mark) center / contain no-repeat;
  mask: var(--mark) center / contain no-repeat;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  z-index: 50;
  top: 14px; left: 50%;
  translate: -50% 0;
  display: flex; align-items: center; gap: clamp(14px, 3vw, 36px);
  height: 56px;
  padding: 0 10px 0 18px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--paper) 72%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 0 0 1px var(--line), 0 12px 30px -18px rgb(var(--shadow-ink) / 0.4);
  transition: opacity 0.4s var(--ease), translate 0.4s var(--ease);
}
.nav[data-hidden="true"] { opacity: 0; translate: -50% -16px; pointer-events: none; }
.nav-github { display: inline-flex; align-items: center; gap: 6px; }
.nav-gh { width: 15px; height: 15px; }
.nav-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
/* Newsreader's ink sits high in its box: down a touch to centre the capitals on the mark. */
.nav-word { font: 500 21px/1 var(--serif); letter-spacing: -0.01em; translate: 0 0.07em; }
.nav-links { display: flex; gap: clamp(14px, 2.2vw, 28px); }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 640px) {
  .nav { width: calc(100% - 24px); justify-content: space-between; }
  .nav-links { display: none; }
}

/* ---------- Hero ----------
   The print full bleed, fading into the paper at its foot; the line and the name on it in paper;
   the window over the name's foot and past the fold, the download floating on it at the fold.
   It all scrolls away like the rest of the page; the nav arrives once the name has gone. */

.hero {
  position: relative;
  padding: calc(env(safe-area-inset-top) + clamp(40px, 6.5vh, 72px)) 0 clamp(64px, 10vh, 120px);
  isolation: isolate;
}
.hero-print {
  position: absolute; inset: 0; z-index: -1;
  background: url("../art/pigment-1536.avif") center 35% / cover;
  -webkit-mask: linear-gradient(to bottom, #000 0, #000 62%, transparent 92%);
  mask: linear-gradient(to bottom, #000 0, #000 62%, transparent 92%);
}
.hero-print::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 40% at 50% 16%, rgb(40 24 16 / 0.22), transparent 70%);
}
.hero-copy {
  display: flex; flex-direction: column; align-items: center;
  padding: 0 var(--gutter);
  text-align: center;
  color: #f6f0e6;
}
.hero-lede {
  font: 400 clamp(22px, 2.5vw, 36px)/1.15 var(--serif);
  letter-spacing: -0.012em;
  text-shadow: 0 1px 18px rgb(40 24 16 / 0.35);
  text-wrap: balance;
}
.hero-title {
  margin-top: clamp(14px, 2.2vh, 26px);
  font: 400 clamp(160px, 23vw, 340px)/0.8 var(--serif);
  letter-spacing: -0.05em;
  font-variation-settings: "opsz" 72;
  text-shadow: 0 2px 40px rgb(40 24 16 / 0.25);
}
.hero .hero-window {
  position: relative;
  width: min(1240px, 86vw);
  margin: calc(-1 * clamp(44px, 6.2vw, 92px)) auto 0;
}
/* Under the window, in the page's flow: the download and its note. */
.hero-cta {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  margin-top: clamp(40px, 6vh, 64px);
}
.hero-cta .button { position: relative; z-index: 1; height: 56px; padding: 0 30px 0 26px; font-size: 17px; }
.hero-meta { -webkit-user-select: text; user-select: text; font-size: 13px; color: var(--ink-3); }
@media (max-width: 640px) {
  .hero-title { font-size: 34vw; }
  .hero .hero-window { width: 92vw; margin-top: -7vw; }
  .hero-cta { margin-top: 32px; }
}

/* ---------- Screenshots ---------- */

.shot { margin: 0; position: relative; }
.shot img {
  width: 100%;
  border-radius: 1.6% / 2.5%;
  filter:
    drop-shadow(0 1px 1px rgb(var(--shadow-ink) / 0.12))
    drop-shadow(0 22px 40px rgb(var(--shadow-ink) / 0.28));
}

/* Clips: the video in the window's own corners, the cursor drawn over it. */
.clip {
  position: relative;
  --k: 0.8;
  border-radius: 1.6% / 2.5%;
  filter:
    drop-shadow(0 1px 1px rgb(var(--shadow-ink) / 0.12))
    drop-shadow(0 22px 40px rgb(var(--shadow-ink) / 0.28));
}
.clip video {
  display: block; width: 100%; height: auto;
  aspect-ratio: 16 / 10;
  border-radius: inherit;
  background: var(--paper-3);
}
.cursor {
  position: absolute; left: 50%; top: 50%;
  width: calc(20px * var(--k)); height: calc(28px * var(--k));
  translate: calc(-2.2px * var(--k)) calc(-1.6px * var(--k));
  pointer-events: none;
  filter: drop-shadow(0 calc(1.5px * var(--k)) calc(2px * var(--k)) rgb(0 0 0 / 0.35));
  transition: scale 0.12s var(--ease);
  transform-origin: 10% 6%;
}
.cursor.is-pressed { scale: 0.86; }
.cursor-arrow { display: block; width: 100%; height: 100%; }
.click-ring {
  position: absolute;
  width: calc(44px * var(--k)); height: calc(44px * var(--k));
  margin: calc(-22px * var(--k)) 0 0 calc(-22px * var(--k));
  border-radius: 50%;
  border: calc(2px * var(--k)) solid rgb(255 255 255 / 0.9);
  background: rgb(228 87 46 / 0.22);
  box-shadow: 0 0 0 calc(1px * var(--k)) rgb(0 0 0 / 0.12);
  pointer-events: none;
  animation: click-ring 0.55s var(--ease) forwards;
}
@keyframes click-ring { from { scale: 0.3; opacity: 1; } to { scale: 1.25; opacity: 0; } }

/* ---------- Reveal ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- Sections ---------- */

section { position: relative; }
.pillars, .tour-head, .details, .prints, .shortcuts, .source, .closing {
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* Pillars */
.pillars { padding: clamp(96px, 14vh, 160px) 0 clamp(72px, 10vh, 120px); }
.pillars .section-title { max-width: 15ch; }
.pillar-grid {
  margin-top: clamp(48px, 7vh, 80px);
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: clamp(28px, 4vw, 64px);
}
.pillar:nth-child(2) { margin-top: 64px; }
.pillar:nth-child(3) { margin-top: 128px; }
.pillar h3 { margin-top: 26px; }
.pillar p { margin-top: 12px; color: var(--ink-2); max-width: 36ch; }
/* Line drawings, inked in as they arrive, with a second ink a little off register and a
   halftone fill, as a risograph would print them. */
.pillar-art { width: clamp(92px, 8vw, 116px); height: auto; overflow: visible; display: block; }
.pillar-art .art-ink, .pillar-art .art-misreg {
  fill: none; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round;
}
.pillar-art .art-ink { stroke: var(--ink); }
.pillar-art .art-misreg { stroke: var(--riso); opacity: 0.9; transform: translate(2.4px, 1.8px); mix-blend-mode: multiply; }
.pillar-art .art-fill { opacity: 0.75; transform: translate(3px, 2.5px); mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) {
  .pillar-art .art-misreg, .pillar-art .art-fill { mix-blend-mode: screen; }
}
.pillar-art :is(path, line, circle, rect) { stroke-dasharray: 1 1; }
.js .pillar-art .art-ink :is(path, line, circle, rect), .js .pillar-art .art-misreg :is(path, line, circle, rect) { stroke-dashoffset: 1; }
.js .pillar-art .art-fill { opacity: 0; }
.pillar.in .pillar-art .art-ink :is(path, line, circle, rect) { stroke-dashoffset: 0; transition: stroke-dashoffset 1.8s cubic-bezier(0.45, 0, 0.2, 1) calc(var(--d, 0s) + 0.15s); }
.pillar.in .pillar-art .art-misreg :is(path, line, circle, rect) { stroke-dashoffset: 0; transition: stroke-dashoffset 1.8s cubic-bezier(0.45, 0, 0.2, 1) calc(var(--d, 0s) + 0.45s); }
.pillar.in .pillar-art .art-fill { opacity: 0.75; transition: opacity 1.2s var(--ease) calc(var(--d, 0s) + 1.3s); }
@media (prefers-reduced-motion: reduce) {
  .js .pillar-art :is(path, line, circle, rect) { stroke-dashoffset: 0 !important; transition: none !important; }
  .js .pillar-art .art-fill { opacity: 0.75; }
}
@media (max-width: 860px) {
  .pillar-grid { grid-template-columns: 1fr; }
  .pillar:nth-child(n) { margin-top: 0; }
}

/* The letter */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.letter {
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(96px, 16vh, 200px) 0 clamp(96px, 14vh, 160px);
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(40px, 6vw, 96px); align-items: center;
}
.letter-paper {
  --hand: "Kalam", "Bradley Hand", sans-serif;
  font: 300 clamp(19px, 1.45vw, 21px)/1.6 var(--hand);
  color: var(--ink);
  max-width: 30em;
}
.letter-paper p + p { margin-top: 0.7em; }
.letter-lede { font-size: clamp(24px, 1.9vw, 28px); line-height: 1.3; margin-bottom: 0.7em; font-weight: 400; }
.letter-lede em {
  font-style: normal; color: var(--accent-text);
  text-decoration: underline color-mix(in oklab, var(--accent) 75%, transparent);
  text-decoration-thickness: 2px; text-underline-offset: 0.18em; text-decoration-skip-ink: none;
}
.letter-close { font-weight: 400; }
.letter-sign { margin-top: 1.1em; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.letter-name { font: 400 clamp(22px, 1.7vw, 25px)/1 var(--hand); }
.letter-role { font: 500 13px/1.4 var(--sans); color: var(--ink-3); }
/* Without the video, the letter stands alone in the middle. */
.letter:not(:has(.letter-video)) { grid-template-columns: 1fr; justify-items: center; }
.letter-video { margin: 0; }
.letter-video-frame {
  position: relative; aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden;
  background-position: center; background-size: cover;
  display: grid; place-items: center; align-content: center; gap: 22px; padding: 32px;
  box-shadow: 0 30px 60px -34px rgb(var(--shadow-ink) / 0.55);
}
.letter-video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.letter-video-mark { width: 96px; height: 96px; background-image: none !important; background-color: #f3ece0; filter: drop-shadow(0 14px 24px rgb(30 20 10 / 0.3)); }
.letter-video-soon {
  padding: 8px 16px; border-radius: 999px; text-align: center;
  font: italic 400 18px/1.3 var(--serif); color: #221e1a;
  background: rgb(246 240 230 / 0.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
@media (max-width: 860px) {
  .letter { grid-template-columns: 1fr; }
  .letter-video-frame { aspect-ratio: 4 / 3; }
}

/* Tour */
.tour { padding-bottom: clamp(72px, 10vh, 120px); }
.tour-head { padding-bottom: clamp(24px, 4vh, 48px); }
.tour-body {
  width: min(1440px, 100% - 2 * var(--gutter));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.62fr) 1.38fr;
  gap: clamp(32px, 4vw, 72px);
}
.tour-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.tour-step {
  min-height: 78vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 0 0 28px;
  border-left: 1px solid var(--line);
  opacity: 0.32;
  transition: opacity 0.6s var(--ease), border-color 0.6s var(--ease);
}
.tour-step.is-active { opacity: 1; border-left-color: var(--ink); }
.tour-step p { margin-top: 14px; color: var(--ink-2); max-width: 40ch; }
.tour-step .keys { font-size: 14px; color: var(--ink-3); }
.tour-step .keys kbd { font-size: 0.9em; }
.tour-inline { display: none; }
.tour-stage { position: relative; }
.tour-frame {
  position: sticky; top: calc(50vh - min(34vw, 64vh) / 2);
  aspect-ratio: 1.28;
  max-height: 64vh;
  width: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: var(--paper-2);
}
.tour-print, .tour-shot {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.8s var(--ease), transform 1.2s var(--ease);
}
.tour-print { background-position: center; background-size: cover; }
.tour-shot { inset: 9% 7% auto; transform: translateY(16px) scale(0.98); }
.tour-print.is-active { opacity: 1; transform: none; }
.tour-shot.is-active { opacity: 1; transform: none; }
@media (max-width: 900px) {
  .tour-body { grid-template-columns: 1fr; }
  .tour-stage { display: none; }
  .tour-step { min-height: 0; opacity: 1; padding: 0 0 72px; border: 0; }
  .tour-inline { display: block; margin-top: 28px; padding: 7%; border-radius: 22px; background-position: center; background-size: cover; }
}

/* Details: a grid with rhythm. */
.details { padding: clamp(72px, 10vh, 120px) 0; }
.details .section-title { max-width: 14ch; }
.bento {
  margin-top: clamp(40px, 6vh, 64px);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.cell {
  position: relative;
  border-radius: 22px;
  padding: clamp(22px, 2.4vw, 32px);
  background: var(--paper-2);
  overflow: hidden;
  min-height: 260px;
}
.cell p { margin-top: 10px; color: var(--ink-2); font-size: 16px; max-width: 36ch; }
.cell-reader { grid-column: span 4; display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 24px; align-items: center; min-height: 380px; }
.cell-reader .cell-shot { margin-right: calc(-1 * clamp(22px, 2.4vw, 32px) - 120px); }
.cell-extensions { grid-column: span 2; display: flex; flex-direction: column; }
.ext-grid {
  list-style: none; margin: auto 0 0; padding: 22px 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 10px;
}
.ext-grid li { display: grid; place-items: center; }
.ext-grid img {
  width: 100%; max-width: 46px; aspect-ratio: 1; object-fit: contain;
  filter: drop-shadow(0 4px 8px rgb(var(--shadow-ink) / 0.18));
  transition: transform 0.3s var(--ease);
}
.ext-grid li:nth-child(odd) img { transform: rotate(-3deg); }
.ext-grid li:nth-child(3n) img { transform: rotate(4deg); }
.ext-grid li img:hover { transform: scale(1.12) rotate(0deg); }
.cell-music, .cell-pip { grid-column: span 3; display: flex; flex-direction: column; padding-bottom: 0; min-height: 420px; }
.cell-hide { grid-column: span 2; display: flex; flex-direction: column; justify-content: flex-end; }
.cell-capture, .cell-import { grid-column: span 2; display: flex; flex-direction: column; }

/* A corner of the window, whole (its rounded corner and shadow), the rest fading away. */
.corner {
  position: relative; flex: 1; min-height: 260px;
  margin: 18px calc(-1 * clamp(22px, 2.4vw, 32px)) 0;
  overflow: hidden;
}
.corner img {
  position: absolute; bottom: 28px; max-width: none; width: var(--w);
  filter: drop-shadow(0 1px 1px rgb(var(--shadow-ink) / 0.14)) drop-shadow(0 18px 30px rgb(var(--shadow-ink) / 0.26));
}
.corner-left img { left: 28px; }
.corner-right img { right: 28px; }
.corner-left { --w: 1700px; }
/* Picture in picture in two layers: the window's corner fades, the floating video does not.
   --pt is one window point at the size the window is shown. */
.corner-frame { position: relative; flex: 1; min-height: 260px; margin: 18px calc(-1 * clamp(22px, 2.4vw, 32px)) 0; --w: 1500px; --pt: calc(var(--w) / 1440); }
.corner-frame .corner { position: absolute; inset: 0; margin: 0; min-height: 0; }
.corner-frame .corner img { width: var(--w); }
.pip-layer img {
  position: absolute; max-width: none;
  right: calc(28px + 36 * var(--pt)); bottom: calc(28px + 36 * var(--pt));
  width: calc(400 * var(--pt));
  filter: drop-shadow(0 calc(10 * var(--pt)) calc(22 * var(--pt)) rgb(20 12 6 / 0.4));
}
.corner-left {
  -webkit-mask: linear-gradient(to top, #000 52%, transparent 100%), linear-gradient(to right, #000 55%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask: linear-gradient(to top, #000 52%, transparent 100%) intersect, linear-gradient(to right, #000 55%, transparent 100%);
}
.corner-right {
  -webkit-mask: linear-gradient(to top, #000 52%, transparent 100%), linear-gradient(to left, #000 62%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask: linear-gradient(to top, #000 52%, transparent 100%) intersect, linear-gradient(to left, #000 62%, transparent 100%);
}
.cell-capture { padding-bottom: 0; }
.bigkeys { position: absolute; top: clamp(22px, 2.4vw, 32px); left: clamp(22px, 2.4vw, 32px); font-size: 30px; }
.bigkeys kbd { box-shadow: 0 6px 14px -8px rgb(var(--shadow-ink) / 0.4); }

/* A region of a capture, cut to the cell's bottom edge. --w is the image's width as a share of
   the crop, --l and --t the region's top-left as shares of the crop (negative). */
.crop {
  position: relative; overflow: hidden;
  margin: 22px calc(-1 * clamp(22px, 2.4vw, 32px)) 0;
  margin-top: auto;
  aspect-ratio: var(--ar, 1.4);
  border-top: 1px solid var(--line);
}
.crop img { position: absolute; max-width: none; width: var(--w); left: var(--l); top: var(--t); }
.crop-capture { --ar: 1.53; --w: 147%; --l: -38.8%; --t: -35.9%; margin-top: 22px; }

/* Moving in: the browsers in an arc, each path flowing into Room's icon. */
.migrate { position: relative; height: 270px; margin-top: auto; }
/* 1:1 with the icons' pixel positions: 400 × 260 around the tile's centre line. */
.migrate-paths { position: absolute; left: calc(50% - 200px); top: 0; width: 400px; height: 260px; overflow: visible; }
.migrate-paths path {
  fill: none; stroke: color-mix(in oklab, var(--ink) 28%, transparent); stroke-width: 1.4;
  stroke-dasharray: 0.02 0.03; stroke-linecap: round;
}
.cell-import.in .migrate-paths path { animation: migrate-flow 2.4s linear infinite; }
@keyframes migrate-flow { to { stroke-dashoffset: -0.1; } }
.migrate-from { list-style: none; margin: 0; padding: 0; }
.migrate-from li {
  position: absolute; left: calc(50% + var(--x)); top: var(--y);
  width: 50px;  /* not shrink-to-fit: near the edge that would squeeze the icon */
  translate: -50% -50%;
}
.migrate-from img { width: 50px; max-width: none; filter: drop-shadow(0 6px 10px rgb(var(--shadow-ink) / 0.2)); transition: transform 0.35s var(--ease); }
.migrate-from li:hover img { transform: translateY(-3px) scale(1.08); }
.js .cell-import .migrate-from li { opacity: 0; transform: translateY(10px) scale(0.85); }
.cell-import.in .migrate-from li {
  opacity: 1; transform: none;
  transition: opacity 0.5s var(--ease), transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: calc(0.3s + var(--i) * 70ms);
}
.migrate-room {
  position: absolute; left: 50%; top: 196px; translate: -50% -50%;
  width: 92px;
  filter: drop-shadow(0 14px 22px rgb(var(--shadow-ink) / 0.3));
}
@media (prefers-reduced-motion: reduce) {
  .cell-import.in .migrate-paths path { animation: none; }
  .js .cell-import .migrate-from li { opacity: 1; transform: none; }
}
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .cell-reader, .cell-capture, .cell-import, .cell-extensions { grid-column: span 2; }
  .cell-reader { grid-template-columns: 1fr; }
  .cell-reader .cell-shot { margin-right: -60%; }
  .cell-music, .cell-pip, .cell-hide { grid-column: span 2; }
  .corner-left { --w: 1300px; } .corner-frame { --w: 1100px; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .cell-reader { grid-column: span 6; }
  .cell-extensions, .cell-hide { grid-column: span 3; }
  .cell-music, .cell-pip { grid-column: span 6; }
  .cell-capture, .cell-import { grid-column: span 3; }
}

/* Prints: the icons in a cycle, the chosen one in the middle, on its print. */
.prints { padding: clamp(72px, 10vh, 120px) 0; }
.prints-head { display: grid; justify-items: center; text-align: center; gap: 18px; }
.prints-head p { color: var(--ink-2); max-width: 44ch; font-size: 18px; }
.prints-stage {
  position: relative; margin-top: clamp(32px, 5vh, 56px);
  border-radius: 28px; overflow: hidden;
  height: clamp(340px, 46vw, 520px);
  display: grid; place-items: center;
}
/* Two layers: the next print fades in over the current one. */
.prints-backdrop { position: absolute; inset: 0; background-position: center; background-size: cover; transition: opacity 0.8s var(--ease); }
.prints-backdrop.is-next { opacity: 0; }
.icon-cycle { position: relative; width: 100%; height: 100%; }
.icon-cycle button {
  --o: 0; --a: 0;
  position: absolute; left: 50%; top: 50%;
  width: clamp(120px, 17vw, 220px); aspect-ratio: 1;
  margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
  translate: -50% -56%;
  transform: translateX(calc(var(--o) * clamp(84px, 15.5vw, 236px))) scale(calc(1 - var(--a) * 0.17));
  opacity: calc(1 - var(--a) * 0.28);
  z-index: calc(10 - var(--a));
  filter: drop-shadow(0 calc(26px - var(--a) * 6px) 34px rgb(30 20 10 / calc(0.42 - var(--a) * 0.08)));
  transition: transform 0.7s var(--ease), opacity 0.5s var(--ease), filter 0.5s;
}
.icon-cycle button[aria-checked="true"] { cursor: default; }
.icon-cycle button.is-wrapping { transition: none; opacity: 0; }
.icon-cycle button img { width: 100%; }
.icon-cycle button:focus-visible { outline: none; }
.icon-cycle button:focus-visible img { outline: 2px solid #f6f0e6; outline-offset: 4px; border-radius: 24%; }
.prints-step {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 20;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  font: 400 26px/1 var(--serif); color: #221e1a;
  background: rgb(246 240 230 / 0.82);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform 0.2s var(--ease);
}
.prints-step:hover { transform: scale(1.06); }
.prints-step[data-step-by="-1"] { left: 18px; }
.prints-step[data-step-by="1"] { right: 18px; }
@media (max-width: 640px) {
  .icon-cycle button { width: 112px; transform: translateX(calc(var(--o) * 104px)) scale(calc(1 - var(--a) * 0.22)); }
  .icon-cycle button[style*="--a: 2"], .icon-cycle button[style*="--a: 3"] { opacity: 0; pointer-events: none; }
  .prints-step { width: 38px; height: 38px; }
}
.prints-name {
  position: absolute; bottom: 22px; left: 50%; translate: -50% 0; z-index: 20;
  padding: 7px 16px; border-radius: 999px;
  font: italic 400 20px/1 var(--serif); color: #221e1a;
  background: rgb(246 240 230 / 0.86);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}

/* Shortcuts, the one marquee */
.shortcuts { padding: clamp(72px, 10vh, 120px) 0; }
.marquee {
  margin: clamp(40px, 6vh, 64px) calc(50% - 50vw) 0;
  overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
/* The run is there twice (site.js copies it), so sliding by half its width loops without a seam. */
.marquee-track {
  display: flex; width: max-content;
  padding: 8px 0;
  animation: marquee 110s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; } }
.combo { margin-right: 44px; display: inline-flex; align-items: center; gap: 4px; font: 400 22px/1 var(--serif); color: var(--ink-2); white-space: nowrap; }
.combo kbd { font-size: 17px; }
.combo kbd:last-of-type { margin-right: 10px; }
.shortcuts-note { margin-top: 36px; color: var(--ink-2); max-width: 52ch; }

/* Source */
.source {
  padding: clamp(72px, 10vh, 120px) 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center;
}
.source-copy p { margin: 24px 0 26px; color: var(--ink-2); max-width: 42ch; font-size: 18px; }
.terminal {
  margin: 0;
  padding: 26px 28px;
  border-radius: 22px;
  background: #1b1815;
  color: #efe6d6;
  font: 14px/1.9 var(--mono);
  overflow-x: auto;
  box-shadow: 0 30px 60px -30px rgb(var(--shadow-ink) / 0.5);
}
@media (prefers-color-scheme: dark) { .terminal { background: #0f0d0b; box-shadow: 0 0 0 1px var(--line); } }
.terminal code { background: none; padding: 0; font: inherit; color: inherit; border-radius: 0; }
.t-dim { color: #8c8273; user-select: none; }
@media (max-width: 860px) { .source { grid-template-columns: 1fr; } }

/* Closing */
.closing { padding: clamp(48px, 8vh, 96px) 0 clamp(48px, 8vh, 80px); }
.closing-panel {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: min(78vh, 720px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px;
  padding: 64px var(--gutter);
  text-align: center;
  background-position: center; background-size: cover;
  color: #221e1a;
}
.closing-panel::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 55% 45% at 50% 55%, rgb(30 20 10 / 0.28), transparent 70%);
}
.closing-panel > * { position: relative; }
.closing-mark {
  width: clamp(96px, 12vw, 150px); aspect-ratio: 1;
  background: #f3ece0;
  -webkit-mask: var(--mark) center / contain no-repeat; mask: var(--mark) center / contain no-repeat;
  filter: drop-shadow(0 18px 30px rgb(30 20 10 / 0.3));
}
.closing-title {
  font: 400 clamp(48px, 7.5vw, 112px)/0.95 var(--serif);
  letter-spacing: -0.035em;
  color: #f6f0e6;
  text-shadow: 0 1px 2px rgb(30 20 10 / 0.25), 0 4px 40px rgb(30 20 10 / 0.35);
  max-width: 12ch;
  text-wrap: balance;
}
.hero-meta a, .closing-meta a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.closing-meta { -webkit-user-select: text; user-select: text; font-size: 13px; color: rgb(246 240 230 / 0.9); text-shadow: 0 1px 8px rgb(30 20 10 / 0.4); }

/* Footer */
.footer {
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin: 0 auto;
  padding: 28px 0 48px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px;
  border-top: 1px solid var(--line);
  font-size: 14px; color: var(--ink-3);
}
.footer-brand { display: flex; align-items: center; gap: 9px; font: 500 19px/1 var(--serif); color: var(--ink); }
.footer-brand > span:last-child { translate: 0 0.07em; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { text-decoration: none; color: var(--ink-2); }
.footer-links a:hover { color: var(--ink); }
.footer-note { margin-left: auto; }
@media (max-width: 760px) { .footer-note { margin-left: 0; } }

/* Brand menu (right-click the header mark) */
.brand-menu {
  position: fixed; z-index: 120;
  min-width: 220px;
  padding: 6px;
  border-radius: 12px;
  background: color-mix(in oklab, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: 0 0 0 1px var(--line), 0 18px 40px -12px rgb(var(--shadow-ink) / 0.45);
  font-size: 13.5px;
  transform-origin: top left;
  animation: menu-in 0.16s var(--ease);
}
@keyframes menu-in { from { opacity: 0; transform: scale(0.96); } }
.brand-menu [role="menuitem"] {
  display: block; width: 100%; text-align: left;
  padding: 7px 10px; border: 0; border-radius: 7px;
  background: none; color: var(--ink); font: inherit; text-decoration: none; cursor: default;
}
.brand-menu [role="menuitem"]:hover, .brand-menu [role="menuitem"]:focus-visible { background: var(--accent); color: #fff; outline: none; }
.brand-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 8px; }
.brand-menu-label { padding: 2px 10px 6px; font-size: 11.5px; color: var(--ink-3); }
.brand-swatches { display: flex; gap: 8px; padding: 0 10px 8px; }
.brand-swatches button {
  width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.14);
  transition: transform 0.2s var(--ease);
}
.brand-swatches button:hover { transform: scale(1.15); }
.toast {
  position: fixed; z-index: 130; left: 50%; bottom: 28px; translate: -50% 0;
  padding: 10px 16px; border-radius: 999px;
  background: var(--button); color: var(--button-ink); font-size: 14px; font-weight: 500;
  animation: toast 2.2s var(--ease) forwards;
}
@keyframes toast { 0% { opacity: 0; transform: translateY(8px); } 12%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }
