/* =========================================================================
   Hugo Rosa — Photography
   Space Indigo ground, Platinum type, Lavender Grey for the quiet parts,
   Flag Red for anything you can act on. Photographs lead; the interface
   stays out of their way, photostream style.
   ========================================================================= */

/* --- Fonts ---------------------------------------------------------------- */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+1E00-1EFF, U+0304, U+0308, U+0329;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+1E00-1EFF, U+0304, U+0308, U+0329;
}

/* --- Tokens --------------------------------------------------------------- */

:root {
  color-scheme: dark;

  /* Space Indigo #2B2D42 anchors the ramp: darker below it, lighter above. */
  --ink-900: #14151F;
  --ink-800: #1B1D2B;
  --ink-700: #2B2D42;
  --ink-600: #353751;
  --ink-500: #414462;
  --ink-400: #4E5273;

  --line: rgba(141, 153, 174, 0.20);
  --line-strong: rgba(141, 153, 174, 0.38);

  /* Platinum for reading, Lavender Grey for everything quieter. */
  --text: #EDF2F4;
  --text-2: #B6C0D0;
  --text-3: #8D99AE;

  /* Flag Red fills, Strawberry for larger accents, a lighter tint where small
     red text has to clear 4.5:1 on the indigo ground. */
  --red-300: #FF6B7E;
  --red-400: #EF233C;
  --red-450: #E81838;
  --red-500: #D90429;
  --red-600: #C10425;
  --red-tint: rgba(239, 35, 60, 0.14);
  --red-tint-2: rgba(239, 35, 60, 0.30);

  --blue: #8FA6FF;
  --blue-tint: rgba(143, 166, 255, 0.18);

  --ok: #6FC3A0;
  --ok-tint: rgba(111, 195, 160, 0.14);
  --warn: #E0B15E;
  --warn-tint: rgba(224, 177, 94, 0.14);

  --font-display: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: clamp(1.25rem, 1.05rem + 0.8vw, 1.5rem);
  --step-3: clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem);
  --step-4: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --step-5: clamp(2.5rem, 1.6rem + 4vw, 4.5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  --r-1: 2px;
  --r-2: 4px;
  --r-3: 8px;
  --r-4: 14px;
  --r-full: 999px;

  --shell: 1560px;
  --reading: 68ch;
  --gap: 10px;

  --header-h: 76px;

  --ease: cubic-bezier(0.22, 0.61, 0.30, 1);
  --fast: 160ms;
  --base: 240ms;
  --slow: 420ms;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-3: 0 24px 60px rgba(0, 0, 0, 0.55);
}

@media (min-width: 900px) {
  :root {
    --header-h: 88px;
    --gap: 12px;
  }
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink-800);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

img,
picture,
svg {
  display: block;
  max-width: 100%;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }

p { margin: 0 0 1em; }

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

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

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: var(--r-1);
}

::selection {
  background: var(--red-tint-2);
}

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

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* --- Layout --------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(1rem, 3.5vw, 2.75rem);
}

.shell--narrow { max-width: 1120px; }

.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section--tight { padding-block: clamp(2rem, 4vw, 3rem); }

.stack > * + * { margin-top: var(--space-4); }

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

.skip-link {
  position: fixed;
  top: -120px;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--red-500);
  color: #fff;
  border-radius: var(--r-2);
  font-weight: 600;
  transition: top var(--base) var(--ease);
}

.skip-link:focus { top: 1rem; }

.eyebrow {
  display: block;
  margin-bottom: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-300);
}

.lede {
  font-size: var(--step-1);
  line-height: 1.65;
  color: var(--text-2);
  max-width: var(--reading);
}

.muted { color: var(--text-2); }
.tiny { font-size: var(--step--1); color: var(--text-3); }

.admin-photos__count { margin: 0 0 var(--space-4); }

/* --- Header --------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ink-800);
  border-bottom: 1px solid var(--line);
  transition: background var(--base) var(--ease), border-color var(--base) var(--ease);
}

.site-header--overlay {
  position: fixed;
  inset: 0 0 auto;
  background: transparent;
  border-bottom-color: transparent;
}

.site-header--overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(20, 21, 31, 0.72), rgba(20, 21, 31, 0));
  pointer-events: none;
  transition: opacity var(--base) var(--ease);
}

.site-header--overlay.is-scrolled {
  background: rgba(27, 29, 43, 0.92);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}

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

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand img {
  height: 34px;
  width: auto;
}

@media (min-width: 900px) {
  .brand img { height: 40px; }
}

.nav {
  display: none;
  align-items: center;
  gap: clamp(0.5rem, 1.6vw, 1.75rem);
}

.nav__link {
  position: relative;
  padding: 0.5rem 0;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  transition: color var(--fast) var(--ease);
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--red-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--base) var(--ease);
}

.nav__link:hover,
.nav__link:focus-visible { color: var(--text); }

.nav__link:hover::after,
.nav__link[aria-current='page']::after { transform: scaleX(1); }

.nav__link[aria-current='page'] { color: var(--text); }

.header__side {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
}

.lang a {
  padding: 0.3rem 0.6rem;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-3);
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}

.lang a:hover { color: var(--text); }

.lang a[aria-current='true'] {
  background: var(--red-tint);
  color: var(--red-300);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--fast) var(--ease);
}

.nav-toggle:hover { border-color: var(--line-strong); }

@media (min-width: 900px) {
  .nav { display: flex; }
  .nav-toggle { display: none; }
}

/* Mobile menu */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-rows: var(--header-h) 1fr;
  background: var(--ink-900);
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--base) var(--ease), visibility var(--base) var(--ease);
}

.mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
}

.mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-menu__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-2);
  padding-bottom: var(--space-9);
}

.mobile-menu__link {
  padding: 0.6rem 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  opacity: 0;
  transform: translateY(12px);
}

.mobile-menu.is-open .mobile-menu__link {
  animation: menu-in var(--slow) var(--ease) forwards;
}

.mobile-menu__link:nth-child(1) { animation-delay: 40ms; }
.mobile-menu__link:nth-child(2) { animation-delay: 80ms; }
.mobile-menu__link:nth-child(3) { animation-delay: 120ms; }
.mobile-menu__link:nth-child(4) { animation-delay: 160ms; }
.mobile-menu__link:nth-child(5) { animation-delay: 200ms; }

.mobile-menu__link[aria-current='page'] { color: var(--red-300); }

.mobile-menu__foot {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

@keyframes menu-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-border: transparent;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.5rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-border);
  border-radius: var(--r-2);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease),
    color var(--fast) var(--ease), opacity var(--fast) var(--ease);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--primary {
  --btn-bg: var(--red-500);
  --btn-fg: #fff;
  --btn-border: var(--red-500);
}

.btn--primary:hover:not(:disabled) {
  --btn-bg: var(--red-450);
  --btn-border: var(--red-450);
}

.btn--outline {
  --btn-border: var(--line-strong);
}

.btn--outline:hover:not(:disabled) {
  --btn-border: var(--text-2);
  --btn-bg: rgba(255, 255, 255, 0.04);
}

.btn--ghost {
  --btn-fg: var(--text-2);
  min-height: 40px;
  padding: 0 0.875rem;
}

.btn--ghost:hover:not(:disabled) {
  --btn-fg: var(--text);
  --btn-bg: var(--ink-500);
}

.btn--danger {
  --btn-fg: var(--red-300);
  --btn-border: var(--line-strong);
}

.btn--danger:hover:not(:disabled) {
  --btn-bg: var(--red-tint);
  --btn-border: var(--red-500);
}

.btn--sm {
  min-height: 38px;
  padding: 0 0.875rem;
  font-size: var(--step--1);
}

.btn--block { width: 100%; }

.btn svg { flex-shrink: 0; }

.link-underline {
  color: var(--red-300);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--red-tint-2);
  transition: text-decoration-color var(--fast) var(--ease);
}

.link-underline:hover { text-decoration-color: var(--red-300); }

/* --- Moving photo wall -------------------------------------------------------
   Columns drift vertically and loop for ever. Each track holds its frames twice
   and travels exactly half its height, so the seam never shows. Only `transform`
   animates, which the compositor handles on its own thread: no layout, no paint,
   no JavaScript running per frame.
   --------------------------------------------------------------------------- */

.filmwall {
  position: relative;
  height: min(100svh, 1040px);
  min-height: 560px;
  overflow: hidden;
  background: var(--ink-900);
}

.filmwall__cols {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* One full-height row, always. Without this the surplus columns wrap onto new
     rows and the wall appears duplicated with a gap in the last cell. */
  grid-template-rows: 100%;
  grid-auto-rows: 0;
  gap: var(--gap);
  align-items: stretch;
  overflow: hidden;
}

/* The markup ships four columns; each breakpoint shows exactly as many as the
   grid has slots for. */
.filmwall__col:nth-child(n + 3) { display: none; }

@media (min-width: 680px) {
  .filmwall__cols { grid-template-columns: repeat(3, 1fr); }
  .filmwall__col:nth-child(3) { display: block; }
}

@media (min-width: 1080px) {
  .filmwall__cols { grid-template-columns: repeat(4, 1fr); }
  .filmwall__col:nth-child(4) { display: block; }
}

.filmwall__col { overflow: hidden; }

.filmwall__track {
  display: block;
  animation: wall-drift var(--dur, 70s) linear infinite;
  will-change: transform;
}

/* Odd columns travel the other way, so the wall drifts instead of marching. */
.filmwall__col:nth-child(even) .filmwall__track { animation-direction: reverse; }

/* Columns start at different points in their loop. A negative delay does this
   without moving the track: shifting it with a margin would push content past
   the end of the loop and open a gap on tall screens. */
.filmwall__col:nth-child(2) .filmwall__track { animation-delay: calc(var(--dur, 70s) * -0.37); }
.filmwall__col:nth-child(3) .filmwall__track { animation-delay: calc(var(--dur, 70s) * -0.13); }
.filmwall__col:nth-child(4) .filmwall__track { animation-delay: calc(var(--dur, 70s) * -0.68); }

.filmwall__frame {
  /* The ratio alone decides the height. A minimum in viewport units would make
     the real column taller than the server calculated, and every column would
     then run at a different speed. */
  aspect-ratio: var(--ar, 1.2);
  margin-bottom: var(--gap);
  overflow: hidden;
  border-radius: var(--r-1);
  background: var(--ink-700);
}

.filmwall__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes wall-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .filmwall__track { animation: none; }
}

