/********** Progress Systems — Day / Night theme + immersive hero **********/

:root,
html[data-theme="light"] {
    --ps-bg: #F5F8FF;
    --ps-bg-elevated: #FFFFFF;
    --ps-bg-soft: #EAF0FF;
    --ps-surface: rgba(255, 255, 255, 0.82);
    --ps-ink: #0D1B34;
    --ps-text: #4A5872;
    --ps-muted: #7A879E;
    --ps-border: #E3E9F4;
    --ps-nav-bg: rgba(255, 255, 255, 0.78);
    --ps-nav-border: rgba(227, 233, 244, 0.9);
    --ps-hero-ink: #0D1B34;
    --ps-hero-muted: rgba(13, 27, 52, 0.68);
    --ps-brand-glow: linear-gradient(105deg, #1F5FD6 0%, #2B6BE0 38%, #E63B3B 100%);
    --ps-footer-bg: #0D1B34;
    --ps-shadow: 0 20px 50px rgba(13, 27, 52, 0.08);
    --ps-orb-veil: linear-gradient(180deg, rgba(245, 248, 255, 0.15) 0%, rgba(245, 248, 255, 0.55) 70%, #F5F8FF 100%);
    color-scheme: light;
}

html[data-theme="dark"] {
    --ps-bg: #060B16;
    --ps-bg-elevated: #0D1528;
    --ps-bg-soft: #111C33;
    --ps-surface: rgba(13, 21, 40, 0.78);
    --ps-ink: #F3F6FF;
    --ps-text: #B7C3DA;
    --ps-muted: #8A97AD;
    --ps-border: rgba(255, 255, 255, 0.1);
    --ps-nav-bg: rgba(6, 11, 22, 0.72);
    --ps-nav-border: rgba(255, 255, 255, 0.08);
    --ps-hero-ink: #F7F9FF;
    --ps-hero-muted: rgba(247, 249, 255, 0.72);
    --ps-brand-glow: linear-gradient(105deg, #6EA8FF 0%, #3B82F6 36%, #FF6B6B 100%);
    --ps-footer-bg: #040812;
    --ps-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    --ps-orb-veil: linear-gradient(180deg, rgba(6, 11, 22, 0.2) 0%, rgba(6, 11, 22, 0.55) 65%, #060B16 100%);
    color-scheme: dark;

    --light: #111C33;
    --dark: #F3F6FF;
    --text: #B7C3DA;
    --muted: #8A97AD;
    --border: rgba(255, 255, 255, 0.1);
    --navy: #040812;
}

html {
    background: var(--ps-bg);
}

body {
    background: var(--ps-bg);
    color: var(--ps-text);
    transition: background-color .45s ease, color .35s ease;
}

#spinner {
    background: var(--ps-bg) !important;
}

html[data-theme="dark"] #spinner {
    background: #060B16 !important;
}

html[data-theme="dark"] .spinner-logo {
    filter: brightness(1.05);
}

/* Theme toggle */
.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid var(--ps-border);
    background: var(--ps-surface);
    color: var(--ps-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
    box-shadow: var(--ps-shadow);
    flex: 0 0 auto;
}

@media (min-width: 992px) {
    .ps-navbar .navbar-collapse {
        order: 1;
    }
    .ps-navbar .ps-nav-actions {
        order: 2;
        margin-left: 1rem;
    }
}

.theme-toggle:hover {
    transform: translateY(-1px) scale(1.04);
    color: var(--primary);
    border-color: rgba(31, 95, 214, 0.35);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Navbar themed */
.ps-navbar {
    background: var(--ps-nav-bg) !important;
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
}

.ps-navbar.scrolled {
    background: var(--ps-nav-bg) !important;
    border-bottom-color: var(--ps-nav-border);
    box-shadow: var(--ps-shadow);
}

.ps-navbar .navbar-nav .nav-link {
    color: var(--ps-ink) !important;
}

.ps-navbar .navbar-nav .nav-link:hover,
.ps-navbar .navbar-nav .nav-link.active {
    color: var(--primary) !important;
}

.ps-navbar .navbar-toggler {
    color: var(--ps-ink);
    border-color: var(--ps-border);
}

.ps-navbar .dropdown-menu {
    background: var(--ps-bg-elevated);
    border-color: var(--ps-border);
    box-shadow: var(--ps-shadow);
}

.ps-navbar .dropdown-item {
    color: var(--ps-ink);
}

.ps-navbar .dropdown-item small {
    color: var(--ps-muted);
}

.ps-navbar .dropdown-item:hover,
.ps-navbar .dropdown-item.active {
    background: var(--ps-bg-soft);
}

@media (max-width: 991.98px) {
    .ps-navbar .navbar-collapse {
        background: var(--ps-bg-elevated);
        border: 1px solid var(--ps-border);
    }
}

/* Immersive hero */
.ps-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: calc(var(--nav-height) + 2rem) 0 4rem;
    background: var(--ps-bg);
}

.ps-orb-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
    pointer-events: none;
}

.ps-hero-veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--ps-orb-veil);
    pointer-events: none;
}

