:root {
    color-scheme: light only;

    --bg: #f7f9fc;
    --text: #1a1a1a;

    --dark: #0f172a;
    --dark-2: #1e293b;

    --primary: #00c8ff;
    --primary-dark: #00a8d6;

    --border: #e6e9ef;

    --radius: 12px;
    --radius-lg: 14px;

    --container-max: 1150px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Poppins", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    scroll-behavior: smooth;
}

.section:not(.dark) {
    background: var(--bg);
    color: var(--text);
}

.container {
    width: 90%;
    max-width: var(--container-max);
    margin: auto;
}

.navbar {
    position: fixed;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    padding: 15px 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 1px;
}

.logo img {
    width: 220px;
    height: auto;
    display: block;
}

nav a {
    margin-left: 30px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
}

nav a:hover {
    color: #ffffff;
}

.lang-switch,
.lang-switch a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.lang-switch a:hover {
    color: #ffffff;
}

.lang-switch .active-language {
    color: #ffffff;
    font-weight: 600;
}

.mobile-menu {
    display: none;
}

.btn-primary,
.btn-secondary,
.btn-outline {
    display: inline-block;
    text-decoration: none;
    font-weight: 600;
    border-radius: 30px;
}

.btn-primary {
    padding: 12px 30px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    cursor: pointer;
}

.btn-secondary {
    padding: 12px 30px;
    border: 1px solid #ffffff;
    color: #ffffff;
}

.btn-outline {
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: rgba(0, 200, 255, 0.12);
}

.hero {
    min-height: 85vh;
    padding: 110px 0 40px;

    display: flex;
    align-items: center;
    text-align: center;
    color: #ffffff;

    position: relative;
    overflow: hidden;

    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.75), rgba(30, 41, 59, 0.75)),
        url("../assets/back.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    z-index: 1;
}

.hero::before {
    content: "";
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 200, 255, 0.15), transparent 70%);
    top: -200px;
    right: -200px;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;

    min-height: calc(85vh - 150px);
    display: flex;
    flex-direction: column;
}

.hero-main {
    flex: 1; /* takes the available space above the support row */
    display: flex;
    flex-direction: column;
    justify-content: center; /* vertical centering */
    align-items: center;     /* horizontal centering */
}

.hero h1 {
    font-size: 42px;
    margin: 28px auto 20px;
}

.hero .disclaimer {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.60);
    margin: 8px auto 12px;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 0 rgba(0,0,0,0.12);
}

.hero p {
    max-width: 750px;
    margin: 0 auto 30px;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.hero-support {
    margin-top: auto;
    padding-top: 18px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;

    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}

.hero-support-label {
    font-weight: 600;
    opacity: 0.9;
}

.hero-support-logo {
    height: 28px;
    width: auto;
    display: inline-block;
}

.hero-support-text {
    opacity: 0.9;
    max-width: 90ch;
    font-size: 0.7rem;
}

.section {
    padding: 110px 0;
    text-align: center;
}

.section h2 {
    margin-bottom: 70px; /* tweak: 12–28px */
    line-height: 1.2;
}

/* optional: if a subtitle follows, you can make spacing tighter */
.section h2 + .section-subtitle {
    margin-top: -6px;   /* optional */
    margin-bottom: 22px; /* optional */
}

.section.dark {
    background: var(--dark);
    color: #ffffff;
}

.grid-cases,
.grid-2 {
    display: grid;
    gap: 60px;
    margin-top: 60px;
}

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

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.open-source-section {
    text-align: center;
}

.open-source-intro {
    max-width: 680px;
    margin: 18px auto 0;
}

.open-source-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    max-width: 820px;
    margin: 42px auto 0;
}

.open-source-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 190px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #ffffff;
    color: var(--text);
    text-align: left;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.open-source-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.open-source-label {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.open-source-card h3 {
    margin-top: 12px;
    font-size: 1.5rem;
}

.open-source-card p {
    margin-top: 10px;
    color: #475569;
    line-height: 1.55;
}

.section.dark .open-source-card {
    background: var(--dark-2);
    border-color: #2e3b55;
    color: #ffffff;
}

.section.dark .open-source-card p,
.section.dark .open-source-label {
    color: rgba(255, 255, 255, 0.76);
}

.open-source-link {
    margin-top: auto;
    color: var(--primary-dark);
    font-weight: 600;
}

.case:last-child {
    grid-column: span 2;
    justify-self: center;
    max-width: 400px;
}

.card,
.case {
    background: #ffffff;
    padding: 35px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.solution-card-image {
    display: block;
    width: min(100%, 420px);
    height: auto;
    aspect-ratio: 16 / 9;
    margin: 0 auto 20px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: #e2e8f0;
}

.section.dark .card,
.section.dark .case {
    background: var(--dark-2);
    border-color: #2e3b55;
}

.card:hover,
.case:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.case-tag {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 1px;
}

.video-section p {
    max-width: 700px;
    margin: 20px auto 50px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.video-wrapper iframe,
.video-wrapper video {
    width: 100%;
    height: 500px;
    border: none;
    display: block;
}

form {
    max-width: 600px;
    margin: 40px auto 0;
}

form input,
form textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: none;
}

.privacy-consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 2px 0 18px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.82rem;
    line-height: 1.45;
}

.privacy-consent input {
    width: auto;
    margin: 3px 0 0;
}

.privacy-consent a,
.footer-links a {
    color: inherit;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    font-size: 0.85rem;
}

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

.footer-linkedin img {
    width: 16px;
    height: 16px;
}

.legal-page {
    min-height: 100vh;
    padding: 48px 0 72px;
}

.legal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 52px;
}