.filmwall__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(20, 21, 31, 0.92) 0%, rgba(20, 21, 31, 0.42) 40%, rgba(20, 21, 31, 0.28) 100%),
    radial-gradient(120% 80% at 50% 42%, transparent 45%, rgba(20, 21, 31, 0.5) 100%);
  pointer-events: none;
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  height: min(94vh, 1000px);
  min-height: 520px;
  background: var(--ink-900);
  overflow: hidden;
}

.hero__media,
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__media img {
  animation: hero-in 1.2s var(--ease) both;
}

@keyframes hero-in {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: scale(1); }
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(20, 21, 31, 0.86) 0%, rgba(20, 21, 31, 0.34) 26%, rgba(20, 21, 31, 0) 52%),
    linear-gradient(to bottom, rgba(20, 21, 31, 0.55) 0%, rgba(20, 21, 31, 0) 22%);
  pointer-events: none;
}

.hero__content {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.hero__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
}

.hero__line {
  max-width: 24ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  z-index: 2;
  transform: translateX(-50%);
  color: var(--text-3);
  animation: bob 2.4s ease-in-out infinite;
}

/* Keep the call to action clear of the cookie notice on small screens. */
@media (max-width: 700px) {
  .hero__content { padding-bottom: 8.5rem; }
  .hero__scroll { display: none; }
  .hero__actions .btn { flex: 1 1 100%; }
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

.hero--empty {
  display: grid;
  place-items: center;
  height: min(70vh, 620px);
  border-bottom: 1px solid var(--line);
}

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

.gallery {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.gallery__row {
  display: flex;
  gap: var(--gap);
  aspect-ratio: var(--row-ar, 3.4);
}

/* A last row with too few photographs to fill the width keeps the height of the
   rows above it, set by --row-ar, and simply stops where the photographs end. */
.gallery__row--short {
  justify-content: flex-start;
}

.tile {
  position: relative;
  flex: var(--ar, 1.5) 1 0%;
  height: 100%;
  overflow: hidden;
  background: var(--ink-700);
  border-radius: var(--r-1);
  cursor: zoom-in;
}

.gallery__row--short .tile {
  flex: 0 0 auto;
  width: auto;
  aspect-ratio: var(--ar, 1.5);
}

.tile__open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  background: none;
  border: 0;
  cursor: zoom-in;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--slow) var(--ease), opacity var(--slow) var(--ease);
}

.tile:hover img,
.tile:focus-visible img { transform: scale(1.035); }

/* Autofocus brackets: four corner marks close in on the frame, the way a camera
   confirms focus. Eight small gradients, no extra markup. */
.tile::after {
  --mark: rgba(237, 242, 244, 0.92);

  content: '';
  position: absolute;
  inset: 10px;
  z-index: 2;
  opacity: 0;
  transform: scale(1.035);
  transition: opacity var(--base) var(--ease), transform var(--base) var(--ease);
  pointer-events: none;
  background:
    linear-gradient(var(--mark), var(--mark)) left top / 16px 2px no-repeat,
    linear-gradient(var(--mark), var(--mark)) left top / 2px 16px no-repeat,
    linear-gradient(var(--mark), var(--mark)) right top / 16px 2px no-repeat,
    linear-gradient(var(--mark), var(--mark)) right top / 2px 16px no-repeat,
    linear-gradient(var(--mark), var(--mark)) left bottom / 16px 2px no-repeat,
    linear-gradient(var(--mark), var(--mark)) left bottom / 2px 16px no-repeat,
    linear-gradient(var(--mark), var(--mark)) right bottom / 16px 2px no-repeat,
    linear-gradient(var(--mark), var(--mark)) right bottom / 2px 16px no-repeat;
}

.tile:hover::after,
.tile:focus-within::after {
  opacity: 1;
  transform: none;
}

.tile--video::after { --mark: rgba(239, 35, 60, 0.95); }

/* In the client area the corners hold the tick and the download button, and the
   focus brackets sit at exactly the same inset: the two land on top of each
   other and neither reads. There the frame speaks instead of the brackets. */
.gallery[data-client-gallery] .tile::after { content: none; }

.gallery[data-client-gallery] .tile::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px transparent;
  background:
    linear-gradient(to bottom, rgba(20, 21, 31, 0.5) 0%, transparent 34%),
    linear-gradient(to top, rgba(20, 21, 31, 0.55) 0%, transparent 34%);
  opacity: 0;
  transition: opacity var(--base) var(--ease), box-shadow var(--fast) var(--ease);
  pointer-events: none;
}

.gallery[data-client-gallery] .tile:hover::before,
.gallery[data-client-gallery] .tile:focus-within::before { opacity: 1; }

/* Selected: the ring is drawn inside the frame and follows its corners, so it
   never doubles up with a second outline at a different inset. */
.gallery[data-client-gallery] .tile.is-selected::before {
  opacity: 1;
  box-shadow: inset 0 0 0 2px var(--red-500);
}

.tile__meta {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  background: linear-gradient(to top, rgba(20, 21, 31, 0.8), transparent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--base) var(--ease), transform var(--base) var(--ease);
  pointer-events: none;
}

.tile:hover .tile__meta,
.tile:focus-visible .tile__meta,
.tile.is-selected .tile__meta {
  opacity: 1;
  transform: translateY(0);
}

.tile__tag {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(237, 242, 244, 0.9);
}

/* --- Video tiles ------------------------------------------------------------ */

