/* ==========================================================================
   Lockwood & Co. — Homepage
   Loaded only by index.php (queued through $page_styles).

   Contents
   1. Hero
   2. Featured sections
   3. Discover Yourself (quizzes)
   4. Character spotlight
   5. Latest additions
   6. Memorable quote
   ========================================================================== */

/* The header sits over the hero, so the page must not add space above it */
.page-home .site-main { margin-top: calc(var(--header-height) * -1); }

/* 1. Hero
   ==========================================================================
   Built around the series key art. The three agents occupy the centre and
   right of the frame, so on wide screens the copy sits in a left column
   behind a directional scrim; narrow screens switch to a portrait crop of
   the agents with the copy stacked underneath. */

.hero {
    position: relative;
    display: block;
    padding-bottom: var(--space-8);
    overflow: hidden;
    isolation: isolate;
}

/* On narrow screens the artwork is a band at the top of the hero; from 900px
   up it becomes the full-bleed backdrop. The scrim and glow live inside this
   element so they track it in both modes. */
.hero__media {
    position: relative;
    z-index: -2;
    aspect-ratio: 4 / 5;
    background: var(--ink-900);
}

.hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 12%;
    filter: brightness(1.06) saturate(1.04);
}

/* Scrim: vertical while the artwork is a band, so it lands on solid ink. */
.hero__veil {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(4, 9, 11, 0.72) 0%,
            rgba(4, 9, 11, 0.12) 16%,
            rgba(4, 9, 11, 0.18) 52%,
            rgba(4, 9, 11, 0.78) 84%,
            var(--ink-900) 100%);
}

/* Plasm-green wash lifted from the rapiers and the spirit jar */
.hero__glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(45% 40% at 22% 62%, rgba(166, 232, 79, 0.10), transparent 70%),
        radial-gradient(40% 45% at 82% 30%, rgba(70, 214, 189, 0.08), transparent 70%);
    pointer-events: none;
}

.hero__inner {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
    /* Overlaps the foot of the artwork so the copy rises out of the scrim */
    margin-top: calc(var(--space-7) * -1);
    text-align: center;
}

.hero__copy { max-width: 34rem; margin-inline: auto; }

.hero__title {
    font-size: clamp(2.5rem, 7.5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--fog-100);
    text-shadow:
        0 2px 24px rgba(0, 0, 0, 0.85),
        0 0 80px rgba(70, 214, 189, 0.18);
}

/* Keeps the break as LOCKWOOD / & CO. rather than orphaning the ampersand */
.hero__title-tail { white-space: nowrap; }

.hero__title .amp {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    text-transform: none;
    color: var(--accent);
    letter-spacing: 0;
}

.hero__rule {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    justify-content: center;
    margin-block: var(--space-5);
}

.hero__rule::before,
.hero__rule::after {
    content: "";
    flex: 1;
    max-width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-strong));
}

.hero__rule::after { background: linear-gradient(90deg, var(--line-strong), transparent); }

.hero__rule span {
    width: 7px;
    height: 7px;
    flex: none;
    background: var(--plasm);
    transform: rotate(45deg);
    box-shadow: 0 0 14px var(--plasm-glow);
}

.hero__lede {
    color: var(--fog-100);
    font-family: var(--font-serif);
    font-size: clamp(1.2rem, 2.4vw, 1.6rem);
    font-style: italic;
    line-height: 1.4;
    text-wrap: balance;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.75);
}

