/* Site layout. Loads after tokens.css, motion.css, page-transitions.css, brand-egg.css.
   Colors, sizes and timing come from tokens.css; change them there. */

/* The static font files are separate families per width (see fonts.css). */
:root {
  --f-display: "Archivo ExtraCondensed", "Archivo", system-ui, sans-serif;
  --f-heading: "Archivo Condensed", "Archivo", system-ui, sans-serif;
  --f-lede: "Archivo SemiCondensed", "Archivo", system-ui, sans-serif;
  --f-body: "Archivo", system-ui, sans-serif;
  --maxw: 1600px;
  --header-h: 72px;
}
@media (max-width: 809px) { :root { --header-h: 60px; } }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { background: var(--c-paper); color: var(--c-ink); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  font-family: var(--f-body); font-size: var(--s-body); line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  background: var(--c-paper); min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img, picture, svg, iframe { display: block; max-width: 100%; }
picture { width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--c-teal); outline-offset: 3px; }

/* No widows or orphans: balance short lines, "pretty" paragraphs. */
h1, h2, h3, .label, .lede, .display, .headline, dt, dd, figcaption, .card__title { text-wrap-style: balance; }
p, li { text-wrap-style: pretty; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--margin); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--c-ink); color: var(--c-paper); padding: 8px 12px; }
.skip:focus { left: 8px; }

/* ---------------------------------------------------------------- type */
.display {
  font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  font-size: var(--s-display); line-height: 0.82; letter-spacing: -0.01em; color: var(--c-phthalo);
}
.headline { font-family: var(--f-heading); font-weight: 800; font-size: var(--s-headline); line-height: 0.98; letter-spacing: -0.005em; }
.lede { font-family: var(--f-lede); font-weight: 600; font-size: var(--s-lede); line-height: 1.17; }
.label {
  font-family: var(--f-label); font-weight: 500; font-size: var(--s-label); line-height: 20px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-teal);
}
p { max-width: 62ch; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--c-paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
}
.bar { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand__mark { color: var(--c-phthalo); display: inline-flex; padding: 4px; }
.brand__mark .pmark { width: 22px; height: 26px; }
.brand__name { color: var(--c-ink); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav__link, .index-btn.label {
  font-family: var(--f-label); font-weight: 500; font-size: var(--s-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-ink);
}
.nav__link { background: linear-gradient(var(--c-teal), var(--c-teal)) 0 100% / 0 1px no-repeat; transition: background-size var(--d-base) var(--e-out); padding: 4px 0; }
.nav__link:hover, .nav__link[aria-current="page"] { background-size: 100% 1px; }
.index-btn { display: inline-flex; align-items: center; gap: 10px; }
.index-btn .qr-mark { color: var(--c-teal); }
@media (max-width: 809px) {
  .nav__link { display: none; }
  .brand__name { font-size: 12px; }
}

/* ---------------------------------------------------------------- sections */
.section { padding-top: 96px; padding-bottom: var(--section); }
.section--tight { padding-top: 48px; }
.section__label { margin-bottom: 32px; }
.page-head { padding-top: 96px; }
.page-head .lede { margin-top: 28px; max-width: 30ch; }
.page-head--404 { padding-bottom: var(--section); }
@media (max-width: 809px) { .section { padding-top: 64px; } .page-head { padding-top: 48px; } }

.more { max-width: none; margin-top: 80px; display: flex; gap: 32px; flex-wrap: wrap; font-family: var(--f-lede); font-weight: 600; font-size: 22px; }
.more a, .more button { color: var(--c-ink); }

/* ---------------------------------------------------------------- home */
.hero { padding-top: clamp(56px, 10vh, 120px); padding-bottom: 24px; }
.hero__name { max-width: 10ch; }
.hero__line { margin-top: 40px; max-width: 28ch; color: var(--c-ink); }
.hero__status { margin-top: 20px; color: var(--c-stone); font-size: 18px; }

/* ---------------------------------------------------------------- grids + cards */
.grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--grid-gap); row-gap: var(--row-gap); }
@media (min-width: 810px) { .grid--stagger > :nth-child(even) { margin-top: 120px; } }
@media (max-width: 809px) { .grid { grid-template-columns: 1fr; } }
.card { display: block; }
.card__frame { background: var(--c-rule); }
.card__frame picture { height: 100%; }
.card__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 18px; }
.card__title { font-family: var(--f-heading); font-weight: 800; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.05; }
.card__meta .label { flex-shrink: 0; text-align: right; max-width: 45%; }
.card__line { margin-top: 8px; font-size: 16px; line-height: 1.4; color: var(--c-stone); max-width: none; }
.grid--stagger { row-gap: clamp(48px, 6vw, 96px); }
@media (max-width: 809px) { .card__meta { flex-direction: column; gap: 4px; } .card__meta .label { text-align: left; max-width: none; } }
.nw { white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.chip {
  padding: 8px 14px; border: 1px solid var(--c-rule); color: var(--c-ink);
  transition: background var(--d-fast) var(--e-out), border-color var(--d-fast) var(--e-out), color var(--d-fast) var(--e-out);
}
.chip:hover { border-color: var(--c-teal); }
.chip[aria-current="page"] { background: var(--c-phthalo); border-color: var(--c-phthalo); color: var(--c-paper); }

/* ---------------------------------------------------------------- project + set pages */
.project, .set { padding-bottom: var(--section); }
.rail { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 6px; padding-top: 28px; }
.rail__seg a { display: block; }
.rail__bar { position: relative; display: block; height: 2px; background: var(--c-rule); }
.rail__seg.is-here .rail__bar { background: var(--c-teal); }
.rail__bar .qr-mark { position: absolute; left: 0; top: -12px; color: var(--c-teal); }
.rail__name { display: block; margin-top: 8px; color: var(--c-stone); font-size: 11px; }
.rail__seg.is-here .rail__name { color: var(--c-teal); }
@media (max-width: 809px) { .rail__name { display: none; } .rail { padding-top: 20px; } }

.project__head { padding-top: 72px; }
.project__head .label a:hover { text-decoration: underline; text-underline-offset: 3px; }
.project__title { margin-top: 16px; font-size: clamp(44px, 6.4vw, 104px); max-width: 16ch; color: var(--c-phthalo); }
.project__intro { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); margin-top: 40px; }
.project__intro .lede { grid-column: 1 / span 7; }
.facts { grid-column: 9 / span 4; display: grid; gap: 14px; border-top: 1px solid var(--c-rule); padding-top: 16px; font-size: 16px; line-height: 1.45; }
.facts dt { font-size: 11px; line-height: 16px; }
.facts dd { margin-top: 2px; }
@media (max-width: 1100px) { .project__intro .lede, .facts { grid-column: 1 / -1; } }

