/* ===========================================================
   THE BRICK STORE — Surat
   Layout DNA: the running bond. Courses, offsets, mortar lines.
   =========================================================== */

:root {
  --paper: #efebe3;   /* mortar ground */
  --card:  #fffdf8;   /* the app card */
  --ink:   #201e1a;   /* fired-clay black */
  --brick: #a34c38;   /* the only accent */
  --kiln:  #6b3a2a;   /* deep fired ground */
  --sand:  #e5dfd3;
  --line:  rgba(32, 30, 26, .14);
  --mute:  rgba(32, 30, 26, .55);

  --mono: "Space Mono", ui-monospace, monospace;
  /* One typeface for everything. --display is kept as a role, not a
     second family, so display type can be tuned without a font swap. */
  --display: var(--mono);
  /* Space Mono has no Devanagari or Gujarati, so those two lines fall
     back to whatever the reader's system provides. Nothing extra is
     downloaded. */
  --indic: ui-sans-serif, system-ui, sans-serif;

  --r-card: 24px;   /* the app card */
  --r-tile: 14px;   /* image tiles, buttons */
  --r-chip: 8px;    /* icons, small blocks */

  --gut: 14px;      /* page gutter on mobile */
  --pad: 20px;      /* card inner padding */
  --ease: cubic-bezier(.22, .8, .28, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 11px/1.45 var(--mono);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; border: 0; background: none; cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.1; letter-spacing: -.06em; }

:focus-visible {
  outline: 2px solid var(--brick);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* A mortar line — the only divider used on this site. */
.mortar {
  height: 3px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

/* ===========================================================
   0. SPLASH — shown once, on a first visit only
   The name in the three languages this shop is spoken in, and a
   choice: come in with the film's sound, or come in quietly.
   =========================================================== */

/* Hidden by default. The inline script in the head adds .first-visit
   before the body paints, so a returning visitor sees nothing at all. */
.splash { display: none; }

.first-visit .splash {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  padding: 32px 24px calc(32px + env(safe-area-inset-bottom));
  background: var(--paper);
  text-align: center;
}
.first-visit { overflow: hidden; }

.splash-name p { margin: 0; }
.splash-name p {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(32, 30, 26, .42);
}
.splash-name p[lang="gu"],
.splash-name p[lang="hi"] { font-family: var(--indic); }
.splash-en {
  margin-top: 14px !important;
  font-weight: 700;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(28px, 9vw, 40px);
  letter-spacing: -.045em;
  text-transform: uppercase;
}

.splash-by {
  margin: -14px 0 0;
  font-size: 8px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mute);
}

.splash-do { display: grid; gap: 14px; justify-items: center; width: 100%; }

.splash-in {
  width: min(300px, 100%);
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 13px;
  background: var(--ink);
  color: var(--card);
  font-size: 10px;
  font-weight: 700;
  transition: transform .18s var(--ease);
}
.splash-in:active { transform: scale(.97); }
.splash-in svg {
  width: 17px; height: 17px;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

.splash-skip {
  padding: 6px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 9px;
  color: var(--mute);
  transition: color .2s;
}
.splash-skip:hover { color: var(--ink); }

@media (min-width: 640px) {
  .first-visit .splash { gap: 42px; }
  .splash-name p { font-size: 21px; }
  .splash-en { font-size: clamp(40px, 5vw, 58px); }
  .splash-by { font-size: 9px; }
}

/* ===========================================================
   1. HOME — the app card  (mobile is the reference design)
   =========================================================== */

.stage { padding: var(--gut) var(--gut) 40px; }

/* The card is a column: everything under the cover has a fixed height,
   so the cover itself takes whatever screen is left. On load you see the
   store and nothing else. */
.appcard {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--r-card);
  padding-bottom: var(--pad);
  overflow: hidden;
}

@media (min-height: 600px) {
  .appcard { height: calc(100svh - var(--gut) * 2); }
}

/* --- cover ------------------------------------------------ */
.cover {
  position: relative;
  flex: 1 1 auto;
  margin: 6px 6px 0;
  min-height: 220px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--sand);
}
.cover video,
.cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  background: var(--sand);
}

