/* The about page. It also loads start.css for the section heads, the edition cards, the social grid and the lines */

/* The paper of the halftone banners (Figma); in the dark mode the elevated color for all of them, under the same dots */
:root { --banner-paper: #ffffff; --banner-paper-tinted: #edeceb; }
@media (prefers-color-scheme: dark) {
  :root { --banner-paper: var(--color-background-elevated); --banner-paper-tinted: var(--color-background-elevated); }
}

body { text-wrap: pretty; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }

/* The line above each part runs past the frame (see the dividers in start.css) */
.block, .features, .team-cards, .banner, .editions { --rail: 1px 0 0; }
/* The editions come before the social grid, so the line below the edition cards is the line above the social grid */
.follow { --rail: 0; }

.about-hero { display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 80px var(--gutter); text-align: center; }
.about-hero h1 { display: flex; flex-direction: column; align-items: center; font: var(--text-title-l); color: var(--color-text-very-bold); }
.line { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 12px; }
.inline-image { height: 48px; width: auto; object-fit: cover; }
.about-hero h1 { font: var(--text-title-xl); }
.about-hero .inline-image { height: 56px; }
.intro { max-width: 720px; font: var(--text-p-l); color: var(--color-text-default); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); }
.features li { display: flex; flex-direction: column; padding: 32px var(--gutter); }
.features li:not(:last-child) { background: var(--line) right top / 1px var(--draw) no-repeat; }
.features.centered { text-align: center; }
.features h3, .steps h3, .groups h3 { font: var(--text-h-2); color: var(--color-text-bold); }
.features p, .steps p, .groups p { font: var(--text-label-l); color: var(--color-text-default); }

.block { padding-bottom: 40px; }
.block > * + * { margin-top: 44px; }
.block > .steps, .block > .chart { margin-block: 80px; }
.section-head p + p { margin-top: 20px; }
.section-head a, .faq a { text-decoration: underline; }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding-inline: var(--gutter); }
.columns p { font: var(--text-p-l); color: var(--color-text-default); }
.columns a { text-decoration: underline; }
.dropcap::first-letter { -webkit-initial-letter: 2; initial-letter: 2; margin-right: 8px; color: var(--color-text-very-bold); }
/* Firefox does not support initial-letter: use a floated letter over two lines (2 × 28px line height) */
@supports not ((initial-letter: 2) or (-webkit-initial-letter: 2)) {
  .dropcap::first-letter { float: left; font-size: 2lh; line-height: 1; }
}

.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 64px; padding-inline: var(--gutter); }

/* Banner: an interactive halftone (start/halftone.js) behind the text */
.banner {
  position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 120px var(--gutter); text-align: center; background: var(--banner-paper);
}
.banner.tinted { background: var(--banner-paper-tinted); }
.banner h2 { max-width: 560px; font: var(--text-title-m); color: var(--color-text-very-bold); }
.banner p { max-width: 560px; font: var(--text-label-2xl-bold); color: var(--color-text-subtle); }

.team-cards { display: grid; grid-template-columns: repeat(4, 1fr); }
.team-cards li { display: flex; flex-direction: column; background: var(--color-background-elevated); }
.team-cards li:not(:last-child) { box-shadow: inset -1px 0 var(--color-border-very-subtle); }
.team-cards h3 { padding: 12px 12px 0; font: var(--text-h-3); color: var(--color-text-very-bold); }
.team-cards p { padding: 0 12px; font: var(--text-p-s); color: var(--color-text-default); }
/* In the narrow cards of a phone a long word („Geschäftsführer“) breaks instead of running out of the card */
.team-cards p { hyphens: auto; hyphenate-limit-chars: 12 5 5; }
/* A name breaks only when it does not fit on a line of its own, not to balance the lines */
.team-cards h3 { hyphens: auto; text-wrap: wrap; }
.team-cards img { width: 100%; height: auto; margin-top: auto; padding-top: 24px; transform-origin: bottom; transition: scale 0.4s ease; }
/* Hover: the card darkens and the portrait zooms in a little. The darker layer is its own element, because the card
   carries the delay of its fade-in, which would also delay the hover. */
