/* ==========================================================================
   Whytelight — content
   Long-form article body, and the page pieces that carry editor output.
   ========================================================================== */

.wl-prose {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--t-body);
}

.wl-prose > * + * {
  margin-top: 1.625rem;
}

.wl-prose h2 {
  font-size: 2.125rem;
  margin-top: 2.75rem;
  color: var(--c-ink);
}

.wl-prose h3 {
  font-size: 1.625rem;
  margin-top: 2.125rem;
  color: var(--c-ink);
}

.wl-prose a {
  text-decoration: underline;
}

.wl-prose ul,
.wl-prose ol {
  padding-left: 1.5rem;
}

.wl-prose li + li {
  margin-top: 0.5rem;
}

.wl-prose blockquote {
  margin: 2.125rem 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--a-base);
  font-family: var(--f-display);
  font-weight: var(--fw-display);
  font-size: 1.75rem;
  line-height: 1.35;
  color: var(--c-ink);
}

.wl-prose figure {
  margin: 2.75rem 0;
}

.wl-prose img {
  border-radius: var(--radius-img);
}

.wl-prose figcaption {
  margin-top: 0.75rem;
  font-family: var(--f-mono);
  font-size: var(--fs-caption);
  letter-spacing: var(--ls-caption);
  color: var(--t-caption);
}

/* Wide and full images inside the prose column break out of it. */
.wl-prose .alignwide {
  width: min(var(--wrap-mid), calc(100vw - var(--gutter) * 2));
  margin-inline: calc(50% - min(var(--wrap-mid), calc(100vw - var(--gutter) * 2)) / 2);
}

.wl-prose hr {
  border: 0;
  border-top: 1px solid var(--c-line);
  margin: 2.75rem 0;
}

/* --- Journal article ---------------------------------------------------- */

.wl-posthero {
  height: 82vh;
  min-height: 560px;
}

.wl-posthero__img {
  filter: brightness(0.62);
}

.wl-posthero__inner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding-bottom: 3.75rem;
  color: var(--c-white);
}

.wl-posthero__meta {
  color: var(--c-sand);
  margin-bottom: 1.125rem;
}

.wl-posthero__title {
  font-size: clamp(2.75rem, 5.2vw, 5rem);
  line-height: 1.02;
}

.wl-article {
  padding-block: 5.625rem 3.75rem;
}

.wl-article__lead {
  font-family: var(--f-display);
  font-weight: var(--fw-display);
  font-size: 1.875rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--c-ink);
  margin-bottom: 2.75rem;
}

.wl-byline {
  display: flex;
  align-items: center;
  gap: 1.125rem;
  margin-top: 3.125rem;
  padding-top: 1.875rem;
  border-top: 1px solid var(--c-line);
}

.wl-byline__avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-pill);
  object-fit: cover;
  flex: none;
}

.wl-byline__name {
  font-family: var(--f-display);
  font-weight: var(--fw-display);
  font-size: 1.375rem;
  letter-spacing: 0.03em;
}

/* --- About page ---------------------------------------------------------
   Hero: the name centred over the photograph. Story: a photograph held still
   in the left column while the paragraphs scroll by on the right. Without JS
   it is simply a portrait beside readable prose; site.js adds .is-enhanced,
   which spaces the paragraphs out and fades all but the one being read.
   -------------------------------------------------------------------------- */

.wl-abouthero {
  height: 80vh;
  min-height: 560px;
}

.wl-abouthero__img {
  filter: brightness(0.6);
}

.wl-abouthero__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 var(--gutter);
  color: var(--c-white);
}

.wl-abouthero__kicker {
  color: var(--c-sand);
  letter-spacing: 0.22em;
  margin-bottom: 1.625rem;
  animation: wl-rise 1s ease 0.4s both;
}

.wl-abouthero__title {
  font-size: var(--fs-band);
  line-height: 1.05;
  letter-spacing: 0.03em;
  animation: wl-rise 1.2s ease 0.55s both;
}

.wl-abouthero__sub {
  margin-top: 0.875rem;
  font-family: var(--f-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--c-sand);
  animation: wl-rise 1.2s ease 0.7s both;
}

/*
 * The story sits on warm cream, to break up the white between the hero and
 * the footer: very faint contour lines, like an OS map of the hills Alan
 * photographs, and a strip of 35mm film edge down the right-hand side (the
 * right, so it stays clear of the logo). Both are SVG tiles, so there are no
 * image files to load.
 */
