/* ============================================================
   PeopleWorks Agent (PWA) — Premium Theme Overrides
   Palette: Indigo Command Center
   ============================================================ */

:root {
    --theme-color: #4F46E5;       /* Indigo 600 — primary */
    --theme-color2: #06B6D4;      /* Cyan 500 — accent */
    --theme-color-dark: #1E1B4B;  /* Indigo 950 — secondary */
    --theme-bg-dark: #0F172A;     /* Slate 900 — bg dark */
    --theme-success: #10B981;     /* Emerald 500 */
    --theme-warning: #F59E0B;     /* Amber 500 */
    --theme-danger: #EF4444;      /* Red 500 */
    --title-color: #1F2937;
    --body-color: #6B7280;
}

html { scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; font-family: 'Urbanist', sans-serif; }

/* ============================================================
   PRELOADER — branded with PWA letters
   ============================================================ */
.preloader-bg-one { background: #4F46E5 !important; }
.preloader-bg-two { background: #1E1B4B !important; }
.loader-letter {
    color: #06B6D4 !important;
    font-family: 'Sora', sans-serif !important;
    font-weight: 900 !important;
}
.loader { border-color: rgba(6,182,212,0.2) !important; border-top-color: #06B6D4 !important; }

/* ============================================================
   STICKY HEADER — fixed, transparent over hero, white on scroll
   ============================================================ */
.th-header {
    position: fixed !important;
    top: 0; left: 0; right: 0;
    z-index: 999;
    transition: all 0.35s ease;
}
.th-header .sticky-wrapper { transition: all 0.35s ease; }
.th-header.scrolled .sticky-wrapper {
    background: rgba(255,255,255,0.98) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.th-header.scrolled .header-top {
    max-height: 0;
    overflow: hidden;
    padding: 0 !important;
    opacity: 0;
    transition: all 0.3s ease;
}
.header-top {
    transition: all 0.3s ease;
    max-height: 60px;
    opacity: 1;
}

/* Nav link colors when scrolled */
.th-header.scrolled .main-menu ul li a { color: #1F2937 !important; }
.th-header.scrolled .main-menu ul li a:hover { color: #4F46E5 !important; }
.th-header.scrolled .main-menu ul li a[style*="color: #06B6D4"] { color: #4F46E5 !important; }

/* Legacy sticky class compat */
.sticky-wrapper.sticky {
    background: rgba(255,255,255,0.98) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.sticky-wrapper.sticky .header-top { display: none !important; }

/* Header top bar text - light on dark */
.header-top,
.header-top .header-links,
.header-top .header-links ul,
.header-top .header-links ul li,
.header-top .header-links ul li a,
.header-top .header-links ul li i,
.header-top .social-links a,
.header-top .social-links .social-title {
    color: rgba(255,255,255,0.75) !important;
}
.header-top .header-links ul li a:hover,
.header-top .social-links a:hover { color: #67E8F9 !important; }

/* ============================================================
   TYPOGRAPHY — Sora for display, Urbanist for body
   ============================================================ */
.sec-title, h1, h2, h3, h4, h5, h6 {
    font-family: 'Sora', sans-serif !important;
    font-weight: 800 !important;
    color: #1F2937;
}
.sec-title {
    font-weight: 900 !important;
    color: #1F2937 !important;
}
.sec-subtitle {
    font-family: 'Sora', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 13px;
    color: #4F46E5 !important;
}

/* White titles inside dark sections */
.pwa-section-dark .sec-title,
.pwa-section-dark h2,
.pwa-section-dark h3,
.pwa-section-dark h4,
.section-dark .sec-title,
.section-dark h2,
.section-dark h3,
.section-dark h4 { color: #FFFFFF !important; }
.pwa-section-dark .sec-subtitle,
.section-dark .sec-subtitle { color: #67E8F9 !important; }
.pwa-section-dark p,
.pwa-section-dark .body-text,
.section-dark p,
.section-dark .body-text { color: rgba(255,255,255,0.75); }

/* ============================================================
   BUTTONS — Primary CTA + Outline
   ============================================================ */
.pwa-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 10px;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.3px;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 2px solid transparent;
    cursor: pointer;
}
.pwa-btn-primary {
    background: linear-gradient(135deg, #4F46E5 0%, #06B6D4 100%);
    color: #FFFFFF;
    box-shadow: 0 8px 24px rgba(79,70,229,0.35);
}
.pwa-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(79,70,229,0.5);
    color: #FFFFFF;
}
.pwa-btn-outline {
    background: transparent;
    color: #FFFFFF;
    border-color: rgba(255,255,255,0.4);
}
.pwa-btn-outline:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.7);
    color: #FFFFFF;
}
.pwa-btn-outline-dark {
    background: transparent;
    color: #4F46E5;
    border-color: #4F46E5;
}
.pwa-btn-outline-dark:hover {
    background: #4F46E5;
    color: #FFFFFF;
}

/* ============================================================
   CARDS — Feature grid, tool grid, pricing
   ============================================================ */
.pwa-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s ease;
    height: 100%;
}
.pwa-card:hover {
    transform: translateY(-4px);
    border-color: #4F46E5;
    box-shadow: 0 20px 40px rgba(79,70,229,0.12);
}
.pwa-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0F2FE 100%);
    color: #4F46E5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 18px;
}
.pwa-card-title {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #1F2937;
    margin-bottom: 10px;
}
.pwa-card-text {
    color: #6B7280;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* Dark cards for use inside dark sections */
.pwa-card-dark {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}
.pwa-card-dark:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(6,182,212,0.5);
    box-shadow: 0 20px 40px rgba(6,182,212,0.15);
}
.pwa-card-dark .pwa-card-icon {
    background: linear-gradient(135deg, rgba(79,70,229,0.2) 0%, rgba(6,182,212,0.2) 100%);
    color: #67E8F9;
}
.pwa-card-dark .pwa-card-title { color: #FFFFFF; }
.pwa-card-dark .pwa-card-text { color: rgba(255,255,255,0.7); }

/* ============================================================
   SECTION SPACING
   ============================================================ */
.pwa-section { padding: 100px 0; }
.pwa-section-dark {
    background: #0F172A;
    color: #FFFFFF;
}
.pwa-section-light {
    background: #F8FAFC;
}

/* ============================================================
   CHIPS / BADGES
   ============================================================ */
.pwa-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(79,70,229,0.1);
    color: #4F46E5;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.pwa-chip-dark {
    background: rgba(6,182,212,0.15);
    color: #67E8F9;
    border: 1px solid rgba(6,182,212,0.3);
}

/* ============================================================
   PRICING CARDS
   ============================================================ */
.pwa-price-card {
    background: #FFFFFF;
    border: 2px solid #E5E7EB;
    border-radius: 20px;
    padding: 40px 32px;
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
}
.pwa-price-card.featured {
    border-color: #4F46E5;
    background: linear-gradient(135deg, #4F46E5 0%, #1E1B4B 100%);
    color: #FFFFFF;
    transform: scale(1.03);
    box-shadow: 0 30px 60px rgba(79,70,229,0.3);
}
.pwa-price-card.featured h3,
.pwa-price-card.featured .pwa-price-amount,
.pwa-price-card.featured li { color: #FFFFFF; }
.pwa-price-card.featured .pwa-price-tag {
    background: #06B6D4;
    color: #0F172A;
}
.pwa-price-card:not(.featured):hover {
    border-color: #4F46E5;
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(79,70,229,0.1);
}
.pwa-price-tag {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 18px;
    border-radius: 999px;
    background: #4F46E5;
    color: #FFFFFF;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.pwa-price-amount {
    font-family: 'Sora', sans-serif;
    font-weight: 900;
    font-size: 48px;
    color: #1F2937;
    line-height: 1;
}
.pwa-price-period { color: #6B7280; font-size: 14px; }
.pwa-price-features { list-style: none; padding: 0; margin: 24px 0; }
.pwa-price-features li {
    padding: 8px 0;
    color: #4B5563;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.pwa-price-features li::before {
    content: "✓";
    color: #10B981;
    font-weight: 900;
    font-size: 16px;
}
.pwa-price-card.featured .pwa-price-features li::before { color: #67E8F9; }
.pwa-price-card.featured .pwa-price-features li { color: rgba(255,255,255,0.9); }

/* ============================================================
   TOOL GRID — compact 4-col grid for the 22 tools
   ============================================================ */
.pwa-tool-tile {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    transition: all 0.25s ease;
}
.pwa-tool-tile:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(6,182,212,0.5);
    transform: translateY(-2px);
}
.pwa-tool-tile i {
    font-size: 26px;
    color: #67E8F9;
    margin-bottom: 10px;
}
.pwa-tool-tile-name {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: #FFFFFF;
    margin: 0;
}

/* ============================================================
   ARCHITECTURE DIAGRAM (4-piece grid)
   ============================================================ */
.pwa-arch-piece {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    height: 100%;
    transition: all 0.3s ease;
}
.pwa-arch-piece:hover {
    border-color: #06B6D4;
    background: rgba(6,182,212,0.05);
    transform: translateY(-3px);
}
.pwa-arch-piece-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #4F46E5 0%, #06B6D4 100%);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}
.pwa-arch-piece h4 {
    color: #FFFFFF !important;
    font-size: 18px;
    margin-bottom: 8px;
}
.pwa-arch-piece p {
    color: rgba(255,255,255,0.65);
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

/* ============================================================
   FOOTER
   ============================================================ */
.pwa-footer {
    background: #0F172A;
    color: rgba(255,255,255,0.65);
    padding: 60px 0 30px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.pwa-footer h5 {
    color: #FFFFFF !important;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}
.pwa-footer a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 14px;
    display: block;
    padding: 4px 0;
}
.pwa-footer a:hover { color: #67E8F9; }
.pwa-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 40px;
    padding-top: 24px;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

/* ============================================================
   UTILITY
   ============================================================ */
.pwa-mt-section { margin-top: 60px; }
.pwa-text-gradient {
    background: linear-gradient(135deg, #4F46E5 0%, #06B6D4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============================================================
   SLIDE PANELS (DPO/SF pattern — right sidebar, on-demand detail)
   ============================================================ */
.pwa-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.7);
    backdrop-filter: blur(4px);
    z-index: 9000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.pwa-overlay.open { opacity: 1; pointer-events: all; }

.pwa-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 640px;
    max-width: 94vw;
    height: 100vh;
    background: #FFFFFF;
    z-index: 9010;
    overflow-y: auto;
    visibility: hidden;
    transform: translateX(110%);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.45s;
    will-change: transform;
}
.pwa-panel.open {
    visibility: visible;
    transform: translateX(0);
    box-shadow: -8px 0 48px rgba(0,0,0,0.25);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0s;
}

.pwa-panel-header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #4F46E5 0%, #1E1B4B 100%);
    color: #FFFFFF;
    padding: 32px 36px 28px;
    z-index: 5;
}
.pwa-panel-header h2 {
    font-family: 'Sora', sans-serif;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
    color: #FFFFFF !important;
}
.pwa-panel-header p {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin: 0;
}
.pwa-panel-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    color: #FFFFFF;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.pwa-panel-close:hover { background: rgba(255,255,255,0.28); }

.pwa-panel-body {
    padding: 36px;
    color: #1F2937;
}
.pwa-panel-body h4 {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 17px;
    color: #1F2937 !important;
    margin: 24px 0 10px;
}
.pwa-panel-body h4:first-child { margin-top: 0; }
.pwa-panel-body p {
    line-height: 1.7;
    color: #4B5563;
    font-size: 15px;
    margin-bottom: 12px;
}
.pwa-panel-body ul { padding-left: 20px; margin-top: 8px; margin-bottom: 16px; }
.pwa-panel-body li {
    margin-bottom: 8px;
    line-height: 1.6;
    color: #4B5563;
    font-size: 14px;
}
.pwa-panel-body code {
    background: #F1F5F9;
    color: #4F46E5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 13px;
}
.pwa-panel-body pre {
    background: #0F172A;
    color: #E2E8F0;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 12px;
    line-height: 1.6;
    margin: 12px 0 20px;
}
.pwa-panel-body pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}
.pwa-panel-callout {
    background: #EEF2FF;
    border-left: 4px solid #4F46E5;
    padding: 14px 18px;
    border-radius: 6px;
    margin: 16px 0;
    font-size: 14px;
    color: #4338CA;
}
.pwa-panel-callout strong { color: #312E81; }

/* Hover state for clickable cards — visual signal that they expand */
.pwa-arch-piece[onclick],
.pwa-card[onclick] { cursor: pointer; position: relative; }
.pwa-arch-piece[onclick]::after,
.pwa-card[onclick]::after {
    content: "↗";
    position: absolute;
    top: 14px;
    right: 16px;
    color: rgba(255,255,255,0.25);
    font-size: 14px;
    transition: all 0.25s ease;
}
.pwa-card[onclick]:not(.pwa-card-dark)::after { color: #C7D2FE; }
.pwa-arch-piece[onclick]:hover::after,
.pwa-card[onclick]:hover::after {
    color: #06B6D4;
    transform: translate(2px, -2px);
}

/* Responsive */
@media (max-width: 768px) {
    .pwa-section { padding: 60px 0; }
    .pwa-price-card.featured { transform: none; }
    .pwa-price-amount { font-size: 38px; }
    .pwa-panel { width: 100%; max-width: 100vw; }
    .pwa-panel-body { padding: 28px 22px; }
}
