/* Global Styles */

:root {
    /* Medotrax Design Tokens */
    --color-primary: #3B3D99; /* Medotrax Purple */
    --color-primary-600: #2f327a;
    --color-secondary: #B290E4; /* Soft lavender for gradients */
    --color-accent: #FF8A3D; /* Orange, use sparingly */
    --color-text: #2a2a2a;
    --color-bg: #fbfbfd; /* Apple-like near-white */
    /* Offset for sticky header when jumping to in-page anchors */
    --header-offset: 90px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "Avenir Next", sans-serif;
    margin: 0;
    padding: 0;
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.7;
    font-size: 20px;
}

* {
    box-sizing: border-box;
}

/* Ensure anchor jumps account for sticky header height */
:target {
    scroll-margin-top: calc(var(--header-offset) + 10px);
}
#product-section,
#team-section,
#about-section,
#collaborators-section,
#brainchex {
    scroll-margin-top: calc(var(--header-offset) + 10px);
}

/* Generic container for wide sections */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "Avenir Next", sans-serif;
    letter-spacing: -0.018em;
    margin: 0;
    padding: 0;
}

h1 {
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 700;
    line-height: 1.08;
    color: var(--color-primary);
}

h2 {
    font-size: clamp(30px, 4.6vw, 46px);
    font-weight: 500;
    line-height: 1.16;
    color: var(--color-primary);
}

h3 {
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 500;
    line-height: 1.24;
    color: var(--color-text);
}

h4 {
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
    margin: 0;
    color: inherit;
}

/* Header Styles */

.medotrax-logo {
    width: 140px;
    height: auto;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    max-width: min(1200px, 100%);
    background-color: #ffffff;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
    margin: 0 auto;
}

nav {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(59, 61, 153, 0.08);
    padding: 6px 10px;
    border-radius: 9999px;
}

nav a {
    font-size: 16px;
    font-weight: 500;
    padding: 6px 14px;
    text-decoration: none;
    transition: all 0.25s ease;
    color: var(--color-primary);
    border-radius: 9999px;
}

nav a:hover {
    background: rgba(59, 61, 153, 0.16);
    color: #ffffff;
}

nav a:focus-visible {
    outline: 2px solid rgba(59, 61, 153, 0.4);
    outline-offset: 2px;
}

nav ul {
    list-style-type: none;
    padding-left: 0;
}

nav li {
    display: inline-block;
    margin-right: 20px;
}

.hamburger-menu-button {
    display: none;
}

/* Ensure any leftover mobile overlay markup never shows */
.hamburger-menu-content,
.close-menu-btn {
    display: none !important;
}

.hamburger-menu-icon {
    display: block;
    width: 30px;
    height: 3px;
    background-color: #333;
    position: relative;
}

.hamburger-menu-icon::before,
.hamburger-menu-icon::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: #333;
    left: 0;
}

/* Legacy image-based hero removed in favor of .hero */
/* Apply Blocksatz (Justify) to Text */
p, li, .feature-description, .digital-tools-text, .about-text, .tabs-container, .merge-text, .section-content {
    text-align: left;
}

/* Legacy image-based hero fully removed in favor of .hero */

/* New image-free Hero */
.hero {
    background: linear-gradient(180deg, rgba(178,144,228,0.08) 0%, rgba(59,61,153,0.04) 100%);
    padding: 72px 0 40px; /* reduce bottom spacing to bring next box closer */
}

.hero-title {
    margin: 0 0 10px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.08;
    font-size: clamp(36px, 5.4vw, 60px);
    color: var(--color-primary);
}

