/* ==============================================================
   P4P FULLPAGE 3D ENGINE (V13 - THE MASTERPIECE)
   Top-Level Refinement, Perfect Fitting, Creative Reshaping
   ============================================================== */

/* Isolate home from global inner-page section rules */
body.p4p-home .p4p-home-main .p4p-section {
    content-visibility: visible !important;
    contain: none !important;
    contain-intrinsic-size: auto !important;
}

/* Mesh + hero visible as soon as home engine boots (behind preloader) */
body.p4p-home.p4p-home-ready .p4p-home-canvas,
body.p4p-home.p4p-home-ready .p4p-home-canvas .p4p-mesh {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Global Header Overrides for Home */
body.p4p-home .p4p-header { position: fixed; top: 0; width: 100%; z-index: 10000; background: rgba(5,5,8,0.4) !important; backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255,255,255,0.05); }
body.p4p-home .p4p-header * { color: #fff !important; }

/* No extra orb layer on home — mesh + atmospheric sky are the hero background */
body.p4p-home .p4p-universe-bg,
body.p4p-home .p4p-optical-flares { display: none !important; }
body.p4p-home .p4p-global-shader,
body.p4p-home .p4p-global-shader--home {
    z-index: 0;
    opacity: 0.35;
    pointer-events: none;
}
body.p4p-home .p4p-global-shader__readability { opacity: 0.06; }
body.p4p-home .p4p-global-shader__grain { opacity: 0.05; }

/* Canvas layer — fixed behind content */
.p4p-home-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    background: transparent;
}
.p4p-home-canvas canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}
.p4p-home-canvas .p4p-mesh {
    z-index: 2;
    opacity: 1;
    mix-blend-mode: screen;
    filter: brightness(1.28) contrast(1.08) saturate(1.15);
    transform: none;
    transform-origin: center center;
}

.p4p-home-canvas .p4p-atmospheric {
    z-index: 1;
}

/* The Stage — above canvas layers */
.p4p-home-main { position: relative; z-index: 10; width: 100vw; height: 100vh; height: 100svh; overflow: hidden; background: transparent !important; }

/* 1. Global Reset & Fixed Body */
body.p4p-home { overflow: hidden; background: #120e14; color: #f1f5f9; margin: 0; padding: 0; touch-action: none; font-family: system-ui, -apple-system, sans-serif; }
body.p4p-home.is-exiting .p4p-page-transition.is-active ~ *,
body.p4p-home.is-exiting main { opacity: 1; }
* { box-sizing: border-box; }

.p4p-sec-bg, .p4p-page-bg { display: none !important; }

/* Custom Cursor */
.p4p-custom-cursor { position: fixed; top: 0; left: 0; width: 6px; height: 6px; border-radius: 50%; background: #fff; pointer-events: none; z-index: 99999; margin: -3px 0 0 -3px; mix-blend-mode: screen; box-shadow: 0 0 10px #fff; transition: width 0.3s cubic-bezier(0.19, 1, 0.22, 1), height 0.3s cubic-bezier(0.19, 1, 0.22, 1), background 0.3s, border 0.3s; }
.p4p-custom-cursor.is-hover { width: 60px; height: 60px; margin: -30px 0 0 -30px; background: rgba(6,182,212,0.05); border: 1px solid rgba(6,182,212,0.8); box-shadow: inset 0 0 15px rgba(6,182,212,0.3); }

.p4p-section { perspective: 2000px; }
.p4p-ambient-light { position: absolute; left: 50%; width: 100vw; height: 100vh; transform: translateX(-50%); z-index: 0; pointer-events: none; opacity: 0.85; mix-blend-mode: screen; filter: blur(70px); }

/* Absolute Sections Layers */
.p4p-section { position: absolute; top: 0; left: 0; width: 100%; height: 100%; padding: 0; opacity: 0; pointer-events: none; z-index: 8; transform-style: preserve-3d; transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), filter 1.2s ease; transform: translateY(70vh) translateZ(-120px) scale(0.94); filter: blur(8px); display: flex; align-items: center; justify-content: center; background: transparent; }
.p4p-section.is-active { opacity: 1; pointer-events: auto; z-index: 20; transform: translateY(0) translateZ(0) scale(1); filter: blur(0px); }
.p4p-section--genesis.is-active { opacity: 1; pointer-events: auto; z-index: 20; transform: translateY(0) translateZ(0) scale(1); filter: blur(0); }
.p4p-section.is-past { opacity: 0; z-index: 2; transform: translateY(-55vh) translateZ(-220px) scale(0.92); filter: blur(6px); }

/* Hero + chrome visible after preloader — CSS safety net if JS is delayed */
body.p4p-home.is-loaded #genesis.is-active,
body.p4p-home.is-loaded .p4p-section.is-active {
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
}
body.p4p-home.is-loaded .p4p-section.is-active .p4p-section__shell {
    opacity: 1 !important;
    transform: translateY(0) translateZ(0) !important;
}
body.p4p-home.is-loaded .p4p-tl-minimal,
body.p4p-home.is-loaded .p4p-next-indicator,
body.p4p-home.is-loaded .p4p-mesh,
body.p4p-home.is-loaded .p4p-scroll-hint {
    visibility: visible;
}

body.p4p-home #genesis.is-active .p4p-text-reveal-stagger,
body.p4p-home.is-loaded .p4p-section.is-active .p4p-text-reveal-stagger {
    opacity: 1;
    transform: translateY(0) translateZ(0);
}

html.p4p-is-preloading body.p4p-home #genesis.is-active .p4p-text-reveal-stagger {
    opacity: 0;
    transform: translateY(18px) translateZ(0);
}
body.p4p-home.is-loaded #genesis.is-active .p4p-text-reveal-stagger {
    opacity: 1 !important;
    transform: translateY(0) translateZ(0) !important;
    transition: opacity 0.55s cubic-bezier(0.19, 1, 0.22, 1), transform 0.55s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Inner Shell - PERFECT Centering */
.p4p-section__shell { width: min(100% - clamp(1.5rem, 5vw, 4rem), 1200px); margin: 0 auto; height: 100%; max-height: 100vh; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; z-index: 12; text-align: center; padding: clamp(0.75rem, 2vh, 1.25rem) clamp(1rem, 3vw, 1.5rem); padding-left: max(clamp(1rem, 3vw, 1.5rem), env(safe-area-inset-left)); padding-right: max(clamp(1rem, 3vw, 1.5rem), env(safe-area-inset-right)); transform: translateY(0); box-sizing: border-box; }
@media (max-width: 768px) { .p4p-section__shell { width: min(100% - clamp(1.25rem, 4vw, 2rem), 100%); padding: clamp(0.5rem, 2vw, 1rem) clamp(0.75rem, 3vw, 1rem); transform: translateY(-1vh); max-height: none; } }
@media (min-width: 769px) and (max-width: 1200px) { .p4p-section__shell { width: min(100% - clamp(2rem, 6vw, 3.5rem), 1140px); } }

/* Typography & Headings */
.p4p-section__head { margin-bottom: 2rem; width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; z-index: 15; }
.p4p-section__head--center { align-items: center; text-align: center; }

