/* ============================================================
   sam.studio — design system
   The three brand colours are taken from the logo: black,
   #FFFDEE and #E6E643. Nothing outside that palette is used.
   ============================================================ */

:root {
  /* ── brand ──────────────────────────────────────────────── */
  --black:  #000000;
  --cream:  #FFFDEE;
  --yellow: #E6E643;

  /* ── roles ──────────────────────────────────────────────── */
  --ground:    var(--cream);
  --ink:       var(--black);
  --ink-55:    rgba(0, 0, 0, .55);   /* 4.7:1 on cream — AA */
  --ink-35:    rgba(0, 0, 0, .35);   /* decorative only */
  --hair:      rgba(0, 0, 0, .16);
  --hair-soft: rgba(0, 0, 0, .07);

  /* ── type ───────────────────────────────────────────────── */
  --font: 'Urbanist', 'Century Gothic', 'Poppins', 'Avenir Next',
          system-ui, -apple-system, 'Segoe UI', sans-serif;

  --fs-label:  .75rem;
  --fs-body:   1rem;
  --fs-lede:   clamp(1.25rem, .85rem + 1.6vw, 1.9rem);
  --fs-title:  clamp(1.75rem, 1.1rem + 2.6vw, 3rem);
  --fs-bignav: clamp(1.125rem, .62rem + 1.7vw, 2rem);
  /* the main-page wordmark, scaled to 65% of its original size.
     The 2.75rem floor is left alone so the phone layout is unchanged. */
  --fs-mark:   clamp(2.75rem, .26rem + 6.11vw, 5.85rem);

  --track-label: .18em;

  /* ── space (8pt) ────────────────────────────────────────── */
  --s-1: .5rem;   --s-2: 1rem;    --s-3: 1.5rem;
  --s-4: 2rem;    --s-5: 3rem;    --s-6: 4rem;

  --pad: clamp(1.5rem, 4.5vw, 5rem);
  --maxw: 1560px;

  /* --head-h sizes the fixed header; --head-real is overwritten from
     JS with what the header actually measures, so page content always
     clears it exactly however the navigation wraps. */
  --head-h: clamp(64px, 6vw, 88px);
  --head-real: var(--head-h);

  /* ── motion ─────────────────────────────────────────────── */
  --e-out:  cubic-bezier(.16, 1, .3, 1);
  --e-soft: cubic-bezier(.4, 0, .2, 1);
  --t-enter: 620ms;
  --t-exit:  220ms;   /* exits stay shorter than entrances */
}

/* ── reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 1px;
}

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

.skip {
  position: absolute; top: -100px; left: var(--pad); z-index: 100;
  background: var(--black); color: var(--cream);
  padding: var(--s-2) var(--s-3);
  font-size: var(--fs-label); letter-spacing: var(--track-label);
  text-transform: uppercase;
  transition: top 180ms var(--e-soft);
}
.skip:focus { top: var(--s-2); }


/* ============================================================
   THE LOGO
   One vector shape, three brand colourways. The cream disc
   carries a hairline ring so it still reads on a light ground.
   ============================================================ */
.logo { display: block; width: 100%; height: auto; overflow: visible; }

.logo__disc { fill: var(--disc); stroke: var(--ring, transparent); stroke-width: .8; }
.logo__word {
  fill: var(--word);
  font-family: var(--font);
  font-size: 15.8px;          /* viewBox units — sized so the wordmark
                                 spans 70% of the disc, matching the
                                 proportions of the supplied logo */
  font-weight: 400;
  letter-spacing: -.03em;
}

.logo[data-tone="black"]  { --disc: var(--black);  --word: var(--cream); --ring: transparent; }
.logo[data-tone="cream"]  { --disc: var(--cream);  --word: var(--black); --ring: var(--black); }
.logo[data-tone="yellow"] { --disc: var(--yellow); --word: var(--black); --ring: transparent; }

.logo__disc, .logo__word {
  transition: fill 520ms var(--e-out), stroke 520ms var(--e-out);
}