.hero-subtitle {
    margin: 8px 0 0;
    max-width: 820px;
    color: #4a4a4a;
    font-size: clamp(16px, 2.2vw, 20px);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-ctas {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 16px;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 6px 14px rgba(59,61,153,0.18);
}
.btn-primary:hover { background: var(--color-primary-600); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

/* Accent CTA (orange) */
.btn-accent {
    background: var(--color-accent);
    color: #fff;
    box-shadow: 0 6px 14px rgba(255,138,61,0.28);
}
.btn-accent:hover { background: #ff7a20; transform: translateY(-1px); }
.btn-accent:active { transform: translateY(0); }

.btn-link {
    color: var(--color-primary);
    text-decoration: underline;
}
.btn-link:hover { color: #2f327a; }

/* .cta-button legacy removed; use .btn/.btn-primary/.btn-link */

/* General Section Styles */
.section-content {
    font-size: 16px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0px 8px 28px rgba(0, 0, 0, 0.05);
    margin: 16px auto;
    max-width: 1200px;
    padding-top: 20px;
}

/* Make the first box flush with the hero band */
#product-section.section-content { margin-top: 0; }

.section-content h2 {
    text-align: center;
    margin: 6px auto 16px;
    max-width: 720px;
}

.section-content h2.mega-heading {
    font-size: clamp(34px, 5vw, 50px);
    font-weight: 500;
    letter-spacing: -0.022em;
    line-height: 1.12;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
}

.digital-tools-text p {
    font-size: clamp(17px, 1.9vw, 19px);
    line-height: 1.62;
    letter-spacing: -0.006em;
    color: rgba(42, 42, 42, 0.9);
    margin-bottom: 14px;
}

.spotlight-copy {
    text-align: left;
    max-width: 620px;
    margin: 0;
    font-size: clamp(17px, 1.9vw, 19px);
    line-height: 1.62;
    letter-spacing: -0.006em;
    color: rgba(42, 42, 42, 0.9);
}

.spotlight-copy p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.section-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.1);
    margin-top: 0px;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.two-columns {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}

.two-columns > div {
    flex-basis: 100%;
}

/* Digital Tools Block Styling */
.digital-tools-block {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    align-items: center;
}

/* Digital Tools Image Styling */
.digital-tools-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.digital-tools-media picture {
    width: 100%;
    max-width: 640px;
}

.digital-tools-media img {
    width: 100%;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(59, 61, 153, 0.15);
    background: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, rgba(236,233,250,0.9) 100%);
    padding: 12px;
    object-fit: contain;
}

.digital-tools-media figcaption {
    font-size: 14px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(42, 42, 42, 0.7);
}

.responsive-img {
    width: 100%;
    height: auto;
}

/* Vision Styles */
.icon-list {
    list-style: none;
    padding: 0;
    margin-left: 0px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.icon-list li {
    display: flex;
    align-items: start;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
}

.icon-list i {
    margin-right: 15px;
    font-size: 22px;
    flex-shrink: 0;
    color: var(--color-primary);
}

/* Product Page Styles */
.merge-text {
    flex: 1;
    padding: 0px;
    flex-basis: 100%;
}

.tabs-container {
    text-align: center;
    margin-bottom: 20px;
}

.tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(59, 61, 153, 0.06);
    padding: 4px;
    border-radius: 9999px;
}

.tab-link {
    background-color: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 10px 16px;
    transition: background-color 0.25s, color 0.25s, box-shadow 0.25s;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    color: var(--color-primary);
    border-radius: 9999px;
}

.tab-link:hover {
    background-color: rgba(59, 61, 153, 0.12);
}

.tab-link.active {
    position: relative;
    font-weight: 700;
    color: #fff;
    background: var(--color-primary);
    box-shadow: 0 6px 14px rgba(59,61,153,0.18);
}

.tab-content {
    display: none;
    padding: 0px;
}

/* Product Slider */
.product-intro {
    max-width: none;
    width: 100%;
    margin: 8px 0 18px;
    text-align: justify;
    text-justify: inter-word;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    color: #3c3c3c;
    font-size: clamp(17px, 1.9vw, 19px);
    line-height: 1.62;
}

.product-slider {
    margin-top: 14px;
}

/* Left-align heading specifically in product section */
#product-section h2 {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.product-slider .swiper {
    padding: 8px 10px 36px;
    max-width: 1100px; /* make cards wider */
    margin: 0 auto;
    position: relative;
}

/* Product tabs spacing above slider */
.product-tabs { margin: 6px 0 6px; }

/* Swipe hint styles */
.swipe-hint {
    position: absolute;
    right: 10px;
    bottom: 6px;
    background: rgba(59,61,153,0.92);
    color: #fff;
    padding: 6px 10px;
    border-radius: 9999px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 8px 16px rgba(59,61,153,0.25);
    z-index: 5;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none; /* don't block clicks */
}
.swipe-hint.is-visible { opacity: 1; transform: translateY(0); }
.swipe-hint.is-hidden { display: none; }
.swipe-hint .hint-arrow { display: inline-block; animation: hint-nudge 1.2s ease-in-out infinite; }
@keyframes hint-nudge { 0%{ transform: translateX(0); } 50%{ transform: translateX(4px);} 100%{ transform: translateX(0);} }
@media (prefers-reduced-motion: reduce) { .swipe-hint .hint-arrow { animation: none; } }

/* Fraction pagination positioning */
.swiper-pagination-fraction { bottom: 6px !important; left: 12px !important; width: auto !important; right: auto !important; color: var(--color-primary); font-weight: 600; }

.product-slider .swiper-slide {
    width: auto; /* allow Swiper to compute width; enables next-card peek */
    height: auto;
    display: flex;
    align-items: flex-start; /* prevent the card from stretching to slide height */
}

.product-card {
    background: #fff;
    border-radius: 18px;
    padding: 22px 22px 20px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.06), 0 2px 8px rgba(59,61,153,0.06);
    border: 1px solid rgba(59, 61, 153, 0.08);
    height: clamp(480px, 60vh, 560px);
    display: flex;
    flex-direction: column;
}

