/* Service single-page templates — unified accent shell */

body.p4p-rich-page.p4p-service-page {
    background: transparent;
}

.p4p-service-page .p4p-services-main {
    background: transparent;
    min-height: 100vh;
    overflow-x: hidden;
}

.p4p-service-page .p4p-services-main__inner {
    position: relative;
    z-index: 2;
    padding-top: calc(var(--p4p-header) + 3rem);
    padding-bottom: 4rem;
}

.p4p-service-page .p4p-ambient-light--hero {
    position: absolute;
    width: 100%;
    height: 100%;
    top: -20%;
    left: 0;
    pointer-events: none;
    background: radial-gradient(circle, rgba(232, 168, 124, 0.12) 0%, transparent 70%);
}

.p4p-service-single-hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 4vw, 4rem);
    align-items: center;
}

.p4p-service-single-hero__visual {
    height: 400px;
    border: 1px solid rgba(232, 168, 124, 0.25);
    border-radius: 20px;
    background: rgba(10, 10, 15, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.p4p-service-single-hero__visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(232, 168, 124, 0.1), transparent 50%);
    pointer-events: none;
}

.p4p-service-page .web-core,
.p4p-service-page .web-orbit-ring-2 {
    border-color: var(--p4p-accent);
}

.p4p-service-page .web-core {
    background: rgba(232, 168, 124, 0.1);
    box-shadow: 0 0 40px rgba(232, 168, 124, 0.35);
}

.p4p-service-page .web-orbit-ring-2 {
    border-color: rgba(232, 168, 124, 0.25);
}

.p4p-service-page .web-terminal-code span,
.p4p-service-page .web-metric-bar-fill {
    color: var(--p4p-accent);
    background: var(--p4p-accent);
    box-shadow: 0 0 10px rgba(232, 168, 124, 0.5);
}

@keyframes pulse-core-accent {
    0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(232, 168, 124, 0.35); }
    50% { transform: scale(1.05); box-shadow: 0 0 60px rgba(232, 168, 124, 0.55); }
}

.p4p-service-page .web-core {
    animation: pulse-core-accent 3s infinite;
}

.p4p-service-page--mint .p4p-ambient-light--hero {
    background: radial-gradient(circle, rgba(134, 239, 172, 0.12) 0%, transparent 70%);
}

.p4p-service-page--mint .p4p-service-single-hero__visual {
    border-color: rgba(134, 239, 172, 0.3);
}

.p4p-service-page--violet .p4p-ambient-light--hero {
    background: radial-gradient(circle, rgba(167, 139, 250, 0.12) 0%, transparent 70%);
}

.p4p-service-page--violet .p4p-service-single-hero__visual {
    border-color: rgba(167, 139, 250, 0.3);
}

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

/* Web Development single page */
.web-orbit-container {
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.web-core {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.2rem;
    color: #fff;
    z-index: 10;
}

.web-orbit-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.web-orbit-ring-1 {
    width: 300px;
    height: 300px;
    animation: spin-ring 20s linear infinite;
}

.web-orbit-ring-2 {
    width: 450px;
    height: 450px;
    animation: spin-ring-reverse 30s linear infinite;
}

.web-planet {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: #010103;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.8);
}

.web-terminal {
    background: rgba(10, 10, 15, 0.95);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.web-terminal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem 1.5rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.web-terminal-dot { width: 12px; height: 12px; border-radius: 50%; }

.web-terminal-body {
    padding: 2rem;
    font-family: var(--p4p-font-mono, monospace);
    color: #a5b4fc;
    font-size: 1.1rem;
    line-height: 1.8;
}

.web-terminal-comment { color: #64748b; }

.web-metric-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.web-metric-bar-fill {
    height: 100%;
    width: 0%;
    transition: width 2s cubic-bezier(0.19, 1, 0.22, 1);
}

.p4p-service-web-hero {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.p4p-service-web-hero__title {
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 900;
    color: #fff;
    line-height: 1;
    margin-bottom: 2rem;
    text-shadow: 0 0 30px rgba(232, 168, 124, 0.35);
}

@keyframes spin-ring { 100% { transform: rotate(360deg); } }
@keyframes spin-ring-reverse { 100% { transform: rotate(-360deg); } }

@media (max-width: 900px) {
    .p4p-service-web-hero { grid-template-columns: 1fr; }
    .web-orbit-container { display: none; }
    #tech-stack > div { grid-template-columns: 1fr !important; padding: 2rem !important; }
    .p4p-service-web-hero .p4p-3d-box { transform: none !important; }
}

.p4p-service-back {
    color: #64748b;
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    display: inline-block;
}

.p4p-service-web-hero__actions { margin-top: 3rem; }

.web-planet--accent {
    box-shadow: inset 0 0 10px var(--p4p-accent), 0 0 15px rgba(232, 168, 124, 0.45);
}

.p4p-metric-heading {
    color: var(--p4p-accent);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.p4p-service-card-mini {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(232, 168, 124, 0.3);
    border-radius: 20px;
    padding: 2rem;
    transform: translateY(20px);
}

.web-terminal-code span {
    color: var(--p4p-accent);
}

/* Page mesh canvas */
.p4p-page-mesh {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
}

.p4p-service-page .p4p-services-main {
    position: relative;
}

.p4p-service-page .p4p-3d-box,
.p4p-service-page [class*="p4p-service"] .p4p-3d-box {
    transition: transform 0.45s cubic-bezier(0.19, 1, 0.22, 1), border-color 0.35s, box-shadow 0.35s;
}

.p4p-service-page .p4p-3d-box:hover {
    transform: translateY(-8px);
    border-color: rgba(232, 168, 124, 0.35);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.65), 0 0 32px rgba(232, 168, 124, 0.12);
}

.p4p-service-page--mint .p4p-3d-box:hover {
    border-color: rgba(134, 239, 172, 0.4);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.65), 0 0 32px rgba(134, 239, 172, 0.12);
}

.p4p-service-page--violet .p4p-3d-box:hover {
    border-color: rgba(167, 139, 250, 0.4);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.65), 0 0 32px rgba(167, 139, 250, 0.12);
}

.p4p-service-page--motion .p4p-ambient-light--hero {
    background: radial-gradient(circle, rgba(244, 114, 182, 0.12) 0%, transparent 70%);
}

.p4p-service-page--cyan .p4p-ambient-light--hero {
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
}

.p4p-service-page--purple .p4p-ambient-light--hero {
    background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, transparent 70%);
}

@media (max-width: 768px) {
    .p4p-page-mesh { opacity: 0.35; }
}

/* Split hero — SaaS / Apps enriched pages */
.p4p-service-single-hero__copy {
    order: 1;
}

.p4p-service-single-hero__title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #fff;
    font-weight: 900;
    margin: 1.5rem 0;
    line-height: 1.05;
}

