:root {
    --cube-size: clamp(200px, 22vmin, 350px);
    --face-bg: #0b1220;
    --face-fg: #eaf2ff;
    --accent: #87b6ff;
    --header-h: 60px;
    /* Overall stage */
    --stage-h: calc(100vh - var(--header-h));
    /* Background image control */
    --bg-size: cover;
    /* cover or contain */
    --bg-x: 50%;
    --bg-y: 50%;

    /* Cube control */
    --cube-size: clamp(230px, 22vmin, 350px);
    --cube-center-x: 49%;
    --cube-center-y: 42%;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    color: #111;
    background: radial-gradient(circle at center, #e7ecf8 0%, #d4def3 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    align-items: center;
    justify-content: space-between;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem clamp(1rem, 3vw, 2rem);
    background: #fff;
    border-bottom: 1px solid #e6e9ef;
    width: 100%;
    height: var(--header-h);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
}


/* wrapper that holds cube */
.site-scene {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--header-h, 90px));
    display: block;
}


html,
body {
    height: 100%;
    overflow: hidden;
    /* no scrollbar on home*/
}


.logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.tabs {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.tab {
    appearance: none;
    border: 1px solid #d5deed;
    background: #fff;
    border-radius: .75rem;
    padding: .5rem .9rem;
    font: inherit;
    cursor: pointer;
}

.tab:hover {
    border-color: #c3d5fb;
}

.tab.is-active {
    background: #e9f1ff;
    border-color: #c3d5fb;
    color: #0a3a8a;
}

/* --- Layout & Cube --- */
.layout {
    padding-top: 0;
    margin-top: 0;
    height: 0;
}

.scene {
    width: var(--cube-size);
    height: var(--cube-size);
    position: absolute;
    position: absolute;
    left: var(--cube-center-x);
    top: var(--cube-center-y);
    transform: translate(-50%, -50%);
    margin-inline: auto;
    perspective: 1800px;
    z-index: 10;
    perspective-origin: 50% 40%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.rig-zoom {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    /* background fills the entire stage (no strip) */
    background-image: url("homebg.png");
    background-repeat: no-repeat;
    background-size: cover;
    /* fills entire area */
    background-position: 50% 50%;

    /* 🔹 Zoom behaviour */
    transform-origin: 65% 55%;
    transform: scale(1);
    transition: transform 2s ease, opacity 1.2s ease;
}


.rig-zoom.is-zooming {
    transform: translateZ(0) scale(2.6);
    opacity: 0;
}


/* wrapper does the zoom + fade */
.cube-zoom {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform: translateZ(0) scale(1);
    opacity: 1;
    transition: transform 2s ease, opacity 1.2s ease;
    /* zoom duration */
    will-change: transform, opacity;
}

.cube-zoom.is-zooming {
    transform: translateZ(0) scale(2.6);
    opacity: 0;
}

.cube {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    border-radius: 18px;
    transform: rotateX(calc(var(--rx, 0deg) - 25deg)) rotateY(calc(var(--ry, 0deg) + 35deg));
    transition: transform 900ms cubic-bezier(.2, .7, .1, 1);
    will-change: transform;
}

/* Full-page content (hidden until opened) */
.page {
    position: fixed;
    top: var(--header-h);
    inset: 0;
    background: #fff;
    color: #111;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transform: scale(.985);
    transition: opacity 300ms ease, transform 300ms ease;
    overflow: auto;
    padding: 1rem 1.5rem;
}

.page.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}


.face {
    position: absolute;
    inset: -0.5px;
    border-radius: 0;
    display: grid;
    align-content: start;
    gap: .5rem;
    padding: 1.25rem;
    border-radius: 0rem;
    background-image:
        url("concrete.jpg"),
        linear-gradient(180deg,
            rgba(255, 255, 255, .08),
            rgba(0, 0, 0, .15));
    background-size: cover;
    background-position: center;
    background-repeat: repeat;
    color: #1f1f1f;
    color: var(--face-fg);
    border: 1px solid rgba(0, 0, 0, .15);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .08),
        inset 0 25px 40px rgba(0, 0, 0, .35);
    backface-visibility: hidden;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    display: flex;
}

.face-content img {
    width: clamp(180px, 25%, 180px);
    height: auto;
    object-fit: contain;
}

.face h2 {
    margin: 0 0 .25rem;
    color: #cfe1ff;
}

.list {
    margin: 0;
    padding-left: 1.1rem;
}

.list li {
    margin: .25rem 0;
}

