main.home-main {
    width: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: clamp(20px, 5vh, 56px) 16px 40px;
    box-sizing: border-box;
    text-decoration: none;
}

.home-hero {
    width: min(100%, 980px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(18px, 3vh, 28px);
    perspective: 1200px;
}

.welcome-link {
    display: block;
    width: min(100%, 670px);
    text-decoration: none;
    color: inherit;
    transform-origin: center top;
    animation: homeCardEntrance 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.welcome {
    width: 100%;
    max-width: 670px;
    min-height: 280px;
    height: auto;
    padding: 24px 20px;
    border: 2px solid var(--tertiary-color);
    border-radius: 30px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 252, 224, 0.74));
    --tilt-x: 1deg;
    --tilt-y: 0deg;
    box-shadow: 0 14px 38px rgba(44, 37, 0, 0.18), 0 2px 0 rgba(255, 255, 255, 0.85) inset;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    transform: perspective(1000px) translate3d(0, 0, 0) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
    transform-style: preserve-3d;
    transition: transform 160ms ease-out, box-shadow 280ms ease, border-color 280ms ease;
    will-change: transform;
}

.welcome img {
    display: block;
    width: min(430px, 88%);
    max-width: 100%;
    height: auto;
    transform: translateZ(34px);
    filter: drop-shadow(0 10px 12px rgba(44, 37, 0, 0.12));
    transition: transform 240ms ease, filter 240ms ease;
}

.welcome p {
    font-size: clamp(20px, 3.2vw, 30px);
    color: var(--text2-color);
    margin: 12px 0 0;
    padding: 0 12px;
    text-align: center;
    position: relative;
    transform: translateZ(24px);
}

/* Brand karty dodavatelů */
.home-brands {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 0;
    box-sizing: border-box;
    transform-origin: center top;
    animation: homeCardEntrance 900ms 140ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.home-brand-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    padding: 28px 22px;
    text-decoration: none;
    color: var(--text2-color);
    border: 2px solid var(--tertiary-color);
    border-radius: 30px;
    --tilt-x: 1deg;
    --tilt-y: 0deg;
    background: #fff;
    box-sizing: border-box;
    overflow: hidden;
    isolation: isolate;
    transform: perspective(900px) translate3d(0, 0, 0) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
    transform-style: preserve-3d;
    box-shadow: 0 10px 0 rgba(102, 87, 1, 0.12), 0 18px 28px rgba(44, 37, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    will-change: transform;
    transition:
        transform 160ms ease-out,
        box-shadow 0.22s ease,
        border-color 0.22s ease;
}

.home-brand-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 45%;
    height: 100%;
    background: linear-gradient(
        110deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 35%,
        rgba(255, 255, 255, 0.55) 50%,
        rgba(255, 255, 255, 0.08) 65%,
        transparent 100%
    );
    transform: skewX(-18deg);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
}

.home-brand-card img {
    position: relative;
    z-index: 2;
    width: auto;
    max-width: 88%;
    height: 78px;
    object-fit: contain;
    display: block;
    border: none;
    box-shadow: none;
    filter: none;
    transform: translateZ(28px);
    transition: transform 240ms ease, filter 240ms ease;
}

.home-brand-card img[src$="canis.png"] {
    transform: translateZ(28px) scale(1.3);
    transform-origin: center;
}

.welcome-link:hover .welcome,
.welcome-link:focus-visible .welcome {
    transform: perspective(1000px) translate3d(0, -8px, 28px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) scale(1.012);
    border-color: var(--secondary-color);
    box-shadow: 0 24px 48px rgba(44, 37, 0, 0.24), 0 2px 0 rgba(255, 255, 255, 0.9) inset;
}

.welcome-link:hover .welcome img,
.welcome-link:focus-visible .welcome img {
    transform: translateZ(46px) scale(1.015);
    filter: drop-shadow(0 14px 15px rgba(44, 37, 0, 0.16));
}

.welcome-link:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 6px;
    border-radius: 30px;
}

.home-brand-card:hover,
.home-brand-card:focus-visible {
    transform: perspective(900px) translate3d(0, -9px, 24px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) scale(1.018);
    border-color: var(--secondary-color);
    box-shadow: 0 14px 0 rgba(102, 87, 1, 0.1), 0 28px 38px rgba(44, 37, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 1);
    outline: none;
}

.home-brand-card:hover img,
.home-brand-card:focus-visible img {
    transform: translateZ(42px) scale(1.045);
}

.home-brand-card:hover img[src$="canis.png"],
.home-brand-card:focus-visible img[src$="canis.png"] {
    transform: translateZ(42px) scale(1.34);
}

.home-brand-card:hover::before,
.home-brand-card:focus-visible::before {
    opacity: 1;
    animation: homeBrandShine 0.85s ease-out;
}

.welcome-link:active .welcome,
.home-brand-card:active {
    transform: perspective(900px) translate3d(0, -2px, 6px) rotateX(0deg) rotateY(0deg) scale(0.99);
    transition-duration: 80ms;
}

@keyframes homeCardEntrance {
    0% {
        opacity: 0;
        transform: perspective(1200px) translate3d(0, 38px, -150px) rotateX(10deg) scale(0.94);
        filter: blur(4px);
    }
    65% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: perspective(1200px) translate3d(0, 0, 0) rotateX(0deg) scale(1);
        filter: blur(0);
    }
}

@keyframes homeBrandShine {
    0% {
        left: -60%;
    }
    100% {
        left: 120%;
    }
}

@media (max-width: 820px) {
    .home-brands {
        grid-template-columns: 1fr;
        max-width: 360px;
        margin: 0 auto;
    }

    .home-brand-card {
        min-height: 112px;
        padding: 18px 22px;
    }

    .home-brand-card img {
        height: 58px;
        max-width: 70%;
    }
}

@media (max-width: 480px) {
    .welcome {
        min-height: 230px;
        padding: 18px 14px;
        border-radius: 22px;
    }

    .welcome img {
        width: min(350px, 92%);
    }

    .welcome p {
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .welcome-link,
    .home-brands {
        animation: none;
        opacity: 1;
        filter: none;
        transform: none;
    }

    .welcome,
    .home-brand-card,
    .welcome img,
    .home-brand-card img {
        transition: none;
    }

    .welcome-link:hover .welcome,
    .welcome-link:focus-visible .welcome,
    .home-brand-card:hover,
    .home-brand-card:focus-visible {
        transform: none;
    }

    .home-brand-card:hover::before,
    .home-brand-card:focus-visible::before {
        animation: none;
        opacity: 0;
    }
}
