/* Urban Parallax — Main Styles */

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ─── Colour Tokens — defaults (light-earth), overridden by theme.js ─────── */
:root {
  --color-nav:     #EDE5D8;
  --color-page:    #F5EFE6;
  --color-surface: #FFFFFF;
  --color-text:    #2A1F15;
  --color-muted:   #7A6555;
  --color-accent:  #93511D;
  --color-border:  rgba(0,0,0,0.10);
  --nav-border:    1px solid rgba(0,0,0,0.10);
  --page-bg-rgb:   245,239,230;

  /* Typography */
  --font-heading: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  --font-body:    'Source Sans 3', 'Source Sans Pro', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* Layout */
  --header-h:          72px;
  --header-h-scrolled: 44px;
  --max-w:             1200px;
  --pad-h:             40px;
}

/* ─── Base ───────────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  background: var(--color-page);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ─── Clarity Overlay (position: fixed covers entire viewport) ───────────── */
/* backdrop-filter blurs everything the cursor is NOT near.                   */
/* mask-image punches a wide clear band at the cursor's viewport Y position.  */
.clarity-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(var(--page-bg-rgb), 0.18);
  --mouse-y: 50vh;
  mask-image: linear-gradient(
    to bottom,
    black 0%,
    black calc(var(--mouse-y) - 230px),
    transparent calc(var(--mouse-y) - 130px),
    transparent calc(var(--mouse-y) + 130px),
    black calc(var(--mouse-y) + 230px),
    black 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    black 0%,
    black calc(var(--mouse-y) - 230px),
    transparent calc(var(--mouse-y) - 130px),
    transparent calc(var(--mouse-y) + 130px),
    black calc(var(--mouse-y) + 230px),
    black 100%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.clarity-overlay.visible { opacity: 1; }

/* ─── Site Header ────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: transparent;
  border-bottom: none;
  height: var(--header-h);
  transition: height 0.25s ease;
}

.site-header.scrolled                    { height: var(--header-h-scrolled); }
.site-header.scrolled .site-tagline      { opacity: 0; pointer-events: none; }
.site-header.scrolled .title-urban,
.site-header.scrolled .title-parallax   { font-size: clamp(12px, 1.3vw, 15px); }
.site-header.scrolled .logo-rect--a     { height: 14px; }
.site-header.scrolled .logo-rect--b     { height: 14px; margin-top: 5px; }

.header-inner {
  /* Full-width 3-column grid: logo | toggle (centered) | nav */
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 32px;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Logo mark — two offset rectangles (the parallax) */
.site-logo-mark {
  display: flex;
  align-items: flex-start;
  gap: 3px;
  flex-shrink: 0;
}

.logo-rect {
  width: 8px;
  transition: height 0.25s ease, margin-top 0.25s ease;
}

.logo-rect--a {
  height: 20px;
  background: var(--color-text);
}

.logo-rect--b {
  height: 20px;
  background: var(--color-accent);
  margin-top: 7px;
}

/* Logo wordmark column */
.site-logo-words {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Stacked title: URBAN (bold, text) over PARALLAX (light, accent) */
.site-title {
  display: flex;
  flex-direction: column;
}

.title-urban {
  font-family: var(--font-heading);
  font-size: clamp(14px, 1.7vw, 20px);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 2px;
  margin-bottom: 2px;
}

.title-parallax {
  font-family: var(--font-heading);
  font-size: clamp(14px, 1.7vw, 20px);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--color-accent);
  padding-left: 5px; /* the parallax offset */
}

.site-tagline {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--color-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: opacity 0.2s ease;
}

/* ─── Colour Selector (pill row) ─────────────────────────────────────────── */
.colour-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}

.colour-pill {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 0.5px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  min-width: 0;
  font-family: inherit;
}

.colour-pill:hover {
  background: rgba(255,255,255,0.08);
}

.colour-pill.active {
  background: rgba(255,255,255,0.13);
  border-color: rgba(255,255,255,0.20);
}

.pill-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
}

.pill-label {
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.50);
  white-space: nowrap;
}

.colour-pill.active .pill-label { color: rgba(255,255,255,0.90); }