/* ============================================================
   SHARED
   ============================================================ */
.label, .idx {
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.idx { color: var(--ink-55); }

.rule {
  height: 1px;
  background: var(--hair);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 900ms var(--e-out);
}

.register {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  gap: var(--s-3);
}
.register > :nth-child(1) { justify-self: start;  text-align: left; }
.register > :nth-child(2) { justify-self: center; text-align: center; }
.register > :nth-child(3) { justify-self: end;    text-align: right; }

/* Lighter than the words it divides, but still real text a screen
   reader announces — so it takes --ink-55, which clears AA, rather
   than the decorative-only tint. */
.sep { padding: 0 .45em; color: var(--ink-55); }

.tile__frame img,
.slide img,
.person__frame img { opacity: 0; }
.tile__frame img.is-loaded,
.slide img.is-loaded,
.person__frame img.is-loaded { opacity: 1; }
.slide img,
.person__frame img { transition: opacity 700ms var(--e-soft); }


/* ============================================================
   MASTHEAD — the same cream ground as the page, held apart by a
   single hairline. Shown on About, Featured Work, project and
   Contact; the landing and main pages carry their own.
   ============================================================ */
.masthead {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: var(--ground);
  min-height: var(--head-h);
  display: flex; align-items: center;
  padding-inline: var(--pad);
  border-bottom: 1px solid var(--hair-soft);
}
.masthead[hidden] { display: none; }

.masthead__inner {
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  display: grid; grid-template-columns: auto 1fr;
  align-items: center; gap: var(--s-3);
}

.masthead__mark {
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-weight: 400;
  letter-spacing: -.03em;
  padding: var(--s-1) 0;
}

.masthead__nav { justify-self: end; display: flex; gap: clamp(1rem, 3vw, 3rem); }

.masthead__nav a {
  position: relative;
  display: flex; align-items: baseline; gap: .55em;
  min-height: 44px;
  padding: var(--s-1) 0;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}
.masthead__nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 6px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left center;
  transition: transform 420ms var(--e-out);
}
.masthead__nav a:hover::after,
.masthead__nav a:focus-visible::after,
.masthead__nav a[aria-current="page"]::after { transform: scaleX(1); }
.masthead__nav a[aria-current="page"] .idx { color: var(--ink); }


/* ============================================================
   VIEW MACHINERY
   ============================================================ */
.view { display: block; }
.view[hidden] { display: none; }

[data-fx] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--t-enter) var(--e-out),
              transform var(--t-enter) var(--e-out);
  transition-delay: calc(var(--fx, 0) * 70ms);
}
[data-fx="1"] { --fx: 0; }  [data-fx="2"] { --fx: 1; }
[data-fx="3"] { --fx: 2; }  [data-fx="4"] { --fx: 3; }
[data-fx="5"] { --fx: 4; }  [data-fx="6"] { --fx: 5; }

.view.is-in [data-fx] { opacity: 1; transform: none; }
.view.is-in .rule     { transform: scaleX(1); }

.view.is-out [data-fx],
.view.is-out .rule {
  transition-duration: var(--t-exit);
  transition-delay: 0ms;
}
.view.is-out [data-fx] { opacity: 0; transform: translateY(-8px); }


/* ============================================================
   LANDING — the logo, and nothing else
   ============================================================ */
.view--landing { min-height: 100dvh; display: flex; }

.landing {
  flex: 1;
  display: grid;
  align-content: center; justify-items: center;
  gap: clamp(1.75rem, 4vh, 3rem);
  padding: var(--s-6) var(--pad);
}

.landing__logo {
  display: block;
  width: clamp(220px, 42vmin, 440px);
  border-radius: 50%;
  /* carries its own entrance fade as well as the hover lift, so the
     shared [data-fx] transition below isn't overwritten */
  transition: transform 700ms var(--e-out),
              opacity var(--t-enter) var(--e-out);
}
.landing__logo:hover,
.landing__logo:focus-visible { transform: scale(1.02); }
.landing__logo:active { transform: scale(.99); }
.landing__logo:focus-visible { outline-offset: 10px; }

