/* Fonts */
@font-face {
  font-family: 'Libre Caslon Condensed';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/LibreCaslonCondensed-VariableFont_wght.woff2') format('woff2');
}
@font-face {
  font-family: 'Vend Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('assets/fonts/VendSans-VariableFont_wght.woff2') format('woff2');
}

/* Design tokens */
:root {
  --pearl: #fffdf9;
  --pearl-200: #fdfbf6;
  --green-100: #fcfff2;
  --green-300: #c6f832;
  --green-400: #587800;
  --grey-300: #f4f3f2;
  --grey-400: #e7e7e7;
  --grey-600: #706e6b;
  --grey-500: #706e6b;
  --timeline: #d9d9d9;
  --placeholder: #dedede;
  --placeholder-soft: #ededed;
  --text: #202020;
  --black-800: #2e2e2e;
  --black-1000: #000;
  --headings: 'Vend Sans', sans-serif;
  --paragraphs: 'Libre Caslon Condensed', Georgia, serif;
  --section-width: 50rem;
  --radius-pill: 6.25rem;
}

/* Base and typography: rem sizes follow the browser's default text size. */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}
body {
  isolation: isolate;
  margin: 0;
  background: var(--pearl);
  color: var(--text);
  font: 0.875rem/1.125rem var(--paragraphs);
  overflow-x: clip;
}
/* Background grid: a static tile and a small cursor highlight */
.background-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.background-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('assets/grid-tile.svg') repeat;
  opacity: .05;
}
.grid-highlight {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(9, 12px);
  grid-template-rows: repeat(9, 12px);
  gap: 4px;
  padding: 2px;
  width: 144px;
  height: 144px;
}
.grid-highlight[hidden] {
  display: none;
}
.grid-highlight span {
  background: #e6e6e6;
  border-radius: 1px;
}
@media (hover: none), (pointer: coarse) {
  .grid-highlight {
    display: none;
  }
}
h1, h2, h3, h4, p {
  margin: 0;
}
h1, h2, h3, h4 {
  font-family: var(--headings);
}
h1 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 2.9375rem;
}
h2 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 2.25rem;
}
h3 {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.1;
}
h4 {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5rem;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
  border: 0;
}
img {
  display: block;
}
:focus-visible {
  outline: 2px solid var(--green-400);
  outline-offset: 0.3125rem;
}
.sr-only {
  position: absolute;
  width: 0.0625rem;
  height: 0.0625rem;
  padding: 0;
  margin: -0.0625rem;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 1.5rem;
  top: -5rem;
  padding: 0.75rem;
  background: var(--black-1000);
  color: var(--pearl);
  z-index: 10;
  font-family: var(--headings);
}
.skip-link:focus {
  top: 1.5rem;
}

/* Header */
.navbar {
  position: sticky;
  top: 1.5rem;
  margin: 1.5rem auto 0;
  width: min(64rem, calc(100% - 3rem));
  height: 3.625rem;
  padding: 0.5rem 0.5rem 0.5rem 0.75rem;
  border: 1px solid var(--grey-300);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--pearl);
  z-index: 2;
}
.header-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.skip-intro {
  color: var(--grey-600);
  font: 500 1rem/1.5rem var(--headings);
  white-space: nowrap;
  transition: color .2s;
}
.skip-intro:hover {
  color: var(--black-1000);
}
.logo {
  width: 2.5rem;
  height: 2.5rem;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  border-radius: var(--radius-pill);
  background: var(--black-1000);
  color: var(--pearl);
  font-family: var(--headings);
  font-weight: 400;
  transition: background .2s;
}
.button:hover {
  background: var(--black-800);
}
.primary {
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: .9;
}