/* Light-theme overrides for pills */
[data-theme*="light"] .colour-pill {
  border-color: rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.04);
}
[data-theme*="light"] .colour-pill:hover  { background: rgba(0,0,0,0.07); }
[data-theme*="light"] .colour-pill.active {
  background: rgba(0,0,0,0.10);
  border-color: rgba(0,0,0,0.18);
}
[data-theme*="light"] .pill-label         { color: rgba(0,0,0,0.40); }
[data-theme*="light"] .colour-pill.active .pill-label { color: rgba(0,0,0,0.85); }

/* ─── Standalone Earth / Vivid Toggle ───────────────────────────────────── */
.ve-sep {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.12);
  margin: 0 4px;
  flex-shrink: 0;
}

[data-theme*="light"] .ve-sep { background: rgba(0,0,0,0.12); }

.ve-standalone {
  display: flex;
  align-items: center;
  border-radius: 5px;
  overflow: hidden;
  border: 0.5px solid rgba(255,255,255,0.15);
  margin-left: 4px;
  flex-shrink: 0;
}

.ve-standalone .ve-opt {
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 11px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.4);
  font-family: inherit;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}

.ve-standalone .ve-opt.active {
  background: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.95);
}

[data-theme*="light"] .ve-standalone {
  border-color: rgba(0,0,0,0.15);
}
[data-theme*="light"] .ve-standalone .ve-opt { color: rgba(0,0,0,0.38); }
[data-theme*="light"] .ve-standalone .ve-opt.active {
  background: rgba(0,0,0,0.10);
  color: rgba(0,0,0,0.88);
}

/* ─── Header Nav ─────────────────────────────────────────────────────────── */
.header-nav {
  display: flex;
  gap: 28px;
  justify-self: end; /* grid right column */
}

.header-nav a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color 0.15s;
}

.header-nav a:hover,
.header-nav a.active { color: var(--color-accent); }

/* "+" admin link — slightly larger so it reads as an icon */
.header-nav .nav-add {
  font-size: 16px;
  letter-spacing: 0;
  line-height: 1;
}

/* ─── Image alignment toggle ─────────────────────────────────────────────── */
.align-toggle {
  display: flex;
  gap: 2px;
  align-items: center;
  justify-self: center; /* grid centre column */
}

.align-opt {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--color-muted);
  border: 0.5px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  background: none;
  font-family: var(--font-mono);
}
.align-opt:hover { color: var(--color-text); }
.align-opt.active {
  color: var(--color-text);
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.07);
}
[data-theme*="light"] .align-opt.active {
  border-color: rgba(0,0,0,0.15);
  background: rgba(0,0,0,0.07);
}

/* ▲●▼ alignment: slide the over-tall image within the clipping container.
   The img is rendered at 150% of the container height, giving 100px of
   vertical room (for a 200px entry). translateY shifts which slice is shown.
   transition: transform animates the shift smoothly on button click.        */
body[data-img-pos="top"]    .pair-image img { transform: translateY(0%);   }
body[data-img-pos="center"] .pair-image img { transform: translateY(-17%); }
body[data-img-pos="bottom"] .pair-image img { transform: translateY(-33%); }

/* pair-text: visible and centred only in ● mode; fades out for ▲ and ▼ */
body[data-img-pos="top"]    .pair-text { opacity: 0; pointer-events: none; }
body[data-img-pos="center"] .pair-text { opacity: 1; }
body[data-img-pos="bottom"] .pair-text { opacity: 0; pointer-events: none; }

/* ○ "outside" mode: text sits BESIDE the images — left of left, right of right.
   The pair-row gets extra horizontal padding so there is room for the text
   labels outside the image bounds.                                           */
body[data-img-pos="outside"] .pair-row {
  padding: 0 84px;               /* 84px padding leaves room for 72px text + gap */
}

/* Image fills the full pair-side (inset: 0 is already the default) */
body[data-img-pos="outside"] .pair-image {
  inset: 0;
}
body[data-img-pos="outside"] .pair-image img {
  transform: translateY(-17%);   /* keep centre crop */
}

/* Text: absolute, spans full height of pair-side, centred vertically */
body[data-img-pos="outside"] .pair-text {
  opacity: 1;
  position: absolute;
  top: 0;
  bottom: 0;
  width: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
  text-shadow: none;             /* sits on page background — no shadow needed */
}

/* Left side: text to the LEFT of the image */
body[data-img-pos="outside"] .pair-side:first-child .pair-text {
  right: calc(100% + 8px);
  left: auto;
  text-align: right;
  align-items: flex-end;
}