.team-cards li { position: relative; isolation: isolate; overflow: hidden; }
.team-cards li::before { content: ""; position: absolute; inset: 0 1px 0 0; z-index: -1; background: var(--color-background-box); opacity: 0; transition: opacity 0.4s ease; }
@media (hover: hover) {
  .team-cards li:hover::before { opacity: 1; }
  .team-cards li:hover img { scale: 1.04; }
}
@media (prefers-reduced-motion: reduce) { .team-cards img { transition: none; } .team-cards li:hover img { scale: none; } }

/* The photo fills the right half down to the line below; it crops to the height of the text */
.team { padding-bottom: 0; }
.team-photo { align-self: stretch; width: 100%; height: 100%; object-fit: cover; }

.split { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
.split > * + * { margin-top: 0; }
.split .body { display: flex; flex-direction: column; gap: 24px; padding: 64px var(--gutter) 0; }
.split .body > p { font: var(--text-p-l); color: var(--color-text-default); }

/* The line left of the questions runs through the bottom space of the block down to the next line */
.faq .body { gap: 0; padding: 44px 0 40px; margin-bottom: -40px; background: var(--line) left top / 1px var(--draw) no-repeat; }
/* The hover grey covers question and answer but leaves the lines at the sides free; the line below lies on top */
.faq details { margin-inline: 1px; box-shadow: inset 0 -1px var(--color-border-very-subtle); }
.faq details:hover { background: var(--color-background-elevated); }
.faq details:last-child { box-shadow: none; }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 20px var(--gutter);
  font: var(--text-h-2); color: var(--color-text-bold); list-style: none; cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex-shrink: 0; width: 32px; text-align: center; font: var(--text-label-2xl); }
.faq details[open] summary::after { content: "×"; }
.faq details p { padding: 0 var(--gutter) 20px; font: var(--text-label-l); color: var(--color-text-default); }

/* Krise: circulation as a line with the years without checked values as a dashed gap, and the newspapers per Kreis */
.chart { margin: 0; display: grid; grid-template-columns: 2fr 1fr; gap: 20px 64px; padding-inline: var(--gutter); }
.chart-title { margin-bottom: 20px; font: var(--text-label-m-bold); color: var(--color-text-subtle); }
.plot { position: relative; height: 220px; margin: 0 24px 0 6px; box-shadow: 0 1px var(--color-border-very-subtle); }
.plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.plot polyline { fill: none; stroke: var(--color-background-action); stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.plot .gap { stroke: var(--color-border-bold); stroke-dasharray: 4 6; }
.points { list-style: none; padding: 0; }
.points li { position: absolute; left: var(--x); top: var(--y); }
.points li::before {
  content: ""; position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--color-background-action); box-shadow: 0 0 0 3px var(--color-background-default);
}
.value { position: absolute; bottom: 12px; left: 0; transform: translateX(-50%); font: var(--text-label-l-bold); color: var(--color-text-bold); white-space: nowrap; }
.axis { position: relative; height: 24px; margin: 16px 24px 0 6px; font: var(--text-label-m); color: var(--color-text-subtle); }
.axis span { position: absolute; left: var(--x); transform: translateX(-50%); }
/* The first label starts on the text edge, like the headline above */
.axis span:first-child, .points li:first-child .value { transform: translateX(-6px); }
.chart figcaption { grid-column: 1 / -1; font: var(--text-label-s); color: var(--color-text-very-subtle); }

/* Lokale Nachrichten: the sources flow into Zaunfunk and come out as what you read. Like the steps: gray lines, a dot
   as the signal and a dark station. The labels and the station cover the ends of the lines, so the lines need no exact
   end; the drawing and the labels keep one aspect ratio. */
