/**
 * Atmosfera Hero widget styles.
 * All sizes use the project rem system: 1px in Figma = 1rem.
 */

/* =========================================================
   Widget base
   ========================================================= */
.atm-hero {
    --atm-hero-bg: #f4f0ec;
    --atm-hero-text: #2f2f2f;
    --atm-hero-muted: #777777;
    --atm-hero-green: #0a4841;
    --atm-hero-accent: #38a7a1;
    --atm-hero-white: #ffffff;
    --atm-hero-mask-wide: url('../img/patch-1.svg');
    --atm-hero-mask-side: url('../img/patch-2.svg');
    background: var(--atm-hero-bg);
    color: var(--atm-hero-text);
    font-family: Inter, Arial, sans-serif;
    padding: 0 0 70rem;
    overflow: hidden;
}

.atm-hero * {
    box-sizing: border-box;
}

.atm-hero__container {
    width: calc(100% - 320rem);
    max-width: 1580rem;
    margin: 0 auto;
    position: relative;
}

.atm-hero__layout {
    position: relative;
}

/* =========================================================
   Main content
   ========================================================= */
.atm-hero__content {
    position: relative;
    z-index: 3;
}

.atm-hero__title-wrap {
    position: relative;
}

.atm-hero__title {
    margin: 0;
    color: var(--atm-hero-text);
    font-family: Forum, Georgia, serif;
    font-size: 72rem;
    font-weight: 400;
    line-height: 1.13;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.atm-hero__description {
    max-width: 360rem;
    color: var(--atm-hero-muted);
    font-size: 18rem;
    font-weight: 400;
    line-height: 1.55;
}

.atm-hero__action-row {
    display: flex;
    align-items: center;
    gap: 42rem;
    margin-top: 58rem;
}

.atm-hero__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16rem;
    min-width: 260rem;
    min-height: 70rem;
    padding: 18rem 34rem;
    border-radius: 12rem;
    background: var(--atm-hero-accent);
    color: var(--atm-hero-white);
    font-size: 13rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.atm-hero__button:hover,
.atm-hero__button:focus-visible {
    color: var(--atm-hero-white);
    filter: brightness(0.96);
    transform: translateY(-2rem);
}

.atm-hero__button-arrow {
    font-size: 16rem;
    line-height: 1;
}

.atm-hero__button-icon {
    display: block;
    width: 16rem;
    height: 16rem;
    flex: 0 0 auto;
    object-fit: contain;
}

/* =========================================================
   Badge
   ========================================================= */
.atm-hero__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56rem;
    padding: 12rem 36rem;
    border-radius: 10rem;
    background: var(--atm-hero-green);
    color: var(--atm-hero-white);
    font-family: Inter, Arial, sans-serif;
    font-size: 24rem;
    font-weight: 500;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    transform: rotate(3deg);
    transform-origin: center;
}

.atm-hero__badge--inline {
    margin-left: 38rem;
    vertical-align: middle;
}

.atm-hero__badge--absolute {
    position: absolute;
    top: 76rem;
    left: 1050rem;
    z-index: 4;
}

/* =========================================================
   Image / mask
   ========================================================= */
.atm-hero__visual {
    position: relative;
}

.atm-hero__media {
    position: relative;
    overflow: hidden;
    background: #d8d8d8;
    isolation: isolate;
}

.atm-hero__media-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    transition: transform 0.6s ease;
}

.atm-hero__media-img {
    display: none;
}

.atm-hero__media::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: var(--atm-hero-overlay-gradient, linear-gradient(180deg, rgba(5, 22, 35, 0.16), rgba(5, 22, 35, 0.02)));
    opacity: 1;
}

.atm-hero--overlay-none .atm-hero__media::after {
    display: none;
}

.atm-hero--overlay-color .atm-hero__media::after {
    background: var(--atm-hero-overlay-color, rgba(5, 22, 35, 0.22));
}

.atm-hero--overlay-gradient .atm-hero__media::after {
    background: var(--atm-hero-overlay-gradient, linear-gradient(180deg, rgba(5, 22, 35, 0.22), rgba(5, 22, 35, 0.04)));
}

.atm-hero__media--mask-wide {
    -webkit-mask-image: var(--atm-hero-mask-wide);
    mask-image: var(--atm-hero-mask-wide);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-position: center;
    mask-position: center;
}

.atm-hero__media--mask-side {
    -webkit-mask-image: var(--atm-hero-mask-side);
    mask-image: var(--atm-hero-mask-side);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-position: center;
    mask-position: center;
}

.atm-hero__media--mask-none {
    -webkit-mask-image: none;
    mask-image: none;
    border-radius: 50rem;
}

/* =========================================================
   Features
   ========================================================= */
.atm-hero__features {
    display: flex;
    align-items: flex-start;
    gap: 54rem;
    position: relative;
    z-index: 4;
}