.wl-storyband {
  position: relative;
  isolation: isolate;
  background-color: var(--c-cream);
}

.wl-storyband::before,
.wl-storyband::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.wl-storyband::before {
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22480%22 height=%22360%22%3E%3Cg fill=%22none%22 stroke=%22%23201e1d%22 stroke-width=%221%22%3E%3Cpath d=%22M0 10.0 L16 14.6 L32 18.2 L48 20.3 L64 20.6 L80 19.5 L96 17.5 L112 15.4 L128 13.8 L144 12.8 L160 12.6 L176 12.7 L192 12.7 L208 12.3 L224 11.3 L240 10.0 L256 8.7 L272 7.7 L288 7.3 L304 7.3 L320 7.4 L336 7.2 L352 6.2 L368 4.6 L384 2.5 L400 0.5 L416 -0.6 L432 -0.3 L448 1.8 L464 5.4 L480 10.0%22/%3E%3Cpath d=%22M0 34.1 L16 38.1 L32 41.0 L48 42.1 L64 41.4 L80 39.2 L96 36.1 L112 33.1 L128 30.9 L144 29.9 L160 30.0 L176 30.8 L192 31.6 L208 32.0 L224 31.6 L240 30.4 L256 28.7 L272 26.9 L288 25.5 L304 24.7 L320 24.3 L336 24.2 L352 23.9 L368 23.3 L384 22.6 L400 22.0 L416 22.2 L432 23.5 L448 26.1 L464 29.8 L480 34.1%22/%3E%3Cpath d=%22M0 57.2 L16 60.0 L32 61.7 L48 61.8 L64 60.3 L80 57.3 L96 53.8 L112 50.6 L128 48.4 L144 47.7 L160 48.2 L176 49.6 L192 51.1 L208 51.9 L224 51.7 L240 50.2 L256 48.0 L272 45.4 L288 43.3 L304 41.9 L320 41.5 L336 41.9 L352 42.7 L368 43.7 L384 44.6 L400 45.5 L416 46.7 L432 48.4 L448 50.8 L464 53.9 L480 57.2%22/%3E%3Cpath d=%22M0 78.5 L16 79.9 L32 80.4 L48 79.7 L64 77.8 L80 74.8 L96 71.5 L112 68.6 L128 66.8 L144 66.4 L160 67.3 L176 69.0 L192 70.6 L208 71.5 L224 71.1 L240 69.3 L256 66.6 L272 63.6 L288 61.1 L304 59.7 L320 59.8 L336 61.1 L352 63.4 L368 65.9 L384 68.3 L400 70.3 L416 71.9 L432 73.4 L448 75.0 L464 76.8 L480 78.5%22/%3E%3Cpath d=%22M0 97.8 L16 97.8 L32 97.5 L48 96.5 L64 94.8 L80 92.5 L96 89.9 L112 87.6 L128 86.2 L144 86.0 L160 86.8 L176 88.3 L192 89.7 L208 90.3 L224 89.7 L240 87.7 L256 84.9 L272 81.9 L288 79.7 L304 78.8 L320 79.8 L336 82.3 L352 85.8 L368 89.6 L384 93.0 L400 95.4 L416 96.8 L432 97.5 L448 97.7 L464 97.7 L480 97.8%22/%3E%3Cpath d=%22M0 115.4 L16 114.5 L32 113.8 L48 113.1 L64 112.2 L80 110.8 L96 109.1 L112 107.5 L128 106.4 L144 106.0 L160 106.4 L176 107.3 L192 108.2 L208 108.4 L224 107.7 L240 105.9 L256 103.5 L272 101.2 L288 99.8 L304 99.8 L320 101.7 L336 105.2 L352 109.6 L368 114.0 L384 117.6 L400 119.8 L416 120.4 L432 119.7 L448 118.3 L464 116.7 L480 115.4%22/%3E%3Cpath d=%22M0 132.0 L16 130.7 L32 130.3 L48 130.3 L64 130.3 L80 130.0 L96 129.2 L112 128.0 L128 126.8 L144 125.9 L160 125.5 L176 125.6 L192 126.0 L208 126.1 L224 125.7 L240 124.7 L256 123.3 L272 122.1 L288 121.8 L304 122.8 L320 125.3 L336 129.2 L352 133.7 L368 138.0 L384 141.1 L400 142.4 L416 141.9 L432 139.9 L448 137.1 L464 134.2 L480 132.0%22/%3E%3Cpath d=%22M0 148.6 L16 147.4 L32 147.5 L48 148.4 L64 149.4 L80 150.0 L96 149.7 L112 148.5 L128 146.9 L144 145.3 L160 144.1 L176 143.6 L192 143.6 L208 144.0 L224 144.4 L240 144.6 L256 144.7 L272 144.8 L288 145.5 L304 147.1 L320 149.9 L336 153.4 L352 157.3 L368 160.6 L384 162.7 L400 162.9 L416 161.3 L432 158.2 L448 154.5 L464 151.1 L480 148.6%22/%3E%3Cpath d=%22M0 165.9 L16 165.2 L32 165.9 L48 167.5 L64 169.1 L80 170.1 L96 170.0 L112 168.7 L128 166.6 L144 164.3 L160 162.5 L176 161.6 L192 161.8 L208 162.9 L224 164.5 L240 166.1 L256 167.7 L272 169.0 L288 170.4 L304 172.1 L320 174.2 L336 176.7 L352 179.2 L368 181.2 L384 182.0 L400 181.2 L416 178.9 L432 175.4 L448 171.5 L464 168.1 L480 165.9%22/%3E%3Cpath d=%22M0 184.4 L16 184.2 L32 185.3 L48 187.1 L64 188.9 L80 190.0 L96 189.7 L112 188.1 L128 185.7 L144 183.1 L160 181.1 L176 180.4 L192 181.2 L208 183.3 L224 186.2 L240 189.2 L256 191.9 L272 194.0 L288 195.5 L304 196.5 L320 197.4 L336 198.3 L352 199.1 L368 199.6 L384 199.3 L400 197.9 L416 195.5 L432 192.3 L448 188.9 L464 186.0 L480 184.4%22/%3E%3Cpath d=%22M0 204.1 L16 204.1 L32 205.2 L48 206.8 L64 208.4 L80 209.2 L96 208.8 L112 207.2 L128 204.8 L144 202.4 L160 200.8 L176 200.7 L192 202.3 L208 205.4 L224 209.3 L240 213.3 L256 216.6 L272 218.7 L288 219.6 L304 219.4 L320 218.7 L336 217.8 L352 217.0 L368 216.2 L384 215.3 L400 214.0 L416 212.1 L432 209.7 L448 207.3 L464 205.2 L480 204.1%22/%3E%3Cpath d=%22M0 224.6 L16 224.5 L32 225.1 L48 226.2 L64 227.2 L80 227.8 L96 227.5 L112 226.2 L128 224.4 L144 222.7 L160 222.0 L176 222.7 L192 225.0 L208 228.8 L224 233.2 L240 237.4 L256 240.6 L272 242.1 L288 241.8 L304 240.2 L320 237.9 L336 235.4 L352 233.4 L368 232.0 L384 231.0 L400 230.3 L416 229.4 L432 228.3 L448 226.9 L464 225.5 L480 224.6%22/%3E%3Cpath d=%22M0 245.5 L16 244.8 L32 244.6 L48 245.0 L64 245.6 L80 246.2 L96 246.3 L112 245.9 L128 245.2 L144 244.7 L160 244.8 L176 246.2 L192 249.0 L208 252.8 L224 256.9 L240 260.6 L256 262.9 L272 263.3 L288 261.9 L304 258.9 L320 255.3 L336 251.9 L352 249.3 L368 247.8 L384 247.4 L400 247.6 L416 247.9 L432 247.9 L448 247.4 L464 246.5 L480 245.5%22/%3E%3Cpath d=%22M0 266.1 L16 264.7 L32 263.8 L48 263.6 L64 264.1 L80 265.0 L96 266.0 L112 266.9 L128 267.5 L144 268.1 L160 269.1 L176 270.7 L192 273.2 L208 276.3 L224 279.4 L240 281.9 L256 283.0 L272 282.3 L288 279.8 L304 276.1 L320 271.9 L336 268.1 L352 265.6 L368 264.5 L384 264.9 L400 266.1 L416 267.5 L432 268.3 L448 268.3 L464 267.5 L480 266.1%22/%3E%3Cpath d=%22M0 286.2 L16 284.2 L32 282.8 L48 282.4 L64 283.1 L80 284.8 L96 287.0 L112 289.2 L128 291.1 L144 292.6 L160 293.9 L176 295.2 L192 296.7 L208 298.4 L224 300.0 L240 300.9 L256 300.8 L272 299.3 L288 296.3 L304 292.5 L320 288.4 L336 285.1 L352 283.1 L368 282.7 L384 283.8 L400 285.7 L416 287.7 L432 289.0 L448 289.1 L464 288.0 L480 286.2%22/%3E%3Cpath d=%22M0 305.9 L16 303.7 L32 302.3 L48 302.1 L64 303.5 L80 306.1 L96 309.4 L112 312.7 L128 315.4 L144 317.3 L160 318.2 L176 318.5 L192 318.5 L208 318.5 L224 318.3 L240 317.9 L256 316.9 L272 315.1 L288 312.4 L304 309.2 L320 305.9 L336 303.4 L352 302.1 L368 302.3 L384 303.8 L400 306.0 L416 308.1 L432 309.3 L448 309.3 L464 308.0 L480 305.9%22/%3E%3Cpath d=%22M0 325.7 L16 323.8 L32 322.8 L48 323.2 L64 325.3 L80 328.7 L96 332.8 L112 336.6 L128 339.5 L144 341.0 L160 341.1 L176 340.0 L192 338.3 L208 336.5 L224 334.9 L240 333.5 L256 332.2 L272 330.8 L288 329.0 L304 326.9 L320 324.8 L336 323.2 L352 322.5 L368 322.9 L384 324.2 L400 326.2 L416 328.0 L432 329.1 L448 328.9 L464 327.7 L480 325.7%22/%3E%3Cpath d=%22M0 346.2 L16 345.1 L32 344.8 L48 345.8 L64 348.4 L80 352.1 L96 356.3 L112 360.0 L128 362.4 L144 363.0 L160 361.9 L176 359.3 L192 356.0 L208 352.9 L224 350.4 L240 348.7 L256 347.8 L272 347.2 L288 346.7 L304 346.0 L320 345.1 L336 344.2 L352 343.7 L368 343.8 L384 344.7 L400 346.0 L416 347.4 L432 348.2 L448 348.3 L464 347.5 L480 346.2%22/%3E%3C/g%3E%3C/svg%3E") 0 0 / 480px 360px;
  opacity: 0.045;
}

