/*----------------------------------------
 *  UNIVERSAL COLORS AND FONTS
 * ----------------------------------------*/
:root {
    --color-bg: #282323;
    --color-bg-alt: #1f1c1c;
    --color-bg-deep: #1a0f0f;
    --color-bg-panel: #312929;
    --color-text: #efebeb;
    --color-text-muted: #cfc6c6;
    --color-accent: #ff3131;
    --color-accent-soft: #ff6363;
    --color-accent-dark: #b81f1f;
    --max-width: 1000px;
    --spacing: 1rem;
    --border-radius: 8px;
}

/* Base */
body {
    margin: 0;
    padding: 0;
    font-family: 'Source Code Pro', monospace;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
}

h1,
h2,
h3,
h4 {
    font-family: 'Helvetica Neue', sans-serif;
    font-weight: 700;
    margin: calc(var(--spacing) * 2) 0 calc(var(--spacing) / 2) 0;
}

p {
    margin: 0 0 var(--spacing) 0;
    color: var(--color-text-muted);
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    color: var(--color-accent-soft);
    text-decoration: underline;
}

/*----------------------------------------
 *  CONTAINERS AND LAYOUT
 * ----------------------------------------*/
.container {
    position: relative;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: calc(var(--spacing) * 2);
}

.layout-rails {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(90deg, transparent 8%, rgba(255, 255, 255, 0.06) 8.1%, transparent 8.2%),
        linear-gradient(90deg, transparent 91.8%, rgba(255, 255, 255, 0.06) 91.9%, transparent 92%),
        linear-gradient(90deg, transparent 50%, rgba(255, 49, 49, 0.08) 50.1%, transparent 50.2%);
    z-index: 0;
}

main section,
.section-divider {
    position: relative;
    z-index: 1;
}

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

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: calc(var(--spacing) * 2);
}

section {
    padding: calc(var(--spacing) * 4) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

header,
footer {
    background: linear-gradient(90deg, var(--color-bg-alt) 0%, var(--color-bg-panel) 100%);
    border-top: 1px solid rgba(255, 49, 49, 0.35);
    border-bottom: 1px solid rgba(255, 49, 49, 0.2);
}

nav a {
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.4rem;
}

nav a[href="labs.html"]::after {
    content: "";
    display: inline-block;
    width: 0.38rem;
    height: 0.38rem;
    margin-left: 0.38rem;
    border-radius: 50%;
    background: var(--color-accent-soft);
    animation: statusPulse 2.6s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(255, 99, 99, 0.8);
}

.section-title {
    color: var(--color-accent-soft);
    letter-spacing: 0.03em;
    margin-top: 0.35rem;
}

.micro-label {
    margin: 0;
    color: rgba(255, 153, 153, 0.72);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-meta {
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(239, 235, 235, 0.7);
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.1rem 0.4rem;
    margin-right: 0.5rem;
}

.status-chip.validated {
    color: #aed7ae;
    border-color: rgba(174, 215, 174, 0.5);
}

.status-chip.in-progress {
    color: #ffd7a1;
    border-color: rgba(255, 215, 161, 0.5);
}

.status-chip.experimental {
    color: #dfd9ff;
    border-color: rgba(223, 217, 255, 0.5);
}

.section-divider {
    height: 24px;
    background-image: repeating-linear-gradient(90deg,
            rgba(255, 49, 49, 0.34) 0 16px,
            transparent 16px 29px,
            rgba(255, 255, 255, 0.2) 29px 31px,
            transparent 31px 48px);
    opacity: 0.55;
    margin: -0.2rem 0 0.4rem;
}


.hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 49, 49, 0.22);
    background: linear-gradient(180deg, rgba(31, 28, 28, 0.92) 0%, rgba(26, 15, 15, 0.92) 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-splash, none);
    background-size: cover;
    background-position: center;
    opacity: 0.28;
    filter: saturate(0.9) contrast(1.05);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(26, 15, 15, 0.4) 0%, rgba(26, 15, 15, 0.78) 100%);
}

