/* Jesse Raso – site styles
   One typeface (Mona Sans, variable width + weight). Width is the main
   hierarchy tool: expanded for display, normal for reading, narrow for meta. */

@font-face {
  font-family: "Mona Sans";
  src: url("../fonts/mona-sans/mona-sans-latin-wdth-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}


:root {
  color-scheme: light dark;

  /* Colour: matte photo paper, slate ink, and the green a camera shows when focus locks */
  --paper: #f3f4f1;
  --panel: #e6e9e4;
  --ink: #18202a;
  --graphite: #535d68;
  --rule: #d0d5cf;
  --focus: #17894a;
  --af: #3ddc71;

  --font: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --max: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(80px, 11vw, 160px);

  --text-sm: 0.875rem;
  --text-base: 1.0625rem;
  --text-lg: clamp(1.1875rem, 1.05rem + 0.45vw, 1.375rem);
  --text-h3: clamp(1.625rem, 1.3rem + 1.1vw, 2.25rem);
  --text-h2: clamp(2.25rem, 1.4rem + 3vw, 4rem);
  --text-title: clamp(3.25rem, 1rem + 8.5vw, 8.5rem);

  /* Form fields */
  --field: #fbfbf9;
  --field-line: #858e87;
  --error: #b42318;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #11161b;
    --panel: #1a2128;
    --ink: #e6eaed;
    --graphite: #9aa4ae;
    --rule: #2a333c;
    --focus: #4fcd7e;
    --field: #161c22;
    --field-line: #5d6873;
    --error: #ff8f80;
  }
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-base);
  font-stretch: 100%;
  font-weight: 400;
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

p,
li,
dd,
figcaption {
  text-wrap: pretty;
}

h1,
h2,
h3,
.page-lede,
.hero__intro {
  text-wrap: balance;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-color: var(--focus);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

::selection {
  background: var(--af);
  color: #0c2415;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -80px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.text-link {
  font-weight: 600;
}

.nowrap {
  white-space: nowrap;
}

/* ---------- Header and footer ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 20px;
}

/* JR logo: the letters take the text colour, the square is the focus green */
.logo {
  display: inline-flex;
  align-items: center;
  padding-block: 4px;
  color: var(--ink);
  text-decoration: none;
}

.logo__mark {
  display: block;
  width: auto;
  height: 22px;
}

@media (min-width: 760px) {
  .logo__mark {
    height: 26px;
  }
}

.logo__mark path {
  fill: currentColor;
}

.logo__dot {
  fill: var(--focus);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 22px;
}

.nav a {
  display: inline-block;
  padding-block: 6px;
  font-size: 0.9375rem;
  font-stretch: 96%;
  font-weight: 520;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--focus);
  text-decoration-thickness: 2px;
}

/* Smallest phones: keep all four links on one line */
@media (max-width: 359px) {
  .nav {
    gap: 2px 14px;
  }
}

.site-footer {
  margin-top: var(--section);
  color: var(--graphite);
  font-size: var(--text-sm);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 28px 44px;
  border-top: 1px solid var(--rule);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.button {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font-size: 1rem;
  font-stretch: 104%;
  font-weight: 620;
  line-height: 1.2;
  text-decoration: none;
}

.button:hover {
  background: color-mix(in srgb, var(--ink) 86%, var(--paper));
}

button.button {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.button:disabled,
.button[aria-disabled="true"] {
  opacity: 0.6;
  cursor: progress;
}

/* ---------- Home: hero ---------- */

.hero {
  padding-top: clamp(24px, 5vw, 64px);
  container-type: inline-size;
}

/* The name is sized to the width of the content column:
   "Jesse" is 2.88em wide on phones, "Jesse Raso" 5.69em on one line. */
.hero__name {
  font-size: 28vw;
  font-size: calc(100cqi / 2.96);
  font-stretch: 125%;
  font-weight: 800;
  line-height: 0.84;
  letter-spacing: -0.045em;
  margin-left: -0.035em;
}

.hero__name span {
  display: block;
}

@media (min-width: 760px) {
  .hero__name {
    font-size: 14vw;
    font-size: calc(100cqi / 5.74);
    white-space: nowrap;
  }

  .hero__name span {
    display: inline;
  }
}

.hero__grid {
  display: grid;
  gap: 40px;
  margin-top: clamp(28px, 4.5vw, 64px);
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: start;
  }
}

.hero__intro {
  max-width: 30ch;
  font-size: var(--text-lg);
  line-height: 1.5;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: 28px;
}

/* The viewfinder: Jesse's photo with an autofocus box that locks on load */

.viewfinder {
  width: 100%;
  max-width: 640px;
  justify-self: end;
}

.viewfinder__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: #2c3a2e;
}

.viewfinder__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    filter 760ms cubic-bezier(0.2, 0.65, 0.25, 1),
    transform 1000ms cubic-bezier(0.2, 0.65, 0.25, 1);
}

