/* Homepage only. Shared palette, widths and shell remain owned by app.css. */
.fk-home__stage {
    position: relative;
    isolation: isolate;
    background: var(--fk-home-depth);
    color: #f5fbff;
}

.fk-home-focus.fk-home__section {
    position: relative;
    z-index: 1;
    padding-block: 1rem clamp(4rem, 8vw, 7rem);
    color: #f5fbff;
    --fk-muted: #c7dde9;
    --fk-accent-strong: #a2edfa;
}

.fk-home-focus__all,
.fk-home-focus__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #c0f4ff;
    text-underline-offset: 0.25em;
}

.fk-home-focus__heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 2rem;
    margin-bottom: 1.5rem;
}

.fk-home-focus__heading .fk-home__section-heading { margin-bottom: 0; }
.fk-home-focus__all { flex-shrink: 0; }

.fk-home-focus__stories {
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.fk-home-focus__story {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: clamp(1.5rem, 4vw, 4rem);
}

.fk-home-focus__story:nth-child(even) .fk-home-focus__media {
    grid-column: 2;
    grid-row: 1;
}

.fk-home-focus__story:nth-child(even) .fk-home-focus__information {
    position: relative;
    grid-column: 1;
    grid-row: 1;
}

.fk-home-focus__media {
    min-width: 0;
    display: flex;
    justify-content: center;
    filter: drop-shadow(0 8px 18px rgba(0, 14, 22, 0.22));
}

.fk-home-focus__image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: clamp(320px, 36vw, 480px);
    object-fit: contain;
    border-radius: 20px;
}

.fk-home-focus__information {
    position: relative;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    align-self: center;
    padding: clamp(1.25rem, 2vw, 2rem);
    border: 1px solid rgba(199, 241, 255, 0.24);
    border-radius: 20px;
    background: linear-gradient(
        135deg,
        rgba(77, 163, 193, 0.18),
        rgba(3, 30, 48, 0.38)
    );
    backdrop-filter: blur(3px) saturate(120%);
    -webkit-backdrop-filter: blur(3px) saturate(120%);
    box-shadow: 0 6px 20px rgba(0, 14, 22, 0.12), inset 0 1px 0 rgba(225, 249, 255, 0.15);
    text-shadow: 0 1px 3px rgba(0, 15, 30, 0.65);
}

.fk-home .fk-home-focus__information h3 {
    margin-block: 0.6rem;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    font-weight: 600;
    text-wrap: balance;
}

