/* PartnerBuilder — Cyber-Mechanical / Glassmorphism flagship */

.p4p-page--partnerbuilder {
    --pb-accent: #22d3ee;
    --pb-accent-violet: #a855f7;
    --pb-base: #0d0d11;
    background: var(--pb-base);
}

.p4p-pb-ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 55% 42% at 15% 12%, rgba(34, 211, 238, 0.14), transparent 62%),
        radial-gradient(ellipse 48% 38% at 85% 78%, rgba(168, 85, 247, 0.12), transparent 58%);
    animation: p4p-pb-ambient 11s ease-in-out infinite alternate;
}

@keyframes p4p-pb-ambient {
    from { opacity: 0.7; }
    to   { opacity: 1; }
}

.p4p-pb-hero {
    text-align: center;
    max-width: 860px;
    margin: 0 auto;
    padding: clamp(2rem, 6vw, 4rem) 1.5rem 2rem;
}

.p4p-pb-badge {
    display: inline-block;
    margin: 1rem 0 1rem;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #cffafe;
    border: 1px solid rgba(34, 211, 238, 0.55);
    background: rgba(34, 211, 238, 0.1);
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.22);
    animation: p4p-pb-pulse 2.8s ease-in-out infinite;
}

@keyframes p4p-pb-pulse {
    0%, 100% { box-shadow: 0 0 16px rgba(34, 211, 238, 0.18); opacity: 0.92; }
    50%      { box-shadow: 0 0 36px rgba(34, 211, 238, 0.42); opacity: 1; }
}

.p4p-pb-hero__title {
    font-size: clamp(1.7rem, 4.8vw, 2.85rem);
    font-weight: 900;
    line-height: 1.12;
    margin: 0 0 1rem;
    background: linear-gradient(125deg, #fff 0%, #67e8f9 45%, var(--pb-accent-violet) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.p4p-pb-hero__lead {
    font-size: 1.05rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.72);
    margin: 0 0 1rem;
}

.p4p-pb-price-chip {
    display: inline-block;
    margin-bottom: 1.5rem;
    padding: 0.35rem 0.9rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #2dd4bf;
    border: 1px solid rgba(45, 212, 191, 0.4);
    background: rgba(45, 212, 191, 0.08);
}

.p4p-pb-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: center;
}

.p4p-btn-glow--cyan {
    border-color: rgba(34, 211, 238, 0.45) !important;
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.2);
}

.p4p-pb-section {
    padding: 0 0 clamp(2rem, 5vw, 3rem);
}

.p4p-pb-panel {
    padding: clamp(1.5rem, 4vw, 2.25rem);
    border-radius: 16px;
    border: 1px solid rgba(34, 211, 238, 0.32);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-bottom: 1.25rem;
}

.p4p-pb-panel__icon {
    width: 52px;
    height: 52px;
    color: var(--pb-accent);
    filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.5));
    margin-bottom: 1rem;
}

.p4p-pb-panel__icon svg {
    width: 100%;
    height: 100%;
}

.p4p-pb-panel__title {
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
    margin: 0 0 0.75rem;
    color: #fff;
}

.p4p-pb-panel__body {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.72);
}

/* Live Canvas studio */
.p4p-pb-studio {
    padding: clamp(1.25rem, 3vw, 1.75rem);
    border-radius: 18px;
    border: 1px solid rgba(168, 85, 247, 0.35);
    background: linear-gradient(145deg, rgba(34, 211, 238, 0.05), rgba(13, 13, 17, 0.92));
    backdrop-filter: blur(14px);
}

.p4p-pb-studio__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.p4p-pb-viewport-toggles {
    display: flex;
    gap: 0.4rem;
    padding: 0.25rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.p4p-pb-viewport-btn {
    padding: 0.45rem 0.85rem;
    border: none;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.55);
    background: transparent;
    transition: background 0.25s, color 0.25s;
}

.p4p-pb-viewport-btn.is-active {
    color: #fff;
    background: rgba(34, 211, 238, 0.25);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.2);
}

.p4p-pb-live-canvas {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
    min-height: 280px;
}