.viewfinder__corners {
  position: absolute;
  inset: clamp(10px, 2.2%, 16px);
  pointer-events: none;
  --c: rgb(255 255 255 / 0.85);
  --t: 1.5px;
  --l: clamp(14px, 4.5%, 26px);
  background:
    linear-gradient(var(--c) 0 0) top left / var(--l) var(--t),
    linear-gradient(var(--c) 0 0) top left / var(--t) var(--l),
    linear-gradient(var(--c) 0 0) top right / var(--l) var(--t),
    linear-gradient(var(--c) 0 0) top right / var(--t) var(--l),
    linear-gradient(var(--c) 0 0) bottom left / var(--l) var(--t),
    linear-gradient(var(--c) 0 0) bottom left / var(--t) var(--l),
    linear-gradient(var(--c) 0 0) bottom right / var(--l) var(--t),
    linear-gradient(var(--c) 0 0) bottom right / var(--t) var(--l);
  background-repeat: no-repeat;
  /* Keeps the white corners visible against a bright sky */
  filter: drop-shadow(0 0 1px rgb(0 0 0 / 0.45));
}

.viewfinder__af {
  position: absolute;
  left: 58.6%;
  top: 23%;
  width: 12.5%;
  aspect-ratio: 1;
  border: 2px solid var(--af);
  transform: translate(-50%, -50%);
  pointer-events: none;
  /* Keeps the box visible while it is still white over the pale sky */
  filter: drop-shadow(0 0 1px rgb(0 0 0 / 0.5));
}

.js .viewfinder:not(.is-locked) .viewfinder__frame img {
  filter: blur(9px);
  transform: scale(1.03);
  /* Failsafe: sharpen after 3s even if site.js never loads */
  animation: af-failsafe-img 0s 3s forwards;
}

.js .viewfinder:not(.is-locked) .viewfinder__af {
  border-color: #fff;
  transform: translate(-50%, -50%) scale(1.75);
  animation: af-failsafe-box 0s 3s forwards;
}

@keyframes af-failsafe-img {
  to {
    filter: none;
    transform: none;
  }
}

@keyframes af-failsafe-box {
  to {
    border-color: var(--af);
    transform: translate(-50%, -50%);
  }
}

.viewfinder.is-locked .viewfinder__af {
  animation: af-lock 640ms cubic-bezier(0.3, 0.7, 0.2, 1) both;
}

@keyframes af-lock {
  0% {
    border-color: #fff;
    transform: translate(-50%, -50%) scale(1.75);
  }
  70% {
    border-color: #fff;
    transform: translate(-50%, -50%) scale(0.93);
  }
  72% {
    border-color: var(--af);
  }
  100% {
    border-color: var(--af);
    transform: translate(-50%, -50%) scale(1);
  }
}

.viewfinder figcaption {
  margin-top: 10px;
  color: var(--graphite);
  font-size: var(--text-sm);
  font-stretch: 92%;
}

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

.section {
  padding-top: var(--section);
}

.section-title {
  font-size: var(--text-h2);
  font-stretch: 120%;
  font-weight: 740;
  letter-spacing: -0.03em;
  line-height: 0.98;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: clamp(28px, 4vw, 52px);
}

/* ---------- Home: selected work ---------- */

.projects {
  border-bottom: 1px solid var(--rule);
}

.project {
  position: relative;
  display: grid;
  gap: 22px 56px;
  padding-block: clamp(28px, 4vw, 52px);
  border-top: 1px solid var(--rule);
}

@media (min-width: 820px) {
  .project {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
  }
}

.project__media img {
  width: 100%;
  outline: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  outline-offset: -1px;
}

