/* ---------- Fonts ---------- */
@font-face {
  font-family: "Good Sans";
  src: url("/fonts/GoodSans-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Good Sans";
  src: url("/fonts/GoodSans-Medium.otf") format("opentype");
  font-weight: 500;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  --font: "Good Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --forest: #1b3a26;   /* every green/black text, rule and button in the design */
  --bg: #ffffff;
  --rule: var(--forest);

  --edge: 0.25%;
  --gap-s: 0.5rem;
  --gap-m: 1.25rem;
  --gap-l: 2.5rem;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
img { display: block; width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ---------- Base ---------- */
body {
  margin: var(--edge);
  font-family: var(--font);
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--forest);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--forest); color: #fff; padding: 0.5rem 0.75rem; z-index: 10;
}
.skip-link:focus { left: var(--edge); }

/* A full-width rule, used as the recurring divider throughout */
hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}
/* Dashed variant, used under each publication */
hr.dashed {
  border-top-style: dashed;
}

/* Content now runs full width, framed by the body's own margin */
.site-header, main, .site-footer {
  width: 100%;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  justify-content: space-around;
  align-items: baseline;
  gap: var(--gap-m);
  flex-wrap: wrap;
  padding-block: var(--gap-m);
}
.brand {
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  color: var(--forest);
}
.tagline {
  font-size: 0.85rem;
  color: var(--forest);
}

/* ---------- Category labels (Upcoming Publications, etc.) ----------
   Rendered as a looping ticker tape by js/ticker.js. */
.category {
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  padding-block: 0.6rem;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.ticker-track {
  display: inline-flex;
  width: max-content;
  /* --ticker-distance is set in px by js/ticker.js once the real font
     has loaded, so the loop point is exact and never has to jump. */
  animation: ticker-scroll 40s linear infinite;
}
.ticker-track span {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--forest);
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-1 * var(--ticker-distance, 50%))); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* ---------- Releases ---------- */
.release {
  padding-block: var(--gap-m) var(--gap-l);
}
.release h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem);
  font-weight: 400;
  color: var(--forest);
  margin-bottom: var(--gap-m);
}

.btn {
  display: block;
  text-align: center;
  background: var(--forest);
  color: #fff;
  font-weight: 400;
  font-size: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  margin-bottom: var(--gap-m);
}
.btn:hover { opacity: 0.85; }

.hero {
  width: 100%;
  max-height: 90vh;
  margin-bottom: var(--gap-s);
}
.hero img {
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: cover;
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-s);
}
.thumbs .photo-tile {
  width: 150px;
  aspect-ratio: 1 / 1;
}
.thumbs .photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Publication photo ----------
   The line-art treatment (js/line-art.js) is parked for now — just a
   faint greyscale photo for the moment. A click still opens the real
   photo full-size, in colour, in the lightbox (js/lightbox.js). */
.photo-tile {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.photo-tile img {
  filter: grayscale(1);
  opacity: 0.16;
}
.photo-tile .line-art {
  position: absolute;
  inset: 0;
  display: block;
}

/* ---------- Lightbox ----------
   One shared overlay, built and reused by js/lightbox.js. Each
   release's photo tiles form their own gallery within it. */
.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 16, 11, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 100;
}
.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  object-fit: contain;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.4);
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  font-family: var(--font);
  line-height: 1;
  cursor: pointer;
  padding: 0.5rem;
  opacity: 0.75;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}
.lightbox-close {
  top: 1rem;
  right: 1.25rem;
  font-size: 1.75rem;
}
.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
}
.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }

@media (max-width: 26rem) {
  .lightbox-img { max-width: 100vw; max-height: 78vh; }
  .lightbox-close { top: 0.5rem; right: 0.75rem; }
  .lightbox-prev { left: 0.1rem; }
  .lightbox-next { right: 0.1rem; }
}

/* ---------- Footer / About ---------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--gap-m);
  padding-block: var(--gap-m) var(--gap-l);
  font-size: 0.85rem;
}

/* ---------- Phones ---------- */
@media (max-width: 26rem) {
  .thumbs .photo-tile { width: calc(50% - (var(--gap-s) / 2)); }
}
