/* Manoverboard — design mockup stylesheet */

/* Universal Sans is a variable font (single file covers the whole
   weight axis) — same file and format the live manoverboard.com
   site serves today. Only the web format (.woff2) is served: the
   desktop .ttf is licensed separately and kept out of the deployed
   site (see .gitignore). */
@font-face {
  font-family: 'Universal Sans';
  src: url('../fonts/UniversalSansGX.woff2') format('woff2');
  font-weight: 1 999;
  font-display: swap;
}

:root {
  --black: #341111;
  --white: #fcfcfc;
  --mid: #5a5754;
  --rule: #d4d0c8;
  /* Lightest grey that still clears the 3:1 non-text contrast
     minimum on --white — used as the hover/focus state for
     underlines that sit at --mid when resting, so hover reads as a
     genuine fade instead of a contrast violation like the old
     #999 -> --rule pattern did. */
  --light-grey: #929292;

  /* Same red used for link-hover underlines on andrewboardman.com
     (--accent2: #FF5555) — ties the two sites together. Decoration
     only, never text color: at 3.14:1 on --white it clears the 3:1
     minimum for non-text UI elements but not the 4.5:1 needed for
     body text, same reasoning as --light-grey above. */
  --link-hover-accent: #FF5555;

  --font-ui: 'Universal Sans', -apple-system, 'Helvetica Neue', Arial, sans-serif;

  /* Universal Sans is variable (300-900), so any value in that range
     works - not just the usual 100s. One knob for the whole site. */
  --weight-ui: 635;

  /* One line length for the intro text at the top of every page (34.5rem = 552px at the default 16px).
     rem (not em) so it's the same width whether the text is 16px or
     18px. Elements that carry their own side padding add it back
     with calc() so the *text* still lines up. */
  --measure: 34.5rem;

  --pad-desktop: 3rem;
  --pad-mobile: 1.5rem;
  --gap: 1.5rem;
}

* { box-sizing: border-box; }

html { background: var(--white); }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  -webkit-font-smoothing: antialiased;
  border-top: 1px solid var(--black);
}

p { font-size: 16px; }

img { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 3px;
}

/* Off-screen until keyboard-focused, then pinned to the top-left so
   keyboard/screen-reader users can jump past the header nav straight
   to each page's content. */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 100;
  padding: 0.75rem 1.5rem;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  text-decoration: underline;
}

.skip-link:focus {
  top: 0;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Header / nav ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem var(--pad-desktop) 0;
}

.wordmark {
  display: inline-block;
  line-height: 0;
  flex-shrink: 0;
}

.wordmark img {
  display: block;
  height: 20px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 0.9rem;
  color: var(--mid);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: var(--black);
}

.nav a:hover,
.nav a:focus-visible {
  text-decoration: underline;
  text-decoration-color: var(--link-hover-accent);
  text-underline-offset: 3px;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 1rem;
}

.lang-toggle a {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 0.9rem;
  color: var(--mid);
  cursor: pointer;
}

.lang-toggle a[aria-current="true"] {
  color: var(--black);
  cursor: default;
}

.lang-toggle a:not([aria-current="true"]):hover,
.lang-toggle a:not([aria-current="true"]):focus-visible {
  text-decoration: underline;
  text-decoration-color: var(--link-hover-accent);
  text-underline-offset: 3px;
}

.lang-toggle .sep {
  color: var(--mid);
  font-size: 0.7rem;
}

/* At narrow widths the nav (Work/About/Contact + En/Fr) doesn't fit
   beside the wordmark on one line — wrap the header onto two rows
   instead of letting the wordmark get squeezed to 0 width. */
@media (max-width: 600px) {
  .site-header {
    flex-wrap: wrap;
    justify-content: flex-start;
    row-gap: 1rem;
    padding-left: var(--pad-mobile);
    padding-right: var(--pad-mobile);
  }
  .brand {
    align-items: flex-start;
  }
  .nav {
    flex-wrap: wrap;
    justify-content: flex-start;
    row-gap: 0.75rem;
    gap: 1.25rem;
    width: 100%;
  }
  .lang-toggle {
    margin-left: 0;
  }
}

/* ---------- Footer ----------
   Wordmark + copyright and city/email on the left, the footer link
   list on the right. Every piece of text uses the same
   font-weight/size as the header nav (var(--font-ui), var(--weight-ui), 0.9rem)
   — nothing shrinks down to "fine print". Wraps to a stacked layout
   on mobile. */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  padding: 3rem var(--pad-desktop) 4rem;
  margin-top: 130px;
}

