/* ------------------------------------------------------------------
   March2Wolf — site layout and components
   ------------------------------------------------------------------ */

/* --- decorative contour texture ------------------------------------ */

.topo {
  position: relative;
  isolation: isolate;
}

.topo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='320' viewBox='0 0 520 320'%3E%3Cg fill='none' stroke='%23f1efea' stroke-opacity='0.055' stroke-width='1'%3E%3Cpath d='M-20 60C80 20 180 92 260 60s180-56 280-16'/%3E%3Cpath d='M-20 104C80 64 180 136 260 104s180-56 280-16'/%3E%3Cpath d='M-20 150C80 110 180 182 260 150s180-56 280-16'/%3E%3Cpath d='M-20 198C80 158 180 230 260 198s180-56 280-16'/%3E%3Cpath d='M-20 248C80 208 180 280 260 248s180-56 280-16'/%3E%3Cpath d='M-20 300C80 260 180 332 260 300s180-56 280-16'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 520px 320px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 10%, transparent 75%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 10%, transparent 75%);
}

/* ==================================================================
   Header
   ================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(13, 16, 18, 0.82), rgba(13, 16, 18, 0.58));
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(13, 16, 18, 0.92);
  box-shadow: 0 1px 0 var(--line), 0 12px 28px -24px rgba(0, 0, 0, 0.9);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-sm);
  height: var(--header-h);
  transition: height 0.3s var(--ease);
}

.site-header.is-scrolled .header-inner {
  height: var(--header-h-compact);
}

/* The trail motif: the road seen from the side, running under the bar.
   One continuous band stretched to the full width — tiling it would put
   a visible join every few hundred pixels. The drawing lives in
   assets/path-header.svg because a file can be edited; a data URI
   cannot. */
.header-trail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26px;
  pointer-events: none;
  background-image: url("../assets/path-header.svg");
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 100% 100%;
  opacity: 0.95;
  transition: height 0.3s var(--ease), opacity 0.3s var(--ease);
}

/* Once the page has moved it steps back, so it never competes with what
   is being read. */
.site-header.is-scrolled .header-trail {
  height: 20px;
  opacity: 0.72;
}

/* Left — menu */

.header-left {
  justify-self: start;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.85rem 0.5rem 0.6rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  color: var(--fog-300);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.menu-toggle:hover {
  color: var(--fog-100);
  border-color: var(--line-strong);
}

.menu-bars {
  display: grid;
  gap: 4px;
  width: 18px;
}

.menu-bars span {
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s var(--ease), width 0.25s var(--ease);
}

.menu-bars span:nth-child(2) { width: 13px; }
.menu-bars span:nth-child(3) { width: 16px; }

.menu-toggle:hover .menu-bars span:nth-child(2) { width: 18px; }
.menu-toggle:hover .menu-bars span:nth-child(3) { width: 18px; }

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

/* Centre — nav with the logo at its middle */

.header-centre {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.4vw, 2rem);
}

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

.header-link {
  position: relative;
  padding: 0.35rem 0.15rem;
  color: var(--fog-500);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}

.header-link:hover {
  color: var(--fog-100);
}

/* Home never leaves the bar — the current page is marked instead, so
   the header stays identical from page to page. */
.header-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--bronze);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.header-link[aria-current="page"] {
  color: var(--fog-100);
}

.header-link[aria-current="page"]::after {
  opacity: 1;
  transform: scale(1);
}

.header-logo {
  display: block;
  line-height: 0;
  border-radius: var(--r-sm);
}

.header-logo img {
  width: auto;
  height: 2.25rem;
  transition: height 0.3s var(--ease);
}

.site-header.is-scrolled .header-logo img {
  height: 1.85rem;
}

/* Right — account and cart appear only when those systems are live */

.header-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--fog-500);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.icon-btn:hover {
  color: var(--fog-100);
  border-color: var(--line-strong);
}

.icon-btn svg {
  width: 1.15rem;
  height: 1.15rem;
}

@media (min-width: 60rem) {
  .header-nav {
    display: flex;
  }

  .menu-toggle-label {
    display: inline;
  }
}

/* ==================================================================
   Menu drawer
   ================================================================== */

.menu-panel {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: rgba(10, 13, 15, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}

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

.menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.menu-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
  padding-block: var(--space-lg);
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.menu-item {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.menu-panel.is-open .menu-item {
  opacity: 1;
  transform: none;
}

.menu-link {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--fog-100);
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 6vw, 3.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-decoration: none;
  transition: color 0.25s var(--ease), padding-left 0.3s var(--ease);
}

.menu-link:hover,
.menu-link:focus-visible {
  color: var(--bronze-bright);
  padding-left: 0.6rem;
}

.menu-link[aria-current="page"] {
  color: var(--bronze);
}

.menu-index {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--fog-700);
}

.menu-item-soon .menu-link {
  color: var(--fog-700);
  cursor: default;
  pointer-events: none;
}

.menu-note {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fog-700);
  align-self: center;
}

.menu-foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-md);
  border-top: 1px solid var(--line);
  color: var(--fog-500);
  font-size: var(--step-small);
}

/* ==================================================================
   Page shells
   ================================================================== */

.site-main {
  position: relative;
  padding-top: var(--header-h);
}

.site-main-flush {
  padding-top: 0;
}

.page-head {
  position: relative;
  padding-block: clamp(3.5rem, 9vw, 6rem) var(--space-xl);
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  max-width: 18ch;
}

.page-head .lead {
  margin-top: var(--space-md);
}

/* ==================================================================
   The ground, on every page except the homepage
   ================================================================== */

/* The homepage is built around the road and draws its own. Every other
   page only needs the ground the road runs over: brick down one side,
   poured floor down the other, and the joint between them carrying on
   the whole way down.

   It is deliberately far quieter than the homepage floor. There the
   words sit on panels; here they sit straight on the ground, so the
   materials are dropped to a fifth of their strength and the joint to
   half. It should read as a surface the page is resting on, not as
   something competing with the reading. */
body[data-ground] {
  position: relative;
  --ground-x: 50%;
}

body[data-ground] .site-main,
body[data-ground] .site-footer {
  position: relative;
  z-index: 1;
}