.atm-hero__features--media {
    position: absolute;
    top: 72rem;
    right: 82rem;
    left: 760rem;
}

.atm-hero__feature {
    display: flex;
    flex-direction: column;
    gap: 20rem;
    max-width: 190rem;
    color: var(--atm-hero-white);
    font-size: 18rem;
    font-weight: 400;
    line-height: 1.25;
}

.atm-hero__feature-mark {
    display: block;
    width: 20rem;
    height: 6rem;
    border-radius: 99rem;
    background: var(--atm-hero-white);
    transform: rotate(-45deg);
}

.atm-hero__features--content {
    margin-top: 54rem;
    gap: 70rem;
}

.atm-hero__features--content .atm-hero__feature {
    max-width: 230rem;
    color: var(--atm-hero-text);
}

.atm-hero__features--content .atm-hero__feature-mark {
    background: var(--atm-hero-text);
}

.atm-hero__features--mobile {
    display: none;
}

.atm-hero__features--below {
    margin-top: 34rem;
    padding: 0;
}

/* =========================================================
   Testimonials
   ========================================================= */
.atm-hero__reviews {
    --atm-review-duration: 850ms;
    position: absolute;
    z-index: 5;
    width: 270rem;
    min-height: 170rem;
}

.atm-hero__review {
    position: absolute;
    inset: 0;
    width: 100%;
    padding: 28rem 30rem 26rem;
    border-radius: 12rem;
    background: var(--atm-hero-white);
    color: var(--atm-hero-text);
    box-shadow: 0 18rem 50rem rgba(38, 35, 30, 0.10);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(0);
    transition:
        opacity var(--atm-review-duration) ease,
        transform var(--atm-review-duration) ease,
        visibility 0s linear var(--atm-review-duration);
}

.atm-hero__review.is-active {
    position: relative;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(0, 0) scale(1);
    transition:
        opacity var(--atm-review-duration) ease,
        transform var(--atm-review-duration) ease,
        visibility 0s linear 0s;
}

.atm-hero__reviews--animation-fade .atm-hero__review {
    transform: translateY(0);
}

.atm-hero__reviews--animation-slide-up .atm-hero__review {
    transform: translateY(18rem);
}

.atm-hero__reviews--animation-slide-left .atm-hero__review {
    transform: translateX(22rem);
}

.atm-hero__reviews--animation-zoom .atm-hero__review {
    transform: scale(0.96);
}

.atm-hero__review-quote {
    height: 26rem;
    color: #c7a36f;
    font-family: Georgia, serif;
    font-size: 48rem;
    line-height: 0.7;
}

.atm-hero__review-text {
    margin-top: 10rem;
    font-size: 13rem;
    font-weight: 400;
    line-height: 1.35;
}

.atm-hero__review-author {
    display: flex;
    align-items: center;
    gap: 12rem;
    margin-top: 20rem;
}

.atm-hero__review-photo {
    display: block;
    width: 44rem;
    height: 44rem;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 44rem;
}

.atm-hero__review-meta {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    font-size: 11rem;
    line-height: 1.2;
}

.atm-hero__review-meta strong {
    font-size: 12rem;
    font-weight: 600;
}

.atm-hero__review-meta span {
    color: var(--atm-hero-muted);
}

/* =========================================================
   Stats strip
   ========================================================= */
.atm-hero__stats {
    position: relative;
    z-index: 6;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    align-items: stretch;
    min-height: 130rem;
    margin: -70rem auto 0;
    padding: 28rem 24rem;
    border-radius: 12rem;
    background: var(--atm-hero-white);
    box-shadow: 0 20rem 60rem rgba(38, 35, 30, 0.06);
}

.atm-hero__stat {
    display: flex;
    align-items: flex-start;
    gap: 22rem;
    padding: 0 30rem;
    border-right: 1rem solid rgba(20, 20, 20, 0.12);
}

.atm-hero__stat:last-child {
    border-right: 0;
}

.atm-hero__stat-icon {
    position: relative;
    flex: 0 0 auto;
    width: 38rem;
    height: 46rem;
    border: 4rem solid var(--atm-hero-green);
    border-top-width: 5rem;
    border-radius: 16rem 16rem 18rem 18rem;
    clip-path: polygon(50% 0, 100% 18%, 100% 65%, 50% 100%, 0 65%, 0 18%);
}

.atm-hero__stat-icon::after {
    content: '';
    position: absolute;
    top: 15rem;
    left: 11rem;
    width: 14rem;
    height: 8rem;
    border-left: 3rem solid var(--atm-hero-green);
    border-bottom: 3rem solid var(--atm-hero-green);
    transform: rotate(-45deg);
}

.atm-hero__stat-icon-img {
    display: block;
    flex: 0 0 auto;
    width: 42rem;
    height: 46rem;
    object-fit: contain;
}