@media (max-width: 600px) {
  .site-footer {
    padding-left: var(--pad-mobile);
    padding-right: var(--pad-mobile);
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-brand .wordmark img {
  height: 13px;
  position: relative;
  top: -0.94px;
  left: 0;
}

.footer-copy {
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 0.9rem;
  color: var(--mid);
}

@media (max-width: 768px) {
  .site-footer { justify-content: flex-start; }
}

/* ---------- Placeholder image blocks (mockup only) ---------- */

.ph {
  background: linear-gradient(135deg, #cfcabe, #b7b0a0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(14,14,14,0.35);
}

/* When .ph is a real <img> (Work index hero photos) rather than a
   placeholder div, crop it to fill its box instead of stretching. */
img.ph {
  display: block;
  object-fit: cover;
}
.ph span {
  font-family: var(--font-ui);
  font-size: 0.7rem;
}

/* ======================================================
   HOME
   ====================================================== */

.home {
  padding-top: 80px;
}

.home-tagline {
  max-width: 34em;
  padding: 0 var(--pad-desktop);
  margin: 0 0 2rem;
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--mid);
}

/* Single-image auto-advancing slideshow. The stage is a fixed
   height (clamped so the whole page fits one laptop viewport) but
   each slide keeps its own image's natural aspect ratio — a tall
   portrait and a wide landscape both sit centred and uncropped,
   like reference: michelechampagne.com. Crossfades on a timer; a
   visible Pause/Play control satisfies WCAG 2.2.2 (Pause, Stop,
   Hide), and playback never auto-starts under prefers-reduced-motion. */
.home-slideshow {
  position: relative;
  margin: 0 var(--pad-desktop);
  height: clamp(280px, 47.7vh, 480px);
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.slide.is-active {
  opacity: 1;
}

.slide-link {
  display: block;
  height: 100%;
  max-width: 100%;
  cursor: pointer;
}

/* Every slide fills the full stage height and lets width scale to
   match — a portrait image stays narrow, a landscape image stays
   full height rather than shrinking down to a short strip. Only an
   extremely wide image gets capped by max-width, at which point it
   shrinks in both dimensions together to stay inside the stage. */
.slide-link img {
  display: block;
  height: 100%;
  width: 100%;
  object-fit: contain;
}

.home-controls {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 0;
}

.home-info {
  width: 66.666%;
  max-width: none;
  padding: 0 var(--pad-desktop);
}

@media (max-width: 600px) {
  .home-info {
    width: 100%;
  }
}


.home-caption {
  padding: 0;
  margin: 0;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 0.8rem;
  color: var(--mid);
}

.home-clients {
  margin: 0.75rem 0 0;
}

.home-clients p {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--mid);
}

.home-portfolio-link {
  margin: 0.75rem 0 0;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 0.8rem;
}

.home-portfolio-link a {
  color: var(--black);
  text-decoration: underline;
  text-decoration-color: var(--mid);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.home-portfolio-link a:hover {
  text-decoration-color: var(--link-hover-accent);
}

.home-portfolio-link .arrow {
  display: inline-block;
  margin-left: 0.15rem;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.home-portfolio-link a:hover .arrow {
  transform: translateX(4px);
}

.slideshow-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 1rem var(--pad-desktop) 0 auto;
  background: var(--white);
  color: var(--mid);
  border: 1px solid var(--rule);
  border-radius: 50%;
  padding: 0;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  line-height: 1;
  cursor: pointer;
}

.slideshow-toggle {
  transition: border-color 0.2s ease, color 0.2s ease;
}

.slideshow-toggle:hover,
.slideshow-toggle:focus-visible {
  border-color: var(--link-hover-accent);
}

.slideshow-toggle .icon {
  pointer-events: none;
}

.slideshow-toggle .icon[hidden] {
  display: none;
}

.slideshow-toggle .pause-icon {
  position: relative;
  width: 10px;
  height: 11px;
}

.slideshow-toggle .pause-icon::before,
.slideshow-toggle .pause-icon::after {
  content: '';
  position: absolute;
  top: 0;
  width: 3px;
  height: 100%;
  background: currentColor;
}

.slideshow-toggle .pause-icon::before { left: 0.25px; }
.slideshow-toggle .pause-icon::after { right: 0.25px; }

.slideshow-toggle .play-icon {
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid currentColor;
  margin-left: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .slide { transition: none; }
}

@media (max-width: 600px) {
  .home-tagline, .home-info { padding-left: var(--pad-mobile); padding-right: var(--pad-mobile); }

  /* Matches the 5rem→3rem mobile drop used on every other page's
     first line of text, so the h1 starts at the same height
     regardless of template. */
  .home { padding-top: 48px; }
  .home-slideshow { margin: 0 var(--pad-mobile); height: clamp(220px, 40vh, 340px); }
  .slideshow-toggle { margin-right: var(--pad-mobile); }
}

/* ======================================================
   WORK INDEX — three-layout rotation per the Figma comp: a
   full-width row (a wide photo, caption below) alternating with two
   side-by-side rows where the caption and photo swap sides. Not a
   4-up grid — .layout-full/.layout-split-left/.layout-split-right
   cycle in that order.
   ====================================================== */

.work-index {
  padding-top: 5rem;
}

.work-intro {
  max-width: calc(var(--measure) + 2 * var(--pad-desktop));
  margin: 0;
  padding: 0 var(--pad-desktop) 2rem;
  font-size: 18px;
  font-weight: var(--weight-ui);
  line-height: 21px;
  color: var(--black);
}

.work-filter,
.work-filter-empty {
  margin: 0;
  padding: 0 var(--pad-desktop) 2rem;
  font-size: 16px;
  font-weight: var(--weight-ui);
  line-height: 21px;
  color: var(--black);
}

.work-filter a {
  color: var(--black);
  text-decoration: underline;
  text-decoration-color: var(--mid);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.work-filter a:hover {
  text-decoration-color: var(--link-hover-accent);
}

@media (max-width: 768px) {
  .work-intro,
  .work-filter,
  .work-filter-empty {
    padding-left: var(--pad-mobile);
    padding-right: var(--pad-mobile);
  }

  /* Matches the 5rem→3rem mobile drop used by project/about/contact,
     so the first line of text starts at the same height on every
     page regardless of which template it is. */
  .work-index {
    padding-top: 3rem;
  }
}

.project-row {
  padding: 4rem var(--pad-desktop);
  display: block;
  position: relative;
  cursor: pointer;
}

.project-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--pad-desktop);
  right: var(--pad-desktop);
  height: 1px;
  background: #b0b0b0;
}

.project-row:first-child::before {
  display: none;
}

.project-row:first-child {
  border-top: none;
}

.work-index h1.visually-hidden {
  font-size: 22px;
  font-weight: var(--weight-ui);
}

.project-row .client {
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 18px;
  line-height: 21px;
  color: var(--black);
  margin: 0;
}

.project-row .tags {
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 16px;
  line-height: 21px;
  color: var(--mid);
  margin: 0.1rem 0 0;
}

.project-row .arrow {
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: inline-block;
  margin-left: 0.15rem;
}

.project-row:hover .arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* Every project photo runs black & white until hovered, per the
   brief — the hover reveal is the only spot of colour in the grid. */
.project-row .ph {
  aspect-ratio: 1.676;
  width: 100%;
  filter: grayscale(1);
  transition: filter 0.3s ease;
}

.project-row:hover .ph {
  filter: grayscale(0);
}

/* Full — a wide photo spanning the full column, caption below it. */
.layout-full .caption {
  margin-top: 20px;
}

/* Split-left — caption left, photo right, both roughly matching the
   Home slideshow's 62%-ish proportions. Row-gap is set separately
   from column-gap so the vertical space above the caption (once this
   collapses to one column on mobile) matches the full layout's 19px
   rather than the wider horizontal gap between columns. */
.layout-split-left {
  display: grid;
  grid-template-columns: 1fr 62%;
  column-gap: var(--gap);
  row-gap: 20px;
  align-items: end;
}
.layout-split-left .caption { padding-bottom: 0.5rem; }

/* Split-right — photo left, caption right (mirror of split-left). */
.layout-split-right {
  display: grid;
  grid-template-columns: 62% 1fr;
  column-gap: var(--gap);
  row-gap: 20px;
  align-items: end;
}
.layout-split-right .caption { padding-bottom: 0.5rem; }

@media (max-width: 768px) {
  .layout-split-left,
  .layout-split-right {
    grid-template-columns: 1fr;
  }

  /* split-left puts the caption before the photo in the markup (so it
     sits in the narrower left column on desktop) — once the grid
     collapses to one column that would stack the caption above the
     photo. Force the photo first here so every layout reads
     image-then-caption on mobile. */
  .layout-split-left .ph {
    order: -1;
  }
}

@media (max-width: 768px) {
  .project-row { padding: 2.5rem var(--pad-mobile); }
  .project-row::before { left: var(--pad-mobile); right: var(--pad-mobile); }
}

/* ======================================================
   PROJECT PAGE
   ====================================================== */

.project-header {
  padding: 5rem var(--pad-desktop) 0;
}

.project-header .client {
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 18px;
  line-height: 21px;
  color: var(--black);
  margin: 0;
}

.project-header .scope-tags {
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 16px;
  line-height: 21px;
  margin: 0.1rem 0 0;
}

.scope-tags a {
  color: var(--black);
  text-decoration: underline;
  text-decoration-color: var(--mid);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.scope-tags a:hover {
  text-decoration-color: var(--link-hover-accent);
}

.project-description {
  max-width: none;
  padding: 3rem var(--pad-desktop) 38px;
  font-size: 16px;
  line-height: 19px;
  column-count: 2;
  column-gap: var(--gap);
}

.project-description p:first-child { margin-top: 0; }

.project-website {
  padding: 0 var(--pad-desktop) 50px;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 16px;
}

.project-website a {
  color: var(--black);
  text-decoration: underline;
  text-decoration-color: var(--mid);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.project-website a:hover {
  text-decoration-color: var(--link-hover-accent);
}

.project-website .arrow {
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s ease;
}

.project-website a:hover .arrow {
  transform: translate(2px, -2px);
}

.blocks { padding: 0; }

/* Each image block sits in a .block-item wrapper (added in
   project.php) purely so every block — regardless of type — gets the
   same 60px rhythm between it and whatever comes next. */
.block-item {
  margin-top: 60px;
}

.blocks > .block-item:first-child {
  margin-top: 0;
}

/* The number sits below the image, right-aligned to the page margin —
   not overlaid on the photo. Small and muted; Andrew designs the
   real caption typography himself. Matches .project-footnotes below
   so the two read as one system. */
.img-num-row {
  margin: 0.5rem 0 0;
  padding-right: var(--pad-desktop);
  text-align: right;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 14px;
  line-height: 17px;
  color: #5d5d5d;
}

/* Every image block sizes by WIDTH only and lets height follow the
   photo's own aspect ratio — no vh-based crop-to-fill. That keeps
   images at their real proportions (smaller, uncropped) instead of
   stretching or cropping to hit a target box, and it's what makes the
   gap between blocks a true constant: with a fixed height per type,
   a tall vs. wide photo used to read as differently "sized" even
   though the box was identical. */
.block-image-full img,
.block-image-full .ph,
.block-image-inset img,
.block-image-inset .ph,
.block-image-offset img,
.block-image-offset .ph,
.block-image-small img,
.block-image-small .ph,
.block-image-pair-item img,
.block-image-pair-item .ph,
.block-image-portrait img,
.block-image-portrait .ph {
  display: block;
  height: auto;
  object-fit: contain;
}

/* Block: image-full */
.block-image-full img,
.block-image-full .ph {
  width: 100%;
}

/* Block: image-inset */
.block-image-inset img,
.block-image-inset .ph {
  margin: 0 var(--pad-desktop);
  width: calc(100% - 6rem);
}

/* Block: image-offset */
.block-image-offset img,
.block-image-offset .ph {
  width: 80%;
}
.block-image-offset.right img,
.block-image-offset.right .ph { margin-left: 20%; }
.block-image-offset.left img,
.block-image-offset.left .ph { margin-right: 20%; }

/* Block: image-small */
.block-image-small img,
.block-image-small .ph {
  margin: 0 auto;
  width: 45%;
}

/* Block: image-pair — each column gets its own number below it,
   right-aligned within that column (mirroring the grid), rather than
   one shared number row. */
.block-image-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--gap) - 10px);
  padding: 0 var(--pad-desktop);
  align-items: start;
}
.block-image-pair.split-60-40 { grid-template-columns: 60% 1fr; }
.block-image-pair.split-40-60 { grid-template-columns: 40% 1fr; }
.block-image-pair-item img,
.block-image-pair-item .ph {
  width: 100%;
}
.block-image-pair-item .img-num {
  margin: 0.5rem 0 0;
  text-align: right;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 14px;
  line-height: 17px;
  color: #5d5d5d;
}

/* Block: image-portrait */
.block-image-portrait img,
.block-image-portrait .ph {
  width: 60%;
  margin: 0 auto;
  object-position: center;
}

/* Block: quote */
.block-quote {
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: clamp(2rem, 5vw, 4rem);
  text-align: center;
  color: var(--mid);
  padding: 4rem var(--pad-desktop);
  line-height: 1.2;
  margin: 0;
}

/* Block: spacer */
.block-spacer.small { height: 3rem; }
.block-spacer.medium { height: 6rem; }
.block-spacer.large { height: 10rem; }

.footnotes-section {
  position: relative;
  margin-top: 40px;
  padding-top: 12px;
}

.footnotes-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--pad-desktop);
  width: calc((100% - var(--pad-desktop) * 2 - var(--gap)) / 2);
  height: 1px;
  background: var(--rule);
}