/* Right side: text to the RIGHT of the image */
body[data-img-pos="outside"] .pair-side:last-child .pair-text {
  left: calc(100% + 8px);
  right: auto;
  text-align: left;
  align-items: flex-start;
}

/* Colour adjustments — text is on the page bg, not over a photo */
body[data-img-pos="outside"] .pair-city  { color: var(--color-muted); }
body[data-img-pos="outside"] .pair-title { color: var(--color-text); }

/* ─── Feed ───────────────────────────────────────────────────────────────── */
.feed {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 40px 120px;
}

.feed-loading {
  padding: 80px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--color-muted);
  text-transform: uppercase;
}

/* ─── Date Header ────────────────────────────────────────────────────────── */
.up-date-header {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  text-transform: uppercase;
  margin: 12px 0 4px;
}

/* ─── Row (full-width comparison pair) ──────────────────────────────────── */
.up-row {
  transition: filter 0.4s ease, opacity 0.4s ease;
}

/* Expand-mode dimming — CSS only, no JS style writes */
.feed.has-expanded .up-row:not(.expanded) {
  filter: blur(2px);
  opacity: 0.5;
}

/* ─── Preview Grid (the 2-city pair) ────────────────────────────────────── */
.up-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 0;
  cursor: pointer;
  transition: transform 0.3s ease;
  outline: none;
}

/* Hide the old 1px vertical divider — gap handles spacing now */
.up-row-grid .up-divider-v { display: none; }

.up-row-grid:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.up-row:not(.expanded) .up-row-grid:hover { transform: scale(1.003); }

/* ─── Cell (one city card inside a pair) ────────────────────────────────── */
/* No card boxing — image and text sit directly on the page background */
.up-cell {
  padding: 0;
}

.up-cell--left  {}
.up-cell--right {}

/* Text area below the image — flush left, tight top, no bottom padding */
.up-cell-text { padding: 8px 0 0; }

/* Horizontal separator above consecutive pairs */
.up-row + .up-row {
  border-top: 0.5px solid rgba(0,0,0,0.15);
  padding-top: 32px;
}
[data-theme]:not([data-theme*="light"]) .up-row + .up-row {
  border-top: 0.5px solid rgba(255,255,255,0.15);
}

/* ─── Image Wrap ─────────────────────────────────────────────────────────── */
/* Images are always sharp at full opacity — NO default blur or filter here.  */
/* Two overlays via ::before (vignette) and ::after (cylinder highlight).     */
.up-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: var(--color-surface);
  border-radius: 3px;
  margin-bottom: 0;
  position: relative;
}

/* Layer 1 — bottom vignette for text legibility */
.up-image-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 50%);
  pointer-events: none;
  z-index: 2;
}

/* Layer 2 — cylinder / airbrush highlight at top-centre */
.up-image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 80% at 50% 28%,
    rgba(255,255,255,0.14) 0%,
    rgba(255,255,255,0.00) 60%
  );
  pointer-events: none;
  z-index: 3;
}

.up-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* NO filter — images are always sharp by default */
  transition: transform 0.6s cubic-bezier(0.25, 0, 0.25, 1);
}

.up-row-grid:hover .up-image-wrap img { transform: scale(1.025); }

/* ─── Cell Text ──────────────────────────────────────────────────────────── */
.up-city-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  opacity: 0.5;
  display: block;
  margin: 0 0 3px;
}

.up-cell-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin: 0 0 4px;
  color: var(--color-text);
}

.up-cell-desc {
  font-size: 12px;
  color: var(--color-muted);
  line-height: 1.4;
  margin: 0;
}

/* ─── Vertical Divider ───────────────────────────────────────────────────── */
.up-divider-v { width: 1px; background: var(--color-border); align-self: stretch; }

/* ─── Expand Panel ───────────────────────────────────────────────────────── */
.up-expand {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.55s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.up-expand.open { max-height: 5000px; opacity: 1; }

.up-expand-inner {
  border-top: 1px solid var(--color-border);
  padding: 52px 0 56px;
  background: var(--color-surface);
  transition: background 0.3s ease;
}

/* ─── Introduction ───────────────────────────────────────────────────────── */
.up-introduction {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.8vw, 22px);
  font-style: italic;
  font-weight: 300;
  line-height: 1.55;
  text-align: center;
  max-width: 680px;
  margin: 0 auto 36px;
  color: var(--color-text);
  padding: 0 var(--pad-h);
}

/* ─── Metadata Pills ─────────────────────────────────────────────────────── */
.up-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 44px;
  padding: 0 var(--pad-h);
}

