/* ====================================================
   Block: Hero
   Single source of truth — all hero-related styles
   ==================================================== */

/* ── Base ─────────────────────────────────────────── */

.hero.section {
    padding-top: 80px;
    padding-bottom: 0;
    display: flex;
    align-items: center;
}

.hero__container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    position: relative;
    gap: 20px;
}

.hero__content {
    flex: 1.3;
    padding-top: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(32px, 5.5vw, 66px);
    font-weight: 500;
    line-height: 1.15;
    color: var(--color-text-main);
    margin-bottom: 24px;
    width: 100%;
}

/* Підзаголовок стоїть ПІСЛЯ h1 (не всередині — чистий H1 для SEO).
   Негативний верхній відступ компенсує margin-bottom заголовка,
   зберігаючи візуальний зазор 8px як раніше */
.hero__title-sub {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(20px, 2.5vw, 36px);
    font-weight: 300;
    line-height: 1.3;
    color: var(--color-text-main);
    margin: -16px 0 24px;
}

.hero__description {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.6;
    color: var(--color-text-main);
    max-width: 650px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero__actions {
    display: flex;
    gap: 20px;
    margin-bottom: 48px;
}

.hero__actions--wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.hero__footer-line {
    width: 150px;
    height: 4px;
    background-color: var(--color-primary);
}

.hero__visual {
    flex: 0.7;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ── Floating Logo ────────────────────────────────── */

.hero__floating-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    animation: heroFloatingSway 6s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.hero__floating-logo--centered {
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
}

.floating-logo-img {
    width: 320px;
    height: auto;
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.15));
    transition: all 0.5s ease;
}

@keyframes heroFloatingSway {
    0% {
        transform: translate(-50%, -50%) translateY(0) rotate(0deg);
    }

    33% {
        transform: translate(-50%, -50%) translateY(-15px) rotate(1deg);
    }

    66% {
        transform: translate(-50%, -50%) translateY(10px) rotate(-1deg);
    }

    100% {
        transform: translate(-50%, -50%) translateY(0) rotate(0deg);
    }
}

/* ── Logo Background ──────────────────────────────── */

.hero__logo-bg-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.05;
}

.hero__logo-bg-img {
    width: 200px;
}

/* ── Visual Grid ──────────────────────────────────── */

.visual-grid {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    position: relative;
    background-image:
        linear-gradient(#f5f5f5 1px, transparent 1px),
        linear-gradient(90deg, #f5f5f5 1px, transparent 1px);
    background-size: 33.33% 33.33%;
    border: 1px solid transparent;
}

.visual-grid::before,
.visual-grid::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border: 1px solid var(--color-primary);
}

.visual-grid::before {
    top: -4px;
    left: -4px;
}

.visual-grid::after {
    top: -4px;
    right: -4px;
}

.visual-grid__bottom-markers {
    position: absolute;
    bottom: -4px;
    left: -4px;
    right: -4px;
    height: 8px;
    display: flex;
    justify-content: space-between;
}

.visual-grid__bottom-markers::before,
.visual-grid__bottom-markers::after {
    content: '';
    width: 8px;
    height: 8px;
    border: 1px solid var(--color-primary);
}

.visual-grid__square {
    position: absolute;
    border: 1px solid rgba(242, 101, 34, 0.1);
}

.visual-grid__square--1 {
    top: 25%;
    left: 25%;
    right: 25%;
    bottom: 25%;
}

.visual-grid__square--2 {
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(242, 101, 34, 0.2);
}

.visual-grid__square--dashed {
    border-style: dashed;
    opacity: 0.3;
}

.visual-grid__dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: var(--color-primary);
}

.visual-grid__dot--3 {
    top: 35%;
    left: 65%;
}

/* ── Variants ─────────────────────────────────────── */

/* About */
.hero--about .hero__title {
    max-width: 700px;
}

/* Contacts */
.contacts-hero {
    padding-bottom: 60px;
}

/* ── Variant: Logistics ───────────────────────────── */

.hero--logistics {
    background: #fff;
    position: relative;
    overflow: hidden;
    padding-bottom: 0;
}

.logistics-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-image: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0) 20%), url('https://images.unsplash.com/photo-1586528116311-ad86d7c7ce80?auto=format&fit=crop&q=80&w=1200');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 1;
}