.hero.hero-labs::after {
    background:
        linear-gradient(180deg, rgba(26, 15, 15, 0.42) 0%, rgba(26, 15, 15, 0.8) 100%),
        repeating-linear-gradient(90deg, transparent 0 88px, rgba(255, 255, 255, 0.05) 88px 89px),
        repeating-linear-gradient(0deg, transparent 0 62px, rgba(255, 255, 255, 0.03) 62px 63px);
}

.hero>* {
    position: relative;
    z-index: 1;
}

.brand-logo {
    display: block;
    width: min(380px, 70%);
    height: auto;
    margin: 0 auto calc(var(--spacing) * 1.4);
}

.labs-page {
    --hero-splash: url("assets/images/AeroCFVersion1SolverImage.png");
}

.performance-page {
    --hero-splash: url("assets/images/performance-splash.png");
}

.contact-page {
    --hero-splash: url("assets/images/foggerpath.png");
}

/*----------------------------------------
 *  BUTTONS & HIGHLIGHTS
 * ----------------------------------------*/
.button {
    background-color: var(--color-accent);
    color: var(--color-bg);
    padding: calc(var(--spacing) * 0.75) calc(var(--spacing) * 2);
    border: none;
    font-weight: bold;
    border-radius: var(--border-radius);
    cursor: pointer;
}

.button:hover {
    background-color: var(--color-accent-dark);
}

.highlight {
    color: var(--color-accent-soft);
    font-weight: bold;
}

/*----------------------------------------
 *  CARDS / PROJECTS / DIAGRAMS
 * ----------------------------------------*/
.card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--color-bg-panel) 0%, var(--color-bg-alt) 100%);
    padding: calc(var(--spacing) * 2);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 49, 49, 0.2);
    box-shadow: 0 0 14px rgba(0, 0, 0, 0.35);
    margin-bottom: calc(var(--spacing) * 2);
}

.card::before {
    content: "";
    position: absolute;
    top: 10px;
    right: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 49, 49, 0.8);
    box-shadow: 0 0 8px rgba(255, 49, 49, 0.5);
}

.card.bg-card::before {
    content: "";
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    border-radius: inherit;
    box-shadow: none;
    background-image: var(--card-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.24;
}

.card.bg-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(31, 28, 28, 0.55) 0%, rgba(26, 15, 15, 0.9) 100%);
}

.card.bg-card>* {
    position: relative;
    z-index: 1;
}

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

.card img.diagram {
    width: 100%;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 49, 49, 0.28);
    margin-bottom: 0.9rem;
}


.product-carousel {
    position: relative;
    margin-bottom: 0.9rem;
}

.product-carousel .diagram {
    margin-bottom: 0;
    display: none;
}

.product-carousel .diagram.active {
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 1px solid rgba(255, 99, 99, 0.65);
    background: rgba(26, 15, 15, 0.82);
    color: var(--color-text);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    display: grid;
    place-items: center;
}

.carousel-btn:hover {
    background: rgba(184, 31, 31, 0.8);
}

.carousel-btn.prev {
    left: 0.5rem;
}

.carousel-btn.next {
    right: 0.5rem;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 0.55rem;
}

.carousel-dots .dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: rgba(239, 235, 235, 0.32);
}

.carousel-dots .dot.active {
    background: var(--color-accent-soft);
}