.tile__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  padding-left: 4px;
  background: rgba(20, 21, 31, 0.55);
  border: 1px solid rgba(237, 242, 244, 0.55);
  border-radius: 50%;
  color: #fff;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(6px);
  transition: background var(--base) var(--ease), border-color var(--base) var(--ease),
    transform var(--base) var(--ease);
  pointer-events: none;
}

.tile--video:hover .tile__play {
  background: var(--red-500);
  border-color: var(--red-500);
  transform: translate(-50%, -50%) scale(1.06);
}

.tile__play--static {
  position: absolute;
  width: 44px;
  height: 44px;
}

.filter--video svg { opacity: 0.8; }

.lightbox__stage iframe {
  width: min(1400px, 92vw);
  aspect-ratio: 16 / 9;
  max-height: calc(100svh - 9.5rem);
  border: 0;
  border-radius: var(--r-1);
  background: #000;
}

@media (max-width: 700px) {
  .gallery__row,
  .gallery__row--short {
    display: grid;
    grid-template-columns: 1fr;
    aspect-ratio: auto;
  }

  .tile,
  .gallery__row--short .tile {
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: var(--ar, 1.5);
  }
}

.gallery--edge {
  padding-inline: 0;
}

/* --- Homepage photostream -------------------------------------------------- */

.stream {
  padding-block: clamp(2rem, 4vw, 3.5rem) clamp(3rem, 6vw, 5rem);
}

.stream__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--line);
}

.stream__all {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  transition: color var(--fast) var(--ease);
}

.stream__all:hover { color: var(--text); }

.stream__foot {
  display: flex;
  justify-content: center;
  margin-top: clamp(2rem, 4vw, 3rem);
}

/* --- Reveal on scroll ----------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Tiles fade in one after another as their row arrives, left to right. */
.reveal .tile {
  opacity: 0;
  transform: translateY(14px) scale(0.995);
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
  transition-delay: var(--delay, 0ms);
}

.reveal.is-visible .tile {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal .tile { opacity: 1; transform: none; }
}

/* --- Filters & pagination -------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.filter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  background: transparent;
  cursor: pointer;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease),
    background var(--fast) var(--ease);
}

.filter:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.filter[aria-current='true'] {
  background: var(--red-500);
  border-color: var(--red-500);
  color: #fff;
}

.filter__count {
  font-size: 0.6875rem;
  opacity: 0.7;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-7);
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  font-size: var(--step--1);
  color: var(--text-2);
}

.pagination a:hover { border-color: var(--line-strong); color: var(--text); }

.pagination [aria-current='page'] {
  background: var(--ink-500);
  border-color: var(--line-strong);
  color: var(--text);
}

/* Marks a skipped run of pages. Plain text, not a pill: there is nothing here
   to click, so it should not look like the buttons either side of it.
   Selector needs the extra class to outrank ".pagination span" above, which a
   bare ".pagination__gap" is not specific enough to override. */
.pagination .pagination__gap {
  min-width: auto;
  height: auto;
  padding: 0;
  border: 0;
  color: var(--text-3);
}

/* --- Lightbox -------------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  background: rgba(20, 21, 31, 0.97);
}

.lightbox.is-open {
  display: grid;
  grid-template-rows: auto 1fr auto;
  animation: fade-in var(--base) var(--ease);
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Shutter blades part when the viewer opens. */
.lightbox__shutter {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.lightbox__shutter::before,
.lightbox__shutter::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 50.5%;
  background: var(--ink-900);
  transform: translateY(0);
}

.lightbox__shutter::before { top: 0; }
.lightbox__shutter::after { bottom: 0; }

.lightbox.is-open .lightbox__shutter::before {
  animation: blade-up 460ms cubic-bezier(0.16, 0.84, 0.32, 1) both;
}

.lightbox.is-open .lightbox__shutter::after {
  animation: blade-down 460ms cubic-bezier(0.16, 0.84, 0.32, 1) both;
}

@keyframes blade-up {
  from { transform: translateY(0); }
  to { transform: translateY(-101%); }
}

@keyframes blade-down {
  from { transform: translateY(0); }
  to { transform: translateY(101%); }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox__shutter { display: none; }
}

.lightbox__bar {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) clamp(1rem, 3vw, 2rem);
}

.lightbox__counter {
  font-family: var(--font-display);
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  color: var(--text-3);
}

.lightbox__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding-inline: clamp(1rem, 5vw, 4.5rem);
}

.lightbox__stage img {
  max-width: 100%;
  max-height: min(100%, calc(100svh - 9.5rem));
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r-1);
  animation: zoom-in var(--base) var(--ease);
}

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

.lightbox__foot {
  min-height: 3.25rem;
  padding: var(--space-3) clamp(1rem, 3vw, 2rem) var(--space-5);
  text-align: center;
  color: var(--text-3);
  font-size: var(--step--1);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  color: var(--text);
  cursor: pointer;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--line-strong);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
}

.lightbox__nav--prev { left: clamp(0.25rem, 1.5vw, 1rem); }
.lightbox__nav--next { right: clamp(0.25rem, 1.5vw, 1rem); }

/* --- Feature band ---------------------------------------------------------- */

.band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--ink-700);
}

.band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding-block: clamp(2rem, 4vw, 3rem);
}

.band__title {
  margin: 0;
  font-size: var(--step-3);
  max-width: 20ch;
}

/* --- About ----------------------------------------------------------------- */