.project__hero, .set__opener { margin-top: 72px; }
.project__body { margin: 96px 0 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); }
.project__body p { grid-column: 4 / span 7; font-size: 22px; line-height: 1.55; }
@media (max-width: 1100px) { .project__body p { grid-column: 1 / -1; font-size: 20px; } }

.gallery, .process { margin-top: var(--row-gap); display: grid; gap: var(--row-gap); }
.process { padding-top: 48px; border-top: 1px solid var(--c-rule); }
.row { display: flex; justify-content: center; }
.row--pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--grid-gap); align-items: start; }
@media (max-width: 809px) { .row--pair { grid-template-columns: 1fr; gap: var(--row-gap); } }
.fig { width: 100%; }
.fig--mid { width: min(100%, 50%); }
.fig--tall { width: min(100%, 42%); }
@media (max-width: 809px) { .fig--mid, .fig--tall { width: 100%; } }
figcaption { margin-top: 12px; font-size: 14px; line-height: 1.4; color: var(--c-stone); }
.img-missing {
  display: grid; place-items: center; text-align: center; width: 100%;
  background: repeating-linear-gradient(-45deg, var(--c-rule) 0 12px, #e2e5df 12px 24px);
  color: var(--c-stone); font: 500 12px/1.5 var(--f-label); letter-spacing: 0.05em; padding: 16px;
}
.card__frame .img-missing { height: 100%; }

.video__frame { position: relative; aspect-ratio: 16 / 9; background: var(--c-ink); }
.video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video { margin-top: var(--row-gap); }

.pn { display: grid; grid-template-columns: 1fr 1fr; gap: var(--grid-gap); margin-top: var(--section); padding-top: 48px; border-top: 1px solid var(--c-rule); }
.pn__item { display: grid; gap: 16px; }
.pn__item:hover img { transform: scale(1.035); }
.pn__item .card__frame img { transition: transform var(--d-slow) var(--e-out); }
.pn__title { font-size: clamp(28px, 3vw, 44px); }
@media (max-width: 809px) { .pn { grid-template-columns: 1fr; gap: 64px; } }
.more--split { justify-content: space-between; }

.set__meta { margin-top: 16px; color: var(--c-stone); }
.set__statement { margin-top: 28px; max-width: 32ch; }
.masonry { columns: 2; column-gap: var(--grid-gap); margin-top: var(--grid-gap); }
.masonry .fig { break-inside: avoid; margin-bottom: var(--grid-gap); }
@media (max-width: 809px) { .masonry { columns: 1; } }

/* ---------------------------------------------------------------- about */
.about { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); padding-top: 64px; padding-bottom: var(--section); }
.about__photo { grid-column: 1 / span 5; align-self: start; position: sticky; top: calc(var(--header-h) + 24px); }
.about__text { grid-column: 7 / span 6; }
.about--nophoto .about__text { grid-column: 1 / span 8; }
.about__text > p + p, .about__text .lede + p { margin-top: 20px; }
.about__h { margin-top: 64px; }
.how { margin-top: 20px; display: grid; gap: 18px; }
.how li { padding-top: 18px; border-top: 1px solid var(--c-rule); }
.how strong { font-weight: 700; }
.facts--about { margin-top: 64px; }
@media (max-width: 1100px) {
  .about__photo { grid-column: 1 / span 12; position: static; max-width: 560px; }
  .about__text, .about--nophoto .about__text { grid-column: 1 / -1; margin-top: 40px; }
}

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--c-phthalo); color: var(--c-paper); padding: 72px 0 32px; }
.footer__cta { color: var(--c-paper); max-width: none; font-size: clamp(36px, 4.4vw, 64px); }
.footer__email { display: inline-block; margin-top: 20px; color: var(--c-mint); overflow-wrap: anywhere; font-size: clamp(22px, 2.2vw, 32px); }
.footer__row { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; margin-top: 56px; padding-top: 24px; border-top: 1px solid color-mix(in srgb, var(--c-paper) 22%, transparent); }
.footer__mark { color: var(--c-mint); display: inline-flex; }
.footer__mark .pmark { width: 20px; height: 24px; }
.footer__nav { display: flex; gap: 24px; color: var(--c-paper); }
.footer__nav a:hover { color: var(--c-mint); }
.footer__small { margin-left: auto; font-size: 14px; color: color-mix(in srgb, var(--c-paper) 70%, transparent); max-width: none; }
@media (max-width: 809px) { .site-footer { padding-top: 56px; } .footer__row { margin-top: 40px; } .footer__small { margin-left: 0; } }