/* Sound sits opposite the avatar, at the quiet corner of the frame. */
.sound {
  position: absolute;
  z-index: 3;
  right: 12px; bottom: 12px;
  height: 34px;
  padding: 0 12px 0 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 253, 248, .9);
  border-radius: 11px;
  font-size: 7.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background .2s, transform .18s var(--ease);
}
.sound:active { transform: scale(.94); }
.sound b { font-weight: 400; }
.sound svg {
  width: 15px; height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sound .ico-play { fill: currentColor; stroke-width: 1.2; }

/* One button, three jobs — only the icon for the current state shows. */
.sound svg { display: none; }
.sound[data-state="quiet"] .ico-quiet,
.sound[data-state="loud"] .ico-loud,
.sound[data-state="idle"] .ico-play { display: block; }
.sound[data-state="loud"] { background: var(--ink); color: var(--card); }

/* the floating MENU pill */
.menubar {
  position: absolute;
  top: 12px; left: 12px; right: 12px;
  height: 46px;
  padding: 0 8px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border-radius: 13px;
  z-index: 3;
}
.menubar .mark {
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.burger {
  width: 46px; height: 46px;
  display: grid;
  place-content: center;
  gap: 5px;
}
.burger i {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--ink);
  transition: transform .35s var(--ease), opacity .2s;
}
.burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* --- identity --------------------------------------------- */
.avatar {
  position: relative;
  z-index: 2;
  flex: none;
  width: 78px; height: 78px;
  margin: -39px 0 0 var(--pad);
  padding: 4px;
  background: var(--card);
  border-radius: 50%;
}
.avatar-face {
  position: relative;
  display: block;
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--ink);
}
.avatar-face img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(.42) saturate(.7) contrast(1.15);
}
/* the wordmark, with the red brick where the I goes */
.avatar-face em {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1px;
  color: #fffdf8;
  font: 400 5.5px/1 var(--mono);
  letter-spacing: .16em;
  font-style: normal;
  text-transform: uppercase;
}
.avatar-face b {
  font: 700 14px/1 var(--display);
  letter-spacing: -.045em;
}
.avatar-face s {
  display: inline-block;
  width: 4px; height: 11px;
  margin: 0 1.5px;
  background: #a81f24;
  vertical-align: -1px;
  text-decoration: none;
}