.project-footnotes {
  max-width: calc((100% - var(--pad-desktop) * 2 - var(--gap)) / 2 + var(--pad-desktop));
  margin: 0;
  padding: 0 var(--pad-desktop) 3rem;
  list-style-position: inside;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 14px;
  line-height: 16px;
  color: #5d5d5d;
}

.project-footnotes li { margin: 0 0 0.5rem; }

.project-nav {
  position: relative;
  padding: 22px var(--pad-desktop) 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 0.75rem;
  color: var(--mid);
}

.project-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--pad-desktop);
  right: var(--pad-desktop);
  height: 1px;
  background: var(--rule);
}

.project-nav-position {
  color: var(--black);
  font-size: 1rem;
}

.project-nav-links {
  display: flex;
  gap: 0.75rem;
}

.project-nav-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--black);
  font-size: 0.9rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.project-nav-links a:hover,
.project-nav-links a:focus-visible {
  border-color: var(--link-hover-accent);
  transform: translateX(3px);
}

.project-nav-links a.prev:hover {
  transform: translateX(-3px);
}

@media (max-width: 768px) {
  .project-description { column-count: 1; }
  /* The description drops to one column here, so the footnote list
     (sized to match its column width) and the divider line above it
     need to go full-width too instead of staying half-width. */
  .project-footnotes { max-width: none; }
  .footnotes-section::before { width: auto; right: var(--pad-desktop); }

  /* Two-photo rows go to one column at the same breakpoint as
     everything else (matching the Work index's split layouts) —
     not just on phones. Stacking them turns the horizontal column
     gap into the vertical space between the two photos, so it needs
     to match the standard rhythm between blocks (60px) instead of
     staying at the much tighter column gap. */
  .block-image-pair { grid-template-columns: 1fr !important; }
}