/* ---------------------------------------------------------------- index overlay */
.ix { min-height: 100%; display: flex; flex-direction: column; padding-bottom: 40px; }
.index-overlay { overflow-y: auto; overscroll-behavior: contain; }
.ix__top { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; }
.ix__top .label, .ix__top .index-btn { color: var(--c-mint); }
.ix__top .index-btn .qr-mark { color: var(--c-mint); }
.ix__body { flex: 1; display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); padding: 32px 0 48px; align-content: center; }
.ix__lists { grid-column: 1 / span 7; display: grid; gap: 32px; }
.ix__chapter { color: var(--c-mint); margin-bottom: 8px; }
.ix__link { display: flex; align-items: baseline; gap: 16px; padding: 4px 0; }
.ix__num { color: color-mix(in srgb, var(--c-paper) 55%, transparent); width: 2.2em; flex-shrink: 0; }
.ix__title { font-family: var(--f-heading); font-weight: 800; font-size: clamp(28px, 3.4vw, 52px); line-height: 1.02; transition: color var(--d-fast) var(--e-out), transform var(--d-base) var(--e-out); }
.ix__link:hover .ix__title, .ix__link:focus-visible .ix__title { color: var(--c-mint); transform: translateX(8px); }
.index-overlay__preview { grid-column: 9 / span 4; position: relative; align-self: start; height: 0; padding-bottom: 100%; pointer-events: none; opacity: 0; transform: translateY(var(--preview-y, 0px)); transition: transform var(--d-base) var(--e-out), opacity var(--d-fast) var(--e-out); }
.index-overlay__preview.is-on { opacity: 1; }
.index-overlay__preview picture { position: absolute; inset: 0; }
.index-overlay__preview img { width: 100%; height: 100%; object-fit: cover; }
.ix__foot { display: flex; flex-wrap: wrap; gap: 12px 28px; border-top: 1px solid color-mix(in srgb, var(--c-paper) 22%, transparent); padding-top: 24px; font-size: 18px; }
@media (max-width: 1000px) { .ix__lists { grid-column: 1 / -1; } .index-overlay__preview { display: none; } }
@media (prefers-reduced-motion: reduce) { .index-overlay__preview { transition: none; } }
html.ix-open { overflow: hidden; }