/* --- Face placement --- */
.front {
    transform: rotateY(0deg) translateZ(calc(var(--cube-size) / 2));
}

.right {
    transform: rotateY(90deg) translateZ(calc(var(--cube-size) / 2));
}

.back {
    transform: rotateY(180deg) translateZ(calc(var(--cube-size) / 2));
}

.left {
    transform: rotateY(-90deg) translateZ(calc(var(--cube-size) / 2));
}

.bottom {
    transform: rotateX(-90deg) translateZ(calc(var(--cube-size) / 2));
}

.top {
    transform: rotateX(90deg) translateZ(calc(var(--cube-size) / 2));
}

.face-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(46px, 4vmin, 52px);
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);

    pointer-events: none;
}

.face-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, .15) 0%,
            rgba(0, 0, 0, .45) 100%);
    z-index: -1;
}


.page .backbtn {
    position: fixed;
    top: calc(var(--header-h) - 30px);
    left: 16px;
    z-index: 10000;
    /* above page content */
    transform: none !important;
    backface-visibility: visible;

    appearance: none;
    border: 1px solid #d5deed;
    background: #fff;
    border-radius: .75rem;
    padding: .5rem .9rem;
    font: inherit;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .12)
}

.page .back:hover {
    border-color: #c3d5fb;
    background: #f6f9ff;
}

/* Accessibility / Motion */
@media (prefers-reduced-motion: reduce) {
    .cube {
        transition: none;
    }
}

/* Small screens: move cube more central and shrink crane */
@media (max-width: 700px) {
    :root {
        --header-h: 60px;
        --cube-size: clamp(170px, 40vmin, 260px);
        --cube-x: 70%;
        --cube-y: 62%;
    }

    .site-header {
        height: var(--header-h);
        padding: 0 10px;
        gap: 15px;
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
    }

    .logo {
        height: 42px;
    }

    .tabs {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 4px;
    }

    .tab {
        padding: 8px 3px;
        font-size: 14px;
        border-radius: 12px;
    }

    .face-content img {
        width: clamp(140px, 30vw, 120px);
    }
}


/* ABOUT PAGE */


.feature-frame {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    /* Smooth corners */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid #ddd;
}

.main-feature-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

/* Subtle hover effect for a "cool" feel */
.feature-frame:hover .main-feature-img {
    transform: scale(1.02);
}

/* Adjust Mission/Vision padding for better flow */
.info-section {
    padding-top: 40px;
}

/* Hero Section */
.about-hero {
    height: 60vh;
    background: url('about.jpg') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-overlay {
    background: rgba(44, 62, 80, 0.6);
    /* Professional Slate Blue Overlay */
    padding: 40px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-overlay h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Mission & Vision Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Layout specifically for the 3-block look */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Two equal columns */
    gap: 30px;
    align-items: start;
}

.left-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
    /* Space between Vision and BBBEE blocks */
}

/* Make the Mission card match the height of both left cards combined */
.mission-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Specific styling for the BBBEE block to make it stand out */
.bbbee-card {
    border-top: 5px solid #2c3e50;
    /* Darker accent for contrast */
    background-color: #fcfcfc;
}

.pdf-button {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 18px;
    background: #d4af37;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
}

.pdf-button:hover {
    background: #b9972f;
}

.card {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-top: 5px solid #d4af37;
    /* Gold Accent */
}

.card h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.card ul {
    list-style: none;
}

.card ul li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.card ul li::before {
    content: "✔";
    color: #d4af37;
    position: absolute;
    left: 0;
}

/* Team Section */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #2c3e50;
}

.team-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 40px;
}

.team-member {
    text-align: center;
    flex: 1;
    min-width: 250px;
}

.circle-frame {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 4px solid #d4af37;
    /* Circular gold border */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.circle-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-member h3 {
    color: #2c3e50;
    font-size: 1.4rem;
}

.role {
    color: #d4af37;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.separator {
    border: 0;
    height: 1px;
    background: #ddd;
    margin: 20px auto;
    width: 80%;
}

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

    .main-layout {
        grid-template-columns: 1fr;
    }
}


/* CONTACT PAGE */

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.contact-hero {
    position: relative;
    background: url('contact.jpg') no-repeat center center/cover;
    height: 350px;
    display: flex;
    align-items: center;
    color: var(--white);
    text-align: center;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.7);
    /* Blueprint Blue Overlay */
}

.contact-hero .container {
    position: relative;
    z-index: 2;
}

.contact-hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* Grid Layout */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    /* match About spacing */
    padding: 60px 20px;
    /* slightly tighter than 80px */
    align-items: start;
}

