:root {
    --bg-color: #FAFAFA;
    --text-primary: #1A1A1A;
    --text-secondary: #666666;
    --accent: #2A4B7C;
    /* Medical Deep Blue */
    --accent-light: #4A6B9C;
    --glass-bg: rgba(250, 250, 250, 0.85);
    --border-color: #E5E5E5;

    /* Typography & Golden Ratio */
    --font-main: 'Manrope', sans-serif;
    --phi: 1.618;
    --base-size: 1rem;

    /* Scale: Base * Phi^n */
    --h1-size: 4.236rem;
    /* ~67px */
    --h2-size: 2.618rem;
    /* ~42px */
    --h3-size: 1.618rem;
    /* ~26px */
    --body-size: 1rem;
    --small-size: 0.618rem;

    /* Spacing: Fibonacci-ish / Phi based */
    --space-unit: 1rem;
    --space-sm: calc(var(--space-unit) * 1);
    --space-md: calc(var(--space-unit) * 1.618);
    /* ~26px */
    --space-lg: calc(var(--space-unit) * 2.618);
    /* ~42px */
    --space-xl: calc(var(--space-unit) * 4.236);
    /* ~68px */
    --space-xxl: calc(var(--space-unit) * 6.854);
    /* ~110px */
    --space-huge: calc(var(--space-unit) * 11.089);
    /* ~177px */

    --transition-speed: 0.4s;
    --easing: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.618;
    /* Golden Ratio Line Height */
    overflow-x: hidden;
    cursor: default;
    font-size: var(--body-size);
}

::selection {
    background: var(--text-primary);
    color: var(--bg-color);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: var(--space-sm) 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

/* Navbar inner wrapper for alignment */
.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Logo */
.brand-logo {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: opacity 0.3s ease;
}

.brand-logo:hover {
    opacity: 0.7;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-divider {
    color: var(--text-secondary);
    opacity: 0.3;
    user-select: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition-speed) var(--easing);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    padding-top: 100px;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    max-width: 900px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s var(--easing) forwards;
}

.subtitle {
    display: block;
    font-size: 0.9rem;
    color: var(--accent);
    letter-spacing: 0.2em;
    margin-bottom: var(--space-md);
    font-weight: 600;
    text-transform: uppercase;
}

h1 {
    font-size: var(--h1-size);
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.description {
    font-size: 1.125rem;
    /* slightly larger lead */
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    /* improved reading line length */
    font-weight: 300;
    line-height: 1.7;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--bg-color);
    background-color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition-speed) var(--easing);
}

.btn-primary:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(42, 75, 124, 0.15);
}

.btn-primary svg {
    transition: transform var(--transition-speed) var(--easing);
}

.btn-primary:hover svg {
    transform: translateX(2px) translateY(-2px);
}

