body {
    font-family: 'Inter', sans-serif;
    background-color: #0A0A0A;
    color: #E0E0E0;
    
    /* ADDED: Subtle Honeycomb Pattern */
    background-image:
        /* Vertical lines (Dark Gray: #151515) */
        linear-gradient(90deg, #151515 1px, transparent 1px),
        /* Diagonal lines (Right) */
        linear-gradient(30deg, #151515 1px, transparent 1px),
        /* Diagonal lines (Left) */
        linear-gradient(150deg, #151515 1px, transparent 1px);
    
    /* Setting the size and position for the seamless repeating hexagon unit */
    background-size: 50px 86.6px;
    background-position: 0 0, 25px 43.3px, 0 0;
}

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.snap-section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.bg-hero {
    /* Background position set to left top, and opacity at 0.3 */
    background-image: linear-gradient(rgba(10, 10, 10, 0.3), rgba(10, 10, 10, 0.3)), url('images/bg.jpg');
    background-size: cover;
    background-position: left top; 
    background-attachment: fixed;
}
.bg-capabilities {
    /* EDITED: Changed file extension to .png */
    background-image: 
        /* PNG Background Image (Top Layer) */
        url('images/engineered.png'),
        /* Overlay Gradient (Bottom Layer) */
        linear-gradient(to right, rgba(10, 10, 10, 0.9) 30%, rgba(10, 10, 10, 0.4));
    
    background-color: #0A0A0A;
    background-size: 
        /* Size of the PNG. */
        800px,
        /* Size of the gradient */
        cover;
    background-position: 
        /* Position of the PNG. Right-aligned and centered vertically */
        right center,
        /* Position of the gradient */
        center;
    background-repeat: no-repeat;
    position: relative;
    transition: background-image 0.6s ease;
}

/* Hide background image when video is playing */
.bg-capabilities.video-playing {
    background-image: 
        linear-gradient(to right, rgba(10, 10, 10, 0.9) 30%, rgba(10, 10, 10, 0.4));
}

.accent-color { 
    color: #D97706; 
}
.bg-accent-color { 
    background-color: #D97706; 
}
.border-accent-color { 
    border-color: #D97706; 
}
.btn {
    transition: all 0.3s ease;
}
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.3);
}
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Separate class for cards with stricter visibility requirements */
.scroll-reveal-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.scroll-reveal-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.instinct-card {
    background-color: rgba(10, 10, 10, 0.5);
    border: 1px solid #2a2a2a;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    backdrop-filter: blur(5px);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    position: relative;
    /* Force square aspect ratio */
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.instinct-card-content {
    position: relative;
    z-index: 100;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.instinct-card h3,
.instinct-card p,
.instinct-card .material-symbols-outlined {
    position: relative;
    z-index: 100;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.instinct-card:hover {
    transform: translateY(-8px);
    border-color: rgba(217, 119, 6, 0.4);
    box-shadow: 0 0 25px rgba(217, 119, 6, 0.3), 0 0 10px rgba(217, 119, 6, 0.2) inset;
}

.material-symbols-outlined {
    font-variation-settings:
    'FILL' 0,
    'wght' 300,
    'GRAD' 0,
    'opsz' 48;
    font-size: 40px;
    color: #D97706;
    transition: transform 0.3s ease;
}
.instinct-card:hover .material-symbols-outlined {
    transform: scale(1.1);
}

/* Video container within cards */
.instinct-card .video-container {
    position: absolute;
    top: -2rem;
    left: -2rem;
    right: -2rem;
    bottom: -2rem;
    width: calc(100% + 4rem);
    height: calc(100% + 4rem);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

.instinct-card.playing .video-container {
    opacity: 1;
}

.instinct-card .video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* Video Modal Styles (for top nav "Reel") */
.video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

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

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    animation: slideUp 0.4s ease-out;
}

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

.video-modal .video-container {
    position: relative;
    padding-bottom: 42.1875%; /* 1280x540 aspect ratio (540/1280 = 0.421875) */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(217, 119, 6, 0.3);
}

.video-modal .video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.video-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: #E0E0E0;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    background: none;
    border: none;
    transition: all 0.3s ease;
    z-index: 10000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-close:hover {
    color: #D97706;
    transform: rotate(90deg);
}

/* Inline Video Styles (for "See What We Do" button) */
.inline-video-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.inline-video-container.active {
    width: 60%;
}

.inline-video-container video {
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(217, 119, 6, 0.3);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.4s ease 0.3s, transform 0.4s ease 0.3s;
}

.inline-video-container.active video {
    opacity: 1;
    transform: scale(1);
}

.inline-video-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #E0E0E0;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 11;
    opacity: 0;
    transform: scale(0.8);
}

.inline-video-container.active .inline-video-close {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease 0.5s;
}

.inline-video-close:hover {
    color: #D97706;
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1) rotate(90deg);
}

.inline-video-fullscreen {
    position: absolute;
    top: 20px;
    right: 80px;
    color: #E0E0E0;
    font-size: 32px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 11;
    opacity: 0;
    transform: scale(0.8);
}

.inline-video-container.active .inline-video-fullscreen {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease 0.5s;
}

.inline-video-fullscreen:hover {
    color: #D97706;
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .video-modal-content {
        width: 95%;
    }
    
    .video-close {
        top: -40px;
        font-size: 32px;
    }

    .inline-video-container.active {
        width: 100%;
    }

    .inline-video-container video {
        width: 95%;
    }

    .inline-video-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 32px;
    }

    .inline-video-fullscreen {
        top: 10px;
        right: 60px;
        width: 40px;
        height: 40px;
        font-size: 28px;
    }

    /* Adjust card video size for mobile */
    .instinct-card .video-container {
        width: 200px;
        height: 200px;
    }

    .auth-modal-content {
        width: 280px;
        height: 280px;
    }
}

/* Authorization Modal Styles */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.auth-modal-content {
    position: relative;
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(10, 10, 10, 0.95));
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(217, 119, 6, 0.3);
    animation: slideUp 0.4s ease-out;
    overflow: hidden;
}

.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
    text-align: center;
}

.auth-icon {
    margin-bottom: 1.5rem;
}

.lock-icon {
    font-size: 80px;
    color: #D97706;
    animation: unlockAnimation 2s ease-in-out infinite;
}

@keyframes unlockAnimation {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(-5deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(-5px) rotate(5deg);
    }
}

.auth-text {
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #E0E0E0;
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

.auth-text.success {
    color: #10B981;
}

.auth-text.error {
    color: #EF4444;
}

.auth-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(217, 119, 6, 0.2);
    border-top: 4px solid #D97706;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transition: opacity 0.3s ease;
}

.auth-spinner.hide {
    opacity: 0;
}

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

.auth-error {
    margin-top: 1.5rem;
    color: #EF4444;
    font-weight: 600;
    font-size: 0.95rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-error.show {
    opacity: 1;
}