/* Split layout for BraincheX card: copy left, media right */
.product-card--split .product-split {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 22px;
    flex: 1;
    min-height: 0;
}

/* Card footer actions aligned bottom-left */
.product-actions { margin-top: 12px; margin-bottom: 10px; }
.product-actions .btn { height: 38px; padding: 0 14px; font-size: 15px; }

/* Hub card: side-by-side layout with text 40–45% and media 55–60% */
.product-card--hub .product-split {
    grid-template-columns: 0.30fr 0.70fr; /* left copy ~30–40%, right media ~70% */
    grid-template-areas: "copy media";
    gap: 22px;
}
.product-card--hub .hub-collage { grid-area: media; }
.product-card--hub .product-copy { grid-area: copy; }

.product-card--split .product-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.product-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.product-card h3 {
    color: var(--color-primary);
}

/* BraincheX header: logo + title alignment */
.product-card--brainchex .product-card-header .product-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.product-card--brainchex .product-card-header .product-logo {
    height: 34px; /* increased for better legibility */
    width: auto;
    display: block;
}
@media (max-width: 480px) {
    .product-card--brainchex .product-card-header .product-logo { height: 28px; }
}

.badge-available { background: #27b06e; }
.badge-soon { background: #8b8ea3; }

.product-media {
    width: 100%;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(236,233,250,0.9) 100%);
    box-shadow: inset 0 0 0 1px rgba(59, 61, 153, 0.06);
    display: grid;
    place-items: center;
    margin: 8px 0 14px;
    height: clamp(220px, 28vh, 260px);
    overflow: hidden;
}

/* Generic media image fit within product-media */
.product-media img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* BrainGuide (formerly CogniPATH) logo sizing override so full logo is visible and not cropped */
.product-card--cognipath .product-media img {
    width: auto;          /* let height constraint drive sizing */
    height: auto;
    max-height: 180px;    /* slightly larger but still contained */
    max-width: 68%;       /* increase width a bit while keeping margins */
    object-fit: contain;  /* ensure no distortion */
    margin: 0 auto;       /* center within media container */
    padding: 8px 0;       /* breathing space top/bottom */
}

/* Remove lavender background for CogniPATH logo/media */
.product-card--cognipath .product-media {
    background: transparent;
    box-shadow: none;
}

/* Allow the BrainGuide media container to size to content and avoid clipping */
.product-card--cognipath .product-media { height: auto; overflow: visible; }

@media (max-width: 600px) {
    .product-card--cognipath .product-media { height: auto; overflow: visible; }
    .product-card--cognipath .product-media img { max-height: 150px; max-width: 72%; }
}

/* BraincheX card: stacked media, fully scoped to avoid affecting other cards */
.product-card--brainchex .media-stack {
    position: relative;
    height: clamp(150px, 18vh, 180px); /* further reduced overall stack height for better harmony */
}

/* Slightly lower the image stack within the BraincheX split card */
.product-card--brainchex .media-stack {
    align-self: start; /* anchor near top of the right column */
    margin-top: 84px;  /* pushed further down within the card on wide screens */
    margin-bottom: 0;
}

.product-card--brainchex .media-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 66%;
    max-width: 380px;
    background: #fff;
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.10), 0 1px 6px rgba(59,61,153,0.10);
}

.product-card--brainchex .media-frame img { width: 100%; height: auto; display: block; border-radius: 10px; }

.product-card--brainchex .frame-left  { transform: translate(-58%, -50%) rotate(-0.8deg); width: 52%; z-index: 1; }
.product-card--brainchex .frame-center{ transform: translate(-50%, -50%) rotate(0deg);   width: 64%; z-index: 2; }
.product-card--brainchex .frame-right { transform: translate(-42%, -50%) rotate(0.8deg);  width: 52%; z-index: 1; }

.dashboard-mockup picture, .dashboard-mockup img { width: 100%; height: 100%; display: block; object-fit: contain; }
.dashboard-mockup { height: 100%; padding: 10px; }