.ground {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ground-cobble,
.ground-slab,
.ground-seam,
.ground-fall {
  position: absolute;
  top: 0;
  bottom: 0;
}

/* Anchored to the edge it meets, so the course that reaches the joint
   is a whole one however wide the window is. */
.ground-cobble {
  left: 0;
  right: calc(100% - var(--ground-x));
  background: url("../assets/floor-cobble.webp") right top / 15rem auto repeat;
  opacity: 0.2;
}

.ground-slab {
  left: var(--ground-x);
  right: 0;
  background: url("../assets/floor-slab.webp") left top / 20rem auto repeat;
  opacity: 0.2;
}

/* The same fine joint the homepage has where its road has branched
   away -- a line in the metal, not a route. Thinner here, and without
   the glow, because on these pages it passes behind the words. */
.ground-seam {
  left: var(--ground-x);
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #2b1d10, #caa15f 38%, #f0d49a 50%, #caa15f 62%, #2b1d10);
  opacity: 0.45;
}

/* The light falls off down the page, the same way it does at home. */
.ground-fall {
  left: 0;
  right: 0;
  background: linear-gradient(
    180deg,
    rgba(13, 16, 18, 0) 0%,
    rgba(13, 16, 18, 0.35) 55%,
    rgba(13, 16, 18, 0.6) 100%
  );
}

/* Too narrow for a joint down the middle to be anything but a line
   through the middle of a sentence, so it moves to the margin -- the
   same place the homepage puts its road at this width. */
@media (max-width: 61.99rem) {
  body[data-ground] {
    --ground-x: calc(var(--gutter) + 32px);
  }
}

@media (max-width: 47.99rem) {
  body[data-ground] {
    --ground-x: calc(var(--gutter) + 20px);
  }
}

/* Down the middle the joint passes behind the words and under the
   panels, and reads as ground. In the margin it does neither: it lands
   a few millimetres inside the text and draws a gold line through the
   first word or two of every heading, which reads as a mistake rather
   than as a surface. So at these widths the page steps aside for it and
   starts after it, the way the homepage keeps its content clear of the
   road running up the same side. The joint becomes a rule down the
   margin, everything is squarely to the right of it, and nothing has a
   line through it. Panels come along for free: they are measured from
   the same edge the words are. */
@media (max-width: 61.99rem) {
  body[data-ground] .site-main {
    padding-left: calc(var(--ground-x) - var(--gutter) + 0.9rem);
  }
}

/* Above that the joint is back in the middle of the page, where it does
   cross the reading. It has to stay — two surfaces have to meet
   somewhere — but in the margin it is a rule and here it is only a
   joint, so it drops to about half its weight. Enough to see where the
   brick ends; not enough to read as a line struck through a sentence. */
@media (min-width: 62rem) {
  body[data-ground] .ground-seam {
    opacity: 0.22;
  }
}

/* ==================================================================
   Home — the floor
   ================================================================== */

/* Below the hero the camera tips down and the ground is all there is:
   the cobbled road on one side, the poured workshop floor on the other,
   and the gold walking path laid between them, straight down the middle
   of the page.

   The three materials are cut from the 9 October path drafts and made
   to repeat without a seam (see the note in assets/). The drafts are
   lit renders, so the lighting was taken out of the tiles and is put
   back here as gradients instead — a lamp baked into a tile prints
   itself down the page every few hundred pixels.

   The two surfaces meet at the middle of the page and the path lies on
   top of them, which is how an inlay actually works and means the path
   can change width, or stop at the crossroads, without leaving a gap. */

/* The road is measured against the whole page, not the main content,
   so it runs on behind the footer as well. */
body[data-page="home"] {
  position: relative;
}

body[data-page="home"] .site-main,
body[data-page="home"] .site-footer {
  position: relative;
  z-index: 1;
}

/* The footer brings its own ground now — the trail map — so the road
   no longer shows through it here. */

/* Shared by the floor and by the trail above it: the stops have to
   know how wide the path is to know how far their spurs must reach. */
body[data-page="home"] {
  --path-w: clamp(3.75rem, 6.4vw, 7rem);
  --path-wide: clamp(7.5rem, 15vw, 17rem);
  /* The corner the road turns where it meets the threshold is a quarter
     circle, so its height is its reach. One number sets both. */
  --taper-h: calc((var(--path-wide) - var(--path-w)) / 2);
  /* How far a stop stands back from the middle of the page. */
  --trail-gap: 76px;
  /* Where the path runs. It follows the trail prints, so on a screen
     too narrow for a stop either side it moves to the left margin with
     them rather than staying in the middle on its own. */
  --path-x: 50%;
  /* One scale for every piece of this metal on the page, so the path,
     the plaza and the branches are plainly the same surface. */
  --gold-tile: 13rem;
  /* The last stretch of road before the crossroads, which is where it
     swings across to the plaza on a narrow screen. */
  --bend-h: clamp(5rem, 11vw, 9rem);
  /* How far each piece of road runs on under the next thing, so no cut
     end of it is ever left showing. */
  --road-tuck: 8px;
}

/* The line the hero stops at: the same metal as the path, laid across
   the page. The road comes through it and carries on down. */
.floor-threshold {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    180deg,
    #2b1d10 0%,
    #f0d49a 34%,
    #caa15f 64%,
    #2b1d10 100%
  );
  box-shadow: 0 0 22px rgba(214, 166, 96, 0.3), 0 1px 0 rgba(13, 16, 18, 0.8);
}

.floor {
  position: absolute;
  left: 0;
  right: 0;
  /* Set from the artwork's real height in js/home.js, so the ground
     starts under the lower part of the picture and the two meet in the
     fade rather than at a line. The fallbacks only cover the moment
     before that runs. */
  top: var(--floor-top, 62vh);
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.floor-cobble,
.floor-slab,
.floor-seam,
.floor-approach,
.floor-bend,
.floor-path {
  position: absolute;
}

/* The two surfaces meet in the middle, under the path. */
.floor-cobble {
  top: 0;
  bottom: 0;
  left: 0;
  right: calc(100% - var(--path-x));
  /* Anchored to its right edge so the course that meets the path is a
     whole one however wide the window is. */
  background: url("../assets/floor-cobble.webp") right top / 15rem auto repeat;
}

.floor-slab {
  top: 0;
  bottom: 0;
  left: var(--path-x);
  right: 0;
  background: url("../assets/floor-slab.webp") left top / 20rem auto repeat;
}

/* Where the path has branched away, this is all that keeps the two
   materials apart: a fine straight joint in the same metal, so they do
   not run into each other. It is a material joint and not a route, so
   it has no end cap and goes nowhere. */
.floor-seam {
  top: 0;
  bottom: 0;
  left: var(--path-x);
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #2b1d10, #caa15f 38%, #f0d49a 50%, #caa15f 62%, #2b1d10);
  box-shadow: 0 0 14px rgba(214, 166, 96, 0.22);
}

/* The broad end, narrowing. It is drawn rather than tiled because the
   shape changes the whole way down; the keylines use a stroke that does
   not scale with it, so they stay the same weight as the ribbon's. */
.floor-approach {
  top: 0;
  left: var(--path-x);
  width: var(--path-wide);
  height: var(--taper-h);
  transform: translateX(-50%);
}

/* The swing into the crossroads. It spans the page rather than the
   road, because on a narrow screen the two ends are nowhere near each
   other; js/home.js draws the road inside it from the measured
   positions of the ribbon above and the plaza below. */
.floor-bend {
  left: 0;
  right: 0;
  top: calc(var(--path-h, 50vh) - var(--bend-h) + var(--road-tuck));
  height: var(--bend-h);
}

.road-svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Drawn at its true size, so these are plain strokes, and they stand
   exactly where the ribbon's own edges do: the keyline across the first
   pixel and a half and the bevel across the next. js/home.js holds each
   one that far in from the wall whatever the road is doing, so they
   arrive at the handover already lined up.

   Everything softer than these two -- the shade the metal throws inside
   its own kerb, the sheen off the middle -- is part of the cross-section
   instead, and the cross-section is measured in shares of the road's
   width rather than in pixels. That is what lets the narrowing section
   carry the same one: a share stays a share however wide the road is,
   so every band of it lands on its own stop at the handover.

   Each is two open lines rather than one closed outline. An outline
   would also draw a keyline across the mouth and another across the
   handover, which is the one seam the road must not have. */
.road-bevel {
  stroke: rgba(255, 238, 198, 0.52);
  stroke-width: 1.5;
}

.road-edge {
  stroke: #2b1d10;
  stroke-width: 1.5;
}

/* The steady run.

   The edges are drawn here rather than carried in the picture. Baking
   them in meant they came out slightly different on the left and the
   right, and they stretched by a different amount from the grain when
   the path changed width. Drawn in CSS they are exactly symmetrical,
   exactly as sharp at any size, and the picture underneath is then only
   a piece of metal — which tiles at its own scale, so there is nothing
   left to see a repeat in. It is the same tile as the plaza at the same
   size, so the two read as one surface. */
.floor-path {
  top: var(--taper-h);
  left: var(--path-x);
  width: var(--path-w);
  /* js/home.js measures where the crossroads begins; the last stretch
     of the way there belongs to the bend. */
  height: calc(var(--path-h, 50vh) - var(--taper-h) - var(--bend-h) + var(--road-tuck));
  transform: translateX(-50%);
  background:
    /* The cross-section of a lit metal inlay: dark at the kerb, a bevel
       catching the light, a fall into shadow, the specular band off
       centre, and the same again the other way. The tile underneath is
       deliberately even so that it can repeat for ever; all of the
       light on the path is here, which is why it does not repeat with
       it. */
    linear-gradient(
      90deg,
      rgba(36, 18, 0, 0.8) 0%,
      rgba(36, 18, 0, 0.46) 4%,
      rgba(36, 18, 0, 0.16) 12%,
      rgba(255, 230, 175, 0.1) 26%,
      rgba(255, 236, 185, 0.26) 41%,
      rgba(255, 240, 196, 0.1) 54%,
      rgba(36, 18, 0, 0.12) 68%,
      rgba(255, 226, 160, 0.1) 80%,
      rgba(36, 18, 0, 0.44) 92%,
      rgba(36, 18, 0, 0.8) 100%
    ),
    url("../assets/floor-gold.webp") center top / var(--gold-tile) auto repeat;
  /* Only the bevel, and only sideways. The shade used to be a blurred
     inset either side, and a blurred inset has no idea which edge it was
     meant for: it drew itself along the top and the bottom of the ribbon
     as well, which put a dark bar straight across the road at the very
     place the two halves hand over. It is a stop in the cross-section
     now, where it narrows with everything else. */
  box-shadow:
    inset 1.5px 0 0 rgba(255, 238, 198, 0.52),
    inset -1.5px 0 0 rgba(255, 238, 198, 0.52);
  border-inline: 1.5px solid #2b1d10;
}

/* The light the metal throws onto the ground either side of it. One
   glow for the whole road: given to the two pieces separately, each
   threw its own onto the other and lit a band across the handover. */
.floor-road {
  position: absolute;
  inset: 0;
  filter: drop-shadow(0 0 22px rgba(214, 160, 78, 0.16));
}

/* The light falls off the further down you go, the way it would if you
   were walking away from the room you just left. */
.floor-fall {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(13, 16, 18, 0) 0%,
    rgba(13, 16, 18, 0.3) 45%,
    rgba(13, 16, 18, 0.46) 100%
  );
}