@media (max-width: 768px) {
  .project-header { padding: 3rem var(--pad-mobile) 0; }
  .block-item { margin-top: 50px; }
  /* Only the full-bleed block goes edge-to-edge — every other image
     type keeps an inset margin on mobile too, just switched to the
     tighter mobile gutter instead of collapsing flush. */
  .block-image-inset img, .block-image-inset .ph {
    margin: 0 var(--pad-mobile);
    width: calc(100% - var(--pad-mobile) * 2);
  }
  .block-image-offset img, .block-image-offset .ph {
    width: calc(100% - var(--pad-mobile) * 2);
    margin: 0 auto !important;
  }
  .block-image-pair { padding: 0 var(--pad-mobile); row-gap: 50px; }
  .block-image-small img, .block-image-small .ph {
    width: calc(100% - var(--pad-mobile) * 2);
  }
  .block-image-portrait img, .block-image-portrait .ph {
    width: calc(100% - var(--pad-mobile) * 2);
  }
  .project-description,
  .project-website,
  .project-footnotes,
  .project-nav,
  .block-quote { padding-left: var(--pad-mobile); padding-right: var(--pad-mobile); }
  .footnotes-section::before { left: var(--pad-mobile); right: var(--pad-mobile); }
  .img-num-row { padding-right: var(--pad-mobile); }
  .project-nav::before { left: var(--pad-mobile); right: var(--pad-mobile); }
}


