:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --pink: #d1006f; /* the accent from the original mwgreer.com */
  --grey: #8c8c8c;
  --display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --sans: "Inter", system-ui, sans-serif;
  --gutter: clamp(16px, 3vw, 40px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font: 400 16px/1.6 var(--sans);
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--pink); color: var(--white); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  padding: 8px 14px; background: var(--pink); color: var(--white);
}
.skip:focus { top: 8px; }

:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }

/* ---------- Top bar ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 28px;
  padding: 14px var(--gutter);
  background: var(--black);
  color: var(--white);
  transition: background 0.3s;
}

/* On the home page the bar floats over the hero, then turns solid on scroll */
.home .bar { position: fixed; left: 0; right: 0; background: transparent; }
.home .bar.solid { background: var(--black); }

/* Name on a pink block that stretches to full width on hover, as on the old site */
.brand {
  position: relative;
  z-index: 0;
  padding: 4px 8px;
  font: 700 1.35rem/1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
}
.brand::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  bottom: 0;
  width: calc(100% - 1.2em);
  background: var(--pink);
  transition: width 0.15s ease-out;
}
.brand:hover::before { width: 100%; }
.brand:active::before { width: 0; }

.bar nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }

.bar nav a {
  font: 500 0.85rem/1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
  padding: 8px 0;
  background: linear-gradient(var(--pink), var(--pink)) left bottom / 0 2px no-repeat;
  transition: background-size 0.3s var(--ease), color 0.2s;
}
.bar nav a:hover, .bar nav a[aria-current] { background-size: 100% 2px; }
.bar nav a[aria-current] { color: var(--pink); }

/* ---------- Display type + animated letters ---------- */
.display {
  margin: 0;
  font: 700 clamp(3.2rem, 11vw, 10.5rem)/0.86 var(--display);
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

/* Title effect carried over from the original mwgreer.com theme:
   letters fade in at uneven speeds, then random letters slide out
   sideways while a pink copy slides in from the other side. */
.fx .word { display: inline-block; white-space: nowrap; }
.fx .ch { position: relative; display: inline-block; }
.fx .b { position: absolute; top: 0; left: 0; opacity: 0; color: var(--pink); }

.js .fx .ch { opacity: 0; animation: show 1.2s ease forwards; }
.js .fx .ch:nth-child(2n) { animation-duration: 0.4s; }
.js .fx .ch:nth-child(3n) { animation-duration: 2.8s; }
.js .fx .ch:nth-child(4n) { animation-duration: 0.8s; }
.js .fx .ch:nth-child(5n) { animation-duration: 3.6s; }
.js .fx .ch:nth-child(6n) { animation-duration: 1.6s; }
.js .fx .ch:nth-child(7n) { animation-duration: 3.2s; }
.js .fx .ch:nth-child(8n) { animation-duration: 2s; }

.fx .ch.swap .a { animation: out-left 1.5s 0.25s ease-in-out forwards; }
.fx .ch.swap .b { animation: in-right 1s ease-in-out forwards; }
.fx .ch.swap:nth-child(2n) .a { animation-name: out-right; }
.fx .ch.swap:nth-child(2n) .b { animation-name: in-left; }

@keyframes show { to { opacity: 1; } }
@keyframes out-left { to { opacity: 0; transform: translateX(-150%); } }
@keyframes out-right { to { opacity: 0; transform: translateX(150%); } }
@keyframes in-right { from { opacity: 0; transform: translateX(150%); } to { opacity: 1; transform: none; } }
@keyframes in-left { from { opacity: 0; transform: translateX(-150%); } to { opacity: 1; transform: none; } }

/* ---------- Home: hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  background: var(--black);
  color: var(--white);
}

.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  animation: settle 2.4s var(--ease) both;
}

@keyframes settle { from { transform: scale(1.08); opacity: 0.4; } }

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Darken only behind the name and the menu so the drawing stays crisp */
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.55), transparent 110px),
    linear-gradient(to top, rgba(0,0,0,0.8), transparent 45%);
}

