/* site.css: the homepage and the renders gallery (web/site/). The
   walkthrough (/walkthrough/) keeps its own styles. Colours come from the
   house: warm paper and charcoal, Topiary green, brushed brass, and a dusk
   night for the walkthrough band. Light and dark follow the device. */

:root {
  color-scheme: light dark;
  --paper: #f4f1ea;
  --paper-2: #ebe6db;
  --card: #fbf9f4;
  --ink: #201e1a;
  --ink-2: #5a544b;
  --line: rgba(32, 30, 26, .14);
  --accent: #74561f;          /* brushed brass, safe for text on paper */
  --accent-2: #9f7c45;        /* brass for numerals and rules (3:1 on paper) */
  --green: #3e4a37;           /* Topiary: the solid buttons */
  --on-green: #f6f2ea;
  --night: #15181d;           /* the walkthrough band */
  --on-night: #ece6db;
  --on-night-2: #b3ab9e;
  --night-line: rgba(236, 230, 219, .14);
  --shadow: 0 1px 2px rgba(40, 30, 10, .05), 0 28px 56px -32px rgba(40, 30, 10, .32);
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4.5vw, 56px);
  --max: 1280px;
  --r: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111317;
    --paper-2: #181b20;
    --card: #171a1f;
    --ink: #ece6db;
    --ink-2: #aaa397;
    --line: rgba(236, 230, 219, .13);
    --accent: #d8b67e;
    --accent-2: #a98b5a;
    --green: #bccaab;
    --on-green: #14170f;
    --night: #1a1e24;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 28px 56px -32px rgba(0, 0, 0, .7);
  }
}

/* ---- base ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* smooth scrolling for the homepage's in-page links only: on the gallery a
   #r12 link would otherwise scroll the page for a second behind the open
   lightbox, loading every thumbnail on the way */