/* ---------------------------------------------------------------- cover band (home) */
.cover { background: var(--c-phthalo); color: var(--c-paper); padding: 32px 0 56px; overflow: hidden; }
.cover__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); align-items: end; }
.cover__left { grid-column: 1 / span 8; min-width: 0; }
.cover__name { margin-top: 32px; }
.cover__first { display: block; color: var(--c-mint); font-size: clamp(48px, 7vw, 110px); line-height: 0.85; }
.cover__last { display: block; width: auto; height: clamp(72px, 16vh, 180px); max-width: 100%; margin-top: clamp(16px, 2.4vw, 40px); }
/* Tagline: one sentence per line when there's room; balanced wrapping when there isn't. */
.cover .hero__line { color: var(--c-paper); margin-top: 32px; max-width: 46ch; text-wrap: balance; }
.hero__sent { display: inline; }
@media (min-width: 1100px) { .hero__sent { display: block; } }
.cover .hero__status { color: color-mix(in srgb, var(--c-paper) 70%, transparent); max-width: none; }

/* Reel: featured covers crossfade inside a quarter-round frame. */
.reel { grid-column: 9 / span 4; align-self: end; }
.reel__frame { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 50% 0 0 0; background: color-mix(in srgb, var(--c-ink) 40%, var(--c-phthalo)); }
.reel__item { position: absolute; inset: 0; opacity: 0; transition: opacity 1200ms var(--e-inout); }
.reel__item.is-on { opacity: 1; z-index: 1; }
.reel__item picture, .reel__item img { width: 100%; height: 100%; object-fit: cover; }
.reel__item img { transform: scale(1.06); transition: transform 7000ms linear; }
.reel__item.is-on img { transform: scale(1); }
.reel__cap { margin-top: 14px; color: var(--c-mint); display: flex; align-items: center; gap: 10px; max-width: none; }
.reel__title { transition: opacity var(--d-base) var(--e-out); }
@media (max-width: 1100px) { .cover__left { grid-column: 1 / span 12; } .reel { display: none; } }
@media (max-width: 809px) { .cover { padding-bottom: 48px; } }
@media (prefers-reduced-motion: reduce) { .reel__item img { transform: none; transition: none; } }

/* ---------------------------------------------------------------- v8 refinements */
/* Text measures size to their column rather than a hard cut. */
.page-head .lede { max-width: 40ch; text-wrap: balance; }
.set__statement { max-width: 44ch; text-wrap: balance; }
.card__line { max-width: 52ch; }

/* Thumbnail hover: a quarter-round grows from the lower-left corner and carries a label. */
.card__tag {
  position: absolute; left: 0; bottom: 0; z-index: 2; pointer-events: none;
  width: clamp(120px, 34%, 220px); aspect-ratio: 1 / 1;
  background: var(--c-phthalo); border-radius: 0 100% 0 0;
  transform: scale(0); transform-origin: 0 100%;
  transition: transform var(--d-slow) var(--e-out);
  display: flex; align-items: flex-end;
}
.card__tag .label { color: var(--c-mint); padding: 0 0 clamp(14px, 1.6vw, 22px) clamp(14px, 1.6vw, 22px); opacity: 0; transform: translateY(6px); transition: opacity var(--d-base) var(--e-out), transform var(--d-base) var(--e-out); white-space: nowrap; }
.card:hover .card__tag, .card:focus-visible .card__tag, .pn__item:hover .card__tag, .pn__item:focus-visible .card__tag { transform: scale(1); }
.card:hover .card__tag .label, .card:focus-visible .card__tag .label, .pn__item:hover .card__tag .label, .pn__item:focus-visible .card__tag .label { opacity: 1; transform: none; transition-delay: 160ms; }
@media (hover: none) { .card__tag { display: none; } }

