/* Shared pieces every page composes: base, type styles, buttons and links, the grid cell
   system, photos, the name strip, the menu and the footer. Values come from tokens.css. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* The scroll bar is the browser's own, unstyled, light or dark with the visitor's system, as on
   other sites (Luke 11/6: the paper track and pale thumb stood out). Don't color it. */
/* Touch: no double-tap zoom (two quick taps on a link or an svg zoomed the page, which then
   slid sideways under the finger; pinch still zooms) and no gray flash on tap. On every
   element: WebKit doesn't carry it into svg from html alone (ios26 playbook). */
html, html * { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
/* The ground: html's color is what iPhone Safari fills its bars with when it can't show the
   page under them (at the very top, with the menu open) and what shows past either end of the
   page. The body paints the paper as an image, so html's color is the one Safari reads
   (ios26-liquid-glass-bars playbook). js/site.js sets data-ground: walnut while the home hero
   or the footer is at that edge; paper otherwise. A cover that's up sets its own
   (data-overlay: walnut for the menu, paper for the photo viewer). */
html { background-color: var(--paper); }
html[data-ground="walnut"], html[data-overlay="walnut"] { background-color: var(--walnut); }
html[data-overlay="paper"] { background-color: var(--paper); }
html.is-ready { transition: background-color var(--dur) var(--ease-out); }  /* not on load: Safari would fade its bars in from white */
/* Nothing transitions until the page is ready (js/site.js, two frames in). Safari runs transitions
   on load from the page as it was before the stylesheets applied: the closed menu faded out over
   every new page, its links in light text with Safari's bars walnut for half a second, and links
   faded from the default blue (Luke 10/27: "the menu flashes as I change pages"). The appear
   animations and the hero intro keep theirs; they start later anyway. */
html:not(.is-ready) *:not([data-reveal], .word, .hero__media) { transition: none !important; }
/* A cover locks the page without moving it when a mouse's scroll bar would have gone */
html { scrollbar-gutter: stable; }
body {
  margin: 0;
  background: linear-gradient(var(--paper), var(--paper));
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, blockquote, figure { margin: 0; }
:focus-visible { outline: var(--stroke) solid currentColor; outline-offset: 4px; }

.nowrap { white-space: nowrap; }  /* keeps "full-service" from splitting at its hyphen */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 60;
  background: var(--walnut); color: var(--on-walnut); padding: 0.6rem 1rem;
  font-size: var(--text-small); letter-spacing: var(--tracking-small);
}
.skip-link:focus { top: 0.75rem; }

/* ---------- Type styles ----------
   Every piece of text is one of these roles (DESIGN.md, Type). The strip, the menu and the
   footer set their own (nav, menu, footer caps, fine print), in their sections below. */
.display {
  font-family: var(--font-serif);
  font-weight: var(--serif-weight);
  font-size: var(--text-display);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}
.title {
  font-family: var(--font-serif);
  font-weight: var(--serif-weight);
  font-size: var(--text-title);
  line-height: var(--leading-title);
  letter-spacing: var(--tracking-title);
}
/* Quote: a client's words (Client reviews on About), the title's serif and size, its lines a little apart
   so several read easily. Markup: <blockquote class="quote"><p>“…”</p></blockquote> */
.quote {
  font-family: var(--font-serif);
  font-weight: var(--serif-weight);
  font-size: var(--text-title);
  line-height: var(--leading-quote);
  letter-spacing: var(--tracking-title);
  text-wrap: pretty;
}
/* Label: the caps, one style everywhere: eyebrows, captions' names, credentials, form labels,
   credits' roles, the project bar. */
.label {
  font-family: var(--font-sans);
  font-size: var(--text-label);
  font-weight: var(--label-weight);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  line-height: var(--leading-label);
}
/* Small: 14px sentence case: a caption's place, a credit's name, form errors and status. */
.small {
  font-size: var(--text-small);
  line-height: var(--leading-label);
  letter-spacing: var(--tracking-small);
}
/* Byline: a title with a caps label right under it, read as one heading (Luke 10/26): her name
   over Allied Member, ASID on About.
   Markup: <hgroup class="byline"><h1 class="title">…</h1><p class="label">…</p></hgroup> */
.byline { display: grid; gap: var(--stack-xs); margin: 0; }
/* Caption: the label over the small text, in the same ink; the case tells them apart (Erin
   Sander's, Luke 10/26). It hangs a --photo-gap under its photo, the gap between photos.
   Markup: <div class="caption"><h3 class="label">…</h3><p class="small">…</p></div> */
.caption { display: grid; justify-items: start; gap: var(--stack-2xs); margin-top: var(--photo-gap); }
/* Body copy: in ink like everything else (Luke 10/26: no gray body; the smaller size does the
   work). A blank line between paragraphs, as Karia's. */
.prose {
  max-width: var(--measure);
  text-wrap: pretty;
}
.prose p + p { margin-top: 1.25em; }
.prose strong { font-weight: var(--weight-medium); }  /* bold in the CMS's rich text: Medium, the system's heaviest Jost */

/* ---------- Buttons ----------
   One style everywhere (Luke 10/22): a thin square outline, small caps like the eyebrows,
   compact. Hover fills it with ink. Real interior sites (Studio McGee, Lauren Nelson,
   Karia, Chad Dorsey, Maeve) and the luxury refs on Mobbin (Farfetch, YLLW) all sit here;
   the pill, the 48px height and the sentence-case medium weight read as a template. */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--button-h);
  padding: 0 var(--button-pad);
  border: var(--stroke) solid var(--line);  /* the grid's line, so the outline always matches it */
  border-radius: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-button);
  font-weight: var(--button-weight);
  letter-spacing: var(--tracking-button);
  text-transform: uppercase;
  line-height: var(--leading-tight);
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
/* Hover only where there's a pointer to hover with: on a touch screen a tap leaves :hover stuck
   (a button still filled after coming back to the page). Touch gets a press state instead. */