/* Narrow screens: the road stays down the middle, but the path itself
   is drawn narrower so there is still some of each surface either side
   of it. The trail prints keep to the left margin at this width, which
   is the existing layout — the floor is the ground they are walking on,
   not a rail they have to sit on. */
@media (max-width: 61.99rem) {
  body[data-page="home"] {
    --path-w: clamp(2.75rem, 9vw, 4.5rem);
    /* Never wider than the margin it has to open into, or the apron
       runs off the side of the page instead of opening onto it. */
    --path-wide: min(clamp(5rem, 18vw, 9.5rem), calc((var(--path-x) - 6px) * 2));
    /* The middle of the trail rail, which is where the prints walk at
       this width. Following the trail should mean the same thing on a
       phone as it does on a desktop, so the road moves with them. It
       costs most of the cobbles on the left, which is the right trade:
       the path matters, the kerb does not. */
    --path-x: calc(var(--gutter) + 32px);
  }
}

@media (max-width: 47.99rem) {
  body[data-page="home"] {
    --path-x: calc(var(--gutter) + 20px);
  }
}

/* ==================================================================
   Home — hero
   ================================================================== */

/* The approved panorama is shown whole rather than cropped, because all
   three rooms have to stay visible: hovering each one lights it. The
   artwork sits as a band across a full-height section, and the colours
   sampled from its own top and bottom edges carry on above and below it,
   so there is no visible join and no black bars. */
/* The artwork sits at the top at its own shape, nothing cropped, and
   the section is exactly as tall as the picture plus a strip of floor
   below it. That strip is a fixed height, so the first steps and the
   cue always have room however wide the window is — which is what went
   wrong before: the picture gets shorter as the window narrows, the
   wordmark over it does not, and everything ended up on top of
   everything else. */
.hero {
  position: relative;
  z-index: 1;
  /* How tall the picture has ended up. js/home.js measures it and
     writes it here; the formula is the artwork's own shape and only
     stands in until that runs. */
  --art-h: calc(100vw / 2.4);
  --strip: 16rem;
  --cue-gap: clamp(1.5rem, 4vw, 2.75rem);
  min-height: calc(var(--art-h) + var(--strip));
  overflow: hidden;
}

.hero-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

/* As wide as it can be without growing taller than the room available,
   so the whole scene is always on screen. Every light and pawprint below
   is placed as a percentage of this box, which is exactly the picture. */
/* The picture and the rooms laid over it share this box, so every lamp
   and room below can be given in percentages of the artwork and stay
   put at any width. */
.hero-figure,
.hero-rooms {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 1942 / 809;
}

/* The picture ends at its own edge, under a drawn threshold, instead of
   dissolving into the ground below it.

   It was faded out before, on the idea that the photographed floor
   could become the drawn one with no join. It cannot: they are two
   different pictures at two different angles, and blending them only
   made the join soft instead of hiding it. A clean edge with a line
   across it is honest about that, and reads as a deliberate frame —
   the scene above, the plan of the ground below. */
.hero-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(13, 16, 18, 0) 62%,
    rgba(13, 16, 18, 0.3) 86%,
    rgba(13, 16, 18, 0.55) 100%
  );
}

.hero-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Stands in for the picture while it loads, and fades out with it. */
  background: #1b1714;
}

/* Darkens the middle just enough to read the logo over it, while leaving
   the village and the workshop at either side at full brightness. */
.hero-scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    62% 52% at 50% 44%,
    rgba(13, 16, 18, 0.76) 0%,
    rgba(13, 16, 18, 0.46) 46%,
    rgba(13, 16, 18, 0) 78%
  );
}

/* --- the rooms, and the light in them ------------------------------- */

/* Pointing at a room switches on the fittings inside it: the lantern,
   the screens, the bench lamp. Each is a small pool of light laid over
   the picture where that fitting actually is. The room itself is left
   exactly as painted, so nothing is washed out and no detail is lost. */
.hero-lamp {
  position: absolute;
  left: var(--lx);
  top: var(--ly);
  width: var(--ls);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(0.72);
  border-radius: 50%;
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  will-change: opacity, transform;
}

.hero-lamp-warm {
  background: radial-gradient(
    closest-side,
    rgba(255, 226, 170, 0.8) 0%,
    rgba(255, 196, 120, 0.34) 26%,
    rgba(255, 174, 96, 0.11) 52%,
    rgba(255, 170, 90, 0) 78%
  );
}

.hero-lamp-cool {
  background: radial-gradient(
    closest-side,
    rgba(206, 232, 255, 0.68) 0%,
    rgba(158, 204, 255, 0.28) 28%,
    rgba(136, 188, 255, 0.09) 54%,
    rgba(130, 185, 255, 0) 80%
  );
}

/* The areas the pointer can be in. They carry no appearance of their own. */
.hero-room {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--rx);
  width: var(--rw);
  pointer-events: auto;
}

/* Which room is lit is marked on the scene by js/home.js, which only
   does so for a real pointer: a phone and a trackpad-less touch screen
   keep the scene as painted. This was written as :has(… :hover) to
   begin with, which left whether the lamps came on resting on the
   browser restyling one branch of the scene when the pointer moved
   over another. Naming the lit room outright is a few lines more and
   leaves nothing to chance. */