.project__title {
  font-size: var(--text-h3);
  font-stretch: 114%;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.project__title a {
  text-decoration: none;
}

/* The title link covers the whole row, so the image and text are one target */
.project__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.project__title a:focus-visible {
  outline: none;
}

.project:has(.project__title a:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 6px;
}

.project:hover .project__title a,
.project:has(.project__title a:focus-visible) .project__title a {
  text-decoration: underline;
  text-decoration-color: var(--focus);
  text-decoration-thickness: 2px;
}

.project__context {
  margin-top: 8px;
  color: var(--graphite);
  font-size: var(--text-sm);
  font-stretch: 92%;
  font-weight: 520;
}

.project__summary {
  max-width: 44ch;
  margin-top: 16px;
}

.project__stack {
  margin-top: 12px;
  color: var(--graphite);
  font-size: var(--text-sm);
  font-stretch: 92%;
}

.project__more {
  display: inline-block;
  margin-top: 20px;
  font-weight: 620;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

/* ---------- Home: about ---------- */

.about__grid {
  display: grid;
  gap: 48px 72px;
}

@media (min-width: 900px) {
  .about__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  }
}

.prose {
  max-width: 62ch;
}

.prose p + p {
  margin-top: 1em;
}

.about .prose {
  font-size: var(--text-lg);
  line-height: 1.55;
}

.toolkit-title {
  font-size: 1.125rem;
  font-stretch: 112%;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.toolkit {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.toolkit dt {
  color: var(--graphite);
  font-size: var(--text-sm);
  font-stretch: 90%;
  font-weight: 600;
}

.toolkit dd {
  margin-top: 2px;
}

/* Experience: a short timeline under the About text */
.experience-title {
  margin-top: clamp(36px, 4vw, 52px);
}

.experience {
  margin-top: 8px;
  border-top: 1px solid var(--rule);
  font-size: var(--text-base);
  line-height: 1.5;
}

.experience li {
  padding-block: 14px;
  border-bottom: 1px solid var(--rule);
}

.prose .experience li + li {
  margin-top: 0;
}

.experience__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 20px;
}

/* Wider screens: dates stay right-aligned even when a role wraps */
@media (min-width: 560px) {
  .experience__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.experience__role {
  font-weight: 620;
}

.experience__dates {
  color: var(--graphite);
  font-size: var(--text-sm);
  font-stretch: 92%;
  font-weight: 520;
  white-space: nowrap;
}

.about .prose .experience p {
  margin-top: 4px;
  color: var(--graphite);
  font-size: var(--text-base);
  line-height: 1.5;
}

/* ---------- Home: photo strip ---------- */

.photo-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 12px;
}

@media (min-width: 760px) {
  .photo-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
}

.photo-strip img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--panel);
}

.photo-strip figcaption,
.gallery figcaption {
  margin-top: 8px;
  color: var(--graphite);
  font-size: var(--text-sm);
  font-stretch: 92%;
}

/* ---------- Home: contact ---------- */

.contact__lede {
  margin-top: 14px;
  color: var(--graphite);
  font-size: var(--text-lg);
}

/* Shown after a no-JavaScript submission: FormSubmit sends people back to #message-sent */
.contact__sent {
  display: none;
  margin-top: 14px;
  font-weight: 600;
}

.contact__sent:target {
  display: block;
}

.contact__grid {
  display: grid;
  gap: 48px 72px;
  margin-top: clamp(32px, 4.5vw, 56px);
}

@media (min-width: 900px) {
  .contact__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}

.contact__details {
  display: grid;
  gap: 24px;
}

.contact__details dt {
  color: var(--graphite);
  font-size: var(--text-sm);
  font-stretch: 90%;
  font-weight: 600;
}

.contact__details dd a {
  display: inline-block;
  margin-top: 2px;
  font-size: clamp(1.5rem, 1.05rem + 1.7vw, 2.375rem);
  font-stretch: 114%;
  font-weight: 720;
  letter-spacing: -0.025em;
  line-height: 1.12;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact__details dd a:hover {
  text-decoration: underline;
  text-decoration-color: var(--focus);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.12em;
}

.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 32px;
}

.contact__links a {
  font-weight: 620;
}

/* Contact form */

.contact-form {
  position: relative;
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: var(--text-sm);
  font-stretch: 94%;
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--field-line);
  border-radius: 4px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
}

.field textarea {
  min-height: 10rem;
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
  border-color: var(--focus);
  outline: 2px solid var(--focus);
  outline-offset: 0;
}

/* Hidden from people; only bots fill it in */
.field--trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 4px;
}

.contact-form__status {
  max-width: 46ch;
  font-size: 0.9375rem;
}

.contact-form__status.is-success {
  font-weight: 600;
}

.contact-form__status.is-error {
  color: var(--error);
}

/* ---------- Inner pages ---------- */

.page-head {
  padding-top: clamp(24px, 5vw, 64px);
  container-type: inline-size;
}

