/* ============================================================
   POW Studio - case-dark.css: the case studies in their dark treatment (18 Nov 2026)
   The owner, 18 Nov: "Dark case study page. Not work page, that stays white, the index page". Linked by the eleven
   case studies on the template (work/*.html; plasma-one is not on it and is already on ink, its NDA gate and its old
   footer both). Every rule sits under html.cs-dark, a class written in the page's own <html> tag, so the dark ground
   is in the first paint and is never applied by script. Remove the class and the page is the light page to the
   pixel. Nothing here touches the work index, which stays white.

   Every value is one the site already uses on its dark surfaces, none new:
   - the ground: ink #09090B, the wordmark layer's under every page and the dark phone menu's
   - type: white #FFFFFF (19.9:1 on the ground), the muted step 60% white #FFFFFF99 (7.3:1 on the ground, 7.2:1 on
     the results band), as system.css sets it on the dark ground
   - the hairline: 10% white #FFFFFF1A (system.css, the dark case-study sidebar's rule)
   - a media frame's ground while its image loads, and the results band: #121212 (case-study.css .cs-media.is-dark,
     the homepage's --hero-bg). The band is the white page's grey block (#F7F7F6, one small step off white) taken to
     ink: one small step off the ground, no outline, no tint.
   - in-copy links: white with the 35% white underline, solid on hover (system.css, the dark case studies' text links,
     .section-body a); the light page's is 30% ink
   - the header: its existing over-dark state (system.css .nav.nav-over-dark: white wordmark and links, white Contact
     us), held from the first paint until overscroll.js reads the page under it, with one change: the pill is the
     light header's own pill (75%, 16 px blur) in ink rather than 45% black, so at rest it is the ground itself (45%
     black drew a darker box round the links on the flat ink) and over pale work while scrolling the white links keep
     at least 9:1 (45% black over Hemi's white page left them under 4:1). The Services sheet and the phone menu open in
     their dark tone from that (nav.js reads the header's tone as they open).
   The work is never dimmed, tinted or filtered.
   ============================================================ */

/* The ground, from the top of the page to where the footer starts. The root too, so a phone's bounce past either
   end shows ink, and the first paint has no white in it. */