.hero-scene[data-lit="books"] .hero-lamp[data-room="books"],
.hero-scene[data-lit="studio"] .hero-lamp[data-room="studio"],
.hero-scene[data-lit="shop"] .hero-lamp[data-room="shop"] {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

/* --- the first few steps -------------------------------------------- */

/* Two or three prints pressed into the golden path, walking towards the
   viewer and down to the cue. They sit on the strip of floor below the
   artwork rather than on the artwork itself: the picture keeps its own
   shape as the window narrows, while the wordmark above it does not, so
   anything pinned to the picture ends up across the words. Here they
   are measured from the bottom of the hero, where there is always room.
   They land once, on arrival, and stay — the trail further down the
   page carries on from where the last one falls. */
.hero-paws {
  position: absolute;
  left: 0;
  width: 100%;
  bottom: calc(var(--cue-gap) + 8rem);
  height: 6.5rem;
}
.hero-paw {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(34px * var(--s, 1));
  height: calc(34px * var(--s, 1));
  margin: calc(-17px * var(--s, 1)) 0 0 calc(-17px * var(--s, 1));
  color: #ffe3b8;
  opacity: 0;
  transform: rotate(var(--r, 180deg)) scale(0.8);
  filter: drop-shadow(0 1px 3px rgba(60, 28, 0, 0.85))
    drop-shadow(0 0 14px rgba(255, 190, 120, 0.45));
  animation: heroPaw 0.7s var(--ease) var(--delay, 0s) forwards;
}

.hero-paw svg {
  display: block;
  width: 100%;
  height: 100%;
}

@keyframes heroPaw {
  to {
    opacity: 0.95;
    transform: rotate(var(--r, 180deg)) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-paw {
    animation: none;
    opacity: 0.95;
    transform: rotate(var(--r, 180deg)) scale(1);
  }
}

/* Narrow screens cannot show a picture this wide without it becoming a
   strip, and they get the static hero anyway, so there it fills the
   section and is cropped around the studio instead. */
@media (max-width: 59.99rem) {
  .hero {
    min-height: 100svh;
  }

  /* Shown whole, the panorama would be a 150px strip across the top of
     a phone. Here it is given a fixed share of the screen and cropped
     around the studio instead, and the floor takes the rest. */
  .hero-figure {
    aspect-ratio: auto;
    height: 64%;
  }

  .hero-art {
    object-position: 56% 50%;
  }

  .hero-scrim {
    background: radial-gradient(
      96% 62% at 50% 44%,
      rgba(13, 16, 18, 0.82) 0%,
      rgba(13, 16, 18, 0.6) 50%,
      rgba(13, 16, 18, 0.42) 100%
    );
  }

  .hero-paws,
  .hero-rooms {
    display: none;
  }
}

/* Centred on the artwork rather than on the section, so it keeps its
   place over the scene whatever shape the picture takes, and leaves the
   strip of floor below it clear for the steps and the cue. */
.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--art-h) * 0.56);
  transform: translateY(-50%);
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* It sits over the middle of the picture. Nothing in it is clickable,
     so the pointer passes through to the room beneath and the studio
     still lights up when the pointer is over it. */
  pointer-events: none;
}

.hero-logo {
  width: min(280px, 62vw);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.55));
}

/* Wide enough to show the picture whole: there the wordmark is sized
   against the artwork, so the two shrink together and the words never
   outgrow the scene they are standing in. */
@media (min-width: 60rem) {
  .hero-logo {
    width: clamp(10rem, 17.5vw, 290px);
    margin-bottom: clamp(0.8rem, 2.2vw, 2.1rem);
  }
}

.hero-tagline {
  font-size: var(--step-h1);
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.5);
}

.hero-supporting {
  max-width: 34ch;
  margin-inline: auto;
  color: #e8e2d8;
  font-size: var(--step-lead);
  line-height: 1.5;
  text-shadow: 0 2px 16px rgba(13, 16, 18, 0.85), 0 1px 3px rgba(13, 16, 18, 0.7);
}

/* It sits over the golden road, which is the brightest thing in the
   picture, so it carries its own pool of shade rather than relying on
   the artwork being dark behind it. */
.hero-cue {
  position: absolute;
  left: 50%;
  bottom: var(--cue-gap);
  z-index: 1;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1.6rem 0.9rem;
  color: #f6ecdc;
  font-size: 0.8rem;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(13, 16, 18, 0.95), 0 2px 12px rgba(13, 16, 18, 0.8),
    0 0 28px rgba(13, 16, 18, 0.6);
  transition: color 0.25s var(--ease);
}

.hero-cue:hover {
  color: #ffffff;
}

/* Letter-spaced small caps measure wider than they look; on a phone the
   two words would otherwise break across lines. */
.hero-cue > span:first-child {
  white-space: nowrap;
}

.hero-cue-line {
  width: 1px;
  height: 3rem;
  background: linear-gradient(180deg, transparent, var(--bronze));
  position: relative;
  overflow: hidden;
}

.hero-cue-line::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: -100%;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--fog-100));
  animation: cue 2.6s var(--ease) infinite;
}

@keyframes cue {
  0%   { transform: translateY(0); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translateY(200%); opacity: 0; }
}

/* ==================================================================
   Home — the trail
   ================================================================== */

.trail {
  position: relative;
  z-index: 1;
  padding-block: var(--space-2xl) var(--space-xl);
}

.trail-inner {
  position: relative;
}

.trail-rail {
  position: absolute;
  left: var(--gutter);
  top: 0;
  bottom: 0;
  width: 40px;
  pointer-events: none;
  z-index: 0;
}

/* Geometry the prints are placed along. Nothing in it is painted. */
.trail-guide {
  display: block;
  width: 100%;
  height: 100%;
}

/* A print that has cooled. It keeps the bronze it always had, which is
   almost exactly as bright as the metal it is lying on -- so what makes
   it readable on the road is not the fill but the shadow beneath it.
   The mark is pressed into the surface rather than painted onto it,
   which is also how it stays readable on the cobbles either side. */
.trail-print {
  position: absolute;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  color: var(--bronze);
  opacity: 0;
  transform: rotate(var(--rot, 180deg)) scale(calc(var(--size, 1) * 0.82));
  filter: drop-shadow(0 1px 2px rgba(60, 28, 0, 0.85))
    drop-shadow(0 0 10px rgba(255, 190, 120, 0));
  /* Landing is staggered foot by foot, so js/home.js hands that delay
     in. Cooling is not: a print starts going cold the moment the next
     one lands. Both shadows are named in both states, because a filter
     only fades into another filter built the same way -- leave the glow
     out of this one and it would switch on rather than warm up. */
  transition: opacity 0.38s var(--ease) var(--land-delay, 0ms),
    transform 0.38s var(--ease) var(--land-delay, 0ms),
    color 0.5s var(--ease), filter 0.5s var(--ease);
}

.trail-print svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Pressed in. A print stays where it was laid down, and lifts again
   only if the reader scrolls back above it. */
.trail-print.is-down {
  opacity: 0.82;
  transform: rotate(var(--rot, 180deg)) scale(var(--size, 1));
}

/* The last footfall, still warm. It cools to the bronze above as soon
   as the next foot lands, which is what makes the walk read as someone
   moving ahead of the reader rather than as a row of marks appearing.
   It has to come after .is-down to outrank it on opacity. */
.trail-print.is-fresh {
  color: #ffe3b8;
  opacity: 1;
  filter: drop-shadow(0 1px 2px rgba(60, 28, 0, 0.9))
    drop-shadow(0 0 10px rgba(255, 190, 120, 0.5));
}

.trail-stops {
  position: relative;
  z-index: 1;
  margin-left: 72px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3xl);
}

/* The stops stand on the ground now, so they get a panel of their own:
   dark enough to read against cobbles or poured resin, trimmed on the
   edge the path is on, and joined to it by a short spur in the same
   metal. The trim and the spur are what stop them reading as text that
   happens to be lying near a road. */
.trail-stop {
  position: relative;
  max-width: 44rem;
  padding: clamp(1.1rem, 2.4vw, 1.6rem) clamp(1.1rem, 2.6vw, 1.75rem);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(14, 17, 19, 0.74), rgba(14, 17, 19, 0.86));
  border: 1px solid rgba(185, 139, 94, 0.18);
}

.trail-stop h2 {
  margin-bottom: var(--space-md);
}

.trail-stop .lead {
  margin-bottom: var(--space-md);
}

@media (min-width: 48rem) {
  .trail-rail {
    width: 64px;
  }

  .trail-stops {
    margin-left: 116px;
  }
}

/* Wide enough for the walk to come down the middle of the page with a
   stop either side of it. Narrower than this and the prints would fall
   behind the words, so the walk keeps to the left margin instead. */