html:has(> body.home) { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; overflow-x: clip;
  background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
picture { display: block; }
a { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3 {
  margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.08;
  letter-spacing: -.012em; text-wrap: balance;
}
h3 { font-size: 1.375rem; line-height: 1.2; }
p, ul, ol, dl { margin: 0; }
p, li, dd { text-wrap: pretty; }
b { font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.hero :focus-visible, .walk :focus-visible, .site-header--overlay :focus-visible { outline-color: #f0d7a6; }

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 50;
  padding: 12px 18px; border-radius: 10px;
  background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600;
}
.skip:focus { top: calc(12px + env(safe-area-inset-top)); }

.eyebrow {
  margin-bottom: .9rem;
  font: 600 .75rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent);
}
.fine { margin-top: 1rem; font-size: .875rem; line-height: 1.5; color: var(--ink-2); }

/* ---- header and footer --------------------------------------------------- */

.site-header { position: relative; z-index: 10; }
.site-header--overlay { position: absolute; inset: 0 0 auto; color: #fff; }
.gallery .site-header { border-bottom: 1px solid var(--line); }
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding-top: env(safe-area-inset-top);
}
.wordmark {
  display: inline-flex; align-items: center; gap: .5em; white-space: nowrap;
  font: 400 1.1875rem/1 var(--serif); letter-spacing: .005em; text-decoration: none;
}
.wordmark svg { width: 1.15em; height: 1.15em; stroke-width: 2; color: var(--accent-2); }
.site-header--overlay .wordmark svg { color: #e9cf9f; }
.site-header nav ul { display: flex; gap: clamp(16px, 2.6vw, 34px); list-style: none; padding: 0; }
.site-header nav a {
  display: inline-block; padding: 12px 0;
  font: 500 .9375rem/1 var(--sans); text-decoration: none; opacity: .86;
  text-underline-offset: 7px; text-decoration-thickness: 1px;
}
.site-header nav a:hover, .site-header nav a[aria-current] { opacity: 1; text-decoration-line: underline; }
.site-header--overlay .bar { text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
@media (max-width: 480px) { .nav-app { display: none; } }
/* small phones: a smaller bar, then the house icon alone (its name stays
   for screen readers), so the links keep the 16 px margin down to 320 px */
@media (max-width: 379px) {
  .site-header .wordmark { font-size: 1.0625rem; }
  .site-header nav ul { gap: 14px; }
  .site-header nav a { font-size: .875rem; }
}
@media (max-width: 359px) {
  .site-header .wordmark { gap: 0; padding-block: 9px; }
  .site-header .wordmark svg { width: 26px; height: 26px; }
  .site-header .wordmark-text {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
}

.site-footer {
  margin-top: clamp(24px, 4vw, 48px); border-top: 1px solid var(--line);
  padding-block: 36px calc(40px + env(safe-area-inset-bottom));
  color: var(--ink-2); font-size: .9375rem;
}
.foot { display: grid; gap: 14px; }
.site-footer .wordmark { color: var(--ink); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer nav a { text-decoration: none; padding: 6px 0; }
.site-footer nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }
@media (min-width: 860px) { .foot { grid-template-columns: auto 1fr auto; align-items: center; gap: 36px; } }

/* ---- buttons and links --------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: 0 1.5em; border-radius: 999px; border: 1px solid transparent;
  font: 600 1rem/1.1 var(--sans); text-decoration: none; text-align: center;
  transition: background-color .25s, border-color .25s, color .25s, filter .25s, transform .25s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn[download]:hover svg { transform: translateY(2px); }
.btn:active { transform: scale(.98); }
.btn-light { background: #f7f2e8; color: #1c1a16; }
.btn-light:hover { background: #fff; }
.btn-glass {
  color: #fff; border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.btn-glass:hover { background: rgba(255, 255, 255, .18); border-color: #fff; }
.btn-solid { background: var(--green); color: var(--on-green); }
.btn-solid:hover { filter: brightness(1.15); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .5em; padding: 10px 0;
  font-weight: 600; text-decoration: none; color: var(--accent);
}
.link-arrow svg { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 6px; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---- hero ---------------------------------------------------------------- */

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: max(600px, 100svh); color: #fff; background: #1a1c22;
}
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media { z-index: -2; }
.hero-media img {
  object-fit: cover; object-position: var(--focus, 50% 50%);
  animation: settle 2.6s var(--ease) both;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10, 11, 14, .55) 0%, rgba(10, 11, 14, 0) 20%),
    linear-gradient(0deg, rgba(10, 11, 14, .92) 0%, rgba(10, 11, 14, .66) 34%, rgba(10, 11, 14, 0) 66%);
}
.hero-inner { padding-block: 132px calc(clamp(40px, 8vh, 96px) + env(safe-area-inset-bottom)); }
.hero .eyebrow { color: #ecd2a2; }
.hero h1 { max-width: 12ch; font-size: clamp(2.9rem, 1.6rem + 6vw, 6.25rem); line-height: .98; letter-spacing: -.022em; }
.hero .lead { max-width: 34rem; margin-top: 1.2rem; font-size: clamp(1.0625rem, 1rem + .4vw, 1.3rem); line-height: 1.55; color: rgba(255, 255, 255, .88); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }
.hero-credit {
  position: absolute; right: var(--gutter); bottom: calc(22px + env(safe-area-inset-bottom));
  font: 500 .75rem/1 var(--sans); letter-spacing: .08em; color: rgba(255, 255, 255, .72);
}
.hero-credit .num { color: #ecd2a2; margin-right: .4em; }
.hero-inner > * { animation: rise 1s var(--ease) both; }
.hero-inner > :nth-child(2) { animation-delay: .08s; }
.hero-inner > :nth-child(3) { animation-delay: .16s; }
.hero-inner > :nth-child(4) { animation-delay: .24s; }
@keyframes settle { from { transform: scale(1.07); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  .actions .btn { width: 100%; }
  .hero-credit { display: none; }
}
/* phones: the image fills the top of the screen and fades into the dusk
   below it, so the lit alfresco stays clear of the text */
@media (max-width: 699px) {
  .hero { background: #121316; }
  .hero-media { inset: 0 0 auto; height: 70%; }
  .hero::after {
    background:
      linear-gradient(180deg, rgba(10, 11, 14, .55) 0%, rgba(10, 11, 14, 0) 15%,
        rgba(18, 19, 22, 0) 32%, rgba(18, 19, 22, .82) 54%, #121316 70%);
  }
}
@media (min-width: 900px) {
  .hero { min-height: clamp(660px, 96svh, 1060px); }
  .hero::after {
    background:
      linear-gradient(180deg, rgba(10, 11, 14, .5) 0%, rgba(10, 11, 14, 0) 22%),
      linear-gradient(90deg, rgba(10, 11, 14, .78) 0%, rgba(10, 11, 14, .4) 36%, rgba(10, 11, 14, 0) 62%),
      linear-gradient(0deg, rgba(10, 11, 14, .6) 0%, rgba(10, 11, 14, 0) 46%);
  }
}
/* phones held sideways: the hero is one screen tall, the image fills it and
   the headline, intro and both buttons fit on that first screen */
@media (orientation: landscape) and (max-height: 500px) {
  .hero { min-height: 100svh; background: #1a1c22; }
  .hero-media { inset: 0; height: 100%; }
  .hero::after {
    background:
      linear-gradient(180deg, rgba(10, 11, 14, .55) 0%, rgba(10, 11, 14, 0) 26%),
      linear-gradient(90deg, rgba(10, 11, 14, .82) 0%, rgba(10, 11, 14, .5) 42%, rgba(10, 11, 14, 0) 74%),
      linear-gradient(0deg, rgba(10, 11, 14, .72) 0%, rgba(10, 11, 14, 0) 58%);
  }
  .hero-inner { padding-block: 72px calc(20px + env(safe-area-inset-bottom)); }
  .hero .eyebrow { margin-bottom: .5rem; }
  .hero h1 { max-width: none; font-size: clamp(2rem, 11vh, 3rem); }
  .hero .lead { max-width: 42rem; margin-top: .55rem; font-size: .9375rem; line-height: 1.5; }
  .actions { margin-top: 1rem; }
  .actions .btn { width: auto; min-height: 46px; }
  .hero-credit { bottom: calc(16px + env(safe-area-inset-bottom)); }
}
@media (orientation: landscape) and (max-height: 500px) and (max-width: 799px) { .hero-credit { display: none; } }

/* ---- sections ------------------------------------------------------------ */

.section { padding-block: clamp(64px, 10vw, 136px); }
.section h2 { font-size: clamp(2.15rem, 1.5rem + 2.7vw, 3.6rem); }
.section-head { display: grid; gap: 14px 56px; align-items: end; margin-bottom: clamp(28px, 4vw, 52px); }
.section-note { max-width: 30rem; color: var(--ink-2); }
@media (min-width: 900px) { .section-head { grid-template-columns: 1fr minmax(0, 28rem); } }

/* what's inside: a swipeable strip on phones, a mosaic from 900 px */
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 380px); gap: 14px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding: 0 var(--gutter) 6px; scroll-padding-inline: var(--gutter); scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.card { display: flex; flex-direction: column; scroll-snap-align: start; text-decoration: none; }
.card-media {
  position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5;
  border-radius: var(--r); background: var(--paper-2);
}
.card-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--focus, 50% 50%);
  transition: transform 1.2s var(--ease);
}
.card:hover .card-media img { transform: scale(1.04); }
.card-cap { display: flex; align-items: baseline; gap: .65em; padding-top: 12px; }
.card-cap .num, .g-cap .num {
  font: 600 .75rem/1 var(--sans); letter-spacing: .08em; color: var(--accent);
}
.card-title { font: 400 1.3125rem/1.2 var(--serif); }
.card-time, .g-time { margin-left: auto; font: 500 .8125rem/1 var(--sans); color: var(--ink-2); }
.card:hover .card-title { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.more { margin-top: 18px; }

@media (min-width: 900px) {
  .strip {
    width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; padding: 0; overflow: visible;
    grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 20px;
  }
  .card-media { aspect-ratio: 4 / 3; }
  .card:first-child { grid-column: span 2; grid-row: span 2; }
  .card:first-child .card-media { flex: 1; aspect-ratio: auto; min-height: 320px; }
  .card:first-child .card-title { font-size: 1.625rem; }
  .more { margin-top: 28px; }
}

/* walkthrough band */
.walk { background: var(--night); color: var(--on-night); }
.walk .eyebrow { color: #ddbd86; }
.walk-grid { display: grid; gap: clamp(28px, 5vw, 80px); align-items: center; }
.walk-media {
  position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 11;
  border-radius: var(--r); background: #0d0f12;
}
.walk-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--focus, 50% 50%); transition: transform 1.2s var(--ease);
}
.walk-media:hover img { transform: scale(1.03); }
.walk-badge {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
  background: rgba(247, 242, 232, .94); color: #1c1a16;
  box-shadow: 0 0 0 10px rgba(247, 242, 232, .18), 0 18px 40px rgba(0, 0, 0, .35);
  transition: transform .35s var(--ease), box-shadow .35s;
}
.walk-badge svg { width: 30px; height: 30px; fill: currentColor; stroke: none; margin-left: 4px; }
.walk-media:hover .walk-badge { transform: scale(1.06); box-shadow: 0 0 0 14px rgba(247, 242, 232, .22), 0 18px 40px rgba(0, 0, 0, .35); }
.walk-copy > p { color: var(--on-night-2); max-width: 34rem; margin-top: 1.1rem; }
.walk-copy > .eyebrow { margin-top: 0; }
.how { display: grid; gap: 14px; margin: 1.6rem 0 2rem; max-width: 34rem; }
.how div { padding-top: 14px; border-top: 1px solid var(--night-line); }
.how dt { font: 600 .875rem/1.3 var(--sans); color: var(--on-night); }
.how dd { margin: 4px 0 0; color: var(--on-night-2); }
.walk .btn-solid { background: #f7f2e8; color: #1c1a16; }
.walk .btn-solid:hover { background: #fff; filter: none; }
.walk .fine { color: var(--on-night-2); }
@media (min-width: 900px) {
  .walk-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .how { grid-template-columns: 1fr 1fr; gap: 24px; }
}

/* Mac app */
.app { padding-bottom: 0; }
.app-card {
  display: grid; gap: clamp(28px, 4vw, 56px); padding: clamp(22px, 4vw, 56px);
  background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--r) * 1.6);
  box-shadow: var(--shadow);
}
.app-head { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 26px); }
.app-head .eyebrow { margin-bottom: .45rem; }
.app-icon { width: clamp(76px, 10vw, 108px); height: auto; aspect-ratio: 1; flex: none; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .22)); }
.app-icon--plain { border-radius: 24%; background: linear-gradient(160deg, #3e4a37, #1f251c); }
.app-meta { margin-top: .5rem; color: var(--ink-2); font-size: .9375rem; }
.app-intro { margin: 1.4rem 0 1.6rem; max-width: 34rem; }
.app-main h3, .app-steps h3 { margin-bottom: .6rem; }
.app-main h3 { margin-top: 2.2rem; }
.reqs { padding-left: 1.15em; color: var(--ink-2); }
.reqs li + li { margin-top: .5rem; }
.reqs li::marker { color: var(--accent-2); }
.app-steps { align-self: start; padding: clamp(20px, 3vw, 32px); border-radius: var(--r); background: var(--paper-2); }
.app-steps > p { color: var(--ink-2); }
.steps { counter-reset: step; list-style: none; padding: 0; margin-top: 1.2rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 14px; align-items: start; }
.steps li + li { margin-top: .95rem; }
.steps li::before {
  content: counter(step); width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--accent-2); color: var(--accent);
  font: 600 .8125rem/28px var(--sans); text-align: center;
}
.steps li span { padding-top: 3px; }
@media (min-width: 960px) { .app-card { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
@media (max-width: 559px) {
  /* phones: the steps use the card's full width */
  .app-steps { padding: 26px 0 0; border-radius: 0; background: none; border-top: 1px solid var(--line); }
}

/* how this was made */
.made-steps { list-style: none; padding: 0; counter-reset: made; display: grid; gap: 30px; }
.made-steps li { counter-increment: made; padding-top: 22px; border-top: 1px solid var(--line); }
.made-steps li::before {
  content: "0" counter(made); display: block; margin-bottom: 18px;
  font: 400 3rem/1 var(--serif); color: var(--accent-2); font-variant-numeric: lining-nums;
}
.made-steps h3 { margin-bottom: .5rem; }
.made-steps p { color: var(--ink-2); max-width: 26rem; }
.note {
  display: grid; gap: 12px 40px; margin-top: clamp(36px, 5vw, 64px);
  padding: clamp(20px, 3vw, 32px); border-radius: var(--r); background: var(--paper-2);
}
.note ul { padding-left: 1.15em; color: var(--ink-2); }
.note li + li { margin-top: .35rem; }
.note li::marker { color: var(--accent-2); }
@media (min-width: 820px) {
  .made-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px; }
  .note { grid-template-columns: 17rem 1fr; align-items: start; }
}

/* ---- gallery ------------------------------------------------------------- */

.page-head { padding-block: clamp(40px, 7vw, 100px) clamp(32px, 5vw, 64px); }
.page-head h1 { max-width: 14ch; font-size: clamp(2.6rem, 1.6rem + 4.4vw, 5rem); line-height: 1; letter-spacing: -.02em; }
.page-head .lead { max-width: 40rem; margin-top: 1.2rem; font-size: clamp(1.0625rem, 1rem + .3vw, 1.2rem); color: var(--ink-2); }
.page-head .fine { max-width: 40rem; }

.g-group + .g-group { margin-top: clamp(52px, 7vw, 100px); }
.g-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-bottom: clamp(18px, 2.5vw, 28px); padding-top: 16px; border-top: 1px solid var(--line);
}
.g-head h2 { font-size: clamp(1.7rem, 1.35rem + 1.3vw, 2.4rem); }
.g-range { font: 600 .75rem/1 var(--sans); letter-spacing: .12em; color: var(--accent); font-variant-numeric: tabular-nums; }
.g-grid { list-style: none; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px 22px; }
.g-item { scroll-margin-top: 24px; }
.g-link { display: block; overflow: hidden; border-radius: 10px; background: var(--paper-2); cursor: zoom-in; }
.g-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 1.2s var(--ease); }
.g-link:hover img { transform: scale(1.035); }
.g-cap { display: flex; align-items: baseline; gap: .65em; margin-top: 12px; }
.g-title { font: 400 1.3125rem/1.2 var(--serif); }
.g-desc { margin-top: 5px; font-size: .9375rem; line-height: 1.5; color: var(--ink-2); }
@media (min-width: 640px) { .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
  .g-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* outside: the 2 exteriors larger */
}

.cta {
  display: grid; gap: 22px; align-items: center;
  margin-top: clamp(64px, 9vw, 120px); padding: clamp(24px, 4vw, 48px);
  border-radius: calc(var(--r) * 1.6); background: var(--night); color: var(--on-night);
}
.cta .eyebrow { color: #ddbd86; }
.cta h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.9rem); }
.cta p:last-child { margin-top: .7rem; color: var(--on-night-2); }
.cta .btn-solid { background: #f7f2e8; color: #1c1a16; justify-self: start; }
.cta :focus-visible { outline-color: #f0d7a6; }
@media (min-width: 820px) { .cta { grid-template-columns: 1fr auto; } }
@media (max-width: 560px) { .cta .btn { width: 100%; } }

/* ---- lightbox ------------------------------------------------------------ */

html.lb-open { overflow: hidden; }
.lb {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  margin: 0; padding: 0; border: 0; overflow: hidden;
  background: #0a0b0d; color: #ece6db; color-scheme: dark;
}
.lb[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: fade .25s ease both; }
.lb::backdrop { background: #0a0b0d; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.lb :focus-visible { outline-color: #e9cd97; }
/* gallery.js focuses the dialog itself when it opens; Tab then reaches the buttons */
.lb:focus, .lb:focus-visible { outline: none; }
.lb-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(8px + env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 8px max(18px, env(safe-area-inset-left));
}
.lb-count { font: 500 .875rem/1 var(--sans); color: #b8b0a3; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.lb-btn {
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .09); color: #fff; cursor: pointer;
  transition: background-color .2s;
}
.lb-btn:hover { background: rgba(255, 255, 255, .2); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-stage { position: relative; overflow: hidden; touch-action: pan-y pinch-zoom; -webkit-user-select: none; user-select: none; }
.lb-frame {
  display: grid; width: 100%; height: 100%; padding: 0 clamp(48px, 6vw, 96px);
  transform: translateX(var(--dx, 0px)); transition: transform .35s var(--ease);
}
.lb-stage.dragging .lb-frame { transition: none; }
.lb-frame picture { display: contents; }
.lb-ph, .lb-img { grid-area: 1 / 1; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
/* the blur makes the placeholder a stacking context, so both need a z-index
   or the placeholder paints over the loaded image */
.lb-ph { position: relative; z-index: 0; filter: blur(6px); }
.lb-img { position: relative; z-index: 1; opacity: 0; transition: opacity .35s ease; }
.lb-img.loaded { opacity: 1; }
.lb-frame.ready .lb-ph { visibility: hidden; }
.lb-prev, .lb-next { position: absolute; top: 50%; translate: 0 -50%; background: rgba(20, 20, 22, .55); }
.lb-prev:hover, .lb-next:hover { background: rgba(60, 60, 64, .75); }
.lb-prev { left: max(12px, env(safe-area-inset-left)); }
.lb-next { right: max(12px, env(safe-area-inset-right)); }
.lb-cap {
  display: grid; gap: 14px 28px;
  padding: 16px max(18px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.lb-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25em .6em; font: 400 1.5rem/1.2 var(--serif); }
.lb-title .num { font: 600 .8125rem/1 var(--sans); letter-spacing: .08em; color: #d8b67e; }
.lb-title .lb-time { font: 500 .875rem/1 var(--sans); color: #b8b0a3; }
.lb-desc { max-width: 62ch; margin-top: 6px; font-size: .9375rem; line-height: 1.5; color: #c8c1b5; }
.lb-dl {
  justify-self: start; display: inline-flex; align-items: center; gap: .55em;
  min-height: 46px; padding: 0 1.15em; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .32);
  font: 600 .9375rem/1 var(--sans); color: #fff; text-decoration: none; white-space: nowrap;
  transition: background-color .2s, border-color .2s;
}
.lb-dl:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.lb-dl svg { width: 18px; height: 18px; }
.lb-dl .lb-dl-size { font-weight: 400; color: #b8b0a3; }
@media (max-width: 700px) {
  .lb-frame { padding: 0; }
  .lb-prev, .lb-next { top: auto; bottom: 14px; translate: none; }
  .lb-prev { left: auto; right: calc(max(12px, env(safe-area-inset-right)) + 58px); }
}
@media (min-width: 800px) {
  .lb-cap { grid-template-columns: minmax(0, 1fr) auto; align-items: end; padding-inline: 32px; }
}
/* phones held sideways: the render takes the whole height. The count, the
   close button and a one-line caption with the download sit over it on soft
   gradients, the arrows over its edges; a tap on the render hides them
   (gallery.js uses the same media query) */
@media (orientation: landscape) and (max-height: 500px) {
  .lb[open] { grid-template-rows: minmax(0, 1fr); }
  .lb-top, .lb-cap {
    position: absolute; left: 0; right: 0; z-index: 2; pointer-events: none;
    transition: opacity .25s ease, visibility .25s;
  }
  .lb-top > *, .lb-cap > * { pointer-events: auto; }
  .lb-top {
    top: 0; padding-block: calc(4px + env(safe-area-inset-top)) 18px;
    background: linear-gradient(180deg, rgba(10, 11, 13, .72), rgba(10, 11, 13, 0));
  }
  .lb-count { text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
  .lb-btn { width: 44px; height: 44px; }
  .lb-frame { padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left); }
  .lb-prev, .lb-next { top: 50%; bottom: auto; translate: 0 -50%; transition: opacity .25s ease, visibility .25s, background-color .2s; }
  .lb-prev { left: max(8px, env(safe-area-inset-left)); right: auto; }
  .lb-next { right: max(8px, env(safe-area-inset-right)); }
  .lb-cap {
    bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding-block: 30px calc(8px + env(safe-area-inset-bottom)); border-top: 0;
    background: linear-gradient(0deg, rgba(10, 11, 13, .84) 0%, rgba(10, 11, 13, .5) 55%, rgba(10, 11, 13, 0));
  }
  .lb-cap > div { min-width: 0; }
  .lb-title { flex-wrap: nowrap; white-space: nowrap; font-size: 1.125rem; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
  .lb-desc { display: none; }
  .lb-dl { flex: none; min-height: 40px; padding: 0 1em; font-size: .875rem; background: rgba(10, 11, 13, .55); }
  .lb-dl-size {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
  .lb.bare .lb-top, .lb.bare .lb-cap, .lb.bare .lb-prev, .lb.bare .lb-next { opacity: 0; visibility: hidden; }
}

/* ---- motion -------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
