/* Lifestyle Access: design tokens. Components below reference these only.
   Ink, paper and one metal; the colour comes from Praj's film and photographs. */
:root {
  --background: 193 47% 10%; /* petrol ink #0D1F24: the shadow colour of the film */
  --surface: 193 47% 15%; /* deep petrol #143038 */
  --foreground: 38 39% 89%; /* paper #EEE6D8: an invitation card */
  --muted: 172 11% 62%; /* sea glass #93A9A6 */
  --faint: 182 11% 43%;
  --brass: 42 35% 55%; /* brass #B39B63: a hotel key tag. Hairlines and marks only */
  --line: 38 39% 89%;

  --shade-card: linear-gradient(180deg, hsl(var(--background) / 0.55) 0%, hsl(var(--background) / 0) 30%, hsl(var(--background) / 0) 46%, hsl(var(--background) / 0.88) 100%);
  --shade-hero: linear-gradient(180deg, hsl(var(--background) / 0.45) 0%, hsl(var(--background) / 0) 30%);

  /* one family, Libre Caslon: English printing type, the face of trade cards and club
     invitations. Display for names and titles, Text for reading and the italic notes. */
  --font-display: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
  --font-body: "Libre Caslon Text", Georgia, "Times New Roman", serif;

  /* sizes from the classic typographic scale: 13, 16, 21, 36, 48, 72 */
  --text-opening: clamp(2.75rem, 1.6rem + 5vw, 6rem);
  --text-title: clamp(2.5rem, 1.7rem + 3.6vw, 4rem);
  --text-label: 0.8125rem;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --radius: 3px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: hsl(var(--background));
  font: 400 1rem/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* film grain over everything, photographs included */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 1px solid hsl(var(--brass));
  outline-offset: 3px;
}

/* iPhone haptics: a transparent label over each tappable thing, wired to a hidden switch
   (see tapHaptics in feel.js) */
.haptic-tap {
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
  cursor: inherit;
  -webkit-tap-highlight-color: transparent;
}
.haptic-tap input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  visibility: hidden;
}
.icon-btn, .wordmark, .back, .pager a { position: relative; }

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

/* small labels are an italic note in sentence case, like a line written on stationery */
.label {
  font: italic 400 var(--text-label)/1.3 var(--font-body);
  color: hsl(var(--muted));
  font-variant-numeric: lining-nums tabular-nums;
}
.label-brass { color: hsl(var(--brass)); }

/* ---------- shared chrome ---------- */

.topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 6px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  /* the wordmark keeps its capitals: it is a logotype, like an engraved door plate */
  font: 400 0.9375rem/1 var(--font-display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* figures in display names (F1) take lining numerals, to sit with the capitals */
.fig { font-variant-numeric: lining-nums; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid hsl(var(--line) / 0.14);
  border-radius: 50%;
  background: transparent;
  color: hsl(var(--muted));
  cursor: pointer;
  transition: color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), scale 0.4s var(--spring);
}
.icon-btn:hover { color: hsl(var(--foreground)); border-color: hsl(var(--line) / 0.32); }
.icon-btn:active { scale: 0.88; transition-duration: 0.1s; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .ic-off { display: none; }
.icon-btn[aria-pressed="false"] .ic-on { display: none; }
.icon-btn[aria-pressed="false"] .ic-off { display: block; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 54px;
  padding: 0 28px;
  border-radius: var(--radius);
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  font: 400 1rem/1 var(--font-body);
  text-decoration: none;
  transition: background-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.btn:hover { background: hsl(var(--brass)); }
.btn:active { transform: scale(0.985); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* the discovery call: a WhatsApp circle that floats bottom right on every page. Its label
   slides out when it matters (first arrival, the end of a design) and folds back in. */
.fab {
  position: fixed;
  z-index: 40;
  right: calc(var(--gutter) + env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  height: 58px;
  border-radius: 29px;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  text-decoration: none;
  transition: background-color 0.3s var(--ease-out), scale 0.45s var(--spring);
}
.fab::before {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid hsl(var(--brass) / 0.45);
  border-radius: inherit;
  pointer-events: none;
  transition: inset 0.45s var(--ease-out), opacity 0.45s var(--ease-out);
}
.fab:hover { background: hsl(var(--brass)); }
.fab:active { scale: 0.92; transition-duration: 0.12s; }
.fab:active::before { inset: -11px; opacity: 0; }
.fab-icon { display: grid; place-items: center; width: 58px; height: 58px; flex: none; }
.fab-icon svg { width: 26px; height: 26px; }
.fab-label {
  overflow: hidden;
  max-width: 0;
  padding-left: 0;
  opacity: 0;
  white-space: nowrap;
  font: 400 0.9375rem/1 var(--font-body);
  transition: max-width 0.6s var(--ease-out), padding 0.6s var(--ease-out), opacity 0.35s var(--ease-out);
}
.fab.is-open .fab-label { max-width: 15rem; padding-left: 22px; opacity: 1; transition-delay: 0s, 0s, 0.1s; }
@media (prefers-reduced-motion: no-preference) {
  .fab { animation: fab-in 0.8s var(--spring) 0.75s backwards; }
}
@keyframes fab-in { from { opacity: 0; scale: 0.4; } }
@media (min-width: 960px) and (hover: hover) {
  .fab { bottom: 32px; }
  .fab .fab-label { max-width: 15rem; padding-left: 24px; opacity: 1; }
}

/* ---------- home ---------- */

/* one screen and two layers: Praj's film, and the designs over it. The first scroll raises the
   cards into the middle of the screen while the film steps back under a dark veil; every scroll
   after that moves the row. --t runs from 0 (the film) to 1 (the cards landed), set by deck.js
   from the same position that drives the row, so a finger or a wheel scrubs it either way. */
.home {
  --t: 0;
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none; /* every gesture here is the stage's */
}
.home .topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 30;
  pointer-events: none;
}
.home .topbar > * { pointer-events: auto; }
/* the sound toggle sits on the film, so it gets a little frosted glass */
.home .icon-btn {
  border-color: hsl(var(--line) / 0.22);
  background: hsl(var(--background) / 0.22);
  color: hsl(var(--foreground) / 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.stage { position: absolute; inset: 0; }

/* layer one: the film, the whole screen, with the title in the middle of it */
.opening {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: hsl(var(--background));
}
.reel {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* stepping back: a touch smaller and softly rounded, like a stage set behind the cards */
  overflow: hidden;
  border-radius: calc(var(--t) * 18px);
  scale: calc(1 - var(--t) * 0.06);
}
.reel-media { position: absolute; inset: 0; }
.reel img, .reel-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reel-video { opacity: 0; transition: opacity 1.4s var(--ease-out); }
.reel.is-playing .reel-video { opacity: 1; }
/* shade for the wordmark at the top, the title in the middle and the cue at the foot */
.reel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, hsl(var(--background) / 0.55) 0%, hsl(var(--background) / 0) 20%),
    radial-gradient(ellipse 95% 32% at 50% 50%, hsl(var(--background) / 0.66), hsl(var(--background) / 0.24) 62%, hsl(var(--background) / 0) 100%),
    linear-gradient(0deg, hsl(var(--background) / 0.85) 0%, hsl(var(--background) / 0.4) 10%, hsl(var(--background) / 0) 28%);
}
/* the veil: the film keeps playing, but darkened, so the cards take all the attention */
.veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: hsl(var(--background));
  opacity: calc(var(--t) * 0.76);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .reel { animation: fade-in 1.4s var(--ease-out) both; }
  .reel-media { animation: settle 2.6s var(--ease-out) both; }
}
@keyframes fade-in { from { opacity: 0; } }
@keyframes settle { from { transform: scale(1.06); } }

.opening-title {
  position: relative;
  z-index: 2;
  padding: 0 var(--gutter);
  text-align: center;
  text-shadow: 0 1px 2px hsl(var(--background) / 0.35), 0 2px 28px hsl(var(--background) / 0.6);
  /* the title lifts away and fades as the cards come up */
  opacity: calc(1 - var(--t) * 1.8);
  translate: 0 calc(var(--t) * -56px);
}
.opening-title h1 {
  margin: 0 0 18px;
  font: 400 var(--text-opening)/1 var(--font-display);
  letter-spacing: -0.012em;
  text-wrap: balance;
}
/* the credit under the title, in paper rather than brass: small type has to hold on any frame */
.opening-title .label { font-size: 1.125rem; color: hsl(var(--foreground) / 0.92); }

/* the way in: a hairline with a gold bead running along it */
.cue {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 0;
  translate: -50% 0;
  text-decoration: none;
  opacity: calc(1 - var(--t) * 3);
  transition: scale 0.4s var(--spring);
}
.cue:active { scale: 0.94; transition-duration: 0.1s; }
.cue .label { font-size: 0.9375rem; color: hsl(var(--foreground) / 0.8); }
.cue-line {
  position: relative;
  width: 1px;
  height: 40px;
  overflow: hidden;
  background: hsl(var(--line) / 0.22);
}
.cue-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 14px;
  background: hsl(var(--brass));
  translate: 0 -14px;
}
@media (prefers-reduced-motion: no-preference) {
  .cue-line::after { animation: cue 2.4s var(--ease-out) 1.6s infinite; }
}
@keyframes cue { 0% { translate: 0 -14px; } 70%, 100% { translate: 0 40px; } }

/* layer two: the deck, its readout, and the houses Praj has worked with. Out of the way
   (and out of the tab order) until the cards start to rise. */
.designs {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto auto;
  grid-template-areas: "deck" "readout" "collab";
  padding-top: calc(56px + env(safe-area-inset-top));
  pointer-events: none;
}
.designs > * { min-width: 0; }
.home.is-cards .designs { pointer-events: auto; }
.home:not(.has-cards) .designs { visibility: hidden; }
.designs .readout, .designs .collab { opacity: calc((var(--t) - 0.6) * 2.5); }
.designs .deck-ruler { opacity: calc((var(--t) - 0.5) * 2); }

/* the deck: a single row of cards. Clipped to its box: the cards out past the screen edge
   would otherwise widen a phone's layout viewport and push the page off-screen */
.deck {
  grid-area: deck;
  position: relative;
  z-index: 3;
  overflow: hidden;
  overflow: clip;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: grab;
  outline: none;
}
.deck.is-dragging { cursor: grabbing; }

.card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: hsl(var(--surface));
  color: hsl(var(--foreground));
  text-decoration: none;
  -webkit-user-drag: none;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px hsl(var(--line) / 0.14);
  pointer-events: none;
}
.card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  pointer-events: none;
}
/* the photo layer: scaled past the card edge so drift and parallax never show a border */
.card-media { position: absolute; inset: 0; overflow: hidden; will-change: transform; }
.card-media img { transform: scale(1.14); }
.card-shade { position: absolute; inset: 0; background: var(--shade-card); }
.card-top {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  color: hsl(var(--foreground) / 0.82);
}
.card-body {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 13px;
}
.card-name {
  display: block;
  font: 400 clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem)/1.02 var(--font-display);
  letter-spacing: -0.005em;
}
.card-line {
  display: block;
  margin-top: 7px;
  max-width: 36ch;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: hsl(var(--foreground) / 0.8);
  transition: opacity 0.35s var(--ease-out);
}
.card-dim {
  position: absolute;
  inset: 0;
  background: hsl(var(--background));
  opacity: var(--dim, 0);
  pointer-events: none;
}

