/* Ecological Intelligence, Inc. — Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Oxygen:wght@300;400;700&display=swap');

/* NAV THEME FLAG: set to 'white' or 'black' */
/* To switch: change --nav-bg, --nav-text, --nav-text-dim, --nav-border, --nav-dropdown-bg, --nav-dropdown-hover, --nav-logo-invert */
:root {
    /* white nav (default) */
    --nav-bg: rgba(255,255,255,0.95);
    --nav-text: #000;
    --nav-text-dim: #555;
    --nav-border: #e5e5e5;
    --nav-dropdown-bg: #fff;
    --nav-dropdown-hover: #f7f7f7;
    --nav-logo-invert: 0;
    --nav-hamburger: #000;

    /* black nav (uncomment to switch):
    --nav-bg: rgba(0,0,0,0.95);
    --nav-text: #fff;
    --nav-text-dim: rgba(255,255,255,0.6);
    --nav-border: #222;
    --nav-dropdown-bg: #111;
    --nav-dropdown-hover: #222;
    --nav-logo-invert: 1;
    --nav-hamburger: #fff;
    */

    --black: #000;
    --white: #fff;
    --gray-100: #f7f7f7;
    --gray-200: #e5e5e5;
    --gray-400: #999;
    --gray-600: #555;
    --gray-800: #1a1a1a;
    --font: 'Oxygen', sans-serif;
    --max-width: 1100px;
    --nav-height: 56px;
}

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

html { height: 100%; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font);
    font-weight: 300;
    color: var(--black);
    background: var(--white);
    line-height: 1.7;
    font-size: 16px;
}

a { color: var(--black); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; line-height: 1.25; margin-bottom: 1rem; }
h3 { font-size: 1.1rem; font-weight: 700; line-height: 1.4; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
}

.section--alt {
    background: var(--gray-100);
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    z-index: 100;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--nav-border);
    opacity: 0;
    transition: opacity 0.6s ease, height 0.4s ease, background 0.4s ease;
}

nav.visible { opacity: 1; }

nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: none;
    padding: 0 1.5rem;
}

.nav-brand {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 32px;
    width: auto;
    display: block;
    filter: invert(var(--nav-logo-invert));
}

/* Mobile brand subtitle in nav, hidden on desktop */
.nav-brand-sub {
    display: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    font-size: 0.85rem;
    font-weight: 400;
}

.nav-links a { color: var(--nav-text-dim); }
.nav-links a:hover { color: var(--nav-text); text-decoration: none; }

.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    cursor: pointer;
    color: var(--nav-text-dim);
    user-select: none;
}

.nav-dropdown-trigger:hover { color: var(--nav-text); }

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    background: var(--nav-dropdown-bg);
    border: 1px solid var(--nav-border);
    padding: 0.5rem 0;
    min-width: 220px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    color: var(--nav-text-dim);
}

.nav-dropdown-menu a:hover {
    background: var(--nav-dropdown-hover);
    color: var(--nav-text);
    text-decoration: none;
}

/* Hamburger */
.nav-hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--nav-hamburger);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger X animation when open */
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav panel */
.nav-mobile {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    padding: 0 2rem 2rem;
    z-index: 99;
    flex-direction: column;
    overflow-y: auto;
}

.nav-mobile.open { display: flex; }

/* Spacer to push content below the nav bar */
.nav-mobile-spacer {
    height: calc(var(--nav-height) + 2rem);
    flex-shrink: 0;
}

.nav-mobile a {
    display: block;
    padding: 0.85rem 0;
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-200);
}

.nav-mobile a:hover { color: var(--black); text-decoration: none; }

.nav-mobile .mobile-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gray-400);
    margin-top: 2rem;
    margin-bottom: 0.25rem;
    border: none;
    padding: 0;
}