.hero-text {
  position: absolute;
  z-index: 1;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(72px, 12vh, 120px);
}

.roles {
  display: inline-block;
  margin: 18px 0 0;
  padding: 8px 14px;
  background: var(--black);
  font: 500 clamp(0.8rem, 1.6vw, 1.05rem)/1 var(--display);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.roles b { color: var(--pink); font-weight: 700; }

.cue {
  position: absolute;
  z-index: 1;
  right: var(--gutter);
  bottom: 28px;
  font: 500 0.8rem/1 var(--display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
}
.cue span { display: inline-block; color: var(--pink); animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }

/* ---------- Home: gallery cards ---------- */
.work { background: var(--black); }

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  color: var(--white);
  text-decoration: none;
  transition-delay: calc(var(--d) * 120ms);
}

.card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1);
  transition: transform 0.8s var(--ease), filter 0.5s;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent 55%);
}

.card-text {
  position: absolute;
  z-index: 1;
  left: 24px;
  right: 24px;
  bottom: 24px;
}

.card-count {
  display: block;
  margin-bottom: 8px;
  font: 500 0.8rem/1 var(--display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pink);
}

.card-title {
  display: block;
  font: 700 clamp(2rem, 3.6vw, 3.4rem)/0.92 var(--display);
  text-transform: uppercase;
}

.card-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 5px;
  margin-top: 14px;
  background: var(--pink);
  transition: width 0.5s var(--ease);
}

.card:hover img, .card:focus-visible img { transform: scale(1.06); filter: none; }
.card:hover .card-title::after, .card:focus-visible .card-title::after { width: 100%; }

.band {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 40px;
  padding: clamp(40px, 7vw, 88px) var(--gutter);
  background: var(--pink);
  color: var(--white);
}

.band p {
  margin: 0;
  max-width: 28ch;
  font: 700 clamp(1.7rem, 3.6vw, 3.2rem)/1 var(--display);
  text-transform: uppercase;
}

.band a {
  font: 500 1rem/1 var(--display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-underline-offset: 6px;
}

/* ---------- Gallery pages ---------- */
.gallery-head {
  padding: clamp(40px, 8vw, 96px) var(--gutter) clamp(28px, 4vw, 44px);
  background: var(--black);
  color: var(--white);
}

.kicker {
  margin: 0 0 14px;
  font: 500 0.85rem/1 var(--display);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--pink);
}

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }

.tabs a {
  padding: 9px 16px;
  border: 1.5px solid var(--white);
  font: 500 0.8rem/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.tabs a:hover { background: var(--white); color: var(--black); }
.tabs a[aria-current] { background: var(--pink); border-color: var(--pink); color: var(--white); }

.gallery { padding: 6px; background: var(--black); }

.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 6px;
}

.tile { position: relative; margin: 0; }
.tile--feature { grid-column: span 2; grid-row: span 2; }
.tile--wide { grid-column: span 2; } /* two-page spreads span two pages' width */

.tile a {
  position: relative;
  display: block;
  height: 100%;
  overflow: hidden;
  background: #1a1a1a;
  cursor: zoom-in;
}

.grid--crop .tile a { aspect-ratio: var(--crop); }

/* Masonry: staggered columns so mixed shapes (landscape, portrait, video) keep their proportions */
.grid--masonry { display: block; columns: var(--cols); column-gap: 6px; }
.grid--masonry .tile { break-inside: avoid; margin-bottom: 6px; }

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), opacity 0.3s;
}

.tile a::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 0 solid var(--pink);
  transition: border-width 0.25s var(--ease);
}

.tile a:hover img { transform: scale(1.04); }
.tile a:hover::after { border-width: 6px; }

