@font-face {
  font-family: "Arcoqeh";
  src: url("/fonts/Arcoqeh.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Suisse Intl";
  src: url("/fonts/Suisse/SuisseIntlTrial-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Suisse Intl";
  src: url("/fonts/Suisse/SuisseIntlTrial-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Suisse Intl";
  src: url("/fonts/Suisse/SuisseIntlTrial-RegularIt.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Suisse Intl";
  src: url("/fonts/Suisse/SuisseIntlTrial-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* LOCAL ENGLISH FONT */

@font-face {
  font-family: "Yeezy TSTAR";
  src: url("/fonts/YEEZYTSTARLIGHT.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Yeezy TSTAR";
  src: url("/fonts/YEEZYTSTARREGULAR.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Yeezy TSTAR";
  src: url("/fonts/YEEZYTSTARBOLD.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Yeezy TSTAR";
  src: url("/fonts/YEEZYTSTARHEAVY.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* VARIABLES */

:root {
  --font: "Yeezy TSTAR", sans-serif;
  --font-body: "Suisse Intl", Arial, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --gap: 1rem;
  --gutter: clamp(1rem, 2vw, 2rem);
  --section-space: clamp(2rem, 4vw, 8rem);
  --square-btn: 2rem;
  --navbar-height: 3.75rem;
  --navbar-inset: calc((var(--navbar-height) - var(--square-btn)) / 2);
  --button-radius: 4px;
  --thumbnail-radius: 10px;
  --line-weight: 1px;
  --content-max: 88rem;
  --reading-max: 65ch;
  --copy-width: calc(100% / 1.5);
  --core-transition: 300ms ease;

  /* Brand palettes: fixed colours shared by both themes. */
  /* REMA TIP TOP */
  --rema-tip-top-red: #c82128;
  --rema-tip-top-white: #ffffff;
  --rema-tip-top-black: #231f20;

  /* RG Tools UK */
  --rg-tools-green: #00b082;
  --rg-tools-red: #c82128;
  --rg-tools-blue: #5588c9;
  --rg-tools-grey: #c3c3c3;
  --rg-tools-black: #231f20;

  /* Grow It */
  --grow-it-pink: #e85fc2;
  --grow-it-purple: #8248c9;
  --grow-it-dark: #341a34;
  --grow-it-light: #e4dde6;
  --grow-it-white: #ffffff;

  /* Piccadilly Tap */
  --piccadilly-tap-pink: #e8afb6;
  --piccadilly-tap-purple: #7d6fad;
  --piccadilly-tap-green: #6f8465;
  --piccadilly-tap-red: #b74e4a;
  --piccadilly-tap-blue: #4e8cc5;

  /* Izakaya */
  --izakaya-dark: #0a0a0a;
  --izakaya-grey: #969696;
  --izakaya-smoke: #242526;

  /* Shori */
  --shori-red: #d20224;
  --shori-black: #0a0a0a;
  --shori-white: #ffffff;
  --shori-grey: #e5e5e5;

  /* Bruff */
  --bruff-dark: #000000;
  --bruff-light: #ffffff;

  /* Yemen Heaven */
  --yemen-heaven-sand: #cab695;
  --yemen-heaven-brown: #a07f50;
  --yemen-heaven-olive: #6d6844;
  --yemen-heaven-white: #ffffff;

  /* Dark is the default, including when JavaScript is unavailable. */
  color-scheme: dark;
  --background: #000000;
  --neutral: #303030;
  --text: #eaeaea;
  --text-muted: #9c9c9c;
  --accent: var(--neutral);
}

/* Optional light theme: inverse base palette. */
:root[data-theme="light"] {
  color-scheme: light;
  --background: #ffffff;
  --neutral: #ededed;
  --text: #151515;
  --text-muted: #636363;
  --accent: var(--neutral);
}

/* ANIMATIONS */

body,
.navbar,
.project-card,
.project-thumbnail,
.button {
  transition:
    background-color var(--core-transition),
    color var(--core-transition),
    border-color var(--core-transition);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .button {
    transition: transform 150ms ease;
  }

  .button:active {
    transform: translateY(1px);
  }
}

/* RESETS */

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

html {
  font-size: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  background: var(--background);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
figure {
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.15;
  font-weight: 700;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(2.5rem, 1.5rem + 4vw, 6rem);
}

h2 {
  font-size: clamp(2rem, 1.5rem + 2vw, 4rem);
}

h3 {
  font-size: 1.5rem;
}

h4,
h5,
h6 {
  font-size: 1.125rem;
}

ul,
ol {
  padding-inline-start: 1.5em;
}

a {
  color: var(--text);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.15em;
}

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

::selection {
  background: var(--selection-background, var(--text));
  color: var(--selection-text, var(--background));
}

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

[id] {
  scroll-margin-block-start: var(--space-md);
}

button {
  appearance: none;
  background: none;
  border: 0;
  border-radius: var(--button-radius);
  padding: 0;
  margin: 0;
  box-shadow: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* UNIVERSAL APPLICATIONS */

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

.section {
  padding-bottom: var(--gutter);
}

.reading-width {
  max-width: var(--reading-max);
}

.stack > * + * {
  margin-block-start: var(--stack-space, var(--space-sm));
}

.text-muted {
  color: var(--text-muted);
}

.neutral {
  background: var(--neutral);
}
.button,
.project-filter,
.project-view-button,
.project-end-button,
.client-deliverable,
.footer-invitation,
.contact-send,
.contact-choice input,
.nav-panel {
  border-radius: var(--button-radius);
}

/* HEADER NAVIGATION */

.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  min-height: var(--navbar-height);
  padding-block: var(--navbar-inset);
  background: var(--background);
  --nav-height: var(--square-btn);
}

.navbar {
  transition:
    transform 280ms ease,
    background-color var(--core-transition),
    color var(--core-transition);
}

.navbar.is-scroll-hidden {
  transform: translateY(-100%);
}

.navbar.is-open,
.navbar.is-closing {
  transform: none;
  transition:
    background-color var(--core-transition),
    color var(--core-transition);
}

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

.navbar > a {
  margin-inline-end: auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  min-height: var(--square-btn);
  flex-shrink: 0;
  white-space: nowrap;
  transition: color var(--core-transition);
}

.nav-brand,
.nav-panel a {
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  text-decoration: none;
}

.navbar .theme-toggle {
  display: grid;
  place-items: center;
  width: var(--square-btn);
  height: var(--square-btn);
  aspect-ratio: 1;
  border: 0;
  border-radius: var(--button-radius);
  background: none;
  color: var(--text);
}

.theme-toggle:active {
  transform: scale(0.9);
}

.theme-icon {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.theme-icon-moon {
  display: none;
}

:root[data-theme="light"] .theme-icon-moon {
  display: block;
}

:root[data-theme="light"] .theme-icon-sun {
  display: none;
}

.menu-toggle {
  width: var(--square-btn);
  height: var(--square-btn);
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  background: var(--neutral);
  color: var(--text-muted);
}

.menu-toggle:hover,
.menu-toggle:focus-visible,
.navbar.is-open .menu-toggle {
  background: var(--text);
  color: var(--background);
}

.menu-toggle-icon {
  position: absolute;
  inset: 0;
  transform-origin: center;
  transition: transform var(--core-transition);
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.menu-toggle-icon::before {
  width: 45%;
  height: var(--line-weight);
}

.menu-toggle-icon::after {
  width: var(--line-weight);
  height: 45%;
}

.nav-panel {
  --nav-stage-duration: 250ms;
  position: absolute;
  top: var(--navbar-inset);
  right: var(--gutter);
  width: var(--square-btn);
  height: var(--square-btn);
  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 4vw, 4rem);
  overflow: hidden;

  background: var(--background);
  color: var(--text);
  border: var(--line-weight) solid var(--text);

  pointer-events: none;
  transition:
    width var(--nav-stage-duration) ease,
    height var(--nav-stage-duration) ease var(--nav-stage-duration),
    background-color var(--core-transition),
    border-color var(--core-transition);
}

.nav-panel a {
  flex-shrink: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 100ms ease,
    visibility 100ms;
  isolation: isolate;
  position: relative;
}

/* Original lettering reserves the space; scrambling is painted over it. */
.scramble-label {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.scramble-label-reserved {
  display: inline-block;
  opacity: 0;
}

.scramble-label-visible {
  position: absolute;
  inset: 0;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
}

.navbar.is-open .nav-panel {
  width: calc(100% - var(--gutter) * 2);
  height: var(--nav-height);
  pointer-events: auto;
  transition:
    height var(--nav-stage-duration) ease,
    width var(--nav-stage-duration) ease var(--nav-stage-duration),
    background-color var(--core-transition),
    border-color var(--core-transition);
}

.navbar.is-open .nav-panel a {
  opacity: 1;
  visibility: visible;
  /* Reveal together during the final part of the horizontal expansion. */
  transition-duration: 180ms;
  transition-delay: calc(var(--nav-stage-duration) * 1.6);
}

.navbar.is-open .menu-toggle-icon {
  transform: rotate(45deg);
}

/* Reduce the logo size on smaller screens. */
/* Small-screen menu fills the viewport inside the shared gutter. */
@media (max-width: 47.999rem) {
  .navbar {
    z-index: 20;
  }

  /* Keep header controls below the expanding panel, without hiding the controls. */
  .navbar > a,
  .navbar .theme-toggle {
    position: relative;
    z-index: 0;
  }

  .nav-panel {
    position: fixed;
    flex-direction: column;
    gap: clamp(1.5rem, 5vh, 3rem);
    visibility: hidden;
  }

  .nav-dismiss-area {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: transparent;
  }

  .navbar.is-closing .nav-panel {
    visibility: visible;
  }

  .navbar.is-open .nav-panel {
    width: calc(100vw - var(--gutter) * 2);
    height: calc(100vh * 2 / 3);
    height: calc(100dvh * 2 / 3);
    visibility: visible;
  }

  .nav-panel a {
    font-size: clamp(1.65rem, 7.7vw, 3.85rem);
    letter-spacing: 0.08em;
  }

  html.nav-open {
    overflow: hidden;
  }

  html.nav-open body {
    position: fixed;
    top: var(--nav-scroll-offset, 0px);
    left: 0;
    right: 0;
    overflow: hidden;
  }

  .navbar.is-open .menu-toggle,
  .navbar.is-closing .menu-toggle {
    position: fixed;
    top: var(--navbar-inset);
    right: var(--gutter);
    margin: 0;
  }

  /* Reserve the fixed close button's original place in the flex row. */
  .navbar.is-open::after,
  .navbar.is-closing::after {
    content: "";
    flex: 0 0 var(--square-btn);
    height: var(--square-btn);
    margin-left: 1rem;
  }
}

/* Inline navigation when there is room for the name, links and theme switch. */
@media (min-width: 48rem) {
  .navbar {
    align-items: center;
  }

  .navbar > a {
    order: 0;
  }

  .navbar .theme-toggle {
    order: 2;
    margin-left: var(--space-md);
  }

  .navbar .menu-toggle {
    display: none;
  }

  .navbar .nav-panel,
  .navbar.is-open .nav-panel {
    order: 1;
    position: static;
    width: auto;
    height: var(--square-btn);
    gap: 1.5rem;
    overflow: visible;
    background: transparent;
    border: 0;
    pointer-events: auto;
    transition: none;
  }

  .navbar .nav-panel a,
  .navbar.is-open .nav-panel a {
    opacity: 1;
    visibility: visible;
    transition: color var(--core-transition);
  }
}

/* PROJECT FILTERS */
.project-filters {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
  min-width: 0;
  flex: 1;
}

.project-filter-row {
  display: flex;
  justify-content: flex-start;
  gap: var(--space-xs);
  width: 100%;
}

.project-filter {
  font-weight: 700;
  flex-shrink: 0;
  text-transform: uppercase;
  min-height: var(--square-btn);
  max-width: 100%;
  padding: var(--space-xs) var(--space-sm);
  border: 0;
  background: var(--neutral);
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.4;
  transition:
    background-color var(--core-transition),
    color var(--core-transition);
}

.project-filter:hover,
.project-filter:focus-visible {
  background: var(--text);
  color: var(--background);
}

.project-filter[aria-pressed="true"] {
  background: var(--text);
  color: var(--background);
  transition: none;
}

.project-filter-empty {
  text-align: center;
  padding-block: var(--space-md);
}

/* Shared filter toolbar and grid/list display controls. */
.project-toolbar {
  --toolbar-gap: var(--space-md);
  --view-controls-width: calc(var(--square-btn) * 2 + var(--space-xs));
  display: flex;
  align-items: flex-end;
  gap: var(--toolbar-gap);
  padding-top: var(--space-md);
  padding-bottom: 0;
}

.project-section {
  --stack-space: var(--gutter);
}

.project-toolbar .project-filter-row:not(:last-child) {
  width: calc(100% + var(--view-controls-width) + var(--toolbar-gap));
}

.project-view-switch {
  display: flex;
  flex-shrink: 0;
  gap: var(--space-xs);
}

.project-view-button {
  display: grid;
  place-items: center;
  width: var(--square-btn);
  height: var(--square-btn);
  padding: 0;
  border: 0;
  background: var(--neutral);
  color: var(--text-muted);
  cursor: pointer;
  transition:
    background-color var(--core-transition),
    color var(--core-transition);
}

.project-view-button:hover,
.project-view-button:focus-visible {
  background: var(--text);
  color: var(--background);
}
.project-view-button[aria-pressed="true"] {
  background: var(--text);
  color: var(--background);
  transition: none;
}

.project-view-button svg {
  width: 45%;
  height: 45%;
  fill: none;
  stroke: currentColor;
  stroke-width: var(--line-weight);
}

.project-list-details {
  display: none;
}

.project-grid.is-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  border-top: var(--line-weight) solid var(--neutral);
}

.project-grid.is-list .project-preview {
  aspect-ratio: auto;
  border-bottom: var(--line-weight) solid var(--neutral);
}

.project-grid.is-list .project-list-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-block: var(--space-md);
}

.project-list-name {
  position: relative;
  z-index: 1;
  font-size: clamp(1.25rem, 3vw, 2.5rem);
  text-transform: uppercase;
  line-height: 1.2;
}

.project-grid.is-list .project-reveal,
.project-grid.is-list .project-preview::after {
  display: none;
}

.project-grid.is-list .project-thumbnail {
  --preview-mask: linear-gradient(
    to right,
    transparent 0%,
    transparent 12%,
    rgba(0, 0, 0, 0.05) 25%,
    rgba(0, 0, 0, 0.2) 40%,
    rgba(0, 0, 0, 0.5) 60%,
    rgba(0, 0, 0, 0.85) 80%,
    #000 100%
  );
  position: absolute;
  right: 0;
  top: 0;
  width: 70%;
  height: 100%;
  opacity: 0;
  transform: translateX(12%);
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: var(--preview-mask);
  mask-image: var(--preview-mask);
  transition:
    opacity var(--core-transition),
    transform 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.project-grid.is-list .project-preview:hover .project-thumbnail,
.project-grid.is-list .project-preview:focus-within .project-thumbnail {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 40rem) {
  .project-toolbar {
    --toolbar-gap: var(--space-xs);
  }
}

@media (hover: none) {
  .project-grid.is-list .project-thumbnail {
    transform: none;
    opacity: 1;
  }
  .project-grid.is-list .project-preview:hover .project-thumbnail,
  .project-grid.is-list .project-preview:focus-within .project-thumbnail {
    transform: none;
  }
}

/* Prevent grid images fading out visibly when entering List mode. */
.project-grid.is-switching-view .project-thumbnail,
.project-grid.is-switching-view .project-reveal {
  transition: none;
}

/* MAIN PAGE PROJECT GRID */

.project-grid {
  display: grid;
  gap: var(--gap);
}

.project-grid > * {
  min-width: 0;
}

@media (min-width: 48rem) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.project-preview {
  container-type: inline-size;
  cursor: pointer;
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  isolation: isolate;
  background: var(--background);
  color: var(--text);
  text-decoration: none;
}

/* Fixed brand tiles stay the same in both themes; list rows retain site colours. */
.project-grid:not(.is-list) .project-preview {
  background: var(--project-background, #231f20);
  color: var(--project-ink, #ffffff);
  border-radius: var(--thumbnail-radius);
}

.project-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: var(--neutral);
  opacity: 0;
  transition: opacity var(--core-transition);
}

.project-reveal {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--gutter);
  color: var(--project-ink, #ffffff);
  opacity: 1;
  pointer-events: none;
  transition:
    opacity var(--core-transition),
    color var(--core-transition);
}

/* Zoom only the artwork; card size and grid spacing stay fixed. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .project-grid:not(.is-list) .project-reveal {
    transition:
      transform 700ms cubic-bezier(0, 0, 0.2, 1),
      opacity var(--core-transition),
      color var(--core-transition);
  }

  .project-grid:not(.is-list) .project-preview:hover .project-reveal,
  .project-grid:not(.is-list) .project-preview:focus-visible .project-reveal {
    transform: scale(1.09);
  }
}

.project-logo-space {
  width: 100%;
  display: grid;
  place-items: center;
}

.project-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: clamp(3rem, 7vw, 5rem);
  max-height: 5rem;
  fill: currentColor;
}

.project-logo--asset {
  /* Equal canvas area: width = base × sqrt(aspect ratio), height = width / ratio. */
  --logo-size: clamp(2.5rem, 14cqw, 5rem);
  width: min(
    calc(
      var(--logo-size) * var(--logo-width-factor) * var(--logo-optical-scale, 1)
    ),
    12rem
  );
  aspect-ratio: var(--logo-ratio);
  max-width: 100%;
  max-height: none;
  background-color: currentColor;
  -webkit-mask: var(--logo-image) center / contain no-repeat;
  mask: var(--logo-image) center / contain no-repeat;
  transition: background-color var(--core-transition);
}

/* Index marks stay white in either theme, independently of client hero art. */
.project-grid:not(.is-list) .project-preview {
  color: #ffffff;
}
.project-grid .project-reveal {
  color: #ffffff;
}
.project-grid:not(.is-list) .project-card--izakaya .project-preview {
  background: var(--izakaya-dark);
}
.project-grid:not(.is-list) .project-thumbnail--video {
  opacity: 1;
}
.project-grid:not(.is-list) .project-card--growit .project-reveal {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .project-grid:not(.is-list) .project-thumbnail--video {
    opacity: 0;
  }
  .project-grid:not(.is-list) .project-card--growit .project-reveal {
    opacity: 1;
  }
}

/* Tile backgrounds use brand palettes with explicit, theme-independent logo colours. */
.project-card--izakaya,
[data-project-brand="izakaya"] {
  --project-background: var(--izakaya-light-grey);
  --project-ink: #000000;
}
.project-card--rgtools,
[data-project-brand="rgtools"] {
  --project-background: var(--rg-tools-green);
  --project-ink: #000000;
}
.project-card--growit,
[data-project-brand="growit"] {
  --project-background: var(--grow-it-pink);
  --project-ink: #000000;
}
.project-card--shori,
[data-project-brand="shori"] {
  --project-background: var(--shori-red);
  --project-ink: #ffffff;
}
.project-card--rematiptop,
[data-project-brand="rematiptop"] {
  --project-background: var(--rema-tip-top-red);
  --project-ink: #ffffff;
}
.project-card--bruff,
[data-project-brand="bruff"] {
  --project-background: var(--bruff-dark);
  --project-ink: #ffffff;
}
.project-card--pictap,
[data-project-brand="pictap"] {
  --project-background: var(--piccadilly-tap-pink);
  --project-ink: #000000;
}
.project-card--yemenheaven,
[data-project-brand="yemenheaven"] {
  --project-background: var(--yemen-heaven-sand);
  --project-ink: #000000;
}
/* Initial tile colours for projects whose palettes have not yet been supplied. */
.project-card--aperol,
[data-project-brand="aperol"] {
  --project-background: #f36c21;
  --project-ink: #000000;
}
.project-card--pavementvaults,
[data-project-brand="pavementvaults"] {
  --project-background: #243746;
  --project-ink: #ffffff;
}
.project-card--chemi-string,
[data-project-brand="chemi-string"] {
  --project-background: var(--rema-tip-top-red);
  --project-ink: #ffffff;
}
.project-card--spark,
[data-project-brand="spark"] {
  --project-background: #f8dd50;
  --project-ink: #000000;
}

/* Optical corrections account for stroke weight and dense silhouettes. */
.project-card--izakaya {
  --logo-optical-scale: 1.15;
}
.project-card--rgtools {
  --logo-optical-scale: 0.95;
}
.project-card--growit,
.project-card--shori {
  --logo-optical-scale: 1.35;
}
.project-card--bruff {
  --logo-optical-scale: 1.65;
}
.project-card--rematiptop {
  --logo-optical-scale: 1.3;
}
.project-card--pictap {
  --logo-optical-scale: 0.9;
}
.project-card--yemenheaven {
  --logo-optical-scale: 0.85;
}

/* One button style; em padding follows the button's text size. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.75em 1.25em;
  background: var(--text);
  color: var(--background);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Featured carousel: caption below a fixed image frame. */
.featured-hero-link {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  border-radius: 0;
  cursor: pointer;
}
.featured-hero-link:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: -6px;
}
.featured-hero--index::before {
  content: none;
}
.featured-slides {
  position: absolute;
  inset: 0;
}
.featured-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}
.featured-slide.is-active {
  opacity: 1;
}
.featured-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-block: var(--space-xs);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.06em;
}
.featured-project-link {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  color: inherit;
  text-decoration: none;
}
.featured-controls {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-shrink: 0;
}
.featured-controls button {
  display: grid;
  place-items: center;
  width: var(--square-btn);
  height: var(--square-btn);
  color: inherit;
  font-size: 1rem;
}
.featured-indicators {
  display: flex;
  gap: var(--space-xs);
}
.featured-controls .featured-indicator {
  width: 4rem;
  height: var(--square-btn);
  display: flex;
  align-items: center;
  cursor: pointer;
}
.featured-indicator::before {
  content: "";
  width: 100%;
  height: 3px;
  border-radius: var(--button-radius);
  background: var(--neutral);
  transition: background-color var(--core-transition);
}
.featured-indicator[aria-current="true"]::before {
  background: var(--text);
}
.featured-caption :is(a, button):hover {
  color: var(--text);
}
.featured-caption :is(a, button):focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}
@media (max-width: 35rem) {
  .featured-caption {
    flex-wrap: wrap;
  }
  .featured-controls {
    margin-left: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .featured-slide {
    transition: none;
  }
}

/* CLIENT HERO */

.featured-hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 6;
  border: var(--line-weight) solid var(--text);
}

.featured-hero--index {
  border: 0;
}

.featured-hero::before {
  content: "";
  position: absolute;
  inset: -18% 0;
  background: url("/images/web/featured-render-2400.webp") center / cover
    no-repeat;
  transform: translateY(var(--hero-parallax, 0px));
}

@media (prefers-reduced-motion: no-preference) {
  .featured-hero::before {
    will-change: transform;
  }
}

@media (max-width: 40rem) {
.featured-hero {
    aspect-ratio: 4 / 5;
  }
}
.project-end-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--square-btn);
  height: var(--square-btn);
  font-size: 0.75rem;
  border: 0;
  background-color: var(--neutral);
  color: var(--text-muted);
  line-height: 1;
  cursor: pointer;
  transition:
    background-color var(--core-transition),
    color var(--core-transition);
}
.project-end-button:not(:disabled):hover,
.project-end-button:focus-visible {
  background-color: var(--text);
  color: var(--background);
}

.client-hero-controls {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.client-deliverable {
  max-width: 100%;
  padding: var(--space-xs) var(--space-sm);
  border: 0;
  background-color: var(--neutral);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
}

/* CLIENT GALLERY */

/* Clip images, videos and their loading backgrounds to the shared radius. */
.client-gallery > * {
  border-radius: var(--thumbnail-radius);
  overflow: hidden;
}

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

.gallery-image {
  display: block;
  width: 100%;
  min-width: 0;
  object-fit: cover;
  object-position: center;
}

.gallery-image--wide {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
  background-color: var(--text);
}

.gallery-image--portrait {
  aspect-ratio: var(--gallery-portrait-ratio, 4 / 5);
  background-color: var(--text);
}

.gallery-image--square {
  aspect-ratio: 1 / 1;
  background-color: var(--text);
}

@media (max-width: 40rem) {
  .client-gallery {
    grid-template-columns: 1fr;
  }
}

/* ACCESSIBILITY AND SUPPORTING STYLES */
[hidden] {
  display: none !important;
}

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

.skip-link {
  position: absolute;
  top: var(--gutter);
  left: var(--gutter);
  z-index: 10;
  padding: var(--space-xs);
  background: var(--background);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* GALLERY VIDEO */

.gallery-video {
  position: relative;
  overflow: hidden;
}

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

/* Firefox/macOS can use different colour conversion when a blended cursor overlaps
   an otherwise unfiltered video. A non-identity filter keeps the filtered path
   active before, during and after overlap. brightness(1) is optimised away;
   this 0.01% difference is imperceptible and is not a colour-grading correction. */
@supports (-moz-appearance: none) {
  .gallery-video video {
    filter: brightness(1.0001);
  }
}

/* Theme-independent overlay for photographic and animated content. */
.video-control {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}

.video-control:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.video-control-icon {
  grid-area: 1 / 1;
  width: 1.125rem;
  height: 1.125rem;
  fill: currentColor;
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 80%));
  pointer-events: none;
}

.video-control-icon--pause {
  display: none;
}

.video-control[data-state="playing"] .video-control-icon--play {
  display: none;
}

.video-control[data-state="playing"] .video-control-icon--pause {
  display: block;
}

.project-end {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: var(--space-xs);
  padding-block: var(--gutter);
}

.project-end-button {
  padding: 0;
  text-decoration: none;
}

.project-end-button--text {
  width: fit-content;
  max-width: 100%;
  height: auto;
  min-height: var(--square-btn);
  padding: var(--space-xs) var(--space-sm);
  line-height: 1.3;
  text-align: center;
}

.project-end-button:nth-child(2) {
  justify-self: center;
}
.project-end-button:last-child {
  justify-self: end;
}

.project-end-button:disabled {
  color: var(--text-muted);
  cursor: default;
}

.project-end-button svg {
  width: 18%;
  height: 36%;
  fill: currentColor;
}

.project-end-button .project-end-arrow-up {
  width: 36%;
  height: 18%;
}

.info-page {
  padding-block: var(--section-space);
  line-height: 1.6;
}

/* CURRENT LOCATION MAP */
.location-feature {
  margin-block-start: var(--section-space);
}

.location-map {
  display: block;
  width: 100%;
  height: auto;
}

.location-map path {
  fill: var(--neutral);
  stroke: none;
  transition: fill var(--core-transition);
}

.location-map path.is-current {
  fill: var(--text);
}

.location-map path.is-hovered:not(.is-current) {
  fill: var(--text);
}

/* Add this class to the surrounding element for the footer version. */
.location-map-small .location-feature {
  width: 100%;
  max-width: 18rem;
  margin-block-start: 0;
}

/* SHARED FOOTER */
.site-footer {
  padding-block: calc(var(--section-space) * 2) var(--gutter);
}

.footer-invitation {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  border: 0;
  background: var(--neutral);
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  margin-block-end: var(--space-md);
  transition:
    background-color var(--core-transition),
    color var(--core-transition);
}

.footer-invitation:hover,
.footer-invitation:focus-visible {
  background: var(--text);
  color: var(--background);
}

.footer-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.6fr);
  gap: var(--space-md);
  border-block-start: var(--line-weight) solid var(--text);
  padding-block-start: var(--section-space);
}

.footer-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
  min-width: 0;
}

.footer-column h2 {
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-block-end: var(--space-sm);
}

.footer-column a {
  font-size: 0.875rem;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.footer-column .scramble-label-visible {
  white-space: normal;
  overflow-wrap: anywhere;
}

.footer-location {
  grid-column: 4;
  grid-row: 1 / span 2;
  align-self: stretch;
  align-items: flex-end;
}

.footer-location .location-feature {
  width: 100%;
  margin-block-start: 0;
}

.footer-location .location-map {
  width: 100%;
  margin-inline-start: auto;
}

.footer-copyright {
  grid-column: 1 / 4;
  align-self: end;
  margin-block-start: var(--section-space);
  color: var(--text-muted);
  font-size: 0.75rem;
}

@media (max-width: 48rem) {
  .footer-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: var(--section-space);
  }

  .footer-location {
    grid-column: 2;
    grid-row: 2 / span 2;
  }

  .footer-copyright {
    grid-column: 1;
  }
}

/* CONTACT FORM */
.contact-form {
  display: grid;
  gap: var(--space-md);
  margin-block-start: var(--section-space);
}

.contact-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

.contact-field {
  display: grid;
  gap: var(--space-xs);
  min-width: 0;
}

.contact-field--wide {
  grid-column: 1 / -1;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  min-width: 0;
  padding: var(--space-sm);
  border: var(--line-weight) solid var(--text);
  border-radius: var(--button-radius);
  background: var(--background);
  color: var(--text);
  font: inherit;
  line-height: 1.5;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

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

.contact-options {
  min-width: 0;
  margin: 0;
  padding: var(--space-sm) 0 0;
  border: 0;
}

.contact-options legend {
  padding: 0;
}

.contact-options-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-xs) var(--space-sm);
}

.contact-choice {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding-block: var(--space-xs);
  cursor: pointer;
  line-height: 1.4;
}

.contact-choice input {
  appearance: none;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin: 0;
  border: var(--line-weight) solid var(--text);
  background: var(--background);
  cursor: pointer;
}

.contact-choice input:checked {
  background: var(--text);
  box-shadow: inset 0 0 0 3px var(--background);
}

.contact-submit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
}

.contact-send {
  min-height: var(--square-btn);
  padding: var(--space-xs) var(--space-sm);
  border: 0;
  background: var(--neutral);
  color: var(--text-muted);
  cursor: not-allowed;
}

#contact-form-note {
  font-size: 0.875rem;
  line-height: 1.5;
}

@media (max-width: 40rem) {
  .contact-fields,
  .contact-options-grid {
    grid-template-columns: 1fr;
  }
}

/* DESKTOP CURSOR: Pony's dimensions/timings, with immediate movement. */
/* Blend on a stable viewport-sized surface, as on Pony, rather than the moving circle. */
.custom-cursor-layer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  mix-blend-mode: difference;
}