@media (min-width: 62rem) {
  .trail-rail {
    left: 50%;
    width: 96px;
    transform: translateX(-50%);
  }

  .trail-stops {
    margin-left: 0;
    gap: var(--space-2xl);
  }

  .trail-stop {
    width: calc(50% - var(--trail-gap));
    max-width: 32rem;
  }

  .trail-stop:nth-child(even) {
    align-self: flex-end;
  }

  /* The edge facing the path, lit where the spur arrives. */
  .trail-stop::after {
    content: "";
    position: absolute;
    top: 14%;
    bottom: 14%;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(
      180deg,
      rgba(185, 139, 94, 0) 0%,
      rgba(214, 166, 96, 0.55) 26%,
      #f0d49a 50%,
      rgba(214, 166, 96, 0.55) 74%,
      rgba(185, 139, 94, 0) 100%
    );
  }

  /* The spur itself, reaching from that edge to the side of the path
     and a little way over its kerb, the way a side road joins one.
     Stopping it level with the kerb instead leaves a hairline of ground
     showing wherever the two round apart. */
  .trail-stop::before {
    content: "";
    position: absolute;
    top: 50%;
    height: 3px;
    width: calc(var(--trail-gap) - var(--path-w) / 2 + 3px);
    margin-top: -1.5px;
    background: linear-gradient(90deg, #2b1d10, #caa15f 34%, #f0d49a 50%, #caa15f 66%, #2b1d10);
    box-shadow: 0 0 10px rgba(214, 166, 96, 0.3);
  }

  .trail-stop:nth-child(odd)::after {
    right: -1px;
  }

  .trail-stop:nth-child(odd)::before {
    left: 100%;
  }

  .trail-stop:nth-child(even)::after {
    left: -1px;
  }

  .trail-stop:nth-child(even)::before {
    right: 100%;
  }
}

/* ==================================================================
   Home — the fork
   ================================================================== */

.fork {
  position: relative;
  z-index: 1;
  padding-block: var(--space-xl) var(--space-3xl);
}

.fork-canvas {
  position: relative;
}

/* It now spans the whole crossroads, because roads leave the junction
   upward as well as downward. */
.fork-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

/* The two ways back up the page, one either side of the incoming trail
   so it passes between them and into the junction below. */
.fork-ups {
  display: flex;
  justify-content: center;
  gap: clamp(7rem, 24vw, 22rem);
  flex-wrap: wrap;
}

/* Too narrow for them to stand either side of the path, so they queue
   up above it instead; the branches are not drawn at this width. */
@media (max-width: 47.99rem) {
  .fork-ups {
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
  }
}

.fork-up {
  position: relative;
  z-index: 1;
}

/* The same arrow as every other button, turned to point the way the
   road goes: back up the page. */
.btn-up::after {
  content: "";
  width: 0.85em;
  height: 0.85em;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--arrow-mask) center / contain no-repeat;
  mask: var(--arrow-mask) center / contain no-repeat;
  transform: rotate(-90deg);
  transition: transform 0.2s var(--ease);
  --arrow-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8h9M8.5 4l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.btn-up:hover::after {
  transform: rotate(-90deg) translateX(3px);
}

/* The square the walk arrives at. The path widens into a solid piece
   of the same metal, the words are set into it, and every destination
   leaves from one of its edges — which is what stops the junction
   pinching to a point the way the first drafts did.

   The words are written here rather than drawn into a picture, so they
   stay editable from admin and stay sharp at any size. They are dark
   on the metal, because it is the one bright surface on the page and
   light type on it would be the only unreadable thing here. */
.fork-plaza {
  position: relative;
  z-index: 1;
  width: min(44rem, 100%);
  margin: clamp(3.5rem, 7vw, 5.5rem) auto clamp(3.5rem, 7vw, 5.5rem);
  padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.5rem, 5vw, 3.5rem);
  border-radius: clamp(0.9rem, 2vw, 1.4rem);
  background:
    radial-gradient(
      76% 120% at 50% 24%,
      rgba(255, 238, 198, 0.42),
      rgba(255, 214, 142, 0.08) 52%,
      rgba(120, 78, 22, 0.14) 100%
    ),
    url("../assets/floor-gold.webp") center / var(--gold-tile) auto repeat;
  box-shadow:
    /* the keyline and the bevel, the same edge the ribbons carry */
    0 0 0 1.5px #2b1d10,
    inset 0 0 0 1px rgba(255, 238, 198, 0.5),
    inset 0 2px 10px rgba(255, 243, 214, 0.28),
    inset 0 -10px 22px rgba(96, 60, 14, 0.3),
    /* the light it throws onto the ground around it */
    0 0 60px 10px rgba(214, 160, 78, 0.16);
}

.fork-plaza .fork-intro {
  max-width: 34rem;
  margin-inline: auto;
  text-align: center;
}

/* Dark enough to clear 4.5:1 against the brightest part of the metal,
   which is the middle, where the sheen sits.

   The rule goes on both sides here. Everywhere else an eyebrow sits at
   the left margin, where one rule leading into it is right; set in the
   middle of the plaza it has air on both sides, and a rule on only one
   of them pulls the whole line off centre. There is no eyebrow on the
   plaza at the moment -- the title says what this is -- but anything
   written back into it from admin should come out square. */
.fork-plaza .eyebrow {
  color: #43290b;
}

.fork-plaza .eyebrow::before,
.fork-plaza .eyebrow::after {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: #43290b;
  opacity: 0.6;
}

.fork-plaza h2 {
  color: #231504;
  margin-bottom: 0.65rem;
  text-shadow: 0 1px 0 rgba(255, 240, 205, 0.45);
}

.fork-plaza .lead {
  color: #3a2408;
  margin-bottom: 0;
  text-shadow: 0 1px 0 rgba(255, 240, 205, 0.35);
}

.fork-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--space-sm);
}

/* A destination the road actually reaches. The branch arrives at the
   middle of the top edge, so the edge is trimmed in the same metal and
   brightest where the road lands: the panel is the end of the path
   rather than a card the path happens to point at. */
.fork-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: var(--space-md);
  min-height: 11rem;
  background: linear-gradient(180deg, var(--ink-700), var(--ink-800));
  border: 1px solid rgba(185, 139, 94, 0.3);
  border-radius: var(--r-lg);
  color: var(--fog-100);
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.fork-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 12%;
  right: 12%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    rgba(185, 139, 94, 0) 0%,
    rgba(214, 166, 96, 0.5) 24%,
    #f0d49a 50%,
    rgba(214, 166, 96, 0.5) 76%,
    rgba(185, 139, 94, 0) 100%
  );
}

a.fork-card:hover {
  border-color: rgba(214, 166, 96, 0.65);
  transform: translateY(-3px);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45), 0 0 26px rgba(214, 160, 78, 0.14);
  color: var(--fog-100);
}

/* Nothing arrives here yet, so the trim is only hinted at. */
.fork-card-closed {
  border-color: var(--line);
}

.fork-card-closed::before {
  opacity: 0.25;
}

/* The two ways back up the page are the same kind of destination, so
   they are panels like the others and carry the same trim — on the
   underside, where the road meets them. They are solid rather than
   outlined because the road ends underneath them: an outline would
   show the cut end of it through the middle of the button. */
.fork-up {
  --btn-bg: linear-gradient(180deg, var(--ink-700), var(--ink-800));
  border-color: rgba(185, 139, 94, 0.4);
  box-shadow: 0 2px 0 -1px rgba(240, 212, 154, 0.55);
}

.fork-up:hover {
  border-color: rgba(214, 166, 96, 0.7);
}

.fork-card h3 {
  margin: 0;
  font-size: var(--step-h3);
}

.fork-card p {
  color: var(--fog-500);
  font-size: var(--step-small);
  margin: 0;
}

.fork-card-go {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze);
}

.fork-card-closed {
  cursor: default;
}

.fork-card-closed h3,
.fork-card-closed .fork-card-go {
  color: var(--fog-700);
}

/* ==================================================================
   About
   ================================================================== */

.about-figure {
  margin: 0 0 var(--space-xl);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}

.about-figure img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.prose {
  max-width: 62ch;
}

.prose h2 {
  font-size: var(--step-h3);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-xs);
  color: var(--fog-100);
  /* A new section starts on a clean line rather than beside a picture
     that belongs to the section before it. */
  clear: both;
}

/* A picture inside the story. On a wide column it sits to the right and
   the words run past it; on a phone it goes above them instead, where
   there is no room for text beside anything. */