.illustration-mockup { height: 100%; }
.illustration-mockup .illustration {
    width: 70%; height: 70%; border: 2px dashed rgba(59,61,153,0.3); border-radius: 12px;
}

/* Hub collage (scoped to Hub card) */
.product-card--hub .hub-collage {
    position: relative;
    height: clamp(300px, 45vh, 400px); /* larger visual ~70% of card height */
    border-radius: 14px;
}
.product-card--hub .product-copy { position: relative; z-index: 2; }
.product-card--hub .hub-collage { z-index: 1; }
.product-card--hub .hub-collage .collage-base {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}
.product-card--hub .hub-collage .collage-base img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(59,61,153,0.12);
}
.product-card--hub .hub-collage .collage-overlay {
    position: absolute;
    right: 1.5%;
    bottom: -10%; /* allow the PDF card to overhang below the dashboard */
    width: 28%; /* larger for readability */
    min-width: 220px; /* ensure legibility on medium screens */
    max-width: 380px; /* avoid overwhelming the collage on very wide screens */
    transform: rotate(1deg);
    background: #fff;
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 10px 26px rgba(0,0,0,0.10), 0 2px 8px rgba(59,61,153,0.12);
}
.product-card--hub .hub-collage .collage-overlay img { width: 100%; height: auto; display: block; border-radius: 10px; }

/* Between 900px and 769px, show only the dashboard (hide the phone/PDF overlay)
   and keep the card compact by reducing collage height and spacing */
@media (max-width: 900px) and (min-width: 769px) {
    .product-card--hub .hub-collage { height: clamp(180px, 28vh, 240px); }
    .product-card--hub .hub-collage .collage-overlay { display: none; }
    .product-card--hub .product-actions { margin-top: 6px; }
    .product-card--hub .product-lead { margin: 0 0 6px; }
    .product-card--hub .product-points { gap: 5px; }
}

@media (max-width: 600px) {
    .product-card--hub .hub-collage { height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; }
    .product-card--hub .hub-collage .collage-base, .product-card--hub .hub-collage .collage-overlay { position: relative; inset: auto; right: auto; bottom: auto; transform: none; width: 100%; padding: 6px; }
    .product-card--hub .hub-collage .collage-base img { width: 100%; }
}

.product-lead {
    font-size: clamp(16px, 1.8vw, 18px);
    color: rgba(42,42,42,0.9);
    margin: 4px 0 12px;
}

.product-points {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
    font-size: 16px;
}

/* Subtle meta line under bullets */
.product-meta {
    margin-top: 8px;
    font-size: 14px;
    color: rgba(42,42,42,0.65);
}

/* Subtitle styling for cards */
.product-subtitle {
    font-size: clamp(14px, 1.6vw, 16px);
    color: rgba(42, 42, 42, 0.7);
    margin: 0 0 6px;
}

/* Card-scoped text sizing so changes don't leak between cards */
.product-card--brainchex .product-lead { font-size: clamp(16px, 1.8vw, 18px); }
.product-card--brainchex .product-points { font-size: 16px; }
.product-card--hub .product-lead { font-size: clamp(16px, 1.7vw, 18px); }
.product-card--hub .product-points { font-size: 16px; }

/* Balance layout vertically in CogniPATH and MRI cards */
.product-card--cognipath .product-split,
.product-card--boxmri .product-split {
    align-items: center; /* center columns vertically within the grid */
}
.product-card--cognipath .product-copy,
.product-card--boxmri .product-copy {
    justify-content: center; /* center text block within its column */
}
.product-card--cognipath .product-media,
.product-card--boxmri .product-media {
    align-self: center; /* ensure media sits centered too */
}
@media (max-width: 600px) {
    /* On mobile the grid collapses to a single column; keep natural flow */
    .product-card--cognipath .product-copy,
    .product-card--boxmri .product-copy { justify-content: flex-start; }
}

/* In split layout, bullets should follow the lead text directly */
.product-card--split .product-points {
    margin-top: 8px;
}
.product-card--brainchex .media-frame { opacity: 0.7; transition: transform .6s ease, opacity .6s ease, box-shadow .6s ease, z-index .6s ease; }
.product-card--brainchex .media-stack.state-1 .frame-center,
.product-card--brainchex .media-stack.state-2 .frame-left,
.product-card--brainchex .media-stack.state-3 .frame-right { opacity: 1; box-shadow: 0 16px 40px rgba(0,0,0,0.14), 0 3px 12px rgba(59,61,153,0.16); z-index: 3; }
.product-card--brainchex .media-stack.state-1 .frame-left,
.product-card--brainchex .media-stack.state-1 .frame-right,
.product-card--brainchex .media-stack.state-2 .frame-center,
.product-card--brainchex .media-stack.state-2 .frame-right,
.product-card--brainchex .media-stack.state-3 .frame-center,
.product-card--brainchex .media-stack.state-3 .frame-left { z-index: 2; }

