/* Furrow: the manifesto. Its first screen is the night sky the search page opens on
   (pages.css), with the sun going down behind a bare horizon at the foot of the screen. Under
   that it is one piece of writing, set large, which lights word by word as it is read
   (manifesto.js); then a plain account of where each of its values stands today; and it
   closes on the same horizon, laid along the top of the footer. */

/* The horizon: a line of light, brightest where the sun meets it. skies.js puts the sun on
   its middle. */
.horizon {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(188, 70, 168, 0.4) 20%,
    rgba(255, 156, 122, 0.85) 40%,
    #FFE3CC 50%,
    rgba(255, 156, 122, 0.85) 60%,
    rgba(188, 70, 168, 0.4) 80%,
    transparent
  );
}

.sky-hero .horizon {
  margin-top: 0;
}

/* The first screen is exactly one screen: the title in the middle of the sky, and the
   horizon along the foot of it, so the writing starts with the first scroll. */
.creed-hero {
  display: flex;
  min-height: 100svh;
}

.creed-hero > .wrap {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
}

/* Room under the words for the sun and its light to stand clear of them. */
.creed-title {
  margin-block: auto;
  padding-bottom: clamp(150px, 20svh, 210px);
}

.creed-hero .lede {
  max-width: 31em;
}

/* The writing. Each part is named in small type above it. */
.creed {
  padding-block: clamp(112px, 13vw, 190px) clamp(72px, 8vw, 120px);
}

.creed-read {
  position: relative;
  max-width: 20.5em;
  margin-inline: auto;
  font: 400 clamp(29px, 3.75vw, 56px) / 1.14 var(--display);
  letter-spacing: -0.014em;
}

.creed-read p:not(.eyebrow) {
  text-wrap: pretty;
}

.creed-read p:not(.eyebrow) + .eyebrow {
  margin-top: clamp(64px, 7vw, 104px);
}

/* A value the manifesto names. */
.creed-read em {
  color: #FFA98A;
  font-style: italic;
}

/* Where each value stands today: its name, and a plain line or two. */
.creed-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(48px, 5vw, 72px) 72px;
  margin: clamp(56px, 6vw, 88px) 0 0;
}

.creed-notes dt {
  font: 400 clamp(26px, 2.4vw, 34px) / 1.08 var(--display);
  letter-spacing: -0.01em;
}

.creed-notes dd {
  max-width: 33em;
  margin: 12px 0 0;
  color: var(--body);
}

/* What the server writes down for one search, set as the line itself. */
.logline {
  margin: 6px 0 0;
}

.logline pre {
  margin: 0;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--well);
  box-shadow: var(--sunk);
  color: var(--fg);
  font: 13.5px/1.6 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.logline pre span {
  color: var(--soft);
}

.logline figcaption {
  margin-top: 12px;
  color: var(--soft);
  font-size: 14.5px;
}

/* The close: the same sky, coming in gradually from the dark above it, with its horizon lying
   where the footer's upper edge would be. */
.creed-close {
  padding-top: clamp(120px, 13vw, 190px);
}

.creed-close > canvas {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 42%);
  mask-image: linear-gradient(to bottom, transparent, #000 42%);
}

.creed-close h2 {
  font: 400 clamp(50px, 7vw, 108px) / 0.95 var(--display);
  letter-spacing: -0.018em;
}

.creed-close .lede {
  max-width: 31em;
}

.creed-date {
  margin-top: 26px;
}

.creed-close .horizon {
  margin-top: clamp(168px, 16vw, 220px);
}

.manifesto .site-footer {
  border-top: 0;
}

@media (max-width: 900px) {
  .creed-notes {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .creed-title {
    padding-bottom: 150px;
  }

  .creed-read {
    font-size: clamp(27px, 7.6vw, 34px);
    line-height: 1.18;
  }

  .creed-close {
    padding-top: 104px;
  }

  .creed-close .horizon {
    margin-top: 150px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* Read by scrolling (manifesto.js): dim until reached, then lit, the values in ember. */
  .creed-read.is-read .w {
    color: rgba(244, 239, 233, 0.2);
    transition: color 0.45s ease-out;
  }

  .creed-read.is-read .w.lit {
    color: var(--fg);
  }

  .creed-read.is-read em .w.lit {
    color: #FFA98A;
  }
}