.identity {
  flex: none;
  margin: var(--pad) var(--pad) 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.identity h1 {
  font-size: 20px;
  letter-spacing: -.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.identity h1 b {
  display: inline-grid;
  width: 14px; height: 14px;
  margin-left: 5px;
  place-items: center;
  border-radius: 50%;
  background: var(--brick);
  color: #fff;
  font-size: 8px;
  letter-spacing: 0;
  vertical-align: 3px;
}
.identity p { margin: 9px 0 0; font-size: 9px; color: var(--mute); }

.status { padding-top: 4px; font-size: 9px; color: var(--mute); white-space: nowrap; }
.status i {
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: #5fbf6b;
}
.status.shut i { background: #c4a14a; }

/* --- stats ------------------------------------------------ */
.stats {
  flex: none;
  margin: var(--pad);
  padding: 14px 2px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  background: var(--paper);
  border-radius: 12px;
}
.stats div + div { border-left: 1px solid var(--line); }
.stats dt, .stats dd { margin: 0; display: block; }
.stats dd {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.08em;
  font-variant-numeric: tabular-nums;
}
.stats dt {
  margin-top: 5px;
  font-size: 7px;
  letter-spacing: .1em;
  color: var(--mute);
  text-transform: uppercase;
}

/* --- actions ---------------------------------------------- */
.actions {
  flex: none;
  margin: -20px var(--pad) 20px;
  display: flex;
  gap: 9px;
}
.btn-fill {
  flex: 1;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--ink);
  color: var(--card);
  font-size: 10px;
  font-weight: 700;
  transition: transform .18s var(--ease), background .18s;
}
.btn-fill span { margin-left: 14px; font-size: 14px; }
.btn-fill:active { transform: scale(.975); }
.btn-ghost {
  width: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: transform .18s var(--ease), background .18s;
}
.btn-ghost:active { transform: scale(.94); }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ===========================================================
   2. LINK CARDS
   =========================================================== */

.links { margin-top: 14px; display: grid; gap: 10px; }

.link {
  min-height: 74px;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 13px;
  background: var(--card);
  border-radius: 16px;
  transition: transform .2s var(--ease), background .2s;
}
.link:active { transform: scale(.985); }
.link-ico {
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--card);
  border-radius: var(--r-chip);
}
.link strong { display: block; font-size: 11px; letter-spacing: -.05em; }
.link small { display: block; margin-top: 4px; font-size: 8.5px; color: var(--mute); }
.link em {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 7px;
  font-style: normal;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ===========================================================
   3. SECTIONS on the home stage
   =========================================================== */

.block { margin-top: 40px; }

.block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px 18px;
}
.block-head h2 {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: -.045em;
  text-transform: uppercase;
}
.block-head p { margin: 5px 0 0; font-size: 9px; color: var(--mute); max-width: 42ch; }
.block-head a { font-size: 8.5px; color: var(--mute); border-bottom: 1px solid var(--line); padding-bottom: 3px; }

/* --- featured: a horizontal course ------------------------ */
.course {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 2px 4px 4px;
  margin: 0 -4px;
  scrollbar-width: none;
}
.course::-webkit-scrollbar { display: none; }

.brick-tile {
  position: relative;
  flex: 0 0 74%;
  max-width: 320px;
  aspect-ratio: 3 / 4;
  scroll-snap-align: start;
  border-radius: var(--r-tile);
  overflow: hidden;
  background: var(--sand);
  color: #fff;
}
.brick-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.brick-tile::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(transparent 44%, rgba(20, 14, 10, .74));
}
.brick-tile figcaption {
  position: absolute;
  z-index: 2;
  left: 14px; right: 14px; bottom: 13px;
}
.brick-tile h3 {
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: -.055em;
  text-transform: uppercase;
  line-height: 1;
}
.brick-tile .meta { margin: 7px 0 0; font-size: 8px; opacity: .78; }
.brick-tile .series {
  position: absolute;
  z-index: 2;
  top: 11px; left: 11px;
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--brick);
  font-size: 7px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* --- selected work: a list, so the small type stays readable -- */
.worklist { display: grid; gap: 26px; }

.work { display: block; }
.work-shot {
  display: block;
  aspect-ratio: 5 / 4;
  border-radius: var(--r-tile);
  overflow: hidden;
  background: var(--sand);
}
.work-shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.work-line,
.work-spec {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}
.work-line { margin-top: 11px; }
.work-line b {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.045em;
  text-transform: uppercase;
}
.work-line i,
.work-spec s,
.work-spec u {
  font-style: normal;
  text-decoration: none;
  font-size: 8.5px;
  color: var(--mute);
}
.work-line i { text-align: right; }
.work-spec {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}
.work-spec s { color: var(--brick); }

/* --- visit ------------------------------------------------ */
.visit {
  margin-top: 34px;
  padding: 26px 20px 24px;
  border-radius: var(--r-card);
  background: var(--kiln);
  color: #f4ece6;
}
.visit h2 {
  font-family: var(--display);
  font-size: clamp(28px, 10vw, 42px);
  line-height: .98;
  letter-spacing: -.06em;
  text-transform: uppercase;
}
.visit-rows {
  margin-top: 28px;
  border-top: 1px solid rgba(244, 236, 230, .28);
}
.visit-rows div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(244, 236, 230, .18);
  font-size: 9.5px;
}
.visit-rows dt { color: rgba(244, 236, 230, .6); }
.visit-rows dd { margin: 0; text-align: right; }
.visit-rows a { border-bottom: 1px solid rgba(244, 236, 230, .4); padding-bottom: 1px; }
.visit .btn-fill {
  margin-top: 20px;
  padding: 0 22px;
  background: #f4ece6;
  color: var(--kiln);
}

