:root {
    --ink: #0f172a;
    --ink-soft: #1e293b;
    --body: #334155;
    --muted: #64748b;
    --muted-soft: #94a3b8;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-tint: #f1f5f9;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;

    --brand: #0f766e;
    --brand-strong: #115e59;
    --brand-soft: #14b8a6;
    --brand-wash: #ecfeff;

    --accent: #10b981;
    --accent-strong: #059669;

    --danger: #dc2626;
    --danger-wash: #fef2f2;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.14);

    --max: 1200px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-rounded: ui-rounded, "SF Pro Rounded", "Nunito", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.6;
    color: var(--body);
    background: var(--surface);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: color 0.2s var(--ease);
}

a:hover {
    color: var(--brand-strong);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
    border-radius: 4px;
}

h1,
h2,
h3,
h4 {
    color: var(--ink);
    margin: 0 0 0.5em;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

h1 {
    font-size: clamp(2.1rem, 5vw, 3.75rem);
    letter-spacing: -0.03em;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
}

h3 {
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

p {
    margin: 0 0 1em;
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 3rem 0;
}

/* Layout primitives */

.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px;
}

.hero__copy,
.hero__lede,
.section-head,
.section-head p,
.assessment-group,
.feature,
.science__card,
.use-case,
.contact-form,
.contact__copy {
    min-width: 0;
}

section {
    padding: 96px 0;
}

.section-head {
    max-width: 720px;
    margin: 0 auto 56px;
    text-align: center;
}

.section-head .eyebrow {
    color: var(--brand);
}

.section-head p {
    font-size: 1.1rem;
    color: var(--ink-soft);
    margin: 0;
}

.eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 18px;
}

/* Logo */

.logo {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}

.logo img {
    height: 28px;
    width: auto;
    filter: brightness(0) saturate(100%) invert(17%) sepia(98%) saturate(604%) hue-rotate(142deg) brightness(96%) contrast(101%);
}

.logo img.logo-i {
    height: 20px;
    align-self: flex-end;
}

.logo--large {
    height: 96px;
    gap: 10px;
}

.logo--large img.logo-i {
    height: 72%;
}

.logo--on-dark img {
    filter: none;
}

.logo-word {
    font-family: var(--font-rounded);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin-left: 0;
}

.logo--on-dark .logo-word {
    color: #fff;
}

.logo--footer .logo-word {
    font-size: 2rem;
}

/* Navigation */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.site-nav.is-scrolled {
    border-bottom-color: var(--border);
    background: rgba(255, 255, 255, 0.92);
}

.site-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 24px;
}

.site-nav__links {
    display: flex;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav__links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ink-soft);
}

.site-nav__links a:hover {
    color: var(--brand);
}

.site-nav__cta {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    cursor: pointer;
    transition: transform 0.15s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
    white-space: nowrap;
}

.btn:active {
    transform: translateY(1px);
}

.btn--primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.28);
}

.btn--primary:hover {
    background: var(--accent-strong);
    color: #fff;
}

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--border-strong);
}

.btn--ghost:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.btn--large {
    padding: 16px 28px;
    font-size: 1rem;
}

/* Hero */

.hero {
    position: relative;
    padding: clamp(32px, 5vw, 72px) 0 clamp(72px, 10vw, 140px);
    background: linear-gradient(180deg, #f0fbfb 0%, #ffffff 100%);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("assets/brain.jpg");
    background-size: cover;
    background-position: center right;
    opacity: 0.08;
    filter: saturate(110%);
    pointer-events: none;
    z-index: 0;
}

.hero__inner {
    position: relative;
    z-index: 1;
}

.hero__copy {
    max-width: 720px;
}

.hero__headline {
    font-family: var(--font-rounded);
    margin-bottom: 20px;
}

.hero__headline em {
    font-style: normal;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-soft) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__lede {
    font-size: 1.2rem;
    color: var(--ink-soft);
    margin-bottom: 32px;
    max-width: 560px;
}

.hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero__meta {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    font-size: 0.9rem;
    color: var(--muted);
}

.hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero__meta span::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--brand-soft);
    border-radius: 50%;
}

/* Trust bar */

.trust {
    background: var(--surface-soft);
    padding: 48px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.trust__label {
    text-align: center;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 24px;
    font-weight: 600;
}

.trust__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 28px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.trust__list li {
    font-family: "JetBrains Mono", "SF Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9rem;
    color: var(--ink-soft);
    font-weight: 500;
}

.trust__list li + li::before {
    content: "·";
    color: var(--border-strong);
    margin-right: 28px;
    font-size: 1.2rem;
    vertical-align: middle;
}

/* Assessments grid */

.assessments {
    background: var(--surface);
}

.assessment-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.assessment-group {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.assessment-group:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--brand-soft);
}

.assessment-group__category {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 12px;
}

.assessment-group__title {
    font-size: 1.4rem;
    margin-bottom: 6px;
}

.assessment-group__desc {
    color: var(--body);
    font-size: 0.95rem;
    margin-bottom: 14px;
}

.assessment-group__standard {
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--muted);
}

.assessment-group__standard strong {
    color: var(--ink-soft);
    font-weight: 600;
}

.assessment-group__tests {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.assessment-chip {
    padding: 4px 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ink-soft);
}

/* Features grid */