.atm-hero__stat-value {
    display: flex;
    align-items: baseline;
    gap: 8rem;
    color: var(--atm-hero-text);
    font-family: Forum, Georgia, serif;
    line-height: 1;
}

.atm-hero__stat-value span {
    font-size: 48rem;
    font-weight: 400;
}

.atm-hero__stat-value em {
    font-family: Inter, Arial, sans-serif;
    font-size: 22rem;
    font-style: normal;
    font-weight: 400;
}

.atm-hero__stat-caption {
    margin-top: 14rem;
    max-width: 260rem;
    color: #2f2f2f;
    font-size: 16rem;
    font-weight: 400;
    line-height: 1.25;
}

/* =========================================================
   Layout 1: wide media below
   ========================================================= */
.atm-hero--wide .atm-hero__content {
    max-width: 1580rem;
}

.atm-hero--wide .atm-hero__title {
    max-width: 1540rem;
}

.atm-hero--wide .atm-hero__action-row {
    margin-top: 72rem;
}

/*
 * The first hero image deliberately goes wider than the common 1580rem grid.
 * This reproduces the Figma composition where the broken mask extends almost to the viewport edges.
 */
.atm-hero--wide .atm-hero__visual {
    margin-top: -149rem;
    margin-left: -126rem;
    margin-right: -126rem;
}

.atm-hero--wide .atm-hero__media {
    width: 100%;
    height: 900rem;
}

.atm-hero--wide .atm-hero__media-bg {
    background-position: center center;
    background-size: cover;
}

.atm-hero--wide .atm-hero__features--media {
    top: 51rem;
    right: 60rem;
    left: auto;
    gap: 70rem;
}

.atm-hero--wide .atm-hero__reviews {
    right: 128rem;
    top: 255rem;
}

.atm-hero--wide .atm-hero__stats {
    margin-top: -185rem;
}


.atm-hero--side .atm-hero__media,
.atm-hero--lead .atm-hero__media {
    -webkit-mask-image: none;
    mask-image: none;
    border-radius: 50rem;
}

/* =========================================================
   Layout 2 and 3: side media
   ========================================================= */
.atm-hero--side .atm-hero__layout,
.atm-hero--lead .atm-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 736rem;
    gap: 64rem;
    align-items: center;
}

.atm-hero--side .atm-hero__content,
.atm-hero--lead .atm-hero__content {
    padding-top: 0;
}

.atm-hero--side .atm-hero__title,
.atm-hero--lead .atm-hero__title {
    max-width: 660rem;
    font-size: 68rem;
    line-height: 1.16;
}

.atm-hero--side .atm-hero__action-row,
.atm-hero--lead .atm-hero__action-row {
    flex-direction: row;
    align-items: flex-start;
    gap: 38rem;
    margin-top: 58rem;
}

.atm-hero--side .atm-hero__media,
.atm-hero--lead .atm-hero__media {
    width: 736rem;
    height: 727rem;
}

.atm-hero--side .atm-hero__media-bg,
.atm-hero--lead .atm-hero__media-bg {
    background-position: center top;
}

.atm-hero--side .atm-hero__features--media,
.atm-hero--lead .atm-hero__features--media {
    top: 72rem;
    right: 62rem;
    left: 70rem;
    gap: 52rem;
}

.atm-hero--side .atm-hero__feature,
.atm-hero--lead .atm-hero__feature {
    max-width: 170rem;
    font-size: 16rem;
}

.atm-hero--side .atm-hero__reviews,
.atm-hero--lead .atm-hero__reviews {
    display: none;
}

.atm-hero--side .atm-hero__stats,
.atm-hero--lead .atm-hero__stats {
    margin-top: 34rem;
}

.atm-hero--lead .atm-hero__features--below {
    color: var(--atm-hero-text);
}

.atm-hero--lead .atm-hero__features--below .atm-hero__feature {
    color: var(--atm-hero-text);
}

.atm-hero--lead .atm-hero__features--below .atm-hero__feature-mark {
    background: var(--atm-hero-text);
}


/* =========================================================
   Mobile
   ========================================================= */