.wl-storyband::after {
  top: 0;
  right: 0;
  bottom: 0;
  width: 44px;
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2244%22 height=%2232%22%3E%3Crect width=%2244%22 height=%2232%22 fill=%22%23201e1d%22/%3E%3Crect x=%2214%22 y=%229%22 width=%2216%22 height=%2214%22 rx=%223%22 fill=%22%23fbf7f1%22/%3E%3C/svg%3E") 0 0 / 44px 32px repeat-y;
  opacity: 0.09;
}

@media (max-width: 640px) {
  /* On a phone the strip would crowd the text: narrower and fainter. */
  .wl-storyband::after {
    width: 22px;
    background-size: 22px 16px;
    opacity: 0.07;
  }
}

.wl-story {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 4.375rem;
  align-items: start;
  padding-block: 7.5rem;
}

/*
 * A full-screen-high sticky column with the photograph centred in it, so the
 * photograph sits level with the paragraph being read (site.js reads at the
 * middle of the screen).
 */
.wl-story__side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wl-story__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: calc(100vh - 220px);
  border-radius: var(--radius-img);
  overflow: hidden;
  background: var(--c-ink);
}

.wl-story__img {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.9s ease, transform 1.6s var(--ease-out);
}

.wl-story__img.is-current {
  opacity: 1;
  transform: scale(1);
}

