/* Home v10 — section polish, gradients sync, 3D interactions */

body.p4p-home {
    background: #120e14;
}

.p4p-section--capabilities {
    overflow: visible;
    isolation: isolate;
}

.p4p-section--capabilities .p4p-section__shell {
    justify-content: center;
    gap: clamp(0.35rem, 1vh, 0.65rem);
    max-width: min(100vw - 1.5rem, 1200px);
    overflow: visible;
    contain: none;
}

.p4p-section--capabilities .p4p-capabilities-timeline {
    width: min(100%, 720px);
    flex-shrink: 0;
}

.p4p-home-canvas {
    background: transparent !important;
    z-index: 1 !important;
}

.p4p-section__shell {
    z-index: 12;
}

/* z-index stack lives in home-layout-v11.css */

/* ── Capabilities studio (section 2) ── */
.p4p-cap-studio {
    width: min(100%, 920px);
    margin: 0 auto 0.35rem;
    display: grid;
    gap: 0.65rem;
}

.p4p-cap-studio__head {
    text-align: center;
}

.p4p-cap-studio__title {
    margin: 0;
    font-family: var(--p4p-font-display);
    font-size: clamp(1.45rem, 2.8vw, 2.1rem);
    font-weight: 800;
    line-height: 1.06;
    color: #fff;
    text-shadow: 0 4px 28px rgba(0, 0, 0, 0.75);
}

.p4p-cap-studio__deck {
    display: grid;
    gap: 0.55rem;
    padding: clamp(0.65rem, 1.8vw, 0.9rem) clamp(0.75rem, 2vw, 1.1rem);
    border-radius: 14px;
    border: 1px solid rgba(167, 139, 250, 0.22);
    background: linear-gradient(135deg, rgba(18, 14, 28, 0.82), rgba(12, 10, 18, 0.72));
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.p4p-cap-studio__lead {
    margin: 0;
    font-size: clamp(0.78rem, 1.35vw, 0.92rem);
    line-height: 1.55;
    color: #dce4ef;
    text-align: center;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
    overflow: visible;
    display: block;
}

.p4p-cap-studio__duo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.p4p-cap-studio__chip {
    margin: 0;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.28);
    text-align: left;
    cursor: default;
    transition: border-color 0.3s, background 0.3s, transform 0.3s, box-shadow 0.3s;
}

.p4p-cap-studio__chip.is-active,
.p4p-cap-studio__chip:hover,
.p4p-cap-studio__chip:focus-visible {
    border-color: rgba(232, 168, 124, 0.45);
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.14), rgba(232, 168, 124, 0.1));
    box-shadow: 0 8px 24px rgba(232, 168, 124, 0.12);
    transform: translateY(-1px);
    outline: none;
}

.p4p-cap-studio__chip-label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(232, 168, 124, 0.92);
    font-family: var(--p4p-font-tech, monospace);
}

.p4p-cap-studio__chip p {
    margin: 0;
    font-size: clamp(0.72rem, 1.2vw, 0.82rem);
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.88);
    overflow: visible;
    display: block;
}

.p4p-cap-studio__hint {
    margin: 0;
    text-align: center;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
    font-family: var(--p4p-font-tech, monospace);
}

.p4p-section--capabilities .p4p-carousel-scene {
    margin-top: 0.15rem;
    max-height: none;
    min-height: clamp(300px, 36vh, 380px);
    width: min(100%, 980px);
    overflow: visible;
    padding: 0 clamp(0.5rem, 3vw, 2rem);
}

@media (max-width: 640px) {
    .p4p-cap-studio__duo {
        grid-template-columns: 1fr;
    }
    .p4p-section--capabilities .p4p-carousel-scene {
        max-height: min(34vh, 300px);
    }
}

/* legacy cap-hero removed */
.p4p-cap-hero { display: none; }

.p4p-section--capabilities .p4p-section__head {
    display: none;
}

/* Sub-timeline end marker */
.p4p-capabilities-timeline__end {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.25);
    transition: background 0.35s, border-color 0.35s, box-shadow 0.35s;
}

.p4p-capabilities-timeline.is-at-end .p4p-capabilities-timeline__end {
    background: #86efac;
    border-color: #86efac;
    box-shadow: 0 0 14px rgba(134, 239, 172, 0.65);
}

