/* Motion layer inspired by contemporary marketing UI kits (spotlight, magnetic hover, 3D tilt). */

.pp-scroll-progress {
    position: fixed;
    top: 0;
    inset-inline: 0;
    height: 3px;
    z-index: 80;
    transform-origin: var(--pp-progress-origin, left);
    transform: scaleX(var(--pp-progress, 0));
    background: linear-gradient(90deg, #2563eb, #38bdf8);
    pointer-events: none;
}

[dir="rtl"] .pp-scroll-progress {
    --pp-progress-origin: right;
}

.pp-cursor,
.pp-cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 70;
    mix-blend-mode: multiply;
}

.pp-cursor {
    width: 340px;
    height: 340px;
    margin: -170px 0 0 -170px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.16), transparent 68%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.pp-cursor.is-on {
    opacity: 1;
}

.pp-cursor-dot {
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: #2563eb;
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.12);
    opacity: 0;
}

.pp-cursor-dot.is-on {
    opacity: 0.85;
}

.pp-nav-links {
    position: relative;
}

.pp-nav-links a {
    position: relative;
    z-index: 1;
}

.pp-nav-spot {
    position: absolute;
    top: 50%;
    left: 0;
    z-index: 0;
    height: 34px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
    transform: translateY(-50%);
    opacity: 0;
    pointer-events: none;
    transition: left 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.2s ease;
}

.pp-nav-links.is-spot .pp-nav-spot {
    opacity: 1;
}

.pp-hero h1.pp-split {
    animation: none;
    background: none;
    color: var(--pp-navy);
    overflow: visible;
}

.pp-hero h1.pp-split .pp-word {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    padding-bottom: 0.08em;
}

.pp-hero h1.pp-split .pp-word > span {
    display: inline-block;
    background: linear-gradient(118deg, #0f172a 8%, #1d4ed8 48%, #38bdf8 92%);
    background-size: 160% 160%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: pp-word-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) both, pp-gradient 10s ease infinite;
}

@keyframes pp-word-up {
    from { transform: translateY(110%); }
    to { transform: translateY(0); }
}

.pp-visual {
    perspective: 1200px;
}

.pp-scene {
    position: absolute;
    inset: 6% 2% 8%;
    pointer-events: none;
    z-index: 0;
    perspective: 700px;
    overflow: hidden;
    border-radius: 28px;
    mask-image: radial-gradient(circle at 50% 40%, #000 40%, transparent 78%);
}

.pp-scene-grid {
    position: absolute;
    inset: -20% -10% -40%;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.18) 1px, transparent 1px);
    background-size: 42px 42px;
    transform: rotateX(62deg) translateY(18%);
    animation: pp-grid-drift 18s linear infinite;
}

.pp-scene-rays {
    position: absolute;
    inset: -30%;
    background:
        repeating-conic-gradient(from 0deg, rgba(37, 99, 235, 0.08) 0deg 8deg, transparent 8deg 18deg);
    animation: pp-rays 28s linear infinite;
    mix-blend-mode: multiply;
}

@keyframes pp-grid-drift {
    to { background-position: 0 42px; }
}

@keyframes pp-rays {
    to { transform: rotate(360deg); }
}

.pp-magnetic {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    will-change: transform;
}

.pp-magnetic::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 140px;
    height: 140px;
    margin: -70px 0 0 -70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.45), transparent 70%);
    opacity: 0;
    pointer-events: none;
    transform: translate(var(--mx, 70px), var(--my, 20px));
    transition: opacity 0.25s ease;
}

.pp-magnetic:hover::after {
    opacity: 1;
}

.pp-landing .pp-card.pp-tilt {
    position: relative;
    transform-style: preserve-3d;
    transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.pp-landing .pp-card.pp-tilt:hover {
    transform: none;
    box-shadow: 0 28px 50px rgba(37, 99, 235, 0.18);
}

.pp-landing .pp-card.pp-tilt::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(
        420px circle at var(--spot-x, 50%) var(--spot-y, 0%),
        rgba(96, 165, 250, 0.22),
        transparent 42%
    );
    opacity: 0;
    transition: opacity 0.25s ease;
}

.pp-landing .pp-card.pp-tilt:hover::before,
.pp-landing .pp-card.pp-tilt.is-lit::before {
    opacity: 1;
}

.pp-btn.pp-glow {
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28), 0 0 0 0 rgba(56, 189, 248, 0.4);
}