.p4p-pb-live-canvas__frame {
    width: 100%;
    max-width: 920px;
    border-radius: 12px;
    border: 2px solid rgba(34, 211, 238, 0.35);
    background: rgba(8, 8, 14, 0.85);
    padding: 1.25rem;
    transition: max-width 0.45s cubic-bezier(0.22, 1, 0.36, 1), transform 0.45s;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.p4p-pb-live-canvas[data-view="tablet"] .p4p-pb-live-canvas__frame {
    max-width: 640px;
}

.p4p-pb-live-canvas[data-view="mobile"] .p4p-pb-live-canvas__frame {
    max-width: 320px;
}

.p4p-pb-live-canvas__hero {
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px dashed rgba(168, 85, 247, 0.45);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(34, 211, 238, 0.06));
}

.p4p-pb-live-canvas__tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pb-accent-violet);
    margin-bottom: 0.5rem;
}

.p4p-pb-live-canvas__hero h3 {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
    color: #fff;
}

.p4p-pb-live-canvas__hero p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.p4p-pb-live-canvas__bento {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
}

.p4p-pb-bento-cell {
    min-height: 72px;
    border-radius: 8px;
    border: 1px solid rgba(34, 211, 238, 0.25);
    background: rgba(34, 211, 238, 0.06);
    transition: transform 0.3s, opacity 0.3s;
}

.p4p-pb-bento-cell--wide {
    grid-column: 1 / -1;
}

.p4p-pb-live-canvas.is-imported .p4p-pb-bento-cell {
    animation: p4p-pb-cell-in 0.5s ease backwards;
}

.p4p-pb-live-canvas.is-imported .p4p-pb-bento-cell:nth-child(2) { animation-delay: 0.08s; }
.p4p-pb-live-canvas.is-imported .p4p-pb-bento-cell:nth-child(3) { animation-delay: 0.16s; }

@keyframes p4p-pb-cell-in {
    from { opacity: 0; transform: translateY(8px) scale(0.96); }
    to   { opacity: 1; transform: none; }
}

.p4p-pb-studio__hint {
    margin: 0.75rem 0 0;
    font-size: 0.8rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
}

/* Link Deconstructor demo */
.p4p-pb-decon-demo {
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(34, 211, 238, 0.3);
    background: rgba(255, 255, 255, 0.02);
}

.p4p-pb-decon-demo__field span {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.p4p-pb-decon-demo__field input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.p4p-pb-decon-demo__scan,
.p4p-pb-decon-demo__import {
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    border: 1px solid rgba(34, 211, 238, 0.45);
    background: rgba(34, 211, 238, 0.12);
    color: #cffafe;
    transition: transform 0.25s, box-shadow 0.25s;
}

.p4p-pb-decon-demo__scan:hover,
.p4p-pb-decon-demo__import:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 211, 238, 0.25);
}

.p4p-pb-decon-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
}

.p4p-pb-decon-demo__scan-msg {
    font-size: 0.85rem;
    color: var(--pb-accent);
    margin: 0 0 0.75rem;
}

.p4p-pb-decon-demo__success {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #2dd4bf;
}

.p4p-pb-decon-demo__import {
    margin-top: 0.75rem;
    width: 100%;
}

/* AI Copilot */
.p4p-pb-copilot {
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid rgba(168, 85, 247, 0.35);
    background: rgba(168, 85, 247, 0.05);
    margin-bottom: 1.5rem;
}

.p4p-pb-copilot__drop {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 2px dashed rgba(168, 85, 247, 0.45);
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.88rem;
    text-align: center;
    padding: 1rem;
    transition: border-color 0.3s, background 0.3s;
}

.p4p-pb-copilot__drop.is-dragover {
    border-color: var(--pb-accent);
    background: rgba(34, 211, 238, 0.08);
    color: #cffafe;
}

.p4p-pb-copilot__drop.is-filled {
    border-style: solid;
    border-color: rgba(45, 212, 191, 0.5);
}

