/* Painting pages (then and now): the painting fills the first screen with its weather line drawn into it;
   the record follows on the ice ground. Loaded after nephos.css. See docs/design/BRIEF-the-weather-line.md */

.then-now-page {
  --ground: var(--ice);
  --ground-deep: var(--ice-deep);
  --ink: #101917;
  --muted: #2c3733;
  --line: rgba(16, 25, 23, .26);
  --line-strong: rgba(16, 25, 23, .58);
  --accent: #0f6b5c;
  --fog: 12, 20, 18;
  background: var(--ground);
  color: var(--ink);
}

.then-now-page .site-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  height: 72px;
  color: var(--white);
}

.then-now-page .site-nav::before {
  content: "";
  position: absolute;
  inset: 0 0 -70px;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(var(--fog), .55), rgba(var(--fog), 0));
  pointer-events: none;
}

/* Hero: the painting, its line, its name */
.then-now-page .painting-hero {
  position: relative;
  display: block;
  min-height: 0;
  padding: 0;
}

.then-now-page .painting-hero .artwork-figure {
  position: relative;
  height: 100svh;
  min-height: 600px;
  max-height: none;
  margin: 0;
  overflow: clip;
  background: var(--ground-deep);
}

.then-now-page .painting-hero .artwork-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transition: filter 2200ms cubic-bezier(.4, 0, .2, 1), transform 3000ms cubic-bezier(.22, 1, .36, 1);
}

.js .then-now-page .painting-hero .artwork-figure img {
  filter: saturate(.4) contrast(.88) blur(4px);
  transform: scale(1.03);
}

.js.frost-lifted .then-now-page .painting-hero .artwork-figure img,
.still .then-now-page .painting-hero .artwork-figure img {
  filter: none;
  transform: none;
}

.hero-marks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-marks .hero-line {
  fill: none;
  stroke: var(--white);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 2px rgba(242, 244, 239, .85)) drop-shadow(0 0 9px rgba(242, 244, 239, .35));
}

.hero-marks .hero-base {
  fill: none;
  stroke: var(--white);
  stroke-width: 1;
  stroke-dasharray: 2 6;
  vector-effect: non-scaling-stroke;
  opacity: .8;
  filter: drop-shadow(0 0 1px rgba(var(--fog), .9));
}

.hero-marks .hero-tick {
  stroke: var(--white);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.hero-marks .hero-dot {
  fill: var(--white);
}

.hero-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-label {
  position: absolute;
  margin: 0;
  color: var(--white);
  font: 400 17px/1.28 var(--font-sans);
  text-shadow: 0 0 2px rgba(var(--fog), .9), 0 0 10px rgba(var(--fog), .75), 0 1px 18px rgba(var(--fog), .6);
  white-space: nowrap;
}

.hero-label > span {
  display: block;
  translate: 22px -58%;
}

.hero-label strong {
  display: block;
  margin-bottom: 4px;
  font: 400 clamp(30px, 2.6vw, 42px)/1 var(--font-serif);
  font-variation-settings: "opsz" 48;
  font-variant-numeric: lining-nums;
  letter-spacing: -.02em;
}

.hero-label.is-left > span {
  translate: -100% -58%;
  margin-left: -22px;
  text-align: right;
}

.then-now-page .painting-hero .artwork-figure figcaption {
  position: absolute;
  left: var(--page-edge);
  bottom: 18px;
  max-width: min(520px, 46%);
  margin: 0;
  padding: 0;
  background: none;
  color: var(--white);
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  text-shadow: 0 0 2px rgba(var(--fog), .9), 0 0 10px rgba(var(--fog), .75);
  opacity: .9;
}

.then-now-page .painting-hero .artwork-figure figcaption a {
  color: inherit;
}

/* Title over the painting, bottom right, on the dark bank; the line keeps the ice */
.then-now-page .painting-hero .hero-identity {
  position: absolute;
  right: var(--page-edge);
  bottom: clamp(48px, 8vh, 96px);
  z-index: 2;
  width: min(640px, 46vw);
  margin: 0;
  padding: 0;
  color: var(--white);
  text-shadow: 0 0 2px rgba(var(--fog), .9), 0 0 14px rgba(var(--fog), .8), 0 2px 30px rgba(var(--fog), .6);
}

.then-now-page .painting-hero .hero-identity::before {
  content: "";
  position: absolute;
  inset: -90px -140px -110px -160px;
  z-index: -1;
  background: rgba(var(--fog), .7);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 12%, transparent 98%);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 12%, transparent 98%);
}

.then-now-page .painting-hero .eyebrow {
  margin: 0 0 8px;
  color: var(--white);
  font: italic 20px/1.3 var(--font-serif);
  font-variation-settings: "opsz" 24;
}

