/* ==========================================================================
   "Quiet" style. Loaded after proto.css and bridge.css, only when the site is
   built with FF_STYLE=quiet. Same structure (spacing scale, 12-column grid,
   ruled numbers) but with no flat colour panels. Colour comes from the
   photographs: each card's top rule takes the dominant colour of its own
   image. Red stays a small accent, yellow stays a small chip.
   ========================================================================== */

/* neutral field for the open call */
.quiet { --panel: #eeeeec; }

/* manifesto: plain page, black rules */
.quiet .bpanel--plain { background: transparent; color: inherit; padding-block: var(--s5) 0; margin-top: 0; }
.quiet .bpanel--plain .manifesto-list,
.quiet .bpanel--plain .manifesto-list li { border-color: var(--black); }
.quiet .bpanel--plain .manifesto-list .idx { color: var(--accent); opacity: 1; }
.quiet .bpanel--plain .manifesto-copy { color: inherit; }
.quiet .bpanel--plain .text-link { color: inherit; border-color: currentColor; }

/* open call: a quiet grey field; yellow only as a small chip */
.quiet .bpanel--grey { background: var(--panel); color: var(--black); }
.quiet .bpanel--grey .phead { border-top-color: var(--black); }
.quiet .bpanel--grey .phead-no { color: var(--accent); }
.quiet .bpanel--grey .badge-open-call { display: none; }
.quiet .bpanel--grey .split { padding-block: 0 var(--s4); }
.quiet .bpanel--grey h2 { font-size: clamp(2.6rem, 8vw, 6.5rem); line-height: 0.95; margin-top: 14px; }
.quiet .chip-yellow {
  display: inline-block;
  background: var(--accent-open-call);
  color: var(--accent-open-call-ink);
  padding: 4px 10px;
  letter-spacing: 0.14em;
}

/* photography-led colour: each caption rule takes its own picture's colour */
.quiet .pcard-cap { border-top: 3px solid var(--story, var(--black)); }
.quiet .pcard .card-media { outline: 0; }

/* letters swapped to the Alternative face inside headings (guidelines page 3) */
.quiet .phead h2 .alt { font-family: var(--font-alt, "Fourth Floor Alternative"), var(--font-heading); }

/* a full-width picture as a pause in the page: a duotone of the story's own colour under a dot screen */
.quiet .pbreak {
  position: relative;
  display: block;
  margin-top: var(--s5);
  height: clamp(320px, 52vw, 640px);
  overflow: hidden;
  background: var(--story, #111);
  color: var(--pure-white);
}
.quiet .pbreak img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.quiet .pbreak-dots {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.5) 1px, transparent 1.6px) 0 0 / 5px 5px;
  mix-blend-mode: multiply;
}
.quiet .pbreak::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0) 55%); pointer-events: none; }
.quiet .pbreak-cap { position: absolute; inset: auto 0 var(--s4) 0; z-index: 1; display: grid; gap: var(--s1); }
.quiet .pbreak-meta { font-family: var(--font-heading); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; }
.quiet .pbreak-title {
  /* same heading style as the lead story, one step smaller so the lead stays dominant */
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: clamp(2rem, 5.4vw, 4rem);
  line-height: 0.98;
  max-width: 18ch;
  text-wrap: balance;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.35);
}
@media (hover: hover) { .quiet .pbreak:hover img { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .quiet .pbreak img { transition: none; } .quiet .pbreak:hover img { transform: none; } }

/* ==========================================================================
   Blend refinements (Huck, Are.na, Frieze, Atmos, NTS, Crack): left-aligned
   captions with a Huck-style metadata line, a flatter type scale, an Are.na
   lettered manifesto and a dark audio page.
   ========================================================================== */

/* captions: left-aligned, sentence case, one small uppercase metadata line */
.quiet .pcard .card-title,
.quiet .pcard .card-excerpt { text-align: left; }
.quiet .pcard .card-title { text-transform: none; font-size: 1.15rem; line-height: 1.2; }
.quiet .span-6 .card-title { font-size: 1.4rem; }
.quiet .span-6 .card-excerpt { margin-inline: 0; max-width: 60ch; }
.quiet .pcard .badge-open-call { display: inline-block; margin: 0 0 var(--s1); }
.quiet .pcard-cap { font-size: 0.7rem; }
.quiet .pcard-cat { color: var(--black); }
.quiet .pcard-no { color: var(--gray-mid); }
.quiet .pcard-by {
  margin: var(--s1) 0 0;
  font-family: var(--font-heading);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-mid);
}

/* flatter scale: section heads and the manifesto come down a size */
.quiet .phead h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
.quiet .bpanel--grey h2 { font-size: clamp(2rem, 5vw, 3.6rem); }

/* Are.na-style statement: "Fourth Floor is" then a lettered list */
.quiet .manifesto-lead {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 var(--s2);
}
.quiet .manifesto-list li { justify-content: flex-start; gap: var(--s3); font-size: clamp(2rem, 5vw, 4rem); }
.quiet .manifesto-list li .idx { order: -1; min-width: 1.4rem; font-size: 0.95rem; letter-spacing: 0.04em; text-transform: none; color: var(--black); }

/* the black band keeps its comfortable spacing */
.quiet .themes { padding-block: var(--s4) var(--s5); margin-top: var(--s5); }