.custom-cursor {
  --cursor-size: 22px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  width: var(--cursor-size);
  height: var(--cursor-size);
  border-radius: 50%;
  background: #fff;
  color: #000;
  pointer-events: none;
  visibility: hidden;
  transform: translate(-50%, -50%);
  transition:
    width 350ms cubic-bezier(0.22, 1, 0.36, 1),
    height 350ms cubic-bezier(0.22, 1, 0.36, 1);
}

.custom-cursor.is-visible {
  visibility: visible;
}

.custom-cursor.is-expanded {
  width: calc(var(--cursor-size) * 2.1);
  height: calc(var(--cursor-size) * 2.1);
  transition-duration: 1s;
}

.custom-cursor.has-label {
  width: calc(var(--cursor-size) * 3);
  height: calc(var(--cursor-size) * 3);
  transition-duration: 800ms;
}

.custom-cursor-progress {
  position: absolute;
  top: -5px;
  left: -5px;
  width: calc(100% + 10px);
  height: calc(100% + 10px);
  overflow: visible;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  opacity: 0;
  pointer-events: none;
}
.custom-cursor.has-video-progress .custom-cursor-progress {
  opacity: 1;
}
.cursor-progress-track {
  opacity: 0.2;
}
.cursor-progress-value {
  /* Flat ends keep the remaining gap accurate right up to the last frame. */
  stroke-linecap: butt;
}