.p4p-capabilities-timeline__hint {
    margin: 0.55rem 0 0;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    font-family: var(--p4p-font-tech, monospace);
}

.p4p-capabilities-timeline.is-at-end .p4p-capabilities-timeline__hint {
    color: #86efac;
}

.p4p-capabilities-timeline__progress {
    background: linear-gradient(90deg, #a78bfa, #e8a87c) !important;
    box-shadow: 0 0 12px rgba(232, 168, 124, 0.45) !important;
}

.p4p-service-card:hover {
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55), 0 0 32px var(--svc-color, rgba(232, 168, 124, 0.2));
}

/* ── Gateway fused layout ── */
.p4p-gateway-fuse {
    width: 100%;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(165deg, rgba(12, 10, 20, 0.72) 0%, rgba(8, 8, 16, 0.52) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: clamp(1rem, 2.5vw, 1.5rem);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.p4p-gateway-fuse__head {
    text-align: center;
    margin-bottom: 1rem;
}

.p4p-gateway-fuse__intro {
    margin: 0.65rem auto 0;
    max-width: 620px;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #c8d2e0;
}

.p4p-portal-door {
    outline: 1px solid rgba(255, 255, 255, 0.06);
    outline-offset: -1px;
}

.p4p-portal-door:hover {
    transform: rotateY(0deg) translateZ(72px) rotateX(-2deg);
}

.p4p-portal-door__btn {
    transition: transform 0.35s cubic-bezier(0.19, 1, 0.22, 1), background 0.3s, box-shadow 0.35s;
    transform: translateZ(24px);
}

.p4p-portal-door:hover .p4p-portal-door__btn {
    transform: translateZ(58px) rotateX(-8deg) scale(1.04);
}

/* ── Craft Studio ── */
.p4p-section--experience .p4p-section__head {
    margin-bottom: 0.65rem;
}

.p4p-section--experience .p4p-section-intro {
    background: rgba(8, 12, 18, 0.55);
    border-color: rgba(16, 185, 129, 0.2);
    max-width: 760px;
}

.p4p-studio-terminal {
    border: 1px solid rgba(16, 185, 129, 0.22);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.5), 0 0 40px rgba(16, 185, 129, 0.08);
}

.p4p-studio-flow {
    border-color: rgba(16, 185, 129, 0.22);
    background: rgba(0, 0, 0, 0.42);
}

/* ── Careers wheel v10 ── */
.p4p-csgo-stage {
    position: relative;
    min-height: 420px;
}

.p4p-csgo-bolts {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 60;
    overflow: visible;
}

.p4p-csgo-bolt-line {
    fill: none;
    stroke: rgba(232, 168, 124, 0.75);
    stroke-width: 1.5;
    stroke-linecap: round;
    filter: drop-shadow(0 0 6px rgba(232, 168, 124, 0.65));
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
    animation: p4pBoltDraw 0.45s ease forwards;
}

@keyframes p4pBoltDraw {
    to { stroke-dashoffset: 0; }
}

.p4p-csgo-node:nth-child(1) { transform: rotate(0deg) translate(140px) rotate(0deg); }
.p4p-csgo-node:nth-child(2) { transform: rotate(60deg) translate(140px) rotate(-60deg); }
.p4p-csgo-node:nth-child(3) { transform: rotate(120deg) translate(140px) rotate(-120deg); }
.p4p-csgo-node:nth-child(4) { transform: rotate(180deg) translate(140px) rotate(-180deg); }
.p4p-csgo-node:nth-child(5) { transform: rotate(240deg) translate(140px) rotate(-240deg); }
.p4p-csgo-node:nth-child(6) { transform: rotate(300deg) translate(140px) rotate(-300deg); }

.p4p-csgo-core {
    width: 160px;
    height: 160px;
    box-shadow: 0 0 48px rgba(232, 168, 124, 0.25), 0 24px 48px rgba(0, 0, 0, 0.55);
}

.p4p-csgo-core__logo {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
    opacity: 0.22;
    pointer-events: none;
}

.p4p-csgo-core__logo img {
    width: 72px;
    height: 72px;
    filter: drop-shadow(0 0 24px rgba(232, 168, 124, 0.45));
}

.p4p-csgo-core__inner {
    position: relative;
    z-index: 2;
}

.p4p-csgo-node__content {
    transition: transform 0.35s cubic-bezier(0.19, 1, 0.22, 1), box-shadow 0.35s, border-color 0.35s;
}

.p4p-csgo-node.is-active .p4p-csgo-node__content,
.p4p-csgo-node:hover .p4p-csgo-node__content {
    transform: translateZ(28px) scale(1.08);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 32px rgba(232, 168, 124, 0.35);
    border-color: rgba(134, 239, 172, 0.55);
    cursor: pointer;
}

.p4p-csgo-node.is-clickable .p4p-csgo-node__content {
    background: linear-gradient(145deg, rgba(134, 239, 172, 0.14), rgba(232, 168, 124, 0.1));
}

.p4p-csgo-node[data-status="OPEN"] .p4p-csgo-node__content::after {
    content: 'CLICK ME →';
    display: block;
    margin-top: 0.35rem;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    color: #86efac;
    font-family: var(--p4p-font-tech, monospace);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.25s, transform 0.25s;
}

.p4p-csgo-node[data-status="OPEN"]:hover .p4p-csgo-node__content::after,
.p4p-csgo-node[data-status="OPEN"].is-active .p4p-csgo-node__content::after {
    opacity: 1;
    transform: translateY(0);
}

.p4p-csgo-core__btn {
    transform: translateY(10px) scale(0.94);
    opacity: 0;
    transition: transform 0.38s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.32s, box-shadow 0.3s;
}

.p4p-csgo-core__btn.is-emerge {
    transform: translateY(-4px) scale(1.02);
    opacity: 1;
    box-shadow: 0 12px 28px rgba(232, 168, 124, 0.35);
}

.p4p-csgo-side-preview {
    position: absolute;
    right: -0.5rem;
    top: 50%;
    transform: translate(100%, -50%) translateX(12px);
    width: min(300px, 36vw);
    padding: 1.15rem 1.25rem;
    border-radius: 16px;
    border: 1px solid rgba(232, 168, 124, 0.38);
    background: linear-gradient(145deg, rgba(12, 14, 24, 0.96), rgba(8, 10, 18, 0.88));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.62), 0 0 40px rgba(232, 168, 124, 0.12);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s, transform 0.35s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 20;
}

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

