/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #121212;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #666666;
    --accent: #6366f1;
    --accent-hover: #7c3aed;
    --accent-light: #8b5cf6;
    --border: #1f1f1f;
    --card-bg: #141414;
    --glow: rgba(99, 102, 241, 0.4);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Custom Cursor */
.cursor-glow {
    width: 500px;
    height: 500px;
    position: fixed;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

@media (hover: hover) {
    body {
        cursor: none;
    }

    .cursor-glow {
        opacity: 1;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    gap: 4rem;
}

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

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
    backdrop-filter: blur(10px);
}

.company-name {
    font-size: clamp(3.5rem, 10vw, 7rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
    line-height: 1.1;
}

.company-name .word {
    display: inline-block;
    background: linear-gradient(135deg, #ffffff 0%, #6366f1 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite, fadeInUp 1s ease-out;
}

.company-name .word:nth-child(2) {
    animation-delay: 0.1s;
}

.tagline {
    font-size: clamp(1.15rem, 2.5vw, 1.5rem);
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 850px;
    margin: 0 auto 4rem;
    font-weight: 400;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-stats {
    display: flex;
    gap: 4rem;
    margin-top: 2rem;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* Hero Canvas */
.hero-canvas {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 600px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: 24px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 0 100px rgba(99, 102, 241, 0.15);
    animation: fadeIn 1.2s ease-out 0.7s both;
    transition: all 0.5s ease;
}

.hero-canvas:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 150px rgba(99, 102, 241, 0.25);
    transform: translateY(-6px) scale(1.01);
}

#ambient-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Animated Nodes */
.node {
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 30px var(--glow), 0 0 60px rgba(99, 102, 241, 0.3);
    animation: nodePulse 4s ease-in-out infinite;
}

.node-1 { top: 20%; left: 15%; animation-delay: 0s; }
.node-2 { top: 40%; left: 70%; animation-delay: 0.8s; }
.node-3 { top: 65%; left: 25%; animation-delay: 1.6s; }
.node-4 { top: 75%; left: 80%; animation-delay: 2.4s; }
.node-5 { top: 30%; left: 50%; animation-delay: 3.2s; }

.connection {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.3;
    animation: connectionFlow 6s ease-in-out infinite;
    filter: blur(1px);
}

.connection-1 {
    top: 20%;
    left: 15%;
    width: 250px;
    transform: rotate(25deg);
    animation-delay: 0s;
}

.connection-2 {
    top: 40%;
    left: 25%;
    width: 350px;
    transform: rotate(-15deg);
    animation-delay: 2s;
}

.connection-3 {
    top: 65%;
    left: 35%;
    width: 300px;
    transform: rotate(10deg);
    animation-delay: 4s;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    animation: fadeIn 2s ease-out 2s both;
}

.scroll-arrow {
    width: 24px;
    height: 36px;
    border: 2px solid rgba(99, 102, 241, 0.5);
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    animation: scrollDown 2s ease-in-out infinite;
}

.scroll-indicator:hover .scroll-arrow {
    border-color: var(--accent);
}

@keyframes scrollDown {
    0%, 100% {
        top: 8px;
        opacity: 1;
    }
    50% {
        top: 16px;
        opacity: 0.5;
    }
}

/* Prototypes Section */
.prototypes {
    padding: 10rem 0;
    background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.02) 50%, transparent 100%);
}

.prototypes-content {
    max-width: 1200px;
    margin: 0 auto;
}

.prototypes-title {
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.prototypes-subtitle {
    text-align: center;
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 5rem;
    font-weight: 300;
}

.prototypes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.prototype-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.prototype-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.prototype-card[data-tier="foundation"]::before {
    background: linear-gradient(90deg, #6366f1, #7c3aed);
}

.prototype-card[data-tier="advanced"]::before {
    background: linear-gradient(90deg, #7c3aed, #8b5cf6);
}

.prototype-card[data-tier="meta"]::before {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.prototype-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
    background: rgba(20, 20, 20, 0.9);
}

.prototype-card:hover::before {
    transform: scaleX(1);
}

.prototype-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 1rem;
}

.prototype-card[data-tier="advanced"] .prototype-badge {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.3);
    color: #7c3aed;
}

.prototype-card[data-tier="meta"] .prototype-badge {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    color: #8b5cf6;
}

.prototype-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: grayscale(0.3);
    transition: all 0.3s ease;
}

.prototype-card:hover .prototype-icon {
    filter: grayscale(0);
    transform: scale(1.1) rotate(5deg);
}

.prototype-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

.prototype-card:hover h3 {
    color: var(--accent);
}

.prototype-card p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Why Section */
.why {
    padding: 8rem 0;
    position: relative;
}

.why-content {
    max-width: 1100px;
    margin: 0 auto;
}

.why-title {
    font-size: clamp(4rem, 8vw, 6rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 5rem;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out both;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    animation: fadeIn 1s ease-out 0.3s both;
}

.why-item {
    text-align: center;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(139, 92, 246, 0.03) 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.why-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.why-item:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.15);
}

.why-item:hover::before {
    transform: scaleX(1);
}

.why-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    filter: grayscale(0.3);
    transition: all 0.3s ease;
}

.why-item:hover .why-icon {
    filter: grayscale(0);
    transform: scale(1.1);
}

.why-item h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

.why-item:hover h3 {
    color: var(--accent);
}

.why-item p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Jobs Section */
.jobs {
    padding: 8rem 0 10rem;
}

.jobs h2 {
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out 0.9s both;
}

.job-listings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 5rem;
    animation: fadeIn 1s ease-out 1.1s both;
}