.up-pill {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--color-border);
  padding: 4px 10px;
  color: var(--color-muted);
  white-space: nowrap;
}

.up-pill-key { color: var(--color-accent); margin-right: 5px; }

/* ─── Quick Facts ────────────────────────────────────────────────────────── */
.up-quickfacts { max-width: min(88%, 840px); margin: 0 auto 52px; }

.up-qf-header {
  display: grid;
  grid-template-columns: 1fr 20px 1fr;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 4px;
}

.up-qf-row {
  display: grid;
  grid-template-columns: 1fr 20px 1fr;
  padding: 9px 0;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-heading);
  font-size: clamp(14px, 1.4vw, 17px);
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.25;
  color: var(--color-text);
}

.up-qf-left  { text-align: right; padding-right: 14px; }
.up-qf-right { text-align: left;  padding-left:  14px; }
.up-qf-sep   { text-align: center; color: var(--color-border); }

/* ─── Expand Body Grid ───────────────────────────────────────────────────── */
.up-expand-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  margin-bottom: 36px;
  padding: 0 var(--pad-h);
}

/* When the grid lives inside the wheel detail (full-viewport-width container),
   constrain and centre it so the text aligns with the quickfacts lines above.
   Match the quickfacts max-width so everything lines up on the same grid.    */
.wheel-entry-detail .up-expand-grid {
  max-width: min(88%, 840px);
  margin-left: auto;
  margin-right: auto;
}
/* Widen each column by reducing the inset padding that was designed for the
   narrow feed layout — gives each text block more horizontal space.          */
.wheel-entry-detail .up-expand-body        { padding: 0 20px; }
.wheel-entry-detail .up-expand-body:first-child { padding-left: 0; }
.wheel-entry-detail .up-expand-body:last-child  { padding-right: 0; }

.up-expand-body        { padding: 0 32px; }
.up-expand-body:first-child { padding-left: 0; }
.up-expand-body:last-child  { padding-right: 0; }

.up-expand-subtitle {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 18px;
}

/* ─── Body Text ──────────────────────────────────────────────────────────── */
.up-body-text {
  font-size: 15px;
  line-height: 1.78;
  color: var(--color-text);
}

.up-body-text p          { margin-bottom: 1.1em; }
.up-body-text h1,
.up-body-text h2,
.up-body-text h3         { font-family: var(--font-heading); font-weight: 600;
                            letter-spacing: 0.03em; margin: 1.5em 0 0.5em;
                            color: var(--color-text); }
.up-body-text h1         { font-size: 26px; }
.up-body-text h2         { font-size: 1.2em; }
.up-body-text h3         { font-size: 1.05em; }
.up-body-text strong     { font-weight: 600; color: var(--color-text); }
.up-body-text em         { font-style: italic; }
.up-body-text blockquote { border-left: 2px solid var(--color-accent);
                            padding-left: 14px; color: var(--color-muted);
                            font-style: italic; margin: 1em 0; }

/* ─── Extra Media gallery (images, GIFs, videos) ─────────────────────────── */
.up-extra-media {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin: 24px 0;
}
.up-extra-item {
  width: 100%;
  display: block;
  border-radius: 2px;
}
.up-extra-img {
  aspect-ratio: 4/3;
  object-fit: cover;
}
.up-extra-video {
  aspect-ratio: 16/9;
  object-fit: contain;
  background: #000;
}
/* Single item or odd last item spans full width */
.up-extra-media .up-extra-item:only-child,
.up-extra-media .up-extra-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-height: 520px;
  object-fit: cover;
}

/* ─── Credits ────────────────────────────────────────────────────────────── */
.up-credit {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 20px;
}

/* ─── Tags ───────────────────────────────────────────────────────────────── */
.up-tags { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 28px 0; padding: 0 var(--pad-h); }

.up-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--color-accent);
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
  cursor: pointer;
}
.up-tag:hover { border-bottom-color: var(--color-accent); }

/* ─── Close Button ───────────────────────────────────────────────────────── */
.up-close-btn {
  display: block;
  margin: 36px auto 0;
  padding: 10px 36px;
  border: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  background: none;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.up-close-btn:hover { border-color: var(--color-text); color: var(--color-text); }

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 28px var(--pad-h);
  background: var(--color-nav);
  transition: background 0.3s ease;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-mark {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text);
}