.wl-story__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wl-story__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 2.5rem 1rem 0.875rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.65) 100%);
  color: var(--c-white);
  font-size: 0.6875rem;
}

.wl-story__caption:empty {
  display: none;
}

.wl-story__body {
  display: grid;
  gap: 1.5rem;
  font-size: 1.4375rem;
  line-height: 1.6;
  color: var(--t-body);
  letter-spacing: 0.01em;
}

.wl-story__p > * {
  margin: 0;
  text-wrap: pretty;
}

/*
 * The first paragraph starts level with the middle of the photograph and the
 * last one stops there, at which point the page carries on scrolling. The
 * photograph is centred in a screen-high sticky column, so "level" means half
 * a screen down, less half the paragraph. site.js measures the first and last
 * paragraphs into --wl-first and --wl-last.
 */
.wl-story.is-enhanced .wl-story__body {
  gap: 22vh;
  padding:
    max(0px, calc(50vh - var(--wl-first, 0px) / 2))
    0
    max(0px, calc(50vh - var(--wl-last, 0px) / 2));
}

.wl-story.is-enhanced .wl-story__p {
  opacity: var(--op, 0.18);
  transform: translateY(calc((1 - var(--op, 0.18)) * 10px));
  transition: opacity 0.35s ease, transform 0.5s ease;
}