.about {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

@media (min-width: 900px) {
  .about { grid-template-columns: 0.85fr 1fr; }
}

.about__figure {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--r-2);
  background: var(--ink-700);
}

.about__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__figure--empty {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
}

.about__figure--empty img {
  width: 45%;
  height: auto;
  opacity: 0.25;
}

@media (min-width: 900px) {
  .about__figure { position: sticky; top: calc(var(--header-h) + 2rem); }
}

.prose {
  max-width: var(--reading);
  color: var(--text-2);
  font-size: var(--step-1);
  line-height: 1.75;
}

.prose h2 {
  margin-top: 2em;
  color: var(--text);
  font-size: var(--step-2);
}

.prose h2:first-child { margin-top: 0; }

.prose strong { color: var(--text); }

.prose a {
  color: var(--red-300);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose ul {
  padding-left: 1.15rem;
  margin: 0 0 1.25em;
}

.prose li { margin-bottom: 0.5em; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
  font-size: var(--step-0);
}

.prose th,
.prose td {
  padding: 0.85rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.prose th {
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.prose code {
  padding: 0.15em 0.4em;
  background: var(--ink-600);
  border-radius: var(--r-1);
  font-size: 0.875em;
  color: var(--text);
}

.table-scroll { overflow-x: auto; }

/* --- Forms ----------------------------------------------------------------- */

.field { display: block; margin-bottom: var(--space-5); }

.field__label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-2);
}

.field__control {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1rem;
  background: var(--ink-700);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  color: var(--text);
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}

.field__control::placeholder { color: var(--text-3); }

.field__control:hover { border-color: var(--text-3); }

.field__control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-tint);
}

textarea.field__control {
  min-height: 160px;
  resize: vertical;
  line-height: 1.6;
}

select.field__control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A6B0C3' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.5rem;
}

.field--invalid .field__control {
  border-color: var(--red-500);
}

.field__error {
  display: block;
  margin-top: 0.4rem;
  font-size: var(--step--1);
  color: var(--red-300);
}

.field__hint {
  display: block;
  margin-top: 0.4rem;
  font-size: var(--step--1);
  color: var(--text-3);
}

.honeypot {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.alert {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  margin-bottom: var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--r-2);
  font-size: 0.9375rem;
}

.alert--success {
  background: var(--ok-tint);
  border-color: rgba(87, 176, 138, 0.35);
  color: #8FD3B4;
}

.alert--error {
  background: var(--red-tint);
  border-color: var(--red-tint-2);
  color: var(--red-300);
}

.alert--info {
  background: var(--blue-tint);
  border-color: rgba(110, 155, 255, 0.35);
  color: #A8C2FF;
}

/* --- Contact --------------------------------------------------------------- */

.contact {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

@media (min-width: 900px) {
  .contact { grid-template-columns: 0.8fr 1fr; }
}

.contact__card {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--ink-700);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
}

.detail-list {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-6) 0 0;
}

.detail-list dt {
  font-family: var(--font-display);
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.detail-list dd {
  margin: 0.25rem 0 0;
  color: var(--text);
}

/* --- Footer ---------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--ink-900);
}

.site-footer__inner {
  display: grid;
  gap: var(--space-6);
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

@media (min-width: 800px) {
  .site-footer__inner {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

.site-footer__cta {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-5);
  align-items: center;
}

.site-footer__links a {
  font-size: var(--step--1);
  color: var(--text-3);
  transition: color var(--fast) var(--ease);
}

.site-footer__links a:hover { color: var(--text-2); }

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  justify-content: space-between;
  padding-block: var(--space-5);
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--text-3);
}

/* --- Cookie notice --------------------------------------------------------- */

.cookie {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  max-width: 620px;
  margin-inline: auto;
  padding: 1.15rem 1.25rem;
  background: var(--ink-600);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-3);
  transform: translateY(calc(100% + 2rem));
  transition: transform var(--slow) var(--ease);
}

.cookie.is-visible { transform: translateY(0); }

.cookie__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  justify-content: space-between;
}

.cookie p {
  margin: 0;
  font-size: var(--step--1);
  line-height: 1.55;
  color: var(--text-2);
  flex: 1 1 22ch;
}

.cookie a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* --- Focus layout (login screens) ------------------------------------------ */

.focus-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 1fr;
}

@media (min-width: 1000px) {
  .focus-shell { grid-template-columns: 1.1fr 0.9fr; }
}

.focus-shell__aside {
  display: none;
  position: relative;
  background: var(--ink-900);
}

@media (min-width: 1000px) {
  .focus-shell__aside { display: block; }
}

.focus-shell__aside img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.focus-shell__aside::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(20, 21, 31, 0.2), var(--ink-800));
}

.focus-shell__main {
  display: grid;
  align-content: center;
  gap: var(--space-6);
  padding: clamp(2rem, 6vw, 4rem);
}

.focus-card {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
}

.focus-card__brand { margin-bottom: var(--space-7); }
.focus-card__brand img { height: 44px; width: auto; }

.focus-card__lead {
  margin: 0 0 var(--space-5);
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.focus-card__foot {
  margin-top: var(--space-5);
  font-size: var(--step--1);
  color: var(--text-3);
}

/* Setting up the authenticator app: three things to do, in order. */
.steps {
  margin: 0 0 var(--space-5);
  padding-left: 1.2rem;
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.steps li { margin-bottom: var(--space-4); }
.steps li:last-child { margin-bottom: 0; }
.steps .tiny { display: block; margin-top: 0.35rem; }

/* The QR code, shown above the key it encodes so scanning it is the first
   thing to try rather than typing the key by hand. */
.qr {
  margin-top: 0.5rem;
  width: 11rem;
  max-width: 100%;
}

.qr svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-1);
  border: 1px solid var(--line);
}