html.cs-dark { background-color: #09090B; }
html.cs-dark .page-content { background: #09090B; }

/* The case study takes the dark values through the page's own tokens, so every rule that reads them follows: the
   breadcrumb, the name and its summary, the meta and its labels, the left column (its name, line, chapter links with
   the current one in white, result and services), the section titles and their hairlines, the copy, the results band
   and the quote (its hanging marks are the paragraph's own colour), the captions, the next case, the focus ring
   (currentColor) and the media frames' ground while they load (--off-white). Scoped to main, so the closing block
   keeps the light values the white footer needs. */
html.cs-dark main {
  --text-primary: #FFFFFF;
  --text-muted: #FFFFFF99;
  --border: #FFFFFF1A;
  --off-white: #121212;
  --page-bg: #121212;
  color: #FFFFFF;
}

/* The in-copy underlines are written in ink on the light page (30% ink); here the dark case studies' own: 35% white,
   solid on hover. The next case's hover underline takes the same. */
html.cs-dark main .cs-crumbs a,
html.cs-dark main .cs-meta dd a,
html.cs-dark main .cs-body a,
html.cs-dark main .section-link { text-decoration-color: #FFFFFF59; }
html.cs-dark main .cs-crumbs a:hover,
html.cs-dark main .cs-meta dd a:hover,
html.cs-dark main .cs-body a:hover,
html.cs-dark main .section-link:hover,
html.cs-dark main .section-link:focus-visible { text-decoration-color: currentColor; }
html.cs-dark main .cs-next-card:hover .cs-next-name { text-decoration-color: #FFFFFF59; }

/* The quote's portrait waits on the band's own ground rather than the light page's pale grey disc */
html.cs-dark main .cs-quote-photo { background: #121212; }

/* ── Media. Pale work: the faint 4% ink line inside the pale frames (Hemi, docology, Binsr, NIZK and the rest) was for
   the white page; on ink a pale image holds its own edge, so it goes, the portraits' ring with it. ── */
html.cs-dark .cs-media[data-edge="pale"]::after,
html.cs-dark .cs-quote-photo[data-edge="pale"]::after { content: none; }

/* Dark work. The ground is ink, not black, so most dark frames read by their own tone with nothing added: pure black
   edges (Gala's, Kedalion's) a step darker than the ground, the dark greys (#111 to #1A1A1A, most of Kedalion, OSMI
   and Vetro) a step lighter. Fifteen frames have edges in the ground's own tone (half a side or more within 1.5 L*
   of #09090B, measured on every frame: Gala's hero and two posts, five of Kedalion's, four of OSMI's, two of Vetro's,
   one of VOX's), where the frame would vanish and its run would read as one shape. Those, and only those, carry
   data-edge-ink and take the white page's own pale-edge hairline mirrored: 1 px inside the 8 px corners at 4% (the
   light page's 4% ink, here 4% white, the NDA gate's input ground), so the edge sits one faint step off the ground,
   as faint as the hairline on white (about 4 L* either side). Nothing is drawn round any other frame. */
html.cs-dark .cs-media[data-edge-ink]::after { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04); pointer-events: none; }

/* ── The footer (the owner chose the white footer, where the call to action reads clearest): exactly as it is on every page, white with ink type, the black wordmark band under it.
   It meets the dark page as a white sheet with the page's own corners (24 px, 16 on phones), the shape the white
   page has where it lifts off the band, so the change of ground reads as the page arriving rather than a stripe. The
   foot's corners are its own too: on phones the page does not clip its content (overflow: visible to 768 px), so
   without them the white would run square past the page's rounded foot. ── */
html.cs-dark .closing {
  background: #FFFFFF;
  border-radius: var(--home-radius-page);
}

/* ── The header over the dark page: system.css's over-dark state (the pill as above), held from the first paint
   (before overscroll.js has read the page) and for as long as the page under it is dark. Over the white footer
   overscroll.js sets .nav-over-light and the page's light header returns; on phones, once nav.js has read the ground
   (data-bar-tone), nav.css paints the bar and these step aside. The header's own colour is white here so the keyboard
   ring on the wordmark and on Contact us (currentColor) shows on the ink. ── */
html.cs-dark #nav:not(.nav-over-light):not([data-bar-tone]) { color: #FFFFFF; }
html.cs-dark #nav:not(.nav-over-light):not([data-bar-tone]):not(.is-menu-open) .nav-inner { background: rgba(9, 9, 11, 0.75) !important; -webkit-backdrop-filter: blur(16px) !important; backdrop-filter: blur(16px) !important; box-shadow: none !important; }
html.cs-dark #nav:not(.nav-over-light):not([data-bar-tone]) .nav-logo svg path { fill: #FFFFFF !important; }
html.cs-dark #nav:not(.nav-over-light):not([data-bar-tone]) .nav-links a { color: #FFFFFF !important; }
html.cs-dark #nav:not(.nav-over-light):not([data-bar-tone]) .nav-cta { background: #FFFFFF !important; }
html.cs-dark #nav:not(.nav-over-light):not([data-bar-tone]) .nav-cta span { color: #09090B !important; }
html.cs-dark #nav:not(.nav-over-light):not([data-bar-tone]) .nav-hamburger line { stroke: #FFFFFF !important; }
html.cs-dark #nav.nav-over-dark { color: #FFFFFF; }
@media (max-width: 768px) {
  html.cs-dark #nav:not(.nav-over-light):not([data-bar-tone]) .nav-inner { background: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
}

/* The cookie notice is 72% ink glass. On white the page's type behind it blurs into the grey; on ink, white type and
   pale work behind it showed through as light smudges under "Show details" (50% white). Here it takes the film veil's
   92% ink (the work index's .wk-modal), so its own type keeps at least 4.5:1 over anything. */
html.cs-dark .pow-consent { background: rgba(9, 9, 11, 0.92); }