.p4p-csgo-side-preview__tag {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: rgba(232, 168, 124, 0.85);
}

.p4p-csgo-side-preview h4 {
    margin: 0 0 0.45rem;
    font-size: 0.95rem;
    color: #fff;
}

.p4p-csgo-side-preview p {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.55;
    color: #dce4ef;
    overflow: visible;
    display: block;
}

/* ── Finale / contact ── */
.p4p-section--finale .p4p-command-center {
    border: 1px solid rgba(217, 70, 239, 0.22);
    border-radius: 22px;
    padding: clamp(1rem, 2.5vw, 1.5rem);
    background: linear-gradient(145deg, rgba(10, 8, 18, 0.78), rgba(6, 6, 14, 0.62));
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.p4p-command-center__form {
    outline: 1px solid rgba(217, 70, 239, 0.15);
    outline-offset: 4px;
}

.p4p-comm-link:hover {
    transform: translateX(6px) translateZ(8px);
}

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

@media (max-width: 768px) {
    .p4p-csgo-node:nth-child(1) { transform: rotate(0deg) translate(118px) rotate(0deg); }
    .p4p-csgo-node:nth-child(2) { transform: rotate(60deg) translate(118px) rotate(-60deg); }
    .p4p-csgo-node:nth-child(3) { transform: rotate(120deg) translate(118px) rotate(-120deg); }
    .p4p-csgo-node:nth-child(4) { transform: rotate(180deg) translate(118px) rotate(-180deg); }
    .p4p-csgo-node:nth-child(5) { transform: rotate(240deg) translate(118px) rotate(-240deg); }
    .p4p-csgo-node:nth-child(6) { transform: rotate(300deg) translate(118px) rotate(-300deg); }
}