/* --- FAQ page ----------------------------------------------------------- */

.wl-pagehead--flush {
  padding-top: 0;
}

.wl-faqs__intro {
  margin-bottom: 2.5rem;
}

/* --- Archive heads ------------------------------------------------------ */

.wl-archive__head {
  margin-bottom: 3.75rem;
}

.wl-archive__description {
  margin-top: 1.25rem;
}

/* --- 404 and search ----------------------------------------------------- */

.wl-404__body {
  font-size: 1.125rem;
  color: var(--t-muted);
  max-width: 48ch;
  margin-block: 1.5rem 2.5rem;
}

.wl-404__links {
  margin-top: 2.5rem;
}

.wl-search {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  max-width: 480px;
}

.wl-search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid var(--c-line-strong);
  border-radius: 0;
  padding-block: 0.75rem;
  font-size: 1rem;
  background: transparent;
  outline: none;
}

.wl-search__input:focus {
  border-bottom-color: var(--c-ink);
}

.wl-search__submit {
  flex: none;
}

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 900px) {
  /*
   * On a narrow screen the photograph becomes a short sticky strip above the
   * text, so it still changes with the paragraph being read.
   */
  .wl-story {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-block: 3rem 4rem;
  }

  .wl-story__side {
    top: 4.5rem;
    z-index: 1;
    height: auto;
    display: block;
  }

  .wl-story__media {
    aspect-ratio: 3 / 2;
    max-height: 38vh;
    width: 100%;
  }

  .wl-story__body {
    font-size: 1.1875rem;
  }

  .wl-story.is-enhanced .wl-story__body {
    gap: 14vh;
    padding: 6vh 0 45vh;
  }

  .wl-posthero,
  .wl-abouthero {
    height: auto;
    min-height: 60vh;
  }

  .wl-posthero__inner,
  .wl-abouthero__inner {
    position: static;
    padding-block: 9rem 3rem;
  }

  .wl-article {
    padding-block: 3rem 2.5rem;
  }

  .wl-article__lead {
    font-size: 1.5rem;
  }
}

/* --- About story, phone -------------------------------------------------
   The photograph's strip covers the screen from the top down to just below
   the photograph, in the band's own cream, and fades out underneath. So the
   text scrolling up disappears a little before it reaches the photograph,
   instead of sliding under it and on up behind the header.
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .wl-story {
    padding-top: 0;
  }

  .wl-story__side {
    top: 0;
    padding-top: 4.25rem;
    padding-bottom: 1.25rem;
    background: var(--c-cream);
  }

  /* See measure() in site.js: the photograph lets go as the last paragraph
     reaches the reading line, and the text is pulled back up to match. */
  .wl-story.is-enhanced .wl-story__side {
    margin-bottom: var(--wl-tail, 0px);
  }

  .wl-story.is-enhanced .wl-story__body {
    margin-top: calc(-1 * var(--wl-tail, 0px));
    padding-bottom: 0;
  }

  .wl-story__side::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 2.5rem;
    background: linear-gradient(var(--c-cream), rgba(251, 247, 241, 0));
    pointer-events: none;
  }
}

/* --- About story, tablet ------------------------------------------------
   Keeps the side-by-side story: the photograph is still big enough to read at
   a third of the width.
   -------------------------------------------------------------------------- */

@media (min-width: 641px) and (max-width: 900px) {
  .wl-story {
    grid-template-columns: 0.8fr 1.2fr;
    gap: 2.5rem;
  }

  .wl-story__side {
    top: 0;
    height: 100vh;
    display: flex;
  }

  .wl-story__media {
    aspect-ratio: 4 / 5;
    max-height: calc(100vh - 180px);
  }

  .wl-story.is-enhanced .wl-story__body {
    gap: 18vh;
    padding:
      max(0px, calc(50vh - var(--wl-first, 0px) / 2))
      0
      max(0px, calc(50vh - var(--wl-last, 0px) / 2));
  }
}