.footer-credit {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--color-muted);
}

/* ─── About Page ─────────────────────────────────────────────────────────── */
.about-page { padding: 60px var(--pad-h) 120px; }
.about-inner { max-width: var(--max-w); margin: 0 auto; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 80px;
  align-items: start;
}

.about-heading {
  font-family: var(--font-heading);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 40px 0 16px;
  color: var(--color-text);
}
.about-heading:first-child { margin-top: 0; }

.about-text p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-muted);
  margin-bottom: 1em;
}

.about-contributors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 16px 0;
}

.about-contributor-city {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 4px;
}

.about-contributor-name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  color: var(--color-text);
}

.about-contributor p { font-size: 14px; line-height: 1.6; color: var(--color-muted); }

.about-photo img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  position: sticky;
  top: calc(var(--header-h) + 32px);
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
/* Pairs are ALWAYS side by side — never collapse to single column.           */

/* 700px — reduce padding, adjust expand panel */
@media (max-width: 700px) {
  .feed { padding: 16px 16px 80px; gap: 24px; }
  .up-row + .up-row { padding-top: 24px; }

  /* Expand panel: single column */
  .up-expand-grid { grid-template-columns: 1fr; }
  .up-expand-grid .up-divider-v { display: none; }
  .up-expand-body { padding: 0 0 36px; }
  .up-expand-body:last-child { padding: 0; }

  .up-qf-row { font-size: 13px; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-photo { display: none; }
  .about-contributors { grid-template-columns: 1fr; gap: 24px; }
}

/* 500px — compact card text, shorter images */
@media (max-width: 500px) {
  .up-image-wrap { aspect-ratio: 16 / 9; }
  .up-cell-text { padding: 6px 0 0; }
  .up-city-label { display: none; }
  .up-cell-title { font-size: 13px; }
  .up-cell-desc { display: none; }
}

/* 580px — mobile header: stacked 2-row layout */
@media (max-width: 580px) {
  :root { --pad-h: 12px; --header-h: 80px; }

  .site-header { height: auto; }
  .site-header.scrolled { height: auto; }
  .site-header.scrolled .title-urban,
  .site-header.scrolled .title-parallax { font-size: clamp(14px, 4vw, 18px); }

  .header-inner {
    display: flex;   /* override grid → flex for 2-row mobile layout */
    flex-wrap: wrap;
    align-items: center;
    padding: 0 12px;
    gap: 0;
    height: auto;
  }

  /* Row 1: logo + nav */
  .site-brand { flex: 1; padding: 10px 0; order: 1; }
  .site-tagline { display: none; }

  .header-nav { order: 2; gap: 14px; padding: 10px 0; }
  .header-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 11px;
    letter-spacing: 0.1em;
  }

  /* Row 2: colour picker — full width, scrollable */
  .colour-selector {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 6px 0 8px;
    border-top: 1px solid var(--color-border);
  }

  .colour-selector::-webkit-scrollbar { display: none; }

  /* Touch targets */
  .colour-pill { min-height: 44px; flex-shrink: 0; padding: 0 10px; }
  .ve-sep { flex-shrink: 0; }
  .ve-standalone { flex-shrink: 0; }
  .ve-standalone .ve-opt { min-height: 36px; padding: 0 9px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   WHEEL / DRUM LAYOUT  (homepage only — body.page-wheel)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Prevent body scroll — the wheel is the entire interactive surface */
.page-wheel {
  overflow: hidden;
  height: 100vh;
}

/* ─── Viewport ───────────────────────────────────────────────────────────── */
.wheel-viewport {
  width: 100%;
  height: calc(100vh - var(--header-h));
  overflow: hidden;
  position: relative;
  cursor: ns-resize;
  user-select: none;
}

/* Shallow vignette at top & bottom — hidden when a project is expanded */
.wheel-viewport::before,
.wheel-viewport::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 48px;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.wheel-viewport::before {
  top: 0;
  background: linear-gradient(to bottom, var(--color-page) 0%, transparent 100%);
}
.wheel-viewport::after {
  bottom: 0;
  background: linear-gradient(to top, var(--color-page) 0%, transparent 100%);
}
.wheel-viewport.is-expanded::before,
.wheel-viewport.is-expanded::after {
  opacity: 0;
  pointer-events: none;
}

/* ─── Stack ──────────────────────────────────────────────────────────────── */
.wheel-stack {
  position: absolute;
  width: 100%;
  left: 0;
  will-change: top;
}

.wheel-loading {
  padding: 80px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--color-muted);
  text-transform: uppercase;
}

/* ─── Entry ──────────────────────────────────────────────────────────────── */
.wheel-entry {
  width: 100%;
  overflow: hidden;
  will-change: height, opacity;
  border-bottom: 1px solid rgba(128, 128, 128, 0.80);
  cursor: pointer;
  /* transitions applied dynamically by JS */
}

.wheel-entry.is-active {
  cursor: default;
}

.wheel-entry.is-expanded {
  overflow: visible;
}

/* ── Expanded detail: give pair-row a tall, portrait-feeling height ── */
.wheel-entry.is-expanded .pair-row {
  height: clamp(380px, 50vh, 560px);
}

/* In expanded state: override the 150%/translateY crop trick so images
   fill their tall container naturally via object-fit: cover.           */
.wheel-entry.is-expanded .pair-image img {
  height: 100% !important;
  transform: none !important;
}

.wheel-viewport.is-expanded {
  overflow-y: auto;
  cursor: auto;
}

.wheel-entry-inner {
  padding: 0;
  width: 100%;
  height: 100%;
}

/* ─── Pair layout (two cities side by side) ──────────────────────────────── */
.pair-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  max-width: 760px; /* overridden per-entry by JS */
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
}

