/* ============================================================
   Caitlin Abbott — portfolio
   Editorial · photography-forward · warm and quiet
   ============================================================ */

:root {
  --bg:    #f5f3ee;
  --ink:   #1a1a1a;
  --muted: #888888;
  --faint: #cccccc;
  --warm:  #c8b89a;
  --warm-tint: rgba(200, 184, 154, 0.22);

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Jost", "Helvetica Neue", Arial, sans-serif;

  --measure: 34rem;            /* comfortable reading width */
  --gutter:  clamp(1.5rem, 5vw, 5rem);
  --ease:    cubic-bezier(0.16, 1, 0.3, 1);   /* gentler deceleration */
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

/* Navigation is arrow-key only (wireSnap/wirePages in main.js); the
   scrollbar is hidden so it can't be dragged as a scroll input. */
html {
  scrollbar-width: none;
  overscroll-behavior: none;
}
html::-webkit-scrollbar { display: none; }

/* Section-by-section stops. Each feature is its own full-viewport stop;
   main.js (wireSnap) drives the arrow-key navigation and easing,
   so no CSS scroll-snap is used here. */
.snap-section {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.snap-inner { width: 100%; }
.snap-section--label .snap-inner { max-width: var(--measure); }
/* inside a centred section, pieces shouldn't add their own vertical run */
.snap-section .piece { margin-block: 0; }
.snap-section .placed { display: block; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 0.4vw + 1rem, 1.2rem);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* ---------- shared type ---------- */
.eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Arrow-key compass: the four keycaps live permanently in the
   bottom-right. Directions you can press sit at full opacity; ones
   that lead nowhere (edge of the page order, top/bottom stop) fade
   down. main.js (wireHint/wireSnap) drives the state. */
.key-hint {
  position: fixed;
  right: clamp(1.5rem, 4vw, 3rem);
  bottom: clamp(1.25rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: var(--muted);
  pointer-events: none;
}
.key-hint--light { color: rgba(255, 255, 255, 0.92); }
.key-hint__row { display: flex; gap: 0.3rem; }
.key-hint .key {
  width: 2rem;
  height: 2rem;
  border: 1px solid color-mix(in srgb, currentColor 45%, transparent);
  border-radius: 0.45rem;
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-size: 0.85rem;
  line-height: 1;
  transition: opacity 0.45s ease;
}
.key-hint .key--off { opacity: 0.22; }

/* ---------- gallery index rail ----------
   The whole show listed at the left edge; the current work at full
   strength, the rest faded — same affordance grammar as the compass. */
.gallery-index {
  position: fixed;
  left: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  max-width: 190px;
  opacity: 0;
  animation: fadeIn 1.35s var(--ease) 0.5s forwards;
}
.gallery-index button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  opacity: 0.32;
  transition: opacity 0.45s var(--ease);
}
.gallery-index button:hover { opacity: 0.75; }
.gallery-index button.is-current { opacity: 1; }
.gallery-index__label { margin-top: 1.1rem; }
.gallery-index__label:first-child { margin-top: 0; }
.gallery-index__item {
  font-family: var(--serif);
  font-size: 0.95rem;
  line-height: 1.35;
}
/* the rail gets its own column; the show hangs to the right of it */
@media (min-width: 1201px) {
  body[data-page="gallery"] .page { padding-left: calc(var(--gutter) + 230px); }
}
/* below this the rail would sit on top of the work itself */
@media (max-width: 1200px) { .gallery-index { display: none; } }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
}
.nav__mark {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: 0.02em;
  text-decoration: none;
  line-height: 1;
}
.nav__links {
  display: flex;
  gap: clamp(1.1rem, 2.4vw, 2.6rem);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.74rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}
.nav__links a {
  text-decoration: none;
  position: relative;
  padding-bottom: 0.35em;
  color: inherit;
  opacity: 0.85;
  transition: opacity 0.4s var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.nav__links a:hover { opacity: 1; }
.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav__links a[aria-current="page"] { opacity: 1; }

/* interior pages: sticky light header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1.4rem var(--gutter);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-header .nav__mark { font-size: 1.5rem; color: var(--ink); }
.site-header .nav__links { color: var(--ink); }

/* ============================================================
   HERO (home)
   ============================================================ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  /* a touch of warmth + slow settle */
  animation: heroScale 17s var(--ease) forwards;
}
@keyframes heroScale {
  from { transform: scale(1.06); }
  to   { transform: scale(1); }
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(20,18,15,0.34) 0%, rgba(20,18,15,0) 28%),
    linear-gradient(to top,    rgba(20,18,15,0.46) 0%, rgba(20,18,15,0) 42%);
}
.hero__nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 3;
  padding: 1.8rem var(--gutter);
  color: #f3efe6;
}
.hero__nav .nav__mark {
  font-size: 1.3rem;
  opacity: 0;
  animation: fadeIn 1.35s var(--ease) 0.25s forwards;
}
.hero__nav .nav__links a { color: #f3efe6; }
.hero__nav .nav__links {
  opacity: 0;
  animation: fadeIn 1.35s var(--ease) 0.5s forwards;
}
.hero__wordmark {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(2rem, 6vh, 4.5rem);
  z-index: 3;
  color: #f6f2ea;
}
.hero__wordmark h1 {
  margin: 0;
  font-weight: 300;
  font-size: clamp(3rem, 11vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 40px rgba(0,0,0,0.25);
}
.hero__wordmark .hero__sub {
  display: block;
  margin-top: 1rem;
  max-width: 28ch;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.92;
}
.hero__wordmark > * {
  opacity: 0;
  animation: fadeUp 1.55s var(--ease) 0.7s forwards;
}
.hero__wordmark .hero__sub { animation-delay: 1s; }

/* ============================================================
   PAGE SHELL
   ============================================================ */
main { display: block; }
.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.page__head {
  margin-bottom: clamp(2.5rem, 7vw, 6rem);
}
.page__head .eyebrow { display: block; margin-bottom: 1.4rem; }
/* sized to speak with the same voice as the About page's lead */
.page__intro {
  max-width: 26ch;
  margin-inline: auto;   /* block sits centred; text reads left-adjusted */
  font-size: clamp(2.2rem, 4.5vw, 4.2rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* ============================================================
   GALLERY — "placed / journal" layout
   ============================================================ */
.section { margin-top: clamp(4rem, 11vw, 9rem); }
.section__label {
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
}
.section__label .eyebrow { font-size: 0.76rem; letter-spacing: 0.34em; }
.section__label .count {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--faint);
}
.section__intro {
  max-width: var(--measure);
  margin: -1rem 0 clamp(2.5rem, 6vw, 4.5rem);
  font-size: 1.18rem;
  color: var(--ink);
}

/* hand-drawn archival mark — opens each section, breaks the about page */
.archival-rule {
  width: 132px;
  height: 12px;
  opacity: 0.9;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='12' viewBox='0 0 132 12'%3E%3Cpath d='M1 7.5 C 20 2.5 36 10 58 6.2 S 102 2.8 131 6.8' fill='none' stroke='%23c8b89a' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left center;
}
.section > .archival-rule { margin: 0 0 1.5rem; }
.about__body .archival-rule { margin: clamp(2rem, 5vw, 3rem) 0; }

.placed { display: block; }
.piece {
  margin-block: clamp(3.5rem, 9vw, 8rem);
  max-width: 100%;
}
.piece:first-child { margin-top: 0; }

/* scale (desktop widths) */
.piece--sm { width: 34%; }
.piece--md { width: 48%; }
.piece--lg { width: 62%; }
.piece--xl { width: 80%; }

/* alignment within the column */
.piece--left   { margin-right: auto; margin-left: clamp(0px, 4vw, 3.5rem); }
.piece--center { margin-inline: auto; }
.piece--right  { margin-left: auto;  margin-right: clamp(0px, 4vw, 3.5rem); }

.piece__frame {
  overflow: hidden;
  background: #e9e6df;
  display: flex;
  justify-content: center;
  transition: box-shadow 0.65s var(--ease);
}
.piece__frame img {
  /* cap height so every piece frames inside one viewport; centred by the
     flex parent when the height cap makes it narrower than the column */
  max-width: 100%;
  max-height: 70svh;
  width: auto;
  height: auto;
  /* baseline scale gives the camera parallax headroom so the drift
     (set inline by main.js) never reveals the image edges */
  transform: scale(1.14);
  will-change: transform;
  backface-visibility: hidden;
}
.piece a.piece__frame { display: block; cursor: pointer; }
.piece__frame:hover {
  box-shadow: 0 30px 70px -30px var(--warm-tint),
              0 0 0 1px rgba(200,184,154,0.18);
}

/* archive project body text + supporting detail images */
.piece__body {
  margin: 0.9rem 0 0;
  max-width: 46ch;
  font-size: 1.06rem;
  line-height: 1.5;
  color: #2a2a2a;
}
.piece__support {
  display: flex;
  gap: clamp(1rem, 3vw, 2.4rem);
  margin: clamp(2rem, 5vw, 4rem) 0 0;
  flex-wrap: wrap;
}
.piece__support .piece__frame { flex: 1 1 0; min-width: 220px; }

/* a lead piece carries a caption too, so cap its image shorter than a
   support image — keeps the whole piece (image + caption) inside one
   viewport so it's a single centred stop, not two near-identical ones */
.piece__main > .piece__frame img { max-height: 56svh; }

.piece__index {
  display: block;
  margin-bottom: 0.7rem;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  color: var(--warm);
}
.piece__head { margin-bottom: 1.1rem; max-width: 42ch; }
.piece__cap { margin-top: 1.1rem; max-width: 42ch; }
.piece__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.32rem;
  line-height: 1.2;
  margin: 0;
}
.piece__subtitle {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0.15rem 0 0;
}
.piece__meta {
  margin-top: 0.7rem;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  line-height: 1.7;
  color: var(--muted);
  text-transform: uppercase;
}
.piece__meta span { display: block; }
.piece__link {
  display: inline-block;
  margin-top: 0.8rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--faint);
  padding-bottom: 2px;
  color: var(--ink);
  transition: border-color 0.4s var(--ease), color 0.4s var(--ease);
}
.piece__link:hover { border-color: var(--warm); color: var(--muted); }
.piece__tag {
  display: inline-block;
  margin-top: 0.6rem;
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
}

/* on wide screens the descriptive text stands beside the image
   column (index above, image, caption below) as a facing plate.
   The aside stretches to the main column's full height and centres
   its paragraph within it. piece--right mirrors the pair. */
@media (min-width: 1000px) {
  .piece {
    display: flex;
    align-items: stretch;
    gap: clamp(1.8rem, 4vw, 3.5rem);
  }
  .piece--right { flex-direction: row-reverse; }
  .piece__main { flex: 1 1 auto; min-width: 0; }
  .piece__aside {
    flex: 0 0 clamp(230px, 24vw, 320px);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .piece__aside .piece__body { margin: 0; }
  .piece__aside .piece__body + .piece__body { margin-top: 0.9em; }
  /* the figure now holds both columns, so each scale runs wider */
  .piece--sm { width: 62%; }
  .piece--md { width: 78%; }
  .piece--lg { width: 88%; }
  .piece--xl { width: 98%; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  max-width: 1100px;
  margin: 0 auto;
}
.about__lead {
  font-weight: 300;
  font-size: clamp(2.2rem, 4.5vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
  max-width: 18ch;
}
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.about__portrait {
  position: sticky;
  top: 6rem;
}
.about__portrait img { width: 100%; background: #e9e6df; }
.about__portrait figcaption {
  margin-top: 0.8rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
}
/* Sticky-portrait run: the figure pins for the full height of the two
   text stops beside it, so the image holds still while the story turns
   the page. */
.about__duo {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.about__portrait--pin {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0;
}
.about__portrait--pin img {
  max-height: 72svh;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

/* keep each block exactly one viewport tall so the pinned portrait
   doesn't drift between the two stops */
.about__block p { margin-block: 0; }
.about__block-title { margin: 0 0 clamp(1.4rem, 3vw, 2rem); }
/* the squiggle-then-title opener needs less air than a bare squiggle */
.about__block .archival-rule + .about__block-title { margin-top: -1rem; }

.about__body p { max-width: var(--measure); }
.about__body p + p { margin-top: 1.4rem; }
.about__rule {
  border: 0;
  height: 1px;
  background: var(--faint);
  opacity: 0.6;
  margin: clamp(2rem, 5vw, 3rem) 0;
  max-width: var(--measure);
}
.about__philosophy p {
  font-size: 1.12rem;
  color: #2a2a2a;
}
.cv-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: clamp(2rem, 5vw, 3rem);
  font-family: var(--sans);
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: gap 0.4s var(--ease), border-color 0.4s var(--ease);
}
.cv-link:hover { gap: 1.1rem; border-color: var(--warm); }
.cv-link::after { content: "↓"; font-size: 0.9rem; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* nudge the whole block below true centre */
  padding-top: clamp(4rem, 12svh, 7rem);
  max-width: 760px;
}
/* contact page — a night photograph as the backdrop, set in white.
   The token overrides carry the header, hint keys and footer too;
   the gradient keeps the text side dark enough to read against. */
body[data-page="contact"] {
  --bg:    #14110d;
  --ink:   #f5f3ee;
  --muted: rgba(245, 243, 238, 0.75);
  --faint: rgba(245, 243, 238, 0.42);
  background-color: #14110d;
  background-image:
    linear-gradient(105deg, rgba(16, 12, 8, 0.62) 0%, rgba(16, 12, 8, 0.28) 55%, rgba(16, 12, 8, 0.35) 100%),
    url("../images/IMG_1417.JPG");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
/* the photograph runs edge to edge — no frosted bar, no footer rule */
body[data-page="contact"] .site-header {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body[data-page="contact"] .site-footer { border-top-color: transparent; }

.contact__intro {
  font-weight: 300;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 clamp(1.5rem, 3.5vw, 2.25rem);
}
.contact__email {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  text-decoration: none;
  border-bottom: 1px solid var(--faint);
  padding-bottom: 0.15em;
  transition: border-color 0.4s var(--ease), color 0.4s var(--ease);
  width: fit-content;
}
.contact__email:hover { border-color: var(--warm); color: var(--muted); }
/* the email is a copy button dressed as the old link */
button.contact__email {
  background: none;
  border-top: 0; border-left: 0; border-right: 0;
  color: inherit;
  cursor: pointer;
  padding-top: 0; padding-inline: 0;
  text-align: left;
}
.contact__copied {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.58rem;
  letter-spacing: 0.24em;
  color: var(--warm);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}
.contact__copied.is-on { opacity: 1; }
.contact__lines {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: clamp(1.4rem, 3.5vw, 2.4rem);
  row-gap: 1.2rem;
}
.contact__slash {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--faint);
}
.contact__rows {
  /* the hidden "copied" note below the buttons already holds space,
     so only a sliver of margin is needed here */
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact__rows a { text-decoration: none; color: inherit; transition: color 0.3s var(--ease); }
.contact__rows a:hover { color: var(--ink); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid color-mix(in srgb, var(--faint) 60%, transparent);
}
.site-footer a { text-decoration: none; color: inherit; }
.site-footer a:hover { color: var(--ink); }

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

@keyframes fadeIn { to { opacity: 1; } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 820px) {
  .about__grid, .about__duo { grid-template-columns: 1fr; }
  .about__portrait { position: static; max-width: 360px; }
  .about__portrait--pin { position: static; height: auto; }

  /* placed layout relaxes into a calm single column */
  .piece { width: 100% !important; margin-inline: 0 !important; }
  .piece--sm, .piece--md { width: 86% !important; }
  .piece--left  { margin-right: auto !important; }
  .piece--right { margin-left: auto !important; }
}

@media (max-width: 620px) {
  /* header stays one row so it never grows past the 72px the
     paging stops reserve for it (main.js build) */
  .site-header { padding: 1.1rem var(--gutter); }
  .nav { gap: 1rem; }
  .hero__nav .nav { align-items: center; }
  .nav__mark { white-space: nowrap; font-size: 1.15rem; }
  .nav__links { gap: 1rem; font-size: 0.66rem; letter-spacing: 0.18em; }
  .site-header .nav__mark { font-size: 1.15rem; }
  .piece--sm, .piece--md, .piece--lg, .piece--xl { width: 100% !important; }
  .piece__support { gap: 1rem; }
  .piece__support .piece__frame { min-width: 0; flex-basis: 100%; }
  /* email and phone stack; the slash only makes sense on one line */
  .contact__lines { flex-direction: column; row-gap: 1.6rem; }
  .contact__slash { display: none; }
  .contact { padding-top: clamp(2rem, 8svh, 4rem); }
  .piece__body { font-size: 0.98rem; }
}

/* ============================================================
   TOUCH DEVICES — phone and iPad
   main.js tags <html class="is-touch"> when there's no fine pointer.
   Same page, same stops: the finger never free-scrolls, a swipe is an
   arrow key. Only the key compass goes, and iOS gets a scrolling
   background because it cannot paint a fixed one.
   ============================================================ */
html.is-touch,
html.is-touch body { touch-action: none; }
html.is-touch .key-hint { display: none; }
/* page turns: the whole page slides a little and fades, out one side
   and in from the other (main.js sets the classes around the load) */
html.is-touch { overflow-x: hidden; }
html.is-touch body {
  transition: opacity 0.42s var(--ease), transform 0.42s var(--ease);
}
html.is-touch.page-leave-left  body { opacity: 0; transform: translateX(-9vw); }
html.is-touch.page-leave-right body { opacity: 0; transform: translateX(9vw); }
html.is-touch.page-enter-left  body { opacity: 0; transform: translateX(9vw);  transition: none; }
html.is-touch.page-enter-right body { opacity: 0; transform: translateX(-9vw); transition: none; }
/* a work should be one centred stop, clear of the header: lead images
   sit a little shorter so image, caption and a paragraph fit together */
html.is-touch .piece__main > .piece__frame img { max-height: 44svh; }
html.is-touch .piece__support .piece__frame img { max-height: 34svh; }
/* stacked layouts (phone, iPad portrait): every work reads in two
   swipes — title, picture, meta and the opening of the text, then the
   full text bottomed out. Enough air that no work fits in one screen. */
@media (max-width: 999px) {
  html.is-touch .piece { padding-block: 7svh; }
  html.is-touch .piece__head { margin-bottom: 1.6rem; }
  html.is-touch .piece__cap { margin-top: 1.6rem; }
  html.is-touch .piece__aside { margin-top: 2.5rem; }
  html.is-touch .piece__body { line-height: 1.6; }
  html.is-touch .piece__aside .piece__body + .piece__body { margin-top: 1.1rem; }
  html.is-touch .piece__support { margin-top: 0; padding-block: 3svh; }
}
html.is-touch body[data-page="contact"] { background-attachment: scroll; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .hero__wordmark > *, .hero__nav .nav__mark, .hero__nav .nav__links { opacity: 1; }
  /* no camera parallax — settle images to a clean, full frame */
  .piece__frame img { transform: scale(1.02); }
}
