/* ===== Aimdal - Insights Page Styles ===== */

.insights-page {
    background-color: var(--color-bg-primary);
}

.insights-hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 100px;
}

.tutorial-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.tutorial-chapter {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--space-4xl) 0;
}

.chapter-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
    width: 100%;
}

.chapter-reverse .chapter-content {
    grid-template-columns: 1fr 1fr;
    direction: ltr;
}

.chapter-reverse .chapter-info {
    order: 2;
}

.chapter-reverse .chapter-visual {
    order: 1;
}

.chapter-number {
    display: block;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-accent-purple);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
}

.chapter-info h2 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
}

.chapter-info p {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

.insight-box {
    background: var(--color-bg-card);
    border-left: 4px solid var(--color-accent-purple);
    padding: var(--space-lg);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    margin-top: var(--space-2xl);
}

.insight-box strong {
    display: block;
    font-size: 0.8rem;
    color: var(--color-accent-purple);
    text-transform: uppercase;
    margin-bottom: var(--space-xs);
}

.insight-box p {
    font-size: 0.95rem;
    margin-bottom: 0;
    font-style: italic;
}

.visual-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-2xl);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

/* Visual: Context Rings */
.context-rings {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ring {
    position: absolute;
    border: 1px solid rgba(109, 40, 217, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rotate 10s linear infinite;
}

.ring span {
    position: absolute;
    top: -10px;
    background: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    border: 1px solid var(--color-border-subtle);
}

.ring-1 { width: 100%; height: 100%; animation-duration: 20s; }
.ring-2 { width: 75%; height: 75%; animation-duration: 15s; animation-direction: reverse; }
.ring-3 { width: 50%; height: 50%; animation-duration: 10s; }

.center-core {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    box-shadow: 0 0 30px rgba(109, 40, 217, 0.4);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Visual: AI Brain */
.ai-brain-container {
    position: relative;
    width: 200px;
    height: 200px;
}

.brain-node {
    position: absolute;
    width: 15px;
    height: 15px;
    background: var(--color-accent-purple);
    border-radius: 50%;
    animation: nodePulse 2s infinite ease-in-out;
}

.brain-node:nth-child(1) { top: 10%; left: 45%; }
.brain-node:nth-child(2) { top: 40%; left: 10%; animation-delay: 0.4s; }
.brain-node:nth-child(3) { top: 40%; left: 80%; animation-delay: 0.8s; }
.brain-node:nth-child(4) { top: 80%; left: 25%; animation-delay: 1.2s; }
.brain-node:nth-child(5) { top: 80%; left: 65%; animation-delay: 1.6s; }

.brain-connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: rgba(109, 40, 217, 0.2);
}

@keyframes nodePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(109, 40, 217, 0); }
    50% { transform: scale(1.5); box-shadow: 0 0 20px rgba(109, 40, 217, 0.5); }
}

/* Feature Pills */
.feature-pills {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-top: var(--space-lg);
}

