/* MODUŁ: HERO — mesh glow / Enblox-inspired (patterns/hero.php)
 *
 * Gradient = poziomy PAS na 100vw (nie lokalne bloby).
 * Soaro: accent via --brand-* (blue→yellow→orange→pink).
 */

.hero--mesh {
    --hero-ink: var(--wp--preset--color--contrast, #0C0C0C);
    --hero-body: rgba(12, 12, 12, 0.7);
    --hero-coral: var(--brand-orange, #FE9947);
    --hero-violet: var(--brand-pink, #FD66A7);
    --hero-peach: var(--brand-yellow, #FFE050);
    --hero-magenta: var(--brand-pink, #FD66A7);
    /* Identycznie jak .oferta */
    --hero-pad-x: clamp(1.25rem, 4vw, 2.5rem);
    --hero-wide: var(--wp--style--global--wide-size, 1450px);

    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    min-height: min(1180px, 125vh);
    margin: 0;
    padding:
        calc(var(--header-height, 120px) + clamp(6rem, 12vw, 10.5rem))
        0
        0;
    overflow: visible;
    background-color: #fff;
    color: var(--hero-ink);
    text-align: center;
}

/* ——— Split: treść lewo + mockup prawo ——— */
.hero--split {
    text-align: left;
    align-items: stretch;
}

.hero__intro {
    position: relative;
    z-index: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    /* Jak .oferta__inner */
    box-sizing: border-box;
    width: min(100%, var(--hero-wide));
    margin: 0 auto;
    padding: 0 var(--hero-pad-x);
    flex-shrink: 0;
}

/* ——— Copy (góra) ——— */
.hero__copy {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.85rem, 2vw, 1.25rem);
    width: min(100%, 42rem);
    margin: 0 auto;
    flex-shrink: 0;
}

.hero--split .hero__copy {
    align-items: flex-start;
    width: 100%;
    max-width: 36rem;
    margin: 0;
}

.hero--split .hero__services {
    justify-content: flex-start;
}

.hero--split .hero__services li:first-child {
    padding-left: 0;
}

.hero--split .hero__actions {
    justify-content: flex-start;
}

.hero__visual {
    position: relative;
    z-index: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
    min-width: 0;
    pointer-events: none;
    user-select: none;
}

.hero__phone {
    display: block;
    width: min(100%, 28rem);
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    object-position: center bottom;
}

.hero__eyebrow {
    margin: 0;
    font-family: ui-serif, Georgia, 'Times New Roman', Times, serif;
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.35;
    color: var(--hero-ink);
}

.hero__title {
    margin: 0;
    font-family: var(--wp--preset--font-family--system-sans, 'Outfit', sans-serif);
    font-size: clamp(2.5rem, 7vw, 4.35rem);
    font-weight: 500;
    line-height: 1.02;
    color: var(--hero-ink);
}

.hero__lede {
    margin: 0;
    max-width: 38rem;
    font-family: var(--wp--preset--font-family--system-sans, 'Outfit', sans-serif);
    font-size: clamp(0.95rem, 1.5vw, 1.0625rem);
    font-weight: 300;
    line-height: 1.65;
    color: var(--hero-body);
}

.hero__services {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: clamp(0.15rem, 0.8vw, 0.35rem) 0 0;
    padding: 0;
    font-family: var(--wp--preset--font-family--system-sans, 'Outfit', sans-serif);
    font-size: clamp(0.8125rem, 1.15vw, 0.9375rem);
    font-weight: 500;
    line-height: 1.3;
    color: rgba(12, 12, 12, 1);
}

.hero__services li {
    display: inline-flex;
    align-items: center;
    padding: 0 clamp(0.9rem, 2.2vw, 1.35rem);
    white-space: nowrap;
}

.hero__services li + li {
    border-left: 1px solid rgba(12, 12, 12, 0.16);
}

.hero__actions {
    display: flex;
    justify-content: center;
    margin-top: clamp(0.55rem, 1.8vw, 1rem);
}

.hero__cta {
    --hero-cta-ease: cubic-bezier(0.32, 0.72, 0, 1);
    --hero-cta-dur: 420ms;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    box-sizing: border-box;
    min-height: 3rem;
    padding: 0 1.35rem 0 1.2rem;
    border-radius: 999px;
    overflow: hidden;
    background: var(--wp--preset--color--contrast);
    color: #fff;
    box-shadow: 0 8px 24px rgba(26, 25, 27, 0.06);
    font-family: var(--wp--preset--font-family--system-sans, 'Outfit', sans-serif);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    transition:
        background-color 220ms ease,
        color 220ms ease,
        border-color 220ms ease;
}

a.hero__cta {
    color: #fff;
}

.hero__cta-icon,
.hero__cta-arrow {
    display: block;
    flex-shrink: 0;
    height: 1.05rem;
    overflow: hidden;
    transition:
        transform var(--hero-cta-dur) var(--hero-cta-ease),
        opacity calc(var(--hero-cta-dur) * 0.85) ease,
        width var(--hero-cta-dur) var(--hero-cta-ease),
        margin var(--hero-cta-dur) var(--hero-cta-ease);
}

.hero__cta-icon {
    width: 1.05rem;
    transform: translateX(0);
    opacity: 1;
}

.hero__cta-label {
    display: block;
    white-space: nowrap;
    transition: transform var(--hero-cta-dur) var(--hero-cta-ease);
}

.hero__cta-arrow {
    width: 0;
    transform: translateX(0.75rem);
    opacity: 0;
    margin-left: 0;
}

.hero__cta:hover,
.hero__cta:focus-visible {
    background: var(--hero-ink);
    border-color: var(--hero-ink);
    color: #fff;
    outline: none;
}

.hero__cta:hover .hero__cta-icon,
.hero__cta:focus-visible .hero__cta-icon {
    width: 0;
    margin-right: -0.55rem; /* zjada gap przy chowaniu */
    transform: translateX(-140%);
    opacity: 0;
}

.hero__cta:hover .hero__cta-label,
.hero__cta:focus-visible .hero__cta-label {
    transform: translateX(0);
}

.hero__cta:hover .hero__cta-arrow,
.hero__cta:focus-visible .hero__cta-arrow {
    width: 1.05rem;
    transform: translateX(0);
    opacity: 1;
}

.hero__cta:focus-visible {
    outline: 2px solid var(--hero-coral);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .hero__cta,
    .hero__cta-icon,
    .hero__cta-label,
    .hero__cta-arrow {
        transition: none;
    }

    .hero__cta:hover .hero__cta-icon,
    .hero__cta:focus-visible .hero__cta-icon {
        width: 0;
        margin-right: -0.55rem;
        transform: none;
        opacity: 0;
    }

    .hero__cta:hover .hero__cta-arrow,
    .hero__cta:focus-visible .hero__cta-arrow {
        width: 1.05rem;
        transform: none;
        opacity: 1;
    }
}

/* ——— Stage: ukośna aurora + social proof ——— */
.hero__stage {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: clamp(-3.25rem, -5vh, -2.25rem);
    min-height: clamp(520px, 58vh, 680px);
    padding: clamp(2.5rem, 6vh, 4.5rem) 0 clamp(5rem, 10vh, 7.5rem);
    overflow: visible;
    pointer-events: none;
}

.hero__stage .hero__proof-rail {
    pointer-events: auto;
}

/*
 * SVG: pas od góry, rozciągnięty w dół.
 */
.hero__mesh {
    /* animation: animateMorph 8s ease-in-out -3s infinite alternate-reverse; */
    position: absolute;
    left: 50%;
    /* top: -10%; */
    z-index: 1;
    width: 100vw;
    height: 100%;
    transform: translate3d(-50%, 0, 0) scale(1.03);
    /* transform: translate3d(-50%, 0, 0) rotate(-2.5deg) scale(1.03); */
    background:
        url('../../assets/images/hero/hero-aurora.svg?v=20260723-tall')
        center top / 100% 100%
        no-repeat;
    /* filter: blur(36px); */
    opacity: 0.5;
    pointer-events: none;
    overflow: visible;
    will-change: transform;
    -webkit-mask-image: linear-gradient(
        180deg,
        #000 0%,
        #000 48%,
        rgba(0, 0, 0, 0.85) 68%,
        rgba(0, 0, 0, 0.45) 85%,
        rgba(0, 0, 0, 0.12) 96%,
        transparent 100%
    );
    mask-image: linear-gradient(
        180deg,
        #000 0%,
        #000 48%,
        rgba(0, 0, 0, 0.85) 68%,
        rgba(0, 0, 0, 0.45) 85%,
        rgba(0, 0, 0, 0.12) 96%,
        transparent 100%
    );
}

/* ——— Social proof: fake glass (bez backdrop-filter) ——— */
.hero__proof-rail {
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    width: min(100%, var(--hero-wide));
    margin: 0 auto;
    padding: 0 var(--hero-pad-x);
}

.hero__proof {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hero__proof-item {
    display: flex;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.hero__badge {
    position: relative;
    isolation: isolate;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    min-height: 8.25rem;
    padding: 1.15rem 0.85rem 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 1rem;
    background: linear-gradient(165deg, rgb(255 255 255 / 24%) 0%, rgb(255 255 255 / 68%) 55%, rgb(255 255 255 / 15%) 100%);
    box-shadow: 0 1px 0 rgb(255 255 255) inset, 0 -1px 0 rgb(12 12 12 / 0%) inset, 0 10px 28px rgb(26 25 27 / 4%);
    text-decoration: none;
    text-align: center;
    color: inherit;
    font-family: var(--wp--preset--font-family--system-sans, 'Outfit', sans-serif);
    overflow: hidden;
    transition:
        transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 260ms ease,
        border-color 260ms ease,
        background-color 260ms ease;
}

/* a.hero__badge:hover,
a.hero__badge:focus-visible,
.hero__badge:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.82);
    background:
        linear-gradient(
            165deg,
            rgba(255, 255, 255, 0.62) 0%,
            rgba(255, 255, 255, 0.36) 55%,
            rgba(255, 255, 255, 0.26) 100%
        );
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 14px 32px rgba(26, 25, 27, 0.1);
    outline: none;
} */

a.hero__badge:focus-visible {
    outline: 2px solid var(--hero-coral);
    outline-offset: 3px;
}

.hero__badge-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 28px;
    margin: 0 0 0.1rem;
}

.hero__badge-logo {
    display: block;
    flex: 0 1 auto;
    width: auto;
    max-width: 52%;
    height: clamp(1.35rem, 1.9vw, 1.7rem);
    margin: 0;
    object-fit: contain;
    object-position: center center;
}

.hero__badge-logo--meta {
    height: clamp(1.15rem, 1.65vw, 1.4rem);
}

.hero__badge-logo--clutch {
    height: clamp(1.15rem, 1.65vw, 1.4rem);
    max-width: 54%;
}

.hero__badge-logo--designrush {
    height: clamp(1.42rem, 2.05vw, 1.75rem);
    max-width: 68%;
}

.hero__badge-rating {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.hero__badge-score {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
    color: rgba(12, 12, 12, 0.78);
}

.hero__badge-stars {
    display: inline-flex;
    gap: 0.06rem;
    color: #F4B400;
    line-height: 0;
}

.hero__badge-stars svg {
    display: block;
    width: 0.8125rem;
    height: 0.8125rem;
}

.hero__badge-meta {
    font-size: 0.8125rem;
    font-weight: 300;
    line-height: 1.2;
    color: rgba(12, 12, 12, 0.75);
}

.hero__badge--stat {
    gap: 0.35rem;
}

.hero__badge-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
}

.hero__badge-stat-value {
    display: block;
    font-size: clamp(1.85rem, 2.8vw, 2rem);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 0.95;
    color: #0f0f0f;
}

.hero__badge-stat-label {
    display: block;
    max-width: 11ch;
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.25;
    letter-spacing: 0.01em;
    color: rgba(12, 12, 12, 0.75);
    text-transform: lowercase;
    text-wrap: balance;
}

/* FOUC + motion */
.hero--mesh [data-hero-anim] {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .hero--mesh [data-hero-anim] {
        opacity: 1;
    }

    .hero__mesh {
        animation: none !important;
    }

    .hero__badge {
        transition: none;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .hero__mesh {
        animation: heroAuroraDrift 18s ease-in-out infinite alternate;
    }
}

/* @keyframes heroAuroraDrift {
    from {
        transform: translate3d(-50.5%, -0.5%, 0) scale(1.03);
    }
    to {
        transform: translate3d(-49.5%, 1%, 0) scale(1.055);
    }
} */

/* @keyframes heroAuroraDrift {
    from {
        transform: translate3d(-50.5%, -0.5%, 0) rotate(-2.8deg) scale(1.03);
    }
    to {
        transform: translate3d(-49.5%, 1%, 0) rotate(-2.2deg) scale(1.055);
    }
} */

@media (max-width: 1100px) {
    .hero__proof {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .hero--mesh {
        min-height: min(980px, 125vh);
    }

    .hero--split .hero__intro {
        grid-template-columns: 1fr;
        gap: clamp(1.25rem, 4vw, 2rem);
    }

    .hero--split .hero__copy {
        max-width: 42rem;
        margin: 0 auto;
        align-items: center;
        text-align: center;
    }

    .hero--split .hero__services {
        justify-content: center;
    }

    .hero--split .hero__services li:first-child {
        padding-left: clamp(0.9rem, 2.2vw, 1.35rem);
    }

    .hero--split .hero__actions {
        justify-content: center;
    }

    .hero__phone {
        width: min(100%, 20rem);
    }

    .hero__stage {
        margin-top: clamp(-2.75rem, -4.5vh, -1.75rem);
        min-height: clamp(440px, 52vh, 580px);
    }
}

@media (max-width: 640px) {
    .hero__title {
        max-width: 12ch;
    }

    .hero__services {
        flex-direction: column;
        gap: 0.45rem;
        margin-top: 0.25rem;
    }

    .hero__services li {
        padding: 0;
        white-space: normal;
    }

    .hero__services li + li {
        border-left: none;
    }

    .hero__proof {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .hero__badge {
        min-height: 7.5rem;
        padding: 1rem 0.65rem 0.95rem;
        border-radius: 0.9rem;
    }
}