.ps-hero-content {
    position: relative;
    z-index: 2;
    max-width: 920px;
    margin: 0 auto;
    text-align: center;
    padding: 0 1.25rem;
}

.ps-brand-display {
    font-family: "Plus Jakarta Sans", "Space Grotesk", sans-serif;
    font-weight: 800;
    font-size: clamp(2.4rem, 7vw, 5.2rem);
    letter-spacing: -0.045em;
    line-height: 0.95;
    margin: 0 0 1.25rem;
    animation: psBrandIn 1s cubic-bezier(.2, .8, .2, 1) both;
}

.ps-brand-display span {
    display: block;
}

.ps-brand-display .ps-brand-blue {
    color: #1F5FD6;
    text-shadow: 0 0 40px rgba(31, 95, 214, 0.35);
}

.ps-brand-display .ps-brand-red {
    color: #E63B3B;
    text-shadow: 0 0 40px rgba(230, 59, 59, 0.3);
}

html[data-theme="dark"] .ps-brand-display .ps-brand-blue {
    color: #6EA8FF;
    text-shadow: 0 0 48px rgba(110, 168, 255, 0.55);
}

html[data-theme="dark"] .ps-brand-display .ps-brand-red {
    color: #FF7A7A;
    text-shadow: 0 0 48px rgba(255, 122, 122, 0.45);
}

.ps-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--ps-border);
    background: var(--ps-surface);
    color: var(--ps-ink);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    animation: psFadeUp .8s ease .15s both;
}

.ps-hero-kicker .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55);
    animation: psPulse 2s ease infinite;
}

.ps-hero-title {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-weight: 700;
    font-size: clamp(1.45rem, 3.4vw, 2.35rem);
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: var(--ps-hero-ink);
    margin: 0 auto 1rem;
    max-width: 18ch;
    animation: psFadeUp .9s ease .28s both;
}

.ps-hero-lead {
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.65;
    color: var(--ps-hero-muted);
    max-width: 38rem;
    margin: 0 auto 1.75rem;
    animation: psFadeUp .9s ease .4s both;
}

.ps-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: center;
    animation: psFadeUp .9s ease .55s both;
}

.ps-hero-actions .btn-primary {
    box-shadow: 0 14px 40px rgba(31, 95, 214, 0.35);
}

.ps-hero-actions .btn-ghost-light {
    color: var(--ps-ink);
    border-color: rgba(13, 27, 52, 0.18);
    background: rgba(255, 255, 255, 0.55);
}

.ps-hero-actions .btn-ghost-light:hover {
    color: var(--primary);
    border-color: rgba(31, 95, 214, 0.35);
    background: rgba(255, 255, 255, 0.85);
}

html[data-theme="dark"] .ps-hero-actions .btn-ghost-light {
    color: #F3F6FF;
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .ps-hero-actions .btn-ghost-light:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.ps-scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    z-index: 2;
    width: 28px;
    height: 44px;
    border-radius: 999px;
    border: 1.5px solid var(--ps-border);
    display: flex;
    justify-content: center;
    padding-top: 8px;
    color: var(--ps-muted);
    text-decoration: none;
    animation: psFadeUp 1s ease .8s both;
}

