@font-face {
  font-family: "Zilla Slab";
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/zilla-slab-700.woff2") format("woff2");
}

/* registered as <color> so the overlay's post color can crossfade between posts
   (unregistered custom properties can't be transitioned) */
@property --panel-paper {
  syntax: "<color>";
  inherits: true;
  initial-value: #f2eee4;
}
@property --panel-ink {
  syntax: "<color>";
  inherits: true;
  initial-value: #2b2b30;
}
/* whole-page paper color (paper-bg setting) — registered so it can crossfade
   when navigating between direct posts with prev/next */
@property --page-paper {
  syntax: "<color>";
  inherits: true;
  initial-value: #101014;
}
@property --page-ink {
  syntax: "<color>";
  inherits: true;
  initial-value: #e9e7e2;
}

:root {
  color-scheme: dark;   /* already a dark theme — opt out of browser auto-darkening */
  --bg: #101014;
  --surface: #1a1a21;
  --text: #e9e7e2;
  --muted: #9a97a2;
  --accent: #e5aa4c;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: var(--accent); }

.site-header {
  position: relative;
  height: 48vh;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 7vh;   /* brand sits a touch higher in the band */
}

/* stack the brand and its optional subtitle banner, centered */
.brand-block {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}

.header-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* .header-image {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
} */

main {
  max-width: 1400px;
  margin: -300px auto 0;   /* top, auto L/R, 0 bottom — walls tuck under the header */
  padding: 0 1rem 3rem;
  position: relative;
  z-index: 2;
}

/* mobile: the header is much shorter, so a -300px pull-up drags the wall over
   the brand — ease it down */
@media (max-width: 640px) {
  main { margin-top: -120px; }
}

/* direct post pages don't tuck under the header at all — no repositioning, so
   the title never collides with the header image or brand */
body.post-page main { margin-top: 0; }

/* direct post: shrink the header band (all widths) so the post gets more of the
   screen and its content sits higher; the brand moves up — drop the big top
   padding and center it — to fit the thinner 12vh band */
body.post-page .site-header {
  height: 12vh;
  padding-top: 0;
  align-items: center;
}
/* the thin post-page band has no room for the subtitle banner */
body.post-page .brand-subtitle { display: none; }

.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(30, 41, 33, 0) 0%,
    rgba(30, 41, 33, 0) 55%,
    rgba(30, 41, 33, 0.5) 80%,
    #1e2921 100%
  );
  pointer-events: none;
}

.brand {
  position: relative;
  z-index: 2;
  font-family: "Zilla Slab", serif;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.25rem;
  font-size: 2.6rem;
  font-weight: bold;
  border: 3px solid #fff;
  padding: 0.5rem 1rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 0 12px rgba(0,0,0,0.5);
  background: rgba(16, 16, 20, 0.85);
}

