/* =================================================================
   PWA DEVELOPMENT PAGE STYLES
   ================================================================= */

/* ----------------------------------
   HERO SECTION
   ---------------------------------- */
.pwa-hero {
    position: relative;
    padding: 180px 0 120px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.pwa-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.mobile-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px; /* Smaller grid for mobile feel */
    mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
    opacity: 0.3;
}

.app-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 70%);
    filter: blur(100px);
    opacity: 0.5;
}

.pwa-hero__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.pwa-hero__content {
    text-align: left;
    max-width: 600px;
}

.pwa-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    margin-bottom: 40px;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    backdrop-filter: blur(10px);
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    animation: pulse 2s infinite;
}

.pwa-hero__content .title {
    font-family: var(--font-heading);
    font-size: clamp(3.5rem, 10vw, 6.5rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 30px;
    letter-spacing: -0.03em;
}

.pwa-hero__content .subtitle {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    max-width: 650px;
    margin: 0 0 40px;
    line-height: 1.6;
}

.pwa-hero__actions {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
}

/* Hero Visual (Phone Mockup) */
.pwa-hero__visual {
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.phone-mockup {
    width: 300px;
    height: 600px;
    background: #050816;
    border: 8px solid #1a1a1a;
    border-radius: 40px;
    position: relative;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    overflow: hidden;
    transform: rotateY(-10deg) rotateX(5deg);
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #0a0f2e;
    position: relative;
    display: flex;
    flex-direction: column;
}

.app-header { height: 60px; background: rgba(255,255,255,0.05); display: flex; align-items: center; padding: 0 20px; gap: 15px; }
.menu-icon { width: 20px; height: 2px; background: #fff; box-shadow: 0 6px 0 #fff, 0 -6px 0 #fff; }
.logo-placeholder { width: 80px; height: 10px; background: rgba(255,255,255,0.2); border-radius: 10px; }

.app-body { padding: 20px; flex-grow: 1; }
.skeleton-hero { width: 100%; height: 150px; background: rgba(255,255,255,0.05); border-radius: 12px; margin-bottom: 20px; }
.skeleton-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.skeleton-grid span { height: 80px; background: rgba(255,255,255,0.05); border-radius: 8px; }

.install-prompt {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    background: #fff;
    color: #000;
    padding: 20px;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.3);
}

.prompt-icon { font-size: 1.5rem; color: var(--color-primary); }
.prompt-text { flex-grow: 1; display: flex; flex-direction: column; }
.prompt-text strong { font-size: 0.9rem; }
.prompt-text small { font-size: 0.7rem; color: #666; }
.install-btn { background: var(--color-primary); color: #fff; border: none; padding: 8px 16px; border-radius: 6px; font-weight: 600; cursor: pointer; }

.app-icon {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0); width: 60px; height: 60px; background: var(--color-primary); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #fff; box-shadow: 0 10px 20px rgba(0,0,0,0.3); opacity: 0;
}

/* Button Styles */
.btn-primary {
    display: inline-block;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    padding: 16px 36px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 10px 30px rgba(138, 66, 255, 0.3);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(138, 66, 255, 0.5);
    color: #fff;
}

.btn-outline {
    display: inline-block;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 16px 36px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-outline:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
    transform: translateY(-3px);
}

/* ----------------------------------
   PROBLEM SECTION
   ---------------------------------- */
.pwa-problem {
    padding: 120px 0;
    background: var(--color-bg);
    position: relative;
}

.pwa-problem__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.section-tag {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-primary-light);
    margin-bottom: 20px;
    font-weight: 600;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.1;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 600px;
}

.problem-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.problem-list li {
    display: flex;
    gap: 20px;
}

.problem-list i {
    font-size: 1.5rem;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.problem-list strong {
    display: block;
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 5px;
}

.problem-list p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Problem Visuals */
.app-store-friction {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.store-card {
    width: 280px;
    height: 380px;
    background: #0a0f2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.store-icon {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 20px;
}

.store-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.store-card p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* ----------------------------------
   ARCHITECTURE SECTION
   ---------------------------------- */
.pwa-architecture {
    padding: 120px 0;
    background: #02040a;
}

.pwa-architecture__header {
    text-align: center;
    margin-bottom: 80px;
}

.sw-diagram {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    position: relative;
}

.sw-node {
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 2;
}

.sw-node i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--color-primary-light);
}

.sw-node span {
    font-size: 0.9rem;
    font-weight: 600;
}

.sw-connector {
    flex-grow: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    max-width: 100px;
}

.sw-node.center {
    width: 180px; height: 180px;
    border-color: var(--color-primary);
    box-shadow: 0 0 30px rgba(138, 66, 255, 0.2);
}

.sw-connector::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    width: 10px;
    height: 10px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: dataFlow 2s linear infinite;
}

@keyframes dataFlow {
    0% { left: 0; opacity: 0; }
    50% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

/* ----------------------------------
   FEATURES SECTION
   ---------------------------------- */
.pwa-features {
    padding: 120px 0;
    background: var(--color-bg);
}

.pwa-features__header {
    text-align: center;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--color-primary);
    transform: translateY(-5px);
}

.feature-card .card-icon {
    font-size: 2.5rem;
    color: var(--color-primary-light);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* ----------------------------------
   FAQ & CTA
   ---------------------------------- */
.pwa-faq {
    padding: 100px 0;
    background: var(--color-bg);
}

.ui-faq__grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 80px; align-items: start; }
.ui-faq__list { display: flex; flex-direction: column; gap: 20px; }
.ui-section-header h2 { font-family: var(--font-heading); font-size: 2.5rem; margin-bottom: 40px; }
.faq-item { border-bottom: 1px solid rgba(255, 255, 255, 0.1); margin-bottom: 20px; }
.faq-trigger { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 20px 0; background: transparent; border: none; color: var(--color-text); font-size: 1.1rem; font-weight: 600; cursor: pointer; text-align: left; }
.faq-trigger i { transition: transform 0.3s ease; color: var(--color-text-muted); }
.faq-item.active .faq-trigger i { transform: rotate(45deg); color: var(--color-primary); }
.faq-content { height: 0; overflow: hidden; transition: height 0.4s ease; }
.faq-content p { padding-bottom: 20px; color: var(--color-text-muted); line-height: 1.6; }

.pwa-cta-box {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 32px;
    padding: 80px;
    text-align: center;
    position: sticky;
    top: 120px;
}

.pwa-cta-box h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 20px;
}