.prose-figure {
  float: right;
  width: min(44%, 14rem);
  margin: 0.35rem 0 1.1rem 1.6rem;
}

.prose-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  box-shadow: 0 18px 36px -28px rgba(0, 0, 0, 0.95);
}

@media (max-width: 34rem) {
  .prose-figure {
    float: none;
    width: min(64%, 12.5rem);
    margin: 0 0 1.25rem;
  }
}

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

.prose p {
  color: var(--fog-300);
  margin-bottom: var(--space-sm);
}

.prose blockquote {
  margin: var(--space-lg) 0;
  padding-left: var(--space-md);
  border-left: 2px solid var(--bronze);
  font-family: var(--font-display);
  font-size: var(--step-h3);
  line-height: 1.35;
  color: var(--fog-100);
}

/* ==================================================================
   Projects
   ================================================================== */

.projects-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.projects-count {
  font-size: var(--step-small);
  color: var(--fog-500);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: var(--space-sm);
  align-items: start;
}

.project {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--ink-700), var(--ink-800));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color 0.25s var(--ease), box-shadow 0.3s var(--ease);
}

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

.project.is-open {
  grid-column: 1 / -1;
  border-color: rgba(185, 139, 94, 0.4);
  box-shadow: 0 30px 60px -45px rgba(0, 0, 0, 0.95);
}

/* The whole head is the hit area, but the button carries the label and
   the keyboard focus, so the markup stays valid and announces well. */
.project-head {
  position: relative;
  display: grid;
  cursor: pointer;
}

.project-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: radial-gradient(90% 120% at 20% 0%, var(--ink-600), var(--ink-800));
  overflow: hidden;
}

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

/* Without artwork the panel is a quiet contour band rather than a
   large empty rectangle. */
.project-media-blank {
  display: grid;
  place-items: center;
  aspect-ratio: 2.6 / 1;
  color: rgba(185, 139, 94, 0.5);
}

.project-media-blank::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='260' viewBox='0 0 420 260'%3E%3Cg fill='none' stroke='%23f1efea' stroke-opacity='0.07'%3E%3Cpath d='M-20 70C60 30 150 96 230 68s130-46 210-14'/%3E%3Cpath d='M-20 118C60 78 150 144 230 116s130-46 210-14'/%3E%3Cpath d='M-20 168C60 128 150 194 230 166s130-46 210-14'/%3E%3Cpath d='M-20 220C60 180 150 246 230 218s130-46 210-14'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
}

.project-media-blank svg {
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  opacity: 0.8;
}

.project-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: var(--space-md);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.project-type {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fog-500);
}

.project-title {
  margin: 0;
  font-size: var(--step-h3);
}

.project-summary {
  margin: 0;
  color: var(--fog-500);
  font-size: var(--step-small);
}

.project-toggle {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.5rem;
  margin-top: 0.4rem;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze);
  transition: color 0.2s var(--ease);
}

.project-toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
}

.project-head:hover .project-toggle {
  color: var(--bronze-bright);
}

.project-toggle:focus-visible {
  outline-offset: 4px;
}

.project-toggle-icon {
  position: relative;
  width: 0.85rem;
  height: 0.85rem;
}

.project-toggle-icon::before,
.project-toggle-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.project-toggle-icon::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  margin-top: -0.75px;
}

.project-toggle-icon::after {
  left: 50%;
  top: 0;
  height: 100%;
  width: 1.5px;
  margin-left: -0.75px;
}

.project.is-open .project-toggle-icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

.project-panel-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}

.project.is-open .project-panel-wrap {
  grid-template-rows: 1fr;
}

.project-panel {
  overflow: hidden;
}

.project-detail {
  display: grid;
  gap: var(--space-lg);
  padding: 0 var(--space-md) var(--space-lg);
  border-top: 1px solid var(--line);
  margin-top: var(--space-xs);
  padding-top: var(--space-lg);
}

.project-detail h3 {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze);
  margin: 0 0 0.4rem;
}

.project-detail p {
  color: var(--fog-300);
}

.project-block + .project-block {
  margin-top: var(--space-md);
}

.project-aside {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.project-facts {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem var(--space-sm);
  font-size: var(--step-small);
}

.project-facts dt {
  color: var(--fog-700);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-top: 0.15rem;
}

.project-facts dd {
  margin: 0;
  color: var(--fog-300);
}

.collab-card {
  padding: var(--space-md);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: rgba(185, 139, 94, 0.06);
}

.collab-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.collab-logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-sm);
  object-fit: contain;
  background: rgba(13, 16, 18, 0.6);
  padding: 0.25rem;
}

/* A heading for the outline, not for the eye — it stays the size it
   was when it was an h4, before the level was corrected. */
.collab-card-label {
  font-size: 1rem;
}

.collab-card-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.collab-card p {
  font-size: var(--step-small);
  color: var(--fog-300);
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.75rem;
}

.project-gallery figure {
  margin: 0;
}

.project-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}

.project-gallery figcaption {
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  color: var(--fog-500);
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: var(--space-xs);
}

/* An expanded project without artwork drops the placeholder panel
   rather than showing a large empty rectangle. */
.project.is-open:not(.has-image) .project-media {
  display: none;
}

@media (min-width: 52rem) {
  .project-detail {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    padding-inline: var(--space-lg);
  }

  .project.is-open .project-body {
    padding-inline: var(--space-lg);
    padding-block: var(--space-lg);
    justify-content: center;
  }

  .project.is-open .project-title {
    font-size: var(--step-h2);
  }

  .project.is-open.has-image .project-head {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.7fr);
  }

  .project.is-open.has-image .project-media {
    aspect-ratio: auto;
    height: 100%;
  }
}

.empty-note {
  padding: var(--space-xl);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  text-align: center;
  color: var(--fog-500);
}

/* ==================================================================
   Journey
   ================================================================== */

.post-list {
  display: grid;
  gap: var(--space-sm);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
}

.post-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--ink-700), var(--ink-800));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.post-card:hover {
  border-color: rgba(185, 139, 94, 0.4);
  transform: translateY(-3px);
  color: inherit;
}

.post-card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: radial-gradient(90% 120% at 20% 0%, var(--ink-600), var(--ink-800));
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.post-card:hover .post-card-media img {
  transform: scale(1.03);
}

.post-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: var(--space-md);
}

.post-card h2 {
  margin: 0;
  font-size: var(--step-h3);
}

.post-card p {
  margin: 0;
  color: var(--fog-500);
  font-size: var(--step-small);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fog-700);
}

.post-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.post-card-read {
  margin-top: auto;
  padding-top: 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze);
}

@media (min-width: 52rem) {
  .post-card-featured {
    grid-column: 1 / -1;
    flex-direction: row;
    min-height: 20rem;
  }

  .post-card-featured .post-card-media {
    flex: 0 0 48%;
    aspect-ratio: auto;
  }

  .post-card-featured .post-card-body {
    justify-content: center;
    padding: var(--space-lg);
  }

  .post-card-featured h2 {
    font-size: var(--step-h2);
  }
}

/* The milestone trail -------------------------------------------------
   A line down the page with a dot on it for every milestone. At rest
   that is all it is: no labels, no dates, nothing to read. It is meant
   to sit quietly at the top of the page, and a visitor who never
   touches it has lost nothing. Pick a dot and its details open beside
   it, one at a time.

   Every dot is a ring. Only the one that is open is filled in and lit,
   so the selection is unmistakable and nothing else competes with it.
   Reached milestones ring in gold, what is ahead rings in grey.

   The paw is not a stop. It is a footprint on the line just past the
   newest milestone reached, marking where the work has got to, and
   nothing a visitor clicks will move it.

   The line itself is drawn in js/journey.js, because where each dot
   lands depends on whether a box further up is open. The stylesheet
   owns the gutter it runs in; the script reads that back rather than
   keeping its own copy. */

.journey-layout {
  display: grid;
  gap: var(--space-xl);
}

.journey-main {
  min-width: 0;
}

.journey-aside {
  min-width: 0;
}

