:root {
    --gold-primary: #c59a45;
    --gold-hover: #ddb058;
    --bg-dark: #090909;
    --card-bg: #141414;
    --text-muted: #a0a0a0;
}

/* ── Section ── */
.hero-main-section {
    background: #000;
    min-height: 100vh;
    color: #fff;
    font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    align-items: center;
    padding: 4rem 2rem;
    overflow: hidden;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 2rem;
}

/* ── Left Hero ── */
.hero-content {
    flex: 1;
    min-width: 300px;
    max-width: 580px;
    z-index: 10;
}

.badge-network {
    display: inline-block;
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-title .highlight {
    color: var(--gold-primary);
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 440px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--gold-primary);
    color: #000;
    border: none;
}

.btn-primary:hover {
    background-color: var(--gold-hover);
    transform: translateY(-2px);
    color: #000;
    box-shadow: 0 6px 20px rgba(197, 154, 69, 0.35);
}

.btn-outline {
    background-color: transparent;
    color: #fff;
    border: 1px solid #444;
}

.btn-outline:hover {
    border-color: #888;
    transform: translateY(-2px);
}

.popular-searches {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.search-tag {
    width: fit-content;
    background: #1a1a1a;
    color: #ccc;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.8rem;
    border: 1px solid #2a2a2a;
    transition:
        background 0.25s,
        color 0.25s,
        border-color 0.25s;
}

.search-tag:hover {
    background: var(--gold-primary);
    color: #000;
    border-color: var(--gold-primary);
}

/* ── Right: Card Stage ── */
.hero-visual {
    flex: 1;
    position: relative;
    height: 680px; /* explicit height — NOT min-height, so % children resolve */
    min-width: 500px;
}

/* Subtle ambient glow behind cards */
.hero-visual::before {
    content: "";
    position: absolute;
    inset: 10% 5%;
    background: radial-gradient(
        ellipse at 50% 50%,
        rgba(197, 154, 69, 0.06) 0%,
        transparent 65%
    );
    pointer-events: none;
    z-index: 0;
}

.cards-wrapper {
    position: relative;
    width: 100%;
    height: 100%; /* now resolves correctly against the explicit parent height */
}

/* ── Card Wrapper (handles position + static rotation) ── */
.card-wrap {
    position: absolute;
    will-change: transform;
    transition: z-index 0s;
}

.card-wrap:hover {
    z-index: 100 !important;
}

/* ── Talent Card (handles float animation) ── */
.talent-card {
    width: 210px;
    height: 100%;
    background: var(--card-bg);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
    animation: float-card 6s ease-in-out infinite;
    transition:
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.4s ease;
    cursor: pointer;
}

.card-wrap:hover .talent-card {
    transform: scale(1.08) translateY(-10px);
    box-shadow: 0 20px 50px rgba(197, 154, 69, 0.2);
}

/* ── Card Image Area ── */
.card-image-area {
    position: relative;
    width: 100%;
    height: 220px;
    background: linear-gradient(145deg, #1c1c1c 0%, #252525 100%);
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.card-wrap:hover .card-img {
    transform: scale(1.05);
}

/* Fade from image to card-bg at bottom */
.card-image-area::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 55%,
        rgba(20, 20, 20, 0.6) 80%,
        #141414 100%
    );
    pointer-events: none;
}

/* ── Role Badge ── */
.card-role-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 0.62rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.4px;
    z-index: 2;
    text-transform: uppercase;
}

.bg-purple {
    background: rgba(103, 58, 183, 0.85);
}
.bg-orange {
    background: rgba(230, 81, 0, 0.85);
}
.bg-green {
    background: rgba(46, 125, 50, 0.85);
}
.bg-blue {
    background: rgba(21, 101, 192, 0.85);
}
.bg-red {
    background: rgba(192, 40, 40, 0.85);
}

/* ── Card Info ── */
.card-info {
    padding: 10px 14px 14px;
    background: var(--card-bg);
}