.block > .flow { margin-block: 80px; }
.flow { position: relative; margin-inline: var(--gutter); aspect-ratio: 1120 / 240; }
.flow svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.flow path { fill: none; stroke: var(--color-border-very-subtle); stroke-width: 1; vector-effect: non-scaling-stroke; }
.flow circle { fill: var(--color-background-action); }
.flow ul { list-style: none; padding: 0; }
.flow li {
  position: absolute; z-index: 1; top: var(--y); translate: 0 -50%;
  padding: 6px 14px; border-radius: 999px; white-space: nowrap; background: var(--color-background-default);
  box-shadow: inset 0 0 0 1px var(--color-border-very-subtle); font: var(--text-label-m-bold); color: var(--color-text-bold);
}
.flow-sources li { left: 0; }
.flow-outputs li { right: 0; }
.flow-hub {
  position: absolute; z-index: 1; left: 50%; top: 50%; translate: -50% -50%; width: 72px; height: 72px; border-radius: 50%;
  background: var(--color-background-action); box-shadow: 0 0 0 6px var(--color-background-default);
}
.flow-hub::before {
  content: ""; position: absolute; inset: 18px; background: var(--color-text-inverted-very-bold);
  -webkit-mask: url(img/logo-ring.svg) center / contain no-repeat; mask: url(img/logo-ring.svg) center / contain no-repeat;
}
/* Coming into view: the lines wipe in like the chart, the station grows in like the stations of the steps */
.flow.draws .flow-hub { transition: scale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.45s; }
.flow.draws:not(.seen) .flow-hub { scale: 0.4; }
@media (prefers-reduced-motion: reduce) { .flow circle { display: none; } }
/* The lines of the narrow layout depend on where the labels wrap, so start/start.js draws them */
.flow .flow-column { display: none; }

/* Wir geben zurück: one of our photos on Wikimedia Commons */
.commons { position: relative; margin: 0 var(--gutter); }
.commons img { width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; }
.commons figcaption { display: flex; align-items: center; gap: 12px; padding-top: 12px; font: var(--text-label-m); color: var(--color-text-subtle); }
.commons a { text-decoration: underline; }
.license {
  white-space: nowrap; padding: 2px 10px; border-radius: 999px; background: var(--color-background-action);
  font: var(--text-label-s-bold); color: var(--color-text-inverted-very-bold);
}

/* So entsteht eine Meldung: a line through the four stations, which then fades out in a squiggle. Once in view, the
   progress fills the line from station to station in a loop: it eases into each station and holds there, the station
   lights up, and after the last station everything holds, fades back and starts again. */
.steps { --col: calc((100% - 2 * var(--gutter) - 192px) / 4); position: relative; counter-reset: step; padding-top: 56px; }
.steps::before, .steps::after { content: ""; position: absolute; }
.steps::before {
  top: 15.5px; left: calc(var(--gutter) + 16px); width: calc(3 * var(--col) + 192px); height: 1px;
  background: var(--color-border-very-subtle); transform-origin: left;
}
.steps::after {
  top: 10px; left: calc(var(--gutter) + 3 * var(--col) + 208px); right: var(--gutter); height: 12px; background: var(--color-border-very-subtle);
  -webkit-mask: url(img/squiggle.svg) 0 50% / 24px 12px repeat-x, linear-gradient(90deg, black, transparent);
  -webkit-mask-composite: source-in;
  mask: url(img/squiggle.svg) 0 50% / 24px 12px repeat-x, linear-gradient(90deg, black, transparent);
  mask-composite: intersect;
}
.steps li { position: relative; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; z-index: 1; top: -56px; left: 0; display: grid; place-items: center;
  box-sizing: border-box; width: 32px; height: 32px; border: 2px solid; border-radius: 50%; font: var(--text-label-m-bold); background: var(--color-background-action); border-color: var(--color-background-action); color: var(--color-text-inverted-very-bold);
}
/* The progress: a dark line from the first station with the signal, a dot, at its tip; the stations cover the dot */
.steps li:first-child::after {
  content: ""; position: absolute; top: -46px; left: 16px; width: 0; height: 12px; opacity: 0;
  background: linear-gradient(var(--color-background-action) 0 0) left center / calc(100% - 6px) 1px no-repeat,
    radial-gradient(circle, var(--color-background-action) 5px, transparent 5.5px) right center / 12px 12px no-repeat;
}

