/**
 * P4PN v2.9 — Home sections: capabilities, studio, careers (audit fixes).
 */

/* ═══ SEC 2 CAPABILITIES — organic backdrop + glass panel, no bottom blob ═══ */
body.p4pn-cover-page .p4p-capabilities-stack::after {
    display: none !important;
    content: none !important;
}

body.p4pn-cover-page .p4p-capabilities-stack::before {
    content: '' !important;
    display: block !important;
    position: absolute;
    inset: -5% -6% -8% -10%;
    z-index: 0;
    pointer-events: none;
    border-radius: 38% 62% 58% 42% / 52% 44% 56% 48%;
    background:
        radial-gradient(ellipse 80% 70% at 28% 42%, rgba(167, 139, 250, 0.14) 0%, transparent 62%),
        radial-gradient(ellipse 65% 55% at 78% 28%, rgba(232, 168, 124, 0.12) 0%, transparent 58%),
        radial-gradient(ellipse 90% 80% at 50% 88%, rgba(34, 211, 238, 0.06) 0%, transparent 55%),
        linear-gradient(145deg, rgba(12, 10, 22, 0.52) 0%, rgba(6, 6, 14, 0.32) 100%);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 0 80px rgba(167, 139, 250, 0.06);
}

body.p4pn-cover-page .p4p-section--capabilities .p4p-section__shell {
    justify-content: center !important;
    align-items: center !important;
    overflow: hidden !important;
    padding-right: max(var(--p4pn-pad-x, 1rem), calc(var(--p4pn-tl-width, 9rem) + 0.5rem)) !important;
}

body.p4pn-cover-page .p4p-capabilities-stack {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(210px, 340px);
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: center !important;
    justify-items: stretch;
    width: min(100%, 900px) !important;
    max-width: min(100%, 900px) !important;
    max-height: 100% !important;
    height: 100% !important;
    margin-left: auto !important;
    margin-right: clamp(0.25rem, 1.5cqi, 1rem) !important;
    gap: clamp(0.4rem, 1cqi, 0.75rem) !important;
    transform-origin: center center !important;
    position: relative;
    z-index: 2;
}

body.p4pn-cover-page .p4p-section--capabilities .p4p-carousel-scene {
    grid-column: 1;
    grid-row: 1;
    z-index: 5;
    min-height: 0 !important;
    max-height: 100% !important;
    margin: 0 !important;
    perspective: 1800px !important;
}

body.p4pn-cover-page .p4p-section--capabilities .p4p-carousel-rotor {
    width: min(240px, 44cqi, 48vw) !important;
    height: min(300px, 30cqi, 34vh) !important;
}

body.p4pn-cover-page .p4p-cap-band {
    grid-column: 2;
    grid-row: 1;
    z-index: 3;
    align-self: center;
    text-align: left !important;
    background: rgba(10, 11, 20, 0.42) !important;
    border: 1px solid rgba(255, 255, 255, 0.11) !important;
    border-radius: 18px !important;
    padding: clamp(0.65rem, 1.4cqi, 0.95rem) !important;
    box-shadow:
        0 20px 48px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(12px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
}

body.p4pn-cover-page .p4p-cap-band__top {
    align-items: flex-start !important;
}

body.p4pn-cover-page .p4p-cap-band__title {
    background: linear-gradient(125deg, #fff 0%, #f0c4a0 42%, #c4b5fd 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    -webkit-text-stroke: 0 !important;
    text-shadow: none !important;
    filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.5));
    font-size: clamp(1.15rem, 2.8cqi, 1.75rem) !important;
}

body.p4pn-cover-page .p4p-cap-band__intro {
    display: block;
    text-align: left !important;
    margin: 0.35rem 0 0.5rem !important;
    padding: 0.55rem 0.7rem;
    background: rgba(6, 7, 14, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.86) !important;
    line-height: 1.5 !important;
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
}

body.p4pn-cover-page .p4p-cap-band__mv {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.35rem !important;
    margin-top: 0 !important;
}

