/* ─────────────────────────────────────────────────────────────────
   Shared by the homepage and the gallery pages: typeface, tokens,
   reset, and the navigation layer (.chrome) with its text blocks.
   ───────────────────────────────────────────────────────────────── */

/* ABC Areal by Dinamo, under Dinamo's free fonts licence (licences/ in the repo). Its terms:
   the font files never go in a public repository or anywhere they can be downloaded as files. */
@font-face {
  font-family: "ABC Areal";
  src: url("/fonts/ABCAreal-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "ABC Areal", Arial, sans-serif;
  --inset-x: 1vw;
  --inset-y: 16px;
  --gap: 8px;
  --clearance: max(24px, 2.5vw); /* space between the text blocks and the work */
  --ident-h: 35.8px;             /* name + role: 14 + 2.4 and 15.4 + 4 */
  /* Page insets, kept clear of notches and the home indicator — pages
     run edge to edge (viewport-fit=cover), so images can go full-bleed. */
  --pad-top: max(var(--inset-y), env(safe-area-inset-top));
  --pad-right: max(var(--inset-x), env(safe-area-inset-right));
  --pad-bottom: max(var(--inset-y), env(safe-area-inset-bottom));
  --pad-left: max(var(--inset-x), env(safe-area-inset-left));
  /* Motion: one easing, four durations, on every page. */
  --ease: cubic-bezier(.25, 1, .5, 1);
  --t-state: 150ms;  /* feedback: focus, selection, hover */
  --t-fade: 240ms;   /* things leaving, notes, images arriving */
  --t-page: 220ms;   /* a page arriving: quick, so the half-white frames over a photo are brief */
  --t-move: 520ms;   /* anything that travels */
  /* Colour: the white pages (info, form, mood) follow the system's light or dark mode.
     The slideshow is black either way. */
  color-scheme: light dark;
  --paper: #fff;      /* page ground */
  --ink: #000;        /* text on it */
  --line: #e0e0e0;    /* hairlines, card borders */
  --line-hover: #d3d3d3;
  --wash: #f7f7f7;    /* card hover */
  --hold: #f2f2f2;    /* space held for an image still loading */
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #000;
    --ink: #fff;
    --line: #262626;
    --line-hover: #3a3a3a;
    --wash: #0d0d0d;
    --hold: #111;
  }
}
@media (max-width: 767px) {
  :root { --inset-x: 2.5vw; }
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  font: 14px/1.1 var(--font);
}
p, h1, h2 { margin: 0; }
h1, h2 { font: inherit; } /* real headings for readers; no change to how they look */
a { color: inherit; text-decoration: none; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
}
a, button { touch-action: manipulation; } /* no double-tap zoom on controls */
[hidden] { display: none !important; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }

/* ── Text blocks ────────────────────────────────────────────────── */
/* One line each, always. Line heights are fixed multiples of the font
   size, so the blocks measure the same before and after the font loads. */
.ident, .services { white-space: nowrap; }
.ident-name,
.services-label { line-height: 1; padding-bottom: 2.4px; }
.ident-role,
.services-list  { line-height: 1.1; padding-bottom: 4px; opacity: .5; }
.link           { line-height: 1.1; padding-bottom: 8px; }

/* ── Chrome: the navigation layer ───────────────────────────────── */
/* Fixed over the whole page, blending with difference so it stays
   legible over any image. It passes clicks through except on its own
   controls. Slots: at-tl / at-tc / at-tr (top), at-bl / at-br (bottom). */
.chrome {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  /* minmax(0, …): side columns may shrink below their text, so the
     centre slot stays exactly centred on narrow screens. */
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  padding: var(--pad-top) var(--pad-right) var(--pad-bottom) var(--pad-left);
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}
.chrome a,
.chrome button { pointer-events: auto; }
.at-tl { grid-area: 1 / 1; justify-self: start; align-self: start; }
.at-tc { grid-area: 1 / 2; align-self: start; }
.at-tr { grid-area: 1 / 3; justify-self: end; align-self: start; }
.at-bl { grid-area: 3 / 1; justify-self: start; align-self: end; }
.at-br { grid-area: 3 / 3; justify-self: end; align-self: end; }