.custom-cursor-label {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0;
  transform: scale(0.7);
  transition:
    opacity 350ms ease,
    transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
}

.custom-cursor.has-label .custom-cursor-label {
  opacity: 1;
  transform: scale(1);
  transition-duration: 500ms;
  transition-delay: 300ms;
}

@media (hover: hover) and (pointer: fine) {
  html.has-custom-cursor,
  html.has-custom-cursor * {
    cursor: none !important;
  }
}

/* PAGE NAVIGATION: fade through the theme background. */
html::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--background);
  opacity: 0;
  pointer-events: none;
}

@keyframes page-cover-reveal {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html::after {
    transition: opacity 200ms cubic-bezier(0.215, 0.61, 0.355, 1);
  }

  html.page-leaving::after {
    opacity: 1;
    pointer-events: auto;
  }

  html.page-entering::after {
    animation: page-cover-reveal 200ms cubic-bezier(0.55, 0.055, 0.675, 0.19)
      both;
  }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  .project-filter,
  .project-view-button,
  .project-grid.is-list .project-thumbnail,
  .project-end-button {
    transition: none;
  }

  .custom-cursor,
  .custom-cursor-label,
  .custom-cursor.has-label .custom-cursor-label {
    transition: none;
  }

  .nav-panel,
  .navbar.is-open .nav-panel,
  .nav-panel a,
  .navbar.is-open .nav-panel a,
  .menu-toggle-icon {
    transition: none;
  }

  .navbar.is-open .nav-panel a {
    transition-delay: 0s;
  }

  .nav-button {
    transition: none;
  }

  .theme-toggle:active {
    transform: none;
  }

  .project-thumbnail,
  .project-reveal {
    transition: none;
  }

  .location-map path {
    transition: none;
  }
}