/* The shared secret, spaced so it can be read off the screen and typed. */
.secret {
  display: block;
  margin-top: 0.5rem;
  padding: 0.7rem 0.85rem;
  background: var(--ink-700);
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  letter-spacing: 0.14em;
  color: var(--text-1);
  user-select: all;
}

.secret--wrap {
  font-size: 0.75rem;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.disclosure {
  margin-bottom: var(--space-5);
  font-size: var(--step--1);
  color: var(--text-3);
}

.disclosure summary {
  cursor: pointer;
  padding: 0.35rem 0;
}

/* Six digits, spaced out so a mistyped one is easy to see. */
.field__control--code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.5rem;
  letter-spacing: 0.4em;
  text-align: center;
}

/* --- Client dashboard ------------------------------------------------------ */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  padding-block: clamp(2rem, 5vw, 3.5rem) var(--space-6);
}

.page-head h1 { margin: 0; }

/* A collection's own page leads with a title and a line about the work, so the
   heading block stacks instead of sitting beside the count. */
.page-head--stacked { align-items: flex-start; }

.page-head--stacked .lead {
  max-width: 52ch;
  margin: var(--space-3) 0 0;
  color: var(--text-2);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.back-link {
  display: inline-block;
  margin-bottom: var(--space-3);
  color: var(--text-3);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.back-link:hover { color: var(--text-1); }

/* Collections index: one card per body of work. */
.collections {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: var(--gap);
}

.collection {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-2);
  background: var(--ink-700);
  color: inherit;
  transition: transform var(--fast) var(--ease);
}

.collection:hover { transform: translateY(-3px); }

.collection__frame {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ink-600);
}

.collection__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--slow) var(--ease);
}

.collection:hover .collection__frame img { transform: scale(1.04); }

.collection__body {
  display: block;
  padding: var(--space-4) var(--space-4) var(--space-5);
}

.collection__title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.collection__summary {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.collection__meta {
  display: block;
  margin-top: var(--space-3);
  color: var(--text-3);
  font-size: 0.8125rem;
}

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-block: var(--space-7) var(--space-6);
  padding: var(--space-5) 0 0;
  border-top: 1px solid var(--line);
}

.cta-band p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.125rem;
}

.page-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.select-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  background: rgba(20, 21, 31, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--r-full);
  color: transparent;
  cursor: pointer;
  opacity: 0;
  backdrop-filter: blur(6px);
  transition: opacity var(--fast) var(--ease), background var(--fast) var(--ease),
    border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.tile:hover .select-toggle,
.tile:focus-within .select-toggle,
.select-toggle:focus-visible,
.tile.is-selected .select-toggle { opacity: 1; }

.tile.is-selected .select-toggle {
  background: var(--red-500);
  border-color: var(--red-500);
  color: #fff;
}

/* The download button sits on a photograph, so it carries its own dark ground.
   The default icon button is nearly transparent and disappears on pale frames. */
.tile__action {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 4;
  width: 34px;
  height: 34px;
  background: rgba(20, 21, 31, 0.65);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  opacity: 0;
  transform: translateY(4px);
  backdrop-filter: blur(6px);
  transition: opacity var(--base) var(--ease), transform var(--base) var(--ease),
    background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.tile__action:hover {
  background: var(--red-500);
  border-color: var(--red-500);
}

.tile:hover .tile__action,
.tile:focus-within .tile__action {
  opacity: 1;
  transform: none;
}

.selection-bar {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 95;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0.75rem 0.85rem 0.75rem 1.25rem;
  background: var(--ink-500);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-3);
  transform: translate(-50%, calc(100% + 2rem));
  transition: transform var(--base) var(--ease);
}

.selection-bar.is-visible { transform: translate(-50%, 0); }

.selection-bar__count {
  font-size: var(--step--1);
  color: var(--text-2);
  white-space: nowrap;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: var(--space-4);
  padding: clamp(3rem, 10vw, 6rem) var(--space-5);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-3);
  text-align: center;
  color: var(--text-3);
}

.empty-state h2 {
  margin: 0;
  font-size: var(--step-2);
  color: var(--text-2);
}

/* --- Admin ----------------------------------------------------------------- */

.admin {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 1fr;
}

@media (min-width: 1000px) {
  .admin { grid-template-columns: 248px 1fr; }
}

.admin__side {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4) var(--space-5);
  background: var(--ink-900);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

@media (min-width: 1000px) {
  .admin__side {
    position: sticky;
    top: 0;
    height: 100vh;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    padding: var(--space-6) var(--space-4);
    border-right: 1px solid var(--line);
    border-bottom: 0;
    overflow: visible;
  }
}

.admin__brand {
  display: none;
  margin-bottom: var(--space-6);
  padding-inline: var(--space-3);
}

.admin__brand img { height: 30px; width: auto; }

@media (min-width: 1000px) {
  .admin__brand { display: block; }
}

.admin__nav {
  display: flex;
  gap: var(--space-2);
}