.back-link {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 620;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.page-title {
  margin-top: 18px;
  font-size: var(--text-title);
  /* Never wider than the column: "Photography", the longest title, is 6.7em */
  font-size: min(var(--text-title), 100cqi / 6.8);
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.88;
  margin-left: -0.03em;
  overflow-wrap: anywhere;
}

.page-head > .page-title:first-child {
  margin-top: 0;
}

.page-lede {
  max-width: 42ch;
  margin-top: 22px;
  font-size: var(--text-lg);
  line-height: 1.45;
}

/* ---------- Case studies ---------- */

.facts {
  display: grid;
  gap: 18px 32px;
  margin-top: clamp(28px, 4vw, 44px);
  padding-block: 20px;
  border-block: 1px solid var(--rule);
}

@media (min-width: 640px) {
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .facts {
    grid-template-columns: 1.3fr 1fr 1.3fr 0.9fr;
  }
}

.facts dt {
  color: var(--graphite);
  font-size: var(--text-sm);
  font-stretch: 90%;
  font-weight: 600;
}

.facts dd {
  margin-top: 4px;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.case-hero {
  margin-top: clamp(32px, 5vw, 64px);
}

.case-hero img {
  width: 100%;
  outline: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  outline-offset: -1px;
}

/* Smaller source images are shown at their own size rather than stretched */
.case-hero--natural img {
  width: auto;
}

.case-section {
  display: grid;
  gap: 14px 56px;
  padding-top: clamp(48px, 6vw, 88px);
}

@media (min-width: 900px) {
  .case-section {
    grid-template-columns: minmax(0, 3fr) minmax(0, 8fr);
  }
}

.case-section h2 {
  font-size: 1.375rem;
  font-stretch: 112%;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.prose ul {
  padding-left: 1.15em;
}

.prose li + li {
  margin-top: 0.55em;
}

.prose li::marker {
  color: var(--graphite);
}

.link-list {
  display: grid;
  gap: 10px;
}

.link-list a {
  font-weight: 620;
}

/* Screenshots: a row on wide screens, a swipeable strip on phones */
.screens {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 74%;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
}

@media (min-width: 760px) {
  .screens {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }
}

.screens figure {
  scroll-snap-align: start;
}

/* Every panel is the same size; the screenshot sits inside it at its own proportions */
.screens .screen {
  --pad: clamp(18px, 3vw, 36px);
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--panel);
}

.screens img {
  position: absolute;
  top: var(--pad);
  left: var(--pad);
  width: calc(100% - 2 * var(--pad));
  height: calc(100% - 2 * var(--pad));
  object-fit: contain;
}

.screens figcaption {
  margin-top: 8px;
  color: var(--graphite);
  font-size: var(--text-sm);
}

.next-project {
  margin-top: var(--section);
  border-top: 1px solid var(--rule);
}

.next-project a {
  display: block;
  padding-top: 28px;
  text-decoration: none;
}

.next-project__label {
  display: block;
  color: var(--graphite);
  font-size: var(--text-sm);
  font-stretch: 90%;
  font-weight: 600;
}

.next-project__title {
  display: block;
  margin-top: 8px;
  font-size: var(--text-h2);
  font-stretch: 122%;
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1;
}

.next-project a:hover .next-project__title {
  text-decoration: underline;
  text-decoration-color: var(--focus);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.1em;
}

main:has(.next-project) + .site-footer {
  margin-top: clamp(56px, 7vw, 96px);
}

/* ---------- Photography ---------- */

.gallery {
  display: grid;
  gap: clamp(28px, 3.5vw, 44px) clamp(16px, 2vw, 24px);
  margin-top: clamp(36px, 5vw, 64px);
}

@media (min-width: 720px) {
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.gallery a {
  display: block;
  cursor: zoom-in;
}

.gallery img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--panel);
}

.lightbox {
  /* The photos are 900px wide, so the viewer never enlarges them */
  width: min(900px, 100% - 32px);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #eef1f2;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgb(9 12 15 / 0.96);
}

.lightbox[open] {
  animation: lightbox-in 180ms ease-out;
}

@keyframes lightbox-in {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
}

.lightbox__img {
  width: 100%;
  max-height: calc(100vh - 140px);
  max-height: calc(100dvh - 140px);
  object-fit: contain;
}

.lightbox__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-top: 14px;
}

.lightbox__caption {
  font-stretch: 92%;
}

.lightbox__count {
  margin-left: 8px;
  color: #a7b1b9;
  font-size: var(--text-sm);
  font-style: normal;
  font-stretch: 90%;
}

.lightbox__controls {
  display: flex;
  gap: 8px;
}

.lightbox button {
  padding: 8px 14px;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 4px;
  background: rgb(255 255 255 / 0.08);
  color: inherit;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 620;
  cursor: pointer;
}

.lightbox button:hover {
  background: rgb(255 255 255 / 0.16);
}

.lightbox button:focus-visible {
  outline-color: var(--af);
}

/* ---------- 404 ---------- */

.not-found__photo {
  max-width: 420px;
  margin-top: clamp(32px, 5vw, 56px);
}

.not-found__photo figcaption {
  margin-top: 8px;
  color: var(--graphite);
  font-size: var(--text-sm);
  font-stretch: 92%;
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .viewfinder__frame img {
    transition: none;
  }

  .js .viewfinder:not(.is-locked) .viewfinder__frame img {
    filter: none;
    transform: none;
  }

  .js .viewfinder:not(.is-locked) .viewfinder__af {
    border-color: var(--af);
    transform: translate(-50%, -50%);
  }

  .viewfinder.is-locked .viewfinder__af,
  .lightbox[open] {
    animation: none;
  }
}