.brand-subtitle {
  position: relative;
  z-index: 2;
  font-family: "Zilla Slab", serif;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.35rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(16, 16, 20, 0.8);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

@keyframes header-fade {
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .header-image { animation: none; opacity: 1; }
}

@media (max-width: 640px) {
  .brand { font-size: 1.7rem; letter-spacing: 0.15rem; }
  .brand-subtitle { font-size: 0.82rem; letter-spacing: 0.15rem; padding: 0.28rem 0.8rem; }
}

.site-footer {
  max-width: 1400px;
  margin: 3rem auto 0;
  padding: 2rem 1rem 3rem;
  border-top: 1px solid #2a2a33;
  text-align: center;
}

.footer-brand {
  font-family: "Zilla Slab", serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.25rem;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.footer-brand:hover { color: var(--accent); }

.footer-copy {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.page-title { margin: 0.5rem 0 1.5rem; }

/* ---- front-page wall of post cards ---- */

.wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s ease;
}

.card:hover { transform: translateY(-3px); }

.card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.card-info { padding: 0.75rem 1rem 0.9rem; }

.card-info h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.card-meta {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.card-tags {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
}

.card-tags span { color: var(--accent); margin-right: 0.6rem; }

.wall-more {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1rem;
  color: var(--accent);
  text-decoration: none;
}

/* ---- trailmap homepage template ---- */

/* deep forest green living map: dark mossy base with soft glade tints;
   the animated topographic contours draw on a fixed canvas behind it all */
body.trail-page {
  background:
    radial-gradient(ellipse 900px 620px at 18% 22%, rgba(88, 124, 82, 0.28), transparent 65%),
    radial-gradient(ellipse 980px 700px at 82% 70%, rgba(38, 68, 48, 0.5), transparent 65%),
    #1e2921;
}

/* Explicit dark theme. Chromium/Brave "force dark" (common on Android) only
   leaves a page alone when it detects a *provided* dark theme — and on mobile
   that detection keys off a prefers-color-scheme query, not just the
   color-scheme property. These restate the site's own dark colors so the
   browser recognises it as already-dark and stops inverting it to black /
   hiding the header. Keep in sync with the base rules above. */
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; }
  html, body { background: var(--bg); color: var(--text); }
  body.trail-page {
    background:
      radial-gradient(ellipse 900px 620px at 18% 22%, rgba(88, 124, 82, 0.28), transparent 65%),
      radial-gradient(ellipse 980px 700px at 82% 70%, rgba(38, 68, 48, 0.5), transparent 65%),
      #1e2921;
  }
}

body.trail-page .site-footer {
  border-top-color: rgba(190, 210, 180, 0.16);
  position: relative;
  z-index: 1;
}

.topo-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* main (and the topo canvas inside it) paints over the header, so the
   contours ghost faintly across the header photo — topo.js draws the
   header band at reduced alpha */
body.trail-page main {
  position: relative;
  z-index: 2;
}

body.trail-page .site-header {
  position: relative;
  z-index: 1;
}

.trail {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  padding: 1rem 0 2rem;
}

.trail-connector {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.trail-connector path {
  fill: none;
  stroke: #d8cfb0;
  stroke-width: 2.5;
  stroke-dasharray: 1 9;
  stroke-linecap: round;
  opacity: 0.6;
}

.trail-row {
  position: relative;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  gap: 1rem;
  padding-top: 6rem; /* band above the polaroids where the glyphs live (96px, see GLYPH_BAND_PX in trail.js) */
}

.trail-row--rev { flex-direction: row-reverse; }

.trail-glyph {
  position: absolute;
  z-index: 0;
  opacity: 0.55;
}

.trail-node {
  position: relative;
  z-index: 1;
  width: clamp(120px, 15vw, 190px);
  background: var(--paper, #f2eee4);
  color: var(--ink, #2b2b30);
  padding: 7px 7px 10px;
  border-radius: 2px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
  text-decoration: none;
  display: block;
  transform: rotate(var(--tilt)) translateY(var(--dy));
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  /* dealt onto the table one at a time, in order */
  animation: polaroid-lay 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.25) backwards;
  animation-delay: calc(min(var(--i, 0), 40) * 85ms);
}

/* each card drops from above (held closer, flat) and settles into its tilt */
@keyframes polaroid-lay {
  from {
    opacity: 0;
    transform: rotate(0deg) translateY(calc(var(--dy) - 22px)) scale(1.12);
  }
  55% { opacity: 1; }
  to {
    opacity: 1;
    transform: rotate(var(--tilt)) translateY(var(--dy)) scale(1);
  }
}

.trail-node img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  height: auto;
}

/* seasonal glyph pinned to the polaroid's top-right corner — visible on
   desktop and mobile (unlike the scattered .trail-glyph layer) */
.trail-glyph-badge {
  position: absolute;
  top: -16px;
  right: -12px;
  width: clamp(40px, 6vw, 52px);
  height: clamp(40px, 6vw, 52px);
  z-index: 2;
  transform: rotate(9deg);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.trail-node:hover,
.trail-node:focus-visible {
  transform: rotate(0deg) translateY(calc(var(--dy) - 8px)) scale(1.05);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.65);
  z-index: 3;
}

/* keyboard-selected polaroid: lifts like a hover, plus a marker pointing at it
   so it reads as a deliberate selection you can open with Enter */
.trail-node--selected {
  transform: rotate(0deg) translateY(calc(var(--dy) - 8px)) scale(1.05);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.65);
  z-index: 4;
}
.trail-node--selected::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -20px;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 12px solid var(--accent);   /* points down at the card */
  transform: translate(-50%, 0);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .trail-node--selected::after { animation: trail-marker-bob 0.9s ease-in-out infinite; }
}
@keyframes trail-marker-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, -4px); }
}

.trail-title {
  display: block;
  margin-top: 0.5rem;
  font-family: "Zilla Slab", serif;
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.2;
}

