/* =========================================
   COMPONENTS STYLES (DARK THEME - COMPACT - ICONS)
   ========================================= */

/* --- Buttons --- */
.button {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.button--primary {
    background-color: var(--color-primary);
    color: #000;
    box-shadow: 0 0 15px var(--color-primary-glow);
}

.button--primary:hover {
    background-color: #fff;
    box-shadow: 0 0 25px var(--color-primary-glow);
    transform: translateY(-2px);
}

.button--outline {
    background-color: transparent;
    border-color: var(--color-secondary);
    color: var(--color-text-main);
}

.button--outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 0 15px rgba(107, 45, 132, 0.3);
}

.button--large {
    padding: 14px 30px;
    font-size: 0.95rem;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 10px 0;
    transition: all var(--transition-fast);
}

.header.scrolled {
    background-color: rgba(5, 1, 13, 0.9);
    backdrop-filter: blur(12px);
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.header__logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all var(--transition-fast);
    outline: none;
    letter-spacing: -0.5px;
}

.header__logo:focus,
.header__logo:active,
.header__logo:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* Logo Image Styles - Enhanced Visibility (UPGRADED) */
.header__logo-img {
    height: 35px;
    width: auto;
    transition: all var(--transition-fast);
    filter: drop-shadow(0 4px 16px rgba(0, 212, 255, 0.5)) brightness(1.05);
}

.header__logo:hover .header__logo-img {
    filter: drop-shadow(0 6px 24px rgba(0, 212, 255, 0.8)) drop-shadow(0 0 12px rgba(178, 75, 243, 0.4)) brightness(1.15);
    transform: translateY(-2px) scale(1.05);
}

@media (min-width: 768px) {
    .header__logo-img {
        height: 45px;
    }
}

@media (min-width: 992px) {
    .header__logo-img {
        height: 50px;
    }
}

.navbar {
    display: none;
}

@media (min-width: 992px) {
    .navbar {
        display: block;
    }

    .navbar__menu {
        display: flex;
        align-items: center;
        gap: var(--spacing-md);
    }

    .navbar__link {
        color: var(--color-text-muted);
        font-weight: 500;
        font-size: 0.9rem;
        position: relative;
    }

    .navbar__link:hover {
        color: var(--color-primary);
    }

    .navbar__link::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--color-primary);
        transition: width 0.3s;
    }

    .navbar__link:hover::after {
        width: 100%;
    }
}

.header__cta {
    display: none;
}

@media (min-width: 992px) {
    .header__cta {
        display: inline-block;
        margin-left: var(--spacing-md);
        padding: 6px 18px;
        font-size: 0.8rem;
    }
}

.header__toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header__toggle-line {
    width: 22px;
    height: 2px;
    background-color: var(--color-text-main);
    transition: var(--transition-fast);
}

@media (min-width: 992px) {
    .header__toggle {
        display: none;
    }
}

/* --- Hero --- */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 40%, rgba(178, 75, 243, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(0, 212, 255, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #1a0a2e 0%, #0a0618 50%, #16001e 100%);
    padding-top: 70px;
    padding-bottom: var(--spacing-lg);
    position: relative;
    overflow: hidden;
}

.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
    mix-blend-mode: screen;
}

/* Logo-Based Hero Background - TOP CENTERED */
/* Hero Logo - Main (Replaces hero-bg-img--logo) */
.hero__logo-main {
    display: block;
    position: relative;
    width: 100%;
    max-width: 280px;
    height: auto;
    margin: 0 auto var(--spacing-md);
    z-index: 20;
    opacity: 1;
    object-fit: contain;
    /* Static filter for better performance and visibility stability */
    filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.4));
    /* Use safe scale animation globally */
    animation: pulse-scale 4s ease-in-out infinite alternate;
    will-change: transform;
}

/* Safe Mobile Animation */
@keyframes pulse-scale {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }

    100% {
        transform: scale(1.03);
        filter: brightness(1.15);
    }
}

/* Mobile specific safety for logo */
@media (max-width: 767px) {
    .hero__logo-main {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        /* Use safe animation for mobile */
        animation: pulse-scale 3s ease-in-out infinite alternate !important;
        filter: none !important;
        /* Remove heavy drop-shadows on mobile */
        will-change: transform;
    }
}

@media (min-width: 768px) {
    .hero__logo-main {
        display: block !important;
        /* Force desktop visibility */
        max-width: 380px;
    }
}

@media (min-width: 992px) {
    .hero__logo-main {
        max-width: 450px;
    }
}

@media (min-width: 768px) {
    .hero-bg-img--logo {
        max-width: 380px;
    }
}