.card-yours { background: hsl(var(--surface)); }
.card-yours::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid hsl(var(--brass) / 0.38);
  border-radius: 2px;
}
/* the house monogram, as on the favicon, watermarking the card */
.card-yours .crest {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -66%);
  font: 400 min(56vw, 16rem)/1 var(--font-display);
  color: hsl(var(--foreground));
  opacity: 0.12;
  pointer-events: none;
}
.card-yours .card-top, .card-yours .card-body { left: 22px; right: 22px; }
.card-yours .card-top { top: 20px; }
.card-yours .card-body { bottom: 20px; }

.design-head .place { display: flex; flex-wrap: wrap; gap: 0 0.9em; }

/* in a row only when the deck script runs: every card starts at the centre, and the
   script slides it along the line */
.js .deck .card {
  position: absolute;
  top: var(--cy, 50%);
  left: 50%;
  width: var(--card-w, 240px);
  height: var(--card-h, 300px);
  margin: calc(var(--card-h, 300px) / -2) 0 0 calc(var(--card-w, 240px) / -2);
  transform-origin: 50% 50%;
  will-change: transform;
  transition: scale 0.3s var(--ease-out);
}
.js .deck .card.is-pressed { scale: 0.965; transition-duration: 0.14s; }
/* only the centred card carries words; the others are photographs, and the text fades in
   as each card arrives */