/* Coming into view: the line draws itself, the stations grow in one after another, their texts fade in */
.steps.draws::before { transition: scale 1.4s cubic-bezier(0.65, 0, 0.35, 1); }
.steps.draws::after { transition: opacity 0.8s ease 1.2s; }
.steps.draws li { transition: opacity 0.8s ease 0.2s; }
.steps.draws li::before { transition: scale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.steps.draws:not(.seen)::before { scale: 0 1; }
.steps.draws:not(.seen)::after, .steps.draws:not(.seen) li { opacity: 0; }
.steps.draws:not(.seen) li::before { scale: 0.4; }
.steps.draws li:nth-child(2), .steps.draws li:nth-child(2)::before { transition-delay: 0.45s; }
.steps.draws li:nth-child(3), .steps.draws li:nth-child(3)::before { transition-delay: 0.8s; }
.steps.draws li:nth-child(4), .steps.draws li:nth-child(4)::before { transition-delay: 1.1s; }

/* The loop of 12 s: the progress reaches the stations at 0, 22, 44 and 66 % and holds 1 s at each. It moves slowly
   and snaps into the next station only at the end, as if the station pulls it; the station gives way a little on impact
   and sends out a ring that grows and fades away. */
.steps.seen li:first-child::after { animation: progress 24s linear(0, 0.03 10%, 0.85 95%, 1) 1.6s infinite; }
.steps.seen li:nth-child(1)::before { animation: station-1 24s linear 1.6s infinite backwards; }
.steps.seen li:nth-child(2)::before { animation: station-2 24s linear 1.6s infinite backwards; }
.steps.seen li:nth-child(3)::before { animation: station-3 24s linear 1.6s infinite backwards; }
.steps.seen li:nth-child(4)::before { animation: station-4 24s linear 1.6s infinite backwards; }
@keyframes progress {
  0% { width: 0; opacity: 1; }
  8% { width: 0; }
  22% { width: calc(1 * (100% + 64px)); }
  30% { width: calc(1 * (100% + 64px)); }
  44% { width: calc(2 * (100% + 64px)); }
  52% { width: calc(2 * (100% + 64px)); }
  66% { width: calc(3 * (100% + 64px)); }
  88% { width: calc(3 * (100% + 64px)); opacity: 1; }
  95%, 100% { width: calc(3 * (100% + 64px)); opacity: 0; }
}
@keyframes station-1 {
  0% { background: var(--color-background-action); border-color: var(--color-background-action); color: var(--color-text-inverted-very-bold); box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-background-action) 20%, transparent); animation-timing-function: ease-out; }
  12%, 88% { background: var(--color-background-action); border-color: var(--color-background-action); color: var(--color-text-inverted-very-bold); box-shadow: 0 0 0 12px transparent; }
  95%, 100% { background: var(--color-background-default); border-color: var(--color-border-very-subtle); color: var(--color-text-very-subtle); box-shadow: none; }
}
@keyframes station-2 {
  0%, 21% { background: var(--color-background-default); border-color: var(--color-border-very-subtle); color: var(--color-text-very-subtle); box-shadow: none; }
  22% { background: var(--color-background-action); border-color: var(--color-background-action); color: var(--color-text-inverted-very-bold); box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-background-action) 20%, transparent); translate: 0; animation-timing-function: ease-out; }
  22.8% { translate: 0.75px 0; animation-timing-function: ease-in-out; }
  25% { translate: 0; }
  34%, 88% { background: var(--color-background-action); border-color: var(--color-background-action); color: var(--color-text-inverted-very-bold); box-shadow: 0 0 0 12px transparent; }
  95%, 100% { background: var(--color-background-default); border-color: var(--color-border-very-subtle); color: var(--color-text-very-subtle); box-shadow: none; }
}
@keyframes station-3 {
  0%, 43% { background: var(--color-background-default); border-color: var(--color-border-very-subtle); color: var(--color-text-very-subtle); box-shadow: none; }
  44% { background: var(--color-background-action); border-color: var(--color-background-action); color: var(--color-text-inverted-very-bold); box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-background-action) 20%, transparent); translate: 0; animation-timing-function: ease-out; }
  44.8% { translate: 0.75px 0; animation-timing-function: ease-in-out; }
  47% { translate: 0; }
  56%, 88% { background: var(--color-background-action); border-color: var(--color-background-action); color: var(--color-text-inverted-very-bold); box-shadow: 0 0 0 12px transparent; }
  95%, 100% { background: var(--color-background-default); border-color: var(--color-border-very-subtle); color: var(--color-text-very-subtle); box-shadow: none; }
}
@keyframes station-4 {
  0%, 65% { background: var(--color-background-default); border-color: var(--color-border-very-subtle); color: var(--color-text-very-subtle); box-shadow: none; }
  66% { background: var(--color-background-action); border-color: var(--color-background-action); color: var(--color-text-inverted-very-bold); box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-background-action) 20%, transparent); translate: 0; animation-timing-function: ease-out; }
  66.8% { translate: 0.75px 0; animation-timing-function: ease-in-out; }
  69% { translate: 0; }
  78%, 88% { background: var(--color-background-action); border-color: var(--color-background-action); color: var(--color-text-inverted-very-bold); box-shadow: 0 0 0 12px transparent; }
  95%, 100% { background: var(--color-background-default); border-color: var(--color-border-very-subtle); color: var(--color-text-very-subtle); box-shadow: none; }
}