.pill {
    background: var(--palette-primary-subtle);
    color: var(--color-accent-purple);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Sound Waves */
.sound-waves-container {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sound-ring {
    position: absolute;
    border: 2px solid var(--color-accent-purple);
    border-radius: 50%;
    animation: soundRing 2s infinite ease-out;
}

.sound-ring:nth-child(2) { animation-delay: 0.6s; }
.sound-ring:nth-child(3) { animation-delay: 1.2s; }

@keyframes soundRing {
    0% { width: 40px; height: 40px; opacity: 1; border-width: 4px; }
    100% { width: 250px; height: 250px; opacity: 0; border-width: 1px; }
}

.sound-icon {
    font-size: 3rem;
    z-index: 2;
}

.audio-demo {
    background: var(--color-bg-secondary);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.demo-label {
    font-size: 0.8rem;
    color: var(--color-text-tertiary);
    text-align: center;
}

/* Time Cube */
.time-cube {
    width: 150px;
    height: 150px;
    position: relative;
    transform-style: preserve-3d;
    animation: cubeRotate 20s infinite linear;
}

.cube-face {
    position: absolute;
    width: 150px;
    height: 150px;
    border: 2px solid var(--color-accent-purple);
    background: rgba(109, 40, 217, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-accent-purple);
    backface-visibility: visible;
}

.front  { transform: translateZ(75px); }
.back   { transform: rotateY(180deg) translateZ(75px); }
.right  { transform: rotateY(90deg) translateZ(75px); }
.left   { transform: rotateY(-90deg) translateZ(75px); }
.top    { transform: rotateX(90deg) translateZ(75px); }
.bottom { transform: rotateX(-90deg) translateZ(75px); }

@keyframes cubeRotate {
    from { transform: rotateX(0deg) rotateY(0deg); }
    to { transform: rotateX(360deg) rotateY(360deg); }
}

/* Timeline */
.timeline-visual {
    position: relative;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-2xl);
    padding: 0 var(--space-xl);
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-border-default);
    transform: translateY(-50%);
    z-index: 1;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    background: white;
    border: 2px solid var(--color-border-default);
    border-radius: 50%;
    position: relative;
    z-index: 2;
    cursor: pointer;
    transition: var(--transition-base);
}

.timeline-dot::after {
    content: attr(data-year);
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    white-space: nowrap;
}

.timeline-dot.active {
    background: var(--color-accent-purple);
    border-color: var(--color-accent-purple);
    transform: scale(1.4);
}

.timeline-dot.active::after {
    color: var(--color-accent-purple);
    font-weight: 700;
}

/* Insights Summary */
.insights-summary {
    padding: var(--space-4xl) 0;
    text-align: center;
}

.summary-card {
    background: var(--color-bg-secondary);
    padding: var(--space-4xl);
    border-radius: var(--radius-2xl);
    max-width: 800px;
    margin: 0 auto;
}

.summary-card h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: var(--space-lg);
}

.summary-card p {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2xl);
}

/* Footer override for insights page */
.insights-page .footer {
    padding: var(--space-2xl) 0;
}

.insights-page .footer-links {
    display: flex;
    gap: var(--space-xl);
    justify-content: center;
}

/* Chapter 5 & 6 Visuals */
.pulse-visual-demo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: white;
    padding: var(--space-md);
    border-radius: var(--radius-lg);
}

.pulse-dot {
    width: 12px;
    height: 12px;
    background: #22C55E;
    border-radius: 50%;
    animation: pbr-pulse 2s infinite;
}

.social-circles {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle {
    position: absolute;
    border: 1px solid var(--color-accent-purple);
    border-radius: 50%;
}

.circle-1 { width: 100%; height: 100%; opacity: 0.1; }
.circle-2 { width: 70%; height: 70%; opacity: 0.2; }
.circle-3 { width: 40%; height: 40%; opacity: 0.3; }

.avatar-group {
    display: flex;
    gap: -10px;
    z-index: 2;
}

.avatar {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid var(--color-accent-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-card);
    margin-right: -10px;
}

.global-map-visual {
    position: relative;
    width: 250px;
    height: 150px;
    background: rgba(109, 40, 217, 0.05);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.data-point {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-accent-purple);
    border-radius: 50%;
    animation: pbr-pulse 3s infinite;
}

.data-point:nth-child(2) { top: 20%; left: 30%; animation-delay: 0.5s; }
.data-point:nth-child(3) { top: 60%; left: 70%; animation-delay: 1s; }
.data-point:nth-child(4) { top: 40%; left: 50%; animation-delay: 1.5s; }
.data-point:nth-child(5) { top: 80%; left: 20%; animation-delay: 2s; }

.stat-pills {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.stat-pill {
    background: white;
    border: 1px solid var(--color-border-subtle);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    text-align: center;
    flex: 1;
}

.stat-val {
    display: block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent-purple);
}

.stat-lab {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
}

/* Tutorial Progress Indicator */
.tutorial-progress {
    position: fixed;
    bottom: var(--space-2xl);
    right: var(--space-2xl);
    width: 250px;
    background: white;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-full);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.progress-track {
    height: 4px;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-xs);
    overflow: hidden;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.progress-step-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--color-text-tertiary);
}

/* Responsive */
@media (max-width: 1024px) {
    .chapter-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
    
    .chapter-reverse .chapter-info {
        order: 1;
    }
    
    .chapter-reverse .chapter-visual {
        order: 2;
    }
    
    .tutorial-chapter {
        min-height: auto;
    }
    
    .visual-card {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .insights-hero .hero-title {
        font-size: 3rem;
    }
    
    .chapter-info h2 {
        font-size: 2.5rem;
    }
    
    .insights-summary .summary-card {
        padding: var(--space-2xl);
    }
}