.p4p-pb-copilot__chat {
    margin-top: 1rem;
    padding: 0.85rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.p4p-pb-copilot__msg {
    font-size: 0.88rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
}

.p4p-pb-copilot__msg--ai {
    color: #c4b5fd;
}

/* Animation directors */
.p4p-pb-directors {
    padding: 1.75rem;
    border-radius: 16px;
    border: 1px solid rgba(168, 85, 247, 0.35);
    background: rgba(255, 255, 255, 0.03);
    text-align: center;
}

.p4p-pb-directors__title {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    color: #fff;
}

.p4p-pb-directors__intro {
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.p4p-pb-directors__toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.p4p-pb-director-btn {
    padding: 0.6rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 8, 14, 0.65);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s, color 0.3s;
}

.p4p-pb-director-btn.is-active {
    border-color: rgba(168, 85, 247, 0.55);
    color: #e9d5ff;
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.25);
}

.p4p-pb-directors__preview {
    position: relative;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.4);
}

.p4p-pb-directors__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.15), rgba(168, 85, 247, 0.15));
}

.p4p-pb-directors__slide.is-visible {
    opacity: 1;
}

.p4p-pb-directors[data-mode="apple"] .p4p-pb-directors__slide.is-visible {
    animation: p4p-pb-fade-in 1.2s ease infinite alternate;
}

.p4p-pb-directors[data-mode="snap"] .p4p-pb-directors__slide.is-visible {
    animation: p4p-pb-snap 2s steps(3) infinite;
}

@keyframes p4p-pb-fade-in {
    from { opacity: 0.4; }
    to   { opacity: 1; }
}

@keyframes p4p-pb-snap {
    0%, 33% { transform: translateY(0); }
    34%, 66% { transform: translateY(-20%); }
    67%, 100% { transform: translateY(-40%); }
}

/* Waitlist form */
.p4p-pb-form {
    max-width: 520px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    border-radius: 16px;
    border: 2px solid rgba(34, 211, 238, 0.4);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(13, 13, 17, 0.95));
    backdrop-filter: blur(12px);
}

.p4p-pb-form__title {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    color: #fff;
    text-align: center;
}

.p4p-pb-form__intro {
    margin: 0 0 1.25rem;
    font-size: 0.88rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

.p4p-pb-form__field {
    display: block;
    margin-bottom: 1rem;
}

.p4p-pb-form__field span {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.p4p-pb-form__field input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 0.95rem;
}

.p4p-pb-form__field input:focus {
    outline: none;
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

.p4p-pb-form__error { color: #f87171; font-size: 0.85rem; margin: 0 0 0.75rem; }
.p4p-pb-form__success { color: #2dd4bf; font-size: 0.85rem; margin: 0 0 0.75rem; }

.p4p-pb-form__submit {
    width: 100%;
    padding: 0.9rem 1rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--pb-accent), var(--pb-accent-violet));
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(34, 211, 238, 0.35);
    transition: transform 0.3s, box-shadow 0.3s;
}

.p4p-pb-form__submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(34, 211, 238, 0.45);
}

/* Blog viral matrix */
.p4p-pb-viral-matrix {
    margin-top: 2.5rem;
    padding: clamp(1.5rem, 4vw, 2rem);
    border-radius: 16px;
    border: 1px solid rgba(34, 211, 238, 0.3);
    background: rgba(255, 255, 255, 0.02);
}

.p4p-pb-viral-matrix__title {
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
    color: #fff;
}

.p4p-pb-viral-matrix__intro {
    margin: 0 0 1.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.65;
}

.p4p-pb-viral-script {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.p4p-pb-viral-script:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.p4p-pb-viral-script__title {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
    color: #67e8f9;
}

.p4p-pb-viral-script__grid {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .p4p-pb-viral-script__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.p4p-pb-viral-script__cell {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.p4p-pb-viral-script__cell--caption {
    grid-column: 1 / -1;
    border-color: rgba(168, 85, 247, 0.25);
}

.p4p-pb-viral-script__label {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.35rem;
}

.p4p-pb-viral-script__cell p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
}

.p4p-pb-blog-badge {
    border-color: rgba(34, 211, 238, 0.4) !important;
}

@media (prefers-reduced-motion: reduce) {
    .p4p-pb-ambient,
    .p4p-pb-badge,
    .p4p-pb-directors__slide,
    .p4p-pb-bento-cell {
        animation: none !important;
    }
}