.card-info h4 {
    margin: 0 0 3px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-info p {
    margin: 0 0 8px;
    font-size: 0.7rem;
    color: #777;
}

.card-rating {
    font-size: 0.73rem;
    color: var(--gold-primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ── Card Positions (scattered layout matching the design) ── */
/*   card-wrap: position + static rotation                     */
/*   .talent-card inside: float animation                       */

.card-1 {
    top: 0%;
    left: 2%;
    z-index: 3;
    transform: rotate(-4deg);
}
.card-2 {
    top: 33%;
    left: 29%;
    z-index: 8;
    transform: rotate(3deg);
}
.card-3 {
    top: 1%;
    left: 62%;
    z-index: 3;
    transform: rotate(4deg);
}
.card-4 {
    top: 76%;
    left: 0%;
    z-index: 4;
    transform: rotate(-3deg);
}
.card-5 {
    top: 81%;
    left: 33%;
    z-index: 5;
    transform: rotate(2deg);
}
.card-6 {
    top: 55%;
    left: 68%;
    z-index: 4;
    transform: rotate(-1deg);
}

/* Staggered timing — each card floats at its own pace */
.card-1 .talent-card {
    animation-delay: 0s;
    animation-duration: 6s;
}
.card-2 .talent-card {
    animation-delay: 1.2s;
    animation-duration: 7.2s;
}
.card-3 .talent-card {
    animation-delay: 0.6s;
    animation-duration: 6.6s;
}
.card-4 .talent-card {
    animation-delay: 1.8s;
    animation-duration: 7.8s;
}
.card-5 .talent-card {
    animation-delay: 0.9s;
    animation-duration: 6.3s;
}
.card-6 .talent-card {
    animation-delay: 2.1s;
    animation-duration: 7.5s;
}

@keyframes float-card {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-14px);
    }
}

.stats-section {
    padding: 13rem 2rem 3rem;
}

.stats-bar {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: #111;
    border: 1px solid #1e1e1e;
    border-radius: 16px;
    padding: 1.6rem 2.5rem;
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.stat-item + .stat-item {
    border-left: 1px solid #222;
    padding-left: 1.5rem;
}

.stat-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
}

.stat-icon svg {
    width: 100%;
    height: 100%;
    stroke: #c59a45;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.stat-number {
    font-family: "Inter", "Segoe UI", sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: #c59a45;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.stat-label {
    font-family: "Inter", "Segoe UI", sans-serif;
    font-size: 0.78rem;
    color: #888;
    margin-top: 3px;
    white-space: nowrap;
}

.slider-baru {
    padding: 0 70px;
}

@media (max-width: 768px) {
    .slider-baru {
        padding: 0;
    }
    .stats-section {
        padding: 0 1rem 2.5rem;
    }

    .stats-bar {
        flex-wrap: wrap;
        padding: 1.4rem 1.5rem;
        gap: 1.2rem 0;
    }

    .stat-item {
        flex: 0 0 50%;
    }

    /* Remove left border on 1st and 3rd items in 2-col layout */
    .stat-item:nth-child(1),
    .stat-item:nth-child(3) {
        border-left: none;
        padding-left: 0;
    }

    .stat-item:nth-child(3) {
        border-top: 1px solid #222;
        padding-top: 1.2rem;
    }

    .stat-item:nth-child(4) {
        border-top: 1px solid #222;
        padding-top: 1.2rem;
    }
}

@media (max-width: 480px) {
    .stat-item {
        flex: 0 0 100%;
    }

    .stat-item + .stat-item {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid #222;
        padding-top: 1.2rem;
    }

    .stat-item:nth-child(3),
    .stat-item:nth-child(4) {
        padding-top: 1.2rem;
    }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .talent-card {
        animation: none;
    }
}

/* ── Responsive: 1024px ── */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3.2rem;
    }
    .hero-visual {
        height: 580px;
        min-width: 400px;
    }
    .talent-card {
        width: 158px;
    }
    .card-image-area {
        height: 195px;
    }
}

