/* =====================================================================
   PERSPECTIVE - layered 3D photo composition + story
   back: stage photo · middle: portrait · front: lived-experience photo + quote
   Layers assemble and drift at different depths on scroll (experience.js),
   and the whole scene tilts with the pointer.
   ===================================================================== */
.persp3d { position: relative; padding: 130px 0 120px; overflow: hidden; }
.persp3d::before { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(45% 55% at 25% 50%, rgba(32,156,207,.09), transparent 70%); }
.p3-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 6vw, 100px); align-items: center; }

/* ---- scene ---- */
.p3-scene {
    position: relative; aspect-ratio: 1 / 1.02; max-width: 640px; width: 100%; justify-self: center;
    perspective: 1500px; transform-style: preserve-3d;
}
.p3-glow { position: absolute; left: 50%; top: 50%; width: 80%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
    background: radial-gradient(circle, rgba(32,156,207,.25), transparent 65%); filter: blur(20px); pointer-events: none; }
.p3-orbit { position: absolute; left: 50%; top: 50%; width: 96%; aspect-ratio: 1; transform: translate(-50%, -50%) rotateX(68deg); border-radius: 50%;
    border: 1px solid rgba(32,156,207,.35); box-shadow: 0 0 30px rgba(32,156,207,.15); pointer-events: none; }
.p3-orbit::after { content: ""; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: #e3ea6e; box-shadow: 0 0 16px #c7cf15;
    animation: p3spin 9s linear infinite; transform-origin: 0 calc(48vw); }

.p3-layer { position: absolute; margin: 0; will-change: transform, opacity; }
.p3-layer img { display: block; width: 100%; height: auto; }
.p3-back, .p3-main, .p3-front { border-radius: 26px; overflow: hidden; background: #0d0d0e; }

/* stage photo, behind, top-left, darker */
.p3-back { left: 0; top: 4%; width: 58%; z-index: 1; filter: saturate(.8) brightness(.7);
    box-shadow: 0 30px 60px -25px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.08); }
/* portrait, centre */
.p3-main { left: 20%; top: 16%; width: 62%; z-index: 2;
    box-shadow: 0 60px 110px -40px rgba(0,0,0,.95), 0 0 0 1px rgba(32,156,207,.4); }
/* lived-experience photo, in front, bottom-right */
.p3-front { right: 0; bottom: 2%; width: 34%; z-index: 3; border: 4px solid #0c0c0d;
    box-shadow: 0 40px 80px -25px rgba(0,0,0,.95), 0 0 0 1px rgba(32,156,207,.5); }
/* light sweep on the portrait */
.p3-main::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(232,242,160,.25) 48%, transparent 66%);
    transform: translateX(-120%); transition: transform 1.1s cubic-bezier(.2,.8,.2,1); }
.p3-scene:hover .p3-main::after { transform: translateX(120%); }

