/* Anchor the hero artwork to the page top, outside the content's clipping area. */
body:has(.calc-hero) {
    position: relative;
    isolation: isolate;
}

.calc-download-button img {
    display: block;
    margin: 0;
}

.calc-download-button:hover {
    opacity: 1;
}

body:has(.calc-hero)::after {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    block-size: max(760px, 100vh);
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(to bottom, color-mix(in srgb, var(--b-bg) 42%, transparent), transparent 70%),
        url('../../images-bricks-calc/hero.jpg') center / cover no-repeat;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 42%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 42%, transparent 100%);
}

.calc-intro-roof.reveal {
    width: 100%;
    max-width: 840px;
    margin: 0 auto 12px;
    transform: scale(0.78);
    transition: opacity 1s cubic-bezier(0.65, 0, 0.35, 1), transform 1s cubic-bezier(0.65, 0, 0.35, 1);
}

.calc-intro-phones {
    position: relative;
    width: min(100%, 980px);
    height:420px;
    margin: 0 auto 40px;
    overflow: hidden;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 64%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 64%, transparent 100%);
}

.calc-intro-phone {
    position: absolute;
    left: 50%;
    top: 0;
    border-radius: 32px;
    overflow: hidden;
    background: #f5f7fa;
    border: 1px solid rgba(17, 24, 39, 0.06);
    will-change: transform, opacity;
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.calc-intro-phone img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.calc-intro-roof svg {
    display: block;
    width: 100%;
    overflow: visible;
}

.calc-intro-roof-path {
    fill: none;
    stroke: var(--b-text);
    stroke-width: 12;
    opacity: 0.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.25s cubic-bezier(0.65, 0, 0.35, 1) 0.12s;
}

@media (max-width: 600px) {
    .calc-intro-roof-path {
        stroke-width: 13;
    }
}

@media (max-width: 480px) {
    .calc-intro-roof-path {
        stroke-width: 15;
    }
}

@media (max-width: 360px) {
    .calc-intro-roof-path {
        stroke-width: 18;
    }
}

.calc-intro-roof.in {
    transform: scale(1);
}

.calc-intro-roof.in .calc-intro-roof-path {
    stroke-dashoffset: 0;
}

@media (prefers-reduced-motion: reduce) {
    .calc-intro-roof.reveal,
    .calc-intro-roof-path {
        transition: none;
    }

    .calc-intro-roof.reveal {
        transform: none;
    }

    .calc-intro-roof-path {
        stroke-dashoffset: 0;
    }
}

#monthly-cost,
#compare-options,
#saved-plans,
#features,
#privacy,
#pricing,
#about,
#whats-new {
    scroll-margin-top: 110px;
}
