:root {
  --hsz: clamp(3rem, 7vw, 6rem);
  --stroke: 3px;
  --bg: #000;
  --paper: #cfcfcf;
  --muted: rgba(207,207,207,0.6);
  --line: rgba(255,255,255,0.18);
  --display: 'League Gothic', 'Bebas Neue', Impact, sans-serif;
  --body: 'Inter', Helvetica, Arial, sans-serif;
  --rail: 44px;
  --pad: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--paper);
  font-family: var(--body); font-weight: 300; font-size: 1.05rem; line-height: 1.25;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
main { padding-left: var(--rail); }

/* Film grain */
.grain {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); } 60% { transform: translate(-4%, -1%); }
  80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* Vertical rail (Film Portfolio / 2025 / name) */
.rail {
  position: fixed; top: 100vh; bottom: 0; left: 0; width: var(--rail); z-index: 50;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  padding: 18px 0;
}
.rail span { writing-mode: vertical-rl; font-size: 0.95rem; letter-spacing: 0.04em; }
.rail span:first-child, .rail span:last-child { transform: none; }
.rail span:nth-child(2) { transform: rotate(180deg); }
.rail span:first-child { transform: rotate(180deg); }

/* Cover */
.cover { position: relative; height: 100vh; min-height: 560px; overflow: hidden; margin-left: calc(-1 * var(--rail)); }
.cover-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%;
}
.cover-title {
  position: absolute; left: -0.06em; top: 0; z-index: 2; /* negative = cancels the font's left side bearing so letters sit flush */
  display: flex; flex-direction: column;
  font-family: var(--body); font-weight: 900; text-transform: uppercase;
  font-size: min(44vh, 28vw); line-height: 0.75; letter-spacing: -0.045em;
  color: rgba(238, 238, 238, 0.72);
}
.cover-tag, .cover-sig { position: absolute; z-index: 2; right: var(--pad); text-align: right; font-family: var(--display); line-height: 1; text-transform: none; }
.cover-tag { top: 22px; font-size: clamp(1.4rem, 2.6vw, 2.2rem); text-transform: uppercase; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,0.5); }
.cover-sig { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,0.5); bottom: 28px; font-family: var(--display); font-size: clamp(1.3rem, 2.3vw, 2rem); }

/* Index */
.index { padding: clamp(80px, 12vh, 140px) var(--pad); display: flex; justify-content: flex-end; }
.index ol { list-style: none; text-align: right; }
.index li { margin: 0.12em 0; }
.index a {
  font-family: var(--display); font-size: clamp(2.6rem, 6.5vw, 5.6rem); line-height: 1.05; text-transform: uppercase;
  transition: color 0.2s;
}
.index a i { font-style: normal; font-weight: 300; margin-right: 0.35em; color: var(--muted); }
.index a:hover { color: #fff; }

/* Blocks */
.block {
  --bpad: clamp(60px, 10vh, 120px);
  position: relative; padding: var(--bpad) var(--pad);
}
/* vertical rail line: full height on the index and close sections (the hero has none) */
.index::before, .close::before {
  content: ''; position: absolute; z-index: 3; left: 0; top: 0; bottom: 0; width: calc(clamp(3rem, 7vw, 6rem) * 0.05); background: var(--paper);
}
.index { position: relative; }
/* on content blocks the line comes down, turns into the arrow at the heading, and resumes below it */
.block::before {
  content: ''; position: absolute; left: 0; top: 0; width: var(--stroke); background: var(--paper);
  height: calc(var(--bpad) + var(--hsz) * 0.475 + var(--stroke) / 2);
}
.block::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: var(--stroke); background: var(--paper);
  top: calc(var(--bpad) + var(--hsz) * 0.95 + 14px);
}
.arrow-head {
  display: flex; align-items: center; gap: 0.28em;
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: var(--hsz); line-height: 0.95; margin-bottom: clamp(32px, 6vh, 64px);
}
/* horizontal stroke of the elbow, starting at the vertical rail line, ending in an open chevron */
.arrow {
  position: relative; flex: none; height: var(--stroke); background: var(--paper);
  margin-left: calc(-1 * var(--pad));
  width: calc(var(--pad) + 1.2em);
}
/* open chevron whose outer point lands exactly on the end of the line */

