/* Origin Story Component Styles */

.origin-story {
    position: relative;
    margin: 6rem 0;
    overflow: hidden;
}

.story-container {
    display: flex;
    flex-direction: row;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* 3D Scene Styling */
.origin-3d-scene {
    position: relative;
    width: 400px;
    height: 400px;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.floating-cube {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(64, 224, 208, 0.2);
    border: 1px solid rgba(64, 224, 208, 0.5);
    box-shadow: 0 0 15px rgba(64, 224, 208, 0.5);
    transform-style: preserve-3d;
    animation: floatCube 8s infinite ease-in-out;
    top: 50px;
    left: 50px;
}

.floating-cube:before, .floating-cube:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(64, 224, 208, 0.5);
}

.floating-cube:before {
    transform: rotateY(90deg);
    transform-origin: right;
}

.floating-cube:after {
    transform: rotateX(90deg);
    transform-origin: bottom;
}

@keyframes floatCube {
    0%, 100% { transform: translateY(0) rotateY(0) rotateX(0); }
    25% { transform: translateY(-20px) rotateY(90deg) rotateX(45deg); }
    50% { transform: translateY(10px) rotateY(180deg) rotateX(90deg); }
    75% { transform: translateY(-15px) rotateY(270deg) rotateX(45deg); }
}

.origin-hologram {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
}

.hologram-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(64, 224, 208, 0.5);
    box-shadow: 0 0 20px rgba(64, 224, 208, 0.5);
    animation: rotateRing 10s linear infinite;
}

@keyframes rotateRing {
    0% { transform: rotateZ(0); }
    100% { transform: rotateZ(360deg); }
}

.hologram-content {
    position: absolute;
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 0 30px rgba(64, 224, 208, 0.3);
}

.hologram-base {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 20px;
    background: linear-gradient(to right, #1a1a1a, #333, #1a1a1a);
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.base-light {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 10px;
    background: rgba(64, 224, 208, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(64, 224, 208, 0.8);
    animation: pulseLight 2s infinite alternate;
}

@keyframes pulseLight {
    0% { opacity: 0.5; box-shadow: 0 0 5px rgba(64, 224, 208, 0.5); }
    100% { opacity: 1; box-shadow: 0 0 20px rgba(64, 224, 208, 0.8); }
}

.timeline-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeline-dot.active {
    background: rgba(64, 224, 208, 0.8);
    box-shadow: 0 0 10px rgba(64, 224, 208, 0.8);
    transform: scale(1.2);
}

/* Story Content Styling */
.story-content {
    flex: 1;
    position: relative;
}

.story-header {
    margin-bottom: 2rem;
}

.story-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(64, 224, 208, 0.2), rgba(72, 61, 139, 0.2));
    border: 1px solid rgba(64, 224, 208, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: rgba(64, 224, 208, 0.8);
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.story-badge:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.glitch-text {
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
    color: #fff;
    text-shadow: 0 0 5px rgba(64, 224, 208, 0.5);
    margin: 0;
}

.glitch-text:before, .glitch-text:after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch-text:before {
    color: #ff00ff;
    z-index: -1;
    animation: glitch-animation 0.4s infinite;
}

.glitch-text:after {
    color: #00ffff;
    z-index: -2;
    animation: glitch-animation 0.3s infinite reverse;
}

@keyframes glitch-animation {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

.story-intro {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.founder-quote {
    background: rgba(0, 0, 0, 0.2);
    border-left: 4px solid rgba(64, 224, 208, 0.8);
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.quote-icon {
    position: absolute;
    top: -15px;
    left: -15px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #40e0d0, #483d8b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(64, 224, 208, 0.5);
}

.quote-icon i {
    color: #fff;
    font-size: 1.2rem;
}

.founder-quote p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #fff;
    margin: 0 0 1.5rem 0;
    font-style: italic;
}

.quote-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(64, 224, 208, 0.8);
    animation: pulseAvatar 2s infinite alternate;
}

@keyframes pulseAvatar {
    0% { box-shadow: 0 0 5px rgba(64, 224, 208, 0.5); }
    100% { box-shadow: 0 0 15px rgba(64, 224, 208, 0.8); }
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

.author-title {
    color: rgba(64, 224, 208, 0.8);
    font-size: 0.9rem;
}

.story-paragraphs {
    margin: 2rem 0;
}

.story-paragraphs p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

.highlight-year {
    display: inline-block;
    background: linear-gradient(135deg, #40e0d0, #483d8b);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 0 10px rgba(64, 224, 208, 0.5);
}

.highlight-text {
    color: #40e0d0;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(64, 224, 208, 0.5);
    position: relative;
}

.highlight-text:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #40e0d0, transparent);
}

.story-highlight {
    margin: 3rem 0;
}

.highlight-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(64, 224, 208, 0.3);
    position: relative;
    overflow: hidden;
}

.highlight-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(64, 224, 208, 0.1), transparent);
    z-index: -1;
}

.highlight-icon {
    position: relative;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #40e0d0, #483d8b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(64, 224, 208, 0.5);
}

.highlight-icon i {
    color: #fff;
    font-size: 1.5rem;
}

.icon-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: particlesPulse 2s infinite;
}

@keyframes particlesPulse {
    0% { box-shadow: 0 0 0 0 rgba(64, 224, 208, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(64, 224, 208, 0); }
    100% { box-shadow: 0 0 0 0 rgba(64, 224, 208, 0); }
}

.highlight-content {
    flex: 1;
}

.highlight-content h4 {
    margin: 0 0 0.5rem 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
}

.typing-container {
    position: relative;
    height: 30px;
    overflow: hidden;
}

.typing-text {
    display: inline-block;
    color: #40e0d0;
    font-size: 1.3rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    border-right: 3px solid #40e0d0;
    animation: typing 4s steps(40) 1s infinite, blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    0%, 100% { width: 0 }
    50%, 90% { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #40e0d0 }
}

.story-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
}

.stat-item {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.stat-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    fill: none;
    transform: rotate(-90deg);
    z-index: -1;
}

.stat-circle-bg {
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 2;
}

.stat-circle-fill {
    stroke: url(#gradient);
    stroke-width: 3;
    stroke-linecap: round;
    animation: fillCircle 2s ease-out forwards;
}

@keyframes fillCircle {
    0% { stroke-dasharray: "0, 100"; }
}

/* Responsive Design */
@media (max-width: 992px) {
    .story-container {
        flex-direction: column;
    }
    
    .origin-3d-scene {
        width: 300px;
        height: 300px;
        margin: 0 auto 3rem;
    }
    
    .glitch-text {
        font-size: 2rem;
    }
    
    .story-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 2rem;
    }
}

@media (max-width: 576px) {
    .origin-3d-scene {
        width: 250px;
        height: 250px;
    }
    
    .glitch-text {
        font-size: 1.8rem;
    }
    
    .founder-quote p {
        font-size: 1rem;
    }
    
    .story-paragraphs p {
        font-size: 1rem;
    }
    
    .typing-text {
        font-size: 1.1rem;
    }
    
    .highlight-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1rem;
    }
    
    .stat-item {
        width: 100px;
        height: 100px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
}

/* SVG Gradient for stat circles */
.origin-story svg {
    width: 100%;
    height: 100%;
}

.origin-story svg defs {
    position: absolute;
}