.pp-landing {
    --pp-tone: rgba(239, 246, 255, 0.55);
    --pp-gold: #c9a227;
    transition: background-color 0.6s ease;
    animation: pp-identity 18s ease-in-out infinite;
}

@keyframes pp-identity {
    0%, 100% { background-color: #eff6ff; }
    33% { background-color: #ffffff; }
    66% { background-color: #f7f1de; }
}

.pp-landing.tone-about { --pp-tone: rgba(255, 255, 255, 0.4); }
.pp-landing.tone-journey { --pp-tone: rgba(219, 234, 254, 0.55); }
.pp-landing.tone-modules { --pp-tone: rgba(248, 250, 252, 0.7); }
.pp-landing.tone-portal { --pp-tone: rgba(219, 234, 254, 0.7); }
.pp-landing.tone-apps,
.pp-landing.tone-cta { --pp-tone: rgba(255, 255, 255, 0.2); }

.pp-landing::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: var(--pp-tone);
    transition: background 0.6s ease;
}

.pp-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.pp-count {
    font-size: 1.7rem;
    line-height: 1;
    color: #1d4ed8;
    font-variant-numeric: tabular-nums;
}

.pp-stat span {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
}

.pp-nav-links > a.is-current:not(.pp-btn) {
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.1);
}

.pp-ticker-soft {
    margin-top: -1.6rem;
}

.pp-ticker-soft .pp-ticker-track {
    animation-duration: 34s;
    animation-direction: reverse;
}

.pp-ticker-soft span {
    color: #334155;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.55);
}

.pp-phone-screen {
    position: relative;
    overflow: hidden;
}

.pp-phone-slides {
    position: relative;
    min-height: 280px;
}

.pp-phone-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.pp-phone-slide.is-on {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    position: relative;
}

.pp-phone-dots {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 0.4rem;
}

.pp-phone-dots i {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.25);
}

.pp-phone-dots i.is-on {
    background: #2563eb;
    width: 16px;
}

.pp-phone-sm {
    width: min(220px, 100%);
}

.pp-phone-sm .pp-phone-screen {
    min-height: 320px;
}

.pp-phone-sm .pp-phone-slides {
    min-height: 210px;
}

.pp-compare {
    margin-top: 1.75rem;
}

.pp-compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 0.85rem;
}

.pp-compare-col {
    border-radius: 22px;
    padding: 1.15rem 1.2rem;
    border: 1px solid var(--pp-line);
    background: #fff;
}

.pp-compare-col h3 {
    font-size: 1rem;
    margin-bottom: 0.7rem;
}

.pp-compare-col ul {
    margin: 0;
    padding-inline-start: 1.1rem;
    color: #475569;
}

.pp-compare-col.is-before {
    background: #f8fafc;
    opacity: 0.88;
}

