:root {
  --ink: #171715;
  --paper: #f3f1ea;
  --accent: #d3fa55;
  --muted: #72736d;
  --line: rgba(23, 23, 21, 0.2);
}

* {
  box-sizing: border-box;
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

::selection {
  background: var(--accent);
  color: var(--ink);
}

.wrap {
  width: min(100% - 64px, 1600px);
  margin: 0 auto;
}

/* Header */

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 96px;
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 0.95;
}

.logo span {
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 42px;
  font-size: 0.9rem;
  font-weight: 600;
}

.nav a,
.footer-links a {
  transition: opacity 0.2s;
}

.nav a:hover,
.footer-links a:hover {
  opacity: 0.55;
}

.nav-contact {
  border: 1px solid var(--ink);
  border-radius: 100px;
  padding: 11px 18px;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 8px 0 8px 15px;
  cursor: pointer;
  font-weight: 700;
}

/* Hero */

.hero {
  min-height: calc(100vh - 96px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 72px 0 40px;
}

.eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 1400px;
  margin: 60px 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(4.4rem, 10.8vw, 11.8rem);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.075em;
}

.hero h1 em {
  font-style: normal;
  color: var(--muted);
}

.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
}

.hero-description {
  max-width: 360px;
  margin: 0;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.5;
}

.round-link {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  flex: 0 0 74px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 1.7rem;
  transition: background 0.2s, transform 0.2s;
}

.round-link:hover {
  background: var(--accent);
  transform: translateY(4px);
}

/* Portfolio */

.work {
  padding: 100px 0 120px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  border-top: 1px solid var(--ink);
  padding-top: 18px;
  margin-bottom: 45px;
}

.section-heading h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.06em;
}

.section-heading p {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px 24px;
}

.project-image {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  aspect-ratio: 1.3;
  display: grid;
  place-items: center;
}

.project-image::after {
  content: "PROJECT PREVIEW";
  position: absolute;
  left: 20px;
  bottom: 20px;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.project-art {
  transition: transform 0.5s ease;
}

.project:hover .project-art {
  transform: scale(1.06) rotate(-2deg);
}

.art-one {
  background: #d6ed5e;
}

.art-one .project-art {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(4rem, 8vw, 9rem);
  font-weight: 700;
  line-height: 0.75;
  letter-spacing: -0.1em;
  text-align: center;
}

.art-two {
  background: #c7b8ed;
}

.art-two .project-art {
  width: 52%;
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.5rem, 5vw, 6rem);
  letter-spacing: -0.08em;
}

.art-three {
  background: #ea795a;
}

.art-three .project-art {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(4rem, 8vw, 9rem);
  font-weight: 700;
  letter-spacing: -0.08em;
  transform: rotate(-8deg);
}

.project:hover .art-three .project-art {
  transform: scale(1.06) rotate(-5deg);
}

.art-four {
  background: #aac9c0;
}

.art-four .project-art {
  width: 55%;
  padding: 12% 5%;
  background: var(--paper);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 5rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.08em;
  text-align: center;
  box-shadow: 12px 12px 0 rgba(23, 23, 21, 0.15);
}

.project-info {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
}

.project-info h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.project-info p {
  margin: 3px 0 0;
  color: #64645e;
  font-size: 0.85rem;
  text-align: right;
}

/* Studio */

.studio {
  background: var(--ink);
  color: var(--paper);
  padding: 110px 0 120px;
}

.studio-top {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 40px;
}

.studio h2 {
  max-width: 1100px;
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.8rem, 6.2vw, 6.8rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.065em;
}

.studio h2 span {
  color: var(--accent);
}