.pwa-cta-box p {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-bottom: 40px;
}

/* ----------------------------------
   RESPONSIVE
   ---------------------------------- */
@media (max-width: 1024px) {
    .pwa-hero__layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .pwa-hero__content {
        text-align: center;
        margin: 0 auto;
    }
    .pwa-hero__actions { justify-content: center; }

    .pwa-problem__grid {
        grid-template-columns: 1fr;
    }
    
    .sw-diagram {
        flex-direction: column;
        gap: 20px;
    }
    
    .sw-connector {
        width: 2px;
        height: 50px;
        max-width: none;
    }
    
    .sw-connector::after {
        top: 0;
        left: -4px;
        animation: dataFlowVertical 2s linear infinite;
    }
    
    @keyframes dataFlowVertical {
        0% { top: 0; opacity: 0; }
        50% { opacity: 1; }
        100% { top: 100%; opacity: 0; }
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }

    .ui-faq__grid { grid-template-columns: 1fr; gap: 60px; }
    .pwa-cta-box { position: relative; top: 0; }
    .pwa-hero__visual { display: none; } /* Hide complex visual on mobile */
}

@media (max-width: 768px) {
    .pwa-hero {
        padding: 100px 0 60px;
        min-height: auto;
    }

    .pwa-hero__content .title {
        font-size: 2.5rem;
        word-wrap: break-word;
    }

    .pwa-problem, .pwa-architecture, .pwa-features, .pwa-faq {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .app-store-friction {
        height: auto;
        margin-top: 40px;
    }
}