:root {
    /* Brand Colors */
    --deep-navy: #072635;
    --clear-blue: #3366FF;
    --vibrant-spruce: #00CC99;
    --tree-poppy: #FF8B1E;
    --dark-lavender: #6C4FAD;
    --bright-cerulean: #04B7CF;
    --sky-blue: #5C8AB5;

    /* Neutrals */
    --black-oak: #4D4D4F;
    --slate-gray: #7f7f7f;
    --fog-gray: #D1CCD1;
    --white: #ffffff;

    /* Glassmorphism Variables */
    --glass-bg: rgba(255, 255, 255, 0.015);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.08);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--deep-navy);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* --- Liquid Background Animation --- */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, var(--deep-navy) 0%, #0a3a52 100%);
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    width: 60vw;
    height: 60vw;
    background: rgba(51, 102, 255, 0.15);
    /* Clear Blue hint */
    top: -20%;
    left: -10%;
    animation-duration: 25s;
}

.blob-2 {
    width: 50vw;
    height: 50vw;
    background: rgba(0, 204, 153, 0.12);
    /* Vibrant Spruce hint */
    bottom: -10%;
    right: -10%;
    animation-duration: 22s;
    animation-delay: -5s;
}

.blob-3 {
    width: 40vw;
    height: 40vw;
    background: rgba(108, 79, 173, 0.15);
    /* Dark Lavender hint */
    top: 30%;
    left: 40%;
    animation-duration: 28s;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(5%, 10%) scale(1.1);
    }

    100% {
        transform: translate(-5%, 5%) scale(0.95);
    }
}

/* --- Innovation Canvas Network --- */
#innovation-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    /* Ensures it sits slightly above the deep background but doesn't block interactions */
    pointer-events: none;
    mix-blend-mode: screen;
    /* Makes colors pop against dark background */
    opacity: 1;
}

/* --- Header --- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    text-align: center;
    padding: 6rem 2rem 4rem;
    position: relative;
    z-index: 10;
    opacity: 0;
    animation: fadeUp 0.8s ease-out forwards;
}

.header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--white), var(--fog-gray));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.header p {
    font-size: 1.25rem;
    color: var(--fog-gray);
    font-weight: 300;
}

/* --- Standard Grid Layout --- */
.standard-grid {
    display: grid;
    /* Initialize 3 equal columns */
    grid-template-columns: repeat(3, 1fr);
    /* Uniform gap between all cards */
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 6rem;
}

/* --- Glassmorphism Cards --- */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    min-height: 350px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;

    /* Polish interactions */
    opacity: 0;
    animation: fadeUp 0.8s ease-out forwards;
    --hover-y: 0px;
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    transform: perspective(1000px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(var(--hover-y));
    transition: transform 0.2s ease-out, box-shadow 0.4s ease, border-color 0.4s ease, background 0.4s ease;
}

.card:nth-child(1) {
    animation-delay: 0.1s;
}

.card:nth-child(2) {
    animation-delay: 0.2s;
}

.card:nth-child(3) {
    animation-delay: 0.3s;
}

.card:nth-child(4) {
    animation-delay: 0.4s;
}

.card:nth-child(5) {
    animation-delay: 0.5s;
}

.card:nth-child(6) {
    animation-delay: 0.6s;
}

/* Ensure inner content stays above the dynamic spotlight */
.card>* {
    position: relative;
    z-index: 2;
}


/* Dynamic Spotlight Glow */
.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    background: radial-gradient(500px circle at var(--mouse-x, -100%) var(--mouse-y, -100%), rgba(255, 255, 255, 0.06), transparent 40%);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::after {
    opacity: 1;
}

/* Inner subtle glow ring */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 3;
}

.card:hover {
    --hover-y: -10px;
    background: var(--glass-highlight);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

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

.card-icon {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    display: inline-flex;
    transition: transform 0.3s ease;
}

@keyframes floatIcon {
    0% {
        transform: translateY(0px);
    }

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

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

.card-icon svg {
    animation: floatIcon 3s ease-in-out infinite;
}

.card:hover .card-icon {
    transform: scale(1.1);
}

.card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--white);
}

.card p {
    font-size: 1rem;
    color: var(--fog-gray);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-weight: 300;
}

.card-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    flex-grow: 1;
    width: 100%;
}

.launch-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--white);
    font-family: inherit;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
    position: relative;
    overflow: hidden;
    margin-top: auto;
    display: flex;
    align-items: center;
}

.launch-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.card:hover .launch-btn::before {
    left: 100%;
}

.launch-btn::after {
    content: '→';
    display: inline-block;
    max-width: 0;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 2;
    position: relative;
}

.card:hover .launch-btn::after {
    max-width: 20px;
    opacity: 1;
    transform: translateX(0);
    margin-left: 8px;
}


/* --- Card Specific Colors --- */
/* Card 1: Calsus (Green) */
.card-calsus {
    border-top: 3px solid rgba(0, 204, 153, 0.3);
}

.card-calsus .card-icon {
    color: var(--vibrant-spruce);
}

.card-calsus:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 204, 153, 0.15);
    border-color: rgba(0, 204, 153, 0.5);
}

.card-calsus:hover .launch-btn {
    background: var(--vibrant-spruce);
    border-color: var(--vibrant-spruce);
    color: var(--deep-navy);
}

/* Card 2: E-catalogue (Blue) */
.card-ecat {
    border-top: 3px solid rgba(51, 102, 255, 0.3);
}