@media (hover: hover) { .btn:hover, .btn:focus-visible { background: var(--ink); border-color: var(--ink); color: var(--paper); } }
.btn:active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn:focus-visible { outline-offset: 3px; }
.btn--small { min-height: var(--button-h-small); padding-inline: calc(var(--button-pad) * 0.85); }
/* On walnut (the phone menu): the same button, inverted. */
.btn--light { border-color: var(--on-walnut); color: var(--on-walnut); }
@media (hover: hover) { .btn--light:hover, .btn--light:focus-visible { background: var(--paper); border-color: var(--paper); color: var(--ink); } }
.btn--light:active { background: var(--paper); border-color: var(--paper); color: var(--ink); }

/* ---------- Arrow ----------
   After Quivira's (Stripe's) hover arrow, drawn in Becky's line. Solid shapes, no hairline
   strokes: the chevron and tail are as thick as Jost Medium's stem (0.12em, measured), so
   the arrow weighs what the letters beside it weigh. At rest only the head shows, a word
   space after the text. On hover the head slides right and the tail fades in behind it,
   attached the whole way. The svg is wide enough for that travel and clips at its left
   edge, so nothing moves outside it and the button never changes width; the button gives
   back that travel room on its right padding so the arrow sits centered at rest.
   Markup (the svg is 0.7em tall, cap height, so 62 units = 0.7em and the 10.6-unit line is 0.12em):
   <svg class="arrow" viewBox="0 0 80 62" aria-hidden="true"><g class="arrow__move"><rect class="arrow__tail" x="-45" y="25.7" width="75.5" height="10.6"/><path class="arrow__head" d="M4.5 5 30.5 31 4.5 57"/></g></svg> */