/* Chat animation */
.chat-icon {
  width: 0.875rem;
  height: 0.875rem;
  display: block;
  flex: none;
}
.chat-bubble {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chat-bubble-content,
.chat-bubble-dot {
  transform-box: fill-box;
  transform-origin: center;
}
.chat-bubble-shape {
  fill: var(--pearl);
}
.chat-bubble-dot {
  fill: var(--black-1000);
}
.primary:hover .chat-bubble-content {
  animation: chat-bubble-tilt .75s linear infinite;
}
.primary:hover .dot-one {
  animation: chat-dot-one .75s linear infinite;
}
.primary:hover .dot-two {
  animation: chat-dot-two .75s linear infinite;
}
.primary:hover .dot-three {
  animation: chat-dot-three .75s linear infinite;
}
@keyframes chat-bubble-tilt {
  0%, 66.67% { transform: rotate(0); }
  100% { transform: rotate(2deg); }
}
@keyframes chat-dot-one {
  0% { transform: scale(0); animation-timing-function: ease-out; }
  26.67%, 100% { transform: scale(1.05); }
}
@keyframes chat-dot-two {
  0%, 20% { transform: scale(0); animation-timing-function: ease-out; }
  46.67%, 100% { transform: scale(1); }
}
@keyframes chat-dot-three {
  0%, 40% { transform: scale(0); animation-timing-function: ease-out; }
  66.67%, 100% { transform: scale(1); }
}

/* Page layout and introduction */
.landing {
  padding: 5rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5rem;
  overflow: clip;
}
.intro {
  width: min(38.75rem, 100%);
}
.intro-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.intro-copy p + p {
  margin-top: 1.125rem;
}

/* Availability indicator */
.availability {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.25rem;
  background: var(--green-100);
  border: 1px solid var(--green-300);
  color: var(--green-400);
  font: 0.75rem/1 var(--headings);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.pulse {
  width: 12px;
  height: 12px;
  position: relative;
  display: grid;
  place-items: center;
}
.pulse::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--green-300);
  animation: pulse-outer 2s linear infinite;
}
.pulse::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -3px 0 0 -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-400);
  animation: pulse-inner 2s linear infinite;
}
@keyframes pulse-outer {
  0%, 7.5% {
    transform: scale(.55);
  }
  7.5% {
    animation-timing-function: cubic-bezier(.5,0,.5,1);
  }
  30%,100% {
    transform: scale(1);
  }
}
@keyframes pulse-inner {
  0% {
    transform: scale(1);
    animation-timing-function: cubic-bezier(.5,0,.5,1);
  }
  10%,100% {
    transform: scale(1.1);
  }
}

/* Selected work */
.showcase {
  width: min(90rem, 100%);
}
.showcase-grid {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 1.5rem;
}
.image-placeholder {
  background: var(--placeholder);
  border-radius: 0.5rem;
}

/* Low-quality media previews */
.has-media-loader {
  position: relative;
}
.has-media-loader::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--media-lqip, none);
  background-position: var(--media-position, center);
  background-size: cover;
  filter: blur(0.75rem);
  pointer-events: none;
  opacity: 1;
  z-index: 0;
  transform: scale(1.08);
  transition: opacity .3s ease;
}
.has-media-loader > img,
.has-media-loader > video {
  position: relative;
  z-index: 1;
}
.media-loading-enabled .has-media-loader > img,
.media-loading-enabled .has-media-loader > video {
  opacity: 0;
  transition: opacity .3s ease;
}
.has-media-loader.is-media-ready::before {
  opacity: 0;
}
.media-loading-enabled .has-media-loader.is-media-ready > img,
.media-loading-enabled .has-media-loader.is-media-ready > video {
  opacity: 1;
}

.showcase-tile {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 0.5rem;
  background: var(--grey-300);
}
.showcase-tile.tall {
  /* Two short rows plus their gap keep the staggered edges aligned. */
  grid-row: span 2;
  aspect-ratio: auto;
}
.showcase-tile > .showcase-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 0.5rem;
  background: var(--grey-300);
}
.tile-caption {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  padding: 0.375rem;
  border-radius: 0.25rem;
  background: rgb(from var(--black-800) r g b / 60%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--pearl);
  z-index: 1;
  display: grid;
  gap: 0.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s;
}
.showcase-tile:hover .tile-caption, .showcase-tile:focus-visible .tile-caption {
  opacity: 1;
  visibility: visible;
}

