/* Zerobearing Website Styles */

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

:root {
    --primary: #0a0a0a;
    --accent: #00d4ff;
    --accent-dark: #0099ff;
    --rails-red: #cc0000;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --bg-card: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.1);
}

html {
    scroll-behavior: smooth;
}

/* Performance optimizations */
img,
video {
    height: auto;
    max-width: 100%;
}

/* Optimize font loading for system fonts */
* {
    font-display: swap;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.02) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a0a 0%, #0d0d1a 50%, #0a0a0a 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* 404 Page body layout override */
body.error-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Starfield Background - Optimized for performance */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    will-change: transform;
    background-image:
        radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.15), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 160px 30px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 200px 90px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 240px 50px, rgba(255, 255, 255, 0.15), transparent),
        radial-gradient(1px 1px at 280px 10px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 320px 70px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 360px 40px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(2px 2px at 80px 120px, rgba(0, 212, 255, 0.3), transparent),
        radial-gradient(2px 2px at 300px 150px, rgba(0, 212, 255, 0.2), transparent),
        radial-gradient(1px 1px at 180px 180px, rgba(255, 255, 255, 0.15), transparent),
        radial-gradient(1px 1px at 420px 20px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 480px 100px, rgba(255, 255, 255, 0.2), transparent);
    background-repeat: repeat;
    background-size: 500px 200px;
    animation: stars 60s linear infinite;
}

@keyframes stars {
    from {
        transform: translateY(0px);
    }

    to {
        transform: translateY(-200px);
    }
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    transition: all 0.3s ease;
}

nav.scrolled {
    padding: 15px 0;
    background: rgba(10, 10, 10, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 200;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-mark {
    width: 30px;
    height: 30px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    position: relative;
    display: inline-block;
}

.logo-mark::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, var(--rails-red), var(--accent));
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
    position: relative;
}

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

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.05) 0%, transparent 70%);
}

.hero-content {
    max-width: 1200px;
    padding: 0 40px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-badges {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 30px;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    animation: fadeInUp 0.8s ease;
}

.hero-badge.rails {
    background: rgba(204, 0, 0, 0.1);
    border-color: rgba(204, 0, 0, 0.3);
    color: var(--rails-red);
}

h1 {
    font-size: clamp(48px, 8vw, 96px);
    font-weight: 100;
    line-height: 1.1;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.gradient-text {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 50%, var(--rails-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(18px, 2.5vw, 24px);
    color: var(--text-secondary);
    font-weight: 200;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.5;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.btn {
    padding: 14px 32px;
    font-size: 14px;
    letter-spacing: 0.05em;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--primary);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 212, 255, 0.05);
}

/* Products Showcase Section */
.products {
    padding: 120px 0;
    background: linear-gradient(180deg, transparent 0%, rgba(204, 0, 0, 0.02) 50%, transparent 100%);
}

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

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

h2 {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 200;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.product-card {
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--rails-red), var(--accent));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 212, 255, 0.3);
}

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

.product-status {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 20px;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #00ff00;
    margin-bottom: 15px;
}

.product-status.development {
    background: rgba(255, 102, 102, 0.15);
    border-color: rgba(255, 102, 102, 0.35);
    color: #ff6666;
}

.product-status.ideation {
    background: rgba(255, 223, 70, 0.15);
    border-color: rgba(255, 223, 70, 0.4);
    color: #ffd700;
}

.product-card h3 {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 15px;
    letter-spacing: -0.01em;
}

.product-link {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.03em;
    margin-bottom: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.product-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), var(--accent-dark));
    transition: width 0.3s ease;
}

.product-link:hover {
    color: var(--text-primary);
    transform: translateX(4px);
}

.product-link:hover::before {
    width: 100%;
}

.product-link:focus {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

.product-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.tech-stack {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tech-tag {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 15px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Services Section */
.services {
    padding: 120px 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 212, 255, 0.02) 50%, transparent 100%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    padding: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 212, 255, 0.3);
}

.service-card:hover::before {
    transform: translateX(0);
}

.service-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 20px;
    position: relative;
}