/* Contact-specific card sizing (uses your existing .card style) */
.contact-card {
    padding: 40px;
    /* same as .card, but explicit */
}

/* Headings inside contact cards */
.contact-card h2 {
    margin-top: 0;
    margin-bottom: 18px;
    color: #2c3e50;
}

/* Make the left card spacing feel neat */
.contact-info .info-group+.info-group {
    margin-top: 20px;
}

.info-group {
    margin-bottom: 30px;
}

.info-group h3 {
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--accent-orange);
    margin-bottom: 10px;
}

/* Form Styling */
.qs-form input,
.qs-form select,
.qs-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.btn-submit {
    /* Ensure visibility */
    display: block;
    visibility: visible;
    opacity: 1 !important;

    /* Design */
    background-color: #f39c12;
    /* Safety Orange */
    color: #ffffff;
    /* White text for contrast */

    /* Layout */
    width: 100%;
    padding: 15px 30px;
    margin-top: 10px;

    /* Typography */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;

    /* Border & Interaction */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* This is the only part that should change on hover */
.btn-submit:hover {
    background-color: #d35400;
    /* Darker orange on hover */
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 8px 15px;
    background: #e8f5e9;
    border-radius: 50px;
    font-size: 0.85rem;
    color: #2e7d32;
    font-weight: 600;
}

.dot {
    height: 10px;
    width: 10px;
    background-color: #4caf50;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }

    70% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .contact-hero h1 {
        font-size: 2rem;
    }
}


/*CLIENTS PAGE */

.client-hero {
    background: url('clients2.jpg') no-repeat center center/cover !important;
}

/* CLIENTS PAGE ONLY - remove overlay & hover effects */
#page-clients .client-overlay {
    display: none;
}

#page-clients .client-card:hover img {
    opacity: 1;
    transform: none;
}

/* Optional: remove hover lift if you want it fully static */
#page-clients .client-card:hover {
    transform: none;
    box-shadow: none;
}


/*PROJECTS PAGE */

/*Service Page Specifics
.project-hero {
    background: url('project7.jpg') no-repeat center center/cover !important;
}*/

.projects-collage-slider {
    position: relative;
    height: 420px;
    background: #fff;
    overflow: hidden;
    margin-bottom: 50px;
}

.collage-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 18px;

    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    pointer-events: none;
}

.collage-slide.is-active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.collage-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .15);
}

/* If a slide only has 2 images */
.collage-slide:has(img:nth-child(2):last-child) {
    grid-template-columns: repeat(2, 1fr);
}

/* Mobile */
@media (max-width: 700px) {
    .projects-collage-slider {
        height: 320px;
    }

    .collage-slide {
        grid-template-columns: 1fr;
    }

    .collage-slide img {
        height: 100%;
    }
}




.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /*grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));*/
    gap: 25px;
    margin-bottom: 60px;
}

.service-block {
    background: #fff;
    padding: 30px;
    border-left: 4px solid #d4af37;
    /* Gold Accent */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.service-block:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

.service-block h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.service-block ul {
    list-style: square;
    padding-left: 20px;
    font-size: 0.95rem;
}


.highlight-block h3 {
    color: #d4af37;
}

/* Client Gallery with Hover Dim effect */
.client-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.client-card {
    position: relative;
    height: 180px;
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #eee;
    /* Subtle border to define the box */
    /* Background for the dimming effect */
}

.client-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.client-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.85);
    /* Slate Blue Dimming */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    /* Hidden by default */
    transition: opacity 0.4s ease;
    padding: 20px;
    text-align: center;
}

.client-text h4 {
    color: #d4af37;
    margin-bottom: 8px;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.client-text p {
    color: white;
    font-size: 0.85rem;
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
}

/* Hover States */
.client-card:hover img {
    opacity: 0.4;
    /* Dims the image */
    transform: scale(1.1);
}

.client-card:hover .client-overlay {
    opacity: 1;
    /* Shows the text */
}

.client-card:hover .client-text h4,
.client-card:hover .client-text p {
    transform: translateY(0);
    /* Text slides up into place */
}

@media (max-width: 1000px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

.page-footer {
    width: 100%;
    margin-top: 25px;
    padding: 8px 15px;
    background: #d4af37;
    color: #ffffff;
    text-align: center;
    font-size: 13px;
}

.page-footer a {
    color: #0b1139;
    text-decoration: none;
}

.page-footer a:hover {
    text-decoration: underline;
}

.page {
    padding-top: var(--header-h);
}