.hero__text {
    margin-top: var(--space-4);
    color: var(--fog-300);
    font-size: var(--text-base);
    line-height: 1.75;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.hero__scroll {
    position: absolute;
    left: 50%;
    bottom: var(--space-4);
    transform: translateX(-50%);
    display: inline-grid;
    justify-items: center;
    gap: 0.5rem;
    color: var(--fog-500);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    transition: color var(--duration) var(--ease);
}

.hero__scroll:hover { color: var(--accent); }

.hero__scroll::after {
    content: "";
    width: 1px;
    height: 36px;
    background: linear-gradient(180deg, var(--line-strong), transparent);
    animation: scroll-cue 2.4s var(--ease) infinite;
    transform-origin: top;
}

@keyframes scroll-cue {
    0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
    50%      { transform: scaleY(1);   opacity: 1; }
}

.hero__scroll { display: none; }

/* Tablets: a wider band, since there is room for more of the frame */
@media (min-width: 560px) {
    .hero__media { aspect-ratio: 16 / 11; }
    .hero__media img { object-position: center 20%; }
}

/* ---------------------------------------------------------------------------
   Wide screens: the artwork goes full-bleed behind the whole hero, the copy
   moves into the empty left third of the frame, and the scrim turns
   directional so all three agents stay visible on the right.
   --------------------------------------------------------------------------- */
@media (min-width: 900px) {
    .hero {
        display: grid;
        align-items: center;
        min-height: min(94vh, 960px);
        padding-block: calc(var(--header-height) + var(--space-7)) var(--space-8);
    }

    .hero__media {
        position: absolute;
        inset: 0;
        aspect-ratio: auto;
    }

    /* Favours the left of the frame, nudging the agents rightwards
       and clear of the copy column. */
    .hero__media img { object-position: 22% center; }

    .hero__inner {
        margin-top: 0;
        text-align: left;
    }

    .hero__copy { max-width: 33rem; margin-inline: 0; }

    .hero__veil {
        background:
            linear-gradient(96deg,
                rgba(4, 9, 11, 0.92) 0%,
                rgba(4, 9, 11, 0.8) 22%,
                rgba(4, 9, 11, 0.42) 38%,
                rgba(4, 9, 11, 0.08) 54%,
                rgba(4, 9, 11, 0.02) 70%,
                rgba(4, 9, 11, 0.28) 100%),
            linear-gradient(180deg,
                rgba(4, 9, 11, 0.55) 0%,
                transparent 18%,
                transparent 60%,
                rgba(4, 9, 11, 0.7) 88%,
                var(--ink-900) 100%);
    }

    .hero__rule { justify-content: flex-start; }
    .hero__rule::before { display: none; }
    .hero__rule::after { max-width: 200px; }

    .hero__actions { justify-content: flex-start; }

    .hero__scroll {
        display: inline-grid;
        left: var(--gutter);
        transform: none;
        justify-items: start;
    }
}

/* 2. Featured sections
   ========================================================================== */

.featured__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
    gap: var(--space-5);
}

.feature-card {
    position: relative;
    display: grid;
    align-content: start;
    gap: var(--space-3);
    padding: var(--space-6);
    background:
        linear-gradient(160deg, rgba(28, 58, 65, 0.55), rgba(10, 25, 30, 0.85));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    isolation: isolate;
    transition: transform var(--duration) var(--ease),
                border-color var(--duration) var(--ease),
                box-shadow var(--duration) var(--ease);
}

/* Lamp-glow that warms the card on hover */
.feature-card::before {
    content: "";
    position: absolute;
    inset: -40% 45% 55% -10%;
    z-index: -1;
    background: radial-gradient(circle, var(--accent-glow), transparent 68%);
    opacity: 0;
    transition: opacity 420ms var(--ease);
}

.feature-card:hover,
.feature-card:focus-within {
    transform: translateY(-5px);
    border-color: rgba(70, 214, 189, 0.35);
    box-shadow: var(--shadow);
}

.feature-card:hover::before,
.feature-card:focus-within::before { opacity: 1; }

.feature-card__icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: var(--space-2);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: rgba(4, 9, 11, 0.5);
    color: var(--accent);
    transition: color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}

.feature-card__icon svg { width: 22px; height: 22px; }

.feature-card:hover .feature-card__icon {
    color: var(--plasm);
    border-color: rgba(166, 232, 79, 0.4);
}

.feature-card__title {
    font-size: var(--text-xl);
    letter-spacing: 0.02em;
}

/* Stretched link keeps the whole card clickable without nesting anchors */
.feature-card__title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.feature-card__meta {
    color: var(--fog-500);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

.feature-card__blurb {
    color: var(--fog-400);
    font-size: var(--text-sm);
}

.feature-card__cue {
    margin-top: var(--space-2);
    color: var(--accent);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.feature-card:hover .feature-card__cue,
.feature-card:focus-within .feature-card__cue {
    opacity: 1;
    transform: none;
}

@media (hover: none) {
    .feature-card__cue { opacity: 1; transform: none; }
}

/* 3. Discover Yourself
   ========================================================================== */

.discover {
    position: relative;
    overflow: hidden;
}

.discover::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 70% at 15% 20%, rgba(166, 232, 79, 0.10), transparent 62%),
        radial-gradient(55% 70% at 85% 80%, rgba(70, 214, 189, 0.09), transparent 62%);
    pointer-events: none;
}

.discover__inner {
    position: relative;
    display: grid;
    gap: var(--space-7);
    align-items: center;
}

