/*
 * Pennsylvania by Bike: theme for the shared gallery stylesheet.
 *
 * The look of a trail map and a field notebook: forest green, cream paper,
 * the iron-oxide red of a truss bridge and the goldenrod of a trail blaze.
 * Headings are set in Fraunces, text in Source Sans 3, and small labels in
 * Barlow Condensed, the narrow letters of a mile marker. Two drawings recur:
 * contour lines (assets/topo.svg) and a line of long, even ridges with water
 * gaps (assets/ridges.svg). Both are used as masks, so they take whatever
 * colour the rule gives them.
 *
 * Everything here restyles what the shared stylesheet lays out. It adds no
 * layout of its own that the pages depend on, so a component added to the
 * shared stylesheet appears here in these colours and typefaces unchanged.
 */

/* ---------------------------------------------------------------- fonts */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/fraunces-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/barlow-condensed-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("assets/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2");
}

/* --------------------------------------------------------------- tokens */

:root {
  --brand: #1b3428;           /* hemlock green */
  --brand-rgb: 27 52 40;
  --brand-2: #2d5340;
  --brand-2-rgb: 45 83 64;
  --accent: #a4461c;          /* iron oxide, the red of a truss bridge */
  --highlight: #e9b949;       /* goldenrod, the colour of a trail blaze */
  --muted: #b9b6a2;
  --muted-rgb: 185 182 162;
  --surface: #e6dfcb;
  --page: #f6f1e3;            /* cream paper */
  --field: #fffdf6;
  --on-brand: #f8f3e4;

  --text: #1f2a22;
  --text-2: #556152;
  --shade-rgb: 15 30 22;
  --scrim-rgb: 18 34 26;
  --night: #0b120e;
  --night-rgb: 11 18 14;
  --night-2: #18231c;

  --head: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --label: "Barlow Condensed", "Arial Narrow", "Segoe UI", Arial, sans-serif;

  /* This theme's own */
  --paper: #efe8d3;           /* the map sheet */
  --dash: 2px dashed rgb(var(--brand-rgb) / 0.28);   /* a trail on a map */
  --ridge-height: clamp(2.75rem, 7vw, 6.5rem);
}

