:root {
    --primary: #4f7d54;
    --primary-dark: #3a5c3e;
    --primary-light: rgba(79, 125, 84, 0.1);
    --bg: #FAFAFA;
    --surface: #ffffff;
    --text: #171717;
    --text-secondary: #737373;
    --border: #E5E5E5;
    --radius-full: 9999px;
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --shadow-glow: 0 0 40px rgba(79, 125, 84, 0.15);
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --container-width: 1000px;
}

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

body {
    font-family: 'Host Grotesk', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* --- ISLAND HEADER --- */
.island-header-wrapper {
    position: fixed;
    top: 24px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 1000;
    padding: 0 20px;
}

.island-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 40px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.island-header:hover {
    transform: translateY(2px);
    background: rgba(255, 255, 255, 0.95);
}

.brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-logo {
    width: 32px;
    height: 32px;
    object-fit: cover;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-btn {
    background: var(--text);
    color: white;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: var(--primary);
    transform: scale(1.05);
}

/* --- HERO (Start Page) --- */
.hero {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 140px 20px 60px;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(79, 125, 84, 0.08);
    /* Primary light */
    color: var(--primary);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 24px;
    border: 1px solid rgba(79, 125, 84, 0.2);
    opacity: 0;
    animation: fadeUp 0.8s ease-out forwards;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    /* Responsive giant text */
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 24px;
    max-width: 1000px;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 0.1s forwards;
    background: linear-gradient(145deg, var(--text) 30%, #525252 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 48px;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 0.2s forwards;
}

.cta-group {
    display: flex;
    gap: 16px;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 0.3s forwards;
}

.primary-btn {
    background: var(--primary);
    color: white;
    padding: 16px 32px;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    font-size: 1.1rem;
    box-shadow: 0 10px 20px -5px rgba(79, 125, 84, 0.4);
}

.primary-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(79, 125, 84, 0.5);
}

.secondary-btn {
    background: white;
    color: var(--text);
    padding: 16px 32px;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid var(--border);
    font-size: 1.1rem;
}

.secondary-btn:hover {
    border-color: var(--text);
    background: #f5f5f5;
}

/* --- BENTO GRID FEATURES (Start Page) --- */
.features-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(300px, auto);
    gap: 24px;
}

.bento-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 40px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: var(--shadow-sm);
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(79, 125, 84, 0.3);
}

/* Grid Spans */
.bento-wide {
    grid-column: span 8;
}

.bento-tall {
    grid-column: span 4;
    grid-row: span 2;
}

.bento-small {
    grid-column: span 4;
}

.bento-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bento-icon {
    width: 48px;
    height: 48px;
    background: rgba(79, 125, 84, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 24px;
}

.bento-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.bento-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Decorative Backgrounds */
.bg-privacy {
    background: radial-gradient(circle at top right, rgba(79, 125, 84, 0.05), transparent 50%);
}

.bg-leaves {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 30c0-5 5-10 5-10s5 5 5 10-5 10-5 10-5-5-5-10zm0 0c5 0 10 5 10 5s-5 5-10 5-10-5-10-5 5-5 10-5z' fill='%234f7d54' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

/* --- CREDITS PAGE SPECIFIC --- */

/* Main Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 140px 2rem 4rem;
    /* Top padding to account for fixed header */
    opacity: 0;
    animation: fadeUp 0.8s ease-out 0.2s forwards;
}

.credits-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 2rem;
    letter-spacing: -0.03em;
    color: var(--text);
}

/* Thanks Card */
.thanks-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.thanks-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 180px;
    height: 180px;
    background: var(--primary-light);
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
}

.thanks-content {
    position: relative;
    z-index: 1;
}

.thanks-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.thanks-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 750px;
    line-height: 1.6;
}

.thanks-text strong {
    color: var(--primary);
    font-weight: 600;
}

/* Stats */
.stats-row {
    display: flex;
    gap: 4rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.stat-item span {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-item strong {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    letter-spacing: -0.03em;
}

/* Search Bar */
.search-container {
    position: sticky;
    top: 100px;
    z-index: 90;
    margin-bottom: 2.5rem;
}

.search-box {
    width: 100%;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    color: var(--text);
}

.search-box:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 10px 40px -10px rgba(79, 125, 84, 0.15);
}

/* Species List */
#speciesList {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.species-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--transition);
    overflow: hidden;
}

.species-card:hover {
    border-color: #d4d4d4;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.species-header {
    padding: 1.25rem 2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.species-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text);
}

.species-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.count-pill {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
}

.species-content {
    display: none;
    border-top: 1px solid var(--border);
    padding: 0;
    animation: slideDown 0.3s ease-out;
}

.species-content.active {
    display: block;
}

/* Table */
.table-container {
    max-height: 400px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th,
td {
    padding: 1rem 2rem;
    text-align: left;
    border-bottom: 1px solid #f5f5f5;
}

th {
    background: #fafafa;
    font-weight: 600;
    color: #737373;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
}

a.link-btn {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

a.link-btn:hover {
    text-decoration: underline;
}

.icon {
    transition: transform 0.3s ease;
    color: #a3a3a3;
}

.species-header.active .icon {
    transform: rotate(180deg);
    color: var(--primary);
}

.credits-footer {
    text-align: center;
    margin-top: 4rem;
    color: var(--text-secondary);
    padding-bottom: 2rem;
}

.credits-footer a {
    color: var(--primary);
    text-decoration: none;
}


/* Footer */
footer {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    margin-top: 80px;
}

/* ANIMATIONS */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Queries */
@media (max-width: 900px) {

    .bento-wide,
    .bento-tall,
    .bento-small {
        grid-column: span 12;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .island-header {
        padding: 12px 16px;
        gap: 20px;
    }

    .nav-link {
        display: none;
    }

    /* Credits Page Mobile */
    .stats-row {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .search-box {
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }
}