.landing__cue {
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-55);
  animation: cue 3.6s var(--e-soft) infinite;
}
@keyframes cue { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }


/* ============================================================
   MAIN PAGE
   ============================================================ */
.view--main { min-height: 100dvh; display: flex; position: relative; }

/* ── the collage ────────────────────────────────────────────
   A preview of the work sitting behind the page. Every photo is
   placed in the gaps between the type, never under it, so no
   line of text ever loses its contrast — the fading is for
   atmosphere, not to rescue legibility. */
.collage {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1100ms var(--e-out) 120ms;
}
.view--main.is-in .collage { opacity: 1; }

.collage__grid, .collage__shots { position: absolute; inset: 0; }

/* dotted drafting lines, struck through the photo edges */
.gl { position: absolute; }
.gl--v {
  top: 0; bottom: 0; width: 1px;
  background-image: repeating-linear-gradient(
    to bottom, var(--hair) 0 2px, transparent 2px 7px);
}
.gl--h {
  left: 0; right: 0; height: 1px;
  background-image: repeating-linear-gradient(
    to right, var(--hair) 0 2px, transparent 2px 7px);
}

.shot {
  position: absolute;
  overflow: hidden;
  will-change: transform;
}
.shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.shot--gray img { filter: grayscale(1) contrast(.95); }

.home {
  flex: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--s-4);
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding: clamp(2rem, 5vh, 4rem) var(--pad) clamp(1.5rem, 4vh, 2.5rem);
}

.home__top    { display: grid; gap: var(--s-3); }
.home__mid    { display: grid; align-content: center; }
.home__bottom { display: grid; gap: var(--s-3); align-content: end; }

/* the main page carries its own masthead: the wordmark at size,
   with the studio's two cities on the same baseline */
.wordmark {
  font-size: var(--fs-mark);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.035em;
  white-space: nowrap;
}
.register--top { align-items: center; }
.register--top .label { padding-bottom: .35em; }

/* the navigation is now the centrepiece */
.register--bignav a {
  position: relative;
  display: inline-flex; align-items: center;
  min-height: 44px;                     /* comfortable target on touch */
  font-size: var(--fs-bignav);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.025em;
  text-transform: uppercase;
  padding-block: var(--s-1);
}
/* The index sits with the words only on phones. On a wide screen the
   001/002/003 row above already lines up over the three items, so
   repeating it there would just say the same thing twice. */
.bignav__idx { display: none; }

.register--bignav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: .18em;
  height: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: left center;
  transition: transform 480ms var(--e-out);
}
.register--bignav a:hover::after,
.register--bignav a:focus-visible::after { transform: scaleX(1); }

.statement {
  max-width: 62ch;
  margin-inline: auto;
  text-align: center;
  font-size: clamp(.9375rem, .82rem + .4vw, 1.125rem);
  line-height: 1.7;
  text-wrap: pretty;
}

/* ── the three words, travelling ────────────────────────────
   Two identical groups; the track slides exactly one group's
   width and restarts, so the loop has no visible seam. */
.ticker {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker__track {
  display: flex; width: max-content;
  animation: ticker 34s linear infinite;
}
.ticker:hover .ticker__track,
.ticker:focus-within .ticker__track { animation-play-state: paused; }

.ticker__group { display: flex; flex-shrink: 0; }

.ticker .word {
  font-size: clamp(.8125rem, .7rem + .35vw, 1rem);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding-inline-end: clamp(2rem, 6vw, 5rem);
  white-space: nowrap;
}
.ticker .word::after {
  content: '—';
  padding-inline-start: clamp(2rem, 6vw, 5rem);
  color: var(--ink-35);
}

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


/* ============================================================
   INNER PAGE SHELL
   ============================================================ */
.page {
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding: calc(var(--head-real) + var(--s-4)) var(--pad) var(--s-6);
  display: grid; gap: var(--s-4);
}

.page__head {
  display: flex; align-items: baseline; gap: clamp(1rem, 3vw, 2.5rem);
  flex-wrap: wrap;
}
.page__title {
  font-size: var(--fs-title);
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1.05;
  margin-right: auto;
}
.page__title:focus { outline: none; }
.page__count { font-size: var(--fs-label); letter-spacing: var(--track-label);
               text-transform: uppercase; color: var(--ink-55); }


/* ============================================================
   ABOUT
   ============================================================ */
.view--about .page {
  min-height: 100dvh; align-content: center;
  gap: var(--s-2); padding-bottom: var(--s-4);
}

.about__body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
  column-gap: clamp(2rem, 6vw, 6rem);
  row-gap: var(--s-4);
  align-items: start;
}