@media (min-width: 1000px) {
  .admin__nav { flex-direction: column; }
}

.admin__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--r-2);
  font-size: 0.9375rem;
  color: var(--text-2);
  white-space: nowrap;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}

.admin__link:hover {
  background: var(--ink-600);
  color: var(--text);
}

.admin__link[aria-current='page'] {
  background: var(--red-tint);
  color: var(--red-300);
}

.admin__link--button {
  width: 100%;
  background: none;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.admin__link svg { flex-shrink: 0; opacity: 0.85; }

.admin__foot { margin-top: auto; }

.admin__main {
  min-width: 0;
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 3vw, 2.5rem) var(--space-9);
}

.admin__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.admin__head h1 {
  margin: 0;
  font-size: var(--step-3);
}

.panel {
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  background: var(--ink-700);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  margin-bottom: var(--space-5);
}

.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.panel__head h2 {
  margin: 0;
  font-size: var(--step-1);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.stat {
  padding: var(--space-5);
  background: var(--ink-700);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
}

.stat__value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat__label {
  margin-top: 0.5rem;
  font-size: var(--step--1);
  color: var(--text-3);
}

.stat__value--small { font-size: 1.05rem; line-height: 1.5; }
.stat__unit { font-size: 0.9rem; color: var(--text-3); font-weight: 400; }

.admin__who {
  display: none;
  margin: 0 0 var(--space-5);
  padding: 0 var(--space-3);
  line-height: 1.35;
}

.admin__who .tiny { display: block; }
.admin__who strong { font-family: var(--font-display); font-size: 0.95rem; }

@media (min-width: 1000px) {
  .admin__who { display: block; }
}

.detail-list--inline {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: 0;
}

.photo-card__clients {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.photo-card__clients legend { margin-bottom: 6px; }

.stat--accent { border-color: var(--red-tint-2); }
.stat--accent .stat__value { color: var(--red-300); }

.dropzone {
  display: grid;
  place-items: center;
  gap: var(--space-3);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-3);
  text-align: center;
  color: var(--text-2);
  cursor: pointer;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--red-500);
  background: var(--red-tint);
}

.dropzone input { display: none; }

.dropzone__files {
  font-size: var(--step--1);
  color: var(--text-3);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.toolbar__search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0 0.85rem;
  background: var(--ink-700);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
}

.toolbar__search input {
  width: 12rem;
  max-width: 40vw;
  background: none;
  border: 0;
  outline: none;
  font-size: var(--step--1);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--space-4);
}

.photo-card {
  display: flex;
  flex-direction: column;
  background: var(--ink-700);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
  transition: border-color var(--fast) var(--ease);
}

.photo-card.is-selected {
  border-color: var(--red-500);
  box-shadow: 0 0 0 1px var(--red-500);
}

.photo-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--ink-600);
}

.photo-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-card__check {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
}

.photo-card__badges {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  gap: 4px;
}

.photo-card__body {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
}

.photo-card__name {
  font-size: var(--step--1);
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-card__row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* The card's settings are grouped by the question they answer: where does this
   photograph show, how is it filed, and who receives it. Unlabelled dropdowns
   in a single column gave no clue which was which. */
.photo-card__group {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-3) 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.photo-card__group:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.photo-card__group legend {
  padding: 0;
  margin-bottom: var(--space-1);
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.photo-card__group .field__label {
  margin-bottom: 0;
  font-size: var(--step--1);
  color: var(--text-2);
}

.photo-card__link {
  font-size: var(--step--1);
  color: var(--text-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.photo-card__link:hover { color: var(--red-300); }

/* The small number box that sets a film's place on the homepage. */
.control--order { width: 4.5rem; }

.control {
  width: 100%;
  min-height: 40px;
  padding: 0.5rem 0.7rem;
  background: var(--ink-600);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  color: var(--text);
  font-size: var(--step--1);
}

.control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-tint);
}

select.control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23A6B0C3' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  padding-right: 2rem;
}

/* Switch */

.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--step--1);
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch__track {
  position: relative;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
  background: var(--ink-400);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-full);
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.switch__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--text-2);
  border-radius: 50%;
  transition: transform var(--fast) var(--ease), background var(--fast) var(--ease);
}

.switch input:checked + .switch__track {
  background: var(--red-500);
  border-color: var(--red-500);
}

.switch input:checked + .switch__track::after {
  background: #fff;
  transform: translateX(16px);
}

.switch input:focus-visible + .switch__track {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* Chips */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  background: var(--ink-600);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  font-size: 0.75rem;
  color: var(--text-2);
  cursor: pointer;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease),
    color var(--fast) var(--ease);
}

.chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.chip:has(input:checked) {
  background: var(--red-tint);
  border-color: var(--red-tint-2);
  color: var(--red-300);
}