.tile-label {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 8px 12px;
  background: var(--black);
  color: var(--white);
  font: 500 0.8rem/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tile a[hidden] { display: none; }

/* "+1" on a tile that has more views of the same piece in the lightbox */
.tile-more {
  position: absolute;
  top: 0;
  right: 0;
  padding: 8px 12px;
  background: var(--pink);
  color: var(--white);
  font: 700 0.8rem/1 var(--display);
  letter-spacing: 0.14em;
}

.play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--pink);
  color: var(--white);
  font-size: 1.6rem;
  padding-left: 5px;
  transition: scale 0.3s var(--ease);
}
.tile--video a { cursor: pointer; }
.tile--video a:hover .play { scale: 1.12; }

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--white);
}

.pager a {
  padding: clamp(28px, 5vw, 56px) var(--gutter);
  background: var(--black);
  color: var(--white);
  font: 700 clamp(1.4rem, 3.4vw, 2.8rem)/1 var(--display);
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s;
}
.pager a:last-child { text-align: right; }
.pager a:hover { background: var(--pink); }

.pager span {
  display: block;
  margin-bottom: 10px;
  font: 500 0.8rem/1 var(--display);
  letter-spacing: 0.2em;
  color: var(--pink);
}
.pager a:hover span { color: var(--white); }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  padding: clamp(28px, 5vw, 64px) var(--gutter) clamp(48px, 8vw, 96px);
}

.about-text { max-width: 60ch; }
.about-text p { margin: 0 0 1.1em; }

.lede {
  font: 700 clamp(1.6rem, 3vw, 2.4rem)/1.05 var(--display);
  text-transform: uppercase;
}

.btn {
  display: inline-block;
  margin-top: 8px;
  padding: 14px 22px;
  background: var(--pink);
  color: var(--white);
  font: 500 0.9rem/1 var(--display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s;
}
.btn:hover { background: var(--black); }

/* ---------- Footer ---------- */
.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px var(--gutter);
  background: var(--black);
  color: var(--grey);
  font: 500 0.8rem/1 var(--display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.foot a { text-decoration: none; }
.foot a:hover { color: var(--pink); }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transition: opacity 0.9s ease; }
.js .reveal.in { opacity: 1; }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 8, 8, 0.97);
  color: var(--white);
}

.lightbox[open] { display: grid; place-items: center; animation: fade 0.25s ease-out; }
.lightbox::backdrop { background: transparent; }
@keyframes fade { from { opacity: 0; } }

.stage img, .stage video {
  display: block;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 110px);
  width: auto;
  height: auto;
  object-fit: contain;
  animation: pop 0.35s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: scale(0.97); } }

.lightbox .meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  margin: 0;
  text-align: center;
  font: 500 0.85rem/1 var(--display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.lightbox .count { color: var(--pink); margin-right: 10px; }

.lightbox button {
  position: absolute;
  width: 56px;
  height: 56px;
  border: 0;
  background: none;
  color: inherit;
  font: 400 1.9rem/1 var(--sans);
  cursor: pointer;
  transition: color 0.2s;
}
.lightbox button:hover { color: var(--pink); }
.lightbox .close { top: 8px; right: 8px; font-size: 2.4rem; }
.lightbox .prev { left: 6px; top: 50%; translate: 0 -50%; }
.lightbox .next { right: 6px; top: 50%; translate: 0 -50%; }

@media (hover: none) {
  .lightbox .prev, .lightbox .next { display: none; } /* swipe instead */
}

/* ---------- Smaller screens ---------- */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .card { aspect-ratio: 4 / 3; }
  .card img { filter: none; }
  .gallery--comic-panels, .gallery--character-illustrations, .gallery--etchings { --cols: 2 !important; }
  .about { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .bar { padding-top: 12px; padding-bottom: 10px; }
  .bar nav { width: 100%; justify-content: space-between; gap: 2px 12px; }
  .bar nav a { font-size: 0.78rem; letter-spacing: 0.1em; }
  .gallery--comic-panels { --cols: 1 !important; }
  .gallery--comic-panels .tile--wide { grid-column: auto; }
  .pager { grid-template-columns: 1fr; }
  .pager a:last-child { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .fx .ch, .js .reveal { opacity: 1; }
  html { scroll-behavior: auto; }
}