.about__text { display: grid; gap: var(--s-3); align-content: start; }

.lede {
  font-size: var(--fs-lede);
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: -.015em;
  text-wrap: pretty;
  max-width: 24ch;
}
.lede--tight { max-width: 26ch; }

.prose {
  max-width: 56ch;
  color: var(--ink-55);
  line-height: 1.75;
  text-wrap: pretty;
}

/* ── the studio ─────────────────────────────────────────────
   Two portraits side by side, kept deliberately modest: the
   studio text leads and About stays inside a single screen.
   Each frame holds its 4:5 shape whether or not a photograph
   has been added yet, so nothing shifts when one arrives. */
.people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.75rem, 1.6vw, 1.25rem);
  justify-self: end;
  width: 100%; max-width: clamp(260px, 26vw, 340px);
}

.person { display: grid; gap: var(--s-1); min-width: 0; }

.person__frame {
  aspect-ratio: 4 / 5;
  background: var(--hair-soft);
  border: 1px solid var(--hair);
  overflow: hidden;
  position: relative;
}
.person__frame img { width: 100%; height: 100%; object-fit: cover; }

.person__frame:empty::after {
  content: 'Portrait';
  position: absolute; inset: 0;
  display: grid; place-content: center;
  font-size: .625rem; letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--ink-35);
}

.person__caption { display: grid; gap: 1px; }
.person__name {
  font-size: .875rem; font-weight: 500; letter-spacing: -.01em;
  line-height: 1.3; text-wrap: balance;
}
.person__role {
  font-size: .625rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-55);
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-3);
}
.fact { display: grid; gap: var(--s-2); }
.fact dt {
  font-size: var(--fs-label); font-weight: 500;
  letter-spacing: var(--track-label); text-transform: uppercase;
  color: var(--ink-55);
}
.fact dd {
  font-size: clamp(1.75rem, 1rem + 2.6vw, 3.25rem);
  font-weight: 300; line-height: 1; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.fact .dd--sm { font-size: clamp(1rem, .8rem + .7vw, 1.375rem); letter-spacing: -.01em; }
.fact .plus { font-size: .5em; vertical-align: super; margin-left: .08em; }

.disciplines {
  display: flex; flex-wrap: wrap; gap: var(--s-2) clamp(1.5rem, 4vw, 3rem);
  font-size: var(--fs-label); font-weight: 500;
  letter-spacing: var(--track-label); text-transform: uppercase;
}


/* ============================================================
   FEATURED WORK
   ============================================================ */
/* Residential and Commercial, each under its own heading.
   Held tight on purpose: the headings are wayfinding, and every
   millimetre they don't take is a millimetre of the work showing
   above the fold. */
.view--work .page {
  gap: var(--s-2);
  padding-top: calc(var(--head-real) + var(--s-2));
}
/* Smaller than the heading on About or Contact. Those pages are mostly
   words, so the heading sets the scale; this one is a picture index,
   and every line of chrome above the first cover is a line of work the
   visitor cannot see. */
.view--work .page__title {
  line-height: 1;
  font-size: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
}

.workgroups { display: grid; gap: clamp(1.5rem, 2.6vw, 2.25rem); }
.workgroup  { display: grid; gap: var(--s-2); }

.workgroup__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-3);
}
.workgroup__title {
  font-size: clamp(.8125rem, .75rem + .2vw, .9375rem);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  line-height: 1;
}
.workgroup__count {
  font-size: var(--fs-label); font-weight: 500;
  letter-spacing: var(--track-label);
  color: var(--ink-55); font-variant-numeric: tabular-nums;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem) clamp(1rem, 2.5vw, 2.5rem);
}