/* Mobile brand block inside mobile nav */
.nav-mobile-brand {
    margin-top: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.nav-mobile-brand .mobile-brand-name {
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.nav-mobile-brand .mobile-brand-sub {
    display: none;
}

.nav-mobile-brand .mobile-mid {
    margin-top: 1rem;
}

.mobile-mid-rule {
    height: 1px;
    background: var(--black);
    opacity: 0.15;
}

.mobile-mid-label {
    font-family: 'Oxygen', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--black);
    padding: 0.5rem 0;
    padding-left: 0.5rem;
}

.mobile-mid-item {
    font-family: 'Oxygen', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--black);
    padding: 0.4rem 0;
    padding-left: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-mid-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.nav-mobile-brand .mobile-brand-tagline {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--gray-600);
    margin-top: 1rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }

    /* Expand nav bar on mobile for home page intro */
    nav {
        height: var(--nav-height);
        background: rgba(255,255,255,0.97);
    }

    .nav-brand-sub {
        display: block;
        font-weight: 300;
        font-size: 0.6rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--gray-400);
        margin-top: 1px;
    }
}

/* --- Spotlight block --- */
.spotlight {
    margin-top: 2.5rem;
    padding: 2.5rem;
    border: 1px solid var(--gray-200);
    background: var(--white);
}

.spotlight-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gray-400);
    margin-bottom: 0.8rem;
}

.spotlight h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.spotlight p {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 0.75rem;
}

.spotlight .spotlight-video {
    display: block;
    margin-top: 1rem;
    font-size: 0.85rem;
    font-weight: 400;
}

.spotlight .spotlight-video::before {
    content: "▶ ";
    font-size: 0.7rem;
}

/* --- Page content offset for fixed nav --- */
main { padding-top: var(--nav-height); }

/* --- Footer --- */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--gray-200);
    font-size: 0.8rem;
    color: var(--gray-400);
}

/* --- Animations --- */
[data-animate] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* --- Team / Collaborator tables --- */
.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.person {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.person-name {
    font-weight: 700;
    font-size: 1rem;
}

.person-title {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-top: 0.15rem;
}

.person-link {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.person-link a { color: var(--gray-400); }
.person-link a:hover { color: var(--black); }

/* GitHub icon */
.gh-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: var(--black);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.509 11.509 0 0112 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12z'/%3E%3C/svg%3E");
    mask-size: contain;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.509 11.509 0 0112 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    vertical-align: -0.1em;
    margin-left: 5px;
}

/* LinkedIn icon */
.li-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: var(--black);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/%3E%3C/svg%3E");
    mask-size: contain;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    vertical-align: middle;
    margin-left: 4px;
}

/* --- Service cards --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.service-card h3 {
    margin-bottom: 0.5rem;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--gray-600);
}

/* --- Blog --- */
.post-list { list-style: none; }

.post-item {
    padding: 2rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.post-item h3 a { color: var(--black); }
.post-item h3 a:hover { text-decoration: underline; }

.post-date {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-bottom: 0.25rem;
}

.post-summary {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
}

.post-body {
    max-width: 680px;
    margin: 0 auto;
}

.post-body h1 { margin-bottom: 0.5rem; }
.post-body h2 { margin-top: 2.5rem; }
.post-body h3 { margin-top: 2rem; }

.post-body blockquote {
    border-left: 3px solid var(--black);
    margin: 2rem 0;
    padding: 1.5rem 1.5rem;
}

.post-body blockquote p {
    margin-bottom: 0.5rem;
}

.post-body blockquote p:last-child {
    margin-bottom: 0;
}

.post-body audio {
    width: 100%;
    margin: 1.5rem 0;
}

/* --- Audience pages --- */
.audience-hero {
    padding: 2rem 0 0;
}

.audience-hero h1 {
    margin-bottom: 1.2rem;
}

.audience-hero .lead {
    font-size: 1.1rem;
    color: var(--gray-600);
    max-width: 580px;
    line-height: 1.7;
}

.value-list {
    list-style: none;
    margin-top: 0;
}

.value-list li {
    padding: 2rem 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.95rem;
    line-height: 1.7;
}

.value-list li:first-child {
    border-top: 1px solid var(--gray-200);
}

.value-list li strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.4rem;
}