.chip:has(input:focus-visible) {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge--red { background: var(--red-tint); color: var(--red-300); }
.badge--ok { background: var(--ok-tint); color: var(--ok); }
.badge--warn { background: var(--warn-tint); color: var(--warn); }
.badge--muted { background: var(--ink-500); color: var(--text-3); }
.badge--solid { background: rgba(20, 21, 31, 0.75); color: #fff; backdrop-filter: blur(6px); }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.table th,
.table td {
  padding: 0.9rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table th {
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.table tbody tr:hover { background: var(--ink-600); }

.table td:last-child { text-align: right; }

.form-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  /* Aligned from the top, not the bottom. Fields that carry a line of help
     underneath are taller, and bottom alignment pushed their labels and inputs
     out of line with the fields beside them. */
  align-items: start;
}

.form-grid .field { margin-bottom: 0; }

/* A field that needs the whole row: a summary, or a switch with an explanation. */
.form-grid .field--wide,
.form-grid__actions { grid-column: 1 / -1; }

/* A button sitting directly in the grid still lines up with the inputs beside
   it, rather than floating to the top now that the fields align from there. */
.form-grid > .btn { align-self: end; }

.form-grid .field--wide .switch { align-items: flex-start; }

.form-grid .field--wide .switch .field__hint { display: block; margin-top: 2px; }

.table__right { text-align: right; }

/* Bulk bar */

.bulk-bar {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 95;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  max-width: calc(100vw - 2rem);
  padding: 0.75rem 1rem;
  background: var(--ink-500);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-3);
  transform: translate(-50%, calc(100% + 2.5rem));
  transition: transform var(--base) var(--ease);
}

.bulk-bar.is-visible { transform: translate(-50%, 0); }

.bulk-bar__count {
  font-size: var(--step--1);
  color: var(--text-2);
  white-space: nowrap;
}

.bulk-bar .control { width: auto; min-width: 9rem; }

/* Drag & drop ordering */

.order-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-3);
}

.order-item {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: var(--r-2);
  overflow: hidden;
  background: var(--ink-600);
  cursor: grab;
}

.order-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-item.is-dragging { opacity: 0.4; }

.order-item.is-over { outline: 2px dashed var(--red-500); outline-offset: -2px; }

.order-item__index {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  background: rgba(20, 21, 31, 0.75);
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-size: 0.75rem;
  backdrop-filter: blur(6px);
}

/* Toast */

.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 130;
  display: grid;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  padding: 0.75rem 1rem;
  background: var(--ink-500);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--ok);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-2);
  font-size: var(--step--1);
  animation: toast-in var(--base) var(--ease);
}

.toast--error { border-left-color: var(--red-500); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* --- Print ----------------------------------------------------------------- */

@media print {
  .site-header,
  .site-footer,
  .cookie,
  .lightbox { display: none !important; }

  body { background: #fff; color: #000; }
}

/* --- Albums ------------------------------------------------------------------ */

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
}

.album-card {
  display: flex;
  flex-direction: column;
  background: var(--ink-600);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
  transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.album-card:hover {
  border-color: var(--red-tint-2);
  transform: translateY(-2px);
}

.album-card__media {
  display: block;
  aspect-ratio: 3 / 2;
  background: var(--ink-700);
}

.album-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-card__body {
  display: block;
  padding: var(--space-4);
}

.album-card__title {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.album-card__state {
  display: block;
  margin-top: var(--space-3);
}

/* Says why something cannot be done yet, without looking like an error. */
.notice {
  margin-bottom: var(--space-6);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--ink-600);
}

.notice--warn { border-color: var(--warn-tint); }

.notice h2 {
  margin: 0 0 var(--space-3);
  font-size: 1.0625rem;
}

.notice p {
  margin: 0 0 var(--space-4);
  max-width: 60ch;
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.notice__price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-1);
}

.notice__list {
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
}

.notice__list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-3);
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.notice__list li:last-child { border-bottom: 0; }

/* Searchable picker: scales to a long client list without endless scrolling. */
.picker__filter { margin-bottom: var(--space-3); }

.picker__list {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
}

.picker__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.picker__row:last-child { border-bottom: 0; }
.picker__row:hover { background: var(--ink-600); }
.picker__row input { accent-color: var(--red-500); }
.picker__name { font-size: 0.9rem; }
.picker__meta { margin-left: auto; font-size: var(--step--1); color: var(--text-3); }
.picker__row[hidden] { display: none; }

.order-item--pick .order-item__check {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: rgba(20, 21, 31, 0.7);
  border: 1px solid rgba(237, 242, 244, 0.4);
  border-radius: 50%;
  color: transparent;
}

.order-item--pick:has(input:checked) { outline: 2px solid var(--red-500); outline-offset: -2px; }
.order-item--pick:has(input:checked) .order-item__check {
  background: var(--red-500);
  border-color: var(--red-500);
  color: #fff;
}

/* --- Gallery filter bar ---------------------------------------------------------
   Sticks under the header so the categories stay reachable while scrolling a long
   archive. */

.filters--sticky {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  margin-inline: calc(clamp(1rem, 3.5vw, 2.75rem) * -1);
  padding: var(--space-3) clamp(1rem, 3.5vw, 2.75rem);
  background: rgba(27, 29, 43, 0.86);
  backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

@supports not (backdrop-filter: blur(1px)) {
  .filters--sticky { background: var(--ink-800); }
}

/* --- Saving deterrents ----------------------------------------------------------
   Applied to the public pages only: the client area is meant to be downloaded.
   None of this defeats a screenshot, it just stops the casual drag-and-save.
   -------------------------------------------------------------------------------- */

.is-protected img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* A transparent layer sits over each frame, so "save image as" and long-press
   land on an empty element rather than on the photograph. */
.shield {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  background: transparent;
}

.shield--stage {
  position: absolute;
  inset: 0 clamp(3.5rem, 8vw, 7rem);
  z-index: 4;
}

.is-protected .tile__open { cursor: zoom-in; }
