/* =========================================================
   BioinfoX website stylesheet (v2.1, multi-page)
   Brand values from the BioinfoX deployment pack.
   ========================================================= */

:root {
    --navy: #0D1B2A;
    --blue: #1E3A5F;
    --orange: #F07A28;        /* fills, accents, text on navy */
    --orange-text: #C2410C;   /* orange text on light backgrounds (WCAG AA) */
    --orange-hover: #D9641A;
    --teal: #00A3B4;
    --light: #F2F4F7;
    --white: #FFFFFF;
    --gray: #64748B;
    --text: #1F2937;
    --border: #DDE2EA;

    --font-heading: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    --font-body: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;

    --container: 1200px;
    --radius: 8px;
    --header-h: 76px;
    --section-pad: clamp(3.5rem, 7vw, 6rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--white);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); }
a:hover { color: var(--orange-text); }
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--navy);
}
ul, ol { list-style: none; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
main [id] { scroll-margin-top: calc(var(--header-h) + 12px); }

.skip-link {
    position: absolute; left: 1rem; top: -100px;
    background: var(--navy); color: var(--white);
    padding: 0.6rem 1rem; border-radius: var(--radius); z-index: 2000;
}
.skip-link:focus { top: 1rem; color: var(--white); }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2rem);
}
.container.narrow { max-width: 860px; }
.muted { color: var(--gray); font-size: 0.95rem; }

/* ---------- Buttons & links ---------- */
.btn {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius);
    border: 2px solid transparent;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--orange); border-color: var(--orange); color: var(--navy); }
.btn-primary:hover { background: var(--orange-hover); border-color: var(--orange-hover); color: var(--navy); }
.btn-outline-light { border-color: rgba(255,255,255,0.8); color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--navy); }
.btn-outline { border-color: var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: var(--white); }
.btn-sm { padding: 0.6rem 1.2rem; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.65; cursor: wait; }
.card-link { display: inline-block; margin-top: 1rem; font-weight: 600; color: var(--orange-text); }

/* ---------- Header / navigation ---------- */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: var(--white);
    border-bottom: 1px solid transparent;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: 0 2px 12px rgba(13,27,42,0.06); }
.nav-container { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; }
.logo-img { height: 44px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.97rem; }
.nav-links a:not(.btn):hover,
.nav-links a[aria-current="page"]:not(.btn) { color: var(--orange-text); }

.menu-toggle {
    display: none; width: 44px; height: 44px;
    background: none; border: 1px solid var(--border); border-radius: var(--radius);
    cursor: pointer; position: relative;
}
.menu-toggle-bar, .menu-toggle-bar::before, .menu-toggle-bar::after {
    position: absolute; left: 11px; width: 20px; height: 2px;
    background: var(--navy); transition: transform 0.2s ease;
}
.menu-toggle-bar { top: 50%; transform: translateY(-50%); }
.menu-toggle-bar::before, .menu-toggle-bar::after { content: ''; left: 0; }
.menu-toggle-bar::before { top: -6px; }
.menu-toggle-bar::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Sections ---------- */
.section { padding: var(--section-pad) 0; }
.section-light { background: var(--light); }
.section-dark { background: var(--navy); color: rgba(255,255,255,0.88); }
.section-dark .section-title { color: var(--white); }
.section-dark .section-subtitle { color: rgba(255,255,255,0.78); }
.section-header { max-width: 760px; margin: 0 auto 3rem; text-align: center; }
.eyebrow {
    font-family: var(--font-heading); font-size: 0.8rem; font-weight: 600;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--orange-text); margin-bottom: 0.75rem;
}
.eyebrow-on-dark { color: var(--orange); }
.section-title { font-size: clamp(1.75rem, 3.2vw, 2.4rem); margin-bottom: 1rem; }
.section-subtitle { color: var(--gray); font-size: 1.125rem; }
.prose p + p { margin-top: 1rem; }