/* ── Desktop: image fills pair-side absolutely; text centred by flexbox ── */
.pair-side {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;   /* reliably centres pair-text regardless of grid height calc */
}

/* pair-image is pulled out of normal flow so flexbox centres only the text */
.pair-image {
  position: absolute;
  inset: 0;              /* top/right/bottom/left: 0 — covers full pair-side */
  overflow: hidden;
  border-radius: 2px;
}

.pair-image img {
  width: 100%;
  height: 150%;     /* overflows container → 100px vertical room in a 200px entry */
  object-fit: cover;
  display: block;
  transform: translateY(-17%);   /* default: centred (matches body[data-img-pos="center"]) */
  transition: transform 0.4s ease;
}

/* Text is in normal flex flow (not absolutely positioned), centred by pair-side */
.pair-text {
  position: relative;
  z-index: 1;
  width: 72px;
  padding: 0 8px;
  flex-shrink: 0;
  transition: opacity 0.3s ease;
  text-shadow:
    0 1px 4px rgba(0,0,0,1),
    0 2px 12px rgba(0,0,0,0.9),
    0 4px 24px rgba(0,0,0,0.7);
}

/* Left column — text at the left edge; right column — text at the right edge */
.pair-side:first-child { justify-content: flex-start; }
.pair-side:first-child .pair-text { text-align: left; }

.pair-side:last-child  { justify-content: flex-end; }
.pair-side:last-child .pair-text  { text-align: right; }

.pair-city {
  font-family: var(--font-mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  opacity: 0.85;
  display: block;
  margin-bottom: 3px;
  line-height: 1.3;
}

.pair-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.pair-desc {
  display: none;  /* no room in side-text layout */
}

/* ─── Detail overlay (slides up from bottom on active-entry click) ───────── */
.wheel-detail {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--color-page);
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.3s ease;
}

.wheel-detail.open {
  transform: translateY(0);
}

.wheel-detail-close {
  position: sticky;
  top: 0;
  display: block;
  width: 100%;
  padding: 14px 40px;
  background: var(--color-nav);
  border: none;
  border-bottom: var(--nav-border);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
  cursor: pointer;
  text-align: left;
  transition: color 0.15s;
  z-index: 10;
}
.wheel-detail-close:hover { color: var(--color-text); }

#wheelDetailInner {
  /* up-expand-inner already sets its own padding */
}

/* ─── Mobile overrides ───────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .wheel-viewport { height: calc(100vh - 110px); }

  /* Mobile: images fill the full JS-controlled entry height (no gap) */
  .wheel-entry-inner { padding: 0; height: 100%; }
  .pair-row  { height: 100%; padding: 0 12px; }
  .pair-side { height: 100%; }
  .pair-image { width: 100%; height: 100%; }

  /* Keep text overlay but tighten it on narrow screens */
  .pair-text { width: 60px; padding: 0 5px; }

  .pair-title { font-size: 12px; }

  .wheel-detail-close { padding: 14px 16px; }

  /* Hide alignment toggle on mobile */
  .align-toggle { display: none; }
}
