/* ============================================================
   CreatorXLabs Hero — hero.css v3.0
   Enhanced grids · Rounded buttons · White outer ring · Poppins+Playfair
   ============================================================ */

/* ── CSS Variables ──────────────────────────────────────── */
:root {
    --cxl-card:        #111111;
    --cxl-white:       #ffffff;
    --cxl-pop:         'Poppins', sans-serif;
    --cxl-play:        'Playfair Display', serif;

    /* Admin-adjustable font sizes (px) — edit these from WP Admin > Customizer */
    --cxl-heading-size:   52px;
    --cxl-sub-size:       13.5px;
    --cxl-tagline-size:   16px;
    --cxl-badge-size:     11.5px;
    --cxl-btn-size:       16px;
}

/* ── Wrapper ─────────────────────────────────────────────── */
#cxl-hero-wrapper {
    display: none;
    position: relative;
    z-index: 10;
    width: 100%;
}

/* ── Section ─────────────────────────────────────────────── */
#cxl-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: transparent;
    overflow: hidden;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    /* clamp: min 20px · fluid 5vw · max 100px — works perfectly from 400px → 2560px */
    padding: 100px clamp(20px, 5vw, 100px) 100px clamp(20px, 5vw, 100px);
    font-family: var(--cxl-pop);
}

/* ── PERSPECTIVE GRID CONTAINERS ────────────────────────── */
#cxl-grid-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 48%;
    pointer-events: none;
    z-index: 2;
}

#cxl-grid-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 48%;
    pointer-events: none;
    z-index: 2;
}

#cxl-grid-top canvas,
#cxl-grid-bottom canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ── Particles ──────────────────────────────────────────── */
#cxl-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.cxl-p {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.65);
    animation: cxl-rise linear infinite;
}

@keyframes cxl-rise {
    0%   { transform: translateY(0) translateX(0);              opacity: 0;   }
    6%   { opacity: 1; }
    94%  { opacity: 0.4; }
    100% { transform: translateY(-115vh) translateX(var(--dx)); opacity: 0;   }
}

/* ── Inner row ──────────────────────────────────────────── */
.cxl-hero-inner {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* ── LEFT column ─────────────────────────────────────────── */
.cxl-hero-content {
    flex: 1 1 52%;
    max-width: 970px;
}

/* Badge */
.cxl-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    padding: 5px 14px 5px 10px;
    margin-bottom: 24px;
    font-family: var(--cxl-pop);
    font-size: var(--cxl-badge-size);
    font-weight: 400;
    color: rgba(255,255,255,0.78);
    letter-spacing: 0.04em;
    opacity: 0;
    animation: cxl-fd 0.55s ease forwards 0.05s;
}

.cxl-badge-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
    animation: cxl-dot 2.2s ease-in-out infinite;
}

@keyframes cxl-dot {
    0%,100% { opacity:1;   transform:scale(1);  }
    50%      { opacity:.3;  transform:scale(.6); }
}

/* ── HEADING ─────────────────────────────────────────────── */
.cxl-hero-heading {
    font-family: var(--cxl-pop);
    font-weight: 400;
    font-size: 46px;
    line-height: 1.15;
    color: #fff;
    margin: 0 0 20px;
    padding: 0;
    letter-spacing: -0.015em;
}
.cxl-hero-heading em {
    font-family: var(--cxl-play);
    font-style: italic;
    font-weight: 700;
    letter-spacing: 0;
}

/* Animated lines */
.cxl-line {
    display: block;
    opacity: 0;
    transform: translateY(24px);
    animation: cxl-lu 0.65s cubic-bezier(0.22,1,0.36,1) forwards;
}

@keyframes cxl-lu {
    to { opacity: 1; transform: translateY(0); }
}

/* Sub text */
.cxl-hero-sub {
    font-family: var(--cxl-pop);
    font-size: 14px;
    font-weight: 300;
    color: rgba(255,255,255,0.48);
    line-height: 1.72;
    margin: 0 0 14px;
    opacity: 0;
    animation: cxl-fu 0.65s ease forwards;
}
/* Tagline */
.cxl-hero-tagline {
    font-family: var(--cxl-pop);
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 34px;
    opacity: 0;
    animation: cxl-fu 0.65s ease forwards;
}
/* ── BUTTONS ─────────────────────────────────────────────── */
/*
    Two-layer system:
    • Outer .cxl-btn  = white ring layer (border + outer white glow shadow)
    • Inner span      = dark pill with white bottom-glow (hiw-btn style)
    Hover: both shadows fade to nothing
*/
.cxl-hero-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    opacity: 0;
    animation: cxl-fu 0.65s ease forwards;
}