.pp-compare-col.is-after {
    background: linear-gradient(180deg, #eff6ff, #fff);
    box-shadow: var(--pp-shadow);
    transform: translateY(-4px);
}

.pp-path {
    position: relative;
    margin: 1.4rem 0 0;
}

.pp-path-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pp-path-line {
    position: absolute;
    top: 22px;
    inset-inline: 8%;
    height: 3px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    overflow: hidden;
}

.pp-path-line::after {
    content: "";
    display: block;
    height: 100%;
    width: 100%;
    transform: scaleX(var(--path, 0));
    transform-origin: var(--pp-progress-origin, left);
    background: linear-gradient(90deg, #2563eb, #38bdf8);
}

.pp-path-step {
    position: relative;
    z-index: 1;
    background: #fff;
    border: 1px solid var(--pp-line);
    border-radius: 18px;
    padding: 1rem 0.9rem 1.05rem;
}

.pp-path-num {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 800;
    margin-bottom: 0.45rem;
}

.pp-path-step h3 {
    font-size: 1rem;
    margin: 0 0 0.3rem;
}

.pp-path-step p {
    margin: 0;
    color: #64748b;
    font-size: 0.88rem;
}

.pp-modules-live {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    margin: 0 0 1rem;
    color: #64748b;
    font-size: 0.88rem;
}

.pp-modules-live strong {
    color: #1d4ed8;
}

.pp-modules.is-focusing .pp-module {
    opacity: 0.48;
    filter: saturate(0.7);
}

.pp-modules.is-focusing .pp-module.is-hot {
    opacity: 1;
    filter: none;
}

.pp-apps-stage {
    display: grid;
    grid-template-columns: minmax(180px, 240px) 1fr;
    gap: 1.5rem;
    align-items: center;
}

.pp-dock {
    position: fixed;
    z-index: 36;
    bottom: 1rem;
    inset-inline: 0;
    width: min(560px, calc(100% - 1.5rem));
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem 0.55rem 1rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(16px);
}

.pp-dock[hidden] {
    display: none !important;
}

.pp-dock span {
    font-size: 0.85rem;
    font-weight: 600;
    margin-inline-end: auto;
}

.pp-dock .pp-btn {
    padding: 0.45rem 0.9rem;
}

.pp-dock-store {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.pp-dock-store svg {
    width: 18px;
    height: 18px;
}

.pp-landing.has-dock {
    padding-bottom: 5rem;
}

.pp-landing.pp-touring .pp-dock {
    display: none !important;
}

.pp-tour-launch {
    border: 0;
    background: transparent;
    color: #1d4ed8;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    white-space: nowrap;
}

.pp-hero-login {
    display: inline-block;
    margin-top: 0.75rem;
    color: #475569;
    font-weight: 600;
}

.pp-roles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.pp-role {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.2rem;
    color: inherit;
}

.pp-role span {
    color: #1d4ed8;
    font-weight: 700;
    margin-top: auto;
}

.pp-demo {
    position: relative;
}

.pp-demo-screen {
    display: none;
    text-align: center;
}

.pp-demo-screen.is-on {
    display: block;
}

.pp-demo-frame {
    min-height: 220px;
    border-radius: 24px;
    background: linear-gradient(180deg, #dbeafe, #fff);
    border: 1px solid var(--pp-line);
    padding: 1.2rem;
    margin-bottom: 0.85rem;
}

.pp-demo-chip {
    display: inline-flex;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: #1d4ed8;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

.pp-demo-mock {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.6rem;
    margin-top: 1.2rem;
}

.pp-demo-mock b,
.pp-demo-mock i {
    display: block;
    height: 72px;
    border-radius: 16px;
    background: rgba(37, 99, 235, 0.16);
}

.pp-demo-mock i {
    grid-column: 1 / -1;
    height: 48px;
    background: rgba(15, 23, 42, 0.08);
}

.pp-demo-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.pp-demo-nav button {
    border: 1px solid var(--pp-line);
    background: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-weight: 700;
    color: #334155;
}

.pp-demo-nav button.is-on {
    background: #1d4ed8;
    color: #fff;
    border-color: #1d4ed8;
}

.pp-module-board {
    display: grid;
    grid-template-columns: minmax(180px, 240px) 1fr;
    gap: 1rem;
    align-items: start;
}

.pp-module-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pp-module-tab {
    text-align: start;
    border: 1px solid var(--pp-line);
    background: #fff;
    border-radius: 14px;
    padding: 0.7rem 0.85rem;
    font-weight: 700;
    color: #334155;
}

.pp-module-tab span {
    display: inline-block;
    margin-inline-end: 0.35rem;
    color: #1d4ed8;
}

.pp-module-tab.is-on {
    background: #eff6ff;
    border-color: rgba(37, 99, 235, 0.35);
    color: #1e3a8a;
}

.pp-module-panel {
    display: none;
}

.pp-module-panel.is-on {
    display: block;
}

.pp-phone-chrome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: #64748b;
    margin-bottom: 0.7rem;
}

.pp-phone-notch {
    width: 42%;
    height: 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.12);
}

.pp-shot {
    background: #fff;
    border-radius: 16px;
    padding: 0.85rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.pp-shot header small {
    display: block;
    color: #64748b;
    margin-top: 0.25rem;
}

.pp-shot-row {
    display: grid;
    grid-template-columns: 18px 1fr 36px;
    gap: 0.45rem;
    align-items: center;
    margin-top: 0.7rem;
}

.pp-shot-row i,
.pp-shot-row span,
.pp-shot-row b {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
}

.pp-shot-row i {
    width: 18px;
    height: 18px;
}

.pp-shot-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.35rem;
    height: 56px;
    margin-top: 0.9rem;
}

.pp-shot-bars span {
    flex: 1;
    background: linear-gradient(180deg, #60a5fa, #2563eb);
    border-radius: 8px 8px 4px 4px;
}

.pp-shot-bars span:nth-child(1) { height: 40%; }
.pp-shot-bars span:nth-child(2) { height: 70%; }
.pp-shot-bars span:nth-child(3) { height: 92%; }

.pp-faculty {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    background: #fff;
    border: 1px solid var(--pp-line);
    border-radius: 24px;
    padding: 1.2rem;
}

.pp-faculty label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-weight: 700;
    color: #1e293b;
}

.pp-faculty input,
.pp-faculty textarea {
    border: 1px solid var(--pp-line);
    border-radius: 12px;
    padding: 0.7rem 0.8rem;
    font: inherit;
}

.pp-faculty-full {
    grid-column: 1 / -1;
}

.pp-faculty button {
    grid-column: 1 / -1;
    justify-self: start;
}

.pp-hp {
    position: absolute;
    left: -9999px;
    height: 0;
    overflow: hidden;
}

.pp-flash {
    border-radius: 14px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.pp-flash.is-ok {
    background: #ecfdf5;
    color: #047857;
}

.pp-flash.is-bad {
    background: #fef2f2;
    color: #b91c1c;
}

.pp-faq {
    display: grid;
    gap: 0.65rem;
}

.pp-faq-item {
    background: #fff;
    border: 1px solid var(--pp-line);
    border-radius: 16px;
    padding: 0.85rem 1rem;
}

.pp-faq-item summary {
    cursor: pointer;
    font-weight: 700;
    color: #0f172a;
}

.pp-faq-item p {
    margin: 0.55rem 0 0;
    color: #475569;
}

.pp-legal {
    padding: 2.5rem 0 4rem;
}

.pp-legal h1 {
    margin-bottom: 1.2rem;
}

.pp-legal p {
    color: #334155;
    line-height: 1.8;
}

.pp-bg-carousel {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.pp-bg-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.08);
    filter: saturate(0.7);
    transition: opacity 1.2s ease;
}

.pp-bg-slide.is-on {
    opacity: 0.16;
    transform: scale(1);
}

.pp-hero-carousel {
    position: absolute;
    inset: 8% 6%;
    z-index: 1;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(201, 162, 39, 0.35);
}

.pp-hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: translateX(12%) scale(1.04);
    transition: opacity 0.7s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.pp-hero-slide.is-on {
    opacity: 1;
    transform: none;
    position: relative;
}

.pp-phone-logo-bg {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(239, 246, 255, 0.92)),
        url('/images/logo.png') center 42% / 58% no-repeat;
}

.pp-kicker {
    box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.35);
}

.pp-scroll-progress {
    background: linear-gradient(90deg, #2563eb, #c9a227, #38bdf8);
}

.pp-contacts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
}

.pp-contact-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: #fff;
    border: 1px solid rgba(201, 162, 39, 0.28);
    border-radius: 18px;
    padding: 1rem 1.1rem;
    color: inherit;
}