/* PROFILE: portrait, introduction and a simple row of tools. */
.profile-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--space-md);
  align-items: start;
  padding-block: var(--gutter) var(--space-md);
}

.profile-portrait {
  display: block;
  width: 100%;
  height: auto;
}

.profile-intro-copy {
  max-width: var(--reading-max);
  min-width: 0;
}

.profile-intro-copy h1 {
  font-size: clamp(2rem, 3vw, 3rem);
}

.profile-intro-copy > .profile-copy-section {
  margin-block-start: var(--space-md);
}

.profile-copy-section h2 {
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-contact-link {
  display: inline-block;
  text-underline-offset: 0.25em;
}

.profile-tool-icon {
  display: block;
  width: clamp(2.1875rem, 3.125vw, 3.125rem);
  height: clamp(2.1875rem, 3.125vw, 3.125rem);
  object-fit: contain;
}

@media (max-width: 47.999rem) {
  .profile-intro {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Additional client logos: contained within the page gutter. */
.client-ticker {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: calc(var(--space-md) * 1.5);
  padding-block: calc(var(--space-md) * 2);
}

.client-ticker-heading {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
  font-size: clamp(1.25rem, 2vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.client-ticker-window {
  min-width: 0;
  overflow-x: auto;
}

.client-ticker-track {
  display: flex;
  width: max-content;
}

.client-ticker-group {
  display: flex;
  align-items: center;
  gap: var(--ticker-gap, calc(var(--space-md) * 3.75));
  padding: 0 var(--ticker-gap, calc(var(--space-md) * 3.75)) 0 0;
  list-style: none;
  flex: 0 0 auto;
}

.client-ticker-group li {
  flex: 0 0 auto;
}

.client-ticker-copy {
  display: none;
}

.client-ticker-logo {
  display: block;
  width: calc(clamp(2.1875rem, 3.125vw, 3.125rem) * var(--ticker-factor));
  aspect-ratio: var(--ticker-ratio);
  background-color: var(--text);
  -webkit-mask: var(--ticker-logo) center / contain no-repeat;
  mask: var(--ticker-logo) center / contain no-repeat;
  transition: background-color var(--core-transition);
}

@keyframes client-ticker-drift {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .client-ticker.is-ready .client-ticker-window {
    overflow: hidden;
  }

  .client-ticker.is-ready .client-ticker-copy {
    display: flex;
  }

  .client-ticker.is-ready .client-ticker-track {
    animation: client-ticker-drift 60s linear infinite;
  }

  .client-ticker.is-paused .client-ticker-track,
  .client-ticker.is-offscreen .client-ticker-track {
    animation-play-state: paused;
  }
}

/* Shallow page heroes stay strips at every screen size. */
.featured-hero.featured-hero--strip {
  aspect-ratio: 16 / 3;
}
@media (max-width: 40rem) {
  .featured-hero.featured-hero--strip {
    aspect-ratio: 8 / 5;
  }
}

/* Draft client assets keep the same gallery ratios as finished projects. */
.gallery-placeholder {
  background-color: var(--accent);
}

.tools-ticker {
  --ticker-gap: var(--space-md);
}

/* Brand colour stays visible beneath media until its lazy-load fade completes. */
.client-gallery .gallery-media {
  position: relative;
  overflow: hidden;
  min-width: 0;
  background: var(--gallery-placeholder, var(--neutral));
}
.gallery-media.is-media-loading > img,
.gallery-media.is-media-loading > video {
  opacity: 0;
  background: transparent;
  transition: opacity 1s ease;
}
.gallery-media.is-media-ready > img,
.gallery-media.is-media-ready > video {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .gallery-media.is-media-loading > img,
  .gallery-media.is-media-loading > video {
    transition: none;
  }
}

/* PROFILE: introduction, personal details and professional practice. */
.profile-page .profile-intro {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  padding-block: var(--section-space);
  align-items: center;
}
.profile-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.profile-page .profile-intro-copy h1 {
  font-size: clamp(3.5rem, 11vw, 12rem);
  font-weight: 400;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-block: var(--space-md);
}
.profile-lead {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.3;
}
.profile-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding-block-start: var(--space-sm);
}
.profile-actions .footer-invitation {
  margin: 0;
}
.profile-portrait-stack {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 1 / 1.15;
}
.profile-portrait-card {
  position: absolute;
  inset: 7% 8% auto;
  width: 84%;
  padding: var(--space-xs);
  border: var(--line-weight) solid var(--text);
  background: var(--background);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transform: var(--portrait-position);
  box-shadow: 0 3px 10px rgb(0 0 0 / 12%);
}
.profile-portrait-card[data-position="0"] {
  --portrait-position: translate(0, 0) rotate(0deg);
  z-index: 3;
}
.profile-portrait-card[data-position="1"] {
  --portrait-position: translate(-7%, -3%) rotate(-8deg);
  z-index: 2;
}
.profile-portrait-card[data-position="2"] {
  --portrait-position: translate(7%, -4%) rotate(8deg);
  z-index: 1;
}
.profile-portrait-card:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}
.profile-portrait-card .profile-portrait {
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
  pointer-events: none;
}
.profile-portrait-caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-xs);
  padding-block: var(--space-xs);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.profile-portrait-caption > span:first-child {
  flex-shrink: 0;
}
.profile-portrait-aside {
  text-align: right;
  color: var(--text-muted);
  font-weight: 400;
}

.profile-facts dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
  border-block: var(--line-weight) solid var(--text);
  padding-block: var(--space-md);
  margin: 0;
}
.profile-facts dt {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-block-end: var(--space-xs);
}
.profile-facts dd {
  margin: 0;
}
.profile-work-summary {
  padding-block: var(--section-space);
}
.profile-work-summary h2 {
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 0.95;
  text-transform: uppercase;
  margin-block: var(--space-sm) var(--space-md);
}
.profile-work-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
.profile-work-summary > .stack {
  max-width: var(--reading-max);
}
@media (max-width: 47.999rem) {
  .profile-page .profile-intro {
    grid-template-columns: minmax(0, 1fr);
  }
  .profile-portrait-stack {
    width: min(100%, 30rem);
    justify-self: center;
    margin-block: var(--space-md);
  }
  .profile-facts dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .profile-work-summary {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Finer rules confined to the Profile; shared site borders stay unchanged. */
.profile-page {
  --line-weight: 0.75px;
}

/* Desktop playback lives in the cursor; keep a visible keyboard/touch control. */
.gallery-video video[data-cursor-video] {
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  html.has-custom-cursor .gallery-video .video-control:not(:focus-visible) {
    opacity: 0;
  }
}

.custom-cursor-video-icon {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.profile-statement h2 {
  max-width: 20ch;
  margin: 0;
  font-size: clamp(2rem, 5vw, 5rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

/* Hand-drawn annotations sit outside the text without changing its colour. */
.text-mark {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  isolation: isolate;
}
.text-mark svg {
  position: absolute;
  pointer-events: none;
  overflow: visible;
  fill: none;
  stroke: var(--mark-colour, var(--accent));
  stroke-width: 2.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  z-index: -1;
}
.text-mark path { vector-effect: non-scaling-stroke; }
.text-mark--underline svg {
  left: -2%;
  bottom: -0.06em;
  width: 104%;
  height: 0.18em;
}
.text-mark--circle svg {
  left: -9%;
  top: -5%;
  width: 118%;
  height: 110%;
  transform: rotate(-4deg);
}

/* Text-led case study introduction: identity, proposition, services and overview. */
.project-intro {
  padding-top: clamp(3rem, 7vw, 7rem);
  padding-bottom: clamp(2rem, 5vw, 5rem);
}
.project-intro-name {
  margin: 0 0 var(--space-md);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
}
.project-intro-headline {
  max-width: 22ch;
  margin: 0 0 clamp(2.5rem, 5vw, 5rem);
  font-size: clamp(2.25rem, 5.5vw, 5.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.project-intro-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: var(--space-md) clamp(2rem, 7vw, 7rem);
  align-items: start;
}
.project-intro-services ul {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 1rem;
  line-height: 1.5;
}
.project-intro-copy {
  max-width: 60ch;
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  line-height: 1.65;
}
.project-intro-copy p {
  margin: 0;
}
.project-intro-copy p + p {
  margin-top: var(--space-sm);
}
@media (max-width: 47.999rem) {
  .project-intro-details {
    grid-template-columns: 1fr;
  }
  .project-intro-headline {
    max-width: 20ch;
  }
  .project-intro-services ul {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs) var(--space-sm);
    color: var(--text-muted);
    font-size: 0.875rem;
  }
}

/* Suisse body copy; display typography and controls use the primary font. */
p:not(.profile-eyebrow),
.project-intro-copy {
  font-family: var(--font-body);
  font-weight: 300;
}

.profile-page .profile-intro-copy #profile-name {
  font-family: "Arcoqeh", serif;
  font-weight: 400;
}

/* Desktop gallery magnifier: the lens shows natural colours, outside inversion. */
.custom-cursor-eye-icon {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.custom-cursor-lens-image { display: none; }
.custom-cursor-layer.is-magnifying { mix-blend-mode: normal; }
.custom-cursor.is-magnifying {
  --lens-size: clamp(180px, 25vw, 320px);
  width: var(--lens-size);
  height: var(--lens-size);
  overflow: hidden;
  background: var(--background);
  box-shadow: 0 0 0 2px var(--neutral), 0 4px 20px rgb(0 0 0 / 20%);
  transition-duration: 300ms;
}
.custom-cursor.is-magnifying .custom-cursor-label,
.custom-cursor.is-magnifying .custom-cursor-progress { opacity: 0; }
.custom-cursor.is-magnifying .custom-cursor-lens-image {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  object-fit: fill;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .custom-cursor.is-magnifying { transition: none; }
}

/* Credits sit beneath services, aligned with the bottom of the project overview. */
.project-intro-services {
  display: flex;
  flex-direction: column;
  align-self: stretch;
}
.project-intro-thanks {
  margin-top: auto;
  padding-top: var(--space-md);
}
.project-intro-thanks h3 {
  margin: 0 0 var(--space-xs);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.4;
}
.project-intro-thanks p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Reserve each word's width while a few entrance letters briefly shuffle. */
.heading-shuffle-word { position: relative; display: inline-block; white-space: nowrap; }
.heading-shuffle-reserve { visibility: hidden; }
.heading-shuffle-letters { position: absolute; inset: 0; }