/* four across on wide screens — two headed groups cost a row each,
   so this keeps the index compact now and as projects are added */
@media (min-width: 1400px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.tile a { display: grid; gap: var(--s-2); padding-bottom: var(--s-1); }

.tile__frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--hair-soft);
}
.tile__frame img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.001);
  transition: transform 1100ms var(--e-out), opacity 700ms var(--e-soft);
}
.tile a:hover .tile__frame img,
.tile a:focus-visible .tile__frame img { transform: scale(1.045); }

.tile__meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: var(--s-2);
}
.tile__name {
  font-size: clamp(1rem, .9rem + .35vw, 1.1875rem);
  font-weight: 500; letter-spacing: -.012em; line-height: 1.25;
}
.tile__year {
  font-size: var(--fs-label); letter-spacing: var(--track-label);
  color: var(--ink-55); font-variant-numeric: tabular-nums;
}
.tile__scope {
  grid-column: 2 / -1;
  font-size: var(--fs-label); letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-55);
}
.tile a:hover .tile__name { text-decoration: underline; text-underline-offset: .3em;
                            text-decoration-thickness: 1px; }

.grid__slot {
  aspect-ratio: 4 / 3;
  border: 1px dashed var(--hair);
  display: grid; place-content: center;
  font-size: var(--fs-label); letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--ink-35);
}


/* ============================================================
   PROJECT
   ============================================================ */
.back {
  display: inline-flex; align-items: center; gap: .6em;
  min-height: 44px;
  font-size: var(--fs-label); font-weight: 500;
  letter-spacing: var(--track-label); text-transform: uppercase;
}
.back .arrow { transition: transform 380ms var(--e-out); }
.back:hover .arrow { transform: translateX(-5px); }

.project__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end; gap: var(--s-2) var(--s-4);
}
.project__title {
  font-size: var(--fs-title);
  font-weight: 400; letter-spacing: -.025em; line-height: 1.05;
}
.project__title:focus { outline: none; }
.project__scope, .project__year {
  font-size: var(--fs-label); font-weight: 500;
  letter-spacing: var(--track-label); text-transform: uppercase;
  color: var(--ink-55); font-variant-numeric: tabular-nums;
}
.project__year { justify-self: end; }

/* sits opposite the scope, on the second line of the project header */
.project__credit {
  justify-self: end;
  font-size: var(--fs-label); font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-55);
  text-align: right;
}
.project__credit b { color: var(--ink); font-weight: 500; }

/* The project page is a column with the gallery as the elastic part,
   so the pictures grow into whatever the heading and footer leave —
   on a tall screen they get a lot, and on a short one nothing breaks. */
.view--project .page {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  gap: var(--s-2);
  padding-top: calc(var(--head-real) + var(--s-2));
  padding-bottom: var(--s-3);
}
.project__gallery { flex: 1; min-height: 0; display: flex; }

/* Back link and year share the top line; the title spans beneath;
   scope and any collaborator sit on the line under that. Three tight
   rows instead of a separate back-link row plus a two-row header. */
.view--project .project__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 4px var(--s-4);
}
/* The link stays visually compact so it costs the pictures almost no
   height, but its tappable area is opened back out to a full 44px with
   a pseudo-element, which sits outside layout and so pushes nothing
   down. A small mark, a comfortable target. */
.view--project .back {
  grid-area: 1 / 1; justify-self: start;
  min-height: 28px; position: relative;
}
.view--project .back::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 50%;
  height: 44px; transform: translateY(-50%);
}
.view--project .project__year   { grid-area: 1 / 2; justify-self: end; }
.view--project .project__title  { grid-area: 2 / 1 / 3 / 3; line-height: 1; }
.view--project .project__scope  { grid-area: 3 / 1; }
.view--project .project__credit { grid-area: 3 / 2; }