.grid {
    display: grid;
    gap: var(--spacing);
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.capabilities-grid .card {
    text-align: center;
    font-weight: 600;
}

/*----------------------------------------
 *  SANCHEZ X / SKUNKWORKS - FIREFLY STYLE BACKGROUND
 * ----------------------------------------*/
.sanchez-x {
    position: relative;
    background-color: #0a0a0a; /* deep space black */
    color: #ffffff;
    padding: calc(var(--spacing) * 6) var(--spacing);
    text-align: center;
    border-radius: var(--border-radius);
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
}

.sanchez-x .micro-label {
    color: rgba(255, 255, 255, 0.62);
}

.sanchez-x .section-meta {
    color: rgba(255, 255, 255, 0.72);
}

/* Animated "firefly" particles */
.sanchez-x::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 50%) repeat;
    background-size: 4px 4px;
    animation: moveParticles 20s linear infinite;
    pointer-events: none;
    opacity: 0.35;
}

/* Slow drifting motion of particles */
@keyframes moveParticles {
    0% { background-position: 0 0; }
    50% { background-position: 200px 150px; }
    100% { background-position: 0 0; }
}

/* Heading */
.sanchez-x h2 {
    position: relative;
    font-size: 2.4rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: calc(var(--spacing) * 1.4);
    z-index: 1;
}

/* Paragraphs */
.sanchez-x p {
    position: relative;
    max-width: 700px;
    margin: 0 auto 0.8rem;
    line-height: 1.5;
    color: #f2f2f2;
    z-index: 1;
}

/* Project tiles with optional image */
.sanchez-x ul {
    position: relative;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    z-index: 1;
}

.sanchez-x ul li {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: calc(var(--spacing) * 1.2);
    flex: 1 1 250px;
    max-width: 320px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sanchez-x ul li:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}

.sanchez-x ul li img {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 0.8rem;
}

/* Glowing footer text */
.sanchez-x .glow {
    display: inline-block;
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.7), 0 0 20px rgba(255, 255, 255, 0.4);
    margin-top: 1rem;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}



@keyframes glowPulse {
    from {
        text-shadow:
            0 0 4px rgba(255, 49, 49, 0.8),
            0 0 8px rgba(255, 49, 49, 0.5);
    }

    to {
        text-shadow:
            0 0 10px rgba(255, 49, 49, 1),
            0 0 22px rgba(255, 49, 49, 0.75),
            0 0 30px rgba(255, 99, 99, 0.55);
    }
}

@keyframes statusPulse {
    0%,
    100% {
        opacity: 0.42;
        box-shadow: 0 0 0 0 rgba(255, 99, 99, 0.45);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 0 6px rgba(255, 99, 99, 0);
    }
}

/*----------------------------------------
 *  ARROW ANIMATIONS
 * ----------------------------------------*/
.workflow-arrows {
    text-align: center;
    margin: 1rem 0 1.5rem;
    color: var(--color-accent-soft);
    font-size: 1.6rem;
    letter-spacing: 0.4rem;
}

.arrow {
    display: inline-block;
    margin: 0 0.15rem;
    color: var(--color-accent-soft);
    animation: bounceArrow 900ms infinite alternate;
}

.workflow-arrows .arrow:nth-child(2) {
    animation-delay: 200ms;
}

.workflow-arrows .arrow:nth-child(3) {
    animation-delay: 400ms;
}

@keyframes bounceArrow {
    from {
        transform: translateY(0);
        opacity: 0.7;
    }

    to {
        transform: translateY(-4px);
        opacity: 1;
    }
}


.contact-card {
    max-width: 760px;
    margin: 0 auto;
    padding: calc(var(--spacing) * 2);
    background: linear-gradient(180deg, var(--color-bg-panel) 0%, var(--color-bg-alt) 100%);
    border: 1px solid rgba(255, 49, 49, 0.22);
    border-radius: var(--border-radius);
    box-shadow: 0 0 14px rgba(0, 0, 0, 0.35);
}

.contact-card.bg-card::before {
    opacity: 0.18;
}

.contact-intro {
    color: var(--color-text);
    font-weight: 600;
}

.contact-email {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/*----------------------------------------
 *  MOBILE
 * ----------------------------------------*/
@media (max-width: 700px) {
    .flex-center {
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .sanchez-x h2 {
        font-size: 1.8rem;
    }
}
