/* Home v13 — smart viewport cover, compact cap command, careers left preview */

/* ── Universal section cover fit ── */
body.p4p-home .p4p-section__shell {
    height: 100%;
    max-height: 100svh;
}

body.p4p-home .p4p-section--capabilities .p4p-section__shell,
body.p4p-home .p4p-section--careers .p4p-section__shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: visible !important;
    padding-block: clamp(0.25rem, 1vh, 0.65rem);
}

.p4p-capabilities-stack,
.p4p-careers-wheel {
    transform: scale(var(--p4p-section-scale, 1));
    transform-origin: center center;
    will-change: transform;
}

/* ── Capabilities — compact command strip (replaces heavy nexus box) ── */
.p4p-cap-command {
    width: min(100%, 920px);
    flex: 0 0 auto;
    perspective: 1200px;
}

.p4p-cap-command__glass {
    position: relative;
    padding: clamp(0.45rem, 1.2vh, 0.75rem) clamp(0.65rem, 1.8vw, 1rem);
    border-radius: 14px;
    border: 1px solid rgba(167, 139, 250, 0.28);
    background: linear-gradient(135deg, rgba(18, 14, 28, 0.88) 0%, rgba(8, 8, 16, 0.72) 100%);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transform: rotateX(3deg);
    transform-style: preserve-3d;
    overflow: hidden;
}

.p4p-cap-command__glass::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 0% 0%, rgba(0, 0, 0, 0.45), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(0, 0, 0, 0.45), transparent 55%);
}

.p4p-cap-command__row {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
    gap: clamp(0.35rem, 1vw, 0.75rem);
    align-items: start;
    position: relative;
    z-index: 2;
}

.p4p-cap-command__head {
    text-align: left;
}

.p4p-cap-command__title {
    margin: 0.1rem 0 0;
    font-family: var(--p4p-font-display);
    font-size: clamp(1rem, 2vw, 1.45rem);
    font-weight: 800;
    line-height: 1.08;
    color: #fff;
}

.p4p-cap-command__lead {
    margin: 0;
    font-size: clamp(0.68rem, 1.05vw, 0.82rem);
    line-height: 1.45;
    color: #d0d8e4;
    text-align: left;
}

.p4p-cap-command__pills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    margin-top: 0.45rem;
    position: relative;
    z-index: 2;
}

.p4p-cap-command__pill {
    padding: 0.4rem 0.55rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.28);
    text-align: left;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.p4p-cap-command__pill.is-active,
.p4p-cap-command__pill:hover,
.p4p-cap-command__pill:focus-visible {
    border-color: rgba(134, 239, 172, 0.45);
    box-shadow: 0 8px 22px rgba(134, 239, 172, 0.12);
    transform: translateY(-1px);
    outline: none;
}

.p4p-cap-command__pill p {
    margin: 0.15rem 0 0;
    font-size: clamp(0.62rem, 0.95vw, 0.74rem);
    line-height: 1.4;
    color: #dce4ef;
}

/* Carousel + rail — flex fill */
.p4p-section--capabilities .p4p-carousel-scene {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.p4p-section--capabilities .p4p-carousel-rotor {
    width: min(260px, 52vw) !important;
    height: min(340px, 34vh) !important;
}

.p4p-cap-rail {
    flex: 0 0 auto;
}

/* ── Careers — preview LEFT, z-index fix ── */
.p4p-section--careers .p4p-careers-wheel {
    width: min(100%, 1000px);
    overflow: visible;
    position: relative;
    z-index: 5;
}

.p4p-section--careers .p4p-csgo-stage {
    position: relative;
    z-index: 10;
}

.p4p-section--careers .p4p-csgo-side-preview {
    left: 0;
    right: auto;
    top: 50%;
    transform: translate(-100%, -50%) translateX(-18px);
    z-index: 80;
    width: min(300px, 34vw);
}

.p4p-section--careers .p4p-csgo-side-preview.is-visible {
    opacity: 1;
    transform: translate(-100%, -50%) translateX(0);
}

.p4p-section--careers .p4p-csgo-node__content {
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: linear-gradient(145deg, rgba(10, 14, 22, 0.92), rgba(6, 8, 14, 0.85)) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.p4p-section--careers .p4p-csgo-core {
    z-index: 30;
}

.p4p-section--careers .p4p-csgo-bolts {
    z-index: 55;
}

@media (max-width: 1100px) {
    .p4p-section--careers .p4p-csgo-side-preview {
        display: none;
    }
}

@media (max-width: 900px) {
    .p4p-cap-command__row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .p4p-cap-command__pills {
        grid-template-columns: 1fr;
    }
    .p4p-capabilities-stack,
    .p4p-careers-wheel {
        transform: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .p4p-cap-command__glass {
        transform: none;
    }
}