/* ── project gallery ────────────────────────────────────────
   A scroll-snap strip: the browser handles the swipe natively,
   so it keeps its momentum and feels right under a finger.

   The strip takes every pixel the page has left over rather than a
   fixed height, so the work is shown as large as the screen allows.
   The image is positioned rather than sized in percentages: a
   percentage height here resolves to `auto`, because the slide's own
   height comes from being stretched inside the flex strip and
   browsers treat that as indefinite — which silently clipped the
   middle out of every render. Absolute insets have no such problem.
   Images are letterboxed, never cropped: the whole render is
   always visible. */
.slider {
  display: flex; flex-direction: column; gap: var(--s-2);
  flex: 1; min-height: 0;
}

.slider__viewport {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex: 1; min-height: 260px;
  background: var(--hair-soft);
}
.slider__viewport::-webkit-scrollbar { display: none; }

.slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  position: relative;
  min-width: 0;
}
.slide img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
}

/* image controls on the left, the neighbouring projects on the right */
.slider__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-2) var(--s-3);
  flex-wrap: wrap;
}
.slider__controls { display: flex; align-items: center; gap: var(--s-2); }
.slider__btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: none; border: 1px solid var(--hair);
  cursor: pointer;
  font-size: 1rem; line-height: 1;
  transition: background 300ms var(--e-soft),
              border-color 300ms var(--e-soft),
              opacity 300ms var(--e-soft);
}
.slider__btn:hover:not(:disabled) { background: var(--hair-soft); border-color: var(--ink); }
.slider__btn:disabled { opacity: .3; cursor: default; }

.slider__count {
  font-size: var(--fs-label); font-weight: 500;
  letter-spacing: var(--track-label);
  color: var(--ink-55); font-variant-numeric: tabular-nums;
  min-width: 5.5ch; text-align: center;
}

.project__nav {
  display: flex; align-items: center;
  gap: var(--s-3); flex-wrap: wrap;
}
.project__nav a {
  display: inline-flex; align-items: baseline; gap: .6em;
  min-height: 44px;
  font-size: var(--fs-label); font-weight: 500;
  letter-spacing: var(--track-label); text-transform: uppercase;
}
.project__nav .pname { color: var(--ink-55); letter-spacing: .06em; }
.project__nav a:hover .pname { color: var(--ink); }


/* ============================================================
   CONTACT
   ============================================================ */
.view--contact .page {
  min-height: 100dvh; align-content: center;
  gap: var(--s-2); padding-bottom: var(--s-4);
}

.contact__body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: var(--s-4) clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.contact__rows { display: grid; align-content: start; }

.crow {
  display: grid;
  grid-template-columns: clamp(6rem, 12vw, 10rem) minmax(0, 1fr) auto;
  align-items: baseline;
  gap: var(--s-3);
  padding: clamp(.75rem, 1.6vw, 1.25rem) 0;
  border-bottom: 1px solid var(--hair);
  transition: padding-left 420ms var(--e-out);
}
.contact__rows .crow:first-child { border-top: 1px solid var(--hair); }
.crow:hover, .crow:focus-visible { padding-left: clamp(.5rem, 1.2vw, 1rem); }

