/* =====================================================================
   Just Build It / GB Technofuturism — shared stylesheet
   Loaded by every page so the browser caches it once.
   ===================================================================== */

/* ---------- Reset & base ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 20%, #f1f5f9 40%, #e2e8f0 60%, #cbd5e1 80%, #94a3b8 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    color: #1e293b;
}

/* Page variants: the home page centres a single hero, content pages
   stack from the top. */
body.loading {
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
}

body.content {
    justify-content: flex-start;
    overflow-x: hidden;
    padding-top: 0;
    line-height: 1.6;
}

/* ---------- Background particles ---------- */
.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(30, 41, 59, 0.15);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.15; }
    50% { transform: translateY(-30px) rotate(180deg); opacity: 0.4; }
}

/* ---------- Navigation ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    border-bottom: 1px solid rgba(30, 41, 59, 0.1);
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    font-family: 'Space Grotesk', sans-serif;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(15, 22, 41, 0.08), rgba(45, 59, 93, 0.08));
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #2d3b5d;
    transition: width 0.3s ease;
}

.nav-links a:hover::before { opacity: 1; }
.nav-links a:hover::after { width: 80%; }

.nav-links a:hover {
    color: #1e293b;
    transform: translateY(-1px);
}

/* ---------- Shared content layout (mission / project / contact) ---------- */
.container {
    max-width: 1000px;
    width: 90%;
    padding: 3rem;
    text-align: center;
    z-index: 10;
    margin: 6rem auto 4rem;
}

.page-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 7vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: #1e293b;
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #2d3b5d, transparent);
    border-radius: 1px;
}

/* =====================================================================
   HOME / LOADING PAGE
   ===================================================================== */
.main-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 2.5rem;
    color: #1e293b;
    position: relative;
    z-index: 10;
}

.main-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #2d3b5d, transparent);
    border-radius: 1px;
}

.central-display-container {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 3rem 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.center-image-core {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #f1f5f9;
    background-image: url('UK.png');
    background-size: cover;
    background-position: center;
    position: absolute;
    z-index: 3;
    border: 2px solid rgba(45, 59, 93, 0.3);
    box-shadow:
        0 0 20px rgba(45, 59, 93, 0.2),
        0 0 40px rgba(45, 59, 93, 0.1),
        inset 0 0 20px rgba(45, 59, 93, 0.05);
    animation: centerPulse 4s ease-in-out infinite;
}

@keyframes centerPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 0 20px rgba(45, 59, 93, 0.2),
            0 0 40px rgba(45, 59, 93, 0.1),
            inset 0 0 20px rgba(45, 59, 93, 0.05);
    }
    50% {
        transform: scale(1.05);
        box-shadow:
            0 0 25px rgba(45, 59, 93, 0.3),
            0 0 50px rgba(45, 59, 93, 0.15),
            inset 0 0 25px rgba(45, 59, 93, 0.08);
    }
}

.outer-image-ring {
    position: absolute;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(45, 59, 93, 0.15);
    border-radius: 50%;
    z-index: 1;
    box-shadow:
        0 0 20px rgba(45, 59, 93, 0.08),
        inset 0 0 20px rgba(45, 59, 93, 0.04);
}

.orbit-path {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    animation: orbitRotate 25s linear infinite;
    transform-origin: 50% 50%;
    z-index: 2;
}

.image-placeholder {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 2px solid rgba(45, 59, 93, 0.2);
    box-shadow:
        0 0 10px rgba(45, 59, 93, 0.15),
        0 0 20px rgba(45, 59, 93, 0.08);
    top: calc(50% - 20px);
    left: calc(50% - 20px);
    transform: rotate(var(--initial-angle)) translateX(110px) rotate(calc(-1 * var(--initial-angle)));
    transition: all 0.3s ease;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(45deg, transparent, rgba(45, 59, 93, 0.1), transparent);
    z-index: -1;
    animation: borderRotate 4s linear infinite;
}

@keyframes borderRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.image-placeholder.p1 { background-image: url('drone2.png'); }
.image-placeholder.p2 { background-image: url('coin.png'); }
.image-placeholder.p3 { background-image: url('brain.png'); }

.status {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #3d4f7a;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    animation: statusFade 3s ease-in-out infinite alternate;
    font-weight: 500;
}

.subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #334155;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.subtitle::before,
.subtitle::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(51, 65, 85, 0.3), transparent);
}

.subtitle::before { left: -70px; }
.subtitle::after { right: -70px; }

