/* ─── Light theme (default) ─── */
:root, [data-theme="light"] {
    --bg-primary: #F5F0E8;
    --bg-secondary: #EDE8DF;
    --bg-card: #FDFBF7;
    --text-primary: #2C2417;
    --text-secondary: #4A4238;
    --text-muted: #635848;
    --accent: #1B6B5A;
    --accent-hover: #15584A;
    --accent-light: rgba(27,107,90,0.08);
    --accent-gold: #8A6515;
    --accent-gold-light: rgba(184,146,58,0.08);
    --border-color: #D4CFC4;
    --border-strong: #1B6B5A;
    --shadow: 0 1px 3px rgba(44,36,23,0.06);
    --shadow-hover: 0 6px 20px rgba(44,36,23,0.1);
    --nav-bg: rgba(245,240,232,0.92);
}

/* ─── Dark theme ─── */
[data-theme="dark"] {
    --bg-primary: #1A1611;
    --bg-secondary: #231E17;
    --bg-card: #2A241C;
    --text-primary: #E8E0D4;
    --text-secondary: #B8AFA3;
    --text-muted: #B0A696;
    --accent: #3DB89A;
    --accent-hover: #4DCAA8;
    --accent-light: rgba(61,184,154,0.1);
    --accent-gold: #D4A84B;
    --accent-gold-light: rgba(212,168,75,0.1);
    --border-color: #3D352A;
    --border-strong: #3DB89A;
    --shadow: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-hover: 0 6px 20px rgba(0,0,0,0.3);
    --nav-bg: rgba(26,22,17,0.94);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Source Sans 3', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* ─── Theme Toggle ─── */
.theme-toggle {
    width: 36px; height: 36px; border-radius: 8px;
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; transition: all 0.2s; flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ─── Nav ─── */
nav {
    padding: 18px 0; border-bottom: 2px solid var(--border-strong);
    background: var(--nav-bg); backdrop-filter: blur(12px);
    position: sticky; top: 0; z-index: 100;
    transition: background 0.3s, border-color 0.3s;
}
nav .container { display: flex; justify-content: space-between; align-items: center; }
.logo {
    font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.15rem;
    font-weight: 800; color: var(--text-primary); text-decoration: none;
    transition: color 0.3s;
}
.logo span { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-stats {
    font-family: 'JetBrains Mono', monospace; font-size: 0.68rem;
    color: var(--text-muted);
}
.nav-stats strong { color: var(--accent-gold); }
.nav-links { display: flex; gap: 4px; }
.nav-link {
    font-size: 0.8rem; font-weight: 500; color: var(--text-muted);
    text-decoration: none; padding: 6px 14px; border-radius: 4px; transition: all 0.2s;
}
.nav-link:hover { color: var(--accent); background: var(--accent-light); }
.nav-link--active { color: var(--text-primary); background: var(--bg-secondary); border: 1px solid var(--border-color); }

/* ─── Hero (centered) ─── */
.hero { padding: 80px 0 48px; text-align: center; }
.hero-badge {
    font-family: 'JetBrains Mono', monospace; font-size: 0.58rem;
    text-transform: uppercase; letter-spacing: 3px; color: var(--accent-gold);
    background: var(--accent-gold-light); border: 1px solid rgba(184,146,58,0.2);
    display: inline-block; padding: 6px 18px; margin-bottom: 24px; border-radius: 2px;
    transition: all 0.3s;
}
[data-theme="dark"] .hero-badge { border-color: rgba(212,168,75,0.25); }
.hero h1 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 800;
    line-height: 1.25; letter-spacing: -1px; margin-bottom: 20px;
}
.hero h1 .highlight { color: var(--accent); }
.hero-subtitle .highlight { color: var(--accent); font-weight: 700; }
.hero-subtitle-line { display: block; }
.hero-subtitle-line + .hero-subtitle-line { margin-top: 0.45em; }
.hero-subtitle {
    font-size: 1.24rem; color: var(--text-secondary);
    max-width: 600px; margin: 0 auto 32px; line-height: 1.7; font-weight: 400;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ─── Buttons ─── */
.btn {
    font-family: 'Source Sans 3', sans-serif; font-size: 0.98rem; font-weight: 600;
    padding: 14px 32px; border: none; cursor: pointer; text-decoration: none;
    transition: all 0.2s; border-radius: 4px; display: inline-block;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-secondary { background: transparent; color: var(--text-primary); border: 1px solid var(--border-color); border-radius: 4px; }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ─── Stats ─── */
.stats-strip {
    display: flex; justify-content: center; gap: 56px;
    padding: 28px 0; border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color); margin: 40px 0;
    transition: border-color 0.3s;
}
.stat-item { text-align: center; }
.stat-number {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 2.4rem; font-weight: 800; color: var(--accent-gold); line-height: 1;
}
.stat-label {
    font-size: 0.7rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 1.5px; margin-top: 4px; font-weight: 500;
}

/* ─── Why Section ─── */
.why-section {
    padding: 64px 0; background: var(--bg-secondary);
    border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color);
    margin: 48px 0; transition: all 0.3s;
}
.section-header { margin-bottom: 28px; }
.section-header h2 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.6rem; font-weight: 700; margin-bottom: 6px;
}
.section-header p { color: var(--text-secondary); font-weight: 400; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.why-item {
    padding: 24px; background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 6px; transition: all 0.3s;
}
.why-icon { font-size: 1.8rem; margin-bottom: 12px; }
.why-item h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.05rem; font-weight: 700; margin-bottom: 8px;
}
.why-item p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

/* ─── Disciplines ─── */
.disciplines-section { padding-top: 48px; padding-bottom: 0; }
.discipline-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 28px; }
.discipline-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 6px; padding: 18px; transition: all 0.2s;
}
.discipline-card { cursor: pointer; }
.discipline-card:hover { border-color: var(--accent); }
.discipline-card h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 0.9rem; font-weight: 700; margin-bottom: 4px;
    display: flex; align-items: center; gap: 10px;
}
.discipline-card h3 .dot {
    width: 8px; height: 8px; background: var(--accent); display: inline-block; border-radius: 2px; flex-shrink: 0;
}
.discipline-card p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }
.discipline-card .count {
    font-family: 'JetBrains Mono', monospace; font-size: 0.65rem;
    color: var(--accent-gold); margin-top: 8px;
}