.arrow {
  flex: none;
  width: 0.903em; height: 0.7em;
  margin-left: 0.42em;           /* a word space plus a point (Luke 10/22: it sat too close) */
  margin-right: -0.45em;         /* the travel room (40 units), given back so the padding stays even */
  overflow: hidden;
}
.arrow__head { fill: none; stroke: currentColor; stroke-width: 10.6; stroke-linejoin: miter; stroke-linecap: butt; }
.arrow__tail { fill: currentColor; opacity: 0; transition: opacity var(--dur-arrow) var(--ease-out); }
.arrow__move { transition: transform var(--dur-arrow) var(--ease-out); }
@media (hover: hover) {
  :is(a, button):is(:hover, :focus-visible) .arrow__move { transform: translateX(40px); }
  :is(a, button):is(:hover, :focus-visible) .arrow__tail { opacity: 1; }
}
/* Pointing back (Back to portfolio): the same arrow mirrored, before the text, so its
   travel room and its gap swap sides. */
.arrow--back { transform: scaleX(-1); margin-left: -0.45em; margin-right: 0.42em; }

/* Outward arrow (↗), after a link that leaves the site (Instagram). The button arrow's head
   (a mitered corner) and its solid line, turned to point up and out; drawn at the weight of
   the text beside it, Jost Regular's stem (0.08em, measured), and a little under cap height so
   it sits on the baseline inside the letters' height. A word space after the text. Static: no
   hover movement (Luke 10/26).
   Markup (62 units = 0.62em, so the 8-unit line is 0.08em): ARROW_OUT in build/layout.mjs, or
   instagram(url) for the Follow on Instagram link. Heavier text sets --arrow-out-stem. */
.arrow-out {
  display: inline-block; vertical-align: baseline;
  width: 0.62em; height: 0.62em;
  margin-left: 0.32em;
  overflow: visible;
}
.arrow-out path { fill: none; stroke: currentColor; stroke-width: var(--arrow-out-stem, 8); stroke-linejoin: miter; stroke-linecap: butt; }
.label { --arrow-out-stem: 10.9; }  /* in the caps label (500: a 0.109em stem) */

/* Arrow button: a bare chevron for sliders (the rail). Static, no animation; the stroke
   matches the text's weight (about 1.5px). */
.arrow-btn {
  display: inline-grid; place-items: center;
  padding: 0.6rem 0.5rem;
  color: var(--ink);
  transition: opacity var(--dur-fast) var(--ease-out);
}
.chevron { width: 0.75rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 5.2; stroke-linejoin: miter; stroke-linecap: butt; }
.arrow-btn--back .chevron { transform: scaleX(-1); }
.arrow-btn:disabled { opacity: 0.22; cursor: default; }

/* Text link: a link in running text or a list on paper (Contact's details, Follow on
   Instagram, the strip's links, the bar's middle) softens to --ink-soft on hover. No
   underline anywhere (Luke 10/22). On walnut the footer lightens its links instead. */
.link, .strip__nav a:not(.btn) { transition: color var(--dur-fast) var(--ease-out); }
@media (hover: hover) { .link:is(:hover, :focus-visible), .strip__nav a:not(.btn):is(:hover, :focus-visible) { color: var(--ink-soft); } }
.link:active { color: var(--ink-soft); }
/* Touch: a link inside a line of text (About's Follow on Instagram, the Privacy page's) reaches 44px
   tall; padding on an inline link never moves the line */
@media (pointer: coarse) { p > .link { padding-block: calc((var(--button-h) - 1lh) / 2); } }

/* ---------- Photo frame ---------- */
.photo { position: relative; overflow: hidden; background: var(--photo-backdrop); }
.photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Project card ----------
   A project's photo with its caption under it, the whole card one link (Erin Sander's): the
   portfolio's tiles and the home page's Recent work rail. On hover a soft paper veil washes over
   the photo, slowly and without a snap (Luke 10/26). The page sets the photo's shape.
   Markup: <a class="project-card" href><div class="photo">img</div><div class="caption">…</div></a> */
.project-card { display: block; }
.project-card .photo::after {
  content: ""; position: absolute; inset: 0;
  background: var(--photo-veil);
  opacity: 0; transition: opacity var(--dur-fade) var(--ease-soft);
}
@media (hover: hover) { .project-card:is(:hover, :focus-visible) .photo::after { opacity: 1; } }
.project-card:active .photo::after { opacity: 1; transition-duration: var(--dur-fast); }  /* touch: the veil as the press */