.icon-circle {
    width: 50px;
    height: 50px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
}

.service-card h3 {
    font-size: 20px;
    font-weight: 300;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 14px;
}

/* Technology Stack Section */
.technology {
    padding: 120px 0;
    position: relative;
}

.tech-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.tech-content h2 {
    text-align: left;
    margin-bottom: 30px;
}

.tech-content p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 18px;
    line-height: 1.8;
}

.tech-stacks {
    display: grid;
    gap: 30px;
}

.stack-category {
    padding: 25px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.stack-category:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 212, 255, 0.3);
}

.stack-category h4 {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 15px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
}

.stack-items {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stack-item {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Process Section */
.process {
    padding: 120px 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 212, 255, 0.02) 50%, transparent 100%);
}

.process-timeline {
    display: grid;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.process-step {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 30px;
}

.step-number {
    width: 60px;
    height: 60px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 200;
    background: rgba(0, 212, 255, 0.1);
    position: relative;
}

.step-number::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 40px;
    background: linear-gradient(180deg, var(--accent), transparent);
}

.process-step:last-child .step-number::after {
    display: none;
}

.step-content h3 {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 10px;
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.5);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand h3 {
    font-size: 24px;
    font-weight: 200;
    margin-bottom: 15px;
    letter-spacing: 0.05em;
}

.footer-brand p {
    color: var(--text-secondary);
    max-width: 300px;
    line-height: 1.6;
}

.footer-column h4 {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 14px;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 212, 255, 0.1);
}

/* Particles */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: float 20s infinite linear;
}

/* Different types of cosmic particles */
.particle:nth-child(odd) {
    width: 1px;
    height: 1px;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
    opacity: 0.4;
}

.particle:nth-child(even) {
    width: 2px;
    height: 2px;
    background: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
    opacity: 0.3;
}

.particle:nth-child(3n) {
    width: 1.5px;
    height: 1.5px;
    background: rgba(255, 119, 198, 0.3);
    box-shadow: 0 0 4px rgba(255, 119, 198, 0.2);
    opacity: 0.2;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-100vh) translateX(var(--drift, 50px));
        opacity: 0;
    }
}

/* Animations */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 404 Error Page Styles */
.error-container {
    text-align: center;
    max-width: 800px;
    padding: 40px;
    position: relative;
    z-index: 2;
}

.error-code {
    font-size: clamp(120px, 20vw, 240px);
    font-weight: 100;
    line-height: 0.9;
    margin-bottom: 30px;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 50%, var(--rails-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease;
    position: relative;
}

.error-code::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    z-index: -1;
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(0.8);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.error-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 200;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.error-description {
    font-size: clamp(16px, 2.5vw, 20px);
    color: var(--text-secondary);
    font-weight: 200;
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.error-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.3s both;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }

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

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

    .product-link {
        font-size: 14px;
        margin-bottom: 16px;
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .btn {
        width: 100%;
    }

    /* 404 Page mobile styles */
    .error-page .logo {
        position: relative;
        top: 0;
        left: 0;
        margin-bottom: 40px;
        justify-content: center;
        font-size: 20px;
    }

    .logo-mark {
        width: 24px;
        height: 24px;
    }

    .logo-mark::after {
        width: 8px;
        height: 8px;
    }

    .error-container {
        padding: 20px;
    }

    .error-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

/* 404 Page logo positioning */
.error-page .logo {
    position: absolute;
    top: 40px;
    left: 40px;
    font-size: 20px;
    font-weight: 200;
    letter-spacing: 0.1em;
    z-index: 10;
}

.error-page .logo-mark {
    width: 24px;
    height: 24px;
}

.error-page .logo-mark::after {
    width: 8px;
    height: 8px;
}

/* Focus states for accessibility */
.btn:focus,
.logo:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