.loading-bar {
    width: 350px;
    height: 6px;
    background: rgba(15, 22, 41, 0.4);
    border-radius: 3px;
    margin-top: 2rem;
    overflow: hidden;
    border: 1px solid rgba(6, 182, 212, 0.15);
    box-shadow:
        0 0 10px rgba(6, 182, 212, 0.1),
        inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #06b6d4, #3b82f6, #06b6d4);
    background-size: 200% 100%;
    animation: loadingProgress 4s ease-in-out forwards, loadingShine 2s linear infinite;
    width: 0%;
    border-radius: 3px;
    position: relative;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.loading-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.ready-status {
    color: #10b981 !important;
    font-weight: 600;
    animation: readyGlow 2s ease-in-out infinite alternate;
}

@keyframes readyGlow {
    0% { text-shadow: 0 0 5px rgba(16, 185, 129, 0.3); }
    100% { text-shadow: 0 0 15px rgba(16, 185, 129, 0.6); }
}

@keyframes orbitRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes statusFade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes loadingProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes loadingShine {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* =====================================================================
   MISSION PAGE
   ===================================================================== */
.mission-statement {
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    color: #1e293b;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
    text-align: left;
}

.hero-image {
    width: 100%;
    max-width: 800px;
    height: 400px;
    background: #f8fafc;
    border-radius: 12px;
    margin: 3rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(45, 59, 93, 0.2);
    box-shadow:
        0 8px 32px rgba(30, 41, 59, 0.15),
        0 0 20px rgba(45, 59, 93, 0.1);
    position: relative;
    overflow: hidden;
    padding: 0;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.principles-section {
    margin: 5rem 0;
    text-align: left;
}

.principles-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    color: #1e293b;
    text-align: center;
    position: relative;
}

.principles-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #2d3b5d, transparent);
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.principle-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(45, 59, 93, 0.1);
    box-shadow: 0 4px 16px rgba(30, 41, 59, 0.08);
    transition: all 0.3s ease;
}

.principle-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(30, 41, 59, 0.12);
}

.principle-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #2d3b5d;
    margin-bottom: 1rem;
}

.principle-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.8rem;
}

.principle-text {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #475569;
}

.call-to-action {
    margin: 5rem 0 3rem;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(45, 59, 93, 0.05) 0%, rgba(61, 79, 122, 0.05) 100%);
    border-radius: 16px;
    border: 1px solid rgba(45, 59, 93, 0.1);
}

.cta-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.cta-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 2rem;
}

/* =====================================================================
   PROJECTS PAGE
   ===================================================================== */
.project-description {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    color: #475569;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 2.5rem;
    border: 2px solid rgba(45, 59, 93, 0.2);
    box-shadow:
        0 8px 32px rgba(30, 41, 59, 0.15),
        0 0 20px rgba(45, 59, 93, 0.1),
        inset 0 0 20px rgba(45, 59, 93, 0.05);
    transition: all 0.3s ease;
    background: #f8fafc;
}

.video-wrapper:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 40px rgba(30, 41, 59, 0.2),
        0 0 30px rgba(45, 59, 93, 0.15),
        inset 0 0 25px rgba(45, 59, 93, 0.08);
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

.project-tagline {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    font-style: italic;
    color: #2d3b5d;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.project-link {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #2d3b5d;
    text-decoration: none;
    background: rgba(45, 59, 93, 0.08);
    padding: 0.7rem 1.6rem;
    border-radius: 30px;
    border: 1px solid rgba(45, 59, 93, 0.15);
    transition: all 0.3s ease;
}

.project-link:hover {
    background: rgba(45, 59, 93, 0.15);
    transform: translateY(-2px);
}

.section-label {
    margin-bottom: 0.5rem;
}

.label-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2d3b5d;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(45, 59, 93, 0.08);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(45, 59, 93, 0.15);
    display: inline-block;
}

.section-divider {
    margin-top: 5rem;
    margin-bottom: 2rem;
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(30, 41, 59, 0.2), transparent);
}

.project-section {
    margin-bottom: 4rem;
}

.project-section:last-child {
    margin-bottom: 2rem;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: #1e293b;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #2d3b5d, transparent);
    border-radius: 1px;
}

/* =====================================================================
   CONTACT PAGE
   ===================================================================== */
.contact-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 3rem;
    border: 1px solid rgba(45, 59, 93, 0.1);
    box-shadow: 0 4px 16px rgba(30, 41, 59, 0.08);
    max-width: 600px;
    margin: 3rem auto 0;
}

.contact-lead {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 1.5rem;
}

