/*
 * Appearance family: home
 * Source of truth: css/colour-review-home.css
 * Owner: the home appearance writer.
 * Loaded automatically by inc/appearance-route-loader.php.
 */

/* Home-route dark appearance refinements. Scoped to the scheme attribute. */

/* Keep the canvas dark below body content so overscroll and footer edges stay consistent. */
html[data-afilms-scheme="dark"] {
    background: #121212;
}

/* The sitemap panel's inline white paint and the third-party logo artwork are
   handled by colour-review-shared.css; no home-specific duplicate here. */

/* The home dividers above the two category images and above each works grid
   are fixed #d8d8d8. On the dark canvas they read as bright hairlines while
   every other separator is #2c2c2c, so they take the dark rule colour. */
:root[data-afilms-scheme="dark"] body.home .secondary-imgs__container,
:root[data-afilms-scheme="dark"] body.home .commercials-page .commercials-grid,
:root[data-afilms-scheme="dark"] body.home .documentaries-page .documentaries-grid {
    border-top-color: #2c2c2c;
}

/* The awards block opens with a fixed 2px white rule, which disappears into
   the light page and becomes a glowing line on the dark canvas. On the home
   route it takes the theme's dark separator colour; light keeps the original. */
:root[data-afilms-scheme="dark"] body.home .about-page .awards {
    border-top-color: #2c2c2c;
}

/* Dark canvas: work-card titles sit flush against image bottoms in the
   desktop grid, so title text reads as an overlay on the artwork. Give the
   image a small dark-only breathing space; the light appearance keeps its
   existing 0px desktop / 8px mobile spacing. The subtitle stays inside the
   same anchor immediately under the title, so the two still read as one
   caption block at every card height. */
:root[data-afilms-scheme="dark"] body.home .commercials-page .commercial .title,
:root[data-afilms-scheme="dark"] body.home .documentaries-page .documentary .title {
    margin-top: 12px;
}

/* The production-guide entries carry a fixed #d8d8d8 top rule. On the dark
   canvas that reads as a glowing white line; the theme's other separators use
   #2c2c2c, so the home guide cards follow the same dark rule. */
:root[data-afilms-scheme="dark"] body.home .af-production-guides__card {
    border-top-color: #2c2c2c;
}

/* The full-reel dialog's close control has no background of its own, so dark
   appearance hands it the browser's mid-grey button plate while its glyph
   stays #231f20. Give the control the dark canvas and light ink; light
   appearance keeps the original control untouched. */
:root[data-afilms-scheme="dark"] body.home #close-fullscreen-video {
    background-color: #1c1c1c;
    border: 1px solid #4a4a4a;
    color: #e4e4e4;
}

:root[data-afilms-scheme="dark"] body.home #close-fullscreen-video path {
    fill: #e4e4e4;
}

:root[data-afilms-scheme="dark"] body.home #close-fullscreen-video:focus-visible {
    outline-color: #e4e4e4;
}

/* The full-reel label sits on live footage whose luminance changes frame by
   frame: pale glass on one side of the label, dark tea on the other. A text
   shadow cannot hold one white word on both, so the label carries its own
   tightly fitted dark plate. The film keeps its original colour and the plate
   hugs the words instead of covering the frame. */
body.home #hero .main-video[data-video-controller] #play-video {
    padding: 8px 12px;
    border-radius: 4px;
    background: #121212;
    color: #ffffff;
    text-shadow: none;
}

/* Hover fades the whole entry, plate included; the words stay on the plate. */
body.home #hero .main-video[data-video-controller] button.play-video:hover,
body.home #hero .main-video[data-video-controller] a.play-video:hover {
    background: #121212;
}

/* Keyboard focus draws its ring inside the plate, where it meets a fixed
   surface instead of whatever frame is under the frame edge. */
body.home #hero .main-video[data-video-controller] #play-video:focus,
body.home #hero .main-video[data-video-controller] #play-video:focus-visible {
    background: #121212;
    color: #ffffff;
}

body.home #hero .main-video[data-video-controller] #play-video:focus-visible {
    outline: 3px solid #ffffff !important;
    outline-offset: -3px !important;
    box-shadow: none !important;
}

/* Light appearance: small secondary copy and text links measured below the
   4.5:1 body-text threshold on their actual white and #f7f7f7 surfaces.
   These rules are scoped away from dark, and leave layout, type scale,
   media, and the large lead paragraphs untouched. */
:root:not([data-afilms-scheme="dark"]) body.home #afilms-main-content .commercials-page .commercial .description {
    color: #6c6c6c;
}

:root:not([data-afilms-scheme="dark"]) body.home #afilms-main-content .services-list-item a {
    color: #6c6c6c;
}

:root:not([data-afilms-scheme="dark"]) body.home #afilms-main-content .services .side-content.introz a {
    color: #6c6c6c;
}

:root:not([data-afilms-scheme="dark"]) body.home #afilms-main-content .services .side-content.introz a:hover,
:root:not([data-afilms-scheme="dark"]) body.home #afilms-main-content .services .side-content.introz a:focus-visible {
    color: #373737;
}

/* Below 850px the hero lead drops to 1.2rem, where #858585 no longer meets
   the body-text threshold. The desktop lead stays at its original size and color. */
@media screen and (max-width: 850px) {
    :root:not([data-afilms-scheme="dark"]) body.home section.hero .hero-copy p {
        color: #6c6c6c;
    }
}