/* floating quote, front-left */
.p3-quote {
    left: -2%; bottom: 8%; z-index: 4; width: min(300px, 52%); padding: 20px 22px; border-radius: 20px;
    background: linear-gradient(145deg, rgba(22,22,24,.88), rgba(8,8,9,.8)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(32,156,207,.35); box-shadow: 0 30px 60px -20px rgba(0,0,0,.9);
}
.p3-quote i { color: #c7cf15; font-size: 1.1rem; }
.p3-quote p { margin: 8px 0 10px; font-family: 'Instrument Serif', serif; font-style: italic; font-size: clamp(1.15rem, 1.5vw, 1.4rem); line-height: 1.25; color: #fff; }
.p3-quote cite { font-style: normal; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: #c7cf15; }

/* pointer tilt of the whole scene (vars set in JS) */
.p3-scene { transform: rotateX(calc(var(--py, 0) * -7deg)) rotateY(calc(var(--px, 0) * 9deg)); transition: transform .6s cubic-bezier(.2,.8,.2,1); }

/* ---- copy ---- */
.p3-copy { display: grid; gap: 20px; }
.p3-heading { margin: 6px 0 4px; font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(3rem, 5.6vw, 5.8rem); line-height: .95; letter-spacing: -.02em; color: #fff; }
.p3-heading em { font-style: italic; color: #c7cf15; }
.p3-lead { margin: 0; font-size: clamp(1.08rem, 1.3vw, 1.25rem); line-height: 1.7; color: rgba(255,255,255,.85); }
.p3-lead strong { color: #e3ea6e; font-weight: 600; }
.p3-text { margin: 0; font-size: 1rem; line-height: 1.75; color: rgba(255,255,255,.65); padding-left: 18px; border-left: 2px solid rgba(32,156,207,.5); }
.p3-proof { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.p3-proof li { display: grid; gap: 10px; padding: 16px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.1); font-size: .86rem; line-height: 1.4; color: rgba(255,255,255,.85); transition: .35s; }
.p3-proof li i { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #ffffff; background: linear-gradient(145deg, #4fc0ec, #209ccf 55%, #15729a); }
.p3-proof li:hover { border-color: rgba(32,156,207,.5); transform: translateY(-4px); }
.p3-btn { justify-self: start; margin-top: 8px; }

@keyframes p3spin { to { transform: rotate(360deg); } }

@media (max-width: 1000px) {
    .p3-grid { grid-template-columns: 1fr; }
    .p3-scene { max-width: 560px; }
}
@media (max-width: 560px) {
    .persp3d { padding: 90px 0 80px; }
    .p3-proof { grid-template-columns: 1fr; }
    .p3-proof li { grid-template-columns: auto 1fr; align-items: center; }
    .p3-quote { width: 62%; padding: 14px 16px; }
}
@media (prefers-reduced-motion: reduce) { .p3-scene { transform: none; transition: none; } .p3-orbit::after { animation: none; } }

/* ---- fixes ---- */
/* layers are stacked with z-index (flat) - avoids Chrome mis-sorting 3D layers that use blur/filters */
.p3-scene { transform-style: flat; }
.p3-grid { perspective: 1600px; }
/* orbit ring spins slowly with a glowing bead on it */
.p3-orbit { animation: p3orbit 14s linear infinite; }
.p3-orbit::after { transform-origin: initial; animation: none; top: -5px; left: calc(50% - 5px); }
@keyframes p3orbit {
    from { transform: translate(-50%, -50%) rotateX(68deg) rotateZ(0deg); }
    to   { transform: translate(-50%, -50%) rotateX(68deg) rotateZ(360deg); }
}
@media (prefers-reduced-motion: reduce) { .p3-orbit { animation: none; } }

/* ===== two-portrait layout (replaces the four-layer collage) ===== */
.p3-duo { aspect-ratio: 1 / .92; max-width: 660px; }
.p3-duo .p3-main {
    left: 0; top: 0; width: 88%; z-index: 1; border-radius: 26px;
    box-shadow: 0 60px 110px -40px rgba(0,0,0,.95), 0 0 0 1px rgba(32,156,207,.4);
}
.p3-duo .p3-front {
    left: auto; right: 0; top: auto; bottom: 0; width: 46%; z-index: 2; border-radius: 22px;
    border: 6px solid #0d0d0e; box-shadow: 0 50px 90px -30px rgba(0,0,0,.95), 0 0 0 1px rgba(199,207,21,.45);
}
/* thin offset outline behind the main photo = depth cue */
.p3-frame {
    position: absolute; left: 4%; top: 6%; width: 88%; aspect-ratio: 1100 / 733; z-index: 0; border-radius: 26px; pointer-events: none;
    border: 1px solid rgba(32,156,207,.45); transform: translate(18px, 18px);
}
.p3-duo .p3-glow { left: 45%; top: 45%; width: 85%; background: radial-gradient(circle, rgba(32,156,207,.22), transparent 65%); }
@media (max-width: 560px) { .p3-duo .p3-front { width: 52%; border-width: 4px; } .p3-frame { transform: translate(10px, 10px); } }

/* ===== proof tiles moved into the empty space under the office photo, beside the headshot ===== */
.p3-proof--scene {
    position: absolute; left: 0; bottom: 0; z-index: 3; width: 51%; margin: 0 !important;
    display: grid !important; grid-template-columns: 1fr !important; gap: 8px !important;
}
.p3-proof--scene li {
    display: grid !important; grid-template-columns: auto 1fr; align-items: center; gap: 12px !important;
    padding: 10px 14px !important; border-radius: 14px !important; font-size: .9rem !important; line-height: 1.3;
    background: linear-gradient(120deg, rgba(22,22,24,.92), rgba(12,12,13,.85)) !important;
    border: 1px solid rgba(32,156,207,.3) !important; box-shadow: 0 18px 36px -18px rgba(0,0,0,.9);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.p3-proof--scene li i { width: 34px !important; height: 34px !important; border-radius: 10px !important; font-size: .85rem; }
.p3-proof--scene li:hover { transform: translateX(6px) !important; border-color: #209ccf !important; }
/* keep the offset outline out of the tiles' way */
.p3-duo .p3-frame { opacity: .55; }
@media (max-width: 560px) {
    .p3-duo { aspect-ratio: auto; height: auto; padding-bottom: 0; }
    .p3-proof--scene { position: relative; width: 100%; margin-top: calc(100% * .92) !important; }
}