/* dark audio page, as on NTS and Are.na */
.quiet.darkpage { background: var(--pure-black); color: var(--white); }
.quiet.darkpage .site-header { background: var(--pure-black); border-bottom-color: var(--gray-line-inverse); color: var(--white); }
.quiet.darkpage .site-header a,
.quiet.darkpage .site-header button,
.quiet.darkpage .logo-mark { color: var(--white); }
.quiet.darkpage .nav-toggle span { background: var(--white); }
.quiet.darkpage .article-head .lede,
.quiet.darkpage .body-copy p,
.quiet.darkpage .card-tag { color: var(--gray-mid-inverse); }
.quiet.darkpage .mix-embed { border-top-color: var(--gray-line-inverse); }
.quiet.darkpage .text-link { color: var(--white); border-color: currentColor; }


/* Picks of the month on the dark audio page */
.quiet.darkpage .picks { border-top-color: var(--gray-line-inverse); }
.quiet.darkpage .pick { border-bottom-color: var(--gray-line-inverse); }
.quiet.darkpage .pick-blurb { color: var(--white); }
.quiet.darkpage .pick-n,
.quiet.darkpage .pick-meta,
.quiet.darkpage .pick-by,
.quiet.darkpage .pick-listen,
.quiet.darkpage .picks-intro,
.quiet.darkpage .picks-note,
.quiet.darkpage .picks-month { color: var(--gray-mid-inverse); }
.quiet.darkpage .pick-links a:hover { color: var(--white); text-decoration-thickness: 2px; }

.quiet.darkpage .pick-play { background: var(--pure-white); color: var(--pure-black); }
.quiet.darkpage .pick-play:hover, .quiet.darkpage .pick-play:focus-visible { background: var(--gray-mid-inverse); }
.quiet.darkpage .pick-play[aria-expanded="true"] { background: transparent; color: var(--pure-white); box-shadow: inset 0 0 0 1px var(--pure-white); }
.quiet.darkpage .picks-notice { color: var(--gray-mid-inverse); }

/* ==========================================================================
   Motion (prototype). Small, one-off movements drawn from the identity: the dot
   screen, the swapped letters, a soft page change. All of it stops for anyone
   whose device asks for reduced motion, and nothing moves inside an article.
   ========================================================================== */

/* the full-width picture: a full-colour layer that the dot screen gives way to on hover */
.quiet .pbreak-full { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 0.7s var(--ease); }
.quiet .pbreak-dots { transition: opacity 0.7s var(--ease); }
@media (hover: hover) {
  .quiet .pbreak:hover .pbreak-full, .quiet .pbreak:focus-visible .pbreak-full { opacity: 1; }
  .quiet .pbreak:hover .pbreak-dots, .quiet .pbreak:focus-visible .pbreak-dots { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .quiet .pbreak-full, .quiet .pbreak-dots { transition: none; } }

@media (prefers-reduced-motion: no-preference) {
  /* 1. dot screen resolving on the full-width picture: coarse halftone tightening to the fine screen as it arrives */
  .js .quiet .pbreak .pbreak-dots {
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.5) 28%, transparent 45%);
    background-size: 5px 5px;
  }
  .js .quiet .pbreak:not(.is-in) .pbreak-dots { background-size: 30px 30px; }
  .js .quiet .pbreak.is-in .pbreak-dots { animation: ff-resolve 1.6s var(--ease) both; }
  @keyframes ff-resolve { from { background-size: 30px 30px; } to { background-size: 5px 5px; } }

  /* 2. letter swap: the O and R in section headings, and the FF mark, flip between the two
     brand faces a few times and settle on the Alternative face */
  .quiet .phead.is-visible h2 .alt { display: inline-block; animation: ff-swap 0.9s both; }
  .quiet .phead.is-visible h2 .alt:nth-of-type(3n + 2) { animation-delay: 0.09s; }
  .quiet .phead.is-visible h2 .alt:nth-of-type(3n) { animation-delay: 0.18s; }
  @keyframes ff-swap {
    0%, 19.99%  { font-family: var(--font-heading); }
    20%, 39.99% { font-family: var(--font-alt, "Fourth Floor Alternative"), var(--font-heading); }
    40%, 59.99% { font-family: var(--font-heading); }
    60%, 79.99% { font-family: var(--font-alt, "Fourth Floor Alternative"), var(--font-heading); }
    80%, 89.99% { font-family: var(--font-heading); }
    90%, 100%   { font-family: var(--font-alt, "Fourth Floor Alternative"), var(--font-heading); }
  }
  .quiet .logo-mark.is-swapping .lm { display: inline-block; width: 0.45em; white-space: nowrap; animation: ff-logo-swap 1.1s both; }
  .quiet .logo-mark.is-swapping .lm:nth-child(2) { animation-delay: 0.14s; }
  @keyframes ff-logo-swap {
    0%, 17.99%  { font-family: var(--font-heading); }
    18%, 35.99% { font-family: var(--font-display); }
    36%, 53.99% { font-family: var(--font-heading); }
    54%, 71.99% { font-family: var(--font-display); }
    72%, 89.99% { font-family: var(--font-heading); }
    90%, 100%   { font-family: var(--font-display); }
  }

  /* 3. page change: the new page rises a few pixels as it fades in (the header is held still) */
  ::view-transition-new(root) { animation: 0.45s var(--ease) both ff-rise; }
  @keyframes ff-rise { from { opacity: 0; transform: translateY(12px); } }
}