/* Outer wrapper — white ring layer */
.cxl-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    border-radius: 50px;
    border: 1.5px solid rgba(255,255,255,0.45);
    /* Outer white ring glow */
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.08),
        0 4px 20px 0 rgba(255,255,255,0.12),
        0 2px 8px 0 rgba(255,255,255,0.10);
    padding: 2px;
    transition:
        box-shadow   0.22s ease,
        border-color 0.22s ease;
    overflow: hidden;
}

/* Hover: outer ring fades */
.cxl-btn:hover {
    box-shadow: none;
    border-color: rgba(255,255,255,0.14);
}

/* Inner dark pill span — hiw-btn exact style */
.cxl-btn span {
    display: block;
    background: var(--cxl-card);
    border-radius: 50px;
    padding: 13px 32px;
    font-family: var(--cxl-pop);
    font-weight: 600;
    font-size: var(--cxl-btn-size);
    color: var(--cxl-white);
    white-space: nowrap;
    line-height: 1.1;
    box-shadow:
        0 6px 10px 1px rgba(255, 255, 255, 0.17),
        0 3px 5px 0px rgba(255, 255, 255, 0.12);
    transition: box-shadow 0.22s ease;
}

.cxl-btn:hover span {
    box-shadow: none;
}

/* Shine sweep on hover */
.cxl-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    background: linear-gradient(110deg,
        transparent 20%,
        rgba(255,255,255,0.09) 50%,
        transparent 80%
    );
    transform: translateX(-110%);
    transition: none;
    pointer-events: none;
}
.cxl-btn:hover::after {
    transform: translateX(110%);
    transition: transform 0.45s ease;
}

/* ── RIGHT column: Logo ──────────────────────────────────── */
.cxl-hero-logo {
    flex: 0 0 46%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    opacity: 0;
    transform: scale(0.88) translateX(28px);
    animation: cxl-logo 1s cubic-bezier(0.22,1,0.36,1) forwards 0.3s;
    filter:
        drop-shadow(0 0 18px rgba(255,255,255,0.55))
        drop-shadow(0 0 6px  rgba(255,255,255,0.35));
}

@keyframes cxl-logo {
    to { opacity: 1; transform: scale(1) translateX(0); }
}

.cxl-hero-logo > * {
    max-width: 100%;
}

/* ── Shared keyframes ────────────────────────────────────── */
@keyframes cxl-fd {
    from { opacity:0; transform:translateY(-12px); }
    to   { opacity:1; transform:translateY(0);     }
}
@keyframes cxl-fu {
    from { opacity:0; transform:translateY(14px); }
    to   { opacity:1; transform:translateY(0);    }
}

/* ── Responsive ──────────────────────────────────────────── */

/* ── Large desktop (1600px+) ────────────────────────────── */
@media (min-width: 1600px) {
    #cxl-hero { padding-top: 120px; padding-bottom: 120px; }
    .cxl-hero-heading { font-size: 56px; }
}

/* ── Mid desktop (981px – 1280px) ──────────────────────── */
@media (max-width: 1280px) and (min-width: 981px) {
    .cxl-hero-heading { font-size: 40px; }
    .cxl-hero-content { flex: 1 1 55%; }
    .cxl-hero-logo    { flex: 0 0 42%; }
}

/* ── Tablet ──────────────────────────────────────────────── */
@media (max-width: 980px) {
    #cxl-hero { padding: 110px clamp(20px, 6vw, 72px) 80px; }

    /* Text FIRST, logo BELOW — column (not column-reverse) */
    .cxl-hero-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 40px;
    }

    .cxl-hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .cxl-hero-heading { font-size: 38px; }

    /* Buttons: centered row, natural width */
    .cxl-hero-buttons {
        justify-content: center;
        flex-direction: row;
    }

    .cxl-hero-logo {
        width: 80%;
        max-width: 380px;
        min-height: 240px;
        transform: scale(0.88) translateY(20px);
    }

    @keyframes cxl-logo {
        to { opacity:1; transform:scale(1) translateY(0); }
    }
}

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 600px) {
    #cxl-hero { padding: 90px clamp(16px, 5vw, 40px) 70px; }

    .cxl-hero-heading { font-size: 30px; line-height: 1.2; }
    .cxl-hero-sub     { font-size: 13px; }
    .cxl-hero-tagline { font-size: 16px; margin-bottom: 28px; }

    /* Buttons: stacked, centred, sensible fixed width */
    .cxl-hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        width: 100%;
    }

    .cxl-btn {
        width: 100%;
        max-width: 280px;  /* cap so they don't stretch edge-to-edge */
    }

    .cxl-btn span {
        width: 100%;
        text-align: center;
        padding: 13px 24px;
        white-space: normal;  /* allow wrap on very narrow screens */
    }

    .cxl-hero-logo {
        width: 90%;
        max-width: 300px;
        min-height: 200px;
    }
}