/* ── Responsive: tablet 900px ── */
@media (max-width: 900px) {
    .hero-visual {
        min-width: 360px;
        height: 540px;
    }
    .talent-card {
        width: 148px;
    }
    .card-image-area {
        height: 180px;
    }
    .card-1 {
        left: 0%;
    }
    .card-3 {
        left: 46%;
    }
    .card-6 {
        left: 56%;
    }
}

/* ── Responsive: mobile ─────────────────────────────── */
@media (max-width: 768px) {
    .hero-main-section {
        padding: 3rem 1rem 2rem;
    }

    .container {
        flex-direction: column;
    }

    .hero-content {
        text-align: center;
        align-items: center;
        max-width: 100%;
    }

    .hero-title {
        font-size: 2.8rem;
    }
    .hero-subtitle {
        margin: 0 auto 2rem;
    }
    .hero-buttons {
        justify-content: center;
    }
    .popular-searches {
        justify-content: center;
    }

    /* Switch to horizontal scroll carousel on mobile */
    .hero-visual {
        width: 100%;
        min-width: unset;
        min-height: unset;
        overflow: visible;
    }

    .cards-wrapper {
        display: flex;
        flex-direction: row;
        gap: 12px;
        padding: 1rem 1rem 1.5rem;
        overflow-x: auto;
        overflow-y: visible;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        position: relative;
        height: auto;
    }

    .cards-wrapper::-webkit-scrollbar {
        display: none;
    }

    /* Reset all absolute positioning */
    .card-wrap {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        z-index: auto !important;
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .talent-card {
        width: 145px;
        /* Keep floating animation on mobile */
    }

    .card-image-area {
        height: 175px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }
    .talent-card {
        width: 130px;
    }
    .card-image-area {
        height: 155px;
    }
    .card-info h4 {
        font-size: 0.78rem;
    }
}

/* ── Join the community CTA ── */
.cta-join-section {
    padding: 0 2rem 4rem;
}

.cta-join-banner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    background: linear-gradient(135deg, #111 0%, #0a0a0a 100%);
    border: 1px solid #1e1e1e;
    border-radius: 20px;
    padding: 3rem;
}

.cta-join-left {
    flex: 1.1;
    min-width: 260px;
}

.cta-join-label {
    color: var(--gold-primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0 0 0.9rem;
}

.cta-join-heading {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.25;
    color: #dbdbdb;
    margin: 0;
}

.cta-join-heading .highlight {
    color: var(--gold-primary);
}

.cta-join-mid {
    flex: 1;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.cta-join-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

.cta-join-mid .btn-primary {
    align-self: flex-start;
}

.cta-join-visual {
    flex: 0.9;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.cta-join-logo-card {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.6rem;
}

.cta-join-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cta-join-proof {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.cta-avatar-stack {
    display: flex;
}

.cta-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #0a0a0a;
    margin-left: -10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-avatar svg {
    width: 55%;
    height: 55%;
    stroke: rgba(255, 255, 255, 0.85);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cta-avatar:first-child {
    margin-left: 0;
}

.cta-avatar-1 {
    background: linear-gradient(135deg, #c59a45, #8a6b2a);
}
.cta-avatar-2 {
    background: linear-gradient(135deg, #6b7280, #374151);
}
.cta-avatar-3 {
    background: linear-gradient(135deg, #9ca3af, #4b5563);
}

.cta-avatar-more {
    background: #6d4fd1;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-join-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

@media (max-width: 900px) {
    .cta-join-banner {
        flex-wrap: wrap;
        padding: 2.4rem;
    }
    .cta-join-visual {
        order: -1;
        width: 100%;
    }
    .cta-join-logo-card {
        max-width: 160px;
    }
}

@media (max-width: 768px) {
    .cta-join-section {
        padding: 0 1rem 3rem;
    }
    .cta-join-heading {
        font-size: 1.9rem;
    }
    .cta-join-banner {
        text-align: center;
        flex-direction: column;
        padding: 2rem;
    }
    .cta-join-mid .btn-primary,
    .cta-join-proof {
        align-self: center;
        justify-content: center;
    }
}