.studio-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  margin-top: 110px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.studio-bottom h3 {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.studio-bottom p {
  max-width: 400px;
  margin: 0;
  line-height: 1.6;
  color: #c6c6bf;
}

.services {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Contact and footer */

.contact {
  padding: 120px 0 70px;
}

.contact h2 {
  max-width: 1100px;
  margin: 40px 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(4rem, 9.5vw, 10rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.075em;
}

.email-link {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 8px;
  font-size: clamp(1.1rem, 2vw, 1.8rem);
}

.email-link:hover {
  color: #737d42;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 25px;
  margin-top: 150px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
}

.footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 24px;
}

/* Mobile */

@media (max-width: 700px) {
  .wrap {
    width: min(100% - 36px, 1600px);
  }

  .site-header {
    min-height: 76px;
  }

  .menu-toggle {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 75px;
    left: -18px;
    right: -18px;
    padding: 24px 18px 30px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .nav.open {
    display: flex;
  }

  .hero {
    min-height: 80vh;
    padding: 55px 0 35px;
  }

  .hero h1 {
    font-size: clamp(3.8rem, 13vw, 6rem);
    margin: 60px 0;
  }

  .hero-description {
    max-width: 250px;
  }

  .round-link {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }

  .work {
    padding: 70px 0 80px;
  }

  .projects {
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .project-image {
    min-height: 280px;
  }

  .studio {
    padding: 75px 0 85px;
  }

  .studio-top,
  .studio-bottom {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .studio-bottom {
    margin-top: 65px;
  }

  .contact {
    padding: 80px 0 35px;
  }

  .footer {
    margin-top: 100px;
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}/* Inverted-color cursor */
@media (hover: hover) and (pointer: fine) {
  body.custom-cursor,
  body.custom-cursor a,
  body.custom-cursor button {
    cursor: none;
  }

  .custom-cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    mix-blend-mode: difference;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition:
      width 0.25s ease,
      height 0.25s ease,
      opacity 0.2s ease;
  }

  .custom-cursor-dot.visible {
    opacity: 1;
  }

  .custom-cursor-dot.hovering {
    width: 64px;
    height: 64px;
  }
}

/* Reference-inspired navigation */
.site-header {
  position: relative;
  z-index: 10;
  width: 100%;
  min-height: 80px;
  background: #fff;
  border-bottom: 1px solid #ddd;
}

.header-inner {
  width: min(100% - 128px, 1700px);
  min-height: 80px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
}

.logo {
  justify-self: start;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.06em;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3vw, 48px);
}

.nav a {
  position: relative;
  padding: 5px 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.header-cta {
  justify-self: end;
  padding: 14px 24px;
  border: 1px solid #d5d5d5;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.header-cta:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* Process section */
.process {
  padding: 100px 0 120px;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.process-grid article {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.process-grid span {
  color: var(--muted);
  font-size: 0.8rem;
}

.process-grid h3 {
  margin: 35px 0 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
}

.process-grid p {
  max-width: 260px;
  margin: 0;
  color: #64645e;
  line-height: 1.6;
}

@media (max-width: 850px) {
  .header-inner {
    width: calc(100% - 36px);
    min-height: 76px;
    display: flex;
    justify-content: space-between;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .header-cta {
    display: none;
  }

  .nav {
    display: none;
    position: absolute;
    top: 75px;
    left: 0;
    right: 0;
    padding: 28px 18px 32px;
    background: #fff;
    border-bottom: 1px solid #ddd;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .nav.open {
    display: flex;
  }

  .process {
    padding: 70px 0 80px;
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 24px;
  }
}

@media (max-width: 480px) {
  .process-grid {
    grid-template-columns: 1fr;
  }
}

/* Headings on the separate pages */
.section-heading h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.06em;
}

.studio h1 {
  max-width: 1100px;
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.8rem, 6.2vw, 6.8rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.065em;
}

.studio h1 span {
  color: var(--accent);
}

.studio-bottom h2 {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact h1 {
  max-width: 1100px;
  margin: 40px 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(4rem, 9.5vw, 10rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.075em;
}

/* Underline the current page in the menu */
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* White circle page transition */
html::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #ffffff;
  pointer-events: none;
  clip-path: circle(
    0 at var(--transition-x, 50%) var(--transition-y, 50%)
  );
}

/* Circle expands before leaving the current page */
html.page-leave::after {
  animation: circle-expand 0.7s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

/* Circle shrinks to reveal the new page */
html.page-reveal::after {
  animation: circle-reveal 0.7s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

@keyframes circle-expand {
  from {
    clip-path: circle(
      0 at var(--transition-x, 50%) var(--transition-y, 50%)
    );
  }

  to {
    clip-path: circle(
      150vmax at var(--transition-x, 50%) var(--transition-y, 50%)
    );
  }
}

@keyframes circle-reveal {
  from {
    clip-path: circle(
      150vmax at var(--transition-x, 50%) var(--transition-y, 50%)
    );
  }

  to {
    clip-path: circle(
      0 at var(--transition-x, 50%) var(--transition-y, 50%)
    );
  }
}

/* Respect visitors who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  html.page-leave::after,
  html.page-reveal::after {
    animation: none;
    clip-path: circle(0 at 50% 50%);
  }
}

/* ========================================
   WORK PAGE
======================================== */

.portfolio-page {
  padding-top: 100px;
  padding-bottom: 120px;
}

/* Intro */

.portfolio-intro {
  padding-bottom: 80px;
}

.portfolio-intro h1 {
  margin: 55px 0 30px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(4.5rem, 10vw, 11rem);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.075em;
}

.portfolio-intro h1 em {
  color: var(--muted);
  font-style: normal;
}

.portfolio-intro-text {
  max-width: 440px;
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Category links */

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px 0 60px;
  border-top: 1px solid var(--line);
}

.category-nav a {
  padding: 11px 17px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.category-nav a:hover,
.category-nav a:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

/* Portfolio grid */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 70px 24px;
}

.portfolio-card {
  min-width: 0;
  scroll-margin-top: 30px;
}

.portfolio-card-wide {
  grid-column: 1 / -1;
}

.portfolio-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 360px;
  aspect-ratio: 1.2;
  overflow: hidden;
  padding: 30px;
}

.portfolio-card-wide .portfolio-visual {
  min-height: 450px;
  aspect-ratio: 2;
}

.visual-label {
  position: absolute;
  z-index: 1;
  top: 30px;
  left: 30px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.visual-title {
  position: relative;
  z-index: 1;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.7rem, 5vw, 6rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.07em;
  transition: transform 0.4s ease;
}

.portfolio-card:hover .visual-title {
  transform: translateY(-8px);
}

/* Placeholder colors — replace with your own project images */

.visual-ai {
  background: #d6ed5e;
}

.visual-mood {
  background: #c7b8ed;
}

.visual-video {
  background: #202020;
  color: #fff;
}

.visual-art {
  background: #ea795a;
}

.visual-event {
  background: #aac9c0;
}

.visual-packaging {
  background: #efceaa;
}

.visual-social {
  background: #a9b9ee;
}

.visual-store {
  background: #3b4b3b;
  color: #fff;
}

/* Images added inside a visual */

.portfolio-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.portfolio-card:hover .portfolio-visual img {
  transform: scale(1.04);
}

.portfolio-card-info {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
}

.portfolio-card-info h2 {
  margin: 0 0 5px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.portfolio-card-info p {
  margin: 0;
  color: #64645e;
  font-size: 0.9rem;
  line-height: 1.5;
}

.card-number {
  color: var(--muted);
  font-size: 0.8rem;
}

/* End of page */

.portfolio-end {
  margin-top: 140px;
  padding-top: 30px;
  border-top: 1px solid var(--ink);
}

.portfolio-end h2 {
  max-width: 900px;
  margin: 35px 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3rem, 7vw, 7rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.portfolio-end a {
  display: inline-block;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink);
  font-size: 1.1rem;
}

@media (max-width: 700px) {
  .portfolio-page {
    padding-top: 70px;
    padding-bottom: 80px;
  }

  .portfolio-intro {
    padding-bottom: 55px;
  }

  .portfolio-intro h1 {
    font-size: clamp(3.8rem, 13vw, 6rem);
  }

  .category-nav {
    padding-bottom: 45px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .portfolio-card-wide {
    grid-column: auto;
  }

  .portfolio-visual,
  .portfolio-card-wide .portfolio-visual {
    min-height: 300px;
    aspect-ratio: 1.1;
    padding: 22px;
  }

  .visual-label {
    top: 22px;
    left: 22px;
  }

  .visual-title {
    font-size: clamp(2.5rem, 9vw, 4rem);
  }

  .portfolio-end {
    margin-top: 90px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-visual img,
  .visual-title {
    transition: none;
  }
}

/* =========================================
   WORK GALLERIES
========================================= */

.gallery-page {
  padding-top: 100px;
  padding-bottom: 120px;
}

.gallery-intro {
  padding-bottom: 75px;
}

.gallery-intro h1 {
  margin: 55px 0 30px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(4.5rem, 10vw, 11rem);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.075em;
}

.gallery-intro h1 em {
  color: var(--muted);
  font-style: normal;
}

.gallery-intro-text {
  max-width: 460px;
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Category navigation */

.gallery-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px 0 30px;
  border-top: 1px solid var(--line);
}

.gallery-nav a {
  padding: 11px 17px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.gallery-nav a:hover,
.gallery-nav a:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

/* Category sections */

.gallery-section {
  padding-top: 100px;
  scroll-margin-top: 20px;
}

.gallery-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 25px;
  margin-bottom: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--ink);
}

.gallery-heading h2 {
  margin: 15px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.2rem, 4.5vw, 4.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.06em;
}

.gallery-heading > p {
  max-width: 260px;
  margin: 0;
  color: #64645e;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: right;
}

/* Images */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.gallery-item {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: #e9e7e0;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* Show a readable message if a file path is wrong */
.gallery-item-error {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 20px;
  color: #7b302b;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

/* Videos */

.gallery-item video {
  display: block;
  width: 100%;
  max-height: 600px;
  background: #171715;
}

.gallery-item figcaption {
  padding: 14px 16px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Contact section */

.gallery-contact {
  margin-top: 140px;
  padding-top: 30px;
  border-top: 1px solid var(--ink);
}

.gallery-contact h2 {
  max-width: 900px;
  margin: 35px 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3rem, 7vw, 7rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.gallery-contact a {
  display: inline-block;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink);
  font-size: 1.1rem;
}

/* Mobile */

@media (max-width: 700px) {
  .gallery-page {
    padding-top: 70px;
    padding-bottom: 80px;
  }

  .gallery-intro {
    padding-bottom: 55px;
  }

  .gallery-intro h1 {
    font-size: clamp(3.8rem, 13vw, 6rem);
  }

  .gallery-section {
    padding-top: 70px;
  }

  .gallery-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .gallery-heading > p {
    text-align: left;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .gallery-contact {
    margin-top: 90px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item img {
    transition: none;
  }
}

/* Gallery columns that fit each image or video */
.gallery-grid {
  display: block;
  column-count: 2;
  column-gap: 20px;
}

.gallery-item {
  display: inline-block;
  width: 100%;
  margin: 0 0 20px;
  padding: 0;
  break-inside: avoid;
  vertical-align: top;
}

.gallery-item img,
.gallery-item video {
  display: block;
  width: 100%;
  height: auto;
}

/* Keep videos in their original proportions */
.gallery-item video {
  max-height: none;
}

@media (max-width: 700px) {
  .gallery-grid {
    column-count: 1;
  }
}

/* A second frame appears behind the image on hover */
.gallery-item {
  position: relative;
  overflow: visible;
  background: transparent;
  transition: transform 0.3s ease;
}

/* The frame behind */
.gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #d3fa55; /* Change this to any color you like */
  transition: transform 0.3s ease;
}

/* Keep the image or video in front of the frame */
.gallery-item img,
.gallery-item video {
  position: relative;
  z-index: 1;
}

/* Shift the colored frame down and right */
.gallery-item:hover::before,
.gallery-item:focus-within::before {
  transform: translate(10px, 10px);
}

.gallery-item:hover,
.gallery-item:focus-within {
  z-index: 2;
}

/* Stop the old image zoom so the layered frame stays neat */
.gallery-item:hover img {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item,
  .gallery-item::before {
    transition: none;
  }
}

/* Lift the photo and reveal the frame behind it */
.gallery-item img,
.gallery-item video {
  transition: transform 0.3s ease;
}

.gallery-item:hover img,
.gallery-item:hover video,
.gallery-item:focus-within video {
  transform: translate(-6px, -6px);
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item img,
  .gallery-item video {
    transition: none;
  }

  .gallery-item:hover img,
  .gallery-item:hover video,
  .gallery-item:focus-within video {
    transform: none;
  }
}

/* Apply the same effect when scrolling under the mouse */
.gallery-item.scroll-hover {
  z-index: 2;
}

.gallery-item.scroll-hover::before {
  transform: translate(10px, 10px);
}

.gallery-item.scroll-hover img,
.gallery-item.scroll-hover video {
  transform: translate(-6px, -6px);
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item.scroll-hover img,
  .gallery-item.scroll-hover video {
    transform: none;
  }
}

/* Store Design project subdivisions */
.store-project {
  margin-top: 65px;
}

.store-project h3 {
  margin: 0 0 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

/* Turn off the old hover and focus animations */
.gallery-item:hover::before,
.gallery-item:focus-within::before {
  transform: none;
}

.gallery-item:hover img,
.gallery-item:hover video,
.gallery-item:focus-within video {
  transform: none;
}

.gallery-item:hover,
.gallery-item:focus-within {
  z-index: auto;
}

/* Highlight only the item under the mouse */
.gallery-item.scroll-hover {
  z-index: 2;
}

.gallery-item.scroll-hover::before {
  transform: translate(10px, 10px);
}

.gallery-item.scroll-hover img,
.gallery-item.scroll-hover video {
  transform: translate(-6px, -6px);
}

/* Keep keyboard focus visible on video controls */
.gallery-item video:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item.scroll-hover::before,
  .gallery-item.scroll-hover img,
  .gallery-item.scroll-hover video {
    transform: none;
  }
}

/* Caption overlay on gallery items, revealed on hover/focus */
.gallery-item {
  position: relative;
}

.gallery-item .overlay-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 16px;
  background: linear-gradient(to top, rgba(23, 23, 21, 0.75), transparent);
  color: var(--paper);
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.gallery-item:hover .overlay-caption,
.gallery-item:focus-within .overlay-caption,
.gallery-item.scroll-hover .overlay-caption {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item .overlay-caption {
    transition: none;
  }
}

/* Scroll-reveal animation for gallery photos */
.gallery-item {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.gallery-item.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Floating image preview for work category headings */
.category-preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9998;
  width: min(38vw, 520px);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #333;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.category-preview.is-visible {
  opacity: 1;
  visibility: visible;
}

.category-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
  .category-preview {
    transition: none;
  }
}

/* =========================================
   WORK CATEGORY LIST AND GALLERY VIEW
========================================= */

/* Ensure hidden sections stay hidden despite existing display rules. */
.gallery-page [hidden] {
  display: none !important;
}

.category-title-link {
  display: inline-block;
}

.category-title-link:hover,
.category-title-link:focus-visible {
  color: var(--muted);
}

.category-title-link:focus-visible,
.gallery-back:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 6px;
}

.gallery-back {
  display: inline-block;
  margin-bottom: 35px;
  padding-bottom: 7px;
  border-bottom: 1px solid currentColor;
  font-size: 0.9rem;
  font-weight: 600;
}

/* On the category list, show headings only. */
body:not(.gallery-view-open) .gallery-section > .gallery-grid,
body:not(.gallery-view-open) .gallery-section > .store-project {
  display: none;
}

/* Make the headings read like an editorial index. */
body:not(.gallery-view-open) .gallery-section {
  padding-top: 0;
}

body:not(.gallery-view-open) .gallery-heading {
  margin-bottom: 0;
  padding: 35px 0;
}

/* In the selected gallery view, keep the title above the images. */
.gallery-view-open .gallery-section {
  padding-top: 0;
}

.gallery-view-open .gallery-heading {
  margin-bottom: 35px;
}

@media (max-width: 700px) {
  body:not(.gallery-view-open) .gallery-heading {
    padding: 28px 0;
  }
}

/* The previous and next images overlap during the slide */
.category-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-preview .preview-old-image {
  z-index: 1;
  animation: preview-slide-out 0.7s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

.category-preview img.slide-in {
  z-index: 2;
  animation: preview-slide-in 0.7s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

@keyframes preview-slide-in {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes preview-slide-out {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .category-preview img.slide-in,
  .category-preview .preview-old-image {
    animation: none;
  }
}

/* Rounded floating preview */
.category-preview {
  border-radius: 14px;
}

/* Make the whole category heading row clickable in the list view */
body:not(.gallery-view-open) .gallery-heading {
  position: relative;
}

body:not(.gallery-view-open) .category-title-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* Keep the keyboard focus indicator visible */
body:not(.gallery-view-open) .category-title-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 6px;
}

/* Gently fade the preview window in and out */
.category-preview {
  transition:
    opacity 0.8s ease,
    visibility 0s linear 0.8s;
}

.category-preview.is-visible {
  transition:
    opacity 0.8s ease,
    visibility 0s linear 0s;
}

@media (prefers-reduced-motion: reduce) {
  .category-preview,
  .category-preview.is-visible {
    transition: none;
  }
}

/* =========================================
   HOME PAGE — SCROLLING VIDEO SHOWREEL
========================================= */

/* Keep the shared navigation legible over the videos. */
.home-page .site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  color: #fff;
  background: rgba(23, 23, 21, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

.home-page .header-cta {
  border-color: rgba(255, 255, 255, 0.65);
}

.home-page .header-cta:hover {
  background: #fff;
  color: #171715;
  border-color: #fff;
}

.home-page .menu-toggle {
  color: inherit;
}

/* The section supplies enough scrolling distance for the animation. */
.home-showreel {
  position: relative;
  height: 300vh;
  height: 300svh;
}

.home-showreel-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--paper);
  isolation: isolate;
}

.home-video-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(26vw, 460px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #333;

  /*
    JavaScript updates these values while scrolling.
    The fallback values show the initial layout without JavaScript.
  */
  transform: translate(
    calc(-50% + var(--x, 0px)),
    calc(-50% + var(--y, 0px))
  ) scale(var(--scale, 1));
  will-change: transform;
}

.home-video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-video-1 { z-index: 1; --x: -31vw; --y: -26vh; }
.home-video-2 { z-index: 2; --x:  30vw; --y: -24vh; }
.home-video-3 { z-index: 3; --x: -38vw; --y:  10vh; }
.home-video-4 { z-index: 4; --x:  38vw; --y:  10vh; }

/* The bottom video remains in front throughout the sequence. */
.home-video-5 { z-index: 5; --x: 0vw; --y: 34vh; }

.home-showreel-title {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: 50%;
  width: 100%;
  padding: 0 20px;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}

.home-showreel-title h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3.2rem, 8vw, 9rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.075em;
}

.home-showreel-title p {
  margin: 20px 0 0;
  font-size: clamp(0.9rem, 1.4vw, 1.2rem);
}

.home-scroll-hint {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 24px;
  margin: 0;
  transform: translateX(-50%);
  color: #fff;
  mix-blend-mode: difference;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 850px) {
  /* The mobile menu has a light background in the shared styles. */
  .home-page .nav {
    color: var(--ink);
    background: var(--paper);
  }

  .home-video-frame {
    width: 44vw;
  }

  .home-video-1 { --x: -25vw; --y: -27vh; }
  .home-video-2 { --x:  25vw; --y: -22vh; }
  .home-video-3 { --x: -28vw; --y:   9vh; }
  .home-video-4 { --x:  28vw; --y:  10vh; }
  .home-video-5 { --x:   0vw; --y:  30vh; }
}

/* Provide a static layout for visitors who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .home-showreel {
    height: auto;
  }

  .home-showreel-stage {
    position: relative;
  }

  .home-video-frame {
    display: none;
  }

  .home-video-5 {
    display: block;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    transform: none;
  }

  .home-scroll-hint {
    display: none;
  }
}

/* =========================================
   HOME SHOWREEL — MOBILE
========================================= */

@media (max-width: 850px) {
  .home-showreel {
    /* Shorter scroll distance for the simpler mobile animation */
    height: 200vh;
    height: 200svh;
  }

  /* Only show the front video on mobile */
  .home-video-1,
  .home-video-2,
  .home-video-3,
  .home-video-4 {
    display: none;
  }

  .home-video-5 {
    width: min(68vw, 420px);
    aspect-ratio: 3 / 4;
    --x: 0px;
    --y: 0px;
  }

  .home-showreel-title h1 {
    /* Keep the whole name readable rather than cutting it off */
    font-size: clamp(2.6rem, 10vw, 5rem);
    line-height: 0.95;
  }

  .home-showreel-title p {
    margin-top: 14px;
    font-size: clamp(0.85rem, 3.5vw, 1.1rem);
  }

  .home-scroll-hint {
    bottom: 30px;
  }
}

/* Keep the reduced-motion version full-screen on mobile too. */
@media (max-width: 850px) and (prefers-reduced-motion: reduce) {
  .home-showreel {
    height: auto;
  }

  .home-video-5 {
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    transform: none;
  }
}
/* Headline revealed as the showreel video shrinks */
.home-headline {
  padding: 110px 0 80px;
}

.home-headline h2 {
  max-width: 1600px;
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3.6rem, 10vw, 11rem);
  
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.home-headline h2 em {
  font-style: normal;
  color: var(--muted);
}

/* Let the front video round its corners and inset as it settles */
.home-video-frame.is-settling {
  border-radius: 28px;
}

@media (prefers-reduced-motion: reduce) {
  .home-video-frame.is-settling {
    border-radius: 0;
  }
}

/* Lines slide up out of a mask */
.reveal-lines .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.reveal-lines .line > span {
  display: block;
  transform: translateY(-110%);
  transition: transform 2.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-lines .line:nth-child(1) > span { transition-delay: 0.15s; }
.reveal-lines .line:nth-child(2) > span { transition-delay: 0s; }

.reveal-lines.in-view .line > span { transform: translateY(0); }

.line-indent { padding-left: clamp(2rem, 12vw, 14rem); }

/* Fade-up for paragraphs and cards, staggered with --i */
.reveal-fade,
.portfolio-card {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 1s ease calc(var(--i, 0) * 0.12s),
    transform 1s cubic-bezier(0.16, 1, 0.3, 1) calc(var(--i, 0) * 0.12s);
}

.reveal-fade.in-view,
.portfolio-card.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal-lines .line > span,
  .reveal-fade,
  .portfolio-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Simple full-screen video hero (phone and computer) */
.home-showreel {
  height: 100vh;
  height: 100svh;
}

.home-showreel-stage {
  position: relative;
  height: 100%;
  background: var(--ink);
}

.home-video-5 {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  transform: none !important;
}

.home-video-5 video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Home header: transparent over the video, white once scrolled */
.home-page .site-header {
  background: transparent;
  border-bottom: 1px solid transparent;
  backdrop-filter: none;
  color: #fff;
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

/* Soft dark fade at the top so the white text stays readable on bright video */
.home-page .site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 -40px 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent);
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.home-page .site-header.is-scrolled {
  background: #fff;
  color: var(--ink);
  border-bottom-color: #ddd;
}

.home-page .site-header.is-scrolled::before {
  opacity: 0;
}

.home-page .site-header.is-scrolled .header-cta {
  border-color: #d5d5d5;
}

.home-page .site-header.is-scrolled .header-cta:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* Hero title shrinks as you scroll */
.home-showreel-title h1 {
  transform: scale(var(--title-scale, 1));
  transform-origin: center;
  will-change: transform;
}

.home-showreel-title p {
  opacity: var(--title-fade, 1);
}

.portfolio-card a {
  display: block;
}

@media (max-width: 700px) {
  .portfolio-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .portfolio-card,
  .portfolio-visual,
  .portfolio-card-wide .portfolio-visual {
    width: 100%;
    max-width: 100%;
  }

  .portfolio-visual,
  .portfolio-card-wide .portfolio-visual {
    min-height: 0;
    aspect-ratio: 4 / 5;
  }
}

/* Services on the home page */
.home-services {
  padding: 40px 0 140px;
}

.service-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 24px 40px;
  align-items: baseline;
  padding: 38px 0;
  border-top: 1px solid var(--line);
}

.service-row:last-child {
  border-bottom: 1px solid var(--line);
}

.service-number {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.service-row h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.6rem, 3vw, 3rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
  transition: transform 0.4s ease;
}

.service-row p {
  max-width: 520px;
  margin: 0;
  color: #64645e;
  font-size: 1rem;
  line-height: 1.6;
}

.service-row:hover h3 {
  transform: translateX(10px);
}

@media (max-width: 850px) {
  .home-services {
    padding-bottom: 90px;
  }

  .service-row {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 30px 0;
  }

  .service-row:hover h3 {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-row h3 {
    transition: none;
  }
}

/* Smooth mobile menu */
@media (max-width: 850px) {
  .nav {
    display: flex;               /* always present so it can animate */
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    clip-path: inset(0 0 100% 0);
    transform: translateY(-10px);
    transition:
      clip-path 0.55s cubic-bezier(0.76, 0, 0.24, 1),
      opacity 0.35s ease,
      transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
      visibility 0s linear 0.55s; /* hide only after the close finishes */
  }

  .nav.open {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translateY(0);
    transition:
      clip-path 0.55s cubic-bezier(0.76, 0, 0.24, 1),
      opacity 0.35s ease,
      transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
      visibility 0s;
  }

  /* Links fade up one after another */
  .nav a {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .nav.open a {
    opacity: 1;
    transform: translateY(0);
    transition:
      opacity 0.5s ease,
      transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .nav.open a:nth-child(1) { transition-delay: 0.12s; }
  .nav.open a:nth-child(2) { transition-delay: 0.18s; }
  .nav.open a:nth-child(3) { transition-delay: 0.24s; }
  .nav.open a:nth-child(4) { transition-delay: 0.30s; }
}

.reveal-lines .line {
  padding-bottom: 0.14em;
}

/* "View all" link in the Selected work heading */
.section-heading .view-all {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.section-heading .view-all:hover,
.section-heading .view-all:focus-visible {
  border-bottom-color: currentColor;
}

/* Home footer */
.home-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 120px 0 36px;
}

.home-footer-title {
  margin: 40px 0 50px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3rem, 9vw, 9.5rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.home-footer-cta {
  display: inline-block;
  padding-bottom: 8px;
  border-bottom: 1px solid currentColor;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  transition: color 0.2s ease;
}

.home-footer-cta:hover {
  color: var(--accent);
}

.home-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 25px;
  margin-top: 120px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.8rem;
}

.home-footer-bottom p {
  margin: 0;
}

.home-footer-links {
  display: flex;
  gap: 24px;
}

.home-footer-links a {
  transition: color 0.2s ease;
}

.home-footer-links a:hover {
  color: var(--accent);
}

@media (max-width: 700px) {
  .home-footer {
    padding: 80px 0 30px;
  }

  .home-footer-bottom {
    margin-top: 80px;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Colour flip: cream to black and back */
body.home-page {
  transition: background-color 0.5s ease, color 0.5s ease;
}

body.home-page.is-dark {
  background: var(--ink);
  color: var(--paper);
}

/* Things in the services section that had fixed dark colours */
.home-services .section-heading,
.service-row {
  transition: border-color 0.5s ease;
}

.home-services .service-row p {
  transition: color 0.5s ease;
}

.is-dark .home-services .section-heading {
  border-top-color: var(--paper);
}

.is-dark .service-row {
  border-color: rgba(255, 255, 255, 0.22);
}

.is-dark .service-row p {
  color: #b9b9b2;
}

/* The header goes black while the page is dark */
.home-page.is-dark .site-header.is-scrolled {
  background: var(--ink);
  color: var(--paper);
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.home-page.is-dark .site-header.is-scrolled .header-cta {
  border-color: rgba(255, 255, 255, 0.55);
}

.home-page.is-dark .site-header.is-scrolled .header-cta:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

/* Phone menu panel matches the dark page */
@media (max-width: 850px) {
  .home-page.is-dark .nav {
    background: var(--ink);
    color: var(--paper);
    border-bottom-color: rgba(255, 255, 255, 0.2);
  }
}

/* Selected work while the page is dark */
.work .section-heading {
  transition: border-color 0.5s ease;
}

.portfolio-card-info p {
  transition: color 0.5s ease;
}

.is-dark .work .section-heading {
  border-top-color: var(--paper);
}

.is-dark .portfolio-card-info p {
  color: #b9b9b2;
}

/* Process steps: number on the left, title + text on the right */
.process-grid {
  grid-template-columns: 1fr;
  gap: 0;
}

.process-grid article {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  column-gap: 20px;
  row-gap: 16px;
  align-items: start;
  padding: 36px 0;
  border-top: 1px solid var(--line);
}

.process-grid article:last-child {
  border-bottom: 1px solid var(--line);
}

.process-grid span {
  grid-column: 1;
  grid-row: 1 / span 2;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.process-grid h3 {
  grid-column: 2;
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.process-grid p {
  grid-column: 2;
  max-width: 520px;
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
}

/* On wider screens: number | title | description in one row */
@media (min-width: 851px) {
  .process-grid article {
    grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1.2fr);
    column-gap: 40px;
    align-items: baseline;
  }

  .process-grid span {
    grid-row: 1;
  }

  .process-grid p {
    grid-column: 3;
    grid-row: 1;
  }
}