/* ═══════════════════════════════════════════════════════════════
   hero.css — Hero Section
   ═══════════════════════════════════════════════════════════════ */

/* ── Gradient background ── */
.hero-bg {
    position: relative;
    background:
        radial-gradient(ellipse at 8% 20%, #fdf0b0 0%, transparent 40%),
        radial-gradient(ellipse at 92% 55%, #c3d9ff 0%, transparent 48%),
        #eef2fb;
    min-height: 100vh;
    overflow: hidden;
    padding-top: clamp(70px, 10vw, 90px);
}

/* ── Hero content wrapper ── */
.hero__content {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(1rem, 4vw, 1.5rem);
    padding-right: clamp(1rem, 4vw, 1.5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: calc(100svh - 90px);
    position: relative;
    padding-bottom: 4rem;
}

/* ── Greeting line ── */
.hero__greeting {
    font-family: var(--font-inter);
    color: var(--color-text-heading);
    font-weight: 600;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    margin-bottom: 1.25rem;
    margin-top: -2rem;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.squiggle {
    display: inline-block;
    position: relative;
    font-family: var(--font-heading);
    color: var(--color-text-heading);
    font-weight: 400;
    margin-left: 0.25rem;
    text-decoration: underline wavy var(--color-primary);
    text-decoration-skip-ink: none;
    text-decoration-thickness: 1px;
    text-underline-offset: 8px;
}

/* ── Title wrapper with corner brackets ── */
.hero-title-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: clamp(1rem, 2vw, 1.75rem);
}

.hero-corner-svg {
    position: absolute;
    width: clamp(28px, 5vw, 60px);
    height: clamp(28px, 5vw, 60px);
    pointer-events: none;
    z-index: 0;
}

.hero-corner-tr {
    top: -20px;
    right: -8px;
}

.hero-corner-bl {
    bottom: -20px;
    left: -20px;
}

/* ── Hero Title ── */
.hero-title {
    font-family: var(--font-display);
    font-weight: 900;
    line-height: 0.95;
    text-transform: uppercase;
    margin: 0;
    padding: 0.25rem 0.5rem;
}

.hero-title .line-dark {
    display: block;
    font-size: clamp(1.6rem, 5.5vw + 0.5vh, 4.5rem);
    color: var(--color-dark);
    letter-spacing: clamp(1px, 0.4vw, 4px);
    margin-bottom: clamp(0.15rem, 0.8vw, 0.6rem);
}

.hero-title .line-blue {
    display: block;
    font-size: clamp(1.6rem, 5.5vw + 0.5vh, 5rem);
    color: var(--color-primary);
    letter-spacing: clamp(1px, 0.4vw, 4px);
}

/* ── Subtitle ── */
.hero__subtitle {
    font-family: var(--font-inter);
    max-width: 52rem;
    color: var(--color-text-body);
    font-size: clamp(0.95rem, 1.8vw, 1.2rem);
    line-height: 1.65;
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
    margin-top: 0;
}

/* ── Action buttons row ── */
.hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

/* ── Trusted clients text ── */
.hero__trusted-text {
    font-family: var(--font-kanit);
    color: var(--color-text-heading);
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    font-weight: 500;
    text-align: center;
    line-height: 1.35;
    margin: 0;
}

/* ── Decorative diamond sprites ── */
.diamond {
    position: absolute;
    width: 20px;
    height: auto;
    object-fit: contain;
    opacity: 0.7;
}

.diamond-sm {
    position: absolute;
    width: 14px;
    height: auto;
    object-fit: contain;
    opacity: 0.5;
}

.diamond--pos-1 {
    top: 22%;
    left: 14%;
}
.diamond--pos-2 {
    top: 28%;
    right: 13%;
}
.diamond-sm--pos-3 {
    bottom: 25%;
    left: 28%;
}

/* ══════════════════════════════
   SOCIAL SIDEBAR
══════════════════════════════ */
.social-bar {
    position: absolute;
    left: 28px;
    top: 35%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: var(--z-normal);
}

.social-bar::before,
.social-bar::after {
    content: "";
    display: block;
    width: 1.5px;
    height: 55px;
    background: var(--color-border-sidebar);
}

.social-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-pill);
    background: var(--color-primary);
    display: grid;
    place-items: center;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.social-icon:hover {
    transform: scale(1.15);
    box-shadow: var(--shadow-blue-lg);
}

.social-icon img {
    width: 17px;
    height: 17px;
    filter: brightness(0) invert(1);
}

/* ══════════════════════════════
   TRUSTED CLIENTS WIDGET
══════════════════════════════ */
.trusted-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    margin-top: 0;
}

.arrow-curve {
    position: absolute;
    top: -3.5rem;
    left: 50%;
    transform: translateX(-65%);
    width: 80px;
    opacity: 0.85;
    z-index: 1;
    pointer-events: none;
}

.avatar-stack {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.4s ease;
    margin-top: 0.75rem;
}

.avatar-stack:hover {
    transform: translateX(16px);
}

.avatar-stack .av {
    width: clamp(34px, 5vw, 44px);
    height: clamp(34px, 5vw, 44px);
    border-radius: var(--radius-pill);
    border: 1px solid #000;
    margin-left: -14px;
    background: var(--color-primary);
    display: grid;
    place-items: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--color-white);
    flex-shrink: 0;
    overflow: hidden;
    transition:
        transform 0.4s ease,
        margin-left 0.4s ease,
        opacity 0.4s ease,
        visibility 0.1s ease;
}

