:root {
    --dark: #101b16;
    --dark-soft: #17251e;
    --green: #b5d49a;
    --cream: #f4f2e9;
    --muted: #929d94;
    --font-body: "DM Sans", sans-serif;
    --font-heading: "Playfair Display", serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    background: var(--cream);
    color: var(--dark);
    font-family: var(--font-body);
}

a {
    color: inherit;
    text-decoration: none;
}

button, input {
    font: inherit;
}

button {
    cursor: pointer;
}

.navbar {
    height: 84px;
    background: var(--dark);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 7%;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 10;
}

.logo {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -1.5px;
}

.logo > span:last-child {
    color: var(--green);
}

.logo-icon {
    color: var(--green);
    margin-right: 5px;
}

.navbar nav {
    display: flex;
    gap: 38px;
}

.navbar nav a {
    font-size: 13px;
    color: #d1d8d2;
    transition: color 0.2s;
}

.navbar nav a:hover {
    color: var(--green);
}

.nav-button {
    padding: 13px 19px;
    border: 1px solid #526258;
    border-radius: 3px;
    font-size: 12px;
}

.nav-button span {
    color: var(--green);
    margin-left: 12px;
}

.menu-toggle {
    display: none;
    background: none;
    color: white;
    border: none;
    font-size: 24px;
}

.hero {
    min-height: 780px;
    height: 100vh;
    max-height: 1000px;
    background: url("https://images.unsplash.com/photo-1516426122078-c23e76319801?w=2000&q=90") center 45% / cover;
    color: white;
    position: relative;
    display: flex;
    align-items: center;
    padding: 120px 10% 80px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(9, 20, 14, 0.91) 0%, rgba(9, 20, 14, 0.62) 48%, rgba(9, 20, 14, 0.12) 100%), linear-gradient(0deg, rgba(9, 20, 14, 0.4), transparent 45%);
}

.hero-content {
    max-width: 680px;
    position: relative;
    z-index: 1;
}

.eyebrow, .section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.5px;
}

.eyebrow {
    color: var(--green);
    display: flex;
    align-items: center;
    gap: 12px;
}

.eyebrow span {
    width: 28px;
    height: 1px;
    background: var(--green);
}

.hero h1 {
    font: 700 clamp(58px, 7.5vw, 100px)/1.06 var(--font-heading);
    letter-spacing: -3px;
    margin: 30px 0 24px;
}

.hero h1 em, h2 em {
    color: var(--green);
    font-weight: 600;
}

.hero-content > p {
    max-width: 460px;
    color: #d0d8d1;
    font-size: 15px;
    line-height: 1.9;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 35px;
    margin-top: 38px;
}

.primary-button {
    background: var(--green);
    color: var(--dark);
    padding: 16px 23px;
    font-size: 12px;
    font-weight: 700;
    transition: background 0.2s;
}

.primary-button:hover {
    background: white;
}

.primary-button span {
    margin-left: 20px;
}

.text-button {
    font-size: 12px;
    color: white;
}

.text-button span {
    color: var(--green);
    margin-left: 8px;
}

.hero-stats {
    display: flex;
    gap: 48px;
    margin-top: 85px;
    padding-top: 25px;
    border-top: 1px solid #ffffff40;
    max-width: 580px;
}

.hero-stats div {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.hero-stats strong {
    font-size: 20px;
}

.hero-stats span {
    font-size: 10px;
    color: #bac4bd;
}

.hero-caption, .scroll-indicator {
    position: absolute;
    bottom: 32px;
    z-index: 2;
    font-size: 9px;
    letter-spacing: 2px;
    color: #dce5dd;
}

.hero-caption {
    right: 7%;
}

.scroll-indicator {
    left: 10%;
}

.scroll-indicator span {
    color: var(--green);
    margin-left: 10px;
}

.section-padding {
    padding: 110px 10%;
}

.intro {
    background: var(--cream);
}

.section-label {
    color: #788a78;
}

.intro-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 12%;
    margin-top: 40px;
    align-items: center;
}

.intro h2, .section-heading h2, .newsletter h2 {
    font: 600 clamp(39px, 5vw, 61px)/1.2 var(--font-heading);
    letter-spacing: -1.8px;
}