.features {
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature {
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.feature:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.feature__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--brand-wash);
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.feature__icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.feature h3 {
    margin-bottom: 8px;
}

.feature p {
    margin: 0;
    color: var(--body);
    font-size: 0.97rem;
}

/* Science */

.science {
    background: var(--ink);
    color: #cbd5e1;
}

.science .section-head h2,
.science h3 {
    color: #fff;
}

.science .section-head p {
    color: #cbd5e1;
}

.science .eyebrow {
    color: var(--brand-soft);
}

.science__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.science__card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 24px;
    transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.science__card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(20, 184, 166, 0.4);
}

.science__card h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.science__card .science__cite {
    display: block;
    font-size: 0.78rem;
    color: var(--brand-soft);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.science__card p {
    margin: 0;
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.55;
}

.science__disclaimer {
    margin-top: 48px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: #94a3b8;
    text-align: center;
}

/* Use cases */

.use-cases {
    background: var(--surface);
}

.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.use-case {
    padding: 32px 28px;
    border-radius: var(--radius-lg);
    background: var(--surface-soft);
    border: 1px solid var(--border);
    transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.use-case:hover {
    transform: translateY(-3px);
    border-color: var(--brand-soft);
}

.use-case__label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 12px;
}

.use-case h3 {
    font-size: 1.2rem;
    margin-bottom: 6px;
}

.use-case p {
    margin: 0;
    color: var(--body);
    font-size: 0.95rem;
}

/* Contact */

.contact {
    background: linear-gradient(135deg, var(--surface-tint) 0%, var(--brand-wash) 100%);
}

.contact__layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 72px;
    align-items: start;
}

.contact__copy h2 {
    margin-bottom: 20px;
}

.contact__copy p {
    color: var(--ink-soft);
    font-size: 1.05rem;
}

.contact__points {
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
    display: grid;
    gap: 14px;
}

.contact__points li {
    display: flex;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--body);
}

.contact__points li::before {
    content: "";
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath d='M6.5 10.5l2.5 2.5 4.5-5' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
    margin-top: 2px;
}

.contact-form {
    background: #fff;
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: grid;
    gap: 18px;
}

.contact-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.field label .required {
    color: var(--brand);
    margin-left: 2px;
}

.field input,
.field select,
.field textarea {
    font: inherit;
    font-size: 0.97rem;
    padding: 12px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
    min-width: 0;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}

.field textarea {
    min-height: 130px;
    resize: vertical;
    font-family: inherit;
}

.field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='%2364748b'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.form-status {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    display: none;
}

.form-status.is-error {
    display: block;
    background: var(--danger-wash);
    color: var(--danger);
    border: 1px solid #fecaca;
}

.form-success {
    display: none;
    text-align: center;
    padding: 48px 32px;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.form-success.is-visible {
    display: block;
}

.form-success__mark {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.form-success__mark svg {
    width: 32px;
    height: 32px;
}

.form-success h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.form-success p {
    margin: 0;
    color: var(--ink-soft);
}

/* Footer */

.site-footer {
    background: var(--ink);
    color: #94a3b8;
    padding: 64px 0 40px;
}

.site-footer__top {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr));
    gap: 48px;
    margin-bottom: 48px;
}

.site-footer__brand p {
    margin: 18px 0 0;
    font-size: 0.9rem;
    color: #94a3b8;
    max-width: 280px;
}

.site-footer__brand p.site-footer__tagline {
    font-family: var(--font-rounded);
    font-size: 1.05rem;
    font-weight: 700;
    color: #e2e8f0;
    line-height: 1.35;
    margin-top: 14px;
    max-width: 320px;
}

.site-footer__tagline em {
    font-style: normal;
    background: linear-gradient(135deg, var(--brand-soft) 0%, #5eead4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-footer h4 {
    color: #fff;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.site-footer a {
    color: #cbd5e1;
    font-size: 0.92rem;
}

.site-footer a:hover {
    color: var(--brand-soft);
}

.site-footer__bottom {
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--muted);
}

.site-footer__bottom a {
    font-size: 0.85rem;
}

/* Legal pages */

.legal {
    padding: 72px 0 96px;
}

.legal__wrap {
    max-width: 760px;
    margin: 0 auto;
}

.legal__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 24px;
    color: var(--muted);
}

.legal__back:hover {
    color: var(--brand);
}

.legal__meta {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 28px;
}

.legal h2 {
    font-size: 1.15rem;
    margin: 32px 0 10px;
    color: var(--ink);
}

.legal p {
    color: var(--body);
    font-size: 0.97rem;
}

/* Reveal animation — progressive enhancement.
   Elements are visible by default; only hidden once JS has confirmed it can
   restore them via IntersectionObserver. */

.js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    will-change: opacity, transform;
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

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

    .js .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Nav toggle (mobile) */

.site-nav__toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--ink);
}

.site-nav__toggle svg {
    width: 24px;
    height: 24px;
}

/* Responsive */

@media (max-width: 860px) {
    section {
        padding: 72px 0;
    }

    .hero {
        padding: 32px 0 72px;
    }

    .contact__layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-form {
        padding: 28px;
    }

    .contact-form__row {
        grid-template-columns: 1fr;
    }

    .site-footer__top {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .site-nav__links {
        display: none;
    }

    .site-nav__toggle {
        display: inline-flex;
    }

    .site-nav.is-open .site-nav__links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--border);
        padding: 20px 24px;
        gap: 16px;
    }
}

@media (max-width: 560px) {
    .container {
        padding: 0 18px;
    }

    .site-nav__inner {
        gap: 10px;
    }

    .site-nav__cta {
        gap: 8px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .site-footer__top {
        grid-template-columns: 1fr;
    }

    .trust__list li + li::before {
        display: none;
    }

    .trust__list {
        gap: 10px;
    }

    .hero__meta {
        gap: 14px;
    }
}
