:root {

    --asili-green: #35351f;
    --asili-gold: #855e26;
    --asili-milk: #e4d6c5;
    --asili-bg: #34321e;

    --animal-green: #35351f;
    --animal-gold: #855e26;
    --animal-milk: #e4d6c5;
    --animal-bg: #34321e;

    --animal-text: #35351f;
    --animal-muted: #746b5c;
    --animal-border: rgba(53, 53, 31, .18);
    --animal-light: #eee7dc;
}


/* =========================================================
   PAGE
   ========================================================= */

.animal-page {
    background: var(--animal-milk);
    color: var(--animal-text);
}


/* =========================================================
   HERO
   ========================================================= */

.animal-hero {
    position: relative;
    min-height: 680px;
    background: var(--animal-green);
    overflow: hidden;
}

.animal-hero__image {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.animal-hero__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}


/*
 * IMPORTANT:
 * The overlay is deliberately weaker on the
 * content/title side so the image does not visually
 * swallow the typography.
 */

.animal-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            rgba(53, 53, 31, .92) 0%,
            rgba(53, 53, 31, .72) 27%,
            rgba(53, 53, 31, .30) 58%,
            rgba(53, 53, 31, .08) 100%
        );
}

.animal-hero__content {
    position: relative;
    z-index: 2;

    min-height: 680px;

    display: flex;
    align-items: flex-end;

    padding: 70px 6vw;

    box-sizing: border-box;
}

.animal-hero__copy {
    position: relative;
    z-index: 3;

    max-width: 760px;
    padding-bottom: 10px;
}

.animal-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 18px;

    color: var(--animal-gold);

    font-size: 11px;
    font-weight: 900;

    text-transform: uppercase;
    letter-spacing: 2px;
}

.animal-kicker::before {
    content: '';

    width: 9px;
    height: 9px;

    flex: 0 0 9px;

    background: var(--animal-gold);
}

.animal-hero h1 {
    position: relative;
    z-index: 4;

    margin: 0;

    color: var(--animal-milk);

    font-family:
        Georgia,
        'Times New Roman',
        serif;

    font-size:
        clamp(
            58px,
            9vw,
            125px
        );

    line-height: .88;
    letter-spacing: -5px;

    text-shadow:
        0 3px 18px rgba(0, 0, 0, .25);
}

.animal-scientific {
    margin-top: 24px;

    color: rgba(228, 214, 197, .86);

    font-family:
        Georgia,
        'Times New Roman',
        serif;

    font-size: 22px;
    font-style: italic;
}

.animal-hero__description {
    max-width: 700px;

    margin-top: 25px;

    color: rgba(228, 214, 197, .90);

    font-size: 17px;
    line-height: 1.7;
}


/* =========================================================
   CLASSIFICATION
   ========================================================= */

.animal-classification {
    background: var(--animal-gold);

    border-bottom:
        1px solid var(--animal-green);
}

.animal-classification__inner {
    max-width: 1250px;

    margin: 0 auto;

    display: grid;

    grid-template-columns:
        repeat(5, 1fr);
}

.animal-classification__item {
    padding: 22px 20px;

    border-right:
        1px solid rgba(228, 214, 197, .25);
}

.animal-classification__item:last-child {
    border-right: 0;
}

.animal-classification__label {
    display: block;

    margin-bottom: 5px;

    color: var(--animal-milk);

    font-size: 9px;
    font-weight: 900;

    text-transform: uppercase;
    letter-spacing: 1.3px;
}

.animal-classification__value {
    color: var(--animal-milk);

    font-size: 14px;
    font-weight: 800;

    line-height: 1.4;
}


/* =========================================================
   CONTENT
   ========================================================= */

.animal-content {
    max-width: 1250px;

    margin: 0 auto;

    padding:
        80px 30px 100px;

    box-sizing: border-box;
}

.animal-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        330px;

    gap: 80px;
}

.animal-main {
    min-width: 0;
}

.animal-section {
    padding:
        0 0 55px;

    margin-bottom: 55px;

    border-bottom:
        1px solid var(--animal-border);
}