.intro h2 em, .section-heading h2 em, .newsletter h2 em {
    color: #79966a;
}

.intro-content > div > p {
    color: #6c766e;
    font-size: 14px;
    line-height: 1.9;
    margin-bottom: 17px;
}

.inline-link {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    margin-top: 12px;
    border-bottom: 1px solid #91a48a;
    padding-bottom: 8px;
}

.inline-link span {
    color: #79966a;
    margin-left: 18px;
}

.animals-section {
    background: #eaece3;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin: 28px 0 38px;
}

.section-heading h2 {
    font-size: clamp(36px, 4.5vw, 54px);
}

.section-heading > div > p {
    color: #778078;
    font-size: 13px;
    margin-top: 12px;
}

.animal-count {
    font-size: 10px;
    color: #788a78;
    letter-spacing: 1.5px;
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.filters {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
}

.filter {
    border: 1px solid #d2d8cd;
    background: transparent;
    padding: 10px 15px;
    font-size: 11px;
    color: #657067;
    transition: 0.2s;
}

.filter.active, .filter:hover {
    background: var(--dark);
    color: white;
    border-color: var(--dark);
}

.search-box {
    border-bottom: 1px solid #b7c0b3;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
}

.search-box span {
    font-size: 22px;
    color: #7a897a;
}

.search-box input {
    width: 155px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 12px;
    color: var(--dark);
}

.animal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 42px 25px;
}

.animal-card {
    min-width: 0;
}

.animal-image {
    position: relative;
    height: 265px;
    overflow: hidden;
    background: #d5dcd0;
}

.animal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.animal-card:hover .animal-image img {
    transform: scale(1.06);
}

.animal-tag, .animal-number {
    position: absolute;
    top: 15px;
    font-size: 9px;
    letter-spacing: 1px;
    padding: 8px 10px;
}

.animal-tag {
    left: 15px;
    background: #e8f0e0e8;
    color: var(--dark);
}

.animal-number {
    right: 15px;
    color: white;
    background: #101b1680;
}

.animal-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 19px;
}

.animal-info h3 {
    font: 600 22px var(--font-heading);
}

.animal-info div > span {
    display: block;
    font-size: 10px;
    font-style: italic;
    color: #899287;
    margin-top: 5px;
}

.animal-arrow {
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid #bdc8b8;
    border-radius: 50%;
    font-size: 16px;
    transition: 0.2s;
}

.animal-arrow:hover {
    background: var(--dark);
    color: white;
}

.animal-card > p {
    color: #7c857c;
    font-size: 12px;
    line-height: 1.8;
    margin-top: 13px;
}

.empty-state {
    padding: 50px 0;
    text-align: center;
    color: #798779;
    font-size: 14px;
}

.habitats-section {
    background: var(--dark);
    color: white;
}

.habitats-section .section-label {
    color: var(--green);
}

.habitats-section .section-heading {
    margin-bottom: 40px;
}

.habitats-section .section-heading > div > p {
    color: #a4b0a5;
}

.habitats-section .section-heading h2 em {
    color: var(--green);
}

.habitat-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    grid-template-rows: repeat(2, 245px);
    gap: 20px;
}

.habitat-card {
    position: relative;
    overflow: hidden;
    background: #26352a;
}

.habitat-large {
    grid-row: span 2;
}

.habitat-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.75;
    transition: transform 0.6s;
}

.habitat-card:hover img {
    transform: scale(1.05);
}

.habitat-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 30px;
    background: linear-gradient(transparent 20%, #0b160ec9);
}

.habitat-overlay > span {
    color: var(--green);
    font-size: 9px;
    letter-spacing: 2px;
}

.habitat-overlay h3 {
    font: 600 30px var(--font-heading);
    margin: 9px 0;
}

.habitat-overlay p {
    color: #e1e6df;
    font-size: 11px;
    line-height: 1.7;
    max-width: 320px;
}

.quote-section {
    padding: 110px 15%;
    text-align: center;
    background: #dce5d4;
}

.quote-symbol {
    color: #8ba47e;
    font: 90px var(--font-heading);
    height: 70px;
}

