/* /brand/hdr/ — the HDR extension to the brand kit.

   This sheet is a sibling, not a fork: site.css owns every token and base
   element, brand.css owns the kit's layout (.bk, .bk-sec, .bk-cell, .bk-fig,
   .bk-dl …), and this file adds only the four modules those two do not carry —
   the hero, the pair's badges, the extended fill, and the capability readout.

   Tokens quoted, all owned by site.css and aliased from forma.css:
     --ink    #151513  the ground and the plate
     --lime   #faff69  the accent and the letter
     --paper  #f4f4ef  the reading ink
     --panel  #1c1c19  the raised plate behind an art cell
     --line   rgba(244,244,239,.14)  the kit's rule
     --line-soft rgba(244,244,239,.08)  the quiet rule
     --dim    the prose ink · --faint the label ink
     --mono · --serif · --display  the three faces this page sets in

   Nothing here is a new value: the only literals are the two extended-sRGB
   fills, which are facts about the sRGB numbers, not new tokens. No inline
   styles anywhere — the edge CSP is style-src 'self'. */

/* ---- The hero: the kit's own frontispiece, shortened ------------------- */

.hdr-hero {
  padding: clamp(38px, 7vh, 76px) 0 clamp(34px, 6vh, 62px);
  border-bottom: 1px solid var(--line-soft);
}

.hdr-hero h1 {
  margin: 16px 0 0;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 0.96;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hdr-hero .bk-dek { max-width: 56ch; }

/* ---- The pair: the shipped mark and the extended one -------------------- */

.hdr-pair .bk-fig { gap: 14px; }

.hdr-art {
  min-height: clamp(190px, 26vw, 300px);
}

.hdr-mark {
  display: block;
  width: clamp(120px, 16vw, 176px);
  height: auto;
}

/* The badge names which range a cell is stating. It borrows .bk-flag's
   drawing but not its classes, so the kit's do/don't pair keeps its
   meaning and this page keeps its own. */
.hdr-badge {
  display: inline-block;
  width: fit-content;
  margin: 0;
  padding: 3px 7px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}

.hdr-badge--hdr {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}

/* ---- The extended ink --------------------------------------------------
   The lime is the constant and keeps its authored hex in both renditions:
   #faff69 already sits at 92.9% of SDR white and has nowhere to climb. The
   plate is what moves — it states a value below sRGB's floor, which an HDR
   display can render and an SDR one clamps straight back to --ink. */

.hdr-fill {
  fill: var(--lime);
}

.hdr-plate {
  fill: var(--ink);
}

@media (dynamic-range: high) {
  .hdr-plate { fill: color(srgb 0.0206 0.0206 0.0186); }
}

/* ---- The capability readout -------------------------------------------- */

.hdr-verdict {
  margin: 0 0 clamp(16px, 2.4vh, 22px);
  padding: 12px 16px;
  border-left: 2px solid var(--lime);
  background: var(--panel);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper);
}

.hdr-read {
  margin: 0;
  border-top: 1px solid var(--line);
}

.hdr-read__row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: baseline;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}

.hdr-read dt {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.hdr-read dd {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin: 0;
}

.hdr-read code {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.01em;
  color: var(--paper);
  background: var(--panel-lift);
  padding: 1px 5px;
}

.hdr-val {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--faint);
}

.hdr-val--yes { color: var(--lime); }
.hdr-val--no { color: var(--faint); }

/* ---- Small screens ----------------------------------------------------- */

@media (max-width: 720px) {
  .hdr-read__row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

@media (max-width: 520px) {
  .hdr-art { min-height: 170px; }
}

/* ---- Print -------------------------------------------------------------
   Paper has one range, so the extended fill prints as the house lime and the
   readout prints as whatever the browser read — the sheet states it, it does
   not prove it. */

@media print {
  .hdr-hero { padding-top: 20pt; }
  .hdr-fill { fill: #3f4400; }
  .hdr-badge--hdr { background: #ffffff; border-color: #9a9a94; color: #333331; }
  .hdr-verdict { background: #ffffff; border-left-color: #9a9a94; color: #1a1a18; }
  .hdr-read__row { border-bottom-color: #c8c8c2; }
  .hdr-read code { background: #ffffff; color: #1a1a18; }
}

/* UltraHDR is a JPEG, and a JPEG carries no alpha — so the mark's rounded tile
   comes back as a black square. The plate's own corner radius is 7.2 on the
   32-grid, so a 22.5% border-radius clips exactly the corners the source PNG
   had antialiased. No pixel is edited; the geometry is restored in the cascade. */
.hdr-round {
  border-radius: 22.5%;
  overflow: hidden;
}

/* ---- The header mark ---------------------------------------------------
   The masthead carries the HDR version of the cut F. Both files are stacked in
   the same 26px box and swapped by the capability gate, so a display without
   headroom gets the shipped icon byte-for-byte rather than a different-looking
   one: the HDR file's plate is the authored #151513 on every SDR panel, and the
   lime never moves in either. */
.hdr-topmark {
  position: relative;
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  flex: none;
}

/* site.css carries `.top__mark img { display: block }`, which outranks a bare
   class, so the swap states its own selector at the same weight. */
.top__mark .hdr-topmark__sdr,
.top__mark .hdr-topmark__hdr {
  grid-area: 1 / 1;
  display: block;
}

.top__mark .hdr-topmark__hdr { display: none; }

@media (dynamic-range: high) {
  .top__mark .hdr-topmark__sdr { display: none; }
  .top__mark .hdr-topmark__hdr { display: block; }
}