/* ======================================================
   CONTACT — same 18px/21px body-copy language as everywhere
   else. Intro text left, photo right; both start at the top
   (no About-style stagger).
   ====================================================== */

.contact-page {
  padding: 5rem var(--pad-desktop) 0;
}

.contact-title {
  margin: 0 0 2rem;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 18px;
  line-height: 21px;
  color: var(--black);
}

/* Right column sized to the photo's own fixed width (auto) instead
   of a flexible fraction, so it can never get squeezed narrower
   than the photo itself. */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: start;
}

.contact-intro {
  max-width: var(--measure);
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 16px;
  line-height: 19px;
  color: var(--black);
}

.contact-intro p { margin: 0 0 1.3em; }
.contact-intro p:last-child { margin-bottom: 0; }

.contact-intro a {
  text-decoration: underline;
  text-decoration-color: var(--mid);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.contact-intro a:hover {
  text-decoration-color: var(--link-hover-accent);
}

.contact-photo {
  width: 327px;
  height: 196px;
  object-fit: cover;
  margin-left: auto;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: calc(3rem - 5px);
  }
  .contact-photo { max-width: none; margin-left: 0; }
}

@media (max-width: 768px) {
  .contact-page { padding: 3rem var(--pad-mobile) 0; }
}

/* ======================================================
   STATEMENTS — visible title, then a body-copy column that
   runs wider than Contact's (roughly 2:1 against the photo,
   vs. Contact's near-even split) with the photo pinned to the
   top right.
   ====================================================== */

.statements-page {
  padding: 5rem var(--pad-desktop) 0;
}

.statements-title {
  margin: 0 0 2rem;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 18px;
  line-height: 21px;
  color: var(--black);
}

/* Same grid as Contact: text in its own column, photo in a
   separate column to the right — not floated, so the text never
   reflows around it. The right column is sized to the photo's own
   fixed width (auto) instead of Contact's flexible 1fr, so it can't
   get squeezed narrower than the photo itself. */
.statements-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: start;
}

.statements-text {
  max-width: var(--measure);
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 16px;
  line-height: 19px;
  color: var(--black);
}

.statements-text p { margin: 0 0 1.3em; }
.statements-text p:last-child { margin-bottom: 0; }

.statements-photo {
  width: 327px;
  height: 196px;
  object-fit: cover;
  margin-left: auto;
}

@media (max-width: 768px) {
  .statements-grid {
    grid-template-columns: 1fr;
    gap: calc(3rem - 5px);
  }
  .statements-photo { max-width: none; margin-left: auto; }
  .statements-page { padding: 3rem var(--pad-mobile) 0; }
}

/* ======================================================
   ABOUT — two-column layout. All text here is a single
   consistent style throughout (Universal Sans 600, 18px/21px)
   rather than the usual display-heading treatment.
   ====================================================== */

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

.about-page {
  padding: 5rem var(--pad-desktop) 0;
}

.about-title {
  margin: 0 0 2rem;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 18px;
  line-height: 21px;
  color: var(--black);
}

/* Runs full width above the two-column section entirely — the
   photo doesn't start until below this block, so there's no column
   to conflict with yet. Capped narrower than 100% for readability. */
.about-intro-wide {
  max-width: var(--measure);
  margin-bottom: 4rem;
}

/* The two-column section: right column (photo/name/bio) starts
   right at the top of the row. The left column's short line +
   link is pushed down so the link ends up level with the bio
   text's start on the right, rather than the paragraph sitting at
   the top of the row — a deliberate offset, not a mistake. */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-intro {
  margin-top: 21.7rem;
}

.about-intro-wide,
.about-intro,
.about-bio-name,
.about-bio-text {
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 16px;
  line-height: 19px;
  color: var(--black);
}

.about-intro-wide p,
.about-intro p,
.about-bio-text p {
  margin: 0 0 1.3em;
}

.about-intro-wide p:last-of-type,
.about-intro p:last-of-type,
.about-bio-text p:last-of-type {
  margin-bottom: 0;
}