/* ---------- Grid cell system (Karia) ----------
   A row of two cells divided by hairlines. A text cell holds an eyebrow at the top, the
   title and copy in the middle and its button at the bottom. */
.grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.grid-row + .grid-row { border-top: var(--stroke) solid var(--line); }

/* A ruled section is part of the grid: a line under it, and one over it unless the section
   before is ruled too (its line is already there). Sections can then sit in any order. */
.ruled { border-bottom: var(--stroke) solid var(--line); }
:not(.ruled) + .ruled { border-top: var(--stroke) solid var(--line); }
/* The page's last ruled section stands on the footer, with no line between (Luke 10/26: no
   outline around the footer). Covers a section at the end of main or of its article. */
main > .ruled:last-child, main > :last-child > .ruled:last-child { border-bottom: 0; }
.grid-row > * + * { border-left: var(--stroke) solid var(--line); }
.cell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: start;
  gap: var(--block-gap);  /* eyebrow to title, copy to button: at least 64px at 1440 (Karia's 68 and 73; Luke 10/26: let it breathe) */
  min-height: var(--cell-min-h);
  padding: var(--cell-pad) var(--gutter);  /* sides on the strip's edges, as every page (Luke 10/26) */
}
.cell__body { align-self: center; display: grid; gap: var(--stack-md); }
.cell--photo { display: block; position: relative; padding: 0; }
.cell--photo .photo { position: absolute; inset: 0; }
/* Work with us (build/sections.mjs): the closing row on every page that ends with it (Home,
   Portfolio, About), its text cell on plaster. */
.closing .cell:not(.cell--photo) { background: var(--plaster); }

@media (max-width: 45.99em) {
  .grid-row { grid-template-columns: 1fr; }
  .grid-row > * + * { border-left: 0; border-top: var(--stroke) solid var(--line); }
  .cell { min-height: 0; }
  .cell--photo { padding: 0; }
  /* Phones: every row reads photo, then text, so two photos never stack. */
  .grid-row > .cell--photo { order: -1; border-top: 0; }
  .grid-row > .cell--photo + .cell { border-top: var(--stroke) solid var(--line); }
  .cell--photo .photo { position: relative; aspect-ratio: var(--ratio-row); }
}

/* ---------- Name strip (header) ----------
   Lauren Nelson's strip with her name, on paper; it scrolls away with the page (Luke 10/22:
   no sticking). Home and Portfolio left, the name centered, About and Contact right. */
.strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--gap-x);
  height: var(--strip-h);
  padding-inline: var(--gutter);
  background: var(--paper);
  border-bottom: var(--stroke) solid var(--line);  /* inner pages: the grid's first line, as Karia's header */
}
.strip__nav { display: flex; align-items: center; gap: var(--nav-gap); }
.strip__nav--end { justify-content: flex-end; }
.strip__nav a:not(.btn) { font-size: var(--text-nav); font-weight: var(--nav-weight); padding-block: 0.4rem; }  /* hover: Text link */
/* Touch (an iPad): the strip's links and its small Contact button keep their look but take a
   44px target, reaching past their edges where there's room */
@media (pointer: coarse) {
  .strip .wordmark { padding-block: calc((var(--button-h) - 1lh) / 2); }
  .strip__nav a:not(.btn) { padding-block: 0.75rem; }
  .strip .btn--small { position: relative; }
  .strip .btn--small::after { content: ""; position: absolute; inset: -0.25rem -0.25rem; }
}
/* Over a photo (the home hero, html[data-hero="overlay"], locked Luke 10/26): no ground,
   laid over the top of the page in light text; the hero puts a soft scrim under it. */