.js .deck .card-top, .js .deck .card-body { transition: opacity 0.35s var(--ease-out); }
.js .deck .card:not(.is-center) :is(.card-top, .card-body) { opacity: 0; }

/* the ruler under the row: one hairline mark per design, the centred one taller and gold */
.deck-ruler {
  position: absolute;
  top: calc(var(--cy, 50%) + var(--card-h, 300px) / 2 + 20px);
  left: 50%;
  display: flex;
  align-items: flex-end;
  gap: 9px;
  height: 12px;
  translate: -50% 0;
  pointer-events: none;
}
.deck-ruler span {
  width: 1px;
  height: 6px;
  background: hsl(var(--foreground) / 0.28);
  transition: height 0.4s var(--ease-out), background-color 0.4s var(--ease-out);
}
.deck-ruler span.is-on { height: 12px; background: hsl(var(--brass)); }

/* micro motion: the centred photo drifts slowly; the others hold still until they arrive */
@media (prefers-reduced-motion: no-preference) {
  .card-media img { animation: drift-card 18s ease-in-out infinite alternate; animation-delay: var(--drift-delay, 0s); }
  .hero > img { animation: drift 18s ease-in-out infinite alternate; }
  .js .deck .card:not(.is-center) .card-media img { animation-play-state: paused; }
}
/* motion clips: a silent loop fades in over the photo once it is really playing */
.card-video, .hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s var(--ease-out);
}
.card-video { transform: scale(1.14); } /* the same overscan as the photo, for the parallax */
.card.is-playing .card-video, .hero.is-playing .hero-video { opacity: 1; }
.card.is-playing .card-media img { animation-play-state: paused; }

@keyframes drift-card {
  from { transform: scale(1.14) translate3d(-1.4%, 1%, 0); }
  to { transform: scale(1.2) translate3d(1.4%, -1.2%, 0); }
}
@keyframes drift {
  from { transform: scale(1.08) translate3d(-1.4%, 1%, 0); }
  to { transform: scale(1.15) translate3d(1.4%, -1.2%, 0); }
}

/* without the script the deck is a row you scroll sideways */
html:not(.js) .deck {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  align-items: center;
  padding: 12px var(--gutter);
  touch-action: auto;
  cursor: auto;
}
html:not(.js) .deck .card { flex: 0 0 62%; max-width: 320px; aspect-ratio: 4 / 5; scroll-snap-align: center; }
html:not(.js) .readout,
html:not(.js) .collab-this { display: none; }