.discover__copy .section-head { margin-bottom: 0; }

.discover__title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
}

.discover__text {
    color: var(--fog-400);
    font-size: var(--text-lg);
}

.discover__list { display: grid; gap: var(--space-4); }

.quiz-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5);
    background: rgba(10, 25, 30, 0.72);
    border: 1px solid var(--line);
    border-left: 2px solid rgba(166, 232, 79, 0.35);
    border-radius: var(--radius);
    transition: background var(--duration) var(--ease),
                border-color var(--duration) var(--ease),
                transform var(--duration) var(--ease);
}

.quiz-card:hover,
.quiz-card:focus-within {
    background: rgba(16, 40, 47, 0.9);
    border-left-color: var(--plasm);
    transform: translateX(4px);
}

.quiz-card__index {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--plasm);
    letter-spacing: 0.08em;
}

.quiz-card__title {
    font-size: var(--text-lg);
    margin-bottom: 0.15rem;
}

.quiz-card__title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.quiz-card__blurb {
    color: var(--fog-500);
    font-size: var(--text-sm);
    line-height: 1.55;
}

.quiz-card__go {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: none;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    color: var(--fog-300);
    transition: background var(--duration) var(--ease),
                border-color var(--duration) var(--ease),
                color var(--duration) var(--ease),
                transform var(--duration) var(--ease);
}

.quiz-card:hover .quiz-card__go {
    background: rgba(166, 232, 79, 0.12);
    border-color: var(--plasm);
    color: var(--plasm);
    transform: translateX(3px);
}

@media (min-width: 940px) {
    .discover__inner { grid-template-columns: 0.85fr 1.15fr; gap: var(--space-8); }
}

/* 4. Character spotlight
   ========================================================================== */

.spotlight__frame {
    display: grid;
    gap: 0;
    background: linear-gradient(150deg, rgba(20, 44, 51, 0.85), rgba(7, 18, 22, 0.95));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.spotlight__portrait {
    position: relative;
    aspect-ratio: 4 / 5;
    background: linear-gradient(160deg, #16333a, #071216);
    overflow: hidden;
}

/* Absolute so the portrait fills the cell whether it is sized by the
   aspect-ratio above or stretched by the grid row on wide screens. */
.spotlight__portrait picture {
    position: absolute;
    inset: 0;
    display: block;
}

.spotlight__portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Faces sit high in all three source frames */
    object-position: center top;
    /* Cooled a touch to sit with the palette, without dulling the photograph */
    filter: saturate(0.94) contrast(1.03) brightness(0.97);
}

/* Placeholder monogram, shown when no portrait file is supplied */
.spotlight__monogram {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: clamp(4.5rem, 15vw, 9rem);
    font-weight: 700;
    color: rgba(238, 244, 243, 0.10);
    letter-spacing: 0.05em;
    text-shadow: 0 0 60px rgba(166, 232, 79, 0.12);
    user-select: none;
}

/* Ruled frame and file reference, so the empty plate reads as a case record */
.spotlight__plate {
    position: absolute;
    inset: var(--space-5);
    z-index: 1;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3);
    border: 1px solid rgba(206, 228, 227, 0.10);
    color: var(--fog-600);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
}

/* Corner ticks on the frame */
.spotlight__plate::before,
.spotlight__plate::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    border: 1px solid rgba(70, 214, 189, 0.45);
}

.spotlight__plate::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.spotlight__plate::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.spotlight__plate-ref { color: var(--accent); }

.spotlight__portrait::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(80% 60% at 50% 0%, rgba(166, 232, 79, 0.14), transparent 65%),
        linear-gradient(180deg, transparent 45%, rgba(7, 18, 22, 0.85) 100%);
}

.spotlight__body {
    display: grid;
    align-content: center;
    gap: var(--space-4);
    padding: clamp(1.75rem, 4vw, 3rem);
}

.spotlight__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.spotlight__name {
    font-size: clamp(2rem, 4.5vw, 2.75rem);
    letter-spacing: 0.02em;
}

.spotlight__tagline {
    color: var(--fog-100);
    font-family: var(--font-serif);
    font-size: clamp(1.125rem, 2.2vw, 1.375rem);
    font-style: italic;
    line-height: 1.5;
}

.spotlight__blurb {
    color: var(--fog-400);
    font-size: var(--text-base);
}

.spotlight__facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-4);
    padding-block: var(--space-4);
    border-block: 1px solid var(--line);
}