.avatar-stack .av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-stack .av:first-child {
    margin-left: 0;
}

.avatar-stack:hover .av {
    margin-left: 6px;
}

.avatar-stack:hover .av:first-child {
    margin-left: 0;
}

.avatar-stack:hover .av-plus {
    opacity: 0;
    visibility: hidden;
    margin-left: -20px;
    transform: scale(0.8);
}

.av-plus {
    background: var(--color-primary);
    color: var(--color-white);
    font-size: clamp(0.7rem, 1.1vw, 1rem);
    font-weight: 700;
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */

/* Large screens — widget sits bottom-right */
@media (min-width: 900px) {
    .trusted-widget {
        position: absolute;
        right: clamp(16px, 3vw, 72px);
        bottom: clamp(32px, 5vh, 80px);
        align-items: center;
    }

    .hero__content {
        padding-bottom: 2rem;
    }

    .arrow-curve {
        position: absolute;
        top: auto;
        bottom: calc(100% + 0.25rem); /* always sits above the stack */
        left: 40%;
        transform: translateX(-60%);
        width: clamp(48px, 5vw, 80px);
    }

    .avatar-stack {
        margin-top: 1.5rem;
    }

    .diamond {
        top: 20%;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .trusted-widget {
        position: relative;
        right: auto;
        bottom: auto;
        margin-top: 2rem;
        align-items: center;
    }
    .arrow-curve {
        position: absolute;
        bottom: calc(70% + 0.25rem);
        top: auto;
        left: 40%;
        transform: translateX(-60%);
        width: 55px;
    }
    .avatar-stack {
        margin-top: 3.5rem;
    }

    .hero__content {
        padding-top: 3rem;
    }
    .hero__subtitle {
        max-width: 40rem;
    }
    .social-bar {
        left: 10px;
        top: 35%;
    }

    .hero-corner-tr {
        top: -14px;
        right: -6px;
    }
    .hero-corner-bl {
        bottom: -14px;
        left: -14px;
    }
    .diamond {
        top: 15%;
    }
}

/* Mobile — hide sidebar */
@media (max-width: 767px) {
    .social-bar {
        display: none;
    }

    .hero-bg {
        min-height: calc(90vh - 70px);
    }
    .hero__content {
        min-height: calc(90vh - 70px);
        padding-top: 5rem;
        padding-bottom: 3rem;
    }

    .hero__greeting {
        margin-top: 0;
    }
    .hero__subtitle {
        font-size: clamp(1.1rem, 1.2vw, 1.6rem);
        max-width: 36rem;
    }
    .hero__actions {
        margin-bottom: 0;
    }

    .trusted-widget {
        margin-top: 3rem;
        position: relative;
        right: auto;
        bottom: auto;
    }

    .arrow-curve {
        width: 55px;
        top: 0rem;
    }

    .avatar-stack {
        margin-top: 4rem;
    }
    .hero-corner-tr {
        top: -10px;
        right: 0px;
    }
    .hero-corner-bl {
        bottom: -6px;
        left: -6px;
    }

    .diamond {
        top: 15%;
    }
}

/* Small mobile */
@media (max-width: 479px) {
    .hero-bg {
        padding-top: clamp(60px, 10vw, 75px);
    }

    .hero__actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .hero__actions .btn-blue,
    .hero__actions .btn-outline {
        width: 60%;
        justify-content: center;
    }

    .hero-title .line-dark,
    .hero-title .line-blue {
        font-size: clamp(1rem, 7vw, 2.5rem);
        letter-spacing: 1px;
    }

    .hero-corner-svg {
        width: clamp(20px, 6vw, 35px);
        height: clamp(20px, 6vw, 35px);
    }

    .hero-corner-tr {
        top: -8px;
        right: -16px;
    }

    .hero-corner-bl {
        bottom: 2px;
        left: -16px;
    }

    .diamond {
        width: 13px;
    }
    .diamond-sm {
        width: 9px;
    }
    .hero-corner-tr {
        top: -10px;
        right: 0px;
    }
    .hero-corner-bl {
        bottom: -6px;
        left: -6px;
    }
    .trusted-widget {
        margin-top: 5rem;
        align-items: center;
    }

    .arrow-curve {
        width: 40px;
        top: -3.5rem;
    }

    .avatar-stack {
        margin-top: -1rem;
    }
}

/* ══════════════════════════════
   SHORT SCREENS (HEIGHT)
══════════════════════════════ */
@media (max-height: 750px) {
    .hero__content {
        justify-content: flex-start;
        padding-top: clamp(2rem, 6vh, 4rem);
    }
    .hero__greeting {
        margin-top: 0;
    }
}