/* Features Grid / Products */
.features {
    min-height: 80vh;
    /* Maintain substantial feel */
    padding: var(--space-xl) 5%;
    /* Reduced from huge */
    max-width: 1400px;
    margin: 0 auto;
    border-top: 1px solid var(--border-color);
    position: relative;

    /* Flexbox Distribution */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Fix for left-aligned header */
    gap: calc(var(--space-lg) * 1.2);
    /* Increased by 20% from space-lg */

    /* Subtle Background */
    background: radial-gradient(circle at center, #fbfbfb 0%, var(--bg-color) 70%);
}

.section-header {
    text-align: center;
    margin-bottom: 0;
    /* Removed margin to rely purely on flex gap layout */
    max-width: 800px;
}

.section-header h2 {
    font-size: var(--h2-size);
    font-weight: 300;
    color: var(--text-primary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    /* Increased min-width for premium feel */
    gap: var(--space-lg);
    width: 100%;
}

.feature-card {
    padding: 2rem 0;
    opacity: 0;
    /* JS will animate */
    transform: translateY(20px);
}

.feature-card h2 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    /* More visible */
    margin-bottom: 1rem;
    font-weight: 400;
}

.feature-card h3 {
    font-size: var(--h3-size);
    margin-bottom: var(--space-sm);
    font-weight: 400;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.618;
}

/* Product Card Specifics */
.product-card {
    text-decoration: none;
    color: inherit;
    position: relative;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: var(--space-lg);
    background: #fff;
    transition: all 0.3s var(--easing);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 380px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.product-card.active-product:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(42, 75, 124, 0.1);
}

/* Card Bottom Alignment */
.card-bottom {
    margin-top: auto;
    /* Pushes element to bottom */
    width: 100%;
    display: flex;
    align-items: center;
}

.active-link {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.active-product:hover .active-link {
    gap: 0.8rem;
}

.locked-product {
    opacity: 0.9;
    cursor: default;
    background: #F5F5F5;
    border: 1px solid #E8E8E8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.locked-product:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
    border-color: #D8D8D8;
    opacity: 1;
}

.lock-icon {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 1.3rem;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.locked-product:hover .lock-icon {
    opacity: 0.7;
}

.badge-soon {
    display: inline-block;
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Newsletter Waitlist Section */
.waitlist-section {
    padding: var(--space-xl) 5%;
    text-align: center;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    border-top: 1px solid var(--border-color);
}

.section-header-small h3 {
    font-size: var(--h2-size);
    font-weight: 300;
    margin-top: 0.5rem;
    color: var(--text-primary);
}

.btn-secondary {
    background: none;
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
    padding: 0.8rem 2rem;
    font-size: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--text-primary);
    color: #fff;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 200;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: #fff;
    padding: 3rem;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    text-align: center;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
}

.modal-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 400;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    text-align: center;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-content input {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.modal-content input:focus {
    outline: none;
    border-color: var(--accent);
}

.success-message {
    margin-top: 1rem;
    color: #27ae60;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.check-icon {
    font-size: 2rem;
}

/* Footer */
footer {
    padding: var(--space-md) 5%;
    border-top: 1px solid #333;
    background: #111111;
    color: #e5e5e5;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    font-size: 0.85rem;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
}

.brand-divider {
    color: var(--accent);
    opacity: 0.8;
    user-select: none;
}

.footer-brand h4 {
    font-size: 1rem;
    font-weight: 500;
    color: #ffffff;
    /* White text for contrast */
    margin: 0;
    white-space: nowrap;
}

.footer-brand p {
    font-size: 0.85rem;
    color: #999999;
    /* Lighter gray for secondary text */
    margin: 0;
    white-space: nowrap;
}

.footer-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-left: 0;
}

.footer-links a {
    text-decoration: none;
    color: #cccccc;
    /* Light gray for links */
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ffffff;
    /* White on hover */
}

.footer-meta {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.footer-meta a {
    text-decoration: none;
    color: #888888;
    /* Dimmed legal links */
    font-size: 0.8rem;
    font-weight: 400;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.footer-meta a:hover {
    color: #ffffff;
}

.footer-meta svg {
    margin-left: 0;
}

.footer-utils {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.footer-legal {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.footer-legal a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 400;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--accent);
}

.footer-social {
    display: flex;
    align-items: center;
}

.footer-social a {
    color: #ffffff;
    /* White for contrast on dark bg */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.footer-social a:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.footer-copyright {
    font-size: 0.75rem;
    color: #999999;
    /* Light gray for dark footer */
    white-space: nowrap;
}

.link-divider {
    color: #666666;
    /* Visible gray */
    opacity: 0.5;
    user-select: none;
}

.footer-bottom {
    display: none;
    /* Remove bottom section, consolidate into single row */
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Keyframes */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contact Section */
.contact {
    min-height: 60vh;
    /* Substantial but smaller than features */
    padding: var(--space-xl) 5%;
    background: radial-gradient(circle at center, #fbfbfb 0%, var(--bg-color) 70%);
    display: flex;
    flex-direction: column;
    /* Ensure vertical stacking */
    justify-content: center;
    align-items: center;
    /* Center horizontally */
    border-top: 1px solid var(--border-color);
}

.contact-content {
    max-width: 700px;
    text-align: center;
}

.contact h2 {
    font-size: var(--h2-size);
    font-weight: 300;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.contact p {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    font-size: 1.125rem;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: gap 0.3s ease;
}

.link-arrow:hover {
    gap: 1rem;
}

/* Mobile Nav Overlay */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    z-index: 99;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateY(-100%);
    transition: transform 0.5s var(--easing);
}

.mobile-nav.active {
    transform: translateY(0);
}

.mobile-link {
    font-size: 2rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 300;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s var(--easing);
}

.mobile-nav.active .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-link.emphasis {
    color: var(--accent);
    font-weight: 500;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.hamburger-menu span {
    display: block;
    width: 24px;
    height: 1.5px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

/* Hamburger Animation State */
body.menu-open .hamburger-menu span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

body.menu-open .hamburger-menu span:nth-child(2) {
    transform: rotate(-45deg) translate(1px, -1px);
    /* simplified cross */
}

/* We only used 2 spans in HTML for a cleaner cross, or can use 3. Let's assume 2 for a minimal cross */


/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }

    .features {
        padding: 4rem 5%;
        grid-template-columns: 1fr;
        /* Single column on mobile */
    }

    .hero {
        padding-top: 100px;
        align-items: flex-start;
        /* Align top on mobile */
        height: auto;
        min-height: 90vh;
    }

    .contact {
        padding: 5rem 5%;
    }

    .contact h2 {
        font-size: 2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        padding: 2rem 5%;
    }

    .footer-brand {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-brand .brand-divider {
        display: none;
    }

    .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
    }

    .footer-meta {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-utils {
        flex-wrap: wrap;
        justify-content: center;
    }

    .link-divider {
        display: inline;
    }
}

/* Coming Soon Modal Styles */
.coming-soon-modal {
    text-align: center;
}

.coming-soon-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.coming-soon-modal h3 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.coming-soon-modal p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Cursor Glow Effect */
.cursor-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(42, 75, 124, 0.08) 0%, rgba(255, 255, 255, 0) 60%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
    left: 50%;
    top: 50%;
    transition: opacity 0.5s ease;
}

@media (max-width: 768px) {
    .cursor-glow {
        display: none;
    }
}

/* Language Toggle Switch */
.lang-toggle {
    padding: 0.5rem 1rem;
    background: #ffffff;
    /* White bg for dark footer */
    color: #111111;
    /* Dark text */
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-option {
    opacity: 0.5;
    transition: all 0.3s ease;
    cursor: pointer;
}

.lang-option.active {
    opacity: 1;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.lang-option:hover {
    opacity: 0.8;
}

.lang-divider {
    opacity: 0.5;
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
    padding: 1.5rem 5%;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.4s var(--easing);
    border-top: 2px solid var(--accent);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-content p {
    margin: 0;
    flex: 1;
    min-width: 250px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-small {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
}

/* Cookie banner specific button overrides */
.cookie-banner .btn-primary {
    background-color: var(--accent);
    color: #fff;
}

.cookie-banner .btn-primary:hover {
    background-color: #3a5b8c;
}

.cookie-banner .btn-secondary {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.8);
}

.cookie-banner .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.cookie-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
}

.cookie-link:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .cookie-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* EU Funding Section */
.funding-section {
    min-height: 60vh;
    padding: var(--space-xl) 5%;
    background-color: #e5e5e5;
    /* Darker gray for better contrast */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-top: 1px solid var(--border-color);
}

.funding-content {
    max-width: 900px;
    width: 100%;
    text-align: center;
}

.funding-content .subtitle {
    display: block;
    font-size: 0.9rem;
    color: var(--accent);
    letter-spacing: 0.2em;
    margin-bottom: var(--space-md);
    font-weight: 600;
    text-transform: uppercase;
}

.funding-content h2 {
    font-size: var(--h2-size);
    font-weight: 300;
    margin-bottom: var(--space-xl);
    color: var(--text-primary);
}

.funding-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
}

.eu-logos {
    max-width: 100%;
    width: 100%;
    height: auto;
    max-height: 200px;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.eu-logos:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .funding-section {
        min-height: 50vh;
    }

    .funding-content h2 {
        font-size: 1.8rem;
    }

    .eu-logos {
        max-height: 140px;
    }
}