[data-hero="overlay"] .strip { position: absolute; inset: 0 0 auto; z-index: 5; background: transparent; border-bottom: 0; color: var(--on-photo); }
@media (hover: hover) { [data-hero="overlay"] .strip__nav a:not(.btn):is(:hover, :focus-visible) { color: var(--on-photo-soft); } }
[data-hero="overlay"] .strip .btn { border-color: var(--on-photo); color: var(--on-photo); }
@media (hover: hover) { [data-hero="overlay"] .strip .btn:is(:hover, :focus-visible) { background: var(--paper); border-color: var(--paper); color: var(--ink); } }

/* Wordmark: her name set in the serif, the logo. One lockup, the strip's and the footer's. */
.wordmark {
  font-family: var(--font-serif);
  font-weight: var(--serif-weight);
  font-size: var(--text-wordmark);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-wordmark);
  text-transform: none;
  white-space: nowrap;
}

/* Menu icon (.burger, BURGER in build/layout.mjs; Luke 10/27: the icon, not the word). Apple's
   (apple.com's phone menu, read from its markup): two lines that become the two strokes of a
   close mark, so nothing is left over to hide. Ours sit on her name's x-height and baseline
   (Gambetta's x-height is 0.45em of the wordmark, measured), in the grid's stroke, as wide as
   twice their gap, Apple's proportion. Opening, they meet in the middle, easing in, then turn,
   easing out; closing, they turn back level, then part. Apple's timing: 0.24s in all,
   --burger-step each half. It's one icon, the strip's, which stays over the open menu: a second
   copy in the menu morphing over it read as lines splitting and fading (Luke 10/27). */
.burger {
  position: relative; display: block;
  font-size: var(--text-wordmark);
  width: 0.9em; height: 0.68em;  /* her name's cap height, so the box centers on the caps */
}
.burger > span {
  position: absolute; left: 0; right: 0; top: 0.455em;  /* halfway between x-height and baseline */
  height: var(--stroke); margin-top: calc(var(--stroke) / -2);
  background: currentColor;
  transition: rotate var(--burger-step) var(--burger-in), translate var(--burger-step) var(--burger-out) var(--burger-step);
}
.burger > span:nth-child(1) { translate: 0 calc(var(--stroke) / 2 - 0.225em); }
.burger > span:nth-child(2) { translate: 0 calc(0.225em - var(--stroke) / 2); }
[aria-expanded="true"] > .burger > span {
  translate: 0 0;
  transition: translate var(--burger-step) var(--burger-in), rotate var(--burger-step) var(--burger-out) var(--burger-step);
}
[aria-expanded="true"] > .burger > span:nth-child(1) { rotate: 45deg; }
[aria-expanded="true"] > .burger > span:nth-child(2) { rotate: -45deg; }
/* The close mark on its own (the photo viewer's Close): always crossed, with nothing to turn back
   into, so it just fades away with its cover (Luke 10/27: closing, it swung open into an arrow) */
.burger.burger--close > span { transition: none; translate: 0 0; }
.burger.burger--close > span:nth-child(1) { rotate: 45deg; }
.burger.burger--close > span:nth-child(2) { rotate: -45deg; }

/* Menu (Close while the menu is up) and the photo viewer's Close: the icon, its tap target 48px
   tall and wider, reaching into the gutter so the icon itself ends on the page's edge */
.menu-toggle, .viewer__close {
  display: inline-grid; place-items: center;
  min-height: 3rem; padding: 0 var(--gutter) 0 1rem; margin-right: calc(var(--gutter) * -1);
  transition: opacity var(--dur-fast) var(--ease-out);
}
:is(.menu-toggle, .viewer__close):active { opacity: 0.6; }
.menu-toggle { display: none; }
@media (max-width: 45.99em) {
  .strip { grid-template-columns: 1fr auto; gap: var(--stack-md); }
  .strip__nav { display: none; }
  .strip .wordmark { grid-column: 1; justify-self: start; }
  .menu-toggle { display: inline-grid; grid-column: 2; justify-self: end; }
}