@media (max-width: 600px) {
    .product-card {
        height: auto;
        padding: 14px 14px 8px; /* tighter spacing on very small screens */
    }
    .product-media {
        height: clamp(200px, 42vw, 260px);
    }
    .product-card--split .product-split { grid-template-columns: 1fr; row-gap: 10px; flex: 0 0 auto; }
    .product-card-header { margin-bottom: 6px; }
    .product-lead { margin: 2px 0 6px; }
    .product-card--split .product-points { gap: 6px; }
    /* BraincheX collage: hide on small phones to keep layout compact */
    .product-card--brainchex .media-stack { display: none; height: 0; margin-top: 0; }
    .product-card--brainchex .media-frame, .product-card--brainchex .media-frame img { display: none; }
    .product-card--brainchex .product-actions { margin-top: 8px; }
}

/* Swiper nav overrides to match site */
.swiper-button-next, .swiper-button-prev {
    width: 42px; height: 42px;
    background: #fff;
    border-radius: 9999px;
    box-shadow: 0 6px 14px rgba(59,61,153,0.14);
    border: 1px solid rgba(59,61,153,0.12);
    color: var(--color-primary);
}
.swiper-button-next:after, .swiper-button-prev:after { font-size: 16px; font-weight: 800; }
.swiper-nav { position: absolute; inset: 0; pointer-events: none; }
.swiper-button-next, .swiper-button-prev { pointer-events: auto; }
.swiper-pagination-bullet { background: rgba(59,61,153,0.4); opacity: 1; }
.swiper-pagination-bullet-active { background: var(--color-primary); }

/* Styling for Platform Section Feature Blocks */
.feature-block {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.feature-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "Avenir Next", sans-serif;
    font-weight: 600;
    font-size: 1.05em;
    margin-right: 0.5em;
    color: var(--color-primary);
}

.feature-description {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "Avenir Next", sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Mini badges for feature highlights */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    padding: 0 8px;
    border-radius: 9999px;
    background: var(--color-accent);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
    margin-left: 6px;
}

/* About Us Section Styling */
.section-content {
    background-color: #ffffff; /* unify to card white */
}

.content-wrapper {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* New About body copy layout */
.about-body {
    width: 100%;
    max-width: none; /* match other sections; inherit container width */
    margin: 0;
}
/* Team section styles */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    align-items: start;
}
.team-card {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 14px;
    align-items: center;
    background: #fff;
    border: 1px solid rgba(59,61,153,0.08);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.05);
}
.team-media { width: 88px; height: 88px; }
.team-photo {
    width: 88px; height: 88px;
    object-fit: cover; object-position: center;
    border-radius: 50%;
    display: block;
    box-shadow: 0 6px 16px rgba(59,61,153,0.14);
}
.team-name { font-size: 18px; margin: 0 0 4px; color: var(--color-primary); }
.team-role { margin: 0 0 6px; font-size: 14px; color: rgba(42,42,42,0.75); }
.team-bio { margin: 0; font-size: 15px; color: rgba(42,42,42,0.9); line-height: 1.5; }

@media (max-width: 600px) {
    .team-card { grid-template-columns: 64px 1fr; }
    .team-media, .team-photo { width: 64px; height: 64px; }
}
.about-body h3 { margin: 22px 0 12px; }
.about-body p {
    margin: 0 0 12px;
    font-size: clamp(17px, 1.9vw, 19px);
    line-height: 1.62;
    letter-spacing: -0.006em;
    color: rgba(42, 42, 42, 0.9);
}
.about-publication { margin-top: 6px; }
.about-sep {
    text-align: center;
    color: rgba(42,42,42,0.35);
    letter-spacing: 0.2em;
    margin: 16px auto;
}

/* Validation layout: text + visual grid */
.validation-layout {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 18px 24px;
    align-items: start;
    margin: 8px 0 8px;
}
.validation-visual { width: 100%; }
@media (max-width: 900px) {
    .validation-layout { grid-template-columns: 1fr; }
    /* Product cards: prevent overlap around tablet widths (~800-900px) */
    .product-card { height: auto; padding: 18px 18px 10px; }
    .product-card--split .product-split { grid-template-columns: 1fr; row-gap: 14px; flex: 0 0 auto; }
    .product-card--brainchex .product-actions,
    .product-card--hub .product-actions { margin-top: 8px; }
    .product-card-header { margin-bottom: 8px; }
    .product-lead { margin: 2px 0 8px; }
    .product-card--split .product-points { gap: 6px; }
    .product-card--brainchex .product-points { gap: 6px; }
    /* BraincheX collage: hide up to 900px width (tablets and smaller) */
    .product-card--brainchex .media-stack { display: none; height: 0; margin-top: 0; }
    .product-card--brainchex .media-frame { display: none; }
}