/* Gallery project modal */
html.modal-open, html.modal-open body {
  overflow: hidden;
}
.showcase-tile[role="button"] {
  cursor: pointer;
}
.project-modal {
  width: min(38.75rem, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--black-1000);
  overflow: visible;
}
.project-modal[open] {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.project-modal::backdrop {
  background: rgb(0 0 0 / 12%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.project-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-left: 0.75rem;
}
.project-modal-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 0.25rem;
  background: var(--grey-300);
  font: 0.875rem/1.125rem var(--paragraphs);
}
.project-modal-header .icon-button {
  flex: none;
}
.project-modal-media {
  --modal-gap: 1rem;
  display: grid;
  /* The slightly wider portrait column accounts for the gap between details. */
  grid-template-columns: minmax(0, calc((100% - var(--modal-gap)) / 2 + var(--modal-gap) / 3)) minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  flex: none;
  width: 100%;
  padding: 1rem;
  gap: var(--modal-gap);
  border: 1px solid var(--grey-400);
  border-radius: 1rem;
  background: var(--pearl);
  box-shadow: 0 5.083px 25.417px rgb(0 0 0 / 15%);
}
.project-modal-placeholder {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  border-radius: 0.5rem;
  background: var(--placeholder-soft);
}
.project-modal-placeholder img,
.project-modal-placeholder video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-modal-placeholder.tall {
  grid-row: span 2;
  aspect-ratio: auto;
}
.project-modal-description {
  grid-column: 1 / -1;
  color: var(--black-800);
  font: 0.875rem/1.25rem var(--paragraphs);
  text-wrap: pretty;
}
@media (max-height: 620px) {
  .project-modal {
    overflow: auto;
  }
}

/* Shared sections and service cards */
.content-section {
  width: min(var(--section-width), 100%);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.services, .cases {
  gap: 1.5rem;
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 1rem;
  align-items: stretch;
}
.service-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--grey-300);
  border-radius: 0.5rem;
  background: var(--pearl);
}
.service-icon {
  width: 1.5rem;
  height: 1.5rem;
}
.section-divider {
  width: min(var(--section-width), 100%);
  height: 0.0625rem;
  margin: 0;
  border: 0;
  background: var(--grey-400);
  flex-shrink: 0;
}