/* ---------- Cover: a full-screen layer (the menu, the photo viewer) ----------
   Laid on the page, not fixed to the screen. On an iPhone a fixed layer stops at the top of
   Safari's toolbar, so the strip under the toolbar kept showing the page until Safari gave up
   and filled its bars flat (Luke 10/27: the menu's bottom edge showed light page, then snapped
   walnut). On the page, from a bleed above the screen to a bleed below it, Safari draws it under
   both bars and they fade with it (ios26 playbook). js/site.js (cover) puts it where the page is
   scrolled to, holds the page still and sets html's ground to match while it's up.
   Closed it's display: none: a full-screen layer left in the layout, even invisible, flattens
   Safari's bars for the whole visit (playbook, 2a). Its fade is only set while it's shown, so
   nothing runs on load. Each cover adds --cover-bleed to its own top and bottom padding. */
.cover {
  position: absolute; left: 0; right: 0; z-index: 50;
  top: calc(var(--cover-y, 0px) - var(--cover-bleed));
  height: calc(var(--cover-h, 100vh) + 2 * var(--cover-bleed));
  display: none;
  opacity: 0;
  overscroll-behavior: none;
}
.cover.is-shown { display: grid; transition: opacity var(--dur) var(--ease-out); }
.cover.is-open { opacity: 1; }
.cover:focus { outline: none; }
html.is-locked { overflow: hidden; }  /* the page holds still under a cover */

/* ---------- Full-screen menu (phones; Erin Sander's) ----------
   Walnut, html's ground fading to walnut with it. Opening: the icon crosses into Close, then the
   links come in one after another, each rising --menu-rise as it fades in. Closing is one fade.
   The strip stays over it as its top row (Squarespace's and Apple's way): her name and the icon
   keep their place and take the menu's colors as it fades in; its line fades out. */
.menu {
  grid-template-rows: 1fr auto;
  padding: calc(var(--cover-bleed) + var(--strip-h)) var(--gutter) calc(var(--cover-bleed) + var(--block-gap));
  background: var(--walnut); color: var(--on-walnut);
}
/* Her name and the icon change color in one step, when the walnut is halfway in (or out): faded
   across, dark text over a paper turning walnut went gray on gray and vanished for a moment */
.strip { transition: color 0s linear var(--menu-swap), border-color var(--dur) var(--ease-out); }
html:has(.menu.is-shown) .strip { z-index: 51; background: transparent; }
html:not([data-hero="overlay"]):has(.menu.is-shown) .strip { position: relative; }
html:has(.menu.is-open) .strip { color: var(--on-walnut); border-bottom-color: transparent; }

.menu__links { align-self: center; display: grid; justify-items: center; gap: 0.3em; list-style: none; margin: 0; padding: 0; }
.menu__links a { display: block; padding-block: 0.1em; }  /* a tall target each, 50px on a phone */
.menu__links a {
  font-family: var(--font-serif); font-weight: var(--serif-weight);
  font-size: var(--text-menu); line-height: var(--leading-title);
  letter-spacing: var(--tracking-display);
}
.menu__foot { display: grid; justify-items: center; }
.menu.is-open :is(.menu__links li, .menu__foot) { animation: menu-in var(--dur) var(--ease-out) both; }
.menu.is-open .menu__links li:nth-child(2) { animation-delay: var(--menu-stagger); }
.menu.is-open .menu__links li:nth-child(3) { animation-delay: calc(var(--menu-stagger) * 2); }
.menu.is-open .menu__links li:nth-child(4) { animation-delay: calc(var(--menu-stagger) * 3); }
.menu.is-open .menu__foot { animation-delay: calc(var(--menu-stagger) * 4); }
@keyframes menu-in { from { opacity: 0; translate: 0 var(--menu-rise); } }

/* ---------- Photo viewer (js/viewer.js; a project's photos, Luke 10/27) ----------
   A tap on a photo opens it full screen on paper, whole rather than cropped to its frame; the
   others are a swipe (or an arrow, or the arrow keys) away. The strip again on top: the count
   where her name sits, Close where Menu is. On wider screens the arrows sit in the margins
   either side. Phones keep the photo edge to edge (Luke 10/27: no side bands), so the arrows go
   in a row under it, back left and next right on the page's edges, mirroring the count and
   Close above. Each photo fades in once it's loaded. A tap beside the photo, Close or Escape
   closes it. */
