/* Quiet entrance and hover motion. Transforms run only on wider screens. */

.smc-home-button,
div.ccm-page .smc-interior .btn,
header .navigation .nav li a {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
    @keyframes smc-rise {
        from {
            opacity: 0;
            transform: translateY(12px);
        }
        to {
            opacity: 1;
            transform: none;
        }
    }

    @keyframes smc-fade {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    @keyframes smc-settle {
        from { transform: scale(1.035); }
        to { transform: none; }
    }

    @keyframes smc-bar {
        from { transform: scaleX(0); }
        to { transform: scaleX(1); }
    }

    html.smc-motion header .logo-title,
    html.smc-motion header .logo-image {
        animation: smc-fade 0.6s ease both;
    }

    html.smc-motion header .navigation .nav > li {
        animation: smc-fade 0.45s ease both;
    }

    html.smc-motion header .navigation .nav > li:nth-child(1) { animation-delay: 0.08s; }
    html.smc-motion header .navigation .nav > li:nth-child(2) { animation-delay: 0.14s; }
    html.smc-motion header .navigation .nav > li:nth-child(3) { animation-delay: 0.2s; }
    html.smc-motion header .navigation .nav > li:nth-child(4) { animation-delay: 0.26s; }

    html.smc-motion header {
        transition: box-shadow 0.3s ease;
    }

    html.smc-motion header.is-scrolled {
        box-shadow: 0 10px 24px rgba(15, 36, 64, 0.16);
    }

    html.smc-motion .smc-home-welcome,
    html.smc-motion .smc-home-hero-name,
    html.smc-motion .smc-home-hero-subtitle,
    html.smc-motion .smc-home-notice,
    html.smc-motion .smc-interior .HeroHeader h1 {
        animation: smc-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    html.smc-motion .smc-home-hero-name { animation-delay: 0.1s; }
    html.smc-motion .smc-home-hero-subtitle { animation-delay: 0.2s; }
    html.smc-motion .smc-home-notice { animation-delay: 0.32s; }

    html.smc-motion .smc-home-notice::before {
        transform-origin: left center;
        animation: smc-bar 0.4s ease 0.42s both;
    }

    html.smc-motion .smc-home-hero-image img,
    html.smc-motion .smc-interior .HeroHeader .ccm-block-hero-image-image {
        animation: smc-settle 1.15s ease both;
    }

    html.smc-motion .smc-home-arrow {
        display: inline-block;
        transition: transform 0.25s ease;
    }

    html.smc-motion a.smc-home-button:hover .smc-home-arrow,
    html.smc-motion a.smc-home-button:focus .smc-home-arrow {
        transform: translateX(4px);
    }

    html.smc-motion .smc-await {
        opacity: 0;
    }

    html.smc-motion .smc-await.smc-await-rise {
        transform: translateY(12px);
    }

    html.smc-motion .smc-await.is-in {
        opacity: 1;
        transform: none;
        transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    html.smc-motion .smc-home-card.is-in {
        transition: opacity 0.7s ease, transform 0.35s ease, box-shadow 0.35s ease;
    }

    html.smc-motion .smc-home-card.is-in:hover,
    html.smc-motion .smc-home-card.is-in:focus-within {
        transform: translateY(-6px);
        box-shadow: 0 14px 28px rgba(15, 36, 64, 0.16);
    }

    html.smc-motion .smc-home-card-icon {
        transition: transform 0.35s ease;
    }

    html.smc-motion .smc-home-card.is-in:hover .smc-home-card-icon,
    html.smc-motion .smc-home-card.is-in:focus-within .smc-home-card-icon {
        transform: scale(1.04);
    }
}

@media (max-width: 900px), (prefers-reduced-motion: reduce) {
    html.smc-motion .smc-home-welcome,
    html.smc-motion .smc-home-hero-name,
    html.smc-motion .smc-home-hero-subtitle,
    html.smc-motion .smc-home-notice,
    html.smc-motion .smc-home-notice::before,
    html.smc-motion .smc-home-hero-image img,
    html.smc-motion .smc-interior .HeroHeader h1,
    html.smc-motion .smc-interior .HeroHeader .ccm-block-hero-image-image,
    html.smc-motion header .logo-title,
    html.smc-motion header .logo-image,
    html.smc-motion header .navigation .nav > li {
        animation: none !important;
        opacity: 1;
        transform: none;
    }
}