/* Paper grain: a faint speckle over the cream. */
body {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .27 0 0 0 0 .14 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------- labels */

/* Barlow Condensed is narrow, so the small labels are set a little larger. */
.eyebrow {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.2em;
}

/* A section heading: a goldenrod blaze, the words, then a dashed trail. */
.eyebrow--rule::before {
  content: "";
  flex: none;
  width: 0.62rem;
  height: 0.62rem;
  background: var(--highlight);
  box-shadow: 0 0 0 2px var(--brand);
  transform: rotate(45deg);
}

.eyebrow--rule::after {
  height: 0;
  border-top: var(--dash);
  background: none;
}

.button {
  border-radius: 0.3rem;
  font: 600 1.02rem/1.1 var(--label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.button--primary {
  box-shadow: 0 2px 0 rgb(var(--shade-rgb) / 0.35);
}

.button--primary:hover {
  box-shadow: 0 2px 0 rgb(var(--shade-rgb) / 0.35), 0 0 0 3px rgb(var(--brand-rgb) / 0.28);
}

.button__size {
  letter-spacing: 0.04em;
}

/* ------------------------------------------------------------- masthead */

.masthead {
  --masthead-pad: 1rem;
  border-bottom: 1px solid rgb(248 243 228 / 0.14);
}

/* A bicycle beside the two lines of the name. */
.masthead__words {
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.8rem;
  row-gap: 0.1rem;
  align-items: center;
}

.masthead__words::before {
  content: "";
  grid-row: 1 / span 2;
  width: 2.9rem;
  height: 2.05rem;
  background: var(--highlight);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 21' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='15' r='5'/%3E%3Ccircle cx='22' cy='15' r='5'/%3E%3Cpath d='M6 15l5-8h8.5l-6 8zM11 7l2.5 8M19.5 7 22 15M19.5 7l-1-3h2.8M9.500 6.300h3.300'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 21' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='15' r='5'/%3E%3Ccircle cx='22' cy='15' r='5'/%3E%3Cpath d='M6 15l5-8h8.5l-6 8zM11 7l2.5 8M19.5 7 22 15M19.5 7l-1-3h2.8M9.500 6.300h3.300'/%3E%3C/svg%3E") center / contain no-repeat;
}

.masthead__district {
  font: 600 1.42rem/1.1 var(--head);
  letter-spacing: -0.005em;
  text-transform: none;
}

.masthead__title {
  font: 500 0.98rem/1.2 var(--label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.masthead__links a {
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.switch__menu a {
  font-size: 1.08rem;
  letter-spacing: 0.05em;
}

@media (max-width: 40rem) {
  .masthead {
    flex-wrap: wrap;
    row-gap: 0;
  }

  .masthead__links {
    display: flex;
    gap: 1rem;
  }

  .masthead__words::before {
    width: 2.3rem;
    height: 1.65rem;
  }

  .masthead__district {
    font-size: 1.2rem;
  }

  .masthead__title {
    font-size: 0.9rem;
  }

  .masthead__links a {
    font-size: 0.92rem;
  }
}

/* ----------------------------------------------------------- home: hero */

/* The photograph in colour, under green that thins out to the right; contour
   lines over the green; a line of ridges where the hero meets the page. */
.hero {
  display: grid;
  align-items: center;
  min-height: clamp(33rem, 80vh, 50rem);
  min-height: clamp(33rem, 80svh, 50rem);
  padding: clamp(3.5rem, 8vw, 6rem) max(var(--gutter), env(safe-area-inset-right)) calc(var(--ridge-height) + clamp(2.5rem, 5vw, 4rem)) max(var(--gutter), env(safe-area-inset-left));
  background: var(--brand);
  text-align: left;
}

.hero__backdrop img {
  filter: saturate(1.05);
}

.hero__backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(98deg, rgb(var(--brand-rgb) / 0.95) 0%, rgb(var(--brand-rgb) / 0.86) 30%, rgb(var(--brand-rgb) / 0.42) 60%, rgb(var(--brand-rgb) / 0.08) 100%),
    linear-gradient(to top, rgb(var(--brand-rgb) / 0.6), rgb(var(--brand-rgb) / 0) 42%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--highlight);
  opacity: 0.16;
  -webkit-mask-image: url("assets/topo.svg"), linear-gradient(90deg, #000 18%, transparent 78%);
  -webkit-mask-size: 600px, 100% 100%;
  -webkit-mask-composite: source-in;
  mask-image: url("assets/topo.svg"), linear-gradient(90deg, #000 18%, transparent 78%);
  mask-size: 600px, 100% 100%;
  mask-composite: intersect;
  pointer-events: none;
}

.hero::after {
  inset: auto 0 -1px;
  z-index: 0;
  height: var(--ridge-height);
  background: var(--page);
  -webkit-mask: url("assets/ridges.svg") left bottom / max(100%, 62rem) 100% no-repeat;
  mask: url("assets/ridges.svg") left bottom / max(100%, 62rem) 100% no-repeat;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  justify-items: start;
  width: 100%;
  max-width: 112rem;
}

.hero__inner > * {
  max-width: 44rem;
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font: 600 1.05rem/1.25 var(--label);
  letter-spacing: 0.22em;
}

.hero__kicker::before {
  content: "";
  flex: none;
  width: 2.75rem;
  border-top: 2px dashed currentColor;
}

.hero__title {
  margin-top: 1rem;
  font: 600 clamp(2.9rem, 8.2vw, 6.25rem) / 0.96 var(--head);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero__title span {
  margin-top: 0.55em;
  font: italic 400 0.36em/1.2 var(--head);
  letter-spacing: 0;
}

.hero__lead {
  max-width: 33rem;
  margin-top: 1.4rem;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.5;
}

.finder {
  width: min(100%, 33rem);
  margin-top: 2rem;
}

.finder__label {
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-align: left;
  text-transform: uppercase;
}

.finder__row {
  border-radius: 0.4rem;
  box-shadow: 0 1rem 2rem -1rem rgb(0 0 0 / 0.6);
}

.finder__results strong {
  font: 600 1.02rem/1.3 var(--head);
}

.finder__results span {
  flex: none;
  font: 500 0.98rem/1.3 var(--label);
  letter-spacing: 0.06em;
}

.hero__facts {
  margin-top: 1.7rem;
  font-size: 1.02rem;
  letter-spacing: 0.18em;
}

@media (max-width: 48rem) {
  .hero {
    min-height: 0;
  }

  .hero__backdrop::after {
    background: linear-gradient(to top, rgb(var(--brand-rgb) / 0.97) 30%, rgb(var(--brand-rgb) / 0.8) 70%, rgb(var(--brand-rgb) / 0.55));
  }

  .hero::before {
    -webkit-mask-size: 420px, 100% 100%;
    mask-size: 420px, 100% 100%;
  }
}

/* ------------------------------------------------- home: the lead album */

.feature__cover {
  border-radius: 0.5rem;
  box-shadow: 0 1.75rem 3rem -1.75rem rgb(var(--shade-rgb) / 0.6), 0 0 0 1px rgb(var(--brand-rgb) / 0.12);
}

.feature__date {
  font-size: 1rem;
  letter-spacing: 0.16em;
}

.feature__title {
  font-weight: 600;
  letter-spacing: -0.018em;
}

.feature__summary {
  font-size: 1.12rem;
}

.strip a {
  border-radius: 0.3rem;
}

/* --------------------------------------------------- home: map and index */

.atlas__map {
  position: relative;
  overflow: hidden;
  padding: clamp(0.75rem, 2.2vw, 1.75rem);
  border-radius: 0.75rem;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px rgb(var(--brand-rgb) / 0.18), inset 0 0 5rem rgb(150 120 60 / 0.16), 0 1.75rem 3rem -2rem rgb(var(--shade-rgb) / 0.55);
}

.atlas__map::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brand);
  opacity: 0.07;
  -webkit-mask: url("assets/topo.svg") 0 0 / 460px;
  mask: url("assets/topo.svg") 0 0 / 460px;
  pointer-events: none;
}

.atlas__svg,
.atlas__note {
  position: relative;
}

.atlas__land {
  fill: #fcf9ee;
  filter: drop-shadow(0 2px 3px rgb(var(--shade-rgb) / 0.2));
}

.atlas__border {
  stroke: rgb(var(--brand-rgb) / 0.62);
  stroke-width: 1.5;
}

.atlas__trail {
  stroke-width: 2.25;
}

.atlas__city circle {
  fill: rgb(var(--brand-rgb) / 0.62);
}

.atlas__city text {
  fill: rgb(var(--brand-rgb) / 0.78);
  font: 500 17px var(--label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* A halo of the land colour, so a label stays readable over a trail or county line. */
  paint-order: stroke;
  stroke: #fcf9ee;
  stroke-width: 4px;
  stroke-linejoin: round;
}

.atlas__dot .atlas__mark {
  fill-opacity: 0.94;
  stroke: var(--highlight);
  stroke-width: 2;
}

.atlas__dot:hover .atlas__mark,
.atlas__dot.is-pointed .atlas__mark,
.atlas__dot.is-open .atlas__mark,
.atlas__dot:focus-visible .atlas__mark {
  stroke: var(--field);
}

.atlas__note {
  font-size: 0.86rem;
}

.atlas__heading {
  font: 600 1.4rem/1.2 var(--head);
  letter-spacing: -0.01em;
}

.places__name {
  font: 600 1.1rem/1.3 var(--head);
}

.places__count,
.places__photos {
  font: 500 0.95rem/1.3 var(--label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.places__date {
  font-size: 0.88rem;
  letter-spacing: 0.12em;
}

/* ------------------------------------------------- home: every outing */

.years a {
  background: var(--field);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.years a span {
  font-size: 0.9rem;
}

.year__title {
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin-bottom: 1.75rem;
}

/* The year as a large outline, with a dashed trail running on to the edge. */
.year__number {
  color: var(--brand);
  font: 300 clamp(3.2rem, 9vw, 5.75rem) / 0.9 var(--head);
  letter-spacing: -0.03em;
}

@supports (-webkit-text-stroke: 1px black) {
  .year__number {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--brand);
  }
}

.year__meta {
  font-size: 1rem;
  letter-spacing: 0.16em;
}

.year__title::after {
  content: "";
  flex: 1 1 3rem;
  border-top: var(--dash);
}

.shelf__list {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18.5rem), 1fr));
}

.card__image {
  border-radius: 0.45rem;
  box-shadow: 0 1.1rem 2rem -1.35rem rgb(var(--shade-rgb) / 0.6);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.card:hover .card__image {
  box-shadow: 0 1.75rem 2.4rem -1.3rem rgb(var(--shade-rgb) / 0.62);
  transform: translateY(-4px);
}

.card__date {
  font-size: 0.92rem;
  letter-spacing: 0.14em;
}

.card__title {
  font: 600 1.28rem/1.22 var(--head);
  letter-spacing: -0.008em;
}

.card__where {
  display: flex;
  gap: 0.4rem;
  color: var(--text-2);
  font-size: 0.96rem;
}

.card__where::before,
.single__where .single__label::before {
  content: "";
  flex: none;
  width: 0.82em;
  height: 0.82em;
  margin-top: 0.27em;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22s7-6.600 7-12.200a7 7 0 0 0-14 0C5 15.400 12 22 12 22Zm0-9.400a2.800 2.800 0 1 1 0-5.600 2.800 2.800 0 0 1 0 5.600Z' fill-rule='evenodd'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22s7-6.600 7-12.200a7 7 0 0 0-14 0C5 15.400 12 22 12 22Zm0-9.400a2.800 2.800 0 1 1 0-5.600 2.800 2.800 0 0 1 0 5.600Z' fill-rule='evenodd'/%3E%3C/svg%3E") center / contain no-repeat;
}

.single__where .single__label::before {
  display: none;
}

.card__meta {
  font: 500 0.95rem/1.3 var(--label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- album */

/* The cover runs into the page along the same line of ridges. */
.album-hero__image {
  position: relative;
  height: min(60vh, 48vw);
  height: min(60svh, 48vw);
}

.album-hero__image::before {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  z-index: 1;
  height: clamp(1.75rem, 4.5vw, 4.25rem);
  background: var(--page);
  -webkit-mask: url("assets/ridges.svg") left bottom / max(100%, 62rem) 100% no-repeat;
  mask: url("assets/ridges.svg") left bottom / max(100%, 62rem) 100% no-repeat;
  pointer-events: none;
}

.album-hero__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(var(--shade-rgb) / 0.35), rgb(var(--shade-rgb) / 0) 38%);
  pointer-events: none;
}

.album-hero__crumb {
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.album-hero__date {
  font-size: 1.02rem;
  letter-spacing: 0.18em;
}

.album-hero__title {
  font-weight: 600;
  letter-spacing: -0.022em;
}

.album-hero__where {
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.album-hero__summary {
  line-height: 1.55;
}

.toolbar {
  background: rgb(246 241 227 / 0.93);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.toolbar__count,
.tray__count {
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tile__number {
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

.neighbours__title {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.sheet__title {
  font-weight: 600;
}

/* ------------------------------------------------------ one photograph */

.single__place {
  font-size: 1.02rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.single__label,
.single__details dt {
  font-size: 0.9rem;
  letter-spacing: 0.14em;
}

/* --------------------------------------------------------------- footer */

/* Green ridges rise out of the footer into the page; contour lines across it. */
.foot {
  position: relative;
  margin-top: calc(var(--ridge-height) + clamp(3.5rem, 8vw, 6rem));
}

.foot::before {
  content: "";
  position: absolute;
  inset: auto 0 calc(100% - 1px);
  height: var(--ridge-height);
  background: var(--brand);
  -webkit-mask: url("assets/ridges.svg") left bottom / max(100%, 62rem) 100% no-repeat;
  mask: url("assets/ridges.svg") left bottom / max(100%, 62rem) 100% no-repeat;
  pointer-events: none;
}

.foot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--highlight);
  opacity: 0.07;
  -webkit-mask: url("assets/topo.svg") 0 0 / 600px;
  mask: url("assets/topo.svg") 0 0 / 600px;
  pointer-events: none;
}

.foot > * {
  position: relative;
  z-index: 1;
}

.foot__heading {
  font-size: 1rem;
  letter-spacing: 0.2em;
}

.foot__inner > .foot__about:first-child .foot__heading {
  color: var(--on-brand);
  font: 600 1.6rem/1.15 var(--head);
  letter-spacing: -0.01em;
  text-transform: none;
}

.foot__text {
  max-width: 34rem;
}

.foot__text + .foot__text {
  margin-top: 0.6rem;
  color: rgb(248 243 228 / 0.8);
  font-size: 0.97rem;
}

/* --------------------------------------------------------------- viewer */

.pswp__counter {
  font-size: 1.1rem;
  letter-spacing: 0.08em;
}