.viewer { padding-block: var(--cover-bleed); background: var(--paper); color: var(--ink); }
.viewer > * { grid-area: 1 / 1; }
.viewer__top {
  z-index: 1; align-self: start;
  display: flex; justify-content: space-between; align-items: center;
  height: var(--strip-h); padding-inline: var(--gutter);
}
.viewer__count { font-variant-numeric: tabular-nums; }
.viewer__track {
  display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.viewer__track::-webkit-scrollbar { display: none; }
.viewer__slide { position: relative; flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; cursor: zoom-out; }
.viewer__slide img {
  position: absolute; inset: 0; margin: auto;
  width: auto; height: auto;
  max-width: calc(100% - 2 * var(--viewer-side)); max-height: calc(100% - 2 * var(--strip-h));
  cursor: default;
  opacity: 0; transition: opacity var(--dur-fade) var(--ease-soft);
}
.viewer__slide img.is-loaded { opacity: 1; }
/* 44px targets; the chevron itself ends on the page's edge */
.viewer__step {
  display: inline-grid; z-index: 1;
  width: var(--button-h); height: var(--button-h); padding: 0;
  align-self: end; margin-bottom: calc((var(--strip-h) - var(--button-h)) / 2);
}
.viewer__step--back { justify-self: start; margin-left: calc(var(--gutter) - (var(--button-h) - 0.75rem) / 2); }
.viewer__step--next { justify-self: end; margin-right: calc(var(--gutter) - (var(--button-h) - 0.75rem) / 2); }
@media (min-width: 46em) { .viewer__step { align-self: center; margin-bottom: 0; } }
/* The photo itself is the button that opens it: a clear layer over it, zoom cursor */
.photo__open { position: absolute; inset: 0; width: 100%; cursor: zoom-in; }
.photo__open:focus-visible { outline-color: var(--paper); outline-offset: -0.75rem; }

/* ---------- Footer (Luke 10/22, after Maeve Design Collective's) ----------
   Walnut and a lot of open space. Small caps everywhere but the name: a line about the
   studio top left, Instagram, email and phone top right on its three lines, then the name large at the bottom
   between the page links, in the strip's order (Home, Portfolio | name | About, Contact),
   standing on a full-width line with the fine print under it. No column heads. */
.footer {
  background: var(--walnut); color: var(--on-walnut);
  padding-top: var(--cell-pad);
  font-size: var(--text-label);
  font-weight: var(--footer-weight);
  line-height: var(--leading-footer);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.footer a { transition: color var(--dur-fast) var(--ease-out); }
@media (hover: hover) { .footer a:hover, .footer a:focus-visible { color: var(--paper); } }
.footer a:active { color: var(--paper); }
.footer__top {
  display: flex; justify-content: space-between; align-items: start; gap: var(--stack-lg);
  padding-inline: var(--gutter);
}
.footer__about { max-width: 31ch; }  /* three lines, as Maeve's */
.footer__contact { display: grid; justify-items: end; text-align: right; font-style: normal; }
.footer { --arrow-out-stem: 9.4; }  /* the arrow at the footer caps' weight (450: a 0.094em stem) */
.footer__sign {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--gap-x);
  margin-top: var(--section);  /* open, but not empty (Luke 10/23: a little less) */
  padding: 0 var(--gutter) var(--stack-md);
  border-bottom: var(--stroke) solid var(--line-on-walnut);
}
/* Centered on each other (Luke 10/23): both trimmed to cap height and baseline, so the
   links' caps sit on the name's cap middle, not on its descenders. */
.footer__links { display: flex; gap: var(--nav-gap); }
.footer__links a, .footer__wordmark { text-box: trim-both cap alphabetic; }
.footer__links--end { justify-content: flex-end; }
/* The fine print: the footer's caps at 11px, in the softer walnut text */
.footer__bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--stack-2xs) var(--gap-x);
  padding: var(--stack-md) var(--gutter);
  font-size: var(--text-fine);
  letter-spacing: var(--tracking-label);  /* again, so it's 0.04em of 11px, not the footer's 12.5 */
  color: var(--on-walnut-soft);
}
.footer__fine { display: flex; flex-wrap: wrap; gap: var(--stack-2xs) var(--gap-x); }
.footer__bar p { text-wrap: balance; }  /* on a small phone the credit breaks into two even lines */
/* A short upright line in the footer's line color, centered in the gap between the copyright
   and Privacy (Luke 10/26: the bare gap read empty) */