@media (min-width: 992px) {
    .hero-bg-img--logo {
        max-width: 450px;
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 60px rgba(0, 212, 255, 0.6)) drop-shadow(0 0 120px rgba(178, 75, 243, 0.4)) brightness(1.2);
    }

    50% {
        filter: drop-shadow(0 0 80px rgba(0, 212, 255, 0.8)) drop-shadow(0 0 140px rgba(178, 75, 243, 0.6)) brightness(1.3);
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(178, 75, 243, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0, 212, 255, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(255, 107, 197, 0.08) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
    animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

.hero__container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
}

.hero__content {
    width: 100%;
    max-width: 900px;
}

/* Hide visual mockup to clean up UI */
.hero__visual {
    display: none;
}

.hero__title {
    background: linear-gradient(to right, #fff, #a0a0a0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero__subtitle {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
}

.hero__actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
}

/* Mobile Typography & Spacing Improvements */
@media (max-width: 767px) {
    .hero__container {
        gap: 2.5rem;
        /* Increased gap from spacing-lg (usually 2rem) */
    }

    .hero__title {
        font-size: 2rem;
        /* Reduced from default to prevent cramping */
        line-height: 1.3;
        /* Increased line height for breathing room */
        margin-bottom: 1rem;
    }

    .hero__subtitle {
        font-size: 1rem;
        line-height: 1.6;
        /* Better readability */
        max-width: 90%;
        /* Prevent text touching edges */
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 2rem;
    }

    .hero__actions {
        gap: 1.2rem;
        /* Increased gap for easier tapping */
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        /* Force horizontal centering */
    }

    .hero__actions .button {
        width: 100%;
        display: flex;
        /* Use flex for perfect text centering */
        justify-content: center;
        align-items: center;
        text-align: center;
    }
}

/* Hero Visual Mockup */
.hero__mockup {
    position: relative;
    width: 100%;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero__shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.6;
}

.hero__shape--1 {
    width: 160px;
    height: 160px;
    background: var(--color-secondary);
    top: 15%;
    left: 15%;
    animation: float 6s infinite ease-in-out;
}

.hero__shape--2 {
    width: 140px;
    height: 140px;
    background: var(--color-primary);
    bottom: 15%;
    right: 15%;
    animation: float 8s infinite ease-in-out reverse;
}

.hero__glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md);
    border-radius: 20px;
    text-align: center;
    color: var(--color-text-main);
    z-index: 2;
    transform: rotate(-5deg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hero__stat {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
    text-shadow: 0 0 20px rgba(0, 230, 161, 0.3);
}

.hero__stat-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hero Logo Watermark - Subtle Brand Presence */
.hero-logo-watermark {
    position: absolute;
    top: 15%;
    right: 5%;
    width: 180px;
    height: auto;
    opacity: 0.08;
    z-index: 0;
    pointer-events: none;
    filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.3));
    animation: float 10s infinite ease-in-out;
}

@media (min-width: 768px) {
    .hero-logo-watermark {
        width: 280px;
        opacity: 0.12;
        top: 20%;
        right: 8%;
    }
}

@media (min-width: 992px) {
    .hero-logo-watermark {
        width: 350px;
        opacity: 0.15;
    }
}


/* --- Services --- */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.services__grid {
    display: grid;
    gap: var(--spacing-md);
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    background: var(--color-bg-card);
    padding: var(--spacing-md);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    transition: var(--transition-smooth);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(107, 45, 132, 0.1), transparent 50%);
    opacity: 0;
    transition: opacity 0.5s;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card__icon {
    width: 40px;
    height: 40px;
    margin-bottom: var(--spacing-xs);
    position: relative;
    z-index: 1;
    color: var(--color-primary);
}

.service-card__icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.5;
}

.service-card__title {
    font-size: 1.15rem;
    margin-bottom: var(--spacing-xs);
    position: relative;
    z-index: 1;
}