.colophon {
  display: flex;
  justify-content: space-between;
  padding: 20px 4px 8px;
  font-size: 8.5px;
  color: var(--mute);
}
.colophon p { margin: 0; }

/* The section nav is desktop chrome. Below 1080 the tab bar does
   that job, so it would only repeat itself. */
.deck-nav { display: none; }

/* ===========================================================
   4. TAB BAR  (app chrome, mobile + tablet)
   =========================================================== */

.tabbar {
  position: fixed;
  z-index: 20;
  bottom: 10px; left: 12px; right: 12px;
  height: 58px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(26, 24, 21, .93);
  color: #fffdf8;
  border-radius: 19px;
  box-shadow: 0 12px 30px rgba(20, 14, 10, .26);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.tabbar a {
  position: relative;
  flex: 1;
  max-width: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 0;
  font-size: 7px;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .5;
  transition: opacity .25s;
}
.tabbar a.on { opacity: 1; }
.tabbar a.on::before {
  content: "";
  position: absolute;
  top: 2px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--brick);
}
.tabbar svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a:active { transform: scale(.9); }

/* Off for now. Delete this one rule to bring the bar back — the markup
   and the scrollspy that drives it are still in place. */
.tabbar { display: none; }

/* ===========================================================
   5. MENU SHEET
   =========================================================== */

.sheet-veil {
  position: fixed;
  inset: 0;
  z-index: 28;
  background: rgba(20, 14, 10, .38);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s, visibility .35s;
}
.sheet-veil.on { opacity: 1; visibility: visible; }

.sheet {
  position: fixed;
  z-index: 30;
  inset: auto 0 0;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
  background: var(--card);
  border-radius: 26px 26px 0 0;
  transform: translateY(101%);
  transition: transform .45s var(--ease);
}
.sheet.on { transform: none; }
.sheet .grab {
  width: 38px; height: 4px;
  margin: 0 auto 16px;
  border-radius: 99px;
  background: var(--line);
}
.sheet nav a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -.045em;
  text-transform: uppercase;
}
.sheet nav a span { font: 400 8px var(--mono); color: var(--mute); letter-spacing: .1em; }
.sheet nav a:last-child { border-bottom: 1px solid var(--line); }
.sheet .foot { margin: 16px 0 0; font-size: 8.5px; color: var(--mute); }

/* ===========================================================
   6. ARCHIVE
   The filter is the catalogue. The face swatches carry the page;
   everything around them stays quiet.
   =========================================================== */

.page-head { padding: 26px 2px 20px; }
.page-head h1 {
  font-family: var(--display);
  font-size: clamp(30px, 12vw, 46px);
  line-height: .95;
  letter-spacing: -.06em;
  text-transform: uppercase;
}
.page-head p {
  margin: 14px 0 0;
  font-size: 10px;
  color: var(--mute);
  max-width: 44ch;
  line-height: 1.75;
}

.picker { margin-bottom: 18px; }
.picker-title {
  margin: 0 2px 10px;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: -.045em;
  color: var(--mute);
}

/* --- the face swatches: the one bold thing on this page ----- */

.faces {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-left: 2px;
  padding: 2px 2px 6px;
  scrollbar-width: none;
}
.faces::-webkit-scrollbar { display: none; }

/* A button centres its own content, so a name that wraps to two lines
   would lift its swatch above the others. Laying the button out as a
   column pins every swatch to the same top edge. */
.face {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  width: 78px;
  padding: 0;
  scroll-snap-align: start;
  text-align: left;
  transition: transform .18s var(--ease);
}
.face:active { transform: scale(.95); }

