:root {
    --color-black: #000000;
    --color-white: #FFFFFF;
    --color-red: #E00000; /* Strong accent */
    --color-lime: #00FF00; /* Strong accent */
    --color-cobalt: #0000FF; /* Strong accent */

    --font-heading: 'Anton', sans-serif;
    --font-body: 'Oswald', sans-serif;
    --font-impact: 'Impact', sans-serif; /* Used sparingly for extra impact */
    
    --spacing-unit: 1rem; /* Base spacing */
}

/* Base Styles - No Spacing, Edge-to-Edge */
html {
    scroll-behavior: auto; /* Ensures instant cuts for navigation */
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    color: var(--color-white);
    background-color: var(--color-black);
    line-height: 1.2; /* Tight line height for brutalist text blocks */
    overflow-x: hidden; /* Prevent horizontal scroll from overlapping elements */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem; /* Minimal padding for edge-to-edge effect, adjust as needed */
    box-sizing: border-box;
}

/* Typography */
h1, h2, h3, .logo {
    font-family: var(--font-heading);
    color: var(--color-white);
    text-transform: uppercase;
    margin: 0; /* No default margins */
    line-height: 1; /* Tight line height */
}

h1 {
    font-size: clamp(2.5rem, 8vw, 6rem);
    letter-spacing: -2px;
}

h2 {
    font-size: clamp(2rem, 6vw, 4.5rem);
    letter-spacing: -1px;
    margin-bottom: 0.5rem; /* Small margin for title separation */
    color: var(--color-red); /* Accent color for main section titles */
}

h3 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    letter-spacing: 0;
}

p {
    margin: 0; /* No default margins */
    padding-bottom: 1rem; /* Add padding to paragraphs only where needed */
}

a {
    color: var(--color-lime);
    text-decoration: none;
    transition: color 0.0001s ease-in-out; /* Instant cut transition */
}

a:hover {
    color: var(--color-red);
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* Remove extra space below images */
    object-fit: cover; /* Ensures images fill their container without distortion */
}

/* Layout Overlaps and Broken Grids */
section {
    position: relative;
    padding: 2rem 0; /* Minimal vertical padding */
    margin: 0; /* Remove default spacing between sections */
    border-bottom: 2px solid var(--color-cobalt); /* Exposed structure */
}

.overlap-top {
    margin-top: -3rem; /* Overlap with the previous section */
    z-index: 1;
}

.overlap-bottom {
    margin-bottom: -3rem; /* Overlap with the next section */
    z-index: 1;
}

/* Header */
.header {
    background-color: var(--color-black);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    border-bottom: 4px solid var(--color-red); /* Strong border */
    padding: 1rem 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Align nav to top for a raw look */
    padding: 0.5rem 1rem;
   
}

.logo a {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--color-cobalt);
    font-family: var(--font-impact); /* Use impact for logo */
    letter-spacing: 2px;
    text-decoration: none;
    display: block;
    border: 2px solid var(--color-lime); /* Unpolished border */
    padding: 0.2rem 0.5rem;
    background-color: var(--color-black);
    box-shadow: 4px 4px 0 var(--color-red); /* Blocky shadow */
    transition: all 0.0001s;
}

.logo a:hover {
    color: var(--color-red);
    box-shadow: 4px 4px 0 var(--color-lime);
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap; /* Allow navigation items to wrap on smaller screens */
    justify-content: flex-end;
}

.main-nav a {
    color: var(--color-white);
    font-family: var(--font-body);
    text-transform: uppercase;
    font-weight: 700;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    padding: 0.2rem 0;
    border-bottom: 2px solid transparent; /* Subtle border for effect */
    transition: border-color 0.0001s ease-in-out, color 0.0001s ease-in-out;
}

.main-nav a:hover {
    color: var(--color-red);
    border-color: var(--color-lime);
}

/* Hero Section */
.hero-section {
    background-color: var(--color-red); /* Strong background */
    padding: 5rem 0 3rem 0; /* Top padding to ensure no collision with nav */
    text-align: center;
    border-bottom: none; /* No border here, as it overlaps */
}

