.hx {
    --hx-navy: 18, 28, 58;
    --hx-overlay: 0.78;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: #0b1224;
    color: #fff;
    direction: rtl;
}

/* background layers */
.hx__media {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hx__video,
.hx__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-size: cover;
    background-position: center;
}

.hx__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(270deg,
            rgba(var(--hx-navy), calc(var(--hx-overlay) + 0.12)) 0%,
            rgba(var(--hx-navy), var(--hx-overlay)) 42%,
            rgba(var(--hx-navy), calc(var(--hx-overlay) - 0.4)) 100%),
        linear-gradient(180deg, rgba(11, 18, 36, 0.35) 0%, transparent 30%, rgba(11, 18, 36, 0.55) 100%),
        radial-gradient(60% 80% at 85% 30%, rgba(12, 88, 164, 0.35), transparent 70%);
}

.hx__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 70%);
    mask-image: linear-gradient(90deg, #000 0%, transparent 70%);
}

.hx__trend {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    width: 100%;
    height: 40%;
    opacity: 0.75;
    -webkit-mask-image: linear-gradient(270deg, transparent 0%, #000 45%);
    mask-image: linear-gradient(270deg, transparent 0%, #000 45%);
}

.hx__trend-line {
    stroke-dasharray: 2600;
    stroke-dashoffset: 2600;
    animation: hx-draw 3.2s 0.4s cubic-bezier(0.65, 0, 0.35, 1) forwards;
    filter: drop-shadow(0 0 6px rgba(45, 212, 191, 0.7));
}

.hx__trend-area {
    opacity: 0;
    animation: hx-fade 1.6s 2.2s ease forwards;
}

@keyframes hx-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes hx-fade {
    to { opacity: 1; }
}

/* content */
.hx__inner {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 80rem;
    min-height: clamp(520px, 82vh, 720px);
    margin-inline: auto;
    padding: 6rem 1.5rem;
}

.hx__content {
    max-width: 40rem;
}

.hx__logo {
    display: block;
    width: 180px;
    max-width: 60%;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
}

.hx__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
}

.hx__pulse {
    position: relative;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: #2dd4bf;
}

.hx__pulse::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    animation: hx-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes hx-ping {
    75%, 100% {
        transform: scale(2.6);
        opacity: 0;
    }
}

.hx__title {
    margin: 1.1rem 0 0;
    font-size: clamp(1.6rem, 1rem + 2.1vw, 2.6rem);
    font-weight: 900;
    line-height: 1.45;
    letter-spacing: -0.01em;
    color: #fff;
    text-wrap: balance;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hx__subtitle {
    margin: 1rem 0 0;
    max-width: 34rem;
    font-size: clamp(0.9rem, 0.85rem + 0.2vw, 1.02rem);
    line-height: 2;
    color: rgba(255, 255, 255, 0.8);
}

/* typing effect: the ghost keeps the final size so nothing below jumps */
.hx-type {
    position: relative;
}

.hx-type__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.hx-type__ghost {
    visibility: hidden;
}

.hx-type__live {
    position: absolute;
    inset: 0;
}

.hx-type.is-typing .hx-type__live::after,
.hx-type.is-done .hx-type__live::after {
    content: "";
    display: inline-block;
    width: 0.08em;
    min-width: 2px;
    height: 1.05em;
    margin-inline-start: 0.12em;
    vertical-align: -0.15em;
    border-radius: 2px;
    background: #2dd4bf;
    box-shadow: 0 0 10px rgba(45, 212, 191, 0.8);
}

.hx-type.is-done .hx-type__live::after {
    animation: hx-caret 1s steps(1) infinite;
}

@keyframes hx-caret {
    50% { opacity: 0; }
}

.hx__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.hx__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0 1.5rem;
    border-radius: 0.85rem;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.hx__btn:hover {
    transform: translateY(-2px);
}

.hx__btn:focus-visible {
    outline: 2px solid #2dd4bf;
    outline-offset: 3px;
}

.hx__btn--primary {
    background: linear-gradient(135deg, #00ad9c, #0c8f86);
    color: #fff;
    box-shadow: 0 14px 30px -12px rgba(0, 173, 156, 0.75);
}

.hx__btn--primary:hover {
    box-shadow: 0 18px 36px -12px rgba(0, 173, 156, 0.9);
}

.hx__btn--primary svg {
    transition: transform 0.2s ease;
}

.hx__btn--primary:hover svg {
    transform: translateX(-3px);
}

.hx__btn--ghost {
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #fff;
}

.hx__btn--ghost:hover {
    background: rgba(255, 255, 255, 0.16);
}

@media (max-width: 767px) {
    .hx__shade {
        background:
            linear-gradient(180deg,
                rgba(var(--hx-navy), calc(var(--hx-overlay) - 0.1)) 0%,
                rgba(var(--hx-navy), calc(var(--hx-overlay) + 0.08)) 55%,
                rgba(11, 18, 36, 0.95) 100%);
    }

    .hx__grid {
        -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 80%);
        mask-image: linear-gradient(180deg, #000 0%, transparent 80%);
    }

    .hx__trend {
        height: 26%;
        opacity: 0.55;
    }

    .hx__inner {
        min-height: 560px;
        padding: 4.5rem 1rem;
        text-align: center;
        justify-content: center;
    }

    .hx__logo {
        margin-inline: auto;
        width: 150px;
    }

    .hx__subtitle {
        margin-inline: auto;
    }

    .hx__actions {
        justify-content: center;
    }

    .hx__btn {
        flex: 1 1 10rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hx__trend-line,
    .hx__trend-area {
        animation: none;
        stroke-dashoffset: 0;
        opacity: 1;
    }

    .hx__pulse::after {
        animation: none;
    }

    .hx__btn,
    .hx__btn svg {
        transition: none;
    }
}
