/* Custom CSS for Pai Labs Website */

:root {
    /* High Contrast Colors */
    --primary-red: #FF4444;
    --primary-blue: #4444FF;
    --primary-black: #000000;
    --primary-white: #FFFFFF;
    --light-gray: #F8F9FA;
    --dark-gray: #212529;
    --accent-gray: #6C757D;

    /* Typography */
    --font-primary: 'Space Grotesk', sans-serif;
    --font-secondary: 'Inter', sans-serif;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-secondary);
    line-height: 1.6;
    color: var(--primary-black);
    background-color: var(--primary-white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
    font-weight: 600;
}

/* Navbar Styles */
.navbar {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--primary-white) !important;
}

.navbar-logo {
    height: 50px;
    width: auto;
}

.navbar-nav .nav-link {
    color: var(--primary-white) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

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

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--dark-gray) 100%);
    color: var(--primary-white);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .lead {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-blue));
    border: none;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 68, 68, 0.3);
}

.btn-outline-light {
    border: 2px solid var(--primary-white);
    color: var(--primary-white);
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-outline-light:hover {
    background: var(--primary-white);
    color: var(--primary-black);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
}

/* Neural Network Animation */
.hero-neural-network {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-neural-network .node {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    opacity: 0;
    z-index: 2;
    cursor: pointer;
    transition: all 0.3s ease;

    /* Start from center for explosion effect */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);

    /* Explosion animation first, then floating */
    animation:
        nodeExplosion 2s ease-out var(--delay) forwards,
        nodeFloat 8s infinite ease-in-out calc(var(--delay) + 2s);
}

/* Color-based styling */
.node[data-color="red"] {
    background: var(--primary-red);
    box-shadow: 0 0 25px rgba(255, 68, 68, 0.8);
}

.node[data-color="blue"] {
    background: var(--primary-blue);
    box-shadow: 0 0 25px rgba(68, 68, 255, 0.8);
}

.node:hover {
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 0 40px currentColor;
}

/* Synapse layer for SVG connections */
.synapse-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.synapse-line {
    stroke-width: 2;
    stroke: url(#synapseGradient);
    opacity: 0;
    animation: synapseAppear 1s ease-in-out forwards;
    filter: drop-shadow(0 0 8px rgba(255, 68, 68, 0.6));
}

/* Explosion animation - nodes explode from center to final positions */
@keyframes nodeExplosion {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
    }

    30% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.4) rotate(180deg);
    }

    100% {
        opacity: 1;
        transform: translate(var(--final-x), var(--final-y)) scale(1) rotate(360deg);
    }
}

/* Floating animation - gentle movement after explosion */
@keyframes nodeFloat {

    0%,
    100% {
        transform: translate(var(--final-x), var(--final-y)) scale(1);
    }

    25% {
        transform: translate(calc(var(--final-x) + 10px), calc(var(--final-y) - 15px)) scale(1.1);
    }

    50% {
        transform: translate(calc(var(--final-x) - 8px), calc(var(--final-y) + 12px)) scale(1.05);
    }

    75% {
        transform: translate(calc(var(--final-x) + 15px), calc(var(--final-y) + 8px)) scale(1.1);
    }
}

/* Synapse line appearance animation */
@keyframes synapseAppear {
    0% {
        opacity: 0;
        stroke-dasharray: 100;
        stroke-dashoffset: 100;
    }

    100% {
        opacity: 0.7;
        stroke-dasharray: 100;
        stroke-dashoffset: 0;
    }
}

/* Synapse pulsing effect */
@keyframes synapsePulse {

    0%,
    100% {
        opacity: 0.4;
        stroke-width: 1.5;
    }

    50% {
        opacity: 0.8;
        stroke-width: 2.5;
    }
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-padding {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 1rem;
}

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

.section-subtitle {
    font-size: 1.2rem;
    color: var(--dark-gray);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.section-subtitle.text-light {
    color: rgba(255, 255, 255, 0.85) !important;
}

.text-white {
    color: var(--primary-white) !important;
}

.text-light {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* About Section */
.about-section {
    background: var(--primary-white);
}

.about-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark-gray);
}

.about-content p {
    margin-bottom: 1.5rem;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.about-image:hover img {
    transform: scale(1.02);
}

/* Values Section */
.bg-dark {
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--dark-gray) 100%);
}