body.p4pn-cover-page .p4p-cap-band__pill {
    z-index: 1;
    position: relative;
    background: rgba(8, 10, 18, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
}

body.p4pn-cover-page .p4p-cap-rail {
    grid-column: 1 / -1;
    grid-row: 2;
    z-index: 4;
    margin-top: 0 !important;
}

body.p4pn-cover-page .p4p-carousel-card .p4p-service-card__inner {
    display: flex !important;
    flex-direction: column !important;
    height: 100%;
    gap: 0.3rem;
    padding-bottom: 0.75rem !important;
}

body.p4pn-cover-page .p4p-service-card__desc {
    flex: 1 1 auto !important;
    margin-bottom: 0.45rem !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    font-size: clamp(0.68rem, 1.4cqi, 0.78rem) !important;
}

body.p4pn-cover-page .p4p-service-card__cta {
    flex-shrink: 0 !important;
    margin-top: auto !important;
    width: 100%;
}

/* ═══ SEC 3 GATEWAY — stronger 3D + brand colors ═══ */
body.p4pn-cover-page .p4p-section--gateway .p4p-section__shell {
    justify-content: center !important;
    align-items: center !important;
}

body.p4pn-cover-page .p4p-portals-3d {
    perspective: 1400px !important;
    transform-style: preserve-3d !important;
    gap: clamp(0.75rem, 2cqi, 1.25rem) !important;
    width: min(100%, 760px) !important;
    margin-inline: auto !important;
}

body.p4pn-cover-page .p4p-portal-door {
    transform-style: preserve-3d !important;
    transition: transform 0.55s cubic-bezier(0.19, 1, 0.22, 1), box-shadow 0.45s ease, border-color 0.35s ease !important;
    border-radius: 18px !important;
    min-height: clamp(180px, 28vh, 240px) !important;
}

body.p4pn-cover-page .p4p-portal-door--dev {
    transform: rotateY(14deg) translateZ(0) !important;
    background: linear-gradient(160deg, rgba(6, 30, 40, 0.92), rgba(4, 8, 18, 0.88)) !important;
    border: 1px solid rgba(6, 182, 212, 0.35) !important;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.p4pn-cover-page .p4p-portal-door--client {
    transform: rotateY(-14deg) translateZ(0) !important;
    background: linear-gradient(160deg, rgba(40, 12, 48, 0.92), rgba(8, 4, 18, 0.88)) !important;
    border: 1px solid rgba(217, 70, 239, 0.35) !important;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

@media (hover: hover) {
    body.p4pn-cover-page .p4p-portal-door--dev:hover {
        transform: rotateY(0deg) translateZ(48px) scale(1.02) !important;
        box-shadow: 0 32px 64px rgba(0, 0, 0, 0.75), 0 0 40px rgba(6, 182, 212, 0.35) !important;
        border-color: rgba(6, 182, 212, 0.65) !important;
    }

    body.p4pn-cover-page .p4p-portal-door--client:hover {
        transform: rotateY(0deg) translateZ(48px) scale(1.02) !important;
        box-shadow: 0 32px 64px rgba(0, 0, 0, 0.75), 0 0 40px rgba(217, 70, 239, 0.35) !important;
        border-color: rgba(217, 70, 239, 0.65) !important;
    }
}

body.p4pn-cover-page .p4p-portal-door__hologram {
    opacity: 0.85 !important;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45)) !important;
}

body.p4pn-cover-page .p4p-gateway-fuse__title {
    background: linear-gradient(120deg, #fff 0%, #c4b5fd 45%, #e8a87c 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
}

/* ═══ SEC 4 CRAFT STUDIO — fit inside viewport ═══ */
body.p4pn-cover-page .p4p-section--experience .p4p-section__shell {
    overflow: hidden !important;
    justify-content: center !important;
    align-items: center !important;
}

body.p4pn-cover-page .p4p-section--experience .p4p-section__head {
    margin-bottom: 0.35rem !important;
}

body.p4pn-cover-page .p4p-studio-flow {
    margin-bottom: 0.35rem !important;
}

body.p4pn-cover-page .p4p-studio-terminal {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    max-width: min(100%, 820px) !important;
    max-height: min(42vh, 380px) !important;
    height: min(42vh, 380px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    margin: 0 auto !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(6, 8, 14, 0.88) !important;
}

body.p4pn-cover-page .p4p-term-sidebar {
    flex: 0 0 34% !important;
    min-width: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

body.p4pn-cover-page .p4p-term-nav {
    flex: 1 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 0.35rem 0 !important;
}

body.p4pn-cover-page .p4p-term-btn {
    padding: 0.65rem 0.85rem !important;
    font-size: clamp(0.62rem, 1.2cqi, 0.72rem) !important;
}

body.p4pn-cover-page .p4p-term-display {
    flex: 1 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

body.p4pn-cover-page .p4p-term-hologram {
    flex: 0 0 clamp(120px, 20vh, 170px) !important;
    min-height: clamp(120px, 20vh, 170px) !important;
    max-height: clamp(120px, 20vh, 170px) !important;
    overflow: visible !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.p4pn-cover-page .p4p-term-holo-core,
body.p4pn-cover-page .p4p-term-holo-core.p4p-term-holo--svg {
    width: min(180px, 88%) !important;
    height: 100% !important;
    max-height: 150px !important;
    font-size: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.p4pn-cover-page .p4p-term-holo-svg-wrap,
body.p4pn-cover-page .p4p-term-holo-svg-wrap .p4p-home-svg {
    width: min(150px, 100%) !important;
    height: auto !important;
    max-height: 140px !important;
    filter: drop-shadow(0 0 18px rgba(134, 239, 172, 0.45)) drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5)) !important;
}

body.p4pn-cover-page .p4p-term-readout {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    padding: 0.75rem 1rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.p4pn-cover-page .p4p-term-role {
    font-size: clamp(0.95rem, 2cqi, 1.15rem) !important;
    margin-bottom: 0.45rem !important;
}

body.p4pn-cover-page .p4p-term-readout__text {
    font-size: clamp(0.68rem, 1.3cqi, 0.78rem) !important;
    line-height: 1.45 !important;
}

body.p4pn-cover-page .p4p-term-readout__block {
    margin-bottom: 0.45rem !important;
}

/* ═══ SEC 5 CAREERS — restore radial hover (never override node transform) ═══ */
body.p4pn-cover-page .p4p-section--careers .p4p-section__shell {
    overflow: visible !important;
    justify-content: center !important;
}

body.p4pn-cover-page .p4p-careers-wheel {
    overflow: visible !important;
    max-height: min(46vh, 400px) !important;
    padding: 0.5rem 0 1rem !important;
}

body.p4pn-cover-page .p4p-csgo-stage {
    width: min(380px, 78vw) !important;
    height: min(380px, 78vw) !important;
    max-width: 380px !important;
    max-height: 380px !important;
    transform-style: preserve-3d !important;
}

body.p4pn-cover-page .p4p-csgo-node:nth-child(1) { transform: rotate(0deg) translate(172px) rotate(0deg) !important; }
body.p4pn-cover-page .p4p-csgo-node:nth-child(2) { transform: rotate(60deg) translate(172px) rotate(-60deg) !important; }
body.p4pn-cover-page .p4p-csgo-node:nth-child(3) { transform: rotate(120deg) translate(172px) rotate(-120deg) !important; }
body.p4pn-cover-page .p4p-csgo-node:nth-child(4) { transform: rotate(180deg) translate(172px) rotate(-180deg) !important; }
body.p4pn-cover-page .p4p-csgo-node:nth-child(5) { transform: rotate(240deg) translate(172px) rotate(-240deg) !important; }
body.p4pn-cover-page .p4p-csgo-node:nth-child(6) { transform: rotate(300deg) translate(172px) rotate(-300deg) !important; }

/* Preserve radial orbit on hover — override v27 scale() break */
@media (hover: hover) {
    body.p4pn-cover-page .p4p-csgo-node:nth-child(1):hover { transform: rotate(0deg) translate(172px) rotate(0deg) !important; z-index: 50; }
    body.p4pn-cover-page .p4p-csgo-node:nth-child(2):hover { transform: rotate(60deg) translate(172px) rotate(-60deg) !important; z-index: 50; }
    body.p4pn-cover-page .p4p-csgo-node:nth-child(3):hover { transform: rotate(120deg) translate(172px) rotate(-120deg) !important; z-index: 50; }
    body.p4pn-cover-page .p4p-csgo-node:nth-child(4):hover { transform: rotate(180deg) translate(172px) rotate(-180deg) !important; z-index: 50; }
    body.p4pn-cover-page .p4p-csgo-node:nth-child(5):hover { transform: rotate(240deg) translate(172px) rotate(-240deg) !important; z-index: 50; }
    body.p4pn-cover-page .p4p-csgo-node:nth-child(6):hover { transform: rotate(300deg) translate(172px) rotate(-300deg) !important; z-index: 50; }
}

body.p4pn-cover-page .p4p-csgo-node[data-status="OPEN"] .p4p-csgo-node__content::after {
    display: none !important;
    content: none !important;
}

body.p4pn-cover-page .p4p-section--careers .p4p-csgo-node.is-active .p4p-csgo-node__content,
body.p4pn-cover-page .p4p-section--careers .p4p-csgo-node:hover .p4p-csgo-node__content {
    background: rgba(232, 168, 124, 0.14) !important;
    border-color: rgba(232, 168, 124, 0.55) !important;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5), 0 0 24px rgba(232, 168, 124, 0.25) !important;
    transform: translateZ(36px) scale(1.06) !important;
}

body.p4pn-cover-page .p4p-csgo-core {
    width: min(200px, 52%) !important;
    height: min(200px, 52%) !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    transform-style: preserve-3d !important;
    background:
        radial-gradient(circle at 32% 28%, rgba(134, 239, 172, 0.32) 0%, rgba(16, 185, 129, 0.14) 38%, rgba(8, 8, 14, 0.95) 100%) !important;
    box-shadow:
        inset -12px -18px 32px rgba(0, 0, 0, 0.6),
        inset 10px 12px 24px rgba(255, 255, 255, 0.06),
        0 28px 60px rgba(0, 0, 0, 0.55),
        0 0 48px rgba(134, 239, 172, 0.22) !important;
}

body.p4pn-cover-page .p4p-careers-globe .p4p-csgo-stage {
    border-radius: 50% !important;
    transform: rotateX(10deg) !important;
}

body.p4pn-cover-page .p4p-csgo-core__inner {
    padding: 0.65rem 0.75rem !important;
    justify-content: center !important;
    gap: 0.25rem !important;
}

body.p4pn-cover-page .p4p-csgo-core__title {
    font-size: clamp(0.82rem, 1.8cqi, 0.98rem) !important;
    margin-bottom: 0.2rem !important;
}

body.p4pn-cover-page .p4p-csgo-core__desc {
    font-size: clamp(0.62rem, 1.15cqi, 0.72rem) !important;
    line-height: 1.4 !important;
    margin-bottom: 0.45rem !important;
    max-height: 3.2em;
    overflow: hidden;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

body.p4pn-cover-page .p4p-csgo-core__btn {
    font-size: clamp(0.58rem, 1.1cqi, 0.65rem) !important;
    padding: 0.4rem 0.75rem !important;
    margin-top: 0.15rem !important;
    flex-shrink: 0;
}

body.p4pn-cover-page .p4p-csgo-core__logo {
    display: none;
}

@media (max-width: 820px) {
    body.p4pn-cover-page .p4p-capabilities-stack {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto auto !important;
        margin-right: 0 !important;
        width: min(100%, 100%) !important;
    }

    body.p4pn-cover-page .p4p-cap-band {
        grid-column: 1;
        grid-row: 1;
    }

    body.p4pn-cover-page .p4p-section--capabilities .p4p-carousel-scene {
        grid-row: 2;
    }

    body.p4pn-cover-page .p4p-studio-terminal {
        flex-direction: column !important;
        height: auto !important;
        max-height: min(50vh, 420px) !important;
    }

    body.p4pn-cover-page .p4p-term-sidebar {
        flex: 0 0 auto !important;
        max-height: 38% !important;
    }

    body.p4pn-cover-page .p4p-csgo-node:nth-child(1) { transform: rotate(0deg) translate(130px) rotate(0deg) !important; }
    body.p4pn-cover-page .p4p-csgo-node:nth-child(2) { transform: rotate(60deg) translate(130px) rotate(-60deg) !important; }
    body.p4pn-cover-page .p4p-csgo-node:nth-child(3) { transform: rotate(120deg) translate(130px) rotate(-120deg) !important; }
    body.p4pn-cover-page .p4p-csgo-node:nth-child(4) { transform: rotate(180deg) translate(130px) rotate(-180deg) !important; }
    body.p4pn-cover-page .p4p-csgo-node:nth-child(5) { transform: rotate(240deg) translate(130px) rotate(-240deg) !important; }
    body.p4pn-cover-page .p4p-csgo-node:nth-child(6) { transform: rotate(300deg) translate(130px) rotate(-300deg) !important; }
}

@media (min-width: 821px) and (max-width: 1200px) {
    body.p4pn-cover-page .p4p-capabilities-stack {
        width: min(100%, 820px) !important;
        grid-template-columns: minmax(0, 1fr) minmax(190px, 300px) !important;
    }

    body.p4pn-cover-page .p4p-section--capabilities .p4p-carousel-rotor {
        width: min(220px, 40cqi, 42vw) !important;
        height: min(280px, 28cqi, 32vh) !important;
    }

    body.p4pn-cover-page .p4p-csgo-node:nth-child(1) { transform: rotate(0deg) translate(158px) rotate(0deg) !important; }
    body.p4pn-cover-page .p4p-csgo-node:nth-child(2) { transform: rotate(60deg) translate(158px) rotate(-60deg) !important; }
    body.p4pn-cover-page .p4p-csgo-node:nth-child(3) { transform: rotate(120deg) translate(158px) rotate(-120deg) !important; }
    body.p4pn-cover-page .p4p-csgo-node:nth-child(4) { transform: rotate(180deg) translate(158px) rotate(-180deg) !important; }
    body.p4pn-cover-page .p4p-csgo-node:nth-child(5) { transform: rotate(240deg) translate(158px) rotate(-240deg) !important; }
    body.p4pn-cover-page .p4p-csgo-node:nth-child(6) { transform: rotate(300deg) translate(158px) rotate(-300deg) !important; }
}

@media (min-width: 1600px) {
    body.p4pn-cover-page .p4p-capabilities-stack {
        width: min(100%, 960px) !important;
    }
}