.ps-scroll-cue span {
    width: 4px;
    height: 8px;
    border-radius: 4px;
    background: var(--primary);
    animation: psScrollDot 1.6s ease infinite;
}

@keyframes psBrandIn {
    from { opacity: 0; transform: translateY(24px) scale(0.96); filter: blur(8px); }
    to { opacity: 1; transform: none; filter: none; }
}

@keyframes psFadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

@keyframes psPulse {
    0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55); }
    70% { box-shadow: 0 0 0 10px rgba(22, 163, 74, 0); }
    100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

@keyframes psScrollDot {
    0% { opacity: 1; transform: translateY(0); }
    70% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 0; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .ps-brand-display,
    .ps-hero-kicker,
    .ps-hero-title,
    .ps-hero-lead,
    .ps-hero-actions,
    .ps-scroll-cue,
    .ps-hero-kicker .dot,
    .ps-scroll-cue span {
        animation: none !important;
    }
}

/* Below-fold momentum strip */
.ps-momentum {
    position: relative;
    padding: 2.5rem 0 1rem;
    border-bottom: 1px solid var(--ps-border);
    background: var(--ps-bg);
}

.ps-momentum-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    text-align: center;
}

.ps-momentum-grid .stat-value {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-weight: 800;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    color: var(--ps-ink);
    letter-spacing: -0.03em;
    line-height: 1;
}

.ps-momentum-grid .stat-label {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: var(--ps-muted);
}