.value-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 68, 68, 0.3);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    height: 100%;
}

.value-card:hover {
    transform: translateY(-15px);
    border-color: var(--primary-red);
    box-shadow: 0 20px 60px rgba(255, 68, 68, 0.4);
    background: rgba(255, 68, 68, 0.1);
}

.value-icon {
    font-size: 4rem;
    color: var(--primary-red);
    margin-bottom: 2rem;
}

.value-card:hover .value-icon {
    transform: scale(1.1);
    color: var(--primary-white);
}

.value-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-white);
    font-weight: 700;
}

.value-card p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Services Section */
.service-card {
    background: var(--primary-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.service-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-content {
    padding: 2.5rem;
}

.service-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-black);
    font-weight: 700;
}

.service-content p {
    color: var(--dark-gray);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.service-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-content ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--dark-gray);
}

.service-content ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-red);
    font-weight: bold;
}

/* Stats Grid in About Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
    padding: 2rem 1rem;
    border: 2px solid var(--primary-red);
    border-radius: 15px;
    background: rgba(255, 68, 68, 0.05);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(255, 68, 68, 0.2);
    border-color: var(--primary-blue);
    background: rgba(68, 68, 255, 0.05);
}

.stat-item h3 {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary-red);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-item:hover h3 {
    color: var(--primary-blue);
}

.stat-item p {
    font-size: 1.1rem;
    color: var(--dark-gray);
    font-weight: 600;
    margin: 0;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Contact Section */
.bg-primary {
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--dark-gray) 100%);
}

.contact-form-container {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 68, 68, 0.3);
    border-radius: 20px;
    padding: 3rem;
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--primary-white);
    margin-bottom: 0.8rem;
    font-size: 1rem;
    display: block;
}

.form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem;
    font-size: 1rem;
    color: var(--primary-white);
    transition: all 0.3s ease;
    width: 100%;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.2);
    color: var(--primary-white);
    outline: none;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.contact-info {
    padding: 2rem;
}

.contact-icon {
    font-size: 3rem;
    color: var(--primary-red);
    margin-bottom: 1rem;
}

.contact-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.contact-link:hover {
    color: var(--primary-red);
    border-bottom-color: var(--primary-red);
}

/* Footer */
.footer {
    background: var(--primary-black);
    color: var(--primary-white);
    padding: 3rem 0 2rem;
}

.footer-logo {
    height: 50px;
    width: auto;
    margin-bottom: 1rem;
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    color: var(--primary-white);
    font-size: 1.5rem;
    margin-right: 1rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-red);
    transform: translateY(-3px);
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Button */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border: 2px solid var(--primary-white);
    border-top: none;
    border-right: none;
    transform: rotate(-45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) rotate(-45deg);
    }

    40% {
        transform: translateY(-10px) rotate(-45deg);
    }

    60% {
        transform: translateY(-5px) rotate(-45deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .lead {
        font-size: 1.1rem;
    }

    .section-header h2 {
        font-size: 2.2rem;
    }

    .value-card,
    .service-card {
        padding: 2rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }

    .btn-primary,
    .btn-outline-light {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .value-card,
    .service-card {
        padding: 1.5rem;
    }

    .section-header h2,
    .section-title {
        font-size: 1.8rem;
    }

    .stat-item h3 {
        font-size: 2.5rem;
    }
}

/* Utility Classes */
.g-4 {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

.text-center {
    text-align: center !important;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

.rounded {
    border-radius: 0.375rem !important;
}

.justify-content-center {
    justify-content: center !important;
}