.logistics-nodes {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--color-primary);
    animation: pulse-node 3s infinite alternate;
}

.node--1 {
    top: 25%;
    left: 35%;
}

.node--2 {
    top: 100%;
    left: 65%;
}

.node--3 {
    top: 45%;
    left: 15%;
}

.node--4 {
    top: 15%;
    left: 80%;
}

@keyframes pulse-node {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }

    100% {
        transform: scale(1.5);
        opacity: 1;
    }
}

.node-line {
    position: absolute;
    background: linear-gradient(90deg, var(--color-primary), transparent);
    height: 1px;
    opacity: 0.2;
    transform-origin: left center;
}

.node-line--1 {
    top: 26%;
    left: 36%;
    width: 40%;
    transform: rotate(35deg);
}

.node-line--2 {
    top: 46%;
    left: 16%;
    width: 25%;
    transform: rotate(-5deg);
}

/* ── Variant: ERP Dark ────────────────────────────── */

.hero--erp-dark {
    background: radial-gradient(circle at 70% 30%, #1a2230 0%, #0a0c10 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero--erp-dark .hero__title {
    color: #fff;
}

.hero--erp-dark .hero__title-sub {
    color: #fff;
}

.hero--erp-dark .hero__description {
    color: rgba(255, 255, 255, 0.7);
}

.hero--erp-dark .section-label__text {
    color: #fff;
}

.hero--erp-dark .hero__footer-line {
    background: rgba(255, 255, 255, 0.1);
}

.hero__glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(242, 101, 34, 0.12) 0%, rgba(242, 101, 34, 0) 70%);
    border-radius: 50%;
    filter: blur(60px);
    z-index: 1;
    animation: glowPulse 6s infinite alternate ease-in-out;
    pointer-events: none;
}

@keyframes glowPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.4;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

.hero__blob {
    position: absolute;
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, rgba(29, 78, 216, 0.1) 0%, rgba(124, 58, 237, 0.05) 40%, transparent 70%);
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
    animation: blobFloat 20s infinite alternate ease-in-out;
}

.hero__blob--1 {
    top: -30%;
    right: -15%;
}

.hero__blob--2 {
    bottom: -30%;
    left: -15%;
    animation-delay: -5s;
}

.hero__glass-layer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    width: 120%;
    height: 200px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.01) 50%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.hero__glass-layer--2 {
    transform: translate(-50%, -50%) rotate(25deg);
    background: linear-gradient(90deg, transparent 0%, rgba(242, 101, 34, 0.02) 50%, transparent 100%);
}

@keyframes blobFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 30px) scale(1.1);
    }
}

/* ── Subpage Hero (hero-sub) ──────────────────────── */

.hero-sub {
    position: relative;
    padding: 120px 0 80px;
    background-color: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.hero-sub__content {
    max-width: 900px;
    position: relative;
    z-index: 2;
    margin: 0 auto;
}

.hero-sub__title {
    font-size: clamp(32px, 5vw, 64px);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--color-text-main);
}

.hero-sub__description {
    font-size: 18px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

.hero-sub__bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8vw;
    font-family: 'Arial Black', Impact, sans-serif;
    font-weight: 900;
    color: #F4F4F4;
    z-index: 1;
    pointer-events: none;
    letter-spacing: 5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.hero-sub__actions {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* ── Responsive ───────────────────────────────────── */

@media (max-width: 1200px) {
    .hero__container {
        flex-direction: column;
    }

    .hero.section {
        padding-top: 110px !important;
    }
}

@media (max-width: 1024px) {
    .hero__title {
        font-size: 60px;
    }
}

@media (max-width: 768px) {
    .hero__visual {
        display: none !important;
    }

    .hero__title,
    .hero-sub__title {
        font-size: 36px;
        line-height: 1.2;
    }

    .hero__description {
        font-size: 16px;
    }

    .hero__actions,
    .hero-sub__actions {
        flex-wrap: wrap;
        gap: 16px !important;
    }

    .hero__actions .btn,
    .hero-sub__actions .btn {
        width: fit-content !important;
        text-align: center;
        justify-content: center;
    }

    .hero-sub {
        padding: 60px 0;
    }

    .hero-sub__bg-text {
        font-size: 50px;
        left: 10px;
    }
}