.footer__fine > * + * { position: relative; }
.footer__fine > * + *::before {
  content: ""; position: absolute; left: calc(var(--gap-x) / -2); top: 50%;
  height: 1em; translate: -50% -50%;
  border-left: var(--stroke) solid var(--line-on-walnut);
  pointer-events: none;
}
/* Phones (the mobile pass, after Maeve's on a phone): one centered column, the desktop's
   symmetry stacked. The about's three lines, the contact lines, her name with the four page
   links in one row under it, the line, the fine print. Tablets keep the desktop footer. */
@media (max-width: 45.99em) {
  .footer { padding-top: var(--section); text-align: center; }
  .footer__top { flex-direction: column; align-items: center; gap: var(--stack-lg); }
  .footer__contact { justify-items: center; text-align: center; }
  .footer__sign { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--stack-md) var(--nav-gap); margin-top: var(--section); }
  .footer__wordmark { flex-basis: 100%; order: -1; }
  .footer__bar, .footer__fine { justify-content: center; }
}
/* Touch: the footer's small links get taller targets without moving the type. The page links and
   her name are trimmed to cap height, so they reach a whole 44px (--button-h) past their caps. On
   phones the contact lines stack with a little room between them, so one's target never covers
   the next one's letters (they touched before: a tap low on Instagram opened the email). */
@media (pointer: coarse) {
  .footer__contact a, .footer__bar a { padding-block: 0.6rem; margin-block: -0.6rem; }
  .footer__links a, .footer__wordmark { padding-block: calc((var(--button-h) - 1cap) / 2); margin-block: calc((var(--button-h) - 1cap) / -2); }
}
@media (pointer: coarse) and (max-width: 45.99em) { .footer__contact { row-gap: var(--stack-sm); } }

/* ---------- Appear (js/reveal.js, Luke 10/26) ----------
   Erin Sander's fade: opacity only, --reveal-dur on --reveal-ease, once. Only photos and project
   cards ([data-reveal]), the home statement word by word and a review line by line ([data-reveal-text]); text, the strip and the
   footer never move. Hidden only under html.reveal, which the head script sets when motion is
   allowed. The home hero's intro is home.css.
   Words fade their colour, not their opacity (Luke 11/9: a review's lines jittered as they came
   in): Safari lifts each word fading by opacity onto its own layer and drops it back when done,
   and the text moved a device pixel each time (measured in the iPhone sim: ~1px on 3 of 4
   frames). A colour fade looks the same and is painted in place. */
.reveal [data-reveal]:not(.is-in) { opacity: 0; }
.reveal [data-reveal].is-in { transition: opacity var(--reveal-dur) var(--reveal-ease) var(--reveal-delay, 0ms); }
.reveal [data-reveal-text]:not(.is-split) { opacity: 0; }
.reveal [data-reveal-text]:not(.is-in) .word { color: transparent; }
.reveal [data-reveal-text].is-in .word { transition: color var(--reveal-dur) var(--reveal-ease) calc(var(--i, 0) * var(--reveal-word-stagger)); }
/* Line by line (a review): every word of a line shares its line's delay, and it's quicker */
.reveal [data-reveal-text="lines"].is-in .word { transition: color var(--reveal-line-dur) var(--reveal-ease) calc(var(--i, 0) * var(--reveal-line-stagger)); }

/* ---------- Reduced motion ----------
   Nothing appears or moves in (html.reveal is never set), and what's left is instant. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