/* On very small screens, hide the BraincheX collage entirely to keep content compact */
@media (max-width: 560px) {
    /* keep CTA spacing tight on very small screens */
    .product-card--brainchex .product-actions { margin-top: 8px; }
}

/* ROC image card within validation visual */
.about-roc {
    width: 100%;
    margin: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(236,233,250,0.9) 100%);
    border: 1px solid rgba(59,61,153,0.08);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.06), 0 2px 8px rgba(59,61,153,0.06);
    padding: 10px;
}
.about-roc img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: none;
}
@media (max-width: 720px) {
    .about-roc { padding: 8px; }
}

/* Caption under ROC figure */
.about-roc figcaption {
    font-size: 13px;
    color: rgba(42,42,42,0.68);
    text-align: center;
    margin-top: 6px;
}

/* Tighter spacing before comparison block within About */
.about-body .compare-block { margin-top: 10px; }
.about-body .compare-heading { margin: 10px 0 8px; }

/* Reference styling under comparison table */
.about-reference {
    margin-top: 18px; /* extra space from the table */
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.06);
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 14px;
    color: rgba(42,42,42,0.75);
}
.about-reference .ref-label {
    color: rgba(42,42,42,0.6);
    font-weight: 600;
}
.about-reference .ref-text em { font-style: italic; }
.about-reference a { color: var(--color-primary); text-decoration: underline; }

/* Superscript reference mark in headings */
.ref-sup {
    font-size: 0.7em;
    vertical-align: super;
    line-height: 1;
}
.ref-sup a { color: inherit; text-decoration: none; }
.ref-sup a:hover { text-decoration: underline; }

/* Anchor target to position in-page scroll just above the reference */
.anchor-target {
    display: block;
    height: 0;
    scroll-margin-top: calc(var(--header-offset) + 16px);
}

/* Optional: highlight reference when navigated to */
.about-reference:target {
    background: rgba(236,233,250,0.35);
    border-radius: 8px;
}

/* Small gallery for project visuals (e.g., Cogscreen II) */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin: 4px 0 10px;
}
.project-fig {
    background: transparent;
    border: 1px solid rgba(59,61,153,0.06);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    padding: 6px;
    margin: 0;
}
.project-fig img {
    width: 100%;
    height: clamp(80px, 12vw, 120px);
    display: block;
    object-fit: contain;
    border-radius: 8px;
    filter: grayscale(25%) contrast(0.98) opacity(0.9);
}

