/*
 * The heroes: the product pages' black hero with a centred headline and
 * floating pieces around it (.sc-hero, .fl), and the home page's photo hero
 * (.sq-hero). Floats drift on scroll (data-depth, core.js sets --py).
 */
@layer marketing {
    .mk {
        & .sc-hero {
            position: relative;
            overflow: hidden;
            isolation: isolate;
            min-height: min(100svh, 980px);
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            place-content: center;
            justify-items: center;
            text-align: center;
            padding: calc(120px + env(safe-area-inset-top, 0px)) max(24px, var(--gr)) 150px max(24px, var(--gl));
            color: #fff;
            background: radial-gradient(55% 55% at 50% 42%, #2c2c2c 0%, #111 55%, #000 100%);
        }
        & .sc-hero::after {
            content: "";
            position: absolute;
            inset: 0;
            z-index: -1;
            background: radial-gradient(50% 45%, rgb(30 26 22 / 0.35), rgb(30 26 22 / 0) 70%);
        }
        & .sc-label {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            font: 500 13px / 1 var(--f-sans);
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: rgb(255 255 255 / 0.8);
        }
        & .sc-hero h1 {
            margin-top: 18px;
            font-size: clamp(46px, 7.4vw, 112px);
            letter-spacing: -0.05em;
            line-height: 1;
            max-width: 13ch;
            color: #fff;
            text-shadow: 0 2px 30px rgb(0 0 0 / 0.15);
        }
        & .sc-hero .sel {
            margin-top: 54px;
        }
        & .sc-lead {
            margin-top: 22px;
            max-width: 46ch;
            font-size: 18px;
            color: rgb(255 255 255 / 0.72);
        }
        & .sc-hero .btn {
            margin-top: 38px;
            height: 58px;
            padding: 0 36px;
            font-size: 16px;
            background: #fff;
            color: #0a0a0a;
        }
        & .sc-note {
            margin-top: 14px;
            font-size: 13px;
            color: rgb(255 255 255 / 0.65);
        }

        /* the floating pieces around a product hero */
        & .fl {
            position: absolute;
            z-index: -1;
            will-change: transform;
            transform: translate3d(0, var(--py, 0px), 0);
        }
        & .fl.ph {
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.6);
        }
        & .fl.ph img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        & .fl.site {
            border-radius: 10px;
            overflow: hidden;
            background: #fff;
            box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.65);
        }
        & .fl.site img {
            width: 100%;
            aspect-ratio: 16 / 10;
            object-fit: cover;
            object-position: top;
            display: block;
        }
        & .fl.ui {
            border-radius: 14px;
            overflow: hidden;
            background: #fff;
            border: 1px solid rgb(255 255 255 / 0.15);
            box-shadow: 0 34px 70px -30px rgb(0 0 0 / 0.55);
        }
        & .fl.ui img {
            display: block;
            width: 100%;
        }
        & .fl.glass {
            padding: 18px;
            border-radius: 12px;
            text-align: left;
            color: #fff;
            background: rgb(255 255 255 / 0.08);
            border: 1px solid rgb(255 255 255 / 0.14);
            backdrop-filter: blur(18px) saturate(1.2);
            box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.45);
        }
        & .fl.glass h2 {
            margin: 0 0 14px;
            font-size: 15px;
            font-weight: 500;
            letter-spacing: 0;
        }
        & .fl.glass .row2 {
            display: flex;
            justify-content: space-between;
            gap: 24px;
            padding: 10px 0;
            border-top: 1px solid rgb(255 255 255 / 0.18);
            font-size: 13px;
        }
        & .fl.glass .row2:first-of-type {
            border-top: 0;
        }
        & .fl.glass .row2 em {
            font-style: normal;
            color: rgb(255 255 255 / 0.7);
        }
        & .fl.glass .big {
            font-size: 40px;
            font-weight: 400;
            letter-spacing: -0.04em;
            line-height: 1;
        }
        /* the logo's block mark, one block snapping into place */
        & .fl.blocks {
            display: grid;
            grid-template-columns: 54px 54px;
            grid-template-rows: 54px 40px;
            gap: 8px;
        }
        & .fl.blocks i {
            border-radius: 10px;
            box-shadow: 0 16px 30px -14px rgb(0 0 0 / 0.5);
        }
        & .fl.blocks i:nth-child(1) {
            background: #fff;
        }
        & .fl.blocks i:nth-child(2) {
            background: #8a8a8a;
            animation: mk-snapblock 3.6s var(--out) infinite;
        }
        & .fl.blocks i:nth-child(3) {
            grid-column: span 2;
            background: #3a3a3a;
        }

        /* the home page's photo hero */
        & .sq-hero {
            position: relative;
            min-height: min(100svh, 980px);
            display: grid;
            align-content: start;
            justify-items: center;
            grid-template-columns: minmax(0, 1fr);
            text-align: center;
            padding-top: clamp(150px, 22vh, 240px);
            padding-inline: max(24px, var(--gl)) max(24px, var(--gr));
            isolation: isolate;
        }
        & .sq-hero::before {
            content: "";
            position: absolute;
            inset: 0;
            z-index: -1;
            background:
                radial-gradient(45% 40% at 50% 34%, rgb(0 0 0 / 0.38), rgb(0 0 0 / 0) 75%),
                linear-gradient(rgb(0 0 0 / 0.5) 0%, rgb(0 0 0 / 0.32) 40%, rgb(0 0 0 / 0.6) 78%, #000 100%);
        }
        & .sq-hero > img.bg {
            position: absolute;
            inset: 0;
            z-index: -2;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: 50% 20%;
        }
        & .sq-hero h1 {
            font-size: clamp(40px, min(5vw, 8vh), 78px);
            line-height: 0.98;
            max-width: 16ch;
            color: #fff;
        }
        & .sq-hero .lead {
            margin-top: 22px;
            color: rgb(255 255 255 / 0.85);
        }
        & .sq-hero .btn {
            margin-top: 32px;
            height: 52px;
            padding: 0 28px;
            font-size: 16px;
        }
        & .sq-hero .note {
            margin-top: 14px;
            color: rgb(255 255 255 / 0.7);
        }
    }

    @keyframes mk-snapblock {
        0%,
        20% {
            transform: translate(26px, -34px) rotate(10deg);
            opacity: 0.6;
        }
        45%,
        100% {
            transform: none;
            opacity: 1;
        }
    }

    @media (max-width: 1000px) {
        .mk .fl.hide-md {
            display: none;
        }
    }

    @media (max-width: 700px) {
        .mk .fl {
            opacity: 0.35;
        }
        .mk .fl.glass {
            display: none;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .mk .fl.blocks i {
            animation: none;
        }
    }
}