.legal-header img {
    width: 180px;
    height: auto;
}

.legal-header a {
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: none;
}

.legal-content {
    max-width: 820px;
}

.legal-content h1 {
    margin-bottom: 22px;
    font-size: clamp(2rem, 5vw, 3rem);
}

.legal-content h2 {
    margin: 34px 0 10px;
    font-size: 1.25rem;
}

.legal-content p,
.legal-content li {
    color: #475569;
}

.legal-content ul {
    padding-left: 22px;
}

.legal-draft-notice {
    margin: 0 0 28px;
    padding: 16px 18px;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    background: #fffbeb;
    color: #78350f;
}

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

.form-message {
    margin-top: 20px;
}

.selfx-figure {
    max-width: 1000px;
    margin: 50px auto 0;
}

.selfx-screenshot {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.selfx-caption {
    margin-top: 14px;
    font-size: 14px;
    color: #6b7280;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(200px, 400px));
    justify-content: center;
    gap: 60px;
    margin-top: 60px;
    align-items: start;
}

.team-member p {
    color: #6b7280;
}

.team-role {
    margin-top: 2px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.section.dark .team-member .team-role {
    color: rgba(255, 255, 255, 0.85);
}

.section:not(.dark) .team-member .team-role {
    color: #374151;
}

.team-member img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 18px;
    border: 1px solid black;
}

.team-member h3 {
    margin-bottom: 6px;
}

.team-member p {
    color: #6b7280;
}

.team-linkedin {
    display: inline-block;
    margin-top: 10px;
    text-decoration: none;
    font-weight: 600;
    color: var(--primary);
}

.team-linkedin:hover {
    text-decoration: underline;
}

.testimonials .section-subtitle {
    max-width: 70ch;
    opacity: 0.85;
    margin-top: 0.5rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.testimonial-logo {
    height: 34px;          /* tweak: 28–40px depending on logo proportions */
    width: auto;
    display: block;
    margin: 0 auto 12px;

    /* full color (no filters) */
    filter: none;
    opacity: 1;
}

.testimonial-card {
    text-align: center; /* ensures logo + text align nicely */
}

.testimonial-quote {
    margin: 0;
    line-height: 1.6;
}

.testimonial-quote::before {
    content: "“";
}

.testimonial-quote::after {
    content: "”";
}

.testimonial-meta {
    margin-top: 1rem;
    opacity: 0.9;
}

.testimonial-name {
    font-weight: 600;
}

.testimonial-company {
    opacity: 0.8;
    font-size: 0.95rem;
}

.footer {
    background: #0a0f1c;
    color: #888;
    padding: 30px 0;
    text-align: center;
}

@media (max-width: 900px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .open-source-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    /* Keep the three case studies in a single reading column on mobile. */
    #cases .grid-cases {
        grid-template-columns: 1fr;
    }

    #cases .case:last-child {
        grid-column: auto;
        justify-self: stretch;
        max-width: none;
    }
}