/* Once there is room, the trail goes back to the margin where it
   belongs. It is a line of dots and nothing else now, so a column of
   its own is wide enough for it and for the box a dot opens, and the
   entries get the rest of the page back. */
@media (min-width: 64rem) {
  .journey-layout {
    grid-template-columns: minmax(0, 1fr) clamp(19rem, 26vw, 23rem);
    gap: var(--space-xl);
    align-items: start;
  }

  .journey-main {
    grid-column: 1;
    grid-row: 1;
  }

  .journey-aside {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
  }
}

.journey-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 1.75rem;
}

.chip-order {
  margin-left: auto;
}

.ms-title {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: var(--step-h3);
}

.ms-intro {
  max-width: 52ch;
  margin: 0 0 var(--space-md);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--fog-500);
}

.ms-stage {
  position: relative;
  /* The gutter the line, the dots and the paw live in. It is wider than
     it looks like it needs to be because the ground behind every page
     draws a gold cobble-to-slab seam a fixed 20px inside the page
     gutter. Narrow this and the trail sits on top of that seam. */
  --ms-gutter: 4.4rem;
  /* How far apart the dots sit, and so how tall a closed row is. */
  --ms-step: 3.6rem;
}

.ms-line {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.ms-line path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ms-line-done {
  stroke: var(--bronze-deep);
  stroke-width: 2;
}

/* Still one line, carried on in a colour that has not been walked. */
.ms-line-ahead {
  stroke: rgba(241, 239, 234, 0.2);
  stroke-width: 2;
}

.ms-stops {
  display: grid;
  gap: 0;
  padding: 0 0 0 var(--ms-gutter);
  margin: 0;
  list-style: none;
}

.ms-stop {
  position: relative;
  min-height: var(--ms-step);
  min-width: 0;
}

/* --- the dots ---------------------------------------------------------- */

/* The whole strip beside a milestone answers to a click, so the target
   is the height of the row and the width of the gutter rather than the
   thirteen pixels of the dot itself. */
.ms-btn {
  position: absolute;
  top: 0;
  left: calc(-1 * var(--ms-gutter));
  width: var(--ms-gutter);
  height: 100%;
  min-height: var(--ms-step);
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.ms-btn:focus-visible {
  outline: 2px solid var(--bronze-bright);
  outline-offset: -2px;
  border-radius: var(--r-sm);
}

.ms-dot {
  position: absolute;
  width: 13px;
  height: 13px;
  background: transparent;
  border: 2px solid var(--bronze);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: background-color 0.25s var(--ease), box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.ms-stop.is-ahead .ms-dot {
  border-color: rgba(241, 239, 234, 0.3);
}

.ms-btn:hover .ms-dot {
  background: rgba(185, 139, 94, 0.3);
}

/* The one that is open: filled in and lit. Nothing else on the trail
   does either of those things. */
.ms-stop.is-open .ms-dot {
  background: var(--bronze-bright);
  border-color: var(--bronze-bright);
  box-shadow: 0 0 0 5px rgba(216, 174, 126, 0.16), 0 0 14px rgba(216, 174, 126, 0.5);
}

.ms-stop.is-ahead.is-open .ms-dot {
  background: var(--wolf);
  border-color: var(--wolf);
  box-shadow: 0 0 0 5px rgba(167, 171, 172, 0.14), 0 0 14px rgba(167, 171, 172, 0.35);
}

/* --- where the work has got to ------------------------------------------ */

.ms-paw {
  position: absolute;
  display: block;
  width: 19px;
  height: 19px;
  color: var(--bronze-bright);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* The paw stands on the line rather than beside it, so each toe is
   outlined in the page's own dark before it is filled. That lifts it
   clear without putting a plate behind it. */
.ms-paw svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: var(--ink-900);
  stroke-width: 1.4;
  paint-order: stroke fill;
}

/* --- the detail box ----------------------------------------------------- */

.ms-panel {
  position: relative;
  max-width: min(34rem, 100%);
  margin: 0 0 var(--space-sm);
  padding: var(--space-sm) 2.6rem var(--space-sm) var(--space-sm);
  background: var(--ink-700);
  border: 1px solid var(--line-strong);
  border-left: 2px solid var(--bronze-deep);
  border-radius: var(--r-md);
}

.ms-panel[hidden] {
  display: none;
}

.ms-stop.is-ahead .ms-panel {
  border-left-color: rgba(241, 239, 234, 0.22);
}

/* The connector: a short gold rule reaching out of the box's left edge
   back to the dot it belongs to, stopping just short of it. */
.ms-panel::before {
  content: "";
  position: absolute;
  right: 100%;
  top: var(--ms-mark-y, 1.1rem);
  width: calc(var(--ms-gutter) - var(--ms-mark-x, 2rem) - 8px);
  height: 1px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(185, 139, 94, 0.85),
    rgba(185, 139, 94, 0.3)
  );
}

.ms-stop.is-ahead .ms-panel::before {
  background: linear-gradient(
    90deg,
    rgba(241, 239, 234, 0.35),
    rgba(241, 239, 234, 0.12)
  );
}

.ms-panel-title {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.25;
  color: var(--fog-100);
}

.ms-panel-date {
  margin: 0 0 0.55rem;
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bronze);
}

.ms-panel-date.is-soon {
  color: var(--fog-700);
}

.ms-panel-note {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--fog-300);
}

.ms-panel-link {
  display: inline-block;
  margin-top: 0.7rem;
  font-size: 0.78rem;
}

.ms-panel-close {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: var(--fog-700);
  background: none;
  border: 0;
  border-radius: var(--r-sm);
  cursor: pointer;
}

.ms-panel-close:hover {
  color: var(--fog-100);
}

.ms-panel-close:focus-visible {
  outline: 2px solid var(--bronze-bright);
  outline-offset: 2px;
}

.ms-panel-close svg {
  width: 15px;
  height: 15px;
}

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

/* Article */

.article {
  padding-block: clamp(2.5rem, 6vw, 4rem) var(--space-3xl);
}

.article-head {
  margin-bottom: var(--space-lg);
}

.article-head h1 {
  margin-bottom: var(--space-sm);
}

.article-figure {
  margin: 0 0 var(--space-xl);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}

.article-figure img {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

.article-body {
  max-width: 66ch;
  font-size: 1.125rem;
  line-height: 1.78;
  color: var(--fog-300);
}

.article-body h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-xs);
  font-size: var(--step-h3);
  color: var(--fog-100);
}

.article-body h3 {
  margin-top: var(--space-lg);
  font-size: 1.15rem;
  color: var(--fog-100);
}

.article-body ul,
.article-body ol {
  padding-left: 1.2rem;
  margin: 0 0 var(--space-sm);
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body blockquote {
  margin: var(--space-lg) 0;
  padding-left: var(--space-md);
  border-left: 2px solid var(--bronze);
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.4;
  color: var(--fog-100);
}

.article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: rgba(241, 239, 234, 0.07);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.article-body .post-figure {
  margin: var(--space-lg) 0;
}

.article-body .post-figure img {
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}

.article-body .post-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--space-xl) 0;
}

.article-foot {
  margin-top: var(--space-2xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  justify-content: space-between;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fog-500);
  text-decoration: none;
}

.back-link:hover {
  color: var(--fog-100);
}

.back-link::before {
  content: "\2190";
}

/* ==================================================================
   Collab
   ================================================================== */

.collab-layout {
  display: grid;
  gap: var(--space-lg);
  align-items: start;
}

@media (min-width: 60rem) {
  .collab-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: var(--space-xl);
  }
}

/* ==================================================================
   Services
   ================================================================== */

/* The picks sit above the form rather than beside it: choosing one
   changes the question the form asks, and a reader should see that
   happen rather than have it change off to one side. */
.service-layout {
  display: grid;
  gap: var(--space-lg);
  align-items: start;
  max-width: 48rem;
  margin-inline: auto;
}