/* Deliberately more breathing room than a normal paragraph gap —
   the mockup sets this CTA apart from the line above it rather
   than butting it right up against it. */
.about-link {
  display: inline-block;
  margin-top: 4rem;
  text-decoration: underline;
  text-decoration-color: var(--mid);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.about-link:hover {
  text-decoration-color: var(--link-hover-accent);
}

.about-photo {
  display: block;
  width: 100%;
  aspect-ratio: 6 / 5;
  object-fit: cover;
  margin-bottom: 1.5rem;
}

.about-bio-name {
  margin: 0 0 1.3em;
}

.about-bio-text a {
  text-decoration: underline;
  text-decoration-color: var(--mid);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.about-bio-text a:hover {
  text-decoration-color: var(--link-hover-accent);
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  /* The 21.7rem offset only exists to align the link with the bio
     text in the desktop two-column layout, and the wide intro's
     own 4rem bottom margin exists to separate it from the grid
     below. Stacked on mobile, "Manoverboard is..." should just
     read as the next paragraph — one normal paragraph gap total,
     not both spacings stacked on top of each other. */
  .about-intro-wide {
    margin-bottom: 1.3em;
  }
  .about-intro {
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  .about-page { padding: 3rem var(--pad-mobile) 0; }
}

.about-presentations {
  max-width: 46em;
  margin-top: 5rem;
}

.about-presentations-title {
  margin: 0 0 1.5rem;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 18px;
  line-height: 21px;
  color: var(--black);
}

.about-presentations-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.about-presentations-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5em 1.5em;
  padding: 0.6em 0;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 16px;
  line-height: 19px;
  color: var(--black);
  border-bottom: 1px solid var(--rule);
}

.about-presentations-list li:first-child {
  border-top: 1px solid var(--rule);
}

.about-presentations-item-event {
  color: var(--mid);
}

/* No static underline — this list already has a rule under every
   row, so an underline sitting just above it read as a doubled
   line. Matches the .project-website treatment instead: plain text
   at rest, underline on hover/focus. */
a.about-presentations-item-title {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  color: inherit;
  text-decoration: none;
}

/* The underline is applied only to the title text span, not the
   whole flex link — an inline-flex container draws its underline
   across the full flex box (including the arrow's box) regardless
   of text-decoration set on that child, in every browser tested. */
a.about-presentations-item-title:hover .about-presentations-item-title-text,
a.about-presentations-item-title:focus-visible .about-presentations-item-title-text {
  text-decoration: underline;
  text-decoration-color: var(--link-hover-accent);
  text-underline-offset: 3px;
}

a.about-presentations-item-title .arrow {
  display: inline-block;
  color: var(--light-grey);
}

/* ======================================================
   HOME — page-specific overrides (requested for Home only;
   other pages keep the standard nav/footer/type treatment
   until their own mockups are provided).
   ====================================================== */

/* Everything on Home is weight 600 except the logo, which is an
   SVG image (.wordmark) rather than styled text. */
.home-header,
.home,
.home-footer {
  font-weight: var(--weight-ui);
}

/* Even top/right breathing room around the header text, matching
   the page's horizontal margin. */
.home-header {
  padding-top: 29px;
  align-items: flex-end;
  min-height: 104px;
}

/* Wrapped onto two rows here (see the 600px header-wrap rule near
   the top of the file), so the desktop min-height (104px, sized for
   one row) is too short to keep the header the same height on pages
   without the wave — recalibrated for the wrapped, with-wave state. */
@media (max-width: 600px) {
  .home-header {
    min-height: 164px;
    /* align-items only aligns content within each wrapped row —
       align-content controls how the two rows themselves share the
       reserved min-height. Left at its default, the extra space on
       pages without the wave (shorter natural content) spread out
       between the rows instead of packing them together at the
       bottom, pushing the logo up and away from the nav. */
    align-content: flex-end;
  }
}

.brand {
  display: flex;
  flex-direction: column;
}

.brand-wave {
  margin-bottom: 34px;
  width: 134px;
  height: auto;
}

.home-header .wordmark img {
  height: 20px;
  position: relative;
  top: -2.6px;
}

.home-header .nav a,
.home-header .lang-toggle a {
  font-size: 16px;
  font-weight: var(--weight-ui);
  line-height: 1.2;
  color: var(--black);
}

.home-tagline {
  max-width: calc(var(--measure) + 2 * var(--pad-desktop));
  font-size: 18px;
  font-weight: var(--weight-ui);
  line-height: 21px;
  color: var(--black);
  margin-bottom: 30px;
}

@media (max-width: 600px) {
  .home-tagline {
    width: 100%;
  }
}

.home-caption,
.home-clients p,
.home-portfolio-link {
  font-size: 16px;
  font-weight: var(--weight-ui);
  line-height: 19px;
  color: var(--black);
}

.slideshow-toggle {
  color: var(--black);
  border-color: var(--black);
}

.home-footer {
  align-items: flex-start;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  line-height: 1.3;
}

.home-footer .footer-copy {
  font-weight: var(--weight-ui);
  color: var(--black);
}

.footer-contact-line {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 0.9rem;
  line-height: 1.3;
  color: var(--black);
}

.footer-contact-line a {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--mid);
  transition: text-decoration-color 0.2s ease;
}

.footer-contact-line a:hover {
  text-decoration-color: var(--link-hover-accent);
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 0.9rem;
  line-height: 1.3;
  color: var(--black);
  text-decoration: underline;
  text-decoration-color: var(--mid);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.footer-links a:hover {
  text-decoration-color: var(--link-hover-accent);
}

/* Drifting underline hover: a rule that grows in from the left
   rather than snapping on/off. Applied to Home's real text links
   (nav, language toggle) — not the wordmark, which stays a plain
   identity mark rather than a nav item. */
.home-header .nav a,
.home-header .lang-toggle a {
  position: relative;
  text-decoration: none;
}

.home-header .nav a::after,
.home-header .lang-toggle a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--link-hover-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-header .nav a:hover::after,
.home-header .nav a:focus-visible::after,
.home-header .lang-toggle a:hover::after,
.home-header .lang-toggle a:focus-visible::after {
  transform: scaleX(1);
}

.home-header .lang-toggle a[aria-current="true"]::after,
.home-header .nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  .home-header .nav a::after,
  .home-header .lang-toggle a::after {
    transition: none;
  }
}

/* ======================================================
   SHOP — not linked from nav yet (unlaunched: content lives
   under content/_drafts so it 404s for anyone but a logged-in
   Panel preview). Two fixed categories (Lamps, Small Vases)
   rather than a filter route — simplest fit for a handful of
   items in two groups.
   ====================================================== */

.shop-page {
  padding: 5rem var(--pad-desktop) 0;
}

.shop-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 18px;
  line-height: 21px;
  color: var(--black);
}