.fk-home-focus__scientific { color: #edf8ff; }
.fk-home-focus__names { margin-top: 0.7rem; color: #cee5f1; font-size: 0.9rem; }

.fk-home-focus__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    margin: 0.8rem 0 0.25rem;
    list-style: none;
}

.fk-home-focus__badges li { min-width: 0; }

.fk-home-focus__badge {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    max-width: 100%;
    min-height: 30px;
    padding: 0.25rem 0.7rem;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: rgba(40, 120, 148, 0.22);
    color: #f5fbff;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.5;
    overflow-wrap: anywhere;
    text-decoration: none;
}

/* Keep group links above the extended Species link on the facts panel. */
a.fk-home-focus__badge,
a.fk-home-focus__badge:visited {
    position: relative;
    z-index: 1;
    color: #a2edfa;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}
a.fk-home-focus__badge:hover { color: #fff; }
a.fk-home-focus__badge:focus-visible {
    color: #fff;
    outline: 2px solid #c4f6ff;
    outline-offset: 3px;
}

.fk-home-focus__link { margin-top: 0.5rem; }
.fk-home-focus__link::after { content: ""; position: absolute; inset: 0; border-radius: 20px; }
.fk-home-focus__information:focus-within,
.fk-home-focus__media:focus-visible { outline: 2px solid #c4f6ff; outline-offset: 5px; border-radius: 20px; }
.fk-home-focus__all:hover,
.fk-home-focus__link:hover { color: #fff; }

.fk-home-focus__all:focus-visible,
.fk-home-focus__link:focus-visible {
    color: #fff;
    outline: 2px solid #c4f6ff;
    outline-offset: 4px;
    border-radius: 4px;
}

/* Adapt the Species photo's four-sided mist within the homepage namespace. */
@supports (mask-composite: intersect) or (-webkit-mask-composite: source-in) {
    .fk-home-focus__image {
        -webkit-mask-image:
            linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%),
            linear-gradient(180deg, transparent 0%, #000 10%, #000 86%, transparent 100%);
        -webkit-mask-composite: source-in;
        mask-image:
            linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%),
            linear-gradient(180deg, transparent 0%, #000 10%, #000 86%, transparent 100%);
        mask-composite: intersect;
    }
}

@media (max-width: 700px) {
    .fk-home-focus__story {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }
    .fk-home-focus__story:nth-child(even) .fk-home-focus__media,
    .fk-home-focus__story:nth-child(even) .fk-home-focus__information {
    position: relative;
        grid-column: auto;
        grid-row: auto;
    }
    .fk-home-focus__image {
        max-height: min(420px, 60svh);
    }
}

.fk-home {
    --fk-home-depth: #041e30;
    background: #f7fbfa;
    color: var(--fk-text);
}

.fk-home :where(h1, h2, h3, p) {
    margin: 0;
    overflow-wrap: break-word;
}

.fk-home h1 {
    max-width: 34ch;
    font-size: clamp(1.75rem, 3vw, 3rem);
    line-height: 1.14;
    font-weight: 500;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.fk-home h2 {
    font-size: clamp(1.45rem, 2.3vw, 2rem);
    line-height: 1.22;
    font-weight: 690;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.fk-home h3 {
    font-size: 1.1rem;
    line-height: 1.35;
    letter-spacing: -0.015em;
}

.fk-home__kicker {
    color: var(--fk-accent-strong);
    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.fk-home__hero {
    position: relative;

    box-sizing: border-box;
    padding-block: calc(64px + clamp(1.25rem, 2.5vw, 2.75rem)) clamp(1.75rem, 3.5vw, 3.5rem);
    color: #f5fbff;
    font-family: "Manrope", "Aptos", "Segoe UI Variable", "Segoe UI", sans-serif;
    font-weight: 450;
}

/* Keep search/autocomplete above the showcase while sharing the water backdrop. */
.fk-home__hero > .fk-wrap {
    position: relative;
    z-index: 3;
}

.fk-home__hero-copy {
    max-width: 850px;
    margin-block: 0.75rem 1.25rem;
    text-shadow: 0 1px 2px rgba(0, 10, 18, 0.65), 0 4px 16px rgba(0, 18, 32, 0.45);
}

.fk-home__lead {
    max-width: 58ch;
    margin-top: 1rem;
    color: #f0f7fc;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.7;
    font-weight: 500;
}

.fk-home__search {
    position: relative;
    max-width: 850px;
    padding: clamp(1rem, 2vw, 1.5rem);
    border: 1px solid rgba(188, 238, 255, 0.5);
    border-radius: var(--fk-panel-radius);
    background:
        radial-gradient(circle at 0% 0%, rgba(225, 252, 255, 0.30) 0%, rgba(120, 232, 255, 0.14) 18%, transparent 42%),
        radial-gradient(ellipse at 100% 10%, rgba(165, 242, 255, 0.22), transparent 60%),
        rgba(20, 105, 140, 0.24);
    backdrop-filter: blur(2px) saturate(140%);
    -webkit-backdrop-filter: blur(2px) saturate(140%);
    box-shadow: 0 12px 32px rgba(0, 20, 38, 0.16), 0 0 26px rgba(112, 225, 250, 0.1), inset 0 1px 0 rgba(239, 252, 255, 0.55);
    overflow: visible;
}


.fk-home__water,
.fk-home__water::after {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.fk-home__water {
    inset: 0 0 auto;
    aspect-ratio: 3 / 2;
    z-index: 0;
}

.fk-home__water img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.fk-home__water::after {
    content: "";
    background:
        linear-gradient(to bottom, transparent 60%, var(--fk-home-depth) 100%),
        linear-gradient(90deg, rgb(1 20 38 / 48%), rgba(1, 20, 38, 0.2) 100%);
}

.fk-home__hero .fk-home__kicker {
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 10, 18, 0.65), 0 4px 12px rgba(0, 18, 32, 0.4);
}

.fk-home__hero .fk-home__kicker,
.fk-home__hero .fk-home__shortcuts a {
    color: #a2edfa;
}

.fk-home__hero .fk-home__shortcut-label,
.fk-home__search .fk-search__hint {
    color: #d2e8f3;
}

.home .site-header__search .fk-search__label,
.fk-home__search .fk-search__label {
    color: #f5fbff;
    font-size: 0.875rem;
    font-weight: 550;
}

.fk-home__search .fk-search__input {
    background: rgba(2, 42, 67, 0.34);
    color: #fff;
    border-color: rgba(192, 235, 255, 0.65);
    box-shadow: inset 1px 1px 0 rgba(225, 252, 255, 0.55);
}

.fk-home__search .fk-search__input::placeholder {
    color: #ccdfeb;
    opacity: 1;
}

.fk-home__search .fk-search__input:hover {
    border-color: rgba(210, 245, 255, 0.85);
    box-shadow: inset 1px 1px 0 rgba(225, 252, 255, 0.65);
}

.fk-home__search .fk-search__input:focus-visible {
    outline: 2px solid #c4f6ff;
    outline-offset: 2px;
    border-color: #e2fbff;
    box-shadow: inset 1px 1px 0 rgba(225, 252, 255, 0.75), 0 0 18px rgba(120, 231, 255, 0.3);
}

.fk-home__search .fk-search__button {
    color: #fff;
    font-weight: 600;
    background: linear-gradient(160deg, rgba(125, 240, 250, 0.22), transparent 60%), rgba(0, 103, 123, 0.88);
    border-color: #c5f7ff;
    box-shadow: 0 0 22px rgba(83, 224, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.fk-home__search .fk-search__button:hover,
.fk-home__search .fk-search__button:focus-visible {
    background: linear-gradient(160deg, rgba(125, 240, 250, 0.28), transparent 60%), rgba(0, 115, 135, 0.88);
    box-shadow: 0 0 28px rgba(83, 224, 255, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.fk-home__search .fk-search__button:focus-visible {
    outline: 2px solid #e2fbff;
    outline-offset: 3px;
}

.fk-home__shortcuts,
.fk-home__shortcuts ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem 1rem;
}

.fk-home__shortcuts {
    margin-top: 0.75rem;
    font-size: 0.875rem;
}

.fk-home__shortcuts ul,
.fk-home__browse-grid,
.fk-home__method-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.fk-home__shortcut-label {
    color: var(--fk-muted);
}

.fk-home__shortcuts a,
.fk-home__text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    color: var(--fk-accent-strong);
    font-weight: 650;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
}

.fk-home__section {
    padding-block: clamp(2.5rem, 5vw, 4.5rem);
}

.fk-home__section-heading {
    margin-bottom: 1.5rem;
}

.fk-home__section-heading > * + * {
    margin-top: 0.5rem;
}

.fk-home__section-heading > p:not(.fk-home__kicker) {
    max-width: 64ch;
    color: var(--fk-muted);
}

.fk-home__browse {
    position: relative;
    isolation: isolate;
    display: grid;
    align-items: center;
    min-height: clamp(540px, 42vw, 650px);
    padding-block: clamp(5rem, 8vw, 7rem);
    color: #f5fbff;
    --fk-muted: #deeee9;
    --fk-accent: #b8f1ed;
}

.fk-home__aquascape,
.fk-home__aquascape::after { position: absolute; inset: 0; pointer-events: none; }
.fk-home__aquascape { z-index: -1; }
.fk-home__aquascape img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.fk-home__aquascape::after {
    content: "";
    background: linear-gradient(to bottom, var(--fk-home-depth), transparent 14%, transparent 86%, var(--fk-home-depth)), rgba(2, 24, 34, 0.05);
}
.fk-home__browse-glass {
    padding: clamp(1.25rem, 3vw, 2.5rem);
    border: 1px solid rgba(205, 241, 232, 0.4);
    border-radius: 20px;
    background: rgba(4, 35, 43, 0.32);
    backdrop-filter: blur(3px) saturate(115%);
    -webkit-backdrop-filter: blur(3px) saturate(115%);
    box-shadow: inset 0 1px 0 rgba(230, 255, 247, 0.2);
}

.fk-home__browse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
}

.fk-home__browse-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    padding: 1.25rem;
    border: 1px solid rgba(205, 241, 232, 0.4);
    border-radius: var(--fk-panel-radius);
    background: rgba(13, 56, 62, 0.38);
    box-shadow: 0 5px 14px rgba(23, 33, 29, 0.04);
    color: #f0fffc;
    text-decoration: none;
}

.fk-home__browse-link p {
    margin-block: 0.65rem 1rem;
    color: var(--fk-muted);
    font-size: 0.9rem;
}

.fk-home__browse-arrow {
    margin-top: auto;
    font-size: 1.2rem;
}

.fk-home__browse-link:hover {
    color: #f0fffc;
    border-color: var(--fk-accent);
    background: rgba(25, 83, 88, 0.6);
}

.fk-home__shortcuts a:focus-visible,
.fk-home__text-link:focus-visible,
.fk-home__browse-link:focus-visible {
    outline: 2px solid var(--fk-accent);
    outline-offset: 4px;
    border-radius: var(--fk-radius);
    box-shadow: var(--fk-focus-ring);
}

.fk-home__approach {
    color: #f5fbff;
    --fk-muted: #c7dde1;
    --fk-accent: #a2edfa;
    --fk-accent-strong: #a2edfa;
    font-family: "Manrope", "Aptos", "Segoe UI Variable", "Segoe UI", sans-serif;
    background:
        radial-gradient(ellipse at 32% 48%, rgba(57, 161, 169, 0.26), transparent 55%),
        radial-gradient(ellipse at 78% 35%, rgba(92, 164, 159, 0.14), transparent 60%),
        linear-gradient(to bottom, var(--fk-home-depth), #12343c);
}

.fk-home__approach-inner {
    display: grid;
    grid-template-columns: repeat(20, minmax(0, 1fr));
    align-items: center;
    isolation: isolate;
}

.fk-home__art {
    grid-column: 1 / 10;
    grid-row: 1;
    z-index: 0;
    pointer-events: none;
    display: grid;
    place-items: center;
    min-width: 0;
    filter: drop-shadow(0 12px 28px rgba(104, 197, 192, 0.18));
}

.fk-home__art picture {
    display: block;
    width: min(100%, 520px);
}

.fk-home__art img {
    display: block;
    width: 100%;
    height: auto;
}

.fk-home__editorial {
    grid-column: 7 / -1;
    grid-row: 1;
    z-index: 1;
    min-width: 0;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    padding-left: clamp(4rem, 8vw, 7rem);
    border: 1px solid rgba(195, 233, 234, 0.36);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(164, 223, 225, 0.12), rgba(3, 30, 48, 0.18));
    backdrop-filter: blur(3px) saturate(125%);
    -webkit-backdrop-filter: blur(3px) saturate(125%);
    box-shadow: inset 0 1px 0 rgba(223, 249, 245, 0.3), 0 12px 30px rgba(0, 14, 24, 0.16);
}

.fk-home__editorial > * + * {
    margin-top: 1rem;
}

.fk-home__editorial p:not(.fk-home__kicker) {
    max-width: 65ch;
    color: var(--fk-muted);
}

.fk-home .fk-home__method-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.5rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.fk-home__editorial .fk-home__text-link,
.fk-home__editorial .fk-home__text-link:visited {
    color: #a2edfa;
    text-decoration: underline;
}
.fk-home__editorial .fk-home__text-link:hover,
.fk-home__editorial .fk-home__text-link:focus-visible { color: #fff; }

@media (max-width: 900px) {

    .fk-home__lead {
        max-width: 64ch;
    }

    .fk-home__browse { min-height: 0; padding-block: 4rem; }
    .fk-home__approach { padding-top: 1rem; }
    .fk-home__approach-inner { grid-template-columns: minmax(0, 1fr); }
    .fk-home__art {
        grid-column: 1;
        grid-row: auto;
        width: min(100%, 340px);
        justify-self: center;
        margin-bottom: -7rem;
    }
    .fk-home__editorial {
        grid-column: 1;
        grid-row: auto;
        padding: 3rem clamp(1.25rem, 4vw, 2rem) 2rem;
    }
}

@media (max-width: 640px) {
    .fk-home__hero {
        padding-block: calc(64px + 1.25rem) 2rem;
    }

    .fk-home__water {
        aspect-ratio: auto;
        height: max(850px, 133.333vw);
    }

    .fk-home__water::after {
        background:
            linear-gradient(to bottom, transparent 60%, var(--fk-home-depth) 100%),
            linear-gradient(to bottom, rgba(1, 20, 38, 0.12) 0%, rgba(1, 20, 38, 0.12) 45%, transparent 75%),
            linear-gradient(90deg, rgb(1 20 38 / 48%), rgba(1, 20, 38, 0.2) 100%);
    }

    .fk-home__art {
        width: min(90vw, 380px, 100%);
        margin-bottom: calc(-1 * clamp(6rem, 24vw, 8rem));
    }

    .fk-home__browse-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fk-home__browse-link {
        padding: 1rem;
    }
}

@media (max-width: 420px) {
    .fk-home__browse-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .fk-home__lead {
        font-size: 1rem;
    }

    .fk-home__hero-copy {
        margin-bottom: 1.25rem;
    }

}