body.p4p-home .p4p-section .p4p-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    color: var(--p4p-accent-soft);
    font-weight: 700;
    margin-bottom: 1rem;
    background: rgba(8, 8, 14, 0.72);
    border: 1px solid var(--p4p-accent-line);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.04);
}
body.p4p-home .p4p-section .p4p-kicker::before,
body.p4p-home .p4p-section .p4p-kicker::after {
    width: auto; height: auto; border-radius: 0; background: none; box-shadow: none;
    animation: none; position: static; pointer-events: auto;
}
body.p4p-home .p4p-section .p4p-kicker::before { content: '['; color: rgba(255,255,255,0.28); margin-right: 0.45rem; }
body.p4p-home .p4p-section .p4p-kicker::after { content: ']'; color: rgba(255,255,255,0.28); margin-left: 0.45rem; }
body.p4p-home .p4p-section .p4p-kicker:hover {
    border-color: rgba(232,168,124,0.45);
    box-shadow: 0 0 24px rgba(232,168,124,0.12), 0 8px 24px rgba(0,0,0,0.35);
}

.p4p-section-title {
    font-size: clamp(1.85rem, 3.8vw, 3rem);
    line-height: 1.08;
    margin: 0;
    color: #fff;
    text-shadow: 0 4px 30px rgba(0,0,0,0.85), 0 0 18px rgba(232,168,124,0.12);
    transform: translateZ(30px);
    font-weight: 900;
}
.p4p-section-intro { font-size: 1rem; color: #e2e8f0; max-width: 680px; margin: 1rem auto 0; line-height: 1.65; background: rgba(5,5,8,0.88); padding: 1rem 1.5rem; border-radius: 16px; border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(20px); box-shadow: 0 15px 40px rgba(0,0,0,0.8); transform: translateZ(20px); text-shadow: 0 1px 2px rgba(0,0,0,0.85); }
.p4p-section-mission { font-size: 0.82rem; color: var(--p4p-accent-soft); max-width: 620px; margin: 0.75rem auto 0; line-height: 1.55; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 800; opacity: 0.92; }
.p4p-service-card__quote { position: relative; margin: 0 0 0.65rem; padding: 0.65rem 0.85rem 0.65rem 1.1rem; border-left: 3px solid var(--svc-color, var(--p4p-accent)); background: rgba(0, 0, 0, 0.35); border-radius: 0 10px 10px 0; font-size: 0.72rem; line-height: 1.45; color: #e2e8f0; font-style: italic; flex-shrink: 0; }
.p4p-service-card__quote-mark { position: absolute; left: 0.35rem; top: 0.2rem; font-size: 1.4rem; line-height: 1; color: var(--svc-color, var(--p4p-accent)); opacity: 0.55; font-style: normal; }
.p4p-service-card__desc { -webkit-line-clamp: 3; font-size: 0.8rem; }
.p4p-studio-flow { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; width: 100%; margin: 0.75rem 0 0.35rem; padding: 0.35rem; border-radius: 999px; background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(232, 168, 124, 0.15); }
.p4p-studio-flow__step { flex: 1 1 auto; min-width: 120px; padding: 0.65rem 1rem; border: 1px solid transparent; border-radius: 999px; background: transparent; color: #94a3b8; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; transition: color 0.3s, background 0.3s, border-color 0.3s, box-shadow 0.3s; }
.p4p-studio-flow__step:hover { color: #fff; background: rgba(255, 255, 255, 0.04); }
.p4p-studio-flow__step.is-active { color: #fff; background: linear-gradient(135deg, rgba(232, 168, 124, 0.2), rgba(167, 139, 250, 0.12)); border-color: rgba(232, 168, 124, 0.35); box-shadow: 0 0 20px rgba(232, 168, 124, 0.15); }
.p4p-section--experience .p4p-studio-terminal { height: clamp(320px, 44vh, 460px); margin-top: 0.5rem; }
.p4p-term-readout { min-height: 220px; }
.p4p-term-readout__text { color: #cbd5e1; font-size: 0.92rem; line-height: 1.55; }

/* Glitch Text Effect */
.p4p-glitch-text { position: relative; display: inline-block; }
.p4p-glitch-text::before, .p4p-glitch-text::after { content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.8; }
.p4p-glitch-text::before { left: 2px; text-shadow: -2px 0 var(--p4p-accent); clip: rect(24px, 550px, 90px, 0); animation: glitch-anim 3s infinite linear alternate-reverse; }
.p4p-glitch-text::after { left: -2px; text-shadow: -2px 0 var(--p4p-purple-soft); clip: rect(85px, 550px, 140px, 0); animation: glitch-anim 2.5s infinite linear alternate-reverse; }
@keyframes glitch-anim { 0% { clip: rect(10px, 9999px, 44px, 0); } 20% { clip: rect(85px, 9999px, 140px, 0); } 40% { clip: rect(22px, 9999px, 11px, 0); } 60% { clip: rect(66px, 9999px, 99px, 0); } 80% { clip: rect(3px, 9999px, 55px, 0); } 100% { clip: rect(44px, 9999px, 22px, 0); } }
.p4p-text-3d { transform-style: preserve-3d; transform: translateZ(40px); display: inline-block; }

/* GLOBAL 3D BOXES (Professional CSGO-Vibe Redesign) */
.p4p-3d-box { 
    background: rgba(5, 8, 15, 0.9); 
    border-radius: 12px; 
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease; 
    position: relative; 
    transform-style: preserve-3d; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.8), inset 0 0 0 rgba(6,182,212,0); 
    display: flex; flex-direction: column;
    backdrop-filter: blur(10px);
}
.p4p-3d-box:hover { 
    transform: translateZ(40px) translateY(-5px); 
    border-color: rgba(6,182,212,0.6);
    box-shadow: 0 30px 60px rgba(0,0,0,0.9), inset 0 0 20px rgba(6,182,212,0.15), 0 0 30px rgba(6,182,212,0.2); 
}

/* Background stack */
body.p4p-home .p4p-home-canvas { z-index: 1; }
body.p4p-home .p4p-tl-minimal { z-index: 5000; }
body.p4p-home .p4p-home-canvas,
body.p4p-home .p4p-home-canvas .p4p-mesh {
    visibility: visible !important;
    display: block !important;
}

/* ==============================================================
   SEC 1: GENESIS (Polished Hero)
   ============================================================== */
.p4p-hero-v3 { width: 100%; display: flex; align-items: center; justify-content: center; position: relative; }
.p4p-hero-v3__center { z-index: 10; text-align: center; padding-top: 6rem; }
.p4p-hero-v3__eyebrow { font-size: 0.85rem; letter-spacing: 0.3em; font-weight: 900; margin-bottom: 1.5rem; display: block; }
.p4p-hero-v3__title { font-size: clamp(3rem, 6vw, 5.5rem); line-height: 1.0; margin: 0 0 1.25rem 0; color: #fff; text-shadow: 0 10px 30px rgba(0,0,0,0.9); }
.p4p-hero-v3__lead { font-size: clamp(1rem, 1.5vw, 1.25rem); color: #e2e8f0; max-width: 700px; margin: 0 auto 2.5rem; line-height: 1.65; text-shadow: 0 2px 12px rgba(0,0,0,0.9); }
.p4p-hero-v3__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }
.p4p-btn-glow { position: relative; display: inline-flex; align-items: center; gap: 1rem; background: #fff; color: #000; padding: 1.2rem 2.5rem; border-radius: 999px; font-weight: 900; text-decoration: none; text-transform: uppercase; letter-spacing: 0.1em; transition: all 0.4s; overflow: hidden; box-shadow: 0 10px 30px rgba(255,255,255,0.2); }
.p4p-btn-glow__text { position: relative; z-index: 2; }
.p4p-btn-glow__icon { position: relative; z-index: 2; font-size: 1.2rem; }
.p4p-btn-glow::before { content:''; position:absolute; top:0; left:-100%; width:100%; height:100%; background: linear-gradient(90deg, transparent, rgba(6,182,212,0.4), transparent); transition: left 0.5s; }
.p4p-btn-glow:hover { transform: scale(1.05) translateZ(20px); box-shadow: 0 15px 40px rgba(6,182,212,0.6); color: #000; background: #fff; }
.p4p-btn-glow:hover::before { left: 100%; }

/* Orbit Stats */
.p4p-hero-v3__orbit { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.p4p-orbit-stat { position: absolute; background: rgba(10,10,15,0.7); border: 1px solid rgba(255,255,255,0.1); padding: 1rem 1.5rem; border-radius: 16px; backdrop-filter: blur(10px); display: flex; flex-direction: column; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,0.8); animation: floatOrbit 6s ease-in-out infinite alternate; }
.p4p-orbit-stat strong { font-size: 1.5rem; color: #fff; font-weight: 900; }
.p4p-orbit-stat span { font-size: 0.7rem; color: #06b6d4; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.2rem; }
.p4p-orbit-stat--1 { top: 12%; left: 6%; animation-delay: 0s; }
.p4p-orbit-stat--2 { top: 50%; right: 6%; animation-delay: -2s; }
.p4p-orbit-stat--3 { bottom: 12%; left: 12%; animation-delay: -4s; }
@keyframes floatOrbit { 0% { transform: translateY(0) rotate(0deg); } 100% { transform: translateY(-20px) rotate(2deg); } }

/* Hero v4 — modern glass shell */
.p4p-hero-v4 { min-height: min(78vh, 720px); padding-top: 4rem; }
.p4p-hero-v4__shell { position: relative; z-index: 12; text-align: center; max-width: 880px; margin: 0 auto; padding: 0 1.25rem; }
.p4p-hero-v4__badge {
    display: inline-flex; align-items: center; gap: 0.55rem;
    font-size: 0.68rem; font-weight: 800; letter-spacing: 0.32em; text-transform: uppercase;
    color: rgba(232, 168, 124, 0.9); margin-bottom: 1.25rem;
    padding: 0.45rem 1rem; border-radius: 999px;
    background: rgba(10, 10, 18, 0.55); border: 1px solid rgba(232, 168, 124, 0.25);
    backdrop-filter: blur(12px);
}
.p4p-hero-v4__badge-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
}
.p4p-hero-v4__badge-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.p4p-hero-v4__badge-network {
    letter-spacing: 0.32em;
    color: rgba(232, 168, 124, 0.92);
}
.p4p-hero-v4__badge-dot {
    width: 7px; height: 7px; border-radius: 50%; background: #86efac;
    box-shadow: 0 0 12px #86efac; animation: p4pHeroDot 2s ease-in-out infinite alternate;
}
@keyframes p4pHeroDot { from { opacity: 0.5; } to { opacity: 1; transform: scale(1.15); } }
.p4p-hero-v4__glass {
    padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.25rem, 3vw, 2.5rem);
    border-radius: 24px;
    background: rgba(8, 8, 14, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    position: relative; overflow: hidden;
}
.p4p-hero-v4__glass::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(232, 168, 124, 0.08) 0%, transparent 45%, rgba(167, 139, 250, 0.06) 100%);
    pointer-events: none;
}
.p4p-hero-v4__title { position: relative; z-index: 1; }
.p4p-hero-v4__lead { position: relative; z-index: 1; margin-bottom: 1.75rem !important; }
.p4p-hero-v4__actions { position: relative; z-index: 1; }
.p4p-btn-glow--ghost {
    background: rgba(255, 255, 255, 0.06) !important; color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.18); box-shadow: none !important;
}
.p4p-btn-glow--ghost:hover { background: rgba(232, 168, 124, 0.15) !important; border-color: rgba(232, 168, 124, 0.45); color: #fff !important; }
.p4p-hero-v4__stats {
    display: none; grid-template-columns: repeat(3, 1fr); gap: 0.65rem;
    margin-top: 1.25rem; max-width: 520px; margin-left: auto; margin-right: auto;
}
.p4p-hero-v4__stat {
    padding: 0.75rem 0.5rem; border-radius: 14px;
    background: rgba(10, 10, 18, 0.65); border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}
.p4p-hero-v4__stat strong { display: block; font-size: 1.25rem; color: #fff; font-weight: 900; }
.p4p-hero-v4__stat span { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.1em; color: #94a3b8; }
@media (max-width: 1024px) {
    .p4p-hero-v3__orbit { display: none; }
    .p4p-hero-v4__stats { display: grid; }
}
@media (max-width: 768px) { .p4p-orbit-stat { display: none; } }

/* ==============================================================
   SEC 2: CAPABILITIES (Carousel & Bottom Bar Fix)
   ============================================================== */
.p4p-carousel-scene { perspective: 2000px; position: relative; height: 38vh; min-height: 340px; max-height: 440px; width: 100%; display: flex; align-items: center; justify-content: center; transform-style: preserve-3d; margin-top: 1rem; z-index: 10; flex-shrink: 0; }
.p4p-carousel-rotor { position: relative; width: 300px; height: 380px; transform-style: preserve-3d; transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1); }
/* Professional Vibe for Carousel Cards */
.p4p-carousel-card { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform-origin: center; backface-visibility: hidden; background: rgba(5,8,15,0.95); border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); padding: 1.5rem; text-align: left; transition: filter 0.8s, opacity 0.8s, box-shadow 0.4s ease, border-color 0.4s ease; display: flex; flex-direction: column; overflow: visible; box-shadow: 0 15px 30px rgba(0,0,0,0.8); }
.p4p-carousel-card:hover { border-color: var(--svc-color, #06b6d4); box-shadow: 0 20px 50px rgba(0,0,0,0.9), inset 0 0 20px rgba(6,182,212,0.15), 0 0 30px rgba(6,182,212,0.2); }
.p4p-service-card__inner { display: flex; flex-direction: column; height: 100%; z-index: 2; position: relative; }
.p4p-service-card__icon { font-size: 2.5rem; margin-bottom: 1rem; color: #fff; text-shadow: 0 0 20px rgba(255,255,255,0.4); transform: translateZ(40px); }
.p4p-service-card__title { font-size: 1.4rem; margin-bottom: 0.8rem; font-weight: 900; transform: translateZ(50px); color: #fff; }
.p4p-service-card__desc { font-size: 0.85rem; margin-bottom: 1rem; color: #94a3b8; line-height: 1.5; transform: translateZ(30px); flex: 1; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.p4p-service-card__cta { font-weight: 800; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: #000; background: #fff; text-decoration: none; transform: translateZ(40px); display: inline-flex; align-items: center; justify-content: center; padding: 0.8rem 1.2rem; border-radius: 10px; align-self: flex-start; transition: all 0.3s; }
.p4p-service-card__cta:hover { background: #06b6d4; color: #fff; box-shadow: 0 10px 20px rgba(6,182,212,0.4); transform: translateZ(50px) scale(1.05); }

/* Redesigned Bottom Timeline Tab */
.p4p-capabilities-timeline { position: relative; width: 90%; max-width: 700px; margin: 2rem auto 0; display: flex; flex-direction: column; align-items: center; z-index: 50; flex-shrink: 0; }
.p4p-capabilities-timeline__bar { width: 100%; height: 3px; background: rgba(255,255,255,0.08); border-radius: 2px; position: relative; margin-bottom: 0.75rem; }
.p4p-capabilities-timeline__progress { position: absolute; top: 0; left: 0; height: 100%; background: #06b6d4; border-radius: 2px; transition: width 0.5s cubic-bezier(0.25,1,0.5,1); box-shadow: 0 0 10px rgba(6,182,212,0.5); }
.p4p-capabilities-timeline__labels { display: flex; justify-content: space-between; width: 100%; padding: 0 0.5rem; }
.p4p-capabilities-timeline__labels button { background: none; border: none; color: #64748b; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; padding: 0.25rem 0.5rem; transition: all 0.3s; position: relative; outline: none; font-family: monospace; }
.p4p-capabilities-timeline__labels button::after { content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%) scale(0); width: 6px; height: 6px; background: #06b6d4; border-radius: 50%; transition: transform 0.3s; box-shadow: 0 0 8px #06b6d4; }
.p4p-capabilities-timeline__labels button:hover { color: #fff; text-shadow: 0 0 10px rgba(255,255,255,0.5); }
.p4p-capabilities-timeline__labels button.is-active { color: #06b6d4; text-shadow: 0 0 10px rgba(6,182,212,0.5); }
.p4p-capabilities-timeline__labels button.is-active::after { transform: translateX(-50%) scale(1); }

/* ==============================================================
   SEC 3: GATEWAY (3D Portals)
   ============================================================== */
.p4p-portals-3d { display: flex; gap: 2rem; justify-content: center; align-items: center; width: 100%; max-width: 900px; margin: 1.5rem auto 0; perspective: 1500px; flex-shrink: 0; }
.p4p-portal-door { flex: 1; position: relative; height: 38vh; min-height: 280px; max-height: 380px; background: rgba(5,8,15,0.9); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; text-decoration: none; color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 2rem; overflow: hidden; transform-style: preserve-3d; transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.5s, border-color 0.5s; box-shadow: 0 20px 40px rgba(0,0,0,0.9); backdrop-filter: blur(10px); }
.p4p-portal-door--dev { transform: rotateY(15deg) translateZ(0); }
.p4p-portal-door--client { transform: rotateY(-15deg) translateZ(0); }
.p4p-portal-door:hover { transform: rotateY(0deg) translateZ(60px); box-shadow: 0 40px 80px rgba(0,0,0,1), inset 0 0 30px rgba(6,182,212,0.2), 0 0 30px rgba(6,182,212,0.3); border-color: rgba(6,182,212,0.6); z-index: 10; }
.p4p-portal-door--client:hover { box-shadow: 0 40px 80px rgba(0,0,0,1), inset 0 0 30px rgba(217,70,239,0.2), 0 0 30px rgba(217,70,239,0.3); border-color: rgba(217,70,239,0.6); }
.p4p-portal-door__hologram { position: absolute; inset: 0; background: linear-gradient(180deg, transparent, rgba(255,255,255,0.03) 50%, transparent); background-size: 100% 200%; animation: holoScan 4s linear infinite; pointer-events: none; }
@keyframes holoScan { 0% { background-position: 0 -100%; } 100% { background-position: 0 200%; } }
@media (max-width: 768px) {
    .p4p-portals-3d { flex-direction: column; gap: 1rem; height: auto; }
    .p4p-portal-door { width: 100%; height: auto; min-height: 220px; max-height: none; padding: 1.5rem; transform: none !important; }
    .p4p-portal-door:hover { transform: translateZ(30px) !important; }
    .p4p-portals-3d__divider { display: none; }
}
.p4p-portal-door__content { position: relative; z-index: 5; text-align: left; }
.p4p-portal-door h3 { font-size: clamp(1.4rem, 2.2vw, 2rem); font-weight: 900; margin-bottom: 0.75rem; transform: translateZ(40px); }
.p4p-portal-door p { color: #94a3b8; font-size: 0.9rem; line-height: 1.5; margin-bottom: 1.5rem; transform: translateZ(20px); max-width: 95%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.p4p-portal-door__btn { display: inline-block; background: #fff; color: #000; padding: 1rem 2rem; border-radius: 999px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em; transform: translateZ(30px); transition: all 0.3s; }
.p4p-portal-door:hover .p4p-portal-door__btn { background: #06b6d4; color: #fff; box-shadow: 0 10px 20px rgba(6,182,212,0.5); }
.p4p-portal-door--client:hover .p4p-portal-door__btn { background: #d946ef; box-shadow: 0 10px 20px rgba(217,70,239,0.5); }
.p4p-portals-3d__divider { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 2px; height: 60%; background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.2), transparent); }

/* ==============================================================
   SEC 4: EXPERIENCE (Studio - Advanced Terminal Map)
   ============================================================== */
.p4p-section--experience .p4p-section__shell,
.p4p-section--careers .p4p-section__shell {
    max-height: 100vh;
    justify-content: center;
    gap: 0.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.p4p-section--careers .p4p-section__head { margin-bottom: 0.35rem; }
.p4p-section--careers .p4p-section-title { font-size: clamp(1.35rem, 2.6vw, 2rem); margin-bottom: 0; }

.p4p-studio-terminal {
    display: flex;
    width: 100%;
    height: clamp(280px, 40vh, 420px);
    min-height: 0;
    background: rgba(8, 8, 14, 0.82);
    border: 1px solid rgba(232, 168, 124, 0.15);
    border-radius: 18px;
    box-shadow: 0 24px 50px rgba(0,0,0,0.55), inset 0 0 30px rgba(232,168,124,0.04);
    overflow: hidden;
    backdrop-filter: blur(16px);
    margin-top: 0.35rem;
}
.p4p-term-cmd { color: var(--p4p-accent-soft); font-weight: 800; opacity: 0.65; transition: opacity 0.3s; }
.p4p-term-btn.is-active {
    color: #fff;
    background: linear-gradient(90deg, rgba(232,168,124,0.12), transparent);
    border-left-color: var(--p4p-accent);
}
.p4p-term-btn.is-active .p4p-term-cmd { opacity: 1; }
.p4p-term-holo-core { color: var(--p4p-accent-soft); text-shadow: 0 0 24px var(--p4p-accent-glow); }
.p4p-term-holo-rings { border-color: rgba(232,168,124,0.25); }

.p4p-careers-wheel {
    display: flex; align-items: center; justify-content: center;
    width: 100%; max-width: min(680px, 92vw);
    height: auto; min-height: 0; max-height: min(48vh, 400px);
    margin: 0.25rem auto 0; position: relative; perspective: 1000px;
}
.p4p-csgo-stage {
    position: relative;
    width: min(360px, 72vw);
    height: min(360px, 72vw);
    max-width: 360px; max-height: 360px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transform-style: preserve-3d; transform: rotateX(10deg) scale(0.95);
}
.p4p-csgo-nodes { border-color: rgba(232, 168, 124, 0.12); }
.p4p-csgo-node:nth-child(1) { transform: rotate(0deg) translate(155px) rotate(0deg); }
.p4p-csgo-node:nth-child(2) { transform: rotate(60deg) translate(155px) rotate(-60deg); }
.p4p-csgo-node:nth-child(3) { transform: rotate(120deg) translate(155px) rotate(-120deg); }
.p4p-csgo-node:nth-child(4) { transform: rotate(180deg) translate(155px) rotate(-180deg); }
.p4p-csgo-node:nth-child(5) { transform: rotate(240deg) translate(155px) rotate(-240deg); }
.p4p-csgo-node:nth-child(6) { transform: rotate(300deg) translate(155px) rotate(-300deg); }
.p4p-csgo-core__status { color: var(--p4p-accent-soft); }
.p4p-csgo-core__btn { background: var(--p4p-accent); color: #1a1008; }
.p4p-term-sidebar {
    width: 35%;
    min-width: 250px;
    background: rgba(0,0,0,0.4);
    border-right: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
}
.p4p-term-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.02);
}
.p4p-term-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    opacity: 0.8;
}
.p4p-term-title {
    margin-left: 10px;
    color: #94a3b8;
    font-size: 0.8rem;
    font-family: monospace;
    font-weight: 800;
}
.p4p-term-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    flex: 1;
}
.p4p-term-btn {
    background: transparent;
    border: none;
    text-align: left;
    padding: 1.2rem 1.5rem;
    color: #64748b;
    font-family: monospace;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
}
.p4p-term-cmd { color: #10b981; font-weight: 800; opacity: 0.5; transition: opacity 0.3s; }
.p4p-term-btn:hover { background: rgba(255,255,255,0.03); color: #cbd5e1; }
.p4p-term-btn:hover .p4p-term-cmd { opacity: 0.8; }
.p4p-term-btn.is-active {
    color: #fff;
    background: linear-gradient(90deg, rgba(16,185,129,0.1), transparent);
    border-left-color: #10b981;
}
.p4p-term-btn.is-active .p4p-term-cmd { opacity: 1; text-shadow: 0 0 10px rgba(16,185,129,0.8); }

.p4p-term-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}
.p4p-term-hologram {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    perspective: 800px;
    overflow: hidden;
}
.p4p-term-holo-core {
    font-size: 6rem;
    color: #10b981;
    filter: drop-shadow(0 0 20px rgba(16,185,129,0.6));
    transform: translateZ(40px);
    animation: holoFloat 4s ease-in-out infinite;
    z-index: 10;
}
.p4p-term-holo-rings {
    position: absolute;
    width: 200px; height: 200px;
    border: 1px dashed rgba(16,185,129,0.5);
    border-radius: 50%;
    transform: rotateX(75deg);
    animation: holoSpin 15s linear infinite;
}
.p4p-term-holo-base {
    position: absolute;
    bottom: 10%;
    width: 150px; height: 30px;
    background: radial-gradient(ellipse, rgba(16,185,129,0.4), transparent 70%);
    border-radius: 50%;
}
@keyframes holoFloat { 0%, 100% { transform: translateY(0) translateZ(40px); } 50% { transform: translateY(-15px) translateZ(40px); } }
@keyframes holoSpin { 100% { transform: rotateX(75deg) rotateZ(360deg); } }

.p4p-term-readout {
    padding: 2rem 3rem;
    border-top: 1px dashed rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.2);
    min-height: 180px;
}
.p4p-term-role { font-size: 1.5rem; color: #fff; font-weight: 900; margin-bottom: 0.8rem; display: flex; align-items: center; gap: 10px; }
.p4p-term-role::before { content: ''; display: block; width: 8px; height: 8px; background: #10b981; box-shadow: 0 0 10px #10b981; }
.p4p-term-desc { color: #94a3b8; font-size: 0.95rem; line-height: 1.6; margin-bottom: 1.25rem; max-width: 90%; }
.p4p-term-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.p4p-term-tags span { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: #10b981; padding: 0.35rem 0.8rem; border-radius: 4px; font-size: 0.7rem; font-family: monospace; font-weight: 800; letter-spacing: 0.05em; }

@media (max-width: 900px) {
    .p4p-studio-terminal { flex-direction: column; height: auto; max-height: none; }
    .p4p-term-sidebar { width: 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .p4p-term-nav { flex-direction: row; flex-wrap: wrap; overflow-x: auto; padding: 0; }
    .p4p-term-btn { padding: 1rem; border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; flex: 1; text-align: center; }
    .p4p-term-btn.is-active { background: linear-gradient(0deg, rgba(16,185,129,0.1), transparent); border-bottom-color: #10b981; border-left-color: transparent; }
    .p4p-term-hologram { height: 250px; }
    .p4p-term-readout { padding: 1.5rem; }
}

/* ==============================================================
   SEC 5: CAREERS (CSGO Radial Menu 3D)
   ============================================================== */
.p4p-csgo-nodes { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(232, 168, 124, 0.12); transform-style: preserve-3d; }

.p4p-csgo-node { 
    position: absolute; 
    left: 50%; top: 50%; 
    width: 120px; height: 54px; 
    margin-left: -60px; margin-top: -27px;
    transform-origin: center center;
    cursor: pointer;
    z-index: 10;
    transform-style: preserve-3d;
}

.p4p-csgo-node__content {
    background: rgba(10, 15, 25, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.45rem;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
    backdrop-filter: blur(8px);
    transform: translateZ(0);
}
.p4p-csgo-node.is-active, 
.p4p-csgo-node:hover { z-index: 50; }
.p4p-csgo-node.is-active .p4p-csgo-node__content, 
.p4p-csgo-node:hover .p4p-csgo-node__content {
    background: rgba(232, 168, 124, 0.12);
    border-color: var(--p4p-accent-soft);
    box-shadow: 0 16px 32px rgba(232, 168, 124, 0.25), inset 0 0 12px rgba(232, 168, 124, 0.08);
    transform: translateZ(40px) scale(1.08);
}

.p4p-csgo-node h4 { font-size: 0.72rem; font-weight: 800; color: #fff; margin-bottom: 0.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p4p-csgo-status { font-size: 0.55rem; padding: 2px 6px; border-radius: 4px; font-weight: 800; }
.p4p-csgo-status--open { background: rgba(134, 239, 172, 0.15); color: #86efac; }
.p4p-csgo-status--closed { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

.p4p-csgo-core {
    position: relative;
    width: min(220px, 58%); height: min(220px, 58%);
    border-radius: 50%;
    background: rgba(5, 8, 15, 0.92);
    border: 2px solid rgba(232, 168, 124, 0.25);
    display: flex; align-items: center; justify-content: center;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.75), inset 0 0 24px rgba(232, 168, 124, 0.08);
    z-index: 20;
    transition: all 0.4s;
    transform: translateZ(20px);
    transform-style: preserve-3d;
}
.p4p-csgo-core::before {
    content: ''; position: absolute; inset: -12px; border-radius: 50%;
    border: 1px dashed rgba(232, 168, 124, 0.3);
    animation: spinCSGO 20s linear infinite;
    transform: translateZ(-10px);
}
@keyframes spinCSGO { 100% { transform: translateZ(-10px) rotate(360deg); } }

.p4p-csgo-core__inner { padding: 1rem; transform: translateZ(30px); width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.p4p-csgo-core__title { font-size: 1.05rem; color: #fff; font-weight: 900; margin-bottom: 0.35rem; line-height: 1.1; }
.p4p-csgo-core {
    background: linear-gradient(145deg, rgba(14, 12, 22, 0.94), rgba(8, 8, 16, 0.88));
    border: 1px solid rgba(232, 168, 124, 0.35);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55), 0 0 36px rgba(232, 168, 124, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.p4p-csgo-core__desc {
    font-size: 0.78rem;
    color: #dce4ef;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    overflow: visible;
    display: block;
    max-width: 92%;
}
.p4p-csgo-core__btn:hover { background: #fff; box-shadow: 0 0 15px rgba(255, 255, 255, 0.35); }

@media (max-width: 768px) {
    .p4p-csgo-node:nth-child(1) { transform: rotate(0deg) translate(120px) rotate(0deg); }
    .p4p-csgo-node:nth-child(2) { transform: rotate(60deg) translate(120px) rotate(-60deg); }
    .p4p-csgo-node:nth-child(3) { transform: rotate(120deg) translate(120px) rotate(-120deg); }
    .p4p-csgo-node:nth-child(4) { transform: rotate(180deg) translate(120px) rotate(-180deg); }
    .p4p-csgo-node:nth-child(5) { transform: rotate(240deg) translate(120px) rotate(-240deg); }
    .p4p-csgo-node:nth-child(6) { transform: rotate(300deg) translate(120px) rotate(-300deg); }
    .p4p-csgo-core { width: 100%; height: auto; min-height: 160px; max-width: 100%; }
    .p4p-csgo-core__title { font-size: 1.1rem; }
    .p4p-csgo-core__desc { display: block !important; font-size: 0.82rem; }
}

/* ==============================================================
   SEC 6: CONTACT (Command Center)
   ============================================================== */
.p4p-command-center { display: flex; width: 100%; height: auto; margin: 0 auto; gap: 4rem; align-items: center; justify-content: center; perspective: 1500px; flex-shrink: 0; }
.p4p-command-center__hud { flex: 1; text-align: left; padding-right: 0; max-width: 450px; }
.p4p-command-contact-methods { display: flex; flex-direction: column; gap: 1rem; }
.p4p-comm-link { display: inline-flex; align-items: center; gap: 1rem; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); padding: 1.2rem 1.5rem; border-radius: 12px; color: #fff; text-decoration: none; font-weight: 800; transition: all 0.3s; backdrop-filter: blur(10px); }
.p4p-comm-link .icon { font-size: 1.2rem; color: #d946ef; }
.p4p-comm-link:hover { background: rgba(217,70,239,0.1); border-color: #d946ef; transform: translateX(10px); box-shadow: 0 5px 20px rgba(217,70,239,0.2); }

.p4p-command-center__form { flex: 1; padding: 2.5rem; max-width: 450px; width: 100%; border-radius: 16px; position: relative; overflow: hidden; background: rgba(5,8,15,0.9); border: 1px solid rgba(255,255,255,0.05); box-shadow: 0 30px 60px rgba(0,0,0,0.9); backdrop-filter: blur(15px); }
.p4p-form-scanline { position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: rgba(217,70,239,0.5); box-shadow: 0 0 20px #d946ef; opacity: 0.5; animation: formScan 3s linear infinite; pointer-events: none; }
@keyframes formScan { 0% { top: 0; } 100% { top: 100%; } }
.p4p-form-group { margin-bottom: 1.25rem; }
.p4p-form-group input, .p4p-form-group textarea { width: 100%; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); color: #fff; padding: 1.2rem; border-radius: 8px; font-size: 0.95rem; font-family: inherit; transition: all 0.3s; box-shadow: inset 0 2px 5px rgba(0,0,0,0.5); }
.p4p-form-group input:focus, .p4p-form-group textarea:focus { background: rgba(217,70,239,0.05); border-color: #d946ef; outline: none; box-shadow: 0 0 15px rgba(217,70,239,0.2), inset 0 2px 5px rgba(0,0,0,0.5); }
.p4p-btn-transmit { width: 100%; background: #d946ef; color: #fff; border: none; padding: 1.2rem; border-radius: 8px; font-weight: 900; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.15em; cursor: pointer; transition: all 0.3s; margin-top: 0.5rem; }
.p4p-btn-transmit:hover { background: #fff; color: #000; box-shadow: 0 10px 30px rgba(217,70,239,0.5); transform: translateY(-3px); }

/* ==============================================================
   SEC 7: FOOTER SNAP SECTION
   ============================================================== */
.p4p-snap-footer-content { display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 1200px; height: 100%; text-align: left; }
.p4p-snap-footer__brand h2 { font-size: 2.5rem; font-weight: 900; color: #fff; margin-bottom: 0.5rem; }
.p4p-snap-footer__brand p { color: #cbd5e1; font-size: 1.1rem; max-width: 400px; }
.p4p-snap-footer__links { display: flex; gap: 4rem; margin: 3rem 0; border-top: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1); padding: 3rem 0; }
.p4p-snap-col h4 { color: #fff; font-size: 1rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1.5rem; }
.p4p-snap-col a { display: block; color: #94a3b8; text-decoration: none; margin-bottom: 0.8rem; font-size: 0.95rem; font-weight: 800; transition: color 0.3s; }
.p4p-snap-col a:hover { color: #06b6d4; }
.p4p-snap-footer__bottom { display: flex; justify-content: space-between; align-items: center; color: #64748b; font-size: 0.85rem; font-weight: 800; }
.p4p-btn--replay { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: #fff; padding: 0.8rem 1.5rem; border-radius: 999px; font-weight: 800; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; cursor: pointer; transition: all 0.3s; }
.p4p-btn--replay:hover { background: #fff; color: #000; box-shadow: 0 5px 15px rgba(255,255,255,0.3); }

/* ==============================================================
   MAIN TIMELINE & LABELS (High-Tech HUD)
   ============================================================== */
.p4p-tl-minimal {
    position: fixed; right: 1.25rem; top: 50%; transform: translateY(-50%);
    width: min(220px, 18vw); display: flex; flex-direction: column; align-items: stretch; gap: 0.85rem;
    z-index: 5000; padding: 1rem 1rem 1rem 1.15rem;
    background: rgba(6, 6, 12, 0.62); border: 1px solid rgba(255,255,255,0.09);
    border-radius: 22px; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 24px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06), 0 0 40px rgba(232,168,124,0.06);
}
.p4p-tl-minimal__orbit {
    position: absolute; inset: -1px; border-radius: 22px; pointer-events: none;
    background: conic-gradient(from 120deg, transparent, rgba(232,168,124,0.25), transparent, rgba(167,139,250,0.2), transparent);
    mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
    -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
    -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
    animation: p4pTlOrbit 8s linear infinite; opacity: 0.85;
}
@keyframes p4pTlOrbit { to { transform: rotate(360deg); } }
.p4p-tl-minimal__meta {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.65rem;
    position: relative; z-index: 1;
}
.p4p-tl-minimal__idx {
    font-family: var(--p4p-font-tech); font-size: 1.35rem; font-weight: 700;
    color: var(--p4p-accent-soft); letter-spacing: 0.05em; line-height: 1;
    text-shadow: 0 0 18px var(--p4p-accent-glow);
}
.p4p-tl-minimal__count {
    font-family: var(--p4p-font-tech); font-size: 0.65rem; color: rgba(255,255,255,0.35); letter-spacing: 0.15em;
}
.p4p-tl-minimal__track {
    height: 4px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden; position: relative;
}
.p4p-tl-minimal__fill {
    display: block; width: 100%; height: 0%; border-radius: inherit;
    background: linear-gradient(90deg, var(--p4p-accent), var(--p4p-purple-soft));
    box-shadow: 0 0 14px var(--p4p-accent-glow);
    transition: height 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.p4p-tl-minimal__nodes { display: flex; flex-direction: column; align-items: stretch; gap: 0.55rem; position: relative; z-index: 1; padding-right: 0.15rem; }
.p4p-tl-minimal__nodes::after {
    content: ''; position: absolute; top: 0.25rem; bottom: 0.25rem; right: 9px; width: 2px;
    background: linear-gradient(to bottom, transparent, rgba(232,168,124,0.35), rgba(167,139,250,0.3), transparent);
    z-index: 0; border-radius: 2px;
}
.p4p-tl-minimal__node {
    display: grid; grid-template-columns: 1.4rem 1fr 14px; align-items: center; gap: 0.55rem;
    position: relative; z-index: 1; cursor: pointer; padding: 0.35rem 0.25rem 0.35rem 0;
    border-radius: 10px; transition: background 0.25s, transform 0.25s;
}
.p4p-tl-minimal__node::before {
    content: attr(data-step); font-family: var(--p4p-font-tech); font-size: 0.58rem; font-weight: 700;
    color: rgba(255,255,255,0.28); text-align: center;
}
.p4p-tl-minimal__node::after {
    content: ''; width: 10px; height: 10px; justify-self: end;
    background: rgba(8,8,14,0.95); border: 2px solid rgba(255,255,255,0.22);
    transform: rotate(45deg); transition: all 0.35s var(--p4p-ease); box-shadow: 0 0 0 rgba(232,168,124,0);
}
.p4p-tl-minimal__node:hover { background: rgba(255,255,255,0.04); transform: translateX(-3px); }
.p4p-tl-minimal__node:hover::after { border-color: rgba(255,255,255,0.65); box-shadow: 0 0 12px rgba(255,255,255,0.2); }
.p4p-tl-minimal__node.is-active { background: rgba(232,168,124,0.08); }
.p4p-tl-minimal__node.is-active::after {
    background: var(--p4p-accent); border-color: var(--p4p-accent-soft);
    box-shadow: 0 0 16px var(--p4p-accent-glow); transform: rotate(0deg) scale(1.15);
}
.p4p-tl-minimal__node.is-prev, .p4p-tl-minimal__node.is-next { opacity: 0.42; }
.p4p-tl-minimal__node .p4p-tl-node-label {
    font-family: var(--p4p-font-tech); color: rgba(255,255,255,0.42); font-weight: 700;
    font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; transition: color 0.25s;
}
.p4p-tl-minimal__node.is-active .p4p-tl-node-label { color: var(--p4p-accent-soft); text-shadow: 0 0 12px var(--p4p-accent-glow); }
.p4p-tl-minimal__hint {
    position: relative; z-index: 1; text-align: center; font-family: var(--p4p-font-tech);
    font-size: 0.58rem; letter-spacing: 0.35em; color: rgba(255,255,255,0.35); padding-top: 0.15rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.p4p-tl-label { display: none; } /* Removed old floating label in favor of inline HUD labels */

.p4p-next-indicator { position: fixed; bottom: 2rem; right: 2rem; z-index: 4000; display: flex; align-items: center; gap: 0.75rem; color: #fff; cursor: pointer; text-decoration: none; opacity: 0.85; transition: opacity 0.3s, transform 0.4s; }
.p4p-next-indicator:hover { opacity: 1; transform: translateY(-5px); }
.p4p-next-indicator__text { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.15em; }
.p4p-next-indicator__arrow { width: 36px; height: 36px; border-radius: 50%; background: transparent; border: 1px solid rgba(255,255,255,0.3); display: flex; align-items: center; justify-content: center; font-size: 1rem; animation: bounceNext 2s infinite; }
@keyframes bounceNext { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ==============================================================
   SCROLL HINT & AMBIENT EFFECTS
   ============================================================== */
.p4p-scroll-hint { position: absolute; bottom: 6rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0.5rem; z-index: 100; opacity: 0.7; animation: fadeScrollHint 3s ease-in-out infinite; pointer-events: none; }
.p4p-scroll-hint__text { font-size: 0.65rem; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.6); }
.p4p-scroll-hint__arrow { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; animation: bounceNext 2s infinite; }
@keyframes fadeScrollHint { 0%, 100% { opacity: 0.7; } 50% { opacity: 0.3; } }

/* Ambient floating background boxes */
.p4p-ambient-boxes { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.p4p-ambient-box { position: absolute; border-radius: 16px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); animation: ambientFloat 12s ease-in-out infinite alternate; }
.p4p-ambient-box--1 { width: 120px; height: 120px; top: 15%; left: 10%; animation-delay: 0s; }
.p4p-ambient-box--2 { width: 80px; height: 80px; top: 60%; right: 12%; animation-delay: -3s; border-color: rgba(6,182,212,0.08); }
.p4p-ambient-box--3 { width: 160px; height: 160px; bottom: 20%; left: 20%; animation-delay: -6s; border-color: rgba(217,70,239,0.06); }
.p4p-ambient-box--4 { width: 60px; height: 60px; top: 30%; right: 25%; animation-delay: -9s; }
.p4p-ambient-box--5 { width: 100px; height: 100px; bottom: 35%; right: 8%; animation-delay: -2s; border-color: rgba(16,185,129,0.06); }
@keyframes ambientFloat { 0% { transform: translateY(0) rotate(0deg); } 100% { transform: translateY(-30px) rotate(5deg); } }

/* ==============================================================
   SUB-TIMELINE TAG NAVIGATION (Capabilities)
   ============================================================== */
.p4p-capabilities-timeline__tags { display: flex; justify-content: center; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; width: 100%; }
.p4p-timeline-tag { font-size: 0.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; padding: 0.3rem 0.7rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.1); color: #64748b; background: rgba(255,255,255,0.03); transition: all 0.3s; cursor: pointer; }
.p4p-timeline-tag.is-current { background: rgba(232,168,124,0.12); border-color: var(--p4p-accent-line); color: var(--p4p-accent-soft); box-shadow: 0 0 12px rgba(232,168,124,0.15); }
.p4p-timeline-tag.is-past { opacity: 0.5; }
.p4p-timeline-tag.is-future { opacity: 0.5; }

/* Footer Section Background */
.p4p-section--footer { background: linear-gradient(180deg, #030308 0%, #010103 100%); }

/* Stagger Animations Handled by JS inline styles, starting state here: */
.p4p-text-reveal-stagger { opacity: 0; transform: translateY(30px) translateZ(0); }

/* ==============================================================
   MOBILE RESPONSIVE HOMEPAGE (Critical)
   ============================================================== */
@media (max-width: 768px) {
    body.p4p-home { overflow-y: auto; overflow-x: hidden; touch-action: auto; cursor: auto; height: auto; }
    .p4p-home-main { height: auto; overflow: visible; perspective: none; transform: none !important; }
    .p4p-section { position: relative; top: auto; left: auto; width: 100%; height: auto; min-height: 100vh; padding: 4rem 0; opacity: 1 !important; pointer-events: auto; transform: none !important; filter: none !important; display: flex; align-items: center; }
    .p4p-section.is-past, .p4p-section.is-future { opacity: 1 !important; transform: none !important; filter: none !important; }
    .p4p-section__shell { height: auto; max-height: none; padding: 1.5rem; width: min(100% - 1.5rem, 1200px); }
    /* Capabilities */
    .p4p-mesh { display: block; opacity: 1; }
    .p4p-custom-cursor { display: none !important; }
    .p4p-ambient-boxes { display: none; }
    .p4p-ambient-light { display: none; }

    /* Hero */
    .p4p-hero-v3__title { font-size: clamp(1.8rem, 8vw, 3rem); }
    .p4p-hero-v3__orbit { display: none; }
    .p4p-hero-v3__actions { flex-direction: column; width: 100%; }
    .p4p-btn-glow { width: 100%; justify-content: center; }
    .p4p-hero-v3__eyebrow { font-size: 0.7rem; padding: 0.3rem 0.8rem; }
    .p4p-kicker { font-size: 0.7rem; padding: 0.3rem 0.8rem; }

    /* Capabilities */
    .p4p-carousel-scene { height: auto; min-height: 400px; perspective: none; }
    .p4p-carousel-rotor { width: 90%; max-width: 320px; height: 380px; transform-style: flat; }
    .p4p-carousel-card { transform: none !important; position: relative; margin-bottom: 1rem; height: auto; }
    .p4p-capabilities-timeline { width: 100%; }

    /* Gateway */
    .p4p-portals-3d { flex-direction: column; height: auto; perspective: none; }
    .p4p-portal-door { transform: none !important; width: 100%; height: auto; min-height: 200px; }
    .p4p-portal-door:hover { transform: translateZ(0) !important; }

    /* Experience */
    .p4p-studio-grid { grid-template-columns: 1fr; gap: 1rem; }
    .p4p-studio-card { padding: 1.5rem; }
    .p4p-studio-card:hover { transform: translateY(-4px); }

    /* Careers */
    .p4p-careers-wheel { margin-top: 1rem; }
    .p4p-wheel-card { transform: rotateY(var(--wa)) translateZ(140px); }
    .p4p-wheel-card:hover, .p4p-wheel-card.is-active { transform: rotateY(var(--wa)) translateZ(200px) scale(1.15); }
    .p4p-wheel-card[data-status="CLOSED"]:hover { transform: rotateY(var(--wa)) translateZ(140px) scale(1); }
    .p4p-wheel-nav--prev { left: 10px; }
    .p4p-wheel-nav--next { right: 10px; }
    .p4p-wheel-info { width: 100%; max-height: none; padding: 1.5rem; }

    /* Contact */
    .p4p-command-center { flex-direction: column; height: auto; gap: 2rem; }
    .p4p-command-center__hud { padding-right: 0; text-align: center; }
    .p4p-command-center__hud p { margin-left: auto; margin-right: auto; }
    .p4p-comm-link { display: flex; width: 100%; justify-content: center; }
    .p4p-command-center__form { width: 100%; padding: 1.5rem; }

    /* Footer */
    .p4p-footer { padding: 3rem 1.5rem; }
    .p4p-footer__grid { gap: 2rem; }
    .p4p-footer__bottom { flex-direction: column; gap: 1rem; text-align: center; }

    /* Bottom Timeline Bar for Mobile */
    .p4p-tl-minimal { display: flex; position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: calc(56px + env(safe-area-inset-bottom, 0px)); flex-direction: row; justify-content: center; align-items: center; gap: 0; z-index: 5000; background: rgba(5,5,8,0.95); backdrop-filter: blur(20px); border-top: 1px solid rgba(255,255,255,0.08); border-right: none; padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
    .p4p-tl-minimal__meta,
    .p4p-tl-minimal__hint,
    .p4p-tl-minimal__orbit { display: none; }
    .p4p-tl-minimal__nodes { flex-direction: row; gap: 0; width: 100%; justify-content: space-around; align-items: center; height: 100%; position: relative; }
    .p4p-tl-minimal__nodes::before { display: none; }
    .p4p-tl-minimal__node { width: 10px; height: 10px; margin: 0; }
    .p4p-tl-minimal__node .p4p-tl-node-label { display: none; }
    .p4p-tl-label { display: none; }
    .p4p-next-indicator { display: none; }
    .p4p-scroll-hint { display: none; }
}

/* GLOBAL TEXT OVERFLOW FIX FOR 3D CARDS */
.p4p-3d-box, .p4p-service-card, .p4p-capabilities-card, .p4p-showcase-content {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto;
    box-sizing: border-box;
}
.p4p-3d-box p, .p4p-service-card p, .p4p-capabilities-card p {
    max-width: 100%;
}
/* Make 3D boxes look even more premium */
.p4p-3d-box, .p4p-service-card, .p4p-portfolio-card {
    background: rgba(10, 15, 25, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: inset 0 0 20px rgba(255,255,255,0.02), 0 20px 40px rgba(0,0,0,0.6) !important;
    transform: translateZ(0);
}
.p4p-3d-box::before, .p4p-service-card::before, .p4p-portfolio-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255,255,255,0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 0;
}
.p4p-3d-box:hover::before, .p4p-service-card:hover::before, .p4p-portfolio-card:hover::before {
    opacity: 1;
}

/* GLOBAL OVERLAP & LAYOUT FIXES */
body:not(.p4p-home) section {
    position: relative;
    z-index: 10;
    min-height: auto;
    overflow: visible;
}
.p4p-services-grid, .p4p-capabilities-grid, .p4p-showcase-shell {
    display: grid;
    width: 100%;
    max-width: 100%;
    grid-auto-rows: auto;
}
.p4p-ambient-light, canvas.p4p-page-mesh, canvas.p4p-mesh {
    pointer-events: none !important;
}
@media (max-width: 900px) {
    .p4p-services-grid, .p4p-capabilities-grid, .p4p-showcase-shell {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
    }
    body:not(.p4p-home) section { padding-top: 4rem !important; padding-bottom: 4rem !important; height: auto !important; min-height: auto !important; }
}