.readout {
  grid-area: readout;
  display: flex;
  justify-content: center;
  gap: 0.9em; /* facts set apart by space, not by middle dots */
  padding: 12px var(--gutter) 0;
  white-space: nowrap;
  overflow: hidden;
}
.readout .ro-coords { color: hsl(var(--faint)); }
.readout [hidden] { display: none; }

/* left-aligned, and stopping short of the floating WhatsApp button on the right */
.collab {
  /* logos are white, and sized by build.py's --lh so a tall crest and a long word weigh the same */
  --logo: 26px;
  grid-area: collab;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 16px calc(var(--gutter) + 72px) calc(20px + env(safe-area-inset-bottom)) var(--gutter);
}
.collab > * { grid-area: 1 / 1; min-width: 0; transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out); }
.collab-label { display: block; color: hsl(var(--faint)); }
.collab-track {
  margin-top: 12px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 78%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 78%, transparent);
}
.collab-row {
  display: flex;
  align-items: center;
  gap: 44px;
  width: max-content;
  min-height: calc(var(--logo) * 1.7);
  padding-right: 44px;
  animation: marquee 40s linear infinite;
}
.collab-row img { height: calc(var(--logo) * var(--lh, 1)); width: auto; opacity: 0.62; }
.collab-this {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}
.collab-this-marks {
  display: flex;
  align-items: center;
  gap: 28px;
  height: calc(var(--logo) * 1.7);
  margin-top: 12px;
}
.collab-this-marks img { height: calc(var(--logo) * var(--lh, 1)); width: auto; }
.collab-this-marks .brand-text { font: 400 1.25rem/1 var(--font-display); }
.collab.has-this .collab-all { opacity: 0; transform: translateY(-6px); }
.collab.has-this .collab-this { opacity: 1; transform: none; }

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