/* The condensed bar of the about page: the logo and the waiting list button */

@media (max-width: 900px) {
  .features, .columns, .split { grid-template-columns: 1fr; }
  .features li:not(:last-child) { background: var(--line) left bottom / var(--draw) 1px no-repeat; }
  .team-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* The steps as a vertical timeline: the stations on the left, their texts on the right, without the signal */
  .steps { grid-template-columns: 1fr; gap: 32px; padding-top: 0; }
  .steps li { padding-left: 52px; }
  .steps li::before { top: -2px; }
  .steps::before { top: 16px; bottom: 16px; left: calc(var(--gutter) + 15.5px); width: 1px; height: auto; transform-origin: top; }
  .steps.draws:not(.seen)::before { scale: 1 0; }
  .steps::after, .steps li:first-child::after { display: none; }
  .steps.seen li:nth-child(n)::before { animation: none; }
  /* The line ends at the last station: the space below it hides the rest of the line */
  .steps li:last-child::after { content: ""; position: absolute; top: 14px; bottom: 0; left: 14px; width: 4px; background: var(--color-background-default); }
  .chart { grid-template-columns: 1fr; gap: 32px; }
  .split .body { padding-top: 20px; }
  .faq .body { padding-top: 0; background: none; }
}

@media (max-width: 720px) {
  /* Too narrow for the wide drawing: the sources, Zaunfunk and what you read in a column. The lines run from each
     source down into Zaunfunk and from there to each output; the labels cover their ends, as in the wide drawing. */
  .flow { aspect-ratio: auto; display: flex; flex-direction: column; align-items: center; gap: 64px; }
  .flow svg:not(.flow-column) { display: none; }
  .flow .flow-column { display: block; overflow: visible; }
  .flow ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 8px; }
  .flow li { position: relative; translate: none; }
  /* Still positioned, so that the logo inside it keeps its size */
  .flow-hub { position: relative; left: auto; top: auto; translate: none; flex-shrink: 0; }
  .about-hero { padding-block: 48px; }
  .about-hero h1 { font: var(--text-title-m); }
  .inline-image, .about-hero .inline-image { height: 36px; }
  .banner { padding-block: 64px; }
  .banner h2 { font: var(--text-h-1); }
  .banner p { font: var(--text-label-xl-bold); }
  .team-cards li:nth-child(2n) { box-shadow: none; }
  /* Photos run from edge to edge, like the hero image; the caption keeps the text edge */
  .commons { margin-inline: 0; }
  .commons figcaption { padding-inline: var(--gutter); }
}