/* ─── Companies ─── */
.companies-section { padding-top: 48px; padding-bottom: 0; }
.search-container { margin-bottom: 14px; }
.search-input {
    width: 100%; max-width: 400px; padding: 12px 16px;
    font-family: 'Source Sans 3', sans-serif; font-size: 0.9rem;
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 4px;
    color: var(--text-primary); outline: none; transition: all 0.3s;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.filter-container { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.filter-dropdown {
    font-family: 'Source Sans 3', sans-serif; font-size: 0.8rem; font-weight: 500;
    padding: 10px 36px 10px 14px;
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 4px;
    color: var(--text-primary); cursor: pointer; min-width: 170px; outline: none;
    appearance: none; -webkit-appearance: none; transition: all 0.3s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237A6F5F' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
.filter-dropdown:hover { border-color: var(--accent); }
.filter-dropdown:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.filter-dropdown option { background: var(--bg-card); color: var(--text-primary); }
.results-count { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 16px; }
.results-count strong { color: var(--accent); font-weight: 600; }

.companies-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.company-card {
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 6px;
    padding: 22px; transition: all 0.25s;
    box-shadow: inset 3px 0 0 transparent;
}
.company-card:hover { box-shadow: inset 3px 0 0 var(--accent), var(--shadow-hover); }
.company-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; gap: 10px; }
.company-name {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.05rem; font-weight: 700;
}
.company-sector {
    font-size: 0.6rem; font-weight: 600; padding: 3px 8px;
    background: var(--accent-gold-light); color: var(--accent-gold);
    border-radius: 3px; text-transform: uppercase; letter-spacing: 0.8px; white-space: nowrap;
}
.company-disciplines { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.discipline-tag {
    font-size: 0.6rem; font-weight: 500; padding: 2px 8px;
    background: var(--bg-secondary); color: var(--text-muted);
    border-radius: 3px; transition: all 0.3s; text-transform: capitalize;
}
.company-links { display: flex; gap: 12px; padding-top: 12px; border-top: 1px solid var(--border-color); align-items: center; }
.company-link {
    color: var(--text-muted); text-decoration: none; display: flex; align-items: center;
    transition: color 0.2s;
}
.company-link:hover { color: var(--accent); }
.company-link svg { width: 16px; height: 16px; }
.email-popover-trigger { position: relative; cursor: pointer; }
.email-popover {
    display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
    background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 6px;
    padding: 8px 10px; min-width: 240px; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10;
}
.email-popover.open { display: block; }
.email-popover-row {
    display: flex; align-items: center; gap: 6px; padding: 4px 0;
    font-family: 'JetBrains Mono', monospace; font-size: 0.6rem;
}
.email-popover-row + .email-popover-row { border-top: 1px solid var(--border-color); padding-top: 6px; }
.email-popover-label {
    font-family: 'Source Sans 3', sans-serif; font-size: 0.55rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted);
    min-width: 52px;
}
.email-popover-row a { color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
.email-popover-row a:hover { color: var(--accent); }
.email-copy-btn {
    background: none; border: 1px solid var(--border-color); color: var(--text-muted);
    cursor: pointer; padding: 1px 5px; border-radius: 3px; font-size: 0.65rem;
    line-height: 1; transition: all 0.2s; margin-left: auto;
}
.email-copy-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ─── Footer ─── */
footer {
    padding: 48px 0; border-top: 2px solid var(--border-strong);
    text-align: center; margin-top: 48px; transition: border-color 0.3s;
}
.tagline {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.15rem; font-weight: 700; color: var(--text-primary); margin-bottom: 10px;
}
footer p { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; }
.footer-links { display: flex; justify-content: center; gap: 16px; margin-bottom: 12px; }
.footer-links a {
    font-size: 0.75rem; color: var(--text-muted); text-decoration: none;
    text-transform: uppercase; letter-spacing: 1px; transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-disclaimer { margin-top: 16px; font-size: 0.6rem; }

/* ─── Page content (About, FAQ) ─── */
.page-content {
    max-width: 800px; margin: 0 auto; padding: 60px 24px;
}
.page-content h1 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 2.2rem; font-weight: 800; margin-bottom: 12px; letter-spacing: -1px;
}
.page-content .page-subtitle {
    font-size: 1rem; color: var(--text-secondary); margin-bottom: 48px; line-height: 1.7;
}
.page-content h2 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.3rem; font-weight: 700; margin-top: 48px; margin-bottom: 16px;
    padding-bottom: 8px; border-bottom: 1px solid var(--border-color);
}
.page-content h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.05rem; font-weight: 600; margin-top: 28px; margin-bottom: 10px;
}
.page-content p { color: var(--text-secondary); margin-bottom: 16px; line-height: 1.7; font-size: 0.95rem; }
.page-content ul, .page-content ol { color: var(--text-secondary); margin-bottom: 16px; padding-left: 24px; line-height: 1.8; font-size: 0.95rem; }
.page-content li { margin-bottom: 6px; }
.page-content a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.page-content a:hover { border-bottom-color: var(--accent); }
.page-content a.btn-primary { color: #fff; border-bottom: none; }
.page-content a.btn-primary:hover { color: #fff; border-bottom: none; }
.page-content strong { color: var(--text-primary); }

/* Info cards grid (about page) */
.info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 24px 0; }
.info-card {
    background: var(--bg-card); border: 1px solid var(--border-color); padding: 20px; border-radius: 6px;
}
.info-card h4 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 0.85rem; font-weight: 700; margin-bottom: 8px; color: var(--text-primary);
}
.info-card p { font-size: 0.85rem; margin-bottom: 0; }

/* FAQ accordion */
.faq-category { margin-top: 40px; }
.faq-category h2 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.1rem; font-weight: 700; margin-bottom: 16px;
    padding-bottom: 8px; border-bottom: 1px solid var(--border-color);
    color: var(--accent);
}
.faq-item {
    border: 1px solid var(--border-color); margin-bottom: 8px;
    background: var(--bg-card); border-radius: 6px;
}
.faq-item summary {
    padding: 16px 20px; cursor: pointer; font-size: 0.95rem; font-weight: 600;
    color: var(--text-primary); list-style: none; display: flex;
    justify-content: space-between; align-items: center; transition: color 0.2s;
}
.faq-item summary:hover { color: var(--accent); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+'; font-family: 'JetBrains Mono', monospace; font-size: 1.2rem;
    color: var(--accent); transition: transform 0.2s;
}
.faq-item[open] summary::after { content: '\2212'; }
.faq-item .faq-answer {
    padding: 0 20px 16px; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7;
}
.faq-item .faq-answer p { margin-bottom: 8px; }
.faq-item .faq-answer p:last-child { margin-bottom: 0; }

/* ─── Utility ─── */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.hidden { display: none !important; }

/* ─── Hamburger ─── */
.hamburger {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    width: 36px; height: 36px; background: none; border: none;
    cursor: pointer; padding: 6px; flex-shrink: 0;
}
.hamburger span {
    display: block; width: 20px; height: 2px; background: var(--text-primary);
    border-radius: 2px; transition: all 0.3s;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .why-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .stats-strip { gap: 32px; }
    .companies-grid { grid-template-columns: minmax(0, 1fr); }
    .filter-dropdown { width: 100%; }
    .nav-stats { display: none; }
    .discipline-grid { grid-template-columns: 1fr; }
    .hamburger { display: flex; margin-left: 8px; }
    .nav-links { display: none; }
    .nav-right { gap: 8px; flex: 1; justify-content: flex-end; }
    .theme-toggle { margin-right: 4px; }
    .nav-links.open {
        display: flex; flex-direction: column; position: absolute;
        top: 100%; left: 0; right: 0; background: var(--bg-primary);
        border-bottom: 2px solid var(--border-strong);
        padding: 12px 32px 16px; gap: 4px; z-index: 99;
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    }
    nav .container { position: relative; }
}