.hero-content {
    border: 5px solid var(--color-black); /* Blocky border */
    padding: 2rem 1rem;
    background-color: var(--color-black);
    transform: rotate(-1deg); /* Slight rotation for a broken grid effect */
    margin-top: -2rem; /* Overlap with header */
    margin-bottom: -2rem; /* Overlap with next section */
    box-shadow: 10px 10px 0 var(--color-lime); /* Strong shadow */
}

.hero-pre-title {
    font-family: var(--font-impact);
    color: var(--color-lime);
    font-size: clamp(1rem, 3vw, 1.5rem);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.hero-title {
    color: var(--color-white);
    margin-bottom: 1.5rem;
    line-height: 0.9; /* Very tight line height */
    text-shadow: 4px 4px 0 var(--color-black);
}

.hero-description {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    line-height: 1.3;
    max-width: 800px;
    margin: 0 auto 1.5rem auto;
    color: var(--color-white);
    text-align: left; /* Aligned left for a raw, newspaper-like feel */
    border: 1px solid var(--color-cobalt);
    padding: 1rem;
    background-color: rgba(0,0,0,0.5); /* Semi-transparent black background */
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 4px solid var(--color-lime);
    padding-bottom: 0.5rem;
    display: inline-block; /* To make border follow text width */
    transform: skewX(-5deg); /* Brutalist skew */
    margin: 0 auto 2rem auto;
}

/* About Section - Two Column */
.about-section {
    background-color: var(--color-black);
    padding-top: 5rem; /* Account for overlap */
    padding-bottom: 5rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
    border: 3px solid var(--color-red); /* Unpolished border */
    padding: 1.5rem;
}

.about-text {
    background-color: var(--color-black);
    padding: 1rem;
    border-right: 2px solid var(--color-lime); /* Exposed structure */
}

.about-text h2 {
    text-align: left;
    transform: none; /* No skew for sub-titles */
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--color-cobalt);
    padding-bottom: 0.3rem;
    display: inline-block;
}

.about-text p {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    line-height: 1.4;
    padding-bottom: 1rem;
    color: var(--color-white);
}

.about-image {
    background-color: var(--color-cobalt);
    padding: 0.5rem;
    transform: translateX(1rem) translateY(1rem); /* Overlap image */
    box-shadow: -8px -8px 0 var(--color-lime);
}
.about-image img {
    border: 2px solid var(--color-white); /* Exposed structure */
}


/* Services Section - Icon Grid (Text Grid) */
.services-section {
    background-color: var(--color-black);
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive 3-card layout */
    gap: 1.5rem;
    margin-top: 3rem;
}

.service-card {
    background-color: var(--color-black);
    border: 2px solid var(--color-cobalt); /* Unpolished border */
    padding: 1.5rem;
    box-shadow: 5px 5px 0 var(--color-red); /* Blocky shadow */
    transition: transform 0.0001s ease-in-out, box-shadow 0.0001s ease-in-out;
}

.service-card:hover {
    transform: translateY(-5px) rotate(1deg); /* Slight hover effect for brutalism */
    box-shadow: 8px 8px 0 var(--color-lime);
}

.service-card h3 {
    color: var(--color-lime);
    margin-bottom: 0.8rem;
    border-bottom: 1px dashed var(--color-white); /* Raw underline */
    padding-bottom: 0.5rem;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
}

.service-card p {
    font-size: clamp(0.85rem, 1.8vw, 1rem);
    line-height: 1.3;
    padding-bottom: 0.8rem;
    color: var(--color-white);
}