.then-now-page .painting-hero h1 {
  margin: 0;
  color: var(--white);
  font: 400 clamp(46px, 5vw, 78px)/.98 var(--font-serif);
  font-variation-settings: "opsz" 60;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.then-now-page .painting-hero .object-line {
  margin: 14px 0 0;
  color: var(--white);
  font-size: 16px;
  opacity: .9;
}

.then-now-page .painting-hero .object-line a,
.then-now-page .painting-hero .record-button {
  color: var(--white);
}

.then-now-page .painting-hero .chart-summary {
  max-width: 44ch;
  margin: 14px 0 0;
  color: var(--white);
  font: 400 18px/1.45 var(--font-sans);
}

.then-now-page .painting-hero .record-button {
  display: inline-block;
  margin-top: 14px;
  font: 600 16px/1.2 var(--font-sans);
}

/* The findings, on the ice, as one row of statements */
.then-now-page .painting-hero .hero-evidence {
  width: min(100%, var(--page-max));
  margin-inline: auto;
  padding: clamp(40px, 5vw, 64px) var(--page-edge) clamp(24px, 3vw, 40px);
}

.then-now-page .painting-hero .headline {
  max-width: 24ch;
  margin: 0 0 28px;
  font: 400 clamp(30px, 2.6vw, 40px)/1.02 var(--font-serif);
  font-variation-settings: "opsz" 48;
  letter-spacing: -.03em;
}

.then-now-page .painting-hero .findings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 clamp(20px, 2.5vw, 40px);
  border-top: var(--hairline) solid var(--ink);
}

.then-now-page .painting-hero .finding,
.then-now-page .painting-hero .finding:nth-child(odd),
.then-now-page .painting-hero .finding:nth-child(even),
.then-now-page .painting-hero .finding.comparison-finding {
  display: block;
  min-height: 0;
  padding: 18px 0 22px;
  border: 0;
  text-decoration: none;
}

.then-now-page .painting-hero .finding-value,
.then-now-page .painting-hero .comparison-value {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font: 400 clamp(34px, 3.2vw, 50px)/.95 var(--font-serif);
  font-variation-settings: "opsz" 60;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -.03em;
  white-space: nowrap;
}

.then-now-page .painting-hero .finding:first-child .finding-value {
  color: var(--accent);
}

.then-now-page .painting-hero .finding-label {
  display: block;
  max-width: 26ch;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.35;
}

.then-now-page .painting-hero .finding:hover .finding-label {
  text-decoration: underline;
  text-underline-offset: .2em;
}

/* Sections: the same rhythm as the home wall */
.then-now-page .story-section {
  padding: clamp(72px, 8vw, 120px) var(--page-edge);
}

.then-now-page .section-heading {
  margin-bottom: 44px;
}

.then-now-page .witness-disclosure {
  margin: 0;
}

.then-now-page .witness-disclosure summary {
  display: none;
}

.then-now-page .witness-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 64px);
}

.then-now-page .witness {
  padding: 22px 0 0;
  border-top: var(--hairline) solid var(--ink);
}

.then-now-page .witness blockquote {
  margin: 0 0 14px;
}

.then-now-page .witness blockquote p {
  margin: 0;
  font: italic clamp(22px, 1.9vw, 28px)/1.3 var(--font-serif);
  font-variation-settings: "opsz" 28;
  text-wrap: pretty;
}

.then-now-page .witness-intro {
  max-width: 60ch;
  margin: 0 0 40px;
}

.then-now-page .label-box {
  padding: 28px 0;
  border-top: var(--hairline) solid var(--ink);
  border-bottom: var(--hairline) solid var(--line);
}

.then-now-page .label-text {
  max-width: 62ch;
  margin: 0 0 20px;
  font: 400 clamp(22px, 1.9vw, 28px)/1.42 var(--font-serif);
  font-variation-settings: "opsz" 28;
}

@media (max-width: 1100px) {
  .then-now-page .painting-hero .findings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .then-now-page .painting-hero .hero-identity {
    width: min(560px, 60vw);
  }
}

@media (max-width: 760px) {
  .then-now-page .painting-hero .artwork-figure {
    min-height: 520px;
  }

  .then-now-page .painting-hero .hero-identity {
    width: calc(100% - 2 * var(--page-edge));
  }

  .then-now-page .painting-hero .findings,
  .then-now-page .witness-grid {
    grid-template-columns: 1fr;
  }

  .hero-label > span:not(strong) {
    display: none;
  }

  .then-now-page .painting-hero .artwork-figure figcaption {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .then-now-page .painting-hero .artwork-figure img {
    filter: none;
    transform: none;
    transition: none;
  }

  .hero-marks .hero-line {
    stroke-dasharray: none !important;
    stroke-dashoffset: 0 !important;
  }
}

/* Paintings wall page */
.paintings-page {
  --ground: var(--ice);
  background: var(--ice);
}

.paintings-page #app {
  width: min(100%, var(--page-max));
  margin-inline: auto;
  padding: clamp(40px, 5vw, 72px) var(--page-edge) clamp(72px, 7vw, 110px);
}

.paintings-page .paintings-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: end;
  gap: 32px;
  margin: 0 0 24px;
}

.paintings-page .paintings-head h1 {
  max-width: 18ch;
  margin: 0;
  font: 400 clamp(40px, 4.4vw, 68px)/.98 var(--font-serif);
  font-variation-settings: "opsz" 60;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.paintings-page .paintings-head .wall-intro {
  max-width: 40ch;
  margin: 0;
  color: var(--ink-soft);
  font: 400 19px/1.45 var(--font-sans);
}

.paintings-page .wall-place {
  max-width: 24ch;
  margin: 0 0 12px;
  font: 400 clamp(24px, 2.1vw, 32px)/1.16 var(--font-serif);
  font-variation-settings: "opsz" 36;
  letter-spacing: -.02em;
}

@media (max-width: 900px) {
  .paintings-page .paintings-head {
    grid-template-columns: 1fr;
  }
}