/* ---------- Home hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
    color: var(--white);
    padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { color: var(--white); font-size: clamp(2.1rem, 4.6vw, 3.3rem); margin-bottom: 1.25rem; }
.hero-lead { font-size: 1.15rem; color: rgba(255,255,255,0.86); max-width: 40em; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-panel {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: var(--radius); padding: 2rem;
}
.hero-panel-title { color: var(--white); font-size: 1rem; letter-spacing: 0.04em; margin-bottom: 1.25rem; }
.hero-facts li { display: grid; gap: 0.15rem; padding: 0.8rem 0; border-top: 1px solid rgba(255,255,255,0.12); }
.hero-facts li:first-child { border-top: 0; padding-top: 0; }
.fact-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--orange); font-weight: 600; }
.fact-value { color: var(--white); }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.tag-list li {
    font-size: 0.85rem; padding: 0.3rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.25); border-radius: 999px; color: rgba(255,255,255,0.9);
}

/* ---------- Inner page hero ---------- */
.page-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
    color: rgba(255,255,255,0.86);
    padding: clamp(3rem, 6vw, 4.5rem) 0;
}
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 0.75rem; }
.page-hero p { max-width: 46em; font-size: 1.12rem; }

/* ---------- Audiences ---------- */
.audience-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.audience-grid li { background: var(--white); border-top: 3px solid var(--orange); border-radius: var(--radius); padding: 1.5rem; }
.audience-grid strong { display: block; font-family: var(--font-heading); color: var(--navy); margin-bottom: 0.5rem; }
.audience-grid span { color: var(--gray); font-size: 0.98rem; }

/* ---------- Cards ---------- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.service-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 2rem; transition: border-color 0.2s ease;
}
.service-card:hover { border-color: var(--orange); }
.service-card h2, .service-card h3 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.service-card > p { color: var(--gray); margin-bottom: 1rem; }
.icon {
    width: 40px; height: 40px; margin-bottom: 1.25rem;
    fill: none; stroke: var(--orange-text); stroke-width: 1.6;
    stroke-linecap: round; stroke-linejoin: round;
}
.check-list li { position: relative; padding: 0.3rem 0 0.3rem 1.5rem; font-size: 0.97rem; }
.check-list li::before {
    content: ''; position: absolute; left: 0.2rem; top: 0.75rem;
    width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--orange);
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: step; }
.steps li { counter-increment: step; background: var(--white); border-radius: var(--radius); padding: 1.75rem 1.5rem; }
.steps li::before {
    content: counter(step, decimal-leading-zero); display: block;
    font-family: var(--font-heading); font-weight: 700; font-size: 1.5rem;
    color: var(--orange-text); margin-bottom: 0.75rem;
}
.steps h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.steps p { color: var(--gray); font-size: 0.98rem; }

/* ---------- Clients ---------- */
.clients-title { text-align: center; font-size: 1.1rem; margin: 3.5rem 0 1.5rem; }
.client-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.client-list li {
    display: flex; align-items: center; justify-content: center; text-align: center;
    min-height: 84px; padding: 1rem;
    border: 1px solid var(--border); border-radius: var(--radius);
    font-family: var(--font-heading); font-weight: 600; font-size: 0.95rem; color: var(--blue);
}
.section-light .client-list li { background: var(--white); }