.spotlight__facts dt {
    color: var(--fog-600);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}

.spotlight__facts dd {
    margin: 0;
    color: var(--fog-200);
    font-size: var(--text-sm);
    font-weight: 500;
}

.spotlight__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-4);
    margin-top: var(--space-1);
}

.spotlight__note {
    color: var(--fog-600);
    font-size: var(--text-xs);
}

@media (min-width: 880px) {
    /* Kept fairly narrow: the source portraits are small, and a wider column
       would upscale them past the point where they hold up. */
    .spotlight__frame { grid-template-columns: minmax(240px, 0.66fr) 1.34fr; }
    .spotlight__portrait { aspect-ratio: auto; min-height: 100%; }
}

/* 5. Latest additions
   ========================================================================== */

.latest__head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.latest__head .section-head { margin-bottom: 0; }

.latest__list {
    display: grid;
    border-top: 1px solid var(--line);
    /* Contains the rows' negative-z hover wash, which would otherwise fall
       behind the section background and never show. */
    isolation: isolate;
}

.latest-item {
    position: relative;
    display: grid;
    gap: var(--space-2);
    padding-block: var(--space-5);
    border-bottom: 1px solid var(--line);
    transition: background var(--duration) var(--ease);
}

.latest-item::before {
    content: "";
    position: absolute;
    left: calc(var(--space-4) * -1);
    right: calc(var(--space-4) * -1);
    top: 0;
    bottom: 0;
    z-index: -1;
    border-radius: var(--radius);
    background: linear-gradient(90deg, rgba(70, 214, 189, 0.06), transparent 70%);
    opacity: 0;
    transition: opacity var(--duration) var(--ease);
}

.latest-item:hover::before { opacity: 1; }

.latest-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
}

.latest-item__date {
    color: var(--fog-600);
    font-size: var(--text-xs);
    letter-spacing: 0.04em;
}

.latest-item__title {
    font-size: var(--text-xl);
    transition: color var(--duration) var(--ease);
}

.latest-item__title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.latest-item:hover .latest-item__title { color: var(--accent); }

.latest-item__blurb {
    max-width: 78ch;
    color: var(--fog-500);
    font-size: var(--text-sm);
}

@media (min-width: 780px) {
    .latest-item {
        grid-template-columns: 190px 1fr;
        gap: var(--space-5);
        align-items: baseline;
    }

    .latest-item__meta { flex-direction: column; align-items: start; gap: var(--space-2); }
    .latest-item__body { display: grid; gap: var(--space-2); }
}

/* 6. Memorable quote
   ========================================================================== */

.quote-section {
    position: relative;
    padding-block: var(--section-y);
    background:
        linear-gradient(180deg, var(--ink-900), rgba(10, 25, 30, 0.9), var(--ink-900));
    border-top: 1px solid var(--line);
    overflow: hidden;
}

.quote-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(70% 100% at 50% 50%, rgba(166, 232, 79, 0.07), transparent 68%);
    pointer-events: none;
}

.quote-block {
    position: relative;
    max-width: 46rem;
    margin-inline: auto;
    text-align: center;
}

.quote-block__mark {
    display: block;
    font-family: var(--font-serif);
    font-size: 5rem;
    line-height: 0.6;
    color: rgba(70, 214, 189, 0.28);
    margin-bottom: var(--space-4);
    user-select: none;
}

.quote-block__text {
    color: var(--fog-100);
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3.6vw, 2.25rem);
    font-style: italic;
    line-height: 1.45;
    text-wrap: balance;
}

.quote-block__attribution {
    display: grid;
    gap: var(--space-1);
    margin-top: var(--space-5);
    font-style: normal;
}

.quote-block__author {
    color: var(--accent);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
}

.quote-block__source {
    color: var(--fog-600);
    font-size: var(--text-xs);
    letter-spacing: 0.04em;
}

.quote-block__refresh {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    margin-top: var(--space-6);
    color: var(--fog-500);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    transition: color var(--duration) var(--ease);
}

.quote-block__refresh:hover { color: var(--plasm); }

.quote-block__refresh svg {
    width: 14px;
    height: 14px;
    transition: transform 500ms var(--ease);
}

.quote-block__refresh:hover svg { transform: rotate(-180deg); }

/* Fade used when JS swaps the quote in place */
.quote-block__quote { transition: opacity 260ms var(--ease); }
.quote-block.is-swapping .quote-block__quote { opacity: 0; }