/* Features Section - Visual Showcase */
.features-section {
    background-color: var(--color-red); /* Accent background */
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.features-visual-grid {
    display: grid;
    grid-template-columns: 1fr; /* Default to single column */
    gap: 2rem;
    margin-top: 3rem;
    border: 5px solid var(--color-black);
    padding: 1.5rem;
    background-color: var(--color-black);
}

.feature-item {
    background-color: var(--color-black);
    border: 2px solid var(--color-lime);
    box-shadow: 6px 6px 0 var(--color-cobalt);
    overflow: hidden; /* Contains images */
    display: flex;
    flex-direction: column;
}

.feature-item img {
    width: 100%;
    height: 300px; /* Fixed height for visual consistency, object-fit handles ratio */
    object-fit: cover;
    border-bottom: 1px dashed var(--color-lime); /* Unpolished separator */
}

.feature-content {
    padding: 1.5rem;
    text-align: left;
}

.feature-content h3 {
    color: var(--color-red);
    margin-bottom: 0.8rem;
    border-bottom: 1px solid var(--color-white);
    padding-bottom: 0.5rem;
    font-size: clamp(1.4rem, 3.5vw, 2rem);
}

.feature-content p {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    line-height: 1.4;
    padding-bottom: 0.8rem;
    color: var(--color-white);
}

/* Showcase Section - Achievements Timeline */
.showcase-section {
    background-color: var(--color-black);
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.timeline {
    position: relative;
    padding: 2rem 0;
    border-left: 3px solid var(--color-red); /* Central timeline line */
    margin: 0 auto;
    max-width: 900px;
}

.timeline-item {
    position: relative;
    padding: 1rem 0 1rem 3rem; /* Padding for content to the right of the line */
    margin-bottom: 2rem;
    border: 2px solid var(--color-cobalt); /* Item border */
    background-color: var(--color-black);
    box-shadow: 4px 4px 0 var(--color-lime);
    left: 1rem; /* Push right to overlap the line */
    width: calc(100% - 2rem); /* Width adjustment */
}

.timeline-dot {
    position: absolute;
    left: -0.7rem; /* Align with the timeline line */
    top: 1.5rem;
    width: 1.2rem;
    height: 1.2rem;
    background-color: var(--color-lime);
    border: 2px solid var(--color-red); /* Accent dot */
    transform: rotate(45deg); /* Brutalist square dot */
    z-index: 2;
}

.timeline-item:nth-child(even) {
    left: -1rem; /* Alternate sides for broken grid */
    box-shadow: -4px 4px 0 var(--color-red);
}

.timeline-item:nth-child(even) .timeline-dot {
    left: calc(100% - 0.5rem); /* Move dot to right side */
    transform: rotate(-45deg);
    border-color: var(--color-lime);
    background-color: var(--color-red);
}

.timeline-title {
    color: var(--color-red);
    margin-bottom: 0.5rem;
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    border-bottom: 1px dotted var(--color-white);
    padding-bottom: 0.3rem;
}

.timeline-content p {
    font-size: clamp(0.85rem, 1.8vw, 1rem);
    line-height: 1.4;
    padding-bottom: 0.8rem;
    color: var(--color-white);
}

/* Team Section - Card Layout (3 per row) */
.team-section {
    background-color: var(--color-cobalt); /* Accent background */
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.team-card {
    background-color: var(--color-black);
    border: 3px solid var(--color-white); /* Unpolished border */
    padding: 1rem;
    text-align: center;
    box-shadow: 7px 7px 0 var(--color-red); /* Blocky shadow */
    transition: transform 0.0001s, box-shadow 0.0001s;
    transform: rotate(2deg); /* Initial rotation */
}

.team-card:nth-child(even) {
    transform: rotate(-2deg); /* Alternate rotation */
    box-shadow: -7px 7px 0 var(--color-lime);
}

.team-card:hover {
    transform: scale(1.02) rotate(0deg); /* Snap to straight on hover */
    box-shadow: 10px 10px 0 var(--color-lime);
}

.team-card img {
    width: 150px;
    height: 150px;
    border-radius: 0; /* No border-radius for brutalism */
    border: 2px solid var(--color-lime);
    margin: 0 auto 1rem auto;
    object-fit: cover;
    transform: translateY(-0.5rem); /* Slight overlap */
    box-shadow: 3px 3px 0 var(--color-red);
}

.team-name {
    color: var(--color-lime);
    margin-bottom: 0.3rem;
    font-size: clamp(1.3rem, 2.8vw, 1.8rem);
    border-bottom: 1px solid var(--color-white);
    padding-bottom: 0.2rem;
}

.team-role {
    color: var(--color-white);
    font-family: var(--font-body);
    font-weight: normal;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.team-bio {
    font-size: clamp(0.8rem, 1.7vw, 0.95rem);
    line-height: 1.3;
    color: var(--color-white);
    text-align: left;
    padding-bottom: 0.8rem;
    border-top: 1px dashed var(--color-cobalt);
    padding-top: 0.5rem;
}

/* Testimonials - Social Proof */
.testimonials-section {
    background-color: var(--color-black);
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.testimonial-card {
    background-color: var(--color-black);
    border: 2px solid var(--color-red);
    padding: 1.5rem;
    box-shadow: -5px 5px 0 var(--color-lime); /* Offset shadow */
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: "“"; /* Large quote mark as brutalist element */
    font-family: var(--font-impact);
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.1);
    position: absolute;
    top: -2rem;
    left: -1rem;
    z-index: 0;
    line-height: 1;
}

.testimonial-card img {
    width: 60px;
    height: 60px;
    border: 2px solid var(--color-white);
    margin-bottom: 1rem;
    float: left; /* Image floats left for social media style */
    margin-right: 1rem;
    box-shadow: 2px 2px 0 var(--color-cobalt);
}

.testimonial-quote {
    font-family: var(--font-body);
    font-style: italic;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    line-height: 1.4;
    color: var(--color-white);
    margin-bottom: 1rem;
    text-align: left;
    padding-left: 70px; /* Space for floating image */
    position: relative;
    z-index: 1;
}

.testimonial-author {
    font-family: var(--font-heading);
    color: var(--color-lime);
    font-size: clamp(0.8rem, 1.8vw, 1rem);
    text-align: right; /* Author aligned right */
    border-top: 1px solid var(--color-white);
    padding-top: 0.5rem;
    margin-top: 1rem;
    clear: both; /* Clear float */
}


/* Gallery Section - Masonry Layout */
.gallery-section {
    background-color: var(--color-red); /* Accent background */
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-auto-rows: minmax(100px, auto); /* Allows items to stretch */
    gap: 1rem;
    margin-top: 3rem;
    border: 5px solid var(--color-black);
    padding: 1rem;
    background-color: var(--color-black);
}

.masonry-item {
    width: 100%;
    height: auto;
    object-fit: cover;
    border: 2px solid var(--color-lime);
    box-shadow: 3px 3px 0 var(--color-cobalt);
    transition: transform 0.0001s, box-shadow 0.0001s;
}

/* Custom spans for varying sizes in masonry */
.gallery-masonry img:nth-child(1) { grid-row: span 2; } /* Tall */
.gallery-masonry img:nth-child(2) { grid-column: span 1; }
.gallery-masonry img:nth-child(3) { grid-row: span 3; } /* Taller */
.gallery-masonry img:nth-child(4) { grid-column: span 1; }
.gallery-masonry img:nth-child(5) { grid-row: span 2; }
.gallery-masonry img:nth-child(6) { grid-column: span 1; }
.gallery-masonry img:nth-child(7) { grid-row: span 2; grid-column: span 1; } /* Tall and normal width */
.gallery-masonry img:nth-child(8) { grid-column: span 1; }

.masonry-item:hover {
    transform: scale(1.03) rotate(1deg);
    box-shadow: 5px 5px 0 var(--color-red);
    z-index: 2; /* Bring to front on hover */
}

/* Footer */
.footer {
    background-color: var(--color-black);
    color: var(--color-white);
    text-align: center;
    padding: 2rem 1rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    border-top: 4px solid var(--color-lime); /* Exposed structure */
    margin-top: -3rem; /* Overlap with last section */
    position: relative;
    z-index: 1;
}

.footer-content p {
    line-height: 1.5;
    padding-bottom: 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-top: 1rem;
    }

    .logo {
        margin-bottom: 1rem;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .hero-content {
        transform: none; /* Remove rotation on small screens */
        box-shadow: none;
        border: none;
        padding: 1rem;
    }
    
    .hero-description {
        text-align: center; /* Center on mobile */
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .about-text {
        border-right: none;
        border-bottom: 2px solid var(--color-lime); /* Add bottom border */
        padding-bottom: 1rem;
    }

    .about-image {
        transform: none; /* Remove overlap transform */
        box-shadow: none;
        padding: 0;
        background-color: transparent;
    }

    .services-grid,
    .team-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-item {
        flex-direction: column; /* Stack image and content */
    }

    .feature-item img {
        height: 200px; /* Smaller height for mobile images */
    }

    .features-visual-grid {
        border: none;
        padding: 0;
        box-shadow: none;
    }

    .timeline-item,
    .timeline-item:nth-child(even) {
        left: 0;
        width: 100%;
        box-shadow: 4px 4px 0 var(--color-lime); /* Consistent shadow */
    }

    .timeline-dot {
        left: -0.7rem; /* Always left aligned */
        transform: rotate(45deg);
    }
    .timeline-item:nth-child(even) .timeline-dot {
        left: -0.7rem;
        transform: rotate(45deg);
        background-color: var(--color-lime);
        border-color: var(--color-red);
    }

    .team-card,
    .team-card:nth-child(even) {
        transform: none; /* Remove rotation */
        box-shadow: 7px 7px 0 var(--color-red); /* Consistent shadow */
    }

    .testimonial-card img {
        float: none;
        margin: 0 auto 1rem auto;
        display: block;
    }
    .testimonial-quote {
        padding-left: 0; /* No space for floating image */
        text-align: center;
    }
    .testimonial-author {
        text-align: center;
    }

    .gallery-masonry {
        grid-template-columns: 1fr; /* Single column for masonry on mobile */
        grid-auto-rows: auto;
        border: none;
        padding: 0;
    }
    .gallery-masonry img {
        grid-row: auto !important; /* Reset specific grid spans */
        grid-column: auto !important;
        height: 250px; /* Consistent height for mobile */
        width: 100%;
    }

    .overlap-top, .overlap-bottom {
        margin-top: -1rem; /* Reduce overlap on mobile */
        margin-bottom: -1rem;
    }
}

/* Visible state helpers */
+ .animate-fade-in-up.visible,
+ .animate-fade-in-left.visible,
+ .animate-fade-in-right.visible,
+ .animate-bounce-y.visible,
+ .section-scroll-animate.visible,
+ .text-animate-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Universal Icon Fixes for Buttons */
button svg, .carousel-next svg, .carousel-prev svg, .slider-next svg, .slider-prev svg,
.next svg, .prev svg, .tab-button svg, .tab-btn svg {
    display: inline-block;
    vertical-align: middle;
    pointer-events: none;
    width: 1em;
    height: 1em;
    fill: currentColor;
}

button i, .carousel-next i, .carousel-prev i, .slider-next i, .slider-prev i,
.next i, .prev i, .tab-button i, .tab-btn i {
    display: inline-block;
    vertical-align: middle;
    pointer-events: none;
    font-style: normal;
}

button .icon, .carousel-next .icon, .carousel-prev .icon,
.slider-next .icon, .slider-prev .icon, .tab-button .icon {
    display: inline-block;
    vertical-align: middle;
    pointer-events: none;
}

/* Ensure carousel buttons are clickable even with icons */
.carousel-next, .carousel-prev, .slider-next, .slider-prev,
.next, .prev, .next-btn, .prev-btn {
    cursor: pointer;
    position: relative;
}

.carousel-next *, .carousel-prev *, .slider-next *, .slider-prev *,
.next *, .prev *, .next-btn *, .prev-btn * {
    pointer-events: none;
}

/* Tab button icon fixes */
.tab-button, .tab-btn, .tab {
    cursor: pointer;
    position: relative;
}

.tab-button *, .tab-btn *, .tab * {
    pointer-events: none;
}

/* Ensure icons don't block clicks */
button > svg, button > i, button > .icon,
.carousel-next > svg, .carousel-prev > svg,
.tab-button > svg, .tab-button > i {
    pointer-events: none !important;
}

/* Enhanced: Team grid stabilization */
+ .team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
+ @media (max-width: 900px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
+ @media (max-width: 600px) { .team-grid { grid-template-columns: 1fr; } }

/* Safe visibility overrides (auto-added) */
:root, html, body, main, header, footer, section, .container, .content {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Accessibility focus outlines */
:focus{outline:2px solid #5ac8fa;outline-offset:2px;}
:focus:not(:focus-visible){outline:none;}