.crow__label {
  font-size: var(--fs-label); font-weight: 500;
  letter-spacing: var(--track-label); text-transform: uppercase;
  color: var(--ink-55);
}
.crow__value {
  font-size: clamp(1.125rem, .8rem + 1.3vw, 1.875rem);
  font-weight: 300; letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.crow__arrow { font-size: 1rem; color: var(--ink-35);
               transition: transform 420ms var(--e-out), color 300ms; }
.crow:hover .crow__arrow { transform: translate(3px, -3px); color: var(--ink); }

/* ── write to us ────────────────────────────────────────────
   Fields are ruled rather than boxed, to sit with the hairlines
   the rest of the site is built from. */
.mailform { display: grid; gap: var(--s-2); align-content: start; }

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

.mailform__status {
  font-size: var(--fs-label);
  letter-spacing: .04em;
  line-height: 1.5;
  color: var(--ink-55);
  min-height: 1.2em;                  /* holds its line so nothing jumps */
}
.mailform__status.is-sent  { color: var(--ink); }
.mailform__status.is-error { color: var(--ink); }

.mailform__fallback {
  display: inline-flex; align-items: center; gap: .5em;
  min-height: 44px; margin-top: var(--s-1);
  font-weight: 500; letter-spacing: var(--track-label);
  text-transform: uppercase;
  text-decoration: underline; text-underline-offset: .3em;
}

.mailform__send:disabled { opacity: .5; cursor: default; }
.mailform__send:disabled:hover { background: var(--black); color: var(--cream); }

.mailform__title {
  font-size: var(--fs-label); font-weight: 500;
  letter-spacing: var(--track-label); text-transform: uppercase;
  color: var(--ink-55);
  line-height: 1;
}

.field { display: grid; gap: var(--s-1); }
.field label {
  font-size: var(--fs-label); font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-55);
}

.field input,
.field textarea {
  font: inherit;
  font-size: 1rem;                    /* 16px keeps iOS from zooming in */
  color: var(--ink);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--hair);
  padding: .625rem 0;
  min-height: 44px;                   /* comfortable target on touch */
  width: 100%;
  transition: border-color 300ms var(--e-soft);
}
.field textarea { resize: vertical; min-height: 84px; line-height: 1.6; }

.field input:hover,
.field textarea:hover { border-bottom-color: var(--ink-55); }
.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--ink); }
.field input:focus-visible,
.field textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.field__error {
  font-size: var(--fs-label);
  letter-spacing: .04em;
  color: var(--ink);
}
.field__error[hidden] { display: none; }
[aria-invalid="true"] { border-bottom-color: var(--ink) !important; border-bottom-width: 2px; }

.mailform__send {
  justify-self: start;
  display: inline-flex; align-items: center; gap: .6em;
  min-height: 44px; padding: 0 clamp(1rem, 2vw, 1.5rem);
  margin-top: var(--s-1);
  background: var(--black); color: var(--cream);
  border: 1px solid var(--black); cursor: pointer;
  font-size: var(--fs-label); font-weight: 500;
  letter-spacing: var(--track-label); text-transform: uppercase;
  transition: background 320ms var(--e-soft), color 320ms var(--e-soft);
}
.mailform__send:hover { background: transparent; color: var(--ink); }
.mailform__send span { transition: transform 380ms var(--e-out); }
.mailform__send:hover span { transform: translate(3px, -3px); }

.mailform__note {
  font-size: var(--fs-label);
  letter-spacing: .04em;
  color: var(--ink-55);
  line-height: 1.5;
}

.contact__foot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3) clamp(2rem, 6vw, 6rem);
}
.cfoot { display: grid; gap: var(--s-2); align-content: start; }
.cfoot .label { color: var(--ink-55); }
.cfoot p { max-width: 34ch; color: var(--ink-55); line-height: 1.7; }


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .grid  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4) var(--s-3); }
  .about__body { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  .lede { max-width: 28ch; }
}