.job-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.job-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.job-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    border-radius: 50%;
    pointer-events: none;
}

.job-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
    background: rgba(20, 20, 20, 0.8);
}

.job-card:hover::before {
    transform: scaleX(1);
}

.job-card:hover::after {
    width: 500px;
    height: 500px;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.job-card h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.job-card:hover h3 {
    color: var(--accent);
}

.job-location {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    font-weight: 500;
}

.job-description {
    color: var(--text-secondary);
    line-height: 1.8;
    flex-grow: 1;
    font-size: 1.05rem;
}

.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.tag {
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.job-card:hover .tag {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 4rem 0;
    margin-top: 4rem;
}

.footer-content {
    text-align: center;
}

.footer-tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-style: italic;
    font-weight: 300;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-links a:hover::after {
    width: 100%;
}

.separator {
    color: var(--border);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes nodePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 30px var(--glow), 0 0 60px rgba(99, 102, 241, 0.3);
    }
    50% {
        transform: scale(1.4);
        opacity: 0.8;
        box-shadow: 0 0 50px var(--glow), 0 0 100px rgba(99, 102, 241, 0.5);
    }
}

@keyframes connectionFlow {
    0%, 100% {
        opacity: 0.2;
        filter: blur(1px);
    }
    50% {
        opacity: 0.6;
        filter: blur(0.5px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        cursor: auto;
    }

    .cursor-glow {
        display: none;
    }

    .hero {
        padding: 3rem 1.5rem;
        min-height: auto;
        gap: 3rem;
    }

    .hero-canvas {
        height: 400px;
        border-radius: 16px;
    }

    .hero-stats {
        gap: 2rem;
        flex-wrap: wrap;
    }

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

    .job-listings {
        grid-template-columns: 1fr;
    }

    .job-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .job-location {
        white-space: normal;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 2rem 1rem;
        gap: 2rem;
    }

    .hero-canvas {
        height: 300px;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
    }

    .jobs {
        padding: 6rem 0 8rem;
    }

    .jobs h2 {
        margin-bottom: 3rem;
    }

    .job-card {
        padding: 2rem;
    }

    .why {
        padding: 4rem 0;
    }
}

/* Accessibility & Performance */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Selection */
::selection {
    background: var(--accent);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}