/* ---------- Tools ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.tool-card {
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 2rem; display: flex; flex-direction: column; background: var(--white);
}
.tool-card h2 { font-size: 1.35rem; margin-bottom: 0.25rem; }
.tool-meta { color: var(--gray); font-size: 0.92rem; font-weight: 600; margin-bottom: 1rem; }
.tool-card .check-list { margin: 1rem 0; }
.tool-links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0.75rem; padding-top: 1rem; }
.status {
    display: inline-block; align-self: flex-start;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
    padding: 0.2rem 0.6rem; border-radius: 999px; margin-bottom: 0.75rem;
}
.status-live { background: #E0F4F6; color: #035E68; }
.status-dev { background: #FDEBDD; color: #8A3410; }

/* ---------- Training ---------- */
.training-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.training-card {
    border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius);
    padding: 1.75rem; background: rgba(255,255,255,0.04);
}
.training-card h3 { color: var(--orange); font-size: 1.1rem; margin-bottom: 1rem; }
.training-card li { padding: 0.3rem 0 0.3rem 1.1rem; position: relative; font-size: 0.97rem; }
.training-card li::before {
    content: ''; position: absolute; left: 0; top: 0.85rem;
    width: 0.4rem; height: 2px; background: var(--orange);
}
.resource-box {
    margin-top: 2.5rem; border: 1px solid var(--border);
    border-left: 4px solid var(--orange); border-radius: var(--radius); padding: 1.75rem; background: var(--white);
}
.resource-box h2 { font-size: 1.2rem; margin-bottom: 0.5rem; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.founder-card { background: var(--light); border-left: 4px solid var(--orange); border-radius: var(--radius); padding: 2rem; }
.founder-card h2, .founder-card h3 { font-size: 1.3rem; }
.founder-role { color: var(--gray); font-weight: 600; margin: 0.25rem 0 1rem; }
.founder-card p + p { margin-top: 0.75rem; }
.founder-links { margin-top: 1rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.founder-links a { font-weight: 600; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--navy); color: rgba(255,255,255,0.85); padding: 3.5rem 0; text-align: center; }
.cta-band h2 { color: var(--white); margin-bottom: 0.75rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.cta-band p { margin: 0 auto 1.5rem; max-width: 40em; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.contact-form { background: var(--white); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid var(--border); }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 0.4rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; font: inherit; font-size: 1rem;
    padding: 0.75rem 0.9rem; border: 1px solid #94A3B8; border-radius: 6px;
    background: var(--white); color: var(--text);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: 3px solid var(--teal); outline-offset: 1px; border-color: var(--blue);
}
.form-group textarea { min-height: 150px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 0.9rem; color: var(--gray); margin-bottom: 1rem; }
.form-message { padding: 0.9rem 1rem; border-radius: 6px; margin-bottom: 1rem; border: 1px solid; }
.form-message.is-success { background: #E8F5EC; color: #14532D; border-color: #A7D7B5; }
.form-message.is-error { background: #FDECEC; color: #7F1D1D; border-color: #F3B4B4; }
.contact-info h2 { font-size: 1.3rem; margin-bottom: 1.25rem; }
.contact-details > div { padding: 1rem 0; border-top: 1px solid var(--border); }
.contact-details > div:first-child { border-top: 0; padding-top: 0; }
.contact-details dt {
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em;
    font-weight: 600; color: var(--orange-text); margin-bottom: 0.2rem;
}
.contact-details a { color: var(--navy); text-decoration: none; font-weight: 600; }
.contact-details a:hover { color: var(--orange-text); text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.72); padding: 3.5rem 0 1.5rem; font-size: 0.97rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-logo { height: 40px; width: auto; margin-bottom: 1rem; }
.footer-tagline { color: var(--orange); font-weight: 600; margin-bottom: 0.5rem; }
.footer-heading { color: var(--white); font-size: 1rem; margin-bottom: 1rem; }
.footer-links li { margin-bottom: 0.5rem; }
.site-footer a { color: rgba(255,255,255,0.78); text-decoration: none; }
.site-footer a:hover { color: var(--orange); text-decoration: underline; }
.footer-bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem;
    padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.9rem;
}

/* ---------- Simple pages (privacy) ---------- */
.page-simple { padding: var(--section-pad) 0; }
.page-simple h2 { font-size: 1.2rem; margin: 2rem 0 0.6rem; }
.page-simple p + p { margin-top: 0.75rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .menu-toggle { display: block; }
    .site-header nav {
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--white); border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 20px rgba(13,27,42,0.08); display: none;
    }
    .site-header nav.is-open { display: block; }
    .nav-links { flex-direction: column; align-items: stretch; gap: 0; padding: 0.75rem clamp(1.25rem, 4vw, 2rem) 1.25rem; }
    .nav-links a:not(.btn) { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--light); }
    .nav-links li:last-child { margin-top: 1rem; }
    .nav-links .btn { display: block; }
    .training-grid, .audience-grid, .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
    .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
    .training-grid, .audience-grid, .steps, .footer-grid,
    .services-grid, .tool-grid { grid-template-columns: 1fr; }
    .hero-actions .btn { flex: 1 1 100%; }
    .logo-img { height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