@media (max-width: 767px) {
    .atm-hero {
        padding: 0 0 46rem;
    }

    .atm-hero__container {
        width: calc(100% - 32rem);
    }

    .atm-hero__layout,
    .atm-hero--side .atm-hero__layout,
    .atm-hero--lead .atm-hero__layout {
        display: flex;
        flex-direction: column;
        gap: 28rem;
    }

    .atm-hero__visual {
        order: 1;
        display: block;
        width: 100%;
        margin: 0;
    }

    .atm-hero__content {
        order: 2;
    }

    .atm-hero__title,
    .atm-hero--side .atm-hero__title,
    .atm-hero--lead .atm-hero__title {
        max-width: none;
        font-size: 36rem;
        line-height: 1.14;
    }

    .atm-hero__badge {
        min-height: 38rem;
        padding: 9rem 18rem;
        border-radius: 8rem;
        font-size: 13rem;
    }

    .atm-hero__badge--inline {
        margin-top: 16rem;
        margin-left: 0;
    }

    .atm-hero__badge--absolute {
        position: static;
        margin-top: 18rem;
    }

    .atm-hero__action-row,
    .atm-hero--wide .atm-hero__action-row,
    .atm-hero--side .atm-hero__action-row,
    .atm-hero--lead .atm-hero__action-row {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 22rem;
        margin-top: 32rem;
    }

    .atm-hero__description {
        max-width: none;
        font-size: 15rem;
    }

    .atm-hero__button {
        width: 100%;
        min-height: 56rem;
        min-width: 0;
        font-size: 12rem;
    }

    .atm-hero--wide .atm-hero__visual,
    .atm-hero--side .atm-hero__visual,
    .atm-hero--lead .atm-hero__visual {
        margin-top: 0;
        margin-left: 0;
        margin-right: 0;
    }


    /*
     * Mobile media is intentionally simplified:
     * the mask is disabled, the photo becomes a horizontal card,
     * features move below the photo with dark text, and reviews are hidden.
     */
    .atm-hero__media,
    .atm-hero--wide .atm-hero__media,
    .atm-hero--side .atm-hero__media,
    .atm-hero--lead .atm-hero__media {
        width: 100%;
        height: auto;
        min-height: 0;
        overflow: hidden;
        background: transparent;
        -webkit-mask-image: none;
        mask-image: none;
        border-radius: 28rem;
    }

    .atm-hero__media::after {
        display: none;
    }

    .atm-hero__media-bg {
        display: none;
    }

    .atm-hero__media-img {
        position: relative;
        z-index: 1;
        display: block;
        width: 100%;
        height: 220rem;
        border-radius: 28rem !important;
        object-fit: cover;
        object-position: center;
    }


    .atm-hero__features--media,
    .atm-hero__features--content,
    .atm-hero__features--below {
        display: none;
    }

    .atm-hero__features--mobile {
        position: static;
        display: grid;
        grid-template-columns: 1fr;
        gap: 14rem;
        margin-top: 0;
        width: 100%;
    }

    .atm-hero__feature,
    .atm-hero--side .atm-hero__feature,
    .atm-hero--lead .atm-hero__feature {
        max-width: none;
        flex-direction: row;
        align-items: flex-start;
        gap: 14rem;
        color: var(--atm-hero-text);
        font-size: 14rem;
    }

    .atm-hero__features--mobile .atm-hero__feature {
        color: var(--atm-hero-text);
    }

    .atm-hero__features--mobile .atm-hero__feature-mark {
        background: var(--atm-hero-text);
    }

    .atm-hero__feature-mark {
        width: 16rem;
        height: 5rem;
        margin-top: 7rem;
    }

    .atm-hero__reviews,
    .atm-hero--wide .atm-hero__reviews,
    .atm-hero--side .atm-hero__reviews,
    .atm-hero--lead .atm-hero__reviews {
        display: none;
    }

    .atm-hero__stats,
    .atm-hero--wide .atm-hero__stats,
    .atm-hero--side .atm-hero__stats,
    .atm-hero--lead .atm-hero__stats {
        grid-template-columns: 1fr 1fr;
        min-height: 0;
        margin-top: 30rem;
        padding: 22rem 12rem;
        row-gap: 24rem;
    }

    .atm-hero__stat {
        gap: 14rem;
        padding: 0 12rem;
    }

    .atm-hero__stat:nth-child(2n) {
        border-right: 0;
    }

    .atm-hero__stat-icon,
    .atm-hero__stat-icon-img {
        width: 28rem;
        height: 34rem;
        border-width: 3rem;
    }

    .atm-hero__stat-icon::after {
        top: 10rem;
        left: 8rem;
        width: 10rem;
        height: 6rem;
        border-left-width: 2rem;
        border-bottom-width: 2rem;
    }

    .atm-hero__stat-value span {
        font-size: 30rem;
    }

    .atm-hero__stat-value em {
        font-size: 15rem;
    }

    .atm-hero__stat-caption {
        max-width: none;
        font-size: 11rem;
        line-height: 1.25;
    }
}

/* =========================================================
   Lead layout content features alignment
   ========================================================= */
.atm-hero--lead .atm-hero__features--content {
    margin-top: 34rem;
}

.atm-hero--lead .atm-hero__features--content .atm-hero__feature {
    color: var(--atm-hero-text);
}

.atm-hero--lead .atm-hero__features--content .atm-hero__feature-mark {
    background: var(--atm-hero-text);
}