.row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(24px, 4vw, 60px); align-items: start; padding: clamp(24px, 4vh, 40px) 0;
}
.copy { padding-top: 6px; }
.copy h3 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.4rem, 4.6vw, 4rem); line-height: 0.95; margin-bottom: 12px;
}
.copy h3.sm { font-size: clamp(2rem, 3.4vw, 3rem); }
.copy p { font-size: clamp(1.2rem, 1.9vw, 1.6rem); line-height: 1.25; }
.copy p.note { font-size: 0.92rem; color: rgba(207, 207, 207, 0.72); margin-top: 18px; max-width: 34ch; line-height: 1.45; }

.lead-text p { font-size: clamp(1.6rem, 3.2vw, 2.8rem); line-height: 1.12; max-width: 24ch; margin-bottom: 28px; }
.btn {
  display: inline-block; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 13px 22px; border: 1px solid var(--paper); transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--paper); color: var(--bg); }

/* Image tiles */
.tiles.one { display: grid; }
.tile { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #111; }
.tile img {
  width: 100%; height: 100%; object-fit: cover;
  
  transition: transform 0.9s;
}
.tile:hover img { transform: scale(1.03); }
.cap {
  position: absolute; left: 0; bottom: 0; padding: 7px 12px; background: var(--bg);
  font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  opacity: 0; transform: translateY(8px); transition: 0.3s;
}
.tile:hover .cap, .tile:focus-visible .cap { opacity: 1; transform: none; }

.tile.ph {
  display: grid; place-items: center; text-align: center;
  background: radial-gradient(ellipse at 28% 20%, rgba(207, 207, 207, 0.08), transparent 60%), linear-gradient(135deg, #151515, #050505);
  border: 1px solid var(--line);
}
.ph-title { font-family: var(--display); text-transform: uppercase; font-size: clamp(2.4rem, 6vw, 5rem); line-height: 0.92; color: rgba(207, 207, 207, 0.5); transition: color 0.3s; }
.tile.ph:hover .ph-title { color: var(--paper); }

/* Steps (process) */
.steps { display: grid; gap: 28px; }
.steps > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 28px; align-items: start; }
.steps h4 { font-family: var(--display); font-weight: 400; text-transform: uppercase; text-align: right; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 0.95; }
.steps p { font-size: clamp(1rem, 1.5vw, 1.25rem); line-height: 1.3; max-width: 52ch; }

/* Info grid */
.info-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) repeat(3, minmax(0, 1fr));
  column-gap: clamp(20px, 3vw, 48px); row-gap: clamp(28px, 5vh, 56px);
}
.portrait {
  grid-column: 1; grid-row: 1 / span 2; display: grid; place-items: center; aspect-ratio: 3 / 4;
  background: radial-gradient(ellipse at 30% 20%, rgba(207, 207, 207, 0.08), transparent 60%), linear-gradient(160deg, #1a1a1a, #050505);
  border-radius: 6px; overflow: hidden; border: 1px solid var(--line);
}
.portrait span { font-family: var(--display); font-size: clamp(8rem, 18vw, 16rem); color: rgba(207, 207, 207, 0.22); line-height: 1; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.cell h3 { font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: 0.95; margin-bottom: 6px; }
.cell p { font-size: clamp(1rem, 1.5vw, 1.3rem); line-height: 1.22; }
.cell a:hover { color: #fff; }
.role-line { grid-column: 1 / -1; font-family: var(--display); font-size: clamp(1.4rem, 2.4vw, 2.2rem); text-transform: uppercase; margin-top: -8px; }
.cell.wide { grid-column: 2 / span 2; }
.cell.wide p { max-width: 50ch; font-size: clamp(0.98rem, 1.3vw, 1.15rem); line-height: 1.3; }

/* Close */
.close { position: relative; min-height: 100vh; display: grid; place-items: center; text-align: center; overflow: hidden; }
.close-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.35); }
.close-inner { position: relative; z-index: 2; padding: 0 var(--pad); }
.close h2 { font-family: var(--display); font-weight: 400; font-size: clamp(4rem, 12vw, 11rem); line-height: 0.9; }
.big-link { display: inline-block; margin: 26px 0 10px; font-family: var(--display); font-size: clamp(2rem, 5vw, 4rem); letter-spacing: 0.01em; transition: color 0.2s; }
.big-link:hover { color: #fff; }
.mail { display: block; font-size: 1.15rem; color: var(--muted); }
.mail:hover { color: var(--paper); }
.close-foot { position: absolute; z-index: 2; bottom: 24px; left: 0; right: 0; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

@media (max-width: 900px) {
  :root { --rail: 30px; }
  .rail span { font-size: 0.75rem; }
  .row, .steps > div { grid-template-columns: 1fr; }
  .steps h4 { text-align: left; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .portrait { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 4 / 5; }
  .cell.wide { grid-column: 1 / -1; }
  .tile:not(.static) .cap, .tile:not(.static) .play { display: none; }
  .cover-title { font-size: min(34vh, 26vw); }
}
@media (prefers-reduced-motion: reduce) { .grain { animation: none; } html { scroll-behavior: auto; } }

/* block without a heading arrow: unbroken rail line */
.block.plain::before { height: 100%; }
.block.plain::after { display: none; }


/* ===== Hero HUD: viewfinder + REC + timecode ===== */
.vf {
  position: absolute; inset: clamp(14px, 2vw, 28px); z-index: 2; pointer-events: none;
  --c: rgba(255, 255, 255, 0.8); --l: 30px; --t: 2px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--t) no-repeat,
    linear-gradient(var(--c), var(--c)) top left / var(--t) var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--t) no-repeat,
    linear-gradient(var(--c), var(--c)) top right / var(--t) var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--t) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / var(--t) var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--t) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / var(--t) var(--l) no-repeat;
}
.hud {
  position: absolute; z-index: 3; left: clamp(30px, 3.6vw, 56px); bottom: clamp(30px, 3.6vw, 52px);
  display: flex; gap: 18px; align-items: center;
  font-family: var(--body); font-weight: 400; font-size: 0.85rem; letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.rec { display: flex; align-items: center; gap: 9px; }
.rec i { width: 10px; height: 10px; border-radius: 50%; background: #c0392b; animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* crossfading stills (extra height gives the parallax room) */
.cover-img { top: -8%; height: 116%; opacity: 0; transition: opacity 1.8s ease; }
.cover-img.is-on { opacity: 1; }

/* ===== Motion (only when JS runs and reduced-motion is off) ===== */
/* hero intro */
.js .cover-img.is-on { animation: push 7s cubic-bezier(.2, .6, .2, 1) both; }
@keyframes push { from { scale: 1.14; } to { scale: 1; } }
.ln { display: block; overflow: hidden; padding: 0.03em 0; margin: -0.03em 0; }
.js .ln > span { display: block; transform: translateY(108%); animation: rise 1.15s cubic-bezier(.16, .84, .24, 1) forwards; }
.js .ln:nth-child(1) > span { animation-delay: 0.25s; }
.js .ln:nth-child(2) > span { animation-delay: 0.4s; }
.js .ln:nth-child(3) > span { animation-delay: 0.55s; }
@keyframes rise { to { transform: none; } }
.js .cover-tag, .js .cover-sig, .js .hud, .js .vf { opacity: 0; animation: fade 1s ease 1.3s forwards; }
@keyframes fade { to { opacity: 1; } }
.cover-tag, .cover-sig { will-change: opacity; }

/* generic reveal */
.js .rv { opacity: 0; transform: translateY(28px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js .rv.in { opacity: 1; transform: none; }
.js .index li.rv { transform: translateX(60px); }
.js .index li.rv.in { transform: none; }

/* images wipe open, then settle (the clip is on the inner tile so the observed .tiles box stays measurable) */
.js .tiles.rv { opacity: 1; transform: none; }
.js .tiles.rv .tile { clip-path: inset(0 100% 0 0); transition: clip-path 1.2s cubic-bezier(.7, 0, .2, 1); transition-delay: var(--d, 0s); }
.js .tiles.rv.in .tile { clip-path: inset(0 0 0 0); }
.js .tiles.rv img { transform: scale(1.3); transition: transform 1.6s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js .tiles.rv.in img { transform: none; }
.js .tiles.rv.in .tile:hover img { transform: scale(1.03); transition-delay: 0s; transition-duration: 0.9s; }

/* section headings: the line draws out of the rail, the chevron lands, the title follows */
.js .arrow-head .arrow { background: linear-gradient(var(--paper), var(--paper)) 0 0 / 0% 100% no-repeat; transition: background-size 0.95s cubic-bezier(.7, 0, .2, 1) 0.1s; }
.js .arrow-head.in .arrow { background-size: 100% 100%; }
.js .arrow-head .arrow::after { opacity: 0; transition: opacity 0.2s ease 0.95s; }
.js .arrow-head.in .arrow::after { opacity: 1; }
.js .arrow-head .ht { opacity: 0; transform: translateX(-28px); transition: opacity 0.7s ease 0.75s, transform 0.9s cubic-bezier(.2, .7, .2, 1) 0.75s; display: inline-block; }
.js .arrow-head.in .ht { opacity: 1; transform: none; }
/* the vertical rail line grows down each block */
.js .block::before { transform: scaleY(0); transform-origin: top; transition: transform 0.6s cubic-bezier(.5, 0, .2, 1); }
.js .block.in::before { transform: scaleY(1); }
.js .block::after { transform: scaleY(0); transform-origin: top; transition: transform 1.2s cubic-bezier(.5, 0, .2, 1) 0.9s; }
.js .block.in::after { transform: scaleY(1); }

/* small interactions */
.index a { display: inline-block; transition: color 0.2s, transform 0.35s cubic-bezier(.2, .7, .2, 1); }
.index a:hover { transform: translateX(-18px); }
.big-link { position: relative; }
.big-link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0.02em; height: 0.04em; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.5s cubic-bezier(.7, 0, .2, 1); }
.big-link:hover::after { transform: scaleX(1); }
.btn { transition: background 0.25s, color 0.25s, letter-spacing 0.3s; }
.btn:hover { letter-spacing: 0.1em; }
@media (prefers-reduced-motion: reduce) { .rec i { animation: none; } }


/* ===== Events mosaic (copy + tight 3-column grid of stills) ===== */
.mosaic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: clamp(48px, 9vh, 96px); }
.mosaic .copy { grid-column: 1; grid-row: span 2; align-self: center; padding: 0 clamp(12px, 2vw, 32px) 0 0; }
.mosaic .tile { aspect-ratio: 16 / 9; }
.ph-num { position: absolute; top: 10px; left: 12px; font-size: 0.7rem; letter-spacing: 0.14em; color: rgba(207, 207, 207, 0.35); }
.mosaic .tile.ph { place-items: end start; }
.js .mosaic .tile { clip-path: inset(0 100% 0 0); transition: clip-path 1s cubic-bezier(.7, 0, .2, 1); transition-delay: var(--d, 0s); }
.js .mosaic.in .tile { clip-path: inset(0 0 0 0); }
.js .mosaic .tile img { transform: scale(1.25); transition: transform 1.5s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js .mosaic.in .tile img { transform: none; }
.js .mosaic.in .tile:hover img { transform: scale(1.04); transition-delay: 0s; transition-duration: 0.9s; }
@media (max-width: 900px) {
  .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mosaic .copy { grid-column: 1 / -1; grid-row: auto; padding: 0 0 18px; }
}



/* not yet available: no link, no hover, label always shown */
.tile.static { cursor: default; }
.tile.static .cap { opacity: 1; transform: none; }
.tile.static:hover img, .js .tiles.rv.in .tile.static:hover img { transform: none; }




/* Panos: brief sits under the role lines, in the left column */
.brief-title { margin-top: 34px; }
.copy .brief-title + p { max-width: 38ch; }

/* logo-only tile: the logo is centred on its own brand colour, not stretched edge to edge */
.tile.logo { background: var(--logo-bg, #111); }
.tile.logo img { position: absolute; inset: 0; margin: auto; width: auto; height: 74%; aspect-ratio: 1; object-fit: contain; }

/* =================== Mobile pass =================== */

/* 1. Hero fills the visible screen on phones (svh ignores the collapsing address bar) */
@supports (height: 100svh) { .cover { height: 100svh; } }

/* menu button + overlay: phones only */
.menu-btn, .menu { display: none; }
@media (max-width: 900px) {
  .menu-btn {
    display: block; position: fixed; z-index: 90;
    top: calc(env(safe-area-inset-top, 0px) + 12px); right: 12px; width: 44px; height: 44px; padding: 0;
    background: rgba(0, 0, 0, 0.55); border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .menu-btn span {
    position: absolute; left: 11px; width: 22px; height: 2px; background: #cfcfcf;
    transition: transform 0.3s cubic-bezier(.7, 0, .2, 1), top 0.3s cubic-bezier(.7, 0, .2, 1), opacity 0.2s ease;
  }
  .menu-btn span:nth-child(1) { top: 14px; }
  .menu-btn span:nth-child(2) { top: 21px; }
  .menu-btn span:nth-child(3) { top: 28px; }
  .menu-open .menu-btn span:nth-child(1) { top: 21px; transform: rotate(45deg); }
  .menu-open .menu-btn span:nth-child(2) { opacity: 0; }
  .menu-open .menu-btn span:nth-child(3) { top: 21px; transform: rotate(-45deg); }
  /* the hamburger sits where the viewfinder's top-right corner mark would be, so phones skip that one mark */
  .vf {
    background:
      linear-gradient(var(--c), var(--c)) top left / var(--l) var(--t) no-repeat,
      linear-gradient(var(--c), var(--c)) top left / var(--t) var(--l) no-repeat,
      linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--t) no-repeat,
      linear-gradient(var(--c), var(--c)) bottom left / var(--t) var(--l) no-repeat,
      linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--t) no-repeat,
      linear-gradient(var(--c), var(--c)) bottom right / var(--t) var(--l) no-repeat;
  }
  .menu-btn:focus-visible, .menu a:focus-visible { outline: 2px solid #cfcfcf; outline-offset: 3px; }

  .menu {
    display: flex; flex-direction: column; justify-content: space-between;
    position: fixed; inset: 0; z-index: 85; background: #000;
    padding: calc(env(safe-area-inset-top, 0px) + 84px) var(--pad) calc(env(safe-area-inset-bottom, 0px) + 28px);
    opacity: 0; transition: opacity 0.3s ease; overflow-y: auto;
  }
  .menu[hidden] { display: none; }
  .menu.open { opacity: 1; }
  .menu-nav { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
  .menu-nav a {
    font-family: var(--display); text-transform: uppercase; line-height: 1.05;
    font-size: clamp(2.8rem, 15vw, 4.6rem); padding: 4px 0;
  }
  .menu-nav a i { font-style: normal; color: var(--muted); margin-right: 0.35em; }
  .menu-nav a:active { color: #fff; }
  .menu-foot { display: grid; gap: 14px; justify-items: end; text-align: right; padding-top: 28px; }
  .menu-foot p { color: var(--muted); font-size: 1rem; }
  .js .menu-nav a { transform: translateX(40px); opacity: 0; transition: transform 0.5s cubic-bezier(.2, .7, .2, 1), opacity 0.4s ease; }
  .js .menu.open .menu-nav a { transform: none; opacity: 1; }
  .js .menu.open .menu-nav a:nth-child(2) { transition-delay: 0.04s; }
  .js .menu.open .menu-nav a:nth-child(3) { transition-delay: 0.08s; }
  .js .menu.open .menu-nav a:nth-child(4) { transition-delay: 0.12s; }
  .js .menu.open .menu-nav a:nth-child(5) { transition-delay: 0.16s; }
  .js .menu.open .menu-nav a:nth-child(6) { transition-delay: 0.2s; }
  .menu-open { overflow: hidden; }

  /* the top row (tag left, menu button right) stays clear of the title, which starts below it */
  .cover-tag { top: calc(env(safe-area-inset-top, 0px) + 26px); left: 30px; right: auto; text-align: left; max-width: calc(100% - 96px); }
  .cover-title { top: calc(env(safe-area-inset-top, 0px) + 86px); }

  /* 2. keep the singer in frame when the wide still is cropped to a portrait screen */
  .cover-img { object-position: 64% 50%; }
  /* hero title sized to fill a portrait screen's width */
  .cover-title { font-size: min(32vh, 33vw); }

  /* 3. calmer on phones: static, lighter grain */
  .grain { animation: none; opacity: 0.04; }

  .tile { -webkit-tap-highlight-color: transparent; }
}

/* 4. thinner side rail on small phones */
@media (max-width: 600px) {
  :root { --rail: 22px; }
  .rail span { font-size: 0.62rem; letter-spacing: 0.02em; }
}

/* the index items slide in from the right; clip them so they never widen the page on phones */
.index { overflow: hidden; }


/* north-east arrow drawn as an icon: iOS turns the text arrow into an emoji */
.ne {
  --ne: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6h12v12M18 6L5 19' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='square'/%3E%3C/svg%3E");
  display: inline-block; width: 0.78em; height: 0.78em; margin-left: 0.3em; vertical-align: -0.04em;
  background: currentColor; -webkit-mask: var(--ne) center / contain no-repeat; mask: var(--ne) center / contain no-repeat;
}


/* desktop: the strip disappears so the tiles stay in the mosaic grid; the counter is phone-only */
.strip { display: contents; }
.strip-count { display: none; }

@media (max-width: 900px) {
  /* the section index repeats the menu button, so phones skip it */
  .index { display: none; }

  /* Montreal Collective: swipeable row, one full-width image at a time */
  .mosaic .strip {
    display: flex; grid-column: 1 / -1; gap: 8px; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
    margin-inline: calc(-1 * var(--pad)); padding-inline: 0; scroll-padding-inline: 0;
    scrollbar-width: none;
  }
  .mosaic .strip::-webkit-scrollbar { display: none; }
  .mosaic .strip .tile { flex: 0 0 100%; scroll-snap-align: start; }
  .mosaic .strip-count {
    display: block; grid-column: 1 / -1; margin-top: 4px;
    font-family: var(--body); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--muted); font-variant-numeric: tabular-nums;
  }
}


/* ===== Clean arrows =====
   line thickness snapped to whole pixels; the arrowhead is a solid shape cut to a chevron (same in every browser) */
@supports (width: round(nearest, 2.4px, 1px)) {
  :root { --stroke: max(2px, round(nearest, calc(var(--hsz) * 0.05), 1px)); }
}
.index::before, .close::before { width: var(--stroke); }
.arrow::after {
  content: ''; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  background: currentColor; --s2: calc(var(--stroke) * 1.4142);
  clip-path: polygon(0 0, 100% 50%, 0 100%, 0 calc(100% - var(--s2)), calc(100% - var(--s2)) 50%, 0 var(--s2));
}
.arrow { color: var(--paper); }
.arrow::after { width: 0.42em; height: 0.84em; }
