:root {
    --bg-dark: #464545;
    --bg-transparent: #00000000;
    --bg-card: #00000000;
    --bg-card2: #00000000;
    --accent: #0290a1;
    --accent2: #0290a1;
    --accent-glow: rgba(2,144,161,.18);
    --text-main: #e8eaf0;
    --text-muted: #e7e7e7;
    --border: rgba(2,144,161,.25);
    --white: #ffffff;
    --header-h: 72px;
}

body {
    overflow-x: hidden;
    background: #000000;
}

.container,
.container-fluid {
    max-width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    background: rgba(2, 145, 161, 0.16);
    border: 2px solid rgba(2, 144, 161, 0.9);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 999px;
    margin-bottom: 28px;
    margin-left: 0;
    box-shadow: 0 0 0 1px rgba(2, 144, 161, 0.12), 0 8px 24px rgba(2, 144, 161, 0.16);
}

.hero-badge::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(2, 144, 161, 0.18);
    animation: pulse 2s ease-in-out infinite;
}

.hero-desc {
    font-size: 1.5rem;
    margin-bottom: 40px;
    line-height: 1.75;
}

.trace-divider {
    width: 100%;
    height: 2px;
    position: relative;
    overflow: visible;
    margin: 0;
}

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

.section2 {
    background: var(--bg-transparent);
}

.hero-slide {
    background-image: url("../img/Orin-Nx.png");
}

#specs {
    background: var(--bg-dark);
    padding-top: 40px;
    padding-bottom: 40px;
    padding-left: 60px;
    padding-right: 60px;
}

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

.spec-card {
    background: var(--bg-card);
    border: 5px solid var(--border);
    border-radius: 0.25rem;
    padding: 28px 24px;
    transition: border-color 0.25s, transform 0.25s;
}

.spec-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.spec-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 10px;
}

.spec-desc {
    font-size: 1.6rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.spec-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--accent);
    font-size: 1.9rem;
}

#modules {
    background: #000000;
    padding-top: 40px;
    padding-bottom: 40px;
    padding-left: 60px;
    padding-right: 60px;
}

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

.module-card {
    position: relative;
    overflow: hidden;
    height: 500px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 45%, rgba(2, 144, 161, 0.22) 0%, rgba(2, 144, 161, 0.08) 28%, rgba(0, 0, 0, 0) 58%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 35%, rgba(2, 144, 161, 0.08) 100%),
        #111;
    border-radius: 20px;
    isolation: isolate;
    touch-action: pan-y;
}

.module-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.12), transparent 28%),
        radial-gradient(circle at 75% 80%, rgba(2, 144, 161, 0.18), transparent 32%);
    opacity: 0.8;
    z-index: 0;
    pointer-events: none;
}

.module-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: filter 0.4s ease, transform 0.4s ease;
    border-radius: 20px;
    filter:
        drop-shadow(0 0 22px rgba(2, 144, 161, 0.22))
        drop-shadow(0 18px 26px rgba(0, 0, 0, 0.45));
}

.module-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 45%, rgba(2, 144, 161, 0.18), transparent 48%),
        rgba(0, 0, 0, 0.75);
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 2;
    border-radius: 20px;
}

.module-card:hover .module-img {
    filter:
        blur(5px)
        drop-shadow(0 0 34px rgba(2, 144, 161, 0.38))
        drop-shadow(0 22px 34px rgba(0, 0, 0, 0.55));
    transform: scale(1.05);
}

.module-card:hover .module-content {
    opacity: 1;
    pointer-events: auto;
}

.module-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    border: 1px solid rgba(2, 144, 161, 0.25);
    box-shadow: inset 0 0 35px rgba(2, 144, 161, 0.08);
    z-index: 3;
    pointer-events: none;
}

.module-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.module-tag {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(0, 212, 160, 0.1);
    border: 1px solid rgba(0, 212, 160, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
}

.module-specs {
    list-style: none;
}

.module-specs li {
    font-size: 1.1rem;
    color: var(--text-muted);
    padding: 5px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.module-specs li:last-child {
    border-bottom: none;
}

.module-specs li::before {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.home-slide,
#specs,
#modules {
    overflow-x: hidden;
}

@media (max-width: 991px) {
    .hero-desc {
        font-size: 1.2rem;
        line-height: 1.6;
    }

    .specs-grid,
    .modules-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 767px) {
    .hero-badge {
        font-size: 0.64rem;
        padding: 6px 12px;
        margin-bottom: 18px;
        line-height: 1.4;
        white-space: normal;
        text-align: center;
        justify-content: center;
        max-width: 100%;
    }

    .hero-desc {
        font-size: 1rem;
        margin-bottom: 24px;
    }

    .home-slide-caption {
        padding: 0 16px;
        transform: none;
    }

    .hero-badge {
        margin-left: auto;
        margin-right: auto;
    }

    .home-slide-caption h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .specs-grid,
    .modules-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    #specs,
    #modules {
        padding-left: 20px;
        padding-right: 20px;
    }

    .spec-card {
        padding: 20px 16px;
    }

    .spec-title {
        font-size: 1.35rem;
    }

    .spec-desc {
        font-size: 1rem;
    }

    .module-card {
        height: 360px;
        overflow: hidden;
    }

    .module-content {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        height: auto;
        max-height: 72%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        opacity: 0;
        pointer-events: none;
        transform: translateY(12px);
        padding: 14px 14px 16px;
        box-sizing: border-box;
        background: linear-gradient(180deg, rgba(0,0,0,0.2), rgba(0,0,0,0.86));
        border-top: 1px solid rgba(2,144,161,.25);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 8px;
        transition: opacity 0.35s ease, transform 0.35s ease;
    }

    .module-card.is-visible .module-content {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .module-card.is-visible .module-img {
        filter: none;
        transform: none;
    }

    .module-name {
        font-size: 1.15rem;
        line-height: 1.35;
        margin-bottom: 8px;
    }

    .module-tag {
        font-size: 0.8rem;
        padding: 2px 6px;
    }

    .module-specs li {
        font-size: 0.9rem;
        line-height: 1.4;
        padding: 4px 0;
    }
}

@media (max-width: 599px) {
    .hero-badge {
        font-size: 0.58rem;
        letter-spacing: 0.08em;
        padding: 5px 10px;
    }

    .home-slide-caption h1 {
        font-size: 1.7rem;
    }

    .module-card {
        height: 320px;
    }
}