/* Quarter-round pointer on the highest-level links only (cards, index titles, reel, email). */
@media (hover: hover) and (pointer: fine) {
  .card, .pn__item, .ix__link, .reel__item, .footer__email {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M2 2H26A24 24 0 0 1 2 26Z' fill='%2312806F' stroke='%23F2F0EA' stroke-width='1.5'/%3E%3C/svg%3E") 2 2, pointer;
  }
  .index-overlay .ix__link, .cover .reel__item, .site-footer .footer__email {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M2 2H26A24 24 0 0 1 2 26Z' fill='%239FE0C9' stroke='%230D3A33' stroke-width='1.5'/%3E%3C/svg%3E") 2 2, pointer;
  }
}

/* Index: a line draws from the hovered title to its preview; click anywhere empty to close. */
.ix__body { position: relative; }
.ix__line { position: absolute; left: 0; top: 0; height: 1px; width: 0; background: var(--c-mint); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; opacity: 0; }
.ix__line.is-on { opacity: 1; transform: scaleX(1); transition: transform var(--d-slow) var(--e-out), opacity var(--d-fast) var(--e-out); }
.ix__cue { position: fixed; left: 0; top: 0; z-index: 3; pointer-events: none; display: flex; align-items: center; gap: 8px; color: var(--c-mint); opacity: 0; transition: opacity var(--d-fast) var(--e-out); }
.ix__cue .qr-mark { transform: rotate(90deg); }
.ix__cue.is-on { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .index-overlay.is-open { cursor: pointer; } .index-overlay.is-open.cue-on { cursor: none; } }
@media (hover: none), (max-width: 1000px) { .ix__line, .ix__cue { display: none; } }

/* About photo + hidden photos: tap the quarter-round in the corner. */
.about__frame { position: relative; overflow: hidden; }
.egg__layer { position: absolute; inset: 0; clip-path: circle(0% at 100% 100%); transition: clip-path var(--d-page) var(--e-inout); }
.egg__layer.is-on { clip-path: circle(150% at 100% 100%); }
.egg__layer picture, .egg__layer img { width: 100%; height: 100%; object-fit: cover; }
.about__row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 12px; }
.egg__btn { display: inline-flex; align-items: center; gap: 10px; color: var(--c-stone); flex-shrink: 0; min-height: 32px; }
.egg__btn .qr-mark { color: var(--c-teal); }
.egg__btn:hover, .egg__btn:focus-visible { color: var(--c-teal); }
.about__cap { min-height: 20px; font-size: 14px; line-height: 1.4; color: var(--c-stone); }
/* The About photo is a small original; it stays at a size it can hold. */
.about__photo { max-width: 420px; }
@media (min-width: 1101px) { .about__text { grid-column: 6 / span 7; } }
.cover__lockup { margin-top: clamp(24px, 4vw, 56px); height: clamp(80px, 18vh, 200px); }
/* The interlocked lockup needs width; on phones the two-line version reads better. */
.cover__name--small { display: none; }
@media (max-width: 809px) { .cover__name--lockup { display: none; } .cover__name--small { display: block; } }

/* ---------------------------------------------------------------- v8.1 (Oct 22 AM) */
/* Project pages: art first, then the description, then collapsible details. */
.project__head { padding-top: 56px; }
.project__hero { margin-top: 40px; }
.project__desc { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); margin-top: 56px; }
.project__desc > .lede { grid-column: 1 / span 8; }
.project__desc .project__body { grid-column: 1 / -1; margin-top: 8px; }
.specs { grid-column: 4 / span 7; margin-top: 8px; border-top: 1px solid var(--c-rule); }
.specs summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 16px 0; color: var(--c-teal); }
.specs summary::-webkit-details-marker { display: none; }
.specs summary .qr-mark { transition: transform var(--d-base) var(--e-out); }
.specs[open] summary .qr-mark { transform: rotate(-90deg); }
.specs .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; border-top: 0; padding: 0 0 20px; }
@media (max-width: 1100px) { .project__desc > .lede, .specs { grid-column: 1 / -1; } }

/* Tighter rhythm on tablets and phones. */
@media (max-width: 1100px) { :root { --row-gap: 72px; --section: 112px; } }
@media (max-width: 809px) {
  :root { --row-gap: 40px; --section: 72px; --grid-gap: 20px; }
  .project__head { padding-top: 32px; }
  .project__hero { margin-top: 24px; }
  .project__desc { margin-top: 32px; }
  .project__body p { font-size: 18px; line-height: 1.5; }
  .project__body { margin-top: 0; }
  .section { padding-top: 48px; }
  .grid--stagger { row-gap: 48px; }
  .pn { padding-top: 32px; gap: 40px; }
  .more { margin-top: 48px; }
  .page-head { padding-top: 32px; }
  .about { padding-top: 32px; }
}