.card-ecat .card-icon {
    color: var(--clear-blue);
}

.card-ecat:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 40px rgba(51, 102, 255, 0.15);
    border-color: rgba(51, 102, 255, 0.5);
}

.card-ecat:hover .launch-btn {
    background: var(--clear-blue);
    border-color: var(--clear-blue);
}

/* Card 3: Intellidish */
.card-intellidish {
    border-top: 3px solid rgba(255, 139, 30, 0.3);
}

.card-intellidish .card-icon {
    color: var(--tree-poppy);
}

.card-intellidish:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 40px rgba(255, 139, 30, 0.15);
    border-color: rgba(255, 139, 30, 0.5);
}

.card-intellidish:hover .launch-btn {
    background: var(--tree-poppy);
    border-color: var(--tree-poppy);
    color: var(--deep-navy);
}

/* Card 4: IntelliLinen */
.card-intellilinen {
    border-top: 3px solid rgba(108, 79, 173, 0.3);
}

.card-intellilinen .card-icon {
    color: var(--dark-lavender);
}

.card-intellilinen:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 40px rgba(108, 79, 173, 0.15);
    border-color: rgba(108, 79, 173, 0.5);
}

.card-intellilinen:hover .launch-btn {
    background: var(--dark-lavender);
    border-color: var(--dark-lavender);
}

/* Card 5: E-ticket */
.card-eticket {
    border-top: 3px solid rgba(4, 183, 207, 0.3);
}

.card-eticket .card-icon {
    color: var(--bright-cerulean);
}

.card-eticket:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 40px rgba(4, 183, 207, 0.15);
    border-color: rgba(4, 183, 207, 0.5);
}

.card-eticket:hover .launch-btn {
    background: var(--bright-cerulean);
    border-color: var(--bright-cerulean);
    color: var(--deep-navy);
}

/* Card 6: AI */
.card-ai {
    border-top: 3px solid rgba(92, 138, 181, 0.3);
}

.card-ai .card-icon {
    color: var(--sky-blue);
}

.card-ai:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 40px rgba(92, 138, 181, 0.15);
    border-color: rgba(92, 138, 181, 0.5);
}

.card-ai:hover .launch-btn {
    background: var(--sky-blue);
    border-color: var(--sky-blue);
    color: var(--deep-navy);
}


/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
    .standard-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 2rem 4rem;
    }

    .header h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 600px) {
    .standard-grid {
        display: flex;
        flex-direction: column;
        padding: 0 1.5rem 3rem;
    }

    .card {
        padding: 2rem 1.5rem;
        min-height: 250px;
    }

    .header {
        padding: 4rem 1.5rem 2rem;
    }

    .header h1 {
        font-size: 2rem;
    }
}

/* --- Footer --- */
.footer {
    padding: 3rem 2rem 5rem;
    text-align: center;
    position: relative;
    z-index: 10;
    margin-top: 2rem;
}

.footer-card {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    /* Fully rounded pill shape */
    padding: 1rem 2.5rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.footer-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
    /* Adding subtle brightness filter so dark logos contrast against the dark background */
    filter: brightness(0) invert(1) opacity(0.85);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.footer-logo:hover {
    filter: brightness(0) invert(1) opacity(1);
    transform: translateY(-2px);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    font-weight: 300;
    margin: 0;
    padding-left: 1.5rem;
    border-left: 1px solid var(--glass-border);
}

/* --- Responsive Adjustments for Single Line Footer --- */
@media (max-width: 768px) {
    .footer-card {
        flex-direction: column;
        border-radius: 20px;
        padding: 1.5rem 2rem;
        gap: 1.5rem;
        display: flex;
    }

    .copyright {
        padding-left: 0;
        border-left: none;
        padding-top: 1rem;
        border-top: 1px solid var(--glass-border);
    }
}

/* --- Preloader --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--deep-navy);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.preloader-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    z-index: 2;
    animation: gentlePulse 2s infinite ease-in-out;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid rgba(0, 204, 153, 0.5);
    /* Vibrant Spruce */
    z-index: 1;
    animation: ringExpand 2s infinite cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes gentlePulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

@keyframes ringExpand {
    0% {
        width: 80px;
        height: 80px;
        opacity: 1;
        border-width: 4px;
    }

    100% {
        width: 180px;
        height: 180px;
        opacity: 0;
        border-width: 1px;
    }
}

/* --- Search Bar --- */
.search-container {
    position: relative;
    max-width: 500px;
    margin: 2.5rem auto 0;
    z-index: 20;
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.search-input {
    width: 100%;
    padding: 1.2rem 1.5rem 1.2rem 3.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    color: var(--text-base);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 0 0 4px rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.08);
    /* Slightly brighter when focused */
}

.search-input:focus+.search-icon,
.search-container:focus-within .search-icon {
    color: var(--text-base);
}

/* Hidden class for real-time filtering */
.card.hidden {
    display: none !important;
}

/* --- Mobile Touch Optimization --- */
@media (hover: none) and (pointer: coarse) {
    .card {
        animation: touchPulse 4s infinite alternate ease-in-out;
    }

    @keyframes touchPulse {
        0% {
            transform: scale(1);
            box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
            border-color: var(--glass-border);
        }

        100% {
            transform: scale(1.02);
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 255, 255, 0.05);
            border-color: rgba(255, 255, 255, 0.2);
        }
    }
}