.contact-note {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2d3b5d;
    background: rgba(45, 59, 93, 0.08);
    border: 1px solid rgba(45, 59, 93, 0.15);
    border-radius: 20px;
    padding: 0.5rem 1.2rem;
    display: inline-block;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 768px) {
    body.loading { padding-top: 60px; }

    .navbar {
        height: 60px;
        padding: 0.5rem 1rem;
    }

    .nav-links {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .container {
        padding: 2rem 1.5rem;
        width: 95%;
        margin: 4rem auto 2rem;
    }

    /* Home */
    .main-title {
        font-size: clamp(1.8rem, 10vw, 2.8rem);
        margin-bottom: 1.5rem;
    }

    .central-display-container {
        width: 200px;
        height: 200px;
        margin: 2rem 0;
    }

    .center-image-core { width: 55px; height: 55px; }
    .outer-image-ring { width: 170px; height: 170px; }
    .orbit-path { width: 170px; height: 170px; }

    .image-placeholder {
        width: 32px;
        height: 32px;
        top: calc(50% - 16px);
        left: calc(50% - 16px);
        transform: rotate(var(--initial-angle)) translateX(85px) rotate(calc(-1 * var(--initial-angle)));
    }

    .loading-bar {
        width: 90vw;
        max-width: 300px;
        margin-top: 1.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
        letter-spacing: 0.08em;
    }

    .subtitle::before,
    .subtitle::after { width: 25px; }
    .subtitle::before { left: -35px; }
    .subtitle::after { right: -35px; }

    .status {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }

    /* Mission */
    .mission-statement {
        font-size: 1.1rem;
        text-align: center;
        margin-bottom: 2rem;
    }

    .hero-image {
        height: 300px;
        margin: 2rem auto;
    }

    .principles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .principle-card { padding: 1.5rem; }

    .call-to-action {
        padding: 2rem;
        margin: 3rem 0 2rem;
    }

    /* Projects */
    .page-title { font-size: clamp(1.8rem, 8vw, 2.5rem); }
    .section-title { font-size: clamp(1.5rem, 6vw, 2rem); }

    .project-description {
        font-size: 1rem;
        line-height: 1.6;
    }

    .section-divider { margin-top: 4rem; }
    .video-wrapper { margin-bottom: 2rem; }
    .project-tagline { font-size: 1.1rem; }

    /* Contact */
    .contact-card { padding: 2rem; }
}

@media (max-width: 480px) {
    .nav-links { gap: 1rem; }

    .nav-links a {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .container {
        padding: 1.5rem 1rem;
        margin: 3rem auto 2rem;
    }

    /* Home */
    .main-title {
        font-size: clamp(1.5rem, 12vw, 2.2rem);
        margin-bottom: 1rem;
    }

    .central-display-container {
        width: 160px;
        height: 160px;
        margin: 1.5rem 0;
    }

    .center-image-core { width: 45px; height: 45px; }
    .outer-image-ring { width: 130px; height: 130px; }
    .orbit-path { width: 130px; height: 130px; }

    .image-placeholder {
        width: 28px;
        height: 28px;
        top: calc(50% - 14px);
        left: calc(50% - 14px);
        transform: rotate(var(--initial-angle)) translateX(65px) rotate(calc(-1 * var(--initial-angle)));
    }

    .subtitle { font-size: 1rem; }
    .subtitle::before,
    .subtitle::after { display: none; }

    .status { font-size: 0.8rem; }

    .loading-bar {
        width: 95vw;
        max-width: 250px;
    }

    /* Projects / shared */
    .page-title {
        font-size: clamp(1.5rem, 10vw, 2rem);
        margin-bottom: 1rem;
    }

    .section-title { font-size: clamp(1.3rem, 8vw, 1.7rem); }

    .project-description {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 2rem;
    }

    .video-wrapper {
        border-radius: 8px;
        margin-bottom: 2rem;
    }

    .project-tagline {
        font-size: 1.05rem;
        margin-bottom: 1.5rem;
    }

    .section-divider { margin-top: 3rem; }

    .label-text {
        font-size: 0.8rem;
        padding: 0.3rem 0.8rem;
    }

    /* Mission */
    .mission-statement {
        font-size: 1rem;
        line-height: 1.6;
    }

    .hero-image {
        height: 250px;
        padding: 0;
    }

    .principle-card { padding: 1.2rem; }
    .call-to-action { padding: 1.5rem; }

    /* Contact */
    .contact-card { padding: 1.5rem; }
}