.face-shot {
  position: relative;
  display: block;
  flex: none;
  aspect-ratio: 1;
  border-radius: var(--r-chip);
  overflow: hidden;
  background: var(--sand);
  box-shadow: inset 0 0 0 1px rgba(32, 30, 26, .07);
  transition: box-shadow .2s;
}
.face-shot img { width: 100%; height: 100%; object-fit: cover; }

/* the reset swatch is the only one without a photograph */
.face-all .face-shot {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--card);
}
.face-all .face-shot b {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: -.04em;
  text-transform: uppercase;
}

.face-name {
  display: block;
  margin-top: 7px;
  font-size: 8px;
  line-height: 1.35;
  color: var(--mute);
}
/* Two lines' worth, whether the name needs them or not, so the counts
   below sit on one line across the whole row. */
.face-name > span {
  display: block;
  min-height: 2.7em;
}
.face-name em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  opacity: .6;
}

/* chosen: the swatch is ringed in ink and its name comes forward */
.face.on .face-shot { box-shadow: 0 0 0 2px var(--ink); }
.face.on .face-name { color: var(--ink); }

/* --- the type pills ---------------------------------------- */

.types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 2px;
}
.type {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  background: var(--card);
  border-radius: var(--r-chip);
  font-size: 9px;
  letter-spacing: -.045em;
  transition: background .2s, color .2s;
}
.type em {
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--paper);
  font-style: normal;
  font-size: 7.5px;
  font-variant-numeric: tabular-nums;
  color: var(--mute);
  transition: background .2s, color .2s;
}
.type.on { background: var(--ink); color: var(--card); }
.type.on em { background: var(--brick); color: #fff; }

.tally {
  margin: 14px 2px 16px;
  font-size: 9px;
  letter-spacing: -.045em;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}

.empty {
  padding: 44px 2px;
  font-size: 10px;
  line-height: 1.8;
  color: var(--mute);
}
.empty button {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}

/* ===========================================================
   7. PROJECT PAGE
   =========================================================== */

/* the way back, always in the same corner */
.back {
  position: fixed;
  z-index: 22;
  top: 14px; left: 14px;
  height: 38px;
  padding: 0 15px 0 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 253, 248, .92);
  border-radius: 12px;
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(20, 14, 10, .12);
}
.back svg {
  width: 14px; height: 14px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.p-hero {
  position: relative;
  height: 54vh;
  min-height: 300px;
  max-height: 460px;
  margin: var(--gut) var(--gut) 0;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--sand);
}
.p-hero img {
  width: 100%; height: 116%;
  object-fit: cover;
  will-change: transform;
}

.p-head { padding: 26px var(--gut) 0; }
.p-head h1 {
  font-family: var(--display);
  font-size: clamp(28px, 9.4vw, 42px);
  line-height: .98;
  letter-spacing: -.06em;
  text-transform: uppercase;
}
.p-by { margin: 10px 0 0; font-size: 10px; color: var(--mute); }

/* The facts an architect asks for, in the order they ask for them. */
.p-spec {
  margin: 26px var(--gut) 0;
  padding: 4px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border-radius: var(--r-tile);
  overflow: hidden;
}
.p-spec div {
  padding: 15px 14px;
  background: var(--card);
}
.p-spec dt {
  font-size: 7.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--mute);
}
.p-spec dd {
  margin: 7px 0 0;
  font-size: 12px;
  letter-spacing: -.03em;
  line-height: 1.25;
}
.p-spec .hl { color: var(--brick); }

.p-brief {
  margin: 0;
  padding: 30px var(--gut) 34px;
  font-size: 12.5px;
  line-height: 1.9;
  max-width: 56ch;
}