/* load sequence */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.9s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms + 80ms); }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* short phones: give the deck the room */
@media (max-height: 640px) {
  .collab { --logo: 22px; padding-top: 10px; }
  .collab-track, .collab-this-marks { margin-top: 8px; }
  .fab { height: 50px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .fab-icon { width: 50px; height: 50px; }
  .fab-icon svg { width: 23px; height: 23px; }
  .fab .fab-label { font-size: 0.875rem; }
}

/* wide screens: the row runs the full width, and the readout and the collaborators share the
   bottom line */
@media (min-width: 960px) {
  :root { --gutter: 56px; --text-label: 0.875rem; }
  .topbar { padding-top: 24px; }
  .opening-title .label { font-size: 1.3125rem; }
  .designs {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas: "deck deck" "readout collab";
    padding-top: 88px;
  }
  .cue { bottom: 32px; }
  /* the row fades out at the edges of the screen instead of being cut off */
  .deck {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  }
  .readout { align-self: end; justify-content: flex-start; padding: 28px 0 40px var(--gutter); }
  /* stopping short of the floating button, whose label stays open on a wide screen */
  .collab { align-self: end; padding: 28px calc(var(--gutter) + 290px) 32px 0; }
  .collab-track { -webkit-mask-image: linear-gradient(90deg, #000 80%, transparent); mask-image: linear-gradient(90deg, #000 80%, transparent); }
}

/* ---------- design page ---------- */

.design-grid {
  display: grid;
  grid-template-areas: "top" "hero" "body";
  min-height: 100dvh;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  text-decoration: none;
  transition: color 0.25s var(--ease-out);
}
.back:hover { color: hsl(var(--foreground)); }
.back svg { width: 14px; height: 14px; }

.hero {
  grid-area: hero;
  position: relative;
  margin: 6px var(--gutter) 0;
  aspect-ratio: 16 / 9;
  max-height: 42dvh;
  width: auto;
  overflow: hidden;
  border-radius: var(--radius);
  background: hsl(var(--surface));
}
.hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  view-transition-name: hero;
}
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: var(--shade-hero); pointer-events: none; }
.hero.has-with::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  z-index: 1;
  background: linear-gradient(0deg, hsl(var(--background) / 0.75), transparent);
  pointer-events: none;
}
.hero .card-top { z-index: 2; }
/* the collaborating house, signed on the photograph itself */
.hero-with {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-with img { height: calc(24px * var(--lh, 1)); width: auto; }
.hero-with .brand-text { font: 400 1.125rem/1 var(--font-display); }
.tag-real {
  position: absolute;
  z-index: 2;
  left: 14px;
  bottom: 12px;
  padding: 6px 9px;
  border-radius: 2px;
  background: hsl(var(--background) / 0.7);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.design-body { grid-area: body; min-width: 0; }
.design-head { padding: 18px var(--gutter) 0; }
.design-head h1 {
  margin: 10px 0 14px;
  font: 400 var(--text-title)/1 var(--font-display);
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.lede {
  margin: 0;
  max-width: 34ch;
  font: italic 400 1.3125rem/1.34 var(--font-body);
  color: hsl(var(--foreground) / 0.86);
}

.block { padding: 22px var(--gutter) 0; }
.block > h2 { margin: 0 0 10px; }

.access {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid hsl(var(--line) / 0.12);
}
.access li {
  padding: 11px 0;
  border-bottom: 1px solid hsl(var(--line) / 0.12);
  line-height: 1.38;
}
/* a dated edition's days are a real sequence, so only they are numbered */
.access.is-days li { display: grid; grid-template-columns: 30px 1fr; }
.access .n { padding-top: 2px; font-style: normal; }
.access .day-title { display: block; font: 400 1.1875rem/1.15 var(--font-display); }
.access .day-text { display: block; margin-top: 3px; font-size: 0.875rem; color: hsl(var(--muted)); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips li {
  padding: 6px 11px;
  border: 1px solid hsl(var(--line) / 0.16);
  border-radius: 999px;
  font-size: 0.8125rem;
  line-height: 1.2;
  color: hsl(var(--foreground) / 0.86);
}

.quote { margin: 0; }
.quote p { margin: 0; font: italic 400 1.3125rem/1.4 var(--font-body); }
.quote footer { margin-top: 10px; }

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 22px var(--gutter) 0;
  padding: 14px 0;
  border-top: 1px solid hsl(var(--line) / 0.12);
}
.pager a { display: block; text-decoration: none; transition: translate 0.4s var(--spring); }
.pager a:active { translate: 0 1px; transition-duration: 0.1s; }
.pager a:last-child { text-align: right; }
.pager .pager-name { display: block; margin-top: 6px; font: 400 1.25rem/1.1 var(--font-display); transition: color 0.25s var(--ease-out); }
.pager a:hover .pager-name { color: hsl(var(--brass)); }

.foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  /* the bottom stays clear of the floating WhatsApp button */
  padding: 8px var(--gutter) calc(96px + env(safe-area-inset-bottom));
  color: hsl(var(--faint));
}
.foot a { text-decoration: none; }
.foot a:hover { color: hsl(var(--foreground)); }

@media (min-width: 960px) {
  .design-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "hero top" "hero body";
  }
  .hero {
    position: sticky;
    top: 0;
    height: 100dvh;
    max-height: none;
    aspect-ratio: auto;
    margin: 0;
    border-radius: 0;
  }
  .hero .card-top { top: 24px; left: 28px; right: 28px; }
  .tag-real { left: 28px; bottom: 24px; }
  .hero-with { right: 28px; bottom: 24px; }
  .hero-with img { height: calc(30px * var(--lh, 1)); }
  .design-top, .design-body { max-width: 680px; }
  .design-head { padding-top: 48px; }
}

/* page-to-page: the card image grows into the hero */
@view-transition { navigation: auto; }
::view-transition-group(hero) { animation-duration: 0.55s; animation-timing-function: var(--ease-out); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .collab-row { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
  .collab-row img[aria-hidden="true"] { display: none; }
}