.shop-intro {
  max-width: var(--measure);
  margin: 0 0 3rem;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 16px;
  line-height: 19px;
  color: var(--black);
}

.shop-section {
  margin-bottom: 4rem;
}

/* One divider, between sections — not under every category
   heading — so it reads as separating the rows of products rather
   than underlining each title. */
.shop-section + .shop-section {
  padding-top: 4rem;
  border-top: 1px solid var(--rule);
}

.shop-section-title {
  margin: 0 0 1.5rem;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 16px;
  line-height: 19px;
  color: var(--black);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.shop-card {
  display: block;
  color: var(--black);
}

.shop-card-image {
  position: relative;
  aspect-ratio: 1;
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--rule);
}

.shop-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-sold-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.2rem 0.6rem;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 20px;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 14px;
  line-height: 16px;
  color: var(--mid);
}

.shop-card-name {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 16px;
  line-height: 19px;
}

.shop-card-price {
  margin: 0.15rem 0 0;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 14px;
  line-height: 16px;
  color: var(--mid);
}

@media (max-width: 768px) {
  .shop-page { padding: 3rem var(--pad-mobile) 0; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .shop-grid { grid-template-columns: 1fr; }
}

/* ---------- Product ---------- */

.product-page {
  padding: 5rem var(--pad-desktop) 0;
}

.product-back {
  margin: 2rem 0 0;
}

.product-back a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 16px;
  line-height: 19px;
  color: var(--black);
}

/* Underline lives on the text span only — the arrow is a flex item
   alongside it (not part of the same inline run), and browsers
   "blockify" flex items regardless of a declared inline-block, which
   makes a parent's text-decoration bleed through inconsistently.
   Scoping the decoration to just the label sidesteps that entirely. */
.product-back-label {
  text-decoration: underline;
  text-decoration-color: var(--mid);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.product-back a:hover .product-back-label {
  text-decoration-color: var(--link-hover-accent);
}

.product-back .arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.product-back a:hover .arrow {
  transform: translateX(-3px);
}

/* Gallery (big photo + a row of smaller ones underneath) on the
   left, product info pinned to the top of the right column — the
   same "fixed text column, dedicated photo column" shape used on
   Contact/Statements, just with the photo column doing more work. */
.product-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
  align-items: start;
}

/* Capping the whole gallery column's width (rather than just the
   main photo's height) means the thumbnails scale down with it
   automatically instead of drifting out of proportion on wide
   viewports — one constraint instead of two that could disagree. */
.product-gallery {
  max-width: 640px;
}

.product-photo-main-wrap {
  position: relative;
  margin-bottom: var(--gap);
}