@media (max-width: 767.98px) {
    .ps-momentum-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Global section theming */
.section,
.bg-light-2 {
    background: var(--ps-bg) !important;
}

.bg-light-2 {
    background: var(--ps-bg-soft) !important;
}

.section-title h2,
.section-title h1,
.check-list strong.text-dark,
.pole-card h3,
.service-item h5,
.feature-box h6 {
    color: var(--ps-ink) !important;
}

.section-title h6 {
    color: var(--primary) !important;
}

.lead-text,
.pole-card p,
.service-item p,
.feature-box p {
    color: var(--ps-text) !important;
}

.pole-card,
.service-item,
.feature-box,
.visual-card,
.form-panel {
    background: var(--ps-bg-elevated) !important;
    border-color: var(--ps-border) !important;
    box-shadow: var(--ps-shadow) !important;
    color: var(--ps-text);
}

.page-hero {
    background: var(--ps-bg) !important;
}

.page-hero .display-hero,
.page-hero h1 {
    color: var(--ps-ink) !important;
}

.page-hero .lead-text,
.page-hero .hero-tagline {
    color: var(--ps-hero-muted) !important;
}

html[data-theme="dark"] .hero-header,
html[data-theme="dark"] .page-hero {
    background: var(--ps-bg);
}

html[data-theme="dark"] .text-dark {
    color: var(--ps-ink) !important;
}

html[data-theme="dark"] .footer {
    background: var(--ps-footer-bg) !important;
}

html[data-theme="dark"] .cta-band {
    background: linear-gradient(135deg, #12306B 0%, #0D1B34 50%, #4A1520 120%);
}

html[data-theme="light"] .visual-card.org-stage {
    background: linear-gradient(160deg, #0D1B34 0%, #12306B 55%, #1a2340 100%);
}

/* Immovia band — keep readable contrast in night mode */
html[data-theme="dark"] .immovia-band {
    background: linear-gradient(145deg, #0D1528 0%, #121C33 55%, #18233D 100%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .immovia-band .section-title h2,
html[data-theme="dark"] .immovia-band h2 {
    color: #F3F6FF !important;
}

html[data-theme="dark"] .immovia-band > .row > [class*="col-"] > p,
html[data-theme="dark"] .immovia-band .lead-text {
    color: #B7C3DA !important;
}

html[data-theme="dark"] .immovia-band .chip {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #E8EEF8;
}

html[data-theme="dark"] .immovia-band .chip i {
    color: #6EA8FF;
}

html[data-theme="dark"] .immovia-mock {
    background: #0A1224;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .immovia-mock .mock-top {
    background: #111C33;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .immovia-mock .mock-top b,
html[data-theme="dark"] .immovia-mock .mock-row {
    color: #C5D0E4;
}

html[data-theme="dark"] .immovia-mock .kpi {
    background: #152038;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .immovia-mock .kpi small {
    color: #8A97AD;
}

html[data-theme="dark"] .immovia-mock .kpi strong {
    color: #F3F6FF;
}

html[data-theme="dark"] .immovia-mock .mock-row {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* Synergy — readable cards in night mode */
html[data-theme="dark"] .synergy-card {
    background: #121C33;
    border-color: rgba(255, 255, 255, 0.12);
    color: #F3F6FF;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .synergy-card h5 {
    color: #F3F6FF !important;
}

html[data-theme="dark"] .synergy-card .sc-icon {
    background: #1F5FD6;
}

html[data-theme="dark"] .synergy-card.soon .sc-icon {
    background: #3B4A66;
}

html[data-theme="dark"] .synergy-card .sc-need {
    background: rgba(255, 255, 255, 0.08);
    color: #D5DEEF;
}

html[data-theme="dark"] .synergy-connector path {
    stroke: #6EA8FF;
    opacity: 0.65;
}

html[data-theme="dark"] .org-root {
    background: rgba(255, 255, 255, .97);
    color: #0D1B34;
}

html[data-theme="dark"] .org-branch {
    background: rgba(255, 255, 255, .07);
}

html[data-theme="dark"] .hub {
    filter: saturate(1.05) brightness(1.05);
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
    background: var(--ps-bg-soft);
    border-color: var(--ps-border);
    color: var(--ps-ink);
}

html[data-theme="dark"] .form-floating > label {
    color: var(--ps-muted);
}

/* Cursor glow — desktop only */
.ps-cursor-glow,
.ps-cursor-spot {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
    will-change: transform, opacity;
    transition: opacity .35s ease, width .25s ease, height .25s ease, background .25s ease;
}

.ps-cursor-glow {
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(31, 95, 214, 0.42) 0%,
        rgba(230, 59, 59, 0.22) 36%,
        rgba(31, 95, 214, 0.08) 55%,
        transparent 72%);
    mix-blend-mode: normal;
    filter: blur(8px);
}

html[data-theme="dark"] .ps-cursor-glow {
    background: radial-gradient(circle,
        rgba(110, 168, 255, 0.45) 0%,
        rgba(255, 120, 120, 0.24) 40%,
        transparent 72%);
    mix-blend-mode: screen;
    filter: blur(1px);
}

.ps-cursor-spot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1F5FD6;
    box-shadow: 0 0 12px rgba(31, 95, 214, 0.75), 0 0 24px rgba(230, 59, 59, 0.35);
    z-index: 9999;
}

html[data-theme="dark"] .ps-cursor-spot {
    background: #8DB8FF;
    box-shadow: 0 0 14px rgba(141, 184, 255, 0.95), 0 0 28px rgba(255, 122, 122, 0.45);
}

.ps-cursor-glow.is-on,
.ps-cursor-spot.is-on {
    opacity: 1;
}

.ps-cursor-glow.is-hot {
    width: 440px;
    height: 440px;
    background: radial-gradient(circle,
        rgba(31, 95, 214, 0.52) 0%,
        rgba(230, 59, 59, 0.28) 40%,
        rgba(31, 95, 214, 0.1) 58%,
        transparent 74%);
}

html[data-theme="dark"] .ps-cursor-glow.is-hot {
    background: radial-gradient(circle,
        rgba(110, 168, 255, 0.5) 0%,
        rgba(255, 120, 120, 0.28) 42%,
        transparent 72%);
}

.ps-cursor-spot.is-hot {
    width: 14px;
    height: 14px;
    background: #E63B3B;
    box-shadow: 0 0 16px rgba(230, 59, 59, 0.9), 0 0 32px rgba(31, 95, 214, 0.45);
}

html[data-theme="dark"] .ps-cursor-spot.is-hot {
    background: #FF8A8A;
}

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
    .ps-cursor-glow,
    .ps-cursor-spot {
        display: none !important;
    }
}

