/* CDA 2026 shared front-end layer: the fixed background video and the site
   footer, used by every public page. Loaded from front/private/head.php.
   The homepage-only sections (hero, purpose, categories...) live in
   home-2026.css; class names stay in the home-2026-* namespace so the
   footer partial and the homepage stylesheet keep working unchanged. */

.home-2026-footer {
    --cda-black: #000000;
    --cda-deep: #0e2531;
    --cda-steel: #05293c;
    --cda-steel-soft: #314f5e;
    --cda-paper: #ffffff;
    --cda-paper-soft: #fafbfb;
    --cda-line: rgba(255, 255, 255, 0.16);
    --cda-shell: min(1024px, calc(100% - 48px));
    --cda-shell-wide: min(1232px, calc(100% - 48px));

    font-family: 'Jost', 'Futura', 'Century Gothic', 'Avenir Next', sans-serif;
    color: var(--cda-paper);
}

/* The backdrop video is fixed dead-centre of the viewport and serves as the
   background for the whole page height: content scrolls over it. It sits at a
   negative z-index so that ordinary (non-positioned) page content still paints
   above it; the body background colour behind it is never visible. Only the
   footer paints its own (gradient) ground. */
.home-2026-video {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -1;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .home-2026-video {
        display: none;
    }
}

/* Short pages (login, password reset...) used to pin the old footer with an
   inline position:fixed. Instead, every page that carries the shared footer
   (except the homepage) becomes a flex column so the footer is pushed to the
   bottom of the viewport when the content is shorter than it. Pages without
   the footer (the maintenance page) are left alone. */
body:not(.home-2026-body):has(.home-2026-footer) {
    /* The theme stylesheet sets body { height: 100% }; a definite height would
       let the flex algorithm shrink the page content and float the footer over
       it, so the height is reset and children are told never to shrink. */
    height: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body:not(.home-2026-body):has(.home-2026-footer) > * {
    flex-shrink: 0;
}

body:not(.home-2026-body):has(.home-2026-footer) .home-2026-footer {
    margin-top: auto;
}

.home-2026-shell {
    width: var(--cda-shell);
    margin: 0 auto;
}

.home-2026-shell--wide {
    width: var(--cda-shell-wide);
}

.home-2026-empty {
    margin: 40px 0 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
}

/* -------------------------------------------------------------- footer --- */

.home-2026-footer {
    position: relative;
    z-index: 1;
    /* The site stylesheet gives footers a 50px margin above and below; the gap
       above would let the fixed video bleed through and the gap below shows the
       body colour as a band under the footer, so both stay closed. */
    margin: 0;
    padding: 72px 0 64px;
    background-image: linear-gradient(180deg, var(--cda-deep) 0%, var(--cda-black) 100%);
}

.home-2026-footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
    gap: clamp(24px, 6vw, 104px);
    align-items: start;
}

.home-2026-footer__logo img {
    width: 84px;
    height: auto;
}

.home-2026-footer h2 {
    margin: 0 0 22px;
    border: 0;
    font-size: 24px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--cda-paper);
}

.home-2026-footer h2:not(:first-child) {
    margin-top: 48px;
}

.home-2026-footer ul {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(20px, 5vw, 78px);
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Entries without a URL render as spans; they must still match the link styling
   so the row reads as one set rather than two. */
.home-2026-footer a,
.home-2026-footer li > span {
    display: inline-block;
    color: var(--cda-paper);
    font-size: 20px;
    text-transform: uppercase;
    text-decoration: none;
}

.home-2026-footer li > span {
    cursor: default;
}

.home-2026-footer a:hover,
.home-2026-footer a:focus {
    color: var(--cda-paper);
    text-decoration: underline;
}

.home-2026-footer__legal {
    margin-top: 48px;
}

/* --------------------------------------------------------- breakpoints --- */

@media (max-width: 860px) {
    /* The cover-crop magnifies the video's bright streak on narrow screens and
       white copy lands on it; dimming restores contrast without a scrim layer. */
    .home-2026-video {
        filter: brightness(0.55);
    }

    .home-2026-footer__inner {
        grid-template-columns: minmax(0, 1fr);
    }
}