.quote-section blockquote {
    max-width: 780px;
    margin: 20px auto 24px;
    font: 600 clamp(27px, 4vw, 43px)/1.4 var(--font-heading);
}

.quote-section > span {
    color: #74846d;
    font-size: 10px;
    letter-spacing: 2px;
}

.newsletter {
    background: var(--cream);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 12%;
}

.newsletter h2 {
    margin-top: 28px;
}

.newsletter > div > p {
    color: #7c857c;
    font-size: 13px;
    line-height: 1.8;
    margin-top: 15px;
    max-width: 340px;
}

.newsletter form label {
    display: block;
    font-size: 10px;
    letter-spacing: 1.5px;
    color: #7a897a;
    margin-bottom: 14px;
}

.newsletter-input {
    display: flex;
    border-bottom: 1px solid #aebaa9;
}

.newsletter-input input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    padding: 15px 0;
    font-size: 13px;
}

.newsletter-input button {
    border: none;
    background: var(--dark);
    color: white;
    padding: 0 18px;
    font-size: 11px;
}

.newsletter-input button:hover {
    background: #38533c;
}

.newsletter form small {
    display: block;
    margin-top: 14px;
    color: #939d91;
    font-size: 10px;
}

.footer {
    min-height: 115px;
    background: var(--dark);
    color: white;
    padding: 30px 7%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer > p {
    color: #9aa79c;
    font-size: 11px;
}

.footer > span, .back-top {
    color: #9aa79c;
    font-size: 9px;
    letter-spacing: 1px;
}

.back-top:hover {
    color: var(--green);
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 20;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.open {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: #07120de0;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--cream);
    padding: 48px;
    max-width: 510px;
    width: 100%;
    z-index: 1;
    animation: modalEnter 0.25s ease;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    border: none;
    background: transparent;
    font-size: 30px;
    color: var(--dark);
}

.modal-content h2 {
    font: 600 39px var(--font-heading);
    margin: 20px 0 5px;
}

.modal-scientific {
    font-size: 12px;
    color: #8b9689;
    font-style: italic;
    margin-bottom: 25px;
}

.modal-content > p:not(.modal-scientific) {
    font-size: 13px;
    line-height: 1.9;
    color: #677168;
}

.modal-fact {
    padding: 18px;
    background: #e3e9dc;
    margin-top: 25px;
    font-size: 12px;
    line-height: 1.8;
    color: #53634f;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 1000px) {
    .section-padding {
        padding: 85px 7%;
    }

    .hero {
        padding-left: 7%;
    }

    .animal-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .animal-image {
        height: 280px;
    }

    .intro-content {
        gap: 7%;
    }
}

@media (max-width: 700px) {
    .navbar {
        height: 70px;
        padding: 0 6%;
    }

    .navbar nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--dark);
        padding: 25px 7%;
        flex-direction: column;
        gap: 23px;
    }

    .navbar nav.open {
        display: flex;
    }

    .nav-button {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: 740px;
        height: 100svh;
        padding: 110px 7% 90px;
        background-position: 60% center;
    }

    .hero h1 {
        font-size: clamp(58px, 12vw, 78px);
    }

    .hero-content > p {
        font-size: 13px;
    }

    .hero-stats {
        gap: 20px;
        margin-top: 65px;
    }

    .hero-stats strong {
        font-size: 16px;
    }

    .hero-stats span {
        font-size: 9px;
    }

    .section-padding {
        padding: 75px 7%;
    }

    .intro-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .section-heading {
        align-items: start;
        gap: 15px;
        flex-direction: column;
    }

    .filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .search-box input {
        width: 100%;
    }

    .animal-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .animal-image {
        height: 300px;
    }

    .habitat-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 350px 260px 260px;
    }

    .habitat-large {
        grid-row: auto;
    }

    .quote-section {
        padding: 80px 8%;
    }

    .newsletter {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .footer {
        padding: 35px 7%;
        flex-wrap: wrap;
    }

    .footer > p {
        width: 100%;
        order: 2;
    }

    .footer > span {
        order: 3;
    }

    .back-top {
        order: 4;
    }

    .modal-content {
        padding: 35px 25px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}