.product-photo-main {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.product-photo-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.product-photo-thumb {
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.product-photo-thumb img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.product-photo-thumb:hover {
  border-color: var(--rule);
}

.product-photo-thumb.is-active {
  border-color: var(--black);
}

.product-title {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 18px;
  line-height: 21px;
  color: var(--black);
}

.product-category {
  margin: 0.1rem 0 0;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 16px;
  line-height: 19px;
  color: var(--mid);
}

.product-sku {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 16px;
  line-height: 19px;
  color: var(--light-grey);
}

.product-materials {
  margin: 0.75rem 0 0;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 16px;
  line-height: 19px;
  color: var(--mid);
}

.product-description {
  margin: 1.5rem 0;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 16px;
  line-height: 19px;
  color: var(--black);
}

/* Kirbytext wraps plain paragraphs in their own <p> - the global
   `p { font-size: 16px }` base rule targets that element directly
   and overrides the size inherited from its container, so it needs
   repeating here explicitly. */
.product-description p {
  font-size: 16px;
  margin: 0 0 1em;
}

.product-description p:last-child {
  margin-bottom: 0;
}

/* Constant per-shop notes (one-of-a-kind, care, shipping) - small
   and muted since they're supporting information, not the sell. */
.product-details {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 0.6em;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 16px;
  line-height: 19px;
  color: var(--mid);
}

.product-details p {
  margin: 0;
  font-size: 16px;
}

.product-price {
  margin: 0 0 1.5rem;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 18px;
  line-height: 21px;
  color: var(--black);
}

.product-sold {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 20px;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 16px;
  line-height: 19px;
  color: var(--mid);
}

.product-buy a {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--black);
  border: 1px solid var(--black);
  border-radius: 4px;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 16px;
  line-height: 19px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.product-buy a:hover {
  background: var(--black);
  color: var(--white);
}

@media (max-width: 768px) {
  .product-page { padding: 3rem var(--pad-mobile) 0; }
  .product-grid { grid-template-columns: 1fr; gap: 2rem; }
  .product-photo-row { grid-template-columns: repeat(3, 1fr); }
}

/* ======================================================
   404 — a small on-brand moment ("Man overboard!") rather
   than a bare error dump. The wave from the header, scaled
   up and gently bobbing, is the whole visual; everything
   else uses the site's existing type/link styles.
   ====================================================== */

.error-page {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem var(--pad-desktop);
}

.error-wave {
  width: 200px;
  height: auto;
  margin-bottom: 2rem;
  animation: error-bob 3s ease-in-out infinite;
}

@keyframes error-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-3deg); }
}

@media (prefers-reduced-motion: reduce) {
  .error-wave { animation: none; }
}

.error-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 18px;
  line-height: 21px;
  color: var(--black);
}

.error-message {
  max-width: 32em;
  margin: 0 0 2rem;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 16px;
  line-height: 19px;
  color: var(--mid);
}

.error-back a {
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 16px;
  line-height: 19px;
  color: var(--black);
  text-decoration: underline;
  text-decoration-color: var(--mid);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.error-back a:hover {
  text-decoration-color: var(--link-hover-accent);
}

@media (max-width: 768px) {
  .error-page { padding: 3rem var(--pad-mobile); }
}

/* ======================================================
   COLLAGE — a pile of photos and GIFs that visitors can drag
   around. Without JS it's a plain wrapped list; collage.js adds
   .is-scattered and positions everything absolutely. Images can
   be pulled right off the page, and pass *under* the header and
   footer (which stay clickable) over a blank white page.
   ====================================================== */

.collage-body .site-header,
.collage-body .site-footer {
  position: relative;
  z-index: 50;
  pointer-events: none;
}

.collage-body .site-header a,
.collage-body .site-footer a {
  pointer-events: auto;
}

/* Clip sideways only: images pulled off the left/right edge vanish
   instead of creating a horizontal scrollbar, while vertical overflow
   stays visible so they can still slide up under the header and down
   under the footer. */
.collage-page {
  position: relative;
  z-index: 1;
  padding-top: 3rem;
  overflow-x: clip;
}

/* The shared .skip-link parks itself off-screen with position:absolute,
   which is measured from the nearest positioned ancestor - here that's
   <main>, so it would sit visibly in the header. Fixed is measured from
   the viewport. */
.collage-skip {
  position: fixed;
}

.collage-toggle {
  position: relative;
  z-index: 2;
  margin-top: 0;
}

.collage {
  list-style: none;
  margin: 0;
  padding: 0 var(--pad-desktop);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.collage-item {
  width: min(220px, 42vw);
}

.collage-item figure {
  margin: 0;
}

.collage-item img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  -webkit-user-drag: none;
}

.collage-item figcaption {
  margin-top: 0.4rem;
  font-family: var(--font-ui);
  font-weight: var(--weight-ui);
  font-size: 0.9rem;
  line-height: 1.3;
  color: var(--mid);
}

.collage.is-scattered {
  display: block;
  position: relative;
  padding: 0;
}

.collage.is-scattered .collage-item {
  position: absolute;
  top: 0;
  left: 0;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
  transform-origin: 50% 50%;
}

.collage.is-scattered .collage-item.is-dragging {
  cursor: grabbing;
}

.collage-item:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 4px;
}

@media (max-width: 768px) {
  .collage-page { padding-top: 1.5rem; }
  .collage:not(.is-scattered) { padding: 0 var(--pad-mobile); }
}

/* Flotsam: open water at the top, deepening toward the floor.
   Text colours are held dark enough for 4.5:1 on every part of the gradient. */
html:has(.collage-body) { background: #76b3ad; }
.collage-body {
  --mid: var(--black);
  background: linear-gradient(to bottom, #fcfcfc 0%, #e4f3f1 25%, #b4dbd7 60%, #76b3ad 100%);
  background-repeat: no-repeat;
  min-height: 100vh;
}