/* Case studies */
.cases {
  /* Reserve a landing area for the docked arrows below the final paragraph. */
  padding-bottom: 5rem;
}
.cases-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.carousel {
  width: 100%;
  outline-offset: 0.5rem;
}
.case-viewport {
  position: relative;
  transition: height .35s ease;
}
.case-track {
  display: flex;
  /* Taller inactive slides must not intercept clicks on the controls below. */
  pointer-events: none;
  align-items: flex-start;
  gap: 1.5rem;
  width: 100%;
  transform: translateX(calc(var(--case-index, 0) * (100% + 1.5rem) * -1));
  transition: transform .5s cubic-bezier(.22,.61,.36,1);
}
.case-study {
  flex: 0 0 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  filter: blur(6px);
  opacity: .4;
  transform: scale(.9);
  transition: opacity .4s, filter .4s, transform .4s;
}
.case-study.is-current {
  pointer-events: auto;
  filter: none;
  opacity: 1;
  transform: scale(1);
}
.case-heading {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.case-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.case-title p {
  color: var(--grey-600);
}
.case-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
  color: var(--grey-600);
  font: 0.75rem/1 var(--headings);
}
.tag {
  background: var(--grey-300);
  color: var(--grey-600);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.375rem;
  font: 0.75rem/1 var(--headings);
  white-space: nowrap;
}
.case-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
/* Image and video media fill the frame without changing its proportions. */
.case-hero > img, .case-hero > video,
.case-images > .image-placeholder > img,
.case-images > .image-placeholder > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.case-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  color: var(--black-800);
}
.case-columns > div, .case-outcome {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.case-columns h4, .case-outcome h4 {
  color: var(--text);
}
.case-images {
  --case-media-gap: 1.25rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: var(--case-media-gap);
}
.case-images > .image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.case-images > .image-placeholder.tall {
  grid-column: 1;
  grid-row: 1 / span 2;
  aspect-ratio: auto;
}
.case-images > .image-placeholder:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}
.case-images > .image-placeholder:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}
.case-outcome {
  color: var(--black-800);
}
.case-controls {
  display: flex;
  flex: none;
  align-items: center;
  gap: .5rem;
  padding: .25rem;
  border: 1px solid var(--grey-400);
  border-radius: var(--radius-pill);
  background: rgb(255 253 249 / 40%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 3;
  box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.1);
}
.case-controls.is-docked {
  position: fixed;
  right: var(--controls-right);
  bottom: var(--controls-bottom);
}
.case-controls.is-offscreen {
  visibility: hidden;
}
/* Keep the position change visible when the controls dock or return. */
.case-controls.is-relocating {
  animation: relocate-controls .6s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes relocate-controls {
  from { transform: translate(var(--controls-shift-x), var(--controls-shift-y)); }
  to { transform: translate(0, 0); }
}
.icon-button {
  display: inline-flex;
  padding: 0.375rem;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--grey-300);
  transition: background .2s;
}
.icon {
  width: 0.75rem;
  height: 0.75rem;
  flex: none;
}
.icon-button:hover:not(:disabled) {
  background: var(--grey-400);
}
.icon-button:disabled {
  opacity: .1;
  cursor: default;
}

/* Experience timeline */
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline li {
  position: relative;
  padding-top: 1rem;
}
.timeline li::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0.15625rem;
  border-left: 1px solid var(--timeline);
}
.timeline li:last-child::before {
  bottom: auto;
  height: 1.625rem;
}
.timeline li::after {
  content: '';
  position: absolute;
  left: 0;
  top: 1.4375rem;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--timeline);
}
.experience-heading {
  margin-left: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.experience-heading .role {
  color: var(--grey-500);
  font-weight: 400;
}
.experience-heading .separator {
  color: var(--black-1000);
}
.experience-description {
  padding: 0.5rem 0 0.5rem 0.875rem;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.faq details {
  border-bottom: 1px solid var(--grey-300);
}
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  align-items: center;
  cursor: pointer;
  list-style: none;
  padding: 0.5rem 0;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary h3 {
  color: var(--black-1000);
}
.faq-arrow {
  width: 1rem;
  height: 1rem;
  flex: none;
  transform: rotate(180deg);
  transition: transform .2s;
}
.faq details[open] .faq-arrow {
  transform: rotate(0);
}
.faq details > p {
  padding: 0.5rem 0;
  color: var(--black-1000);
}

/* Contact footer */
.contact {
  width: min(64rem,100%);
  min-height: 6.125rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--grey-300);
  background: var(--pearl-200);
  border-radius: 1rem;
  display: flex;
  gap: 8.75rem;
  align-items: center;
}
.contact-intro {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}
.contact-intro h2 {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.1;
}
.avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  object-fit: cover;
  flex: none;
}
.contact-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}
.or {
  color: var(--grey-600);
}
.secondary {
  padding: 0.375rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1;
}
.mail-window {
  width: 3.5625rem;
  height: 0.75rem;
  overflow: hidden;
}
.mail-window > span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  width: max-content;
  transition: transform .25s ease;
}
.secondary:hover .mail-window > span {
  transform: translateX(-1rem);
}