.trail-date {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.85rem;
  color: var(--ink, #2b2b30);
  opacity: 0.72;
}

.trail-signpost {
  align-self: center;
  z-index: 1;
  position: relative;
  width: 7rem;
  text-align: center;
  flex-shrink: 0;
}

.trail-signpost svg { width: 4rem; height: 4rem; display: block; margin: 0 auto; }

.trail-signpost span {
  font-family: "Zilla Slab", serif;
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

/* trail.js pins signposts onto the connector path */
.trail-signpost--placed {
  position: absolute;
  transform: translate(-50%, -50%);
  margin: 0;
}

/* on right-to-left rows the walking direction reverses — flip the sign */
.trail-signpost--flip svg { transform: scaleX(-1); }

@media (min-width: 1700px) {
  .trail-node { width: clamp(140px, 12vw, 220px); }
}

/* polaroid size setting: large = 2x, rows hold 3/2 instead of 5/4 */
.trail--lg .trail-node { width: clamp(240px, 30vw, 400px); }
.trail--lg .trail-title { font-size: 1.4rem; }
.trail--lg .trail-date { font-size: 1.05rem; }

/* mobile: rows flatten to one zigzag column; parity does the alternation */
@media (max-width: 899px) {
  .trail { gap: 2.2rem; }
  .trail-row { display: contents; }
  .trail-glyph { display: none; } /* row-relative coords are meaningless here */
  .trail-node,
  .trail--lg .trail-node { width: clamp(160px, 46vw, 220px); }  /* mobile is fine as-is */
  .trail--lg .trail-title { font-size: 1.08rem; }
  .trail--lg .trail-date { font-size: 0.85rem; }
  .trail-node--even { align-self: flex-start; margin-left: 6vw; }
  .trail-node--odd { align-self: flex-end; margin-right: 6vw; }
  .trail-signpost { align-self: center; }
}

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

/* ---- trailmap in-place post overlay ---- */

.post-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 16, 12, 0.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.22s ease;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 2vw;
}

.post-overlay--open { opacity: 1; }

.post-panel {
  width: min(1100px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #1a231d;
  border: 6px solid var(--panel-paper, #f2eee4);
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.post-panel-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.9rem 0.55rem 1.25rem;
  /* solid so the pinned title/tags stay readable as photos scroll under it */
  background: #1a231d;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

.post-panel-heading { min-width: 0; }   /* let the title ellipsis instead of pushing the buttons */
.post-panel-heading .post-header { margin: 0; }
.post-panel-heading .post-header h1 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-panel-heading .post-meta { margin: 0.1rem 0 0; font-size: 0.78rem; }

.post-panel-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;             /* pills wrap to a second line when the panel is narrow */
  justify-content: flex-end;   /* ...staying right-aligned */
  gap: 0.5rem;
  flex: 1 1 auto;              /* fill the row so the title truncates, not the buttons */
}

/* the two action groups: on desktop they sit inline (steps then primary → prev
   trail next share ✕); on mobile they become grid cells (see the media query) */
.post-panel-steps,
.post-panel-primary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* second copy of the nav at the bottom of the panel (no ✕ there) */
.post-panel-foot {
  margin: 0;
  padding: 0.6rem 1.25rem 1.4rem;
  justify-content: flex-end;
}

/* overlay nav pills and the share button follow the panel colors:
   light on the dark-green panel, ink-dark on a paper-tinted panel. Their pill
   shape/typography comes from the shared .post-nav-link/.post-share rule below. */
.post-panel .post-nav-link,
.post-panel .post-share { color: var(--panel-paper, var(--accent)); }
.post-panel--paper .post-nav-link,
.post-panel--paper .post-share { color: var(--panel-ink, var(--accent)); }

/* circled like the nav pills; border follows the (panel-colored) text */
.post-close {
  background: none;
  border: 1px solid currentColor;
  border-radius: 99px;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--panel-paper, var(--text));
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.post-close:hover { filter: brightness(1.25); }

.post-panel-body { padding: 0 1.25rem 1.5rem; }
.post-panel-body .post-header h1 { margin-top: 0; }

/* paper-tinted overlay (admin setting): the top bar matches the paper, its
   controls switch to the readable ink, and the body-text card keeps its dark
   background with light text so the copy is never dark-on-dark */
.post-panel--paper .post-panel-bar { background: var(--panel-paper); }
.post-panel--paper .post-close { color: var(--panel-ink, var(--text)); }
/* date + tags follow the ink too, so they stay readable when it flips to dark */
.post-panel--paper .post-meta { color: var(--panel-ink, var(--muted)); }
.post-panel--paper .post-meta .tag { color: var(--panel-ink, var(--accent)); }
.post-panel .body-card { color: var(--text); }

@media (max-width: 640px) {
  .post-overlay { padding: 2vh 1vw; }
  .post-panel { width: 98vw; max-height: 96vh; border-width: 4px; }
}

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

/* (GLightbox's vendored z-index is 999999 !important — already above) */

/* ---- post page ---- */

/* top row: title + tags on the left, nav pills on the right — same shape as the
   overlay's sticky bar. Wraps the nav below the header on narrow screens. */
.post-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}
.post-topbar .post-header { margin: 0; flex: 1 1 16rem; min-width: 0; }
.post-topbar .post-header h1 { margin: 0 0 0.2rem; }
.post-topbar .post-meta { margin: 0; }
/* the nav sits top-right beside the title; drop its standalone vertical margin.
   It keeps its size (nowrap, below) — the title yields, or the whole row wraps. */
.post-topbar .post-nav--top { margin: 0.35rem 0 0; flex: 0 0 auto; }
/* direct-post nav stays on one row (prev / trail / next / share) */
.post-nav--top,
.post-nav--bottom { flex-wrap: nowrap; }

/* prev / trail / next (+ share) — right-aligned, above and below the article */
.post-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
}

.post-nav-link,
.post-share {
  font-family: "Zilla Slab", serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  background: none;
  border: 1px solid currentColor;
  border-radius: 99px;
  padding: 0.32rem 0.95rem;
  cursor: pointer;
  white-space: nowrap;
}

.post-nav-link:hover,
.post-share:hover { filter: brightness(1.25); }

.post-header h1 { margin: 0.5rem 0 0.25rem; }

.post-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.post-meta .tag {
  margin-left: 0.6rem;
  text-decoration: none;
}

.post-meta .tag:hover { text-decoration: underline; }

/* mobile: the nav crowds, so prev/next collapse to just their arrow (as round
   icon buttons like the ✕), and the overlay's "Go to trail" drops out — the ✕
   already dismisses it. The direct post page keeps "Go to trail" (it has no ✕).
   The title is allowed to wrap rather than truncate. */
@media (max-width: 640px) {
  .post-nav-label { display: none; }        /* leave the arrow */
  .post-nav-step {
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 99px;
  }
  .post-nav-arrow { font-size: 1.05rem; }
  .post-panel [data-nav="trail"] { display: none; }

  /* direct post: give the top nav its own full-width row so it right-aligns.
     (otherwise a wrapped flex item sits at the left of its line, which read as
     "pushed down and left aligned") */
  .post-topbar .post-nav--top { flex-basis: 100%; }

  /* overlay bar becomes a 2×2 grid:
       row 1: title            | share + ✕
       row 2: date + tags      | prev/next
     The wrappers collapse (display:contents) so the title, meta and the two
     action groups become direct grid items. The action groups sit in the fixed
     right-hand (auto) column pinned to the top of their row, so long tags only
     grow the meta cell downward — the arrows never shift. */
  .post-panel-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "title primary"
      "meta  steps";
    align-items: start;
    column-gap: 0.75rem;
    row-gap: 0.4rem;
  }
  .post-panel-heading,
  .post-panel-heading .post-header,
  .post-panel-actions { display: contents; }
  .post-panel-heading .post-header h1 {
    grid-area: title;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .post-panel-heading .post-meta { grid-area: meta; }
  .post-panel-primary { grid-area: primary; justify-self: end; align-self: start; }
  .post-panel-steps { grid-area: steps; justify-self: end; align-self: start; }
}

/* post text rides inside the masonry as its first card — images flow
   into the columns beside and below it */
.body-card {
  background: var(--surface);
  border-radius: 6px;
  padding: 1.25rem 1.4rem;
  break-inside: avoid;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.body-card p:first-child { margin-top: 0; }
.body-card p:last-child { margin-bottom: 0; }

/* CSS multi-column masonry: zero JS, preserves aspect ratios.
   Order flows down columns, not across rows — fine for a photo wall. */
.masonry {
  columns: 1;
  column-gap: 1rem;
}

.masonry a {
  display: block;
  break-inside: avoid;
  margin-bottom: 1rem;
}

.masonry img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

/* Photos fade/drop in on load. Pure CSS on purpose: the animation always ends
   at opacity 1, so an image can never get stuck hidden the way a JS load-event
   reveal could. No JS, no is-loading class, nothing to misfire. */
.masonry img {
  animation: photo-in 0.5s ease backwards;
}

@keyframes photo-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

/* JS row-major masonry (site.js) — flex columns replace CSS multi-columns */
.masonry--js {
  columns: unset;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.masonry-col { flex: 1 1 0; min-width: 0; }

/* post-page gallery blocks fall quickly into place on first load */
.masonry--fall .masonry-col > * {
  animation: fall-in 0.4s cubic-bezier(0.3, 1.35, 0.55, 1) backwards;
  animation-delay: calc(var(--fall-i, 0) * 30ms);
}

@keyframes fall-in {
  from { opacity: 0; transform: translateY(-32px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .masonry--fall .masonry-col > * { animation: none; }
}

/* breakpoints: mobile 1 col / tablet 2 / 1080p 3 / 1440p 4 */
@media (min-width: 640px) {
  .masonry { columns: 2; }
}

@media (min-width: 1024px) {
  .masonry { columns: 3; }
}

@media (min-width: 1700px) {
  main { max-width: 1800px; }
  .masonry { columns: 4; }
}