/* The photographs, one per course, generously spaced. */
.p-shots {
  display: grid;
  gap: 12px;
  padding: 0 var(--gut);
}
.shot {
  position: relative;
  margin: 0;
  border-radius: var(--r-tile);
  overflow: hidden;
  background: var(--sand);
}
.shot img { width: 100%; height: auto; }
.shot figcaption {
  position: absolute;
  top: 10px; right: 10px;
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(20, 14, 10, .42);
  color: #fff;
  font-size: 8px;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.p-next {
  display: block;
  margin: 34px var(--gut) 0;
  padding: 24px 20px 26px;
  border-radius: var(--r-card);
  background: var(--card);
  transition: background .2s;
}
.p-next span { font-size: 8px; letter-spacing: .13em; text-transform: uppercase; color: var(--mute); }
.p-next h2 {
  margin-top: 12px;
  font-family: var(--display);
  font-size: clamp(24px, 8vw, 34px);
  letter-spacing: -.05em;
  text-transform: uppercase;
  line-height: .95;
}
.p-next p { margin: 10px 0 0; font-size: 9.5px; color: var(--mute); }

.colophon.p-foot { padding: 24px var(--gut) 140px; }

/* --- the enquiry bar --------------------------------------- */

/* Sits over the page for the whole visit: whatever photograph you have
   scrolled to, the way to ask about it is one tap away. */
.cta-bar {
  position: fixed;
  z-index: 24;
  left: 10px; right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  padding: 10px 10px 11px;
  display: grid;
  gap: 9px;
  background: rgba(255, 253, 248, .93);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(20, 14, 10, .18);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.cta-what {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 0 2px;
}
.cta-what img {
  width: 28px; height: 28px;
  flex: none;
  border-radius: 7px;
  object-fit: cover;
}
.cta-text { min-width: 0; }
.cta-what b {
  display: block;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: -.045em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cta-what em {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 7.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brick);
}

.cta-go {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--card);
  font-size: 10px;
  font-weight: 700;
  transition: transform .18s var(--ease);
}
.cta-go:active { transform: scale(.98); }
.cta-go .ico { width: 17px; height: 17px; }

/* ===========================================================
   8. MOTION defaults (GSAP sets the rest)
   =========================================================== */

[data-lay] { will-change: transform, opacity; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  [data-lay] { opacity: 1 !important; transform: none !important; }
}

/* ===========================================================
   9. TABLET  — 640px and up
   =========================================================== */

@media (min-width: 640px) {
  :root { --gut: 20px; --pad: 26px; }

  .stage { max-width: 720px; margin: 0 auto; padding-bottom: 56px; }
  .identity h1 { font-size: 24px; }
  .avatar { width: 88px; height: 88px; margin: -44px 0 0 var(--pad); }
  .stats dd { font-size: 17px; }

  .links { grid-template-columns: 1fr 1fr; }
  .link { min-height: 84px; }

  .block { margin-top: 46px; }
  .block-head h2 { font-size: 19px; }
  .brick-tile { flex-basis: 46%; }

  .visit { padding: 40px 32px 34px; }
  .visit-rows div { font-size: 10.5px; }

  .picker { margin-bottom: 22px; }
  .face { width: 92px; }
  .face-name { font-size: 8.5px; }
  .type { padding: 9px 12px; font-size: 9.5px; }



  .worklist { grid-template-columns: 1fr 1fr; gap: 22px 18px; }
  .work-line b { font-size: 17px; }

  .p-hero { height: 58vh; max-height: 560px; }
  .p-head { padding-top: 34px; max-width: 900px; margin: 0 auto; }
  .p-spec {
    max-width: 900px;
    margin: 30px auto 0;
    grid-template-columns: repeat(3, 1fr);
  }
  .p-spec dd { font-size: 13px; }
  .p-brief { max-width: 900px; margin: 0 auto; padding: 38px var(--gut) 38px; font-size: 13px; }
  .page-head { padding: 40px 2px 24px; }
  .p-shots { max-width: 900px; margin: 0 auto; gap: 16px; }
  .p-next { max-width: 900px; margin: 40px auto 0; padding: 34px 30px; }
  .colophon.p-foot { max-width: 900px; margin: 0 auto; padding-bottom: 116px; }

  .cta-bar {
    left: 50%;
    transform: translateX(-50%);
    width: min(680px, calc(100% - 40px));
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 10px 10px 10px 14px;
  }
  .cta-what b { font-size: 13px; }
  .cta-go { padding: 0 22px; }
  .page-head { padding: 40px 4px 20px; }
}

/* ===========================================================
   10. DESKTOP  — the sticky rail
   =========================================================== */

@media (min-width: 1080px) {
  :root { --gut: 28px; --pad: 26px; }

  body { padding-bottom: 0; }
  .tabbar { display: none; }

  .stage {
    max-width: 1560px;
    margin: 0 auto;
    padding: 20px 20px 20px;
    display: grid;
    grid-template-columns: 396px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
  }

  /* The rail stays put while the work scrolls past. It scrolls itself
     only when the window is too short to hold the card and the links. */
  .rail {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scrollbar-width: none;
  }
  .rail::-webkit-scrollbar { display: none; }

  .appcard { height: auto; }
  .cover { flex: none; height: clamp(200px, 34vh, 420px); min-height: 0; }
  .links { flex: none; }
  .menubar { display: none; }
  .identity h1 { font-size: 21px; }
  .links { grid-template-columns: 1fr; gap: 8px; }
  .link { min-height: 66px; border-radius: 14px; }
  .link:hover { background: #f7f2e9; }

  /* desktop nav lives on the stage, not in a bar over the photo */
  .deck { min-width: 0; }
  .deck-nav {
    position: sticky;
    top: 20px;
    z-index: 14;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 52px;
    padding: 0 8px 0 20px;
    background: rgba(255, 253, 248, .94);
    border: 1px solid rgba(32, 30, 26, .06);
    border-radius: 16px;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }
  .deck-nav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
  .deck-nav a {
    display: block;
    padding: 9px 13px;
    border-radius: 10px;
    font-size: 9px;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--mute);
    transition: background .2s, color .2s;
  }
  .deck-nav a:hover { color: var(--ink); }
  .deck-nav a.on { background: var(--ink); color: var(--card); }
  .deck-nav .clock { font-size: 9px; letter-spacing: .08em; color: var(--mute); padding-right: 12px; }

  .block { margin-top: 20px; }
  .block-head { padding: 4px 6px 16px; }
  .block-head h2 { font-size: 22px; }
  .block-head p { font-size: 10px; }

  .course { padding: 2px 6px 6px; margin: 0 -6px; }
  .brick-tile { flex: 0 0 300px; max-width: none; aspect-ratio: 3 / 4.1; }
  .brick-tile:hover img { transform: scale(1.05); }
  .brick-tile h3 { font-size: 20px; }

  /* Selected work: two wide rows, so each photograph gets real size. */
  .worklist { grid-template-columns: 1fr 1fr; gap: 30px 22px; }
  .work-shot { aspect-ratio: 3 / 2; }
  .work:hover .work-shot img { transform: scale(1.04); }
  .work-line { margin-top: 13px; }
  .work-line b { font-size: 20px; }
  .work-line i, .work-spec s, .work-spec u { font-size: 9px; }

  .visit { padding: 60px 48px 44px; }
  .visit h2 { font-size: clamp(52px, 5.4vw, 86px); }
  .visit-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: end; }
  .visit-rows { margin-top: 0; }
  .visit .btn-fill { height: 50px; }

  /* The swatch row stops scrolling and simply lays out — all eight
     faces visible at once is the whole point of the page. */
  .faces { flex-wrap: wrap; overflow: visible; gap: 10px; }
  .face { width: 104px; }
  .face:hover .face-shot { box-shadow: 0 0 0 2px var(--line); }
  .face.on:hover .face-shot { box-shadow: 0 0 0 2px var(--ink); }
  .face-name { font-size: 9px; margin-top: 8px; }
  .picker-title { font-size: 10px; margin-bottom: 12px; }
  .picker { margin-bottom: 28px; }

  .type { padding: 10px 13px; font-size: 10px; }
  .type:hover { background: #f7f2e9; }
  .type.on:hover { background: var(--ink); }
  .tally { font-size: 10px; margin: 18px 2px 20px; }



  .page-head { padding: 46px 2px 30px; }
  .page-head h1 { font-size: clamp(52px, 6vw, 92px); }
  .page-head p { font-size: 11px; max-width: 48ch; margin-top: 18px; }

  /* --- project page ---------------------------------------- */
  .p-hero {
    height: 76vh;
    max-height: none;
    margin: 20px 20px 0;
  }

  /* Title and facts sit side by side: the name reads big, the specs
     stay a quiet column beside it rather than a banner across it. */
  .p-head,
  .p-spec,
  .p-brief,
  .p-shots,
  .p-next,
  .p-foot { max-width: 1180px; margin-left: auto; margin-right: auto; }

  .p-head { padding: 56px 20px 0; }
  .p-head h1 { font-size: clamp(52px, 6vw, 96px); }
  .p-by { font-size: 12px; margin-top: 14px; }

  .p-spec {
    margin-top: 40px;
    grid-template-columns: repeat(6, 1fr);
  }
  .p-spec div { padding: 20px 18px; }
  .p-spec dd { font-size: 14px; }

  .p-brief {
    padding: 46px 44% 52px 20px;
    font-size: 15px;
    line-height: 1.95;
  }

  .p-shots { padding: 0 20px; gap: 22px; }
  .shot { border-radius: var(--r-card); }

  .p-next { margin-top: 64px; padding: 52px 44px; }
  .p-next:hover { background: #f9f4ec; }
  .p-next h2 { font-size: clamp(36px, 4vw, 62px); }
  .colophon.p-foot { padding: 34px 20px 120px; }

  .cta-bar { width: min(760px, calc(100% - 56px)); bottom: 18px; padding: 12px 12px 12px 16px; }
  .cta-what img { width: 34px; height: 34px; border-radius: 8px; }
  .cta-what b { font-size: 15px; }
  .cta-what em { font-size: 8px; }
  .cta-go { height: 50px; padding: 0 26px; font-size: 11px; }
  .cta-go:hover { background: #2c2924; }

  .back { top: 20px; left: 20px; }
  .back:hover { background: var(--card); }

  .colophon { padding: 26px 6px 10px; font-size: 9px; }
}

@media (min-width: 1500px) {
  .stage { grid-template-columns: 420px minmax(0, 1fr); }
  .brick-tile { flex-basis: 340px; }
}

/* ===========================================================
   11. Loose ends
   =========================================================== */

.stage-wide { max-width: 100%; padding-top: 62px; }

/* series tiles are a face, not a building — squarer, lighter */
.brick-tile.face { aspect-ratio: 1 / 1; flex-basis: 52%; }
.brick-tile.face img { filter: saturate(.95); }
.brick-tile.face::after { background: linear-gradient(transparent 40%, rgba(20, 14, 10, .78)); }
.brick-tile.face h3 { font-size: 14px; }

@media (min-width: 640px) {
  .stage-wide { max-width: 1000px; padding-top: 70px; }
  .brick-tile.face { flex-basis: 30%; }
}

@media (min-width: 1080px) {
  .stage-wide {
    max-width: 1180px;
    display: block;
    padding: 22px 28px 48px;
  }
  .brick-tile.face { flex: 0 0 210px; aspect-ratio: 1 / 1; }
  .brick-tile.face h3 { font-size: 15px; }
}

/* Long body copy on the project page reads better with a hanging first
   line than with a label above it. */
.p-brief::first-line { letter-spacing: -.01em; }

/* Safe areas on notched phones. */
@supports (padding: max(0px)) {
  @media (max-width: 1079px) {
    .stage { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
  }
}