/* Collapse navigation before its links begin to crowd the logo. */
@media (max-width: 1050px) {
    .topbar {
        display: none;
    }

    .nav-content > nav,
    .nav-content > .lang-switch {
        display: none;
    }

    .mobile-menu {
        display: block;
        position: relative;
    }

    .mobile-menu summary {
        list-style: none;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 46px;
        height: 40px;
        padding: 8px 11px;
        border: 1px solid var(--primary);
        border-radius: 8px;
    }

    .mobile-menu summary::-webkit-details-marker {
        display: none;
    }

    .mobile-menu summary span {
        display: block;
        width: 100%;
        height: 2px;
        border-radius: 999px;
        background: var(--primary);
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .mobile-menu[open] summary span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu[open] summary span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu[open] summary span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .mobile-menu-links {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        z-index: 1001;
        display: flex;
        flex-direction: column;
        gap: 4px;
        min-width: 210px;
        padding: 12px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: var(--radius);
        background: var(--dark);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    }

    .mobile-menu:not([open]) .mobile-menu-links {
        display: none;
    }

    .mobile-menu-links > a {
        padding: 9px 10px;
        border-radius: 6px;
        color: rgba(255, 255, 255, 0.88);
        text-decoration: none;
    }

    .mobile-menu-links > a:hover {
        background: rgba(255, 255, 255, 0.08);
        color: #ffffff;
    }

    .mobile-menu-contact {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-bottom: 8px;
        padding: 0 10px 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .mobile-menu-contact a {
        color: rgba(255, 255, 255, 0.78);
        font-size: 0.85rem;
        text-decoration: none;
    }

    .mobile-menu-contact a:hover {
        color: #ffffff;
    }

    .mobile-menu-links .btn-outline {
        margin: 5px 0;
        text-align: center;
    }

    .mobile-menu-links .lang-switch {
        padding: 9px 10px 0;
    }
}

@media (max-width: 768px) {
    /* Keep the full mobile header in flow so the hero begins beneath it. */
    .navbar {
        position: sticky;
        top: 0;
    }

    .hero {
        min-height: 100svh;
        padding-top: 40px;
    }

    .hero-content {
        min-height: calc(100svh - 80px);
    }

    .logo img {
        width: 170px;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .video-wrapper iframe,
    .video-wrapper video {
        height: 300px;
    }
}

.text-link {
    color: inherit;
    text-decoration: underline;
    /*font-weight: 600;*/
}

.text-link:hover {
    text-decoration: underline;
}

/* Left-to-right pipeline (desktop) */
.approach-pipeline {
    margin-top: 60px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 60px;
    align-items: stretch;
}

.pipeline-step {
    position: relative;
    padding: 28px 26px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-align: left;
}

.pipeline-step h3 {
    margin-top: 10px;
    margin-bottom: 10px;
}

.pipeline-step p {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
}

/* Number badge */
.pipeline-badge {
    width: 34px;
    height: 34px;
    border-radius: 999px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-weight: 700;
    color: #001018;
    background: var(--primary);
}

/* Connector line + arrow to the next step (left -> right) */
.pipeline-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -48px;

    width: 48px;
    height: 5px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 12px rgba(0, 229, 204, 0.45);
    transform: translateY(-50%);
}

.pipeline-step:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 50%;
    right: -66px;

    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 18px solid var(--primary);
    filter: drop-shadow(0 0 6px rgba(0, 229, 204, 0.55));
    transform: translateY(-50%);
}

/* Mobile: stack top -> bottom with vertical connectors */
@media (max-width: 900px) {
    .approach-pipeline {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .pipeline-step:not(:last-child)::after {
        top: auto;
        bottom: -24px;
        right: 50%;

        width: 5px;
        height: 24px;
        transform: translateX(50%);
    }

    .pipeline-step:not(:last-child)::before {
        top: auto;
        bottom: -42px;
        right: 50%;

        border: none;
        width: 0;
        height: 0;

        border-left: 12px solid transparent;
        border-right: 12px solid transparent;
        border-top: 18px solid var(--primary);

        transform: translateX(50%);
    }
}

.video-wrapper video {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.team-linkedin img {
    width: 20px;
    height: 20px;
    margin-top: 6px;
    opacity: 0.8;
    border-radius: 0;
    border: none;
}

.team-linkedin img:hover {
    opacity: 1;
}

.team-name {
    display: flex;
    align-items: center;
    justify-content: center; /* remove if you want left aligned */
    gap: 8px;
}

.team-name h3 {
    margin: 0;
}

.team-linkedin img:hover {
    opacity: 1;
}

.demo-intro {
    max-width: 620px;
    margin: 0 auto 30px auto;
    line-height: 1.6;
}

.demo-section textarea {
    min-height: 140px;
    resize: vertical;
}

.self {
    color: white;
}

.selfx-x {
    color: var(--primary);
    font-weight: 900;
}

/* variant for light backgrounds */
.self.dark {
    color: #444;
}

/* shared button style */
.hero-buttons a {
    display: inline-block;
    padding: 12px 26px;
    /*border-radius: 6px;*/
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* primary button */
.btn-primary {
    background: var(--primary);
    color: white;
    border: 2px solid var(--primary);
}

/* hover effect */
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.hero-buttons a:hover {
    transform: translateY(-2px);
}

.hero-buttons a:hover {
    box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.demo-note {
    margin-top: 18px;
    font-size: 0.9rem;
    color: #777;
    line-height: 1.4;
}

.card-more {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--primary);
    border: 2px dashed rgba(255,255,255,0.2);
}

.team-collaboration {
    margin-top: 50px;
    text-align: center;
}

.team-collab-text {
    max-width: 650px;
    margin: 0 auto 20px auto;
    opacity: 0.85;
    line-height: 1.6;
}

.team-collab-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}



.team-collab-logos img {
    height: 40px;
    opacity: 0.8;
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.team-collab-logos img.logo-dtf {
    height: 65px;
}

.team-collab-logos img.logo-hsu {
    height: 65px;
    filter: brightness(1.4);
}

.team-collab-logos img:hover {
    opacity: 1;
}

.self {
    display: inline-block;
    font-weight: 600;
    transition: all 0.2s ease;
}

.selfx-x {
    color: var(--primary);
}

a:hover .self {
    transform: translateY(-2px);
}

a:hover .selfx-x {
    color: var(--primary-dark);
}

.topbar {
    color: #fff;
    font-size: 14px;
    padding: 6px 0;
}

.topbar-content {
    display: flex;
    justify-content: flex-end;
}

.topbar-contact span {
    margin-left: 20px;
}

.topbar-contact a {
    color: white;
    text-decoration: none;
}

.topbar-contact a:hover {
    opacity: 0.8;
}