.service-card__desc {
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.service-card--highlight {
    border: 1px solid var(--color-secondary);
    background: linear-gradient(145deg, rgba(107, 45, 132, 0.1), rgba(18, 6, 33, 1));
}

/* --- Framework --- */
.framework__timeline {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.framework__step {
    background: rgba(255, 255, 255, 0.02);
    border-left: 2px solid var(--color-primary);
    padding: var(--spacing-md);
    border-radius: 0 10px 10px 0;
    position: relative;
    transition: background 0.3s;
}

.framework__step:hover {
    background: rgba(255, 255, 255, 0.04);
}

.framework__marker {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    top: 10px;
    right: 15px;
}

.framework__step-title {
    color: var(--color-primary);
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.framework__step-desc {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .framework__timeline {
        flex-direction: row;
    }

    .framework__step {
        flex: 1;
        border-left: none;
        border-top: 2px solid var(--color-primary);
        border-radius: 0 0 10px 10px;
    }
}

/* --- Cases --- */
.cases__grid {
    display: grid;
    gap: var(--spacing-md);
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .cases__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.case-card {
    background: var(--color-bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: var(--transition-smooth);
}

.case-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-secondary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.case-card__visual {
    height: 160px;
    background: #0a0212;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.case-card__visual::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(107, 45, 132, 0.2), transparent 70%);
}

.case-card__graph {
    width: 80%;
    height: 60%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.case-card__content {
    padding: var(--spacing-md);
}

.case-card__category {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-secondary);
    font-weight: 700;
    letter-spacing: 1px;
}

.case-card__stats {
    margin-top: var(--spacing-sm);
}

.case-card__stats li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.case-card__stats li strong {
    color: var(--color-primary);
}

/* --- Difference --- */
.difference__layout {
    display: grid;
    gap: var(--spacing-lg);
}

@media (min-width: 992px) {
    .difference__layout {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
}

.difference__item {
    margin-bottom: var(--spacing-md);
    padding-left: 15px;
    border-left: 3px solid var(--color-secondary);
}

.difference__item h4 {
    color: var(--color-text-main);
    margin-bottom: 3px;
    font-size: 1.1rem;
}

.difference__slider blockquote {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--color-text-main);
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
}

.difference__slider cite {
    font-weight: 700;
    color: var(--color-primary);
    font-style: normal;
    font-size: 0.9rem;
}

/* --- Lab --- */
.lab__container {
    text-align: center;
    background: linear-gradient(135deg, #120621 0%, #05010d 100%);
    padding: var(--spacing-lg);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.lab__container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(107, 45, 132, 0.1) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
}

/* Logo Styles */
.header__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.header__logo:focus,
.header__logo:active {
    outline: none;
}

/* Lab Header with Logo */
.lab__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.lab__logo {
    width: 100px;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.5)) drop-shadow(0 4px 8px rgba(178, 75, 243, 0.3));
    transition: all var(--transition-fast);
}

.lab__logo:hover {
    filter: drop-shadow(0 0 25px rgba(0, 212, 255, 0.7)) drop-shadow(0 6px 12px rgba(178, 75, 243, 0.5)) brightness(1.1);
    transform: scale(1.05);
}

@media (min-width: 768px) {
    .lab__logo {
        width: 120px;
    }
}

@media (min-width: 992px) {
    .lab__logo {
        width: 140px;
    }
}


.lab__badge {
    background: rgba(0, 230, 161, 0.1);
    color: var(--color-primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
    display: inline-block;
    border: 1px solid rgba(0, 230, 161, 0.3);
    position: relative;
    z-index: 1;
}

.lab__title,
.lab__desc {
    position: relative;
    z-index: 1;
}

.lab__grid {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
    position: relative;
    z-index: 1;
}

.lab__item {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-main);
    transition: 0.3s;
    font-size: 0.9rem;
}

.lab__item:hover {
    background: var(--color-primary);
    color: #000;
    border-color: var(--color-primary);
}

/* --- CTA --- */
.cta__content {
    text-align: center;
    color: var(--color-text-main);
}

/* --- Footer --- */
.footer {
    background-color: #020005;
    color: var(--color-text-muted);
    padding: var(--spacing-lg) 0;
    font-size: 0.85rem;
    border-top: 1px solid var(--border-light);
}

.footer__top {
    display: grid;
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .footer__top {
        grid-template-columns: 1fr 2fr;
    }
}

.footer__links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.footer__column h4 {
    color: var(--color-text-main);
    margin-bottom: var(--spacing-sm);
    font-size: 1rem;
}

.footer__column a {
    display: block;
    margin-bottom: 6px;
    color: var(--color-text-muted);
}

.footer__column a:hover {
    color: var(--color-primary);
}

/* Footer Logo Image - DRAMATICALLY ENHANCED */
.footer__logo-img {
    height: auto;
    width: 200px;
    margin-bottom: var(--spacing-md);
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.5)) drop-shadow(0 4px 12px rgba(178, 75, 243, 0.3));
    transition: all var(--transition-fast);
}

.footer__logo-img:hover {
    filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.7)) drop-shadow(0 6px 16px rgba(178, 75, 243, 0.5)) brightness(1.1);
    transform: scale(1.03);
}

@media (min-width: 768px) {
    .footer__logo-img {
        width: 240px;
    }
}

@media (min-width: 992px) {
    .footer__logo-img {
        width: 260px;
    }
}

.footer__bottom {
    margin-top: var(--spacing-lg);
    text-align: center;
    opacity: 0.5;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: var(--spacing-md);
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}