/* Comparison table (About section) */
.compare-heading { margin: 18px 0 10px; color: var(--color-primary); }
.compare-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 22px rgba(16,24,40,0.06);
    border: 1px solid rgba(59,61,153,0.08);
}
.compare-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare-table th, .compare-table td { padding: 12px 14px; border-bottom: 1px solid rgba(0,0,0,0.06); vertical-align: top; }
.compare-table thead th { background: rgba(59,61,153,0.06); color: #2a2a2a; font-weight: 600; }
.compare-table th .sub { display: block; font-weight: 500; font-size: 12px; color: rgba(42,42,42,0.7); margin-top: 2px; }
.compare-table tbody tr:nth-child(odd) td { background: rgba(0,0,0,0.015); }
.compare-table th.compare-brand { color: var(--color-primary); }
.compare-table td:nth-child(3) { background: rgba(59,61,153,0.04); }

@media (max-width: 640px) {
    .compare-table { font-size: 14px; }
}

.about-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.about-image {
    height: auto;
    padding: 10px 0;
    margin-bottom: 15px;
    overflow: auto;
}

.about-image,
.about-text {
    width: 100%;
    max-width: 680px;
    margin: 0;
}

.responsive-img {
    max-width: 100%;
}

.about-block {
    display: flex;
    margin: 0;
    line-height: 1.55;
    margin-bottom: 30px;
    flex-wrap: nowrap;
}

.spotlight-copy p + p {
    margin-top: 12px;
}

.about-image {
    flex: 0 1 48%;
    margin: 0 10px;
}

.about-text {
    flex: 0 1 48%;
    margin: 0 10px;
    text-align: left;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

@media (max-width: 768px) {
    .about-block {
        flex-direction: column;
        align-items: center;
    }

    .about-image,
    .about-text {
        flex: 1 1 100%;
        margin: 0 0 15px 0;
    }

    .about-text {
        text-align: center;
    }
}


.collaborator-logos {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.collaborator-logo {
    max-width: 230px;
    height: auto;
    padding: 10px;
    transition: transform 0.3s ease-in-out;
}

.collaborator-logo:hover {
    transform: scale(1.05);
}

.dac-logo {
    max-width: 230px;
    height: auto;
    padding: 10px;
    transition: transform 0.3s ease-in-out;
}

.dac-logo:hover {
    transform: scale(1.05);
}

.lmu-logo {
    max-width: 230px;
    height: auto;
    padding: 10px;
    transition: transform 0.3s ease-in-out;
}

.lmu-logo:hover {
    transform: scale(1.05);
}

/* Contact section styles */
.contact-details {
    flex: 1;
    flex-basis: 100%;
}

.slogan-container {
    text-align: left;
    position: relative;
    z-index: 2;
    font-size: 24px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    width: 100%;
    margin: 0 auto;
    padding-right: 20px;
}

.email-link {
    color: #3a4ea0;
    text-decoration: none;
}

.email-link:hover {
    color: #2c3980;
    text-decoration: underline;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #3a4ea0;
}

.linkedin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-primary);
    color: white;
    padding: 10px 16px;
    border-radius: 9999px;
    text-decoration: none;
    font-size: 16px;
    margin-top: 10px;
    margin-bottom: 15px;
    box-shadow: 0 6px 14px rgba(59,61,153,0.18);
}

.linkedin-btn i {
    margin-right: 8px;
}

/* Footer Styles */
.site-footer {
    margin: 64px auto 32px;
    max-width: 1200px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(236, 233, 250, 0.88) 100%);
    border: 1px solid rgba(59, 61, 153, 0.08);
    box-shadow: 0 18px 40px rgba(59, 61, 153, 0.12);
    padding: 48px 0 24px;
    color: var(--color-text);
}

/* Collaborators marquee section */
.collaborators-marquee {
    padding: 10px 0;
    background: transparent; /* revert: no gradient bg */
}
.collaborators-marquee .marquee {
    position: relative;
    overflow: hidden;
    padding: 10px 0;
    /* edge fade */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.collaborators-marquee .marquee__track {
    display: inline-flex;
    align-items: center;
    gap: 38px;
    animation: marquee-scroll 28s linear infinite;
    will-change: transform;
}
.collaborators-marquee .marquee__item {
    width: 160px; /* slightly larger */
    height: 48px; /* slightly taller */
    object-fit: contain;
    object-position: center;
    filter: none; /* always show in color */
    opacity: 1;
    transition: none; /* no hover lift */
}
.collaborators-marquee .marquee:hover .marquee__track {
    animation-play-state: paused;
}
.collaborators-marquee .marquee__item:hover { transform: none; }

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 600px) {
    .collaborators-marquee .marquee__item { width: 140px; height: 36px; }
    .collaborators-marquee .marquee__track { gap: 26px; }
}

@media (prefers-reduced-motion: reduce) {
    .collaborators-marquee .marquee__track { animation: none; }
}