.animal-section:last-child {
    border-bottom: 0;
}

.animal-section__kicker {
    margin-bottom: 9px;

    color: var(--animal-gold);

    font-size: 10px;
    font-weight: 900;

    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.animal-section h2 {
    margin: 0 0 22px;

    color: var(--animal-green);

    font-family:
        Georgia,
        'Times New Roman',
        serif;

    font-size: 40px;

    line-height: 1;
    letter-spacing: -1.5px;
}

.animal-section h2::before {
    content: '';

    display: inline-block;

    width: 8px;
    height: 31px;

    margin-right: 12px;

    background: var(--animal-gold);

    vertical-align: -3px;
}

.animal-section p {
    max-width: 780px;

    margin: 0;

    color: #514d43;

    font-size: 17px;
    line-height: 1.85;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.animal-sidebar {
    align-self: start;

    position: sticky;
    top: 30px;
}

.animal-fact-box {
    border:
        1px solid var(--animal-green);

    background:
        var(--animal-milk);
}

.animal-fact-box__header {
    padding: 18px 20px;

    background:
        var(--animal-green);

    color:
        var(--animal-milk);

    font-size: 11px;
    font-weight: 900;

    text-transform: uppercase;
    letter-spacing: 1px;
}

.animal-fact {
    padding: 17px 20px;

    border-bottom:
        1px solid var(--animal-border);
}

.animal-fact:last-child {
    border-bottom: 0;
}

.animal-fact__label {
    display: block;

    margin-bottom: 5px;

    color: var(--animal-gold);

    font-size: 9px;
    font-weight: 900;

    text-transform: uppercase;
    letter-spacing: 1px;
}

.animal-fact__value {
    color: var(--animal-green);

    font-size: 14px;
    line-height: 1.45;
}

.conservation-status {
    margin-top: 25px;

    padding: 20px;

    background:
        var(--animal-gold);
}

.conservation-status__label {
    display: block;

    margin-bottom: 6px;

    color: var(--animal-milk);

    font-size: 9px;
    font-weight: 900;

    text-transform: uppercase;
    letter-spacing: 1px;
}

.conservation-status strong {
    display: block;

    color: var(--animal-milk);

    font-size: 21px;
    line-height: 1.25;
}


/* =========================================================
   RELATED
   ========================================================= */

.animal-related {
    background:
        var(--animal-bg);

    padding:
        80px 30px 100px;

    box-sizing: border-box;
}

.animal-related__inner {
    max-width: 1250px;

    margin: 0 auto;
}

.animal-related__heading {
    display: flex;

    justify-content: space-between;
    align-items: flex-end;

    gap: 25px;

    margin-bottom: 35px;
}

.animal-related__heading span {
    display: block;

    margin-bottom: 8px;

    color: var(--animal-gold);

    font-size: 10px;
    font-weight: 900;

    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.animal-related__heading h2 {
    margin: 0;

    color: var(--animal-milk);

    font-family:
        Georgia,
        'Times New Roman',
        serif;

    font-size: 45px;
    line-height: 1;

    letter-spacing: -2px;
}

.animal-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 22px;
}

.animal-card {
    min-width: 0;

    overflow: hidden;

    background:
        var(--animal-milk);
}

.animal-card__image {
    display: block;

    aspect-ratio: 4 / 3;

    overflow: hidden;

    background:
        var(--animal-green);
}

.animal-card__image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform .4s ease;
}

.animal-card:hover
.animal-card__image img {
    transform:
        scale(1.04);
}

.animal-card__body {
    padding:
        18px 18px 22px;
}

.animal-card__status {
    margin-bottom: 8px;

    color: var(--animal-gold);

    font-size: 9px;
    font-weight: 900;

    text-transform: uppercase;
    letter-spacing: 1px;
}

.animal-card h3 {
    margin: 0;

    font-family:
        Georgia,
        'Times New Roman',
        serif;

    font-size: 25px;
    line-height: 1.05;
}

.animal-card h3 a {
    color: var(--animal-green);

    text-decoration: none;
}

.animal-card__scientific {
    margin-top: 8px;

    color: var(--animal-muted);

    font-family:
        Georgia,
        'Times New Roman',
        serif;

    font-size: 13px;
    font-style: italic;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .animal-hero {
        min-height: 620px;
    }

    .animal-hero__content {
        min-height: 620px;

        padding:
            60px 40px;
    }

    .animal-layout {
        grid-template-columns:
            minmax(0, 1fr)
            280px;

        gap: 45px;
    }

    .animal-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .animal-classification__inner {
        grid-template-columns:
            repeat(3, 1fr);
    }

    .animal-classification__item:nth-child(3n) {
        border-right: 0;
    }

    .animal-classification__item:nth-child(n + 4) {
        border-top:
            1px solid rgba(228, 214, 197, .25);
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 760px) {

    .animal-hero {
        min-height: 590px;
    }

    /*
     * Mobile overlay becomes vertical rather than horizontal.
     * This keeps the title area dark enough while allowing
     * the upper image to remain visible.
     */

    .animal-hero__overlay {
        background:
            linear-gradient(
                180deg,
                rgba(53, 53, 31, .18) 0%,
                rgba(53, 53, 31, .20) 32%,
                rgba(53, 53, 31, .70) 68%,
                rgba(53, 53, 31, .96) 100%
            );
    }

    .animal-hero__content {
        min-height: 590px;

        align-items: flex-end;

        padding:
            35px 22px 42px;
    }

    .animal-hero__copy {
        max-width: 100%;
        width: 100%;

        padding-bottom: 0;
    }

    .animal-kicker {
        margin-bottom: 14px;

        font-size: 10px;
        letter-spacing: 1.6px;
    }

    .animal-hero h1 {
        font-size:
            clamp(
                48px,
                15vw,
                76px
            );

        line-height: .92;

        letter-spacing:
            -3px;

        max-width: 100%;

        overflow-wrap: anywhere;
    }

    .animal-scientific {
        margin-top: 17px;

        font-size: 18px;
        line-height: 1.35;
    }

    .animal-hero__description {
        margin-top: 18px;

        max-width: 100%;

        font-size: 15px;
        line-height: 1.65;

        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;

        overflow: hidden;
    }


    /* Classification */

    .animal-classification__inner {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .animal-classification__item {
        min-width: 0;

        padding:
            17px 15px;
    }

    .animal-classification__item:nth-child(3n) {
        border-right:
            1px solid rgba(228, 214, 197, .25);
    }

    .animal-classification__item:nth-child(2n) {
        border-right: 0;
    }

    .animal-classification__item:nth-child(n + 3) {
        border-top:
            1px solid rgba(228, 214, 197, .25);
    }

    .animal-classification__label {
        font-size: 8px;
        letter-spacing: 1px;
    }

    .animal-classification__value {
        font-size: 13px;
    }


    /* Content */

    .animal-content {
        padding:
            55px 20px 70px;
    }

    .animal-layout {
        display: flex;
        flex-direction: column;

        gap: 45px;
    }

    .animal-sidebar {
        position: static;
        width: 100%;
    }

    .animal-section {
        padding-bottom: 40px;
        margin-bottom: 40px;
    }

    .animal-section__kicker {
        font-size: 9px;
    }

    .animal-section h2 {
        font-size:
            clamp(
                30px,
                9vw,
                38px
            );

        line-height: 1.05;

        letter-spacing: -1px;
    }

    .animal-section h2::before {
        width: 6px;
        height: 26px;

        margin-right: 9px;
    }

    .animal-section p {
        font-size: 16px;
        line-height: 1.75;
    }


    /* Sidebar */

    .animal-fact-box__header {
        padding:
            16px 17px;
    }

    .animal-fact {
        padding:
            15px 17px;
    }

    .animal-fact__value {
        font-size: 14px;
    }

    .conservation-status {
        margin-top: 18px;
    }


    /* Related */

    .animal-related {
        padding:
            55px 20px 70px;
    }

    .animal-related__heading {
        align-items: flex-start;

        flex-direction: column;

        margin-bottom: 25px;
    }

    .animal-related__heading h2 {
        font-size:
            clamp(
                34px,
                10vw,
                44px
            );
    }

    .animal-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 14px;
    }

    .animal-card__body {
        padding:
            14px 13px 17px;
    }

    .animal-card h3 {
        font-size: 21px;
    }

    .animal-card__scientific {
        font-size: 12px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .animal-hero {
        min-height: 550px;
    }

    .animal-hero__content {
        min-height: 550px;

        padding:
            28px 18px 34px;
    }

    .animal-hero__overlay {
        background:
            linear-gradient(
                180deg,
                rgba(53, 53, 31, .12) 0%,
                rgba(53, 53, 31, .18) 25%,
                rgba(53, 53, 31, .76) 65%,
                rgba(53, 53, 31, .97) 100%
            );
    }

    .animal-hero h1 {
        font-size:
            clamp(
                44px,
                14vw,
                62px
            );

        letter-spacing:
            -2.5px;
    }

    .animal-scientific {
        font-size: 16px;
    }

    .animal-hero__description {
        font-size: 14px;

        -webkit-line-clamp: 3;
    }


    /* Classification becomes one column */

    .animal-classification__inner {
        grid-template-columns: 1fr;
    }

    .animal-classification__item,
    .animal-classification__item:nth-child(3n),
    .animal-classification__item:nth-child(2n) {
        border-right: 0;
        border-top: 0;

        border-bottom:
            1px solid rgba(228, 214, 197, .25);
    }

    .animal-classification__item:last-child {
        border-bottom: 0;
    }


    /* Content */

    .animal-content {
        padding:
            45px 18px 60px;
    }

    .animal-section h2 {
        font-size: 30px;
    }

    .animal-section p {
        font-size: 15px;
        line-height: 1.72;
    }


    /* Related cards */

    .animal-related {
        padding:
            45px 18px 60px;
    }

    .animal-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .animal-card__image {
        aspect-ratio: 16 / 10;
    }

    .animal-card h3 {
        font-size: 24px;
    }

}


/* =========================================================
   VERY SMALL DEVICES
   ========================================================= */

@media (max-width: 360px) {

    .animal-hero h1 {
        font-size: 42px;
    }

    .animal-hero__description {
        font-size: 13px;
    }

    .animal-section h2 {
        font-size: 28px;
    }

}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .animal-card__image img {
        transition: none;
    }

}


/*
|--------------------------------------------------------------------------
| Animal Quill Editor
|--------------------------------------------------------------------------
*/

.animal-quill-editor {
    width: 100%;
    background: #fff;
}

.animal-quill-editor .ql-toolbar {
    border: 1px solid #ccc;
    border-bottom: 0;
    background: #fafafa;
}

.animal-quill-editor .ql-container {
    min-height: 320px;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 14px;
}

.animal-quill-editor .ql-editor {
    min-height: 320px;
    padding: 18px;
    color: #222;
    line-height: 1.7;
}

.animal-quill-editor .ql-editor:focus {
    box-shadow:
        0 0 0 2px
        rgba(255, 204, 0, .25);
}

.animal-quill-editor .ql-editor img {
    max-width: 100%;
    height: auto;
}

.animal-quill-editor .ql-editor a {
    color: #0066cc;
}

.animal-quill-editor .ql-editor blockquote {
    border-left: 4px solid #ffcc00;
    margin: 15px 0;
    padding-left: 15px;
}

.animal-quill-editor .ql-editor pre {
    background: #111;
    color: #fff;
    padding: 15px;
    border-radius: 0;
}


.animal-quill-wrapper .ql-container {
    height: 340px;
    min-height: 340px;
    max-height: 340px;
    border: 0;
}

.animal-quill-wrapper .ql-editor {
    height: 100%;
    min-height: 100%;
    max-height: 100%;

    overflow-y: auto;
    overflow-x: hidden;
}
