/*
 * Appearance family: commercial-case-study
 * Source of truth: css/colour-review-commercial.css
 * Owner: the commercial-case-study appearance writer.
 * Loaded automatically by inc/appearance-route-loader.php.
 */

/* Scoped colour/contrast review for the Wanda FIBA commercial case study.
   Only this page's review unit is touched; media colours are preserved. */

/* The section kicker is small bold text and needs body-text contrast. */
body.case-study--wanda-fiba .case-study-section-kicker {
	color: var(--case-study-graphite, #6c6c6c);
}

/* Make the three practical planning links read as links, with real separation
   and a keyboard-visible focus state. */
body.case-study--wanda-fiba .case-study-service-links a {
	color: var(--case-study-ink, #373737);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

/* Give slash separators breathing room so the three links read separately.
   The light steel tone measured 3.69:1 on white; #6c6c6c reaches 5.25:1. */
body.case-study--wanda-fiba .case-study-service-links span[aria-hidden="true"] {
	padding: 0 0.35em;
	color: #6c6c6c;
}

body.case-study--wanda-fiba .case-study-service-links a:hover,
body.case-study--wanda-fiba .case-study-service-links a:focus-visible {
	color: #000000;
	text-decoration-thickness: 2px;
}

body.case-study--wanda-fiba .case-study-service-links a:focus-visible,
body.case-study--wanda-fiba .case-study-fit-card a:focus-visible,
body.case-study--wanda-fiba .case-study-evidence-section figure a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* Dark appearance: nested neutral panels must follow the scheme, otherwise
   light text sits on the old light-grey surface. */
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-ground-band,
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-transition-copy,
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-transition-points,
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-fit-card {
	background-color: #1c1c1c;
	color: #e4e4e4;
}

/* The planning section's neutral surface is painted by a pseudo-element. */
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-fit-section::before {
	background-color: #1c1c1c;
}

/* The final footer band carries an inline white background in footer.php.
   Scope the override to this route so the shared footer keeps its own owner. */
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba > .talk[style*="background:white"] {
	background-color: #121212 !important;
}

:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-service-links a {
	color: #e4e4e4;
}

/* The slash separators follow the scheme as well: #6c6c6c is a light-canvas
   tone and would drop to 3.57:1 on the dark page. */
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-service-links span[aria-hidden="true"] {
	color: #9a9a9a;
}

:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-service-links a:hover,
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-service-links a:focus-visible {
	color: #ffffff;
}

/* The light palette paints hairlines near-white. On the dark page those rules
   read as bright outlines around media, cards and the fact table, so the page
   uses low-contrast rules instead. Dividers stay separators, not decoration. */
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-intro,
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-intro-copy,
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-fact-table,
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-fact-table__row,
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-support-ledger__item,
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-evidence-grid img,
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-transition-context,
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-transition-points article,
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-service-links {
	border-color: rgba(255, 255, 255, 0.14);
}

/* Panel outlines keep a little more weight than internal dividers. */
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-ground-band,
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-transition-copy,
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-transition-points,
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-fit-card,
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-contact-panel__action a {
	border-color: rgba(255, 255, 255, 0.20);
}

/* The on-the-ground note rules are painted with a dark translucent ink that
   disappears on the dark band; they keep the same divider tone as the rest
   of the page instead. */
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-ground-points li {
	border-color: rgba(255, 255, 255, 0.14);
}

/* The planning cards sit on the same #1c1c1c band as their surface, so give
   them a slightly raised neutral to keep the four-card grid legible. */
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-fit-card {
	background-color: #242424;
}

/* Extend the approved neutral-panel treatment to the other commercial case
   studies. Their inherited section CSS still paints the ground band with a
   light warm neutral while dark mode uses light text; set the pair together. */
:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-ground-band {
	background-color: #1c1c1c;
	color: #e4e4e4;
	border-color: rgba(255, 255, 255, 0.20);
}

/* Links, separators and keyboard rings use the same light-canvas ink across
   case studies, so give them the same dark-canvas treatment. */
:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-service-links a {
	color: #e4e4e4;
}

:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-service-links span[aria-hidden="true"] {
	color: #9a9a9a;
}

:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-service-links a:hover,
:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-service-links a:focus-visible {
	color: #ffffff;
}

body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-service-links a:focus-visible,
body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-fit-card a:focus-visible,
body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-evidence-section figure a:focus-visible,
body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-more-works-grid a:focus-visible,
body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-contact-panel__action a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* The planning surface is painted by a pseudo-element on these pages. */
:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-fit-section::before {
	background-color: #1c1c1c;
}

:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-fit-card {
	background-color: #242424;
	color: #e4e4e4;
	border-color: rgba(255, 255, 255, 0.20);
}

/* Quiet the inherited near-white rules on dark pages while keeping the
   existing separators visible. */
:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-intro,
:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-intro-copy,
:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-fact-table,
:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-fact-table__row,
:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-support-ledger__item,
:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-evidence-grid img,
:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-transition-context,
:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-transition-points article,
:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-contact-panel__action a,
:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-service-links {
	border-color: rgba(255, 255, 255, 0.14);
}

:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .case-study-evidence-grid img {
	border-color: rgba(255, 255, 255, 0.06);
}

:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .talk[style*="background:white"] {
	background-color: #121212;
}

:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .featured-works,
:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .featured-works .section-title.more-works {
	border-color: rgba(255, 255, 255, 0.14);
}

:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .talk .info,
:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) .talk .social-links {
	border-bottom-color: rgba(255, 255, 255, 0.14);
}

/* These components declare their own light border colors on the body or
   individual edges. Quiet the actual decorative edges, not the focus rings. */
:root[data-afilms-scheme="dark"] body.commercial-case-study .case-study-service-links--grid > :is(span:first-child, a),
:root[data-afilms-scheme="dark"] body.case-study--tuborg-open .case-study-service-links > a,
:root[data-afilms-scheme="dark"] body.commercial-case-study .case-study-relationship-ledger,
:root[data-afilms-scheme="dark"] body.commercial-case-study .case-study-relationship-ledger__item,
:root[data-afilms-scheme="dark"] body.commercial-case-study .case-study-planning-brief,
:root[data-afilms-scheme="dark"] body.case-study--google-marketing-livestream .case-study-ground-steps li {
	border-color: #333;
}

:root[data-afilms-scheme="dark"] body.commercial-case-study .case-study-reference-module :is(.case-study-relationship-section, .case-study-support-section),
:root[data-afilms-scheme="dark"] body.commercial-case-study:not(.case-study--wanda-fiba) :is(.case-study-transition-copy, .case-study-transition-points),
:root[data-afilms-scheme="dark"] body.case-study--google-marketing-livestream .case-study-ground-steps {
	border-color: #383838;
}

/* The light-layout media header is still editorial content in dark mode. */
:root[data-afilms-scheme="dark"] body:is(.case-study--pepsico-china, .case-study--huawei-the-new-thing, .case-study--editorial) .case-media--light .case-media__header {
	border-top-color: #383838;
}

/* The optional, decorative transition marker is made of a line and an arrowhead. */
:root[data-afilms-scheme="dark"] body.commercial-case-study .case-study-transition-route {
	color: rgba(255, 255, 255, 0.45);
	background-color: currentColor;
}

:root[data-afilms-scheme="dark"] body.commercial-case-study .case-study-transition-route::after {
	border-top-color: currentColor;
	border-right-color: currentColor;
}

:root[data-afilms-scheme="dark"] body.case-study--wanda-better-tomorrow-today .case-study-evidence-grid figure,
:root[data-afilms-scheme="dark"] body.case-study--ami-paris .case-media--format-comparison .case-media__item--image .case-media__asset {
	border-color: rgba(255, 255, 255, 0.06);
}

/* AMI's mask fades the contained backing, not the photographs. Swap only the
   light backing; intentionally dark media sections keep their own treatment. */
:root[data-afilms-scheme="dark"] body.case-study--ami-paris .case-media--format-comparison.case-media--light {
	--section-surface-background: var(--bg-gray);
}

/* Google uses a vertical fade as well as the contained section's side mask.
   Paint the fade with the dark panel color instead of layering it over a fill. */
:root[data-afilms-scheme="dark"] body.case-study--google-marketing-livestream .case-study-fit-section {
	--section-surface-background: linear-gradient(to bottom, transparent 0, var(--bg-gray) 32px, var(--bg-gray) calc(100% - 32px), transparent 100%);
}

:root[data-afilms-scheme="dark"] body.commercial-case-study.case-study--google-marketing-livestream .case-study-fit-section::before {
	background-color: transparent;
}

/* BEFITNOW's review layout carries its own fixed light palette. On the dark
   canvas that palette paints dark fact and ground copy on #121212, and the
   light contact panel keeps near-white headings and links. Move the review's
   palette tokens to the scheme's neutrals so every surface and its text move
   together; the light appearance keeps the original values. */
:root[data-afilms-scheme="dark"] body.case-study--befitnow .befitnow-review {
	--befit-ink: #e4e4e4;
	--befit-body: #bcbcbc;
	--befit-muted: #9a9a9a;
	--befit-line: rgba(255, 255, 255, 0.14);
	--befit-line-strong: rgba(255, 255, 255, 0.20);
	--befit-panel: #1c1c1c;
}

/* The review's call to action is the page's primary link; give it the same
   two-pixel keyboard ring as the other commercial contact actions. */
body.case-study--befitnow .befitnow-review__contact-action a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

/* Use the approved stadium-arrival still as the scoped pre-play frame. The
   original media colours and the hero's established 120:43 crop are kept. */
body.case-study--wanda-fiba .ohsnap-film-module video[poster] {
	background: url("../../assets/images/wanda-fiba/cs008-09-hero-poster-stadium-arrival.webp") center / cover no-repeat;
}

/* Frames: on the dark page a 14% white hairline reads as a lit rectangle
   around each film still. The stills keep their own pixel colours; only the
   decorative CSS outline returns to a near-invisible edge. */
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .case-study-evidence-grid img {
	border-color: rgba(255, 255, 255, 0.06);
}

/* More Works: the shared light palette paints the title rule and the closing
   rule at #ededed. On this dark route they were the brightest lines on the
   page, so they follow the panel divider tone instead. */
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .featured-works,
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .featured-works .section-title.more-works {
	border-color: rgba(255, 255, 255, 0.14);
}

/* Footer contact block: the inline-styled light footer paints the email and
   phone rules white. They are ruled as page dividers on the dark canvas. */
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .talk .info,
:root[data-afilms-scheme="dark"] body.case-study--wanda-fiba .talk .social-links {
	border-bottom-color: rgba(255, 255, 255, 0.14);
}

/* TRW keeps the legacy body.case-study-trw class instead of the Path A
   .commercial-case-study modifier. In dark mode its contact and ground panels
   and the pseudo-element behind its planning cards stay on light surfaces while
   inherited text is light. Pair those surfaces with their foregrounds here so
   both commercial rendering paths follow the approved neutral treatment. */
:root[data-afilms-scheme="dark"] body.case-study-trw .trw-contact-panel,
:root[data-afilms-scheme="dark"] body.case-study-trw .trw-ground-band {
	background-color: #1c1c1c;
	color: #e4e4e4;
	border-color: rgba(255, 255, 255, 0.20);
}

:root[data-afilms-scheme="dark"] body.case-study-trw .trw-fit-section {
	--section-surface-background: #1c1c1c;
}

:root[data-afilms-scheme="dark"] body.case-study-trw .trw-fit-card {
	background-color: #242424;
	color: #e4e4e4;
	border-color: rgba(255, 255, 255, 0.20);
}

:root[data-afilms-scheme="dark"] body.case-study-trw .trw-fit-card p,
:root[data-afilms-scheme="dark"] body.case-study-trw .trw-fit-header p {
	color: #bcbcbc;
}

/* TRW's separate layout carries its own light editorial rules. Keep its
   stronger section break distinct from the fact and transition rows. */
:root[data-afilms-scheme="dark"] body.case-study-trw :is(.trw-intro, .trw-intro-copy) {
	border-color: #383838;
}

:root[data-afilms-scheme="dark"] body.case-study-trw :is(.trw-fact-table, .trw-fact-table__row, .trw-support-ledger__item, .trw-transition-copy, .trw-transition-points),
:root[data-afilms-scheme="dark"] body.case-study-trw .trw-transition-points article {
	border-color: #333;
}

:root[data-afilms-scheme="dark"] body.case-study-trw .trw-evidence-grid img {
	border-color: rgba(255, 255, 255, 0.06);
}

/* TRW's ground-point rules are painted with translucent dark ink. */
:root[data-afilms-scheme="dark"] body.case-study-trw .trw-ground-points li,
:root[data-afilms-scheme="dark"] body.case-study-trw .trw-ground-points li:last-child {
	border-color: rgba(255, 255, 255, 0.14);
}

/* More Works: the shared light palette paints the title and closing rules at
   #ededed. Keep them as quiet separators on the dark TRW canvas. */
:root[data-afilms-scheme="dark"] body.case-study-trw .featured-works,
:root[data-afilms-scheme="dark"] body.case-study-trw .featured-works .section-title.more-works {
	border-color: rgba(255, 255, 255, 0.14);
}

:root[data-afilms-scheme="dark"] body.case-study-trw .talk .info,
:root[data-afilms-scheme="dark"] body.case-study-trw .talk .social-links {
	border-bottom-color: rgba(255, 255, 255, 0.14);
}

:root[data-afilms-scheme="dark"] body.case-study-trw .talk[style*="background:white"] {
	background-color: #121212;
}

/* Keyboard position must read as clearly as it does on the Path A pages. */
body.case-study-trw .trw-contact-panel__action > a:focus-visible,
body.case-study-trw .trw-more-works-grid a:focus-visible,
body.case-study-trw .featured-works a:focus-visible,
body.case-study-trw .talk a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* The featured-work cards and the closing call to action are links, and the
   browser default ring is a 1px auto outline. Draw the page's own two-pixel
   ring so keyboard position reads the same as the planning links. */
body.case-study--wanda-fiba .case-study-more-works-grid a:focus-visible,
body.case-study--wanda-fiba .case-study-contact-panel__action a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}