/* Index: chapter headings, indented Roman-numeral rows, Photography set apart. */
.ix__sum { list-style: none; display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.ix__sum::-webkit-details-marker { display: none; }
.ix__sum .ix__chapter { margin: 0; }
.ix__count { color: color-mix(in srgb, var(--c-paper) 45%, transparent); display: none; }
.ix__link { padding-left: clamp(16px, 2.4vw, 36px); }
.ix__num { text-transform: lowercase; letter-spacing: 0.06em; width: 2.6em; }
.ix__group--photo { border-top: 1px solid color-mix(in srgb, var(--c-paper) 22%, transparent); padding-top: 28px; margin-top: 8px; }
.ix__group--photo .ix__title { font-size: clamp(24px, 2.6vw, 40px); }
@media (max-width: 1000px) {
  .ix__lists { gap: 0; }
  .ix__group { border-top: 1px solid color-mix(in srgb, var(--c-paper) 18%, transparent); }
  .ix__group--photo { margin-top: 0; padding-top: 0; }
  .ix__sum { cursor: pointer; justify-content: space-between; padding: 18px 0; margin: 0; }
  .ix__sum::after { content: ""; width: 12px; height: 12px; background: var(--c-mint); border-radius: var(--r-quarter); transition: transform var(--d-base) var(--e-out); }
  .ix__group[open] .ix__sum::after { transform: rotate(-90deg); }
  .ix__count { display: inline; margin-left: auto; margin-right: 12px; }
  .ix__group ul { padding-bottom: 16px; }
  .ix__title { font-size: clamp(26px, 7vw, 40px); }
  .ix__body { padding-top: 8px; align-content: start; }
}

/* Floating contact (touch screens only; JS reveals it). */
.fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 45; display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  transform: translateY(0); opacity: 1; transition: transform var(--d-base) var(--e-out), opacity var(--d-base) var(--e-out); }
.fab.is-away { transform: translateY(24px); opacity: 0; pointer-events: none; }
.fab[hidden] { display: none; }
.fab__btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; background: var(--c-phthalo); color: var(--c-paper);
  font: 500 13px/1 var(--f-label); letter-spacing: 0.1em; text-transform: uppercase; border-radius: 999px 999px 999px 4px; box-shadow: 0 6px 20px rgba(15, 27, 24, 0.25); min-height: 44px; }
.fab__btn .qr-mark { color: var(--c-mint); }
.fab__sheet { width: min(280px, calc(100vw - 32px)); background: var(--c-paper); color: var(--c-ink); border-radius: 18px 18px 4px 18px; box-shadow: 0 10px 30px rgba(15, 27, 24, 0.22); padding: 16px; display: grid; gap: 4px; }
.fab__sheet[hidden] { display: none; }
.fab__k { margin-bottom: 6px; }
.fab__row { display: flex; align-items: center; justify-content: space-between; text-align: left; width: 100%; min-height: 44px; padding: 10px 0; border-top: 1px solid var(--c-rule); font-family: var(--f-lede); font-weight: 600; font-size: 18px; color: var(--c-ink); }
.fab__row .qr-mark { color: var(--c-teal); }
.fab__dismiss { font-size: 11px; color: var(--c-stone); }
@media (hover: hover) and (pointer: fine) { .fab { display: none !important; } }
html.ix-open .fab { display: none; }

/* Chapter tabs: labelled, and named on phones too (short names). */
.rail__label { padding-top: 24px; color: var(--c-stone); font-size: 11px; }
.rail { padding-top: 10px; }
.rail__short { display: none; }
@media (max-width: 809px) {
  .rail__label { padding-top: 16px; }
  .rail__name { display: block; font-size: 10px; letter-spacing: 0.06em; }
  .rail__full { display: none; }
  .rail__short { display: inline; }
}

/* Who it was for (client / employer) or which class, at a glance. */
.card__ctx { margin-top: 6px; font-size: 15px; line-height: 1.35; color: var(--c-teal); max-width: none; }
.card__ctx + .card__line { margin-top: 6px; }
.project__ctx { margin-top: 14px; font-family: var(--f-lede); font-weight: 600; font-size: clamp(17px, 1.5vw, 21px); color: var(--c-teal); max-width: none; }
.rn { text-transform: lowercase; }
.page-head--rail { padding-top: 48px; }
@media (max-width: 809px) { .page-head--rail { padding-top: 28px; } }