@media (max-width: 760px) {
  /* Compact two-row header: the wordmark, then the three destinations
     spread edge to edge underneath. The index numbers come off — they
     cost width without helping anyone navigate on a phone — and every
     link keeps a full 44px target. */
  :root { --head-h: 96px; }

  .masthead { padding-block: .25rem; }
  .masthead__inner {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0;
  }
  .masthead__mark {
    font-size: 1rem; padding: 0;
    display: inline-flex; align-items: center;
    min-height: 44px; justify-self: start;
  }

  .masthead__nav {
    justify-self: stretch;
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: space-between;
    gap: var(--s-2);
  }
  .masthead__nav .idx { display: none; }
  .masthead__nav a {
    min-height: 44px;
    align-items: center;
    font-size: .6875rem;
    letter-spacing: .12em;
  }
  .masthead__nav a::after { bottom: 10px; }

  .register {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-2);
    text-align: left;
  }
  .register > :nth-child(1),
  .register > :nth-child(2),
  .register > :nth-child(3) { justify-self: start; text-align: left; }

  .register--marks { grid-template-columns: repeat(3, 1fr); }
  .register--marks > :nth-child(2) { justify-self: center; }
  .register--marks > :nth-child(3) { justify-self: end; }

  /* wordmark across the top, the two cities sharing the line below */
  .register--top {
    grid-template-columns: auto auto;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--s-1) var(--s-2);
  }
  .register--top .wordmark    { grid-area: 1 / 1 / 2 / 3; }
  .register--top .label       { grid-area: 2 / 1; justify-self: start; }
  .register--top .label--end  { grid-area: 2 / 2; justify-self: end; }

  /* numbers move down to sit with the words they belong to */
  .register--marks { display: none; }
  .register--bignav { gap: var(--s-1); }
  .register--bignav a { align-items: baseline; }
  .bignav__idx {
    display: inline-block;
    margin-right: .7em;
    font-size: var(--fs-label);
    font-weight: 500;
    letter-spacing: var(--track-label);
    color: var(--ink-55);
    font-variant-numeric: tabular-nums;
  }

  .mailform__pair { grid-template-columns: minmax(0, 1fr); }

  .home { gap: var(--s-4); }
  .statement { text-align: left; margin-inline: 0; }

  .about__body { grid-template-columns: minmax(0, 1fr); }
  .people { max-width: 280px; justify-self: start; }
  .lede { max-width: none; }

  .grid { grid-template-columns: minmax(0, 1fr); }

  .contact__body { grid-template-columns: minmax(0, 1fr); }
  .crow { grid-template-columns: minmax(0, 1fr) auto; row-gap: var(--s-1); }
  .crow__label { grid-column: 1 / -1; }

  .contact__foot { grid-template-columns: minmax(0, 1fr); }
  .project__head { grid-template-columns: minmax(0, 1fr); }
  .project__year { justify-self: start; }
  .project__credit { justify-self: start; text-align: left; }

  /* back link and year keep their shared top line, everything else
     stacks down the left */
  .view--project .project__head { grid-template-columns: auto auto; }
  .view--project .project__year   { grid-area: 1 / 2; justify-self: end; }
  .view--project .project__title  { grid-area: 2 / 1 / 3 / 3; }
  .view--project .project__scope  { grid-area: 3 / 1 / 4 / 3; }
  .view--project .project__credit { grid-area: 4 / 1 / 5 / 3; justify-self: start; }

  .slider__bar { justify-content: flex-start; }
  .project__nav { width: 100%; justify-content: space-between; }

  /* free to breathe past one screen on small devices */
  .view--about .page,
  .view--contact .page { min-height: 0; align-content: start; padding-block-end: var(--s-6); }
}

@media (max-width: 420px) {
  .landing__logo { width: min(76vw, 300px); }
}


/* ============================================================
   REDUCED MOTION — honour the system setting completely
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  [data-fx] { opacity: 1; transform: none; }
  .rule { transform: scaleX(1); }
  .tile a:hover .tile__frame img { transform: none; }
  .landing__cue { opacity: .8; }

  /* the words hold still and simply read across */
  .ticker__track { animation: none; }
  .ticker { -webkit-mask-image: none; mask-image: none; }
  .ticker__group:nth-child(2) { display: none; }
}


/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .masthead, .skip, .project__nav, .ticker, .landing__cue { display: none !important; }
  .view[hidden] { display: none !important; }
  [data-fx] { opacity: 1 !important; transform: none !important; }
  .rule { transform: none !important; }
  body { background: #fff; }
  .page, .home { padding-top: var(--s-4); }
}