.p4p-service-single-hero__lead {
    color: #cbd5e1;
    font-size: 1.1rem;
    line-height: 1.65;
    margin-bottom: 2rem;
    max-width: 36rem;
}

.p4p-service-single-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.p4p-service-page--mint .p4p-service-single-hero__title {
    text-shadow: 0 0 24px rgba(16, 185, 129, 0.45);
}

.p4p-service-page--mint .p4p-kicker {
    color: rgba(134, 239, 172, 1);
    border-color: rgba(134, 239, 172, 0.45);
}

.p4p-service-page--violet .p4p-service-single-hero__title {
    text-shadow: 0 0 24px rgba(139, 92, 246, 0.45);
}

.p4p-service-page--violet .p4p-kicker {
    color: rgba(167, 139, 250, 1);
    border-color: rgba(167, 139, 250, 0.45);
}

/* Hero visuals */
@keyframes p4p-svc-spin { 100% { transform: rotate(360deg); } }
@keyframes p4p-svc-spin-reverse { 100% { transform: rotate(-360deg); } }
@keyframes p4p-svc-pulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 50% { transform: translate(-50%, -50%) scale(1.08); opacity: 0.85; } }

.p4p-service-visual__icon {
    font-size: 5rem;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.65));
}

.p4p-service-page--violet .p4p-service-visual__icon,
.p4p-service-page--violet .p4p-service-visual__phone-icon {
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.65));
}

.p4p-service-visual__ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.p4p-service-visual__ring--inner {
    width: 140px;
    height: 140px;
    border: 2px dashed rgba(16, 185, 129, 0.45);
    animation: p4p-svc-spin 10s linear infinite;
}

.p4p-service-visual__ring--outer {
    width: 200px;
    height: 200px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    animation: p4p-svc-spin-reverse 15s linear infinite;
}

.p4p-service-page--violet .p4p-service-visual__ring--inner {
    border-color: rgba(139, 92, 246, 0.45);
}

.p4p-service-page--violet .p4p-service-visual__ring--outer,
.p4p-service-page--violet .p4p-service-visual__ring--dashed {
    border-color: rgba(139, 92, 246, 0.3);
}

.p4p-service-visual__ring--dashed {
    width: 250px;
    height: 250px;
    border: 1px dashed rgba(139, 92, 246, 0.35);
    animation: p4p-svc-spin 15s linear infinite;
}

.p4p-service-visual__phone {
    width: 150px;
    height: 300px;
    border: 4px solid rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
    background: rgba(0, 0, 0, 0.5);
}

.p4p-service-visual__phone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #fff;
    border-radius: 4px;
}

.p4p-service-visual__phone-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    animation: p4p-svc-pulse 2s ease-in-out infinite;
}

@media (max-width: 900px) {
    .p4p-service-single-hero__visual {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .p4p-service-visual__ring,
    .p4p-service-visual__phone-icon {
        animation: none !important;
    }
}
