/* =============================================================================
   Footer redesign (Phase 2) — scoped entirely under `.frfoot`.

   Deliberately built from the same parts as the redesigned navbar
   (navbar-redesign.css) and the episode jump bar (massive-dynamic.css
   `.md-secnav`), so the top and bottom of every page read as one system:

     · dark ground in the same family as the bar (rgba(18,20,24,.92))
     · a 3px accent rule on the top edge — the jump bar's signature
     · `.frfoot__title` is `.frnav-col-title` (accent caps + hairline rule)
     · links use the dropdown-item colours and the accent wash on hover
     · the wordmark reuses the nav brand's light letterpress fill

   `--frfoot-accent` is set inline on <footer> from the page theme, using the
   same verse -> triplet map as the navbar (light-on-dark values).
   ============================================================================= */

.frfoot {
    --frfoot-accent: 115, 159, 199;             /* blueverse default */
    --frfoot-link: rgba(226, 230, 235, 0.82);
    --frfoot-muted: rgba(226, 230, 235, 0.5);

    position: relative;
    margin-top: 4rem;
    padding: 3.25rem 0 1.5rem;
    background: linear-gradient(180deg, #171a20 0%, #101216 100%);
    border-top: 3px solid rgb(var(--frfoot-accent));
    color: var(--frfoot-link);
    font-family: "Lato", system-ui, -apple-system, sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Sits directly under page content of any skin — a soft top glow keeps the
   hard accent rule from reading as a slab edge. */
.frfoot::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 120px;
    background: linear-gradient(180deg, rgba(var(--frfoot-accent), 0.09), rgba(var(--frfoot-accent), 0));
    pointer-events: none;
}

.frfoot > .container {
    position: relative;                         /* above ::before */
}

/* --- Layout --------------------------------------------------------------- */
.frfoot__grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.55fr)                       /* brand */
        minmax(0, 0.85fr)                       /* episodes */
        minmax(0, 1fr)                          /* characters */
        minmax(0, 1.9fr);                       /* features (2 sub-columns) */
    gap: 2rem 2.25rem;
}

/* --- Brand column --------------------------------------------------------- */
.frfoot__wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    font-family: "Montserrat", system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
}
.frfoot__wordmark img {
    height: 44px;
    width: auto;
    opacity: 0.9;
}
/* Match the navbar brand: fringeshadownav is a light-on-light letterpress, so
   it needs an explicit light fill to survive on the dark ground. */
.frfoot__wordmark .fringeshadownav {
    color: #ece8df;
    -webkit-text-fill-color: #ece8df;
    text-shadow: 0 1px 0 #000, 0 2px 4px rgba(0, 0, 0, 0.6);
}
.frfoot__wordmark:hover .fringeshadownav {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

.frfoot__blurb {
    margin: 1rem 0 1.1rem;
    max-width: 42ch;
    color: var(--frfoot-muted);
}
.frfoot__blurb em {
    font-style: italic;
    color: rgba(233, 236, 240, 0.72);
}

.frfoot__mail {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgb(var(--frfoot-accent));
    text-decoration: none;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(var(--frfoot-accent), 0.3);
    padding-bottom: 1px;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.frfoot__mail:hover,
.frfoot__mail:focus-visible {
    color: #ffffff;
    border-color: #ffffff;
}

.frfoot__social-label {
    margin: 1.6rem 0 0.5rem;
    font-family: "Montserrat", system-ui, sans-serif;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--frfoot-muted);
}
.frfoot__social {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.frfoot__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 50%;
    color: rgba(226, 230, 235, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
    transition: color 0.15s ease, background-color 0.15s ease,
                border-color 0.15s ease, transform 0.15s ease;
}
.frfoot__social a:hover,
.frfoot__social a:focus-visible {
    color: #ffffff;
    background: rgba(var(--frfoot-accent), 0.3);
    border-color: rgb(var(--frfoot-accent));
    transform: translateY(-2px);
}

/* --- Link columns --------------------------------------------------------- */
/* Same treatment as the navbar's `.frnav-col-title`. */
.frfoot__title {
    margin: 0 0 0.6rem;
    padding-bottom: 0.35rem;
    font-family: "Montserrat", system-ui, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgb(var(--frfoot-accent));
    border-bottom: 1px solid rgba(var(--frfoot-accent), 0.25);
}

.frfoot__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.frfoot__list li {
    break-inside: avoid;                        /* keep rows whole in the split list */
}
.frfoot__list a {
    display: block;
    padding: 0.22rem 0;
    color: var(--frfoot-link);
    font-size: 0.85rem;
    line-height: 1.35;
    text-decoration: none;
    transition: color 0.15s ease, transform 0.15s ease;
}
.frfoot__list a:hover,
.frfoot__list a:focus-visible {
    color: #ffffff;
    transform: translateX(3px);
}

/* Features: 19 links, laid out as two balanced columns so the block matches
   the height of the Characters list next to it. Spoiler-gated links start hidden
   and are revealed by watch position (spoiler-settings.css); the multicol list
   just rebalances as they appear. */
.frfoot__list--split {
    column-count: 2;
    column-gap: 1.5rem;
}

/* "More unlocks as you watch" — a muted affordance under the Features list that
   says there's a hidden layer without naming it, and opens the spoiler control.
   Visibility (fr-js, hidden once past the last gate) is in spoiler-settings.css. */
.frfoot__more {
    margin: 0.6rem 0 0;
}
.frfoot__more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--frfoot-muted);
    font: inherit;
    font-size: 0.78rem;
    text-align: left;
    cursor: pointer;
    transition: color 0.15s ease;
}
.frfoot__more-btn i {
    font-size: 0.68rem;
    opacity: 0.8;
}
.frfoot__more-btn:hover,
.frfoot__more-btn:focus-visible {
    color: rgb(var(--frfoot-accent));
}

/* --- Legal bar ------------------------------------------------------------ */
.frfoot__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1.5rem;
    margin-top: 2.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.78rem;
    color: var(--frfoot-muted);
}
.frfoot__copy {
    margin: 0;
    white-space: nowrap;
}
.frfoot__legal {
    margin: 0;
    flex: 1 1 22rem;
    max-width: 70ch;
}
.frfoot__legal em {
    font-style: italic;
}
.frfoot__top {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--frfoot-link);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease;
}
.frfoot__top:hover,
.frfoot__top:focus-visible {
    color: #ffffff;
}
.frfoot__top i {
    font-size: 0.7rem;
}

/* --- Focus visibility on the dark ground ---------------------------------- */
.frfoot a:focus-visible {
    outline: 2px solid rgb(var(--frfoot-accent));
    outline-offset: 3px;
    border-radius: 2px;
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 1199.98px) {
    .frfoot__grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.6fr);
    }
    /* Brand keeps the full first row; the three link columns share the second. */
    .frfoot__brand {
        grid-column: 1 / -1;
    }
    .frfoot__blurb {
        max-width: 60ch;
    }
}

@media (max-width: 767.98px) {
    .frfoot {
        margin-top: 2.5rem;
        padding-top: 2.5rem;
    }
    .frfoot__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.75rem;
    }
    .frfoot__list--split {
        column-count: 1;
    }
    .frfoot__bar {
        margin-top: 2rem;
    }
    .frfoot__top {
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .frfoot__list a,
    .frfoot__social a {
        transition: color 0.15s ease;
    }
    .frfoot__list a:hover,
    .frfoot__social a:hover {
        transform: none;
    }
}