.site-footer .content-wrapper {
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-identity {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-identity h3 {
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 600;
    letter-spacing: -0.018em;
    color: var(--color-primary);
}

/* Footer logo styling */
.footer-logo {
    width: 160px;
    height: auto;
    display: block;
}

.footer-tagline {
    font-size: 16px;
    line-height: 1.65;
    max-width: 360px;
    color: rgba(42, 42, 42, 0.85);
}

.footer-nav h4,
.footer-contact h4 {
    color: var(--color-primary);
    margin-bottom: 10px;
}

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

.footer-nav a,
.footer-bottom a,
.footer-email,
.footer-linkedin {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-nav a:hover,
.footer-bottom a:hover,
.footer-email:hover,
.footer-linkedin:hover {
    color: var(--color-primary-600);
}

.footer-contact p {
    margin: 0 0 12px;
    line-height: 1.6;
    color: rgba(42, 42, 42, 0.9);
}

.footer-email {
    display: inline-block;
    margin-bottom: 12px;
}

.footer-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-top: 1px solid rgba(59, 61, 153, 0.12);
    padding-top: 18px;
    font-size: 14px;
    color: rgba(42, 42, 42, 0.75);
}

.footer-bottom-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* CC consent banner */
.cc-window {
    background-color: #3a4ea0 !important;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    max-width: none !important;
}

.cc-compliance {
    justify-content: center;
}

.cc-message {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.cc-btn {
    max-width: 200px;
    margin: 0 auto;
    display: block;
}

/* Media Queries */

/* Styles for screens under 425px */
@media (max-width: 425px) {
    .digital-tools-image {
        flex: 0 0 100%;
        margin-top: 0;
        margin-bottom: 0;
        padding: 0 10px; /* Optional: Add padding to reduce the gap */
    }

    .digital-tools-block {
        flex-direction: column;
        align-items: center; /* Center align the image */
    }

    .digital-tools-text {
        width: 100%; /* Full width */
        text-align: left; /* Consistent with Apple-like style */
        padding: 0; /* Remove unnecessary padding */
    }
}

/* Styles for screens from 425px to 768px (mobiles and tablets) */
@media (max-width: 768px) {
    :root { --header-offset: 120px; }
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 16px 18px;
    }

    nav {
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        gap: 10px;
        padding: 6px 6px;
    }

    nav::-webkit-scrollbar {
        display: none;
    }

    nav a {
        flex: 0 0 auto;
    }

    .medotrax-logo {
        width: 125px;
        height: auto;
    }

    .section-image img {
        max-width: 600px;
        max-height: 300px;
    }

    .container {
        width: 86%;
    }

    .digital-tools-block {
        grid-template-columns: 1fr;
    }

    /* Product cards: avoid overflow and reduce empty space */
    .product-card { height: auto; padding: 16px 16px 8px; }
    .product-card--split .product-split { grid-template-columns: 1fr; row-gap: 12px; flex: 0 0 auto; }
    .product-card--brainchex .product-actions,
    .product-card--hub .product-actions { margin-top: 8px; }
    /* If space is tight on mobile/small tablets, hide the entire Hub collage (both dashboard and overlay) */
    .product-card--hub .hub-collage { display: none; }
    .product-card-header { margin-bottom: 8px; }
    .product-lead { margin: 2px 0 8px; }
    .product-card--split .product-points { gap: 6px; }
    /* Ensure collage stays hidden in this range as well */
    .product-card--brainchex .media-stack { display: none; }
    .product-card--brainchex .media-frame, .product-card--brainchex .media-frame img { display: none; }
}

/* Styles for screens from 768px to 1024px (larger tablets and small desktops) */
@media (min-width: 768px) and (max-width: 1024px) {
    .slogan-container {
        font-size: 33px;
    }

    .section-content {
        font-size: 20px;
    }

    .icon-list li {
        font-size: 20px;
    }

    .hamburger-menu-button {
        display: none;
    }

    nav {
        display: flex;
        align-items: center;
        margin-left: auto;
    }

    nav a {
        margin: 0 10px;
    }

    /* removed legacy header contact button spacing; Contact now lives in nav */

    .medotrax-logo {
        width: 150px;
        height: auto;
    }

    .section-image img {
        max-width: 650px;
        max-height: 350px;
    }

    .container {
        width: 85%;
    }

    .digital-tools-block {
        flex-direction: row-reverse;
    }

    .digital-tools-image,
    .digital-tools-text {
        flex-basis: 50%;
    }

    .about-block {
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
    }

    .about-image,
    .about-text {
        max-width: 50%;
    }

    .about-text {
        text-align: left;
        padding-right: 20px;
    }

    .about-image {
        order: 2;
        padding-left: 20px;
        width: 50%;
    }

    .about-image img {
        max-height: none;
        width: 100%;
        height: auto;
        max-height: 500px;
    }
}

/* Styles for screens larger than 1024px */
@media (min-width: 1024px) {
    .slogan-container {
        font-size: 38px;
    }

    .section-content {
        font-size: 20px;
    }

    .icon-list li {
        font-size: 20px;
    }

    .hamburger-menu-button {
        display: none;
    }

    nav {
        display: flex;
        align-items: center;
        margin-left: auto;
    }

    nav a {
        margin: 0 10px;
    }

    /* removed legacy header contact button spacing; Contact now lives in nav */

    .medotrax-logo {
        width: 150px;
        height: auto;
    }

    .about-block {
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
    }

    .digital-tools-block {
        flex-direction: row-reverse;
    }

    .digital-tools-text {
        flex-basis: 50%;
    }

    .about-image,
    .about-text {
        max-width: 50%;
    }

    .about-text {
        text-align: left;
        padding-right: 20px;
    }

    .about-image {
        order: 2;
        padding-left: 20px;
    }

    .about-image img {
        width: 100%;
        height: auto;
        max-height: 500px;
        object-fit: cover;
    }
}