.service-picks {
  display: grid;
  gap: var(--space-sm);
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

/* A real button, so it is reachable by keyboard and announced as
   pressed or not without any extra wiring. */
.service-pick {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: var(--space-md);
  text-align: left;
  cursor: pointer;
  color: var(--fog-100);
  background: linear-gradient(180deg, var(--ink-700), var(--ink-800));
  border: 1px solid rgba(185, 139, 94, 0.3);
  border-radius: var(--r-lg);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.service-pick:hover {
  border-color: rgba(214, 166, 96, 0.65);
  transform: translateY(-2px);
}

.service-pick:focus-visible {
  outline: 2px solid var(--bronze-bright);
  outline-offset: 2px;
}

/* The chosen one is lit along its top edge, the same way a destination
   at the crossroads is lit where the road lands on it. */
.service-pick[aria-pressed="true"] {
  border-color: rgba(214, 166, 96, 0.7);
  box-shadow: inset 0 2px 0 -1px #f0d49a, 0 0 24px rgba(214, 160, 78, 0.12);
}

.service-pick-label {
  font-family: var(--font-display);
  font-size: var(--step-h3);
  line-height: 1.2;
}

.service-pick-blurb {
  color: var(--fog-500);
  font-size: var(--step-small);
}

/* The way through to the full page for the chosen kind of work. It
   sits between the picks and the form so it changes with the pick, and
   it is drawn as a signpost rather than a field, so nobody mistakes it
   for part of the form. */
.service-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--line);
  border-left: 2px solid var(--bronze);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.02);
}

/* display: flex above would otherwise beat the hidden attribute. */
.service-more[hidden] {
  display: none;
}

/* The sentence gives way before the button does, so on a wide screen
   the button stays on the same line, at the end of it. */
.service-more p {
  flex: 1 1 18rem;
  margin: 0;
  color: var(--fog-300);
}

.service-more .btn {
  flex: none;
}

/* The quiet line under a form saying what becomes of what was typed
   into it. Small, but it sits where the asking happens. */
.form-privacy {
  margin: var(--space-sm) 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--fog-700);
}

.form-privacy a {
  color: var(--fog-500);
}

.form-privacy a:hover {
  color: var(--bronze-bright);
}

.form-fallback {
  margin-top: var(--space-md);
  font-size: var(--step-small);
}

.form-card {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.form-card h2 {
  font-size: var(--step-h3);
  margin-bottom: 0.35rem;
}

.form-grid {
  display: grid;
  gap: 0 var(--space-sm);
  margin-top: var(--space-md);
}

@media (min-width: 40rem) {
  .form-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}

.form-status {
  font-size: var(--step-small);
  color: var(--fog-500);
}

.form-status[data-tone="ok"] {
  color: var(--sage);
}

.form-status[data-tone="error"] {
  color: #d99090;
}

.history-panel {
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.history-panel h2 {
  font-size: var(--step-h3);
  margin-bottom: 0.35rem;
}

.history-list {
  list-style: none;
  margin: var(--space-md) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.history-item {
  display: flex;
  gap: 0.85rem;
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--line);
}

.history-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.history-logo {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-sm);
  background: rgba(13, 16, 18, 0.6);
  border: 1px solid var(--line);
  object-fit: contain;
  padding: 0.25rem;
  display: grid;
  place-items: center;
  color: var(--bronze);
  font-family: var(--font-display);
  font-weight: 600;
}

.history-name {
  font-weight: 600;
  margin: 0;
}

.history-detail {
  margin: 0;
  font-size: var(--step-small);
  color: var(--fog-500);
}

/* ==================================================================
   Simple state pages
   ================================================================== */

.state-page {
  min-height: 70svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: var(--space-3xl);
}

.state-page .wrap-narrow > * {
  margin-inline: auto;
}

.state-mark {
  width: 4.5rem;
  margin: 0 auto var(--space-md);
  opacity: 0.8;
}

/* ==================================================================
   Footer
   ================================================================== */

/* The engraved trail map stands behind the whole footer. It is cropped,
   never stretched: `cover` keeps its 3:1 shape whatever height the
   footer turns out to be, and that height comes from the content and
   ordinary padding, never from the picture. On a phone the middle of
   the map is what survives the crop, which is where the trail runs.

   The charcoal wash is part of the background rather than an opacity on
   the footer, so every word on top of it keeps its full contrast. */
.site-footer {
  position: relative;
  border-top: 1px solid var(--line);
  padding-block: 2.75rem 1.75rem;
  background-color: var(--ink-800);
  background-image:
    linear-gradient(
      180deg,
      rgba(14, 18, 20, 0.88) 0%,
      rgba(14, 18, 20, 0.68) 45%,
      rgba(14, 18, 20, 0.82) 100%
    ),
    url("../assets/footer-map.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.footer-grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 48rem) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
    gap: var(--space-lg);
  }
}

.footer-brand img {
  width: 6.25rem;
  margin-bottom: 0.7rem;
}

.footer-tagline {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--fog-100);
  margin-bottom: 0.4rem;
}

.footer-note {
  color: var(--fog-500);
  font-size: var(--step-small);
  max-width: 34ch;
}

.footer-col h2 {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fog-700);
  margin-bottom: var(--space-sm);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-links a {
  color: var(--fog-300);
  font-size: var(--step-small);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--bronze-bright);
}

.footer-links .is-soon {
  color: var(--fog-700);
  font-size: var(--step-small);
}

.footer-bottom a {
  color: inherit;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--bronze-bright);
}

.footer-bottom {
  margin-top: 2.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem var(--space-md);
  align-items: center;
  justify-content: space-between;
  color: var(--fog-700);
  font-size: 0.8125rem;
}

/* ==================================================================
   Preview banner (admin draft preview only)
   ================================================================== */

.preview-bar {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  z-index: 180;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.6rem 0.5rem 1rem;
  border-radius: var(--r-pill);
  background: var(--bronze);
  color: var(--ink-900);
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: 0 16px 40px -20px rgba(0, 0, 0, 0.9);
}

.preview-bar a {
  color: var(--ink-900);
  background: rgba(13, 16, 18, 0.14);
  border-radius: var(--r-pill);
  padding: 0.3rem 0.8rem;
  text-decoration: none;
}

/* ==================================================================
   The March Font — the uppercase layer
   Every selector here is already set in capitals, which is the only
   way this face can be set. Sentences stay in the sans, so nothing
   the visitor actually reads at length is affected.

   It comes last in the file deliberately: several of these rules name
   --font-sans themselves, and this has to win.
   ================================================================== */

.eyebrow,
.badge,
.tag,
.menu-toggle,
.menu-note,
.header-link,
.hero-cue,
.fork-card-go,
.project-type,
.project-toggle,
.project-detail h3,
.project-facts dt,
.post-meta,
.post-card-read,
.back-link,
/* The design page's own card label. It belongs in this list and not in
   css/design.css, because the whole point of the list is that there is
   one of it: left out, it fell back to the sans and read as a fourth
   typeface sitting beside three. */
.dz-card-tag,
.footer-col h2 {
  font-family: var(--font-brand);
  /* The face has one weight. Without this the browser fakes the bold
     by smearing the outlines, which on a geometric face looks broken. */
  font-weight: 400;
  font-synthesis-weight: none;
  /* It is drawn wide already, so it needs less tracking than the sans
     did to read as spaced capitals. */
  letter-spacing: 0.1em;
}

.eyebrow,
.hero-cue {
  letter-spacing: 0.14em;
}

/* The small way back up on long pages. Added by js/ui.js. */
.to-top {
  position: fixed;
  right: max(var(--gutter), env(safe-area-inset-right));
  bottom: max(var(--gutter), env(safe-area-inset-bottom));
  z-index: 40;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(13, 16, 18, 0.88);
  color: var(--bronze-bright);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease),
    visibility 0.2s, border-color 0.2s var(--ease);
}

.to-top.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  border-color: var(--bronze);
}

.to-top:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 2px;
}

.to-top::before {
  content: "";
  position: absolute;
  top: 52%;
  left: 50%;
  width: 0.6rem;
  height: 0.6rem;
  border-top: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: translate(-50%, -30%) rotate(45deg);
}