.pp-contact-card span {
    color: #64748b;
    font-size: 0.88rem;
    word-break: break-all;
}

.pp-prose {
    background: #fff;
    border: 1px solid var(--pp-line);
    border-inline-start: 4px solid var(--pp-gold, #c9a227);
    border-radius: 18px;
    padding: 1.15rem 1.25rem;
    color: #334155;
    line-height: 1.85;
}

@media (max-width: 1280px) {
    .pp-nav-links > a[href="#contact"],
    .pp-nav-links > a[href="#subscribe"],
    .pp-nav-links > a[href="#clinics-system"] {
        display: none;
    }
}

@media (max-width: 900px) {
    .pp-nav.is-open .pp-nav-links > a[href="#contact"],
    .pp-nav.is-open .pp-nav-links > a[href="#subscribe"],
    .pp-nav.is-open .pp-nav-links > a[href="#clinics-system"] {
        display: flex;
    }
}

@media (max-width: 900px) {
    .pp-compare-grid,
    .pp-path-list,
    .pp-apps-stage,
    .pp-roles,
    .pp-module-board,
    .pp-faculty {
        grid-template-columns: 1fr;
    }

    .pp-module-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .pp-tour-launch {
        font-size: 0.75rem;
        padding: 0.25rem 0.35rem;
    }

    .pp-path-line {
        display: none;
    }

    .pp-dock span {
        display: none;
    }

    .pp-phone-sm {
        display: none;
    }
}

@media (hover: none), (max-width: 900px) {
    .pp-cursor,
    .pp-cursor-dot,
    .pp-nav-spot {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pp-cursor,
    .pp-cursor-dot,
    .pp-scene,
    .pp-nav-spot,
    .pp-scroll-progress {
        display: none !important;
    }

    .pp-hero h1.pp-split .pp-word > span,
    .pp-scene-grid,
    .pp-scene-rays {
        animation: none !important;
    }
}