/* Responsive layouts */
@media (max-width: 1050px) {
  .showcase-grid {
    gap: 1rem;
  }
  .contact {
    gap: 2rem;
  }
}
@media (max-width: 700px) {
  /* Keep the heading visible while the stacked images scroll underneath. */
  .project-modal {
    width: calc(100% - 2rem);
    height: 80dvh;
    max-height: calc(100dvh - 2rem);
    margin: auto 1rem 1rem;
    overflow: hidden;
  }
  .project-modal-header {
    flex: none;
    padding: 0 .5rem;
  }
  .project-modal-media {
    --modal-gap: .5rem;
    display: flex;
    flex-direction: column;
    flex: 0 1 auto;
    min-height: 0;
    padding: .5rem;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    overscroll-behavior-y: contain;
  }
  .project-modal-media::-webkit-scrollbar {
    display: none;
  }
  .project-modal-placeholder {
    flex: none;
    width: 100%;
  }
  .project-modal-placeholder.tall {
    aspect-ratio: 2 / 3;
  }
  .project-modal-description {
    flex: none;
  }
  .navbar {
    top: 1rem;
    margin-top: 1rem;
    width: calc(100% - 2rem);
  }
  .landing {
    padding: 3.25rem 1rem 1rem;
    gap: 3rem;
  }
  .header-links {
    gap: 0.625rem;
  }
  .skip-intro {
    font-size: 0.875rem;
  }
  .intro-heading {
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
  }
  h1 {
    font-size: 1.75rem;
    line-height: 1.3;
  }
  .showcase-grid {
    /* Alternate tall-over-wide and wide-over-tall columns, as on desktop. */
    grid-template-columns: none;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    grid-auto-flow: column dense;
    grid-auto-columns: 78%;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .showcase-grid::-webkit-scrollbar {
    display: none;
  }
  .showcase-tile {
    scroll-snap-align: start;
  }
  /* A single gentle nudge hints at more work without continuous motion. */
  .showcase-grid.is-nudging .showcase-tile {
    animation: gallery-nudge 1.6s ease-in-out;
  }
  .showcase-tile:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
  .showcase-tile:nth-child(2) { grid-column: 2; grid-row: 1; }
  .showcase-tile:nth-child(3) { grid-column: 3; grid-row: 1 / span 2; }
  .showcase-tile:nth-child(4) { grid-column: 4; grid-row: 1; }
  .showcase-tile:nth-child(5) { grid-column: 2; grid-row: 2 / span 2; }
  .showcase-tile:nth-child(6) { grid-column: 4; grid-row: 2 / span 2; }
  .showcase-tile:nth-child(7) { grid-column: 1; grid-row: 3; }
  .showcase-tile:nth-child(8) { grid-column: 3; grid-row: 3; }
  .service-grid {
    /* Swipe between cards with a glimpse of the next one. */
    width: 100%;
    min-width: 0;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .service-grid::-webkit-scrollbar {
    display: none;
  }
  .service-card {
    gap: 0.625rem;
    scroll-snap-align: start;
  }
  .case-title {
    flex-wrap: wrap;
    gap: 0.375rem;
  }
  .case-columns {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .case-images {
    --case-media-gap: 0.75rem;
    display: flex;
    flex-direction: column;
  }
  .case-images > .image-placeholder {
    flex: none;
    aspect-ratio: 16 / 9;
  }
  .case-images > .image-placeholder.tall {
    aspect-ratio: 1080 / 1268;
  }
  .contact {
    padding: 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
  .contact-links {
    align-self: flex-end;
  }
  .experience-heading h3 {
    font-size: 1rem;
  }
  .faq summary h3 {
    font-size: 1rem;
  }
  .faq summary {
    gap: 0.75rem;
  }
}
@keyframes gallery-nudge {
  0%, 100% { transform: translateX(0); }
  45%, 60% { transform: translateX(-0.75rem); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Print */
@media print {
  .navbar, .case-controls, .skip-link {
    display: none;
  }
  .landing {
    padding-top: 1.5rem;
    gap: 2rem;
  }
  .case-track {
    display: block;
    transform: none;
  }
  .case-viewport {
    height: auto !important;
  }
  .case-study {
    transform: none;
    filter: none;
    opacity: 1;
    margin-bottom: 2rem;
    break-inside: avoid;
  }
}
