/* ==========================================================================
   VARIABLES & BASE STYLES
   ========================================================================== */
:root {
    --bg-white: #FFFFFF;
    --bg-off-white: #F9FAFB;
    --charcoal: #1A1A1A;
    --charcoal-light: #4A5568;
    --brand-green: #177B57;
    --accent-green: #21BF61;
    --border-color: #e0e0e0;
    --text-muted: #A0AEC0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-white);
    background-image: 
        linear-gradient(rgba(23, 123, 87, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 123, 87, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    color: var(--charcoal);
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ==========================================================================
   TYPOGRAPHY & BUTTONS
   ========================================================================== */
h1, h2, h3, .logo, .stat-number, .mega-card h4, .cookie-title {
    font-family: 'Playfair Display', serif;
    color: var(--brand-green);
}

h1 {
    font-size: 3.8rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: var(--charcoal);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--charcoal);
}

.hero-text h1 {
    font-size: 3.1rem !important;
    line-height: 1.15 !important;
    max-width: 900px;
}

.badge {
    display: inline-block;
    color: var(--brand-green);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-left: 3px solid var(--accent-green);
    padding-left: 0.8rem;
    margin-bottom: 1.5rem;
}

.btn-primary {
    background: var(--brand-green);
    color: var(--bg-white) !important;
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    transition: background 0.3s ease;
    border-radius: 2px;
}

.btn-primary:hover {
    background: var(--charcoal);
}

.btn-secondary {
    display: inline-block;
    padding: 1rem 1.5rem;
    border: 1px solid var(--charcoal);
    border-radius: 2px;
    background: transparent;
    color: var(--charcoal) !important;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--brand-green);
    background: var(--brand-green);
    color: var(--bg-white) !important;
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.hero-buttons .btn-primary, 
.hero-buttons .btn-secondary {
    padding: 0.8rem 1.5rem !important;
    font-size: 0.85rem !important;
    margin: 0 !important;
    white-space: nowrap;
}

.section-intro {
    max-width: 760px;
    margin-bottom: 2.5rem;
}

.section-intro p {
    color: var(--charcoal-light);
    font-size: 1.08rem;
}

.value-section {
    position: relative;
    overflow: hidden;
    padding-top: 6rem !important;
    padding-bottom: 6rem !important;
}

.value-section::after {
    position: absolute;
    top: 2rem;
    right: 5%;
    width: 180px;
    height: 180px;
    border: 1px solid rgba(23, 123, 87, 0.16);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.value-section .section-intro {
    position: relative;
    z-index: 1;
    max-width: 860px;
}

.value-section .section-intro h2 {
    max-width: 800px;
    margin-bottom: 1.25rem;
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    line-height: 1.08;
}

.value-section .section-intro p {
    max-width: 720px;
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.8rem;
}

.value-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 205px;
    padding: 1.5rem 1.35rem;
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--brand-green);
    background: var(--bg-white);
    box-shadow: 0 8px 24px rgba(26, 26, 26, 0.04);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.value-card:hover {
    border-color: var(--brand-green);
    box-shadow: 0 14px 30px rgba(26, 26, 26, 0.08);
    transform: translateY(-4px);
}

.value-index {
    color: var(--brand-green);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.value-card strong {
    color: var(--charcoal);
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    line-height: 1.15;
}

.value-card .value-formula {
    margin-top: auto;
    color: var(--charcoal-light);
    font-size: 0.82rem;
    line-height: 1.55;
}

.value-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 2rem;
    padding: 1.35rem 1.5rem 1.35rem 1.75rem;
    border: 1px solid var(--charcoal);
    border-left: 4px solid var(--brand-green);
    background: var(--charcoal);
    color: var(--bg-white);
}

.value-callout-copy {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.value-callout-label {
    color: var(--accent-green);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.value-callout p {
    margin: 0;
}

.value-callout .btn-primary {
    flex-shrink: 0;
    background: var(--accent-green);
    color: var(--charcoal) !important;
}

.value-callout .btn-primary:hover {
    background: var(--bg-white);
}

.decision-flow {
    display: flex;
    align-items: stretch;
    gap: 0.7rem;
}

.decision-flow > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.55rem;
    min-height: 125px;
    padding: 1.2rem;
    border: 1px solid var(--border-color);
    background: var(--bg-off-white);
}

.decision-flow span {
    color: var(--brand-green);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.decision-flow b {
    align-self: center;
    color: var(--brand-green);
    font-size: 1.3rem;
}

.decision-flow .decision-final {
    color: var(--bg-white);
    background: var(--brand-green);
    border-color: var(--brand-green);
}

.decision-flow .decision-final span {
    color: var(--bg-white);
}

.assessment-preview {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.assessment-preview-copy p {
    max-width: 680px;
    color: var(--charcoal-light);
    font-size: 1.08rem;
}

.check-list {
    display: grid;
    gap: 0.7rem;
    margin: 1.5rem 0 2rem;
    padding: 0;
    list-style: none;
}

.check-list li::before {
    margin-right: 0.7rem;
    color: var(--brand-green);
    content: "✓";
    font-weight: 700;
}

.assessment-price {
    padding: 2rem;
    border-top: 4px solid var(--brand-green);
    background: var(--bg-white);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
}

.assessment-price-label {
    display: block;
    color: var(--charcoal-light);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.assessment-price strong {
    display: block;
    margin: 0.5rem 0 1rem;
    color: var(--brand-green);
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
}

.assessment-price p,
.assessment-price small {
    color: var(--charcoal-light);
}

.assessment-price small {
    display: block;
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   HEADER, NAVBAR & DROPDOWNS
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .logo img {
    height: 45px;
    width: auto;
    display: block;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--charcoal);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent-green);
}

/* Dropdown Base */
.nav-item {
    position: relative;
}

.nav-item.has-mega-menu {
    position: static;
}

/* Rotating Arrow Indicator */
.nav-link.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.nav-link.dropdown-toggle::after {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-top: -4px;
    border-right: 2px solid var(--brand-green);
    border-bottom: 2px solid var(--brand-green);
    transform: rotate(45deg);
    transition: transform 180ms ease, border-color 180ms ease;
}

.nav-link.dropdown-toggle[aria-expanded="true"]::after,
.nav-item:hover > .nav-link.dropdown-toggle::after {
    transform: rotate(225deg);
    border-color: var(--accent-green);
}

.nav-link.dropdown-toggle:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 4px;
}

/* Dropdown Containers */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--brand-green);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    
    /* Narrower standard width that hugs text */
    min-width: 220px; 
    width: max-content;
    max-width: 320px;
    padding: 0.5rem 0;
    
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 180ms ease, transform 180ms cubic-bezier(0.16, 1, 0.3, 1), visibility 180ms ease;
    z-index: 200;
}

/* Desktop Open States */
@media (min-width: 769px) {
    /* Standard Dropdown Hover */
    .nav-item:hover > .dropdown-menu:not(.mega-menu),
    .nav-item:focus-within > .dropdown-menu:not(.mega-menu),
    .dropdown-menu.open:not(.mega-menu) {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    /* Mega Menu Hover (Maintains the horizontal center) */
    .nav-item:hover > .mega-menu,
    .nav-item:focus-within > .mega-menu,
    .mega-menu.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }
}

/* Standard Dropdown Styling */
.dropdown-menu a {
    padding: 0.8rem 1.5rem;
    display: block;
    text-transform: none;
    font-weight: 500;
    color: var(--charcoal);
    font-size: 0.95rem;
    transition: background-color 150ms ease, color 150ms ease, padding-left 150ms ease;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
    padding-left: 1.7rem;
    color: var(--brand-green);
    background-color: var(--bg-off-white);
}

/* Mega Menu Structure */
.mega-menu {
    left: 50%; /* Anchor to the middle of the parent link */
    right: auto;
    
    /* Let the content dictate width, with a sensible cap */
    width: max-content; 
    max-width: 850px; 
    
    padding: 0;
    display: flex;
    flex-direction: column;
    
    /* Keep it perfectly centered while animating */
    transform: translateX(-50%) translateY(10px); 
}

.mega-menu-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 0;
}

.mega-col {
    padding: 2.5rem 2rem;
    border-right: 1px solid var(--border-color);
    text-align: center;
}

.mega-col:last-child {
    border-right: none;
}

.mega-col-header {
    font-size: 0.8rem;
    color: var(--brand-green);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.blue-dot {
    width: 6px;
    height: 6px;
    background-color: var(--brand-green);
    border-radius: 50%;
}

.mega-col-sub {
    font-size: 0.7rem;
    color: var(--charcoal-light);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 2.5rem;
}

.mega-service {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    text-decoration: none;
}

.mega-service:last-child {
    margin-bottom: 0;
}

.service-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.3rem;
}

.mega-service:hover .service-name {
    color: var(--brand-green);
}

.service-tech {
    font-size: 0.7rem;
    color: var(--charcoal-light);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.mega-menu-footer {
    background-color: var(--bg-off-white);
    padding: 1.5rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
}

.mega-footer-question {
    font-size: 0.8rem;
    color: var(--charcoal-light);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
}

.mega-footer-cta {
    font-size: 0.9rem;
    color: var(--brand-green);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-decoration: none;
    transition: color 0.3s;
}

.mega-footer-cta:hover {
    color: var(--charcoal);
}

/* Hamburger Icon */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 999;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--brand-green);
    transition: all 0.3s ease-in-out;
    border-radius: 2px;
}

/* ==========================================================================
   SECTIONS & LAYOUTS
   ========================================================================== */
.section-container {
    padding: 5rem 5%;
    max-width: 1300px;
    margin: 0 auto;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8rem 5%;
    max-width: 1300px;
    margin: 0 auto;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(23,123,87,0.04) 0%, rgba(255,255,255,0) 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-text {
    flex: 1;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    max-width: 600px;
}

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-profile-pic {
    width: 100%;
    max-width: 450px;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-bottom: 6px solid var(--brand-green);
    filter: grayscale(20%);
}

/* Editorial Cards */
.editorial-card {
    background: var(--bg-white);
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

.editorial-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--charcoal);
}

.editorial-card a.btn-primary {
    border-bottom: none;
    padding: 0.6rem 1.2rem;
    margin-top: 2rem;
    font-size: 0.85rem;
}

/* Article Layout */
.article-layout {
    display: flex;
    gap: 4rem;
    padding: 5rem 5%;
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
}

.article-sidebar {
    width: 250px;
    position: sticky;
    top: 100px;
    height: fit-content;
    border-left: 1px solid var(--border-color);
    padding-left: 2rem;
}

.article-sidebar h4 {
    color: var(--brand-green);
    margin-bottom: 1rem;
}

.article-content {
    flex: 1;
}

.article-content p, .article-content ul {
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
}

.article-content ul {
    margin: 2rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 1rem;
}

/* Global Delivery */
.delivery-section {
    background-color: var(--bg-off-white);
    padding: 6rem 5%;
    border-top: 1px solid var(--border-color);
}

.delivery-content {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.delivery-text h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    border-bottom: none;
}

.delivery-text p {
    font-size: 1.1rem;
    color: var(--charcoal-light);
    margin-bottom: 1.5rem;
}

.delivery-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.stat-box {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--charcoal-light);
    margin-top: 0.5rem;
    font-weight: 600;
}

/* Projects Section */
.projects-section {
    padding: 5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

.project-card {
    background: var(--bg-white);
    padding: 4rem;
    border-top: 4px solid var(--brand-green);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.tag {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--brand-green);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--accent-green);
    padding-bottom: 0.2rem;
}

.project-card h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.architecture-details {
    background: #fdfdfd;
    padding: 2.5rem;
    margin-top: 2.5rem;
    border-left: 3px solid var(--brand-green);
}

.architecture-details strong {
    font-size: 1.1rem;
    color: var(--brand-green);
}

.architecture-details ul {
    list-style-type: square;
    list-style-position: inside;
    margin-top: 1.5rem;
    color: var(--charcoal);
}

.architecture-details li {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

/* Professional Profile */
.profile-section {
    padding: 6rem 5%;
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.profile-header h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.profile-content p {
    font-size: 1.15rem;
    color: var(--charcoal-light);
    margin-bottom: 1.5rem;
}

.profile-content strong {
    color: var(--brand-green);
}

/* Infinite Marquee Stack */
.stack-section {
    padding: 4rem 0;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.stack-title {
    text-align: center;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--charcoal-light);
    margin-bottom: 2.5rem;
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: inline-block;
    animation: scroll-left 35s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.marquee-track img {
    height: 40px;
    margin: 0 2.5rem;
    vertical-align: middle;
    filter: grayscale(100%) opacity(0.6);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.marquee-track img:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

/* Advanced Grids */
.split-section {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.sticky-rail {
    position: sticky;
    top: 120px;
}

.cards-rail {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.process-card {
    background: var(--bg-off-white);
    padding: 2.5rem 2rem;
    border-top: 4px solid var(--brand-green);
    display: flex;
    flex-direction: column;
}

.tech-pill-container {
    margin-top: auto;
    padding-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tech-pill {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--charcoal-light);
    border-radius: 20px;
}

.risk-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem 4rem;
    margin-top: 3rem;
}

.risk-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Tools Wall Section */
.tools-wall {
    padding: 5rem 5%;
    background-color: var(--bg-off-white);
    border-top: 1px solid var(--border-color);
}

.tools-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.tools-title {
    font-size: 1rem;
    color: var(--charcoal-light);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 3rem;
    font-weight: 700;
}

.tools-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4rem;
}

.tool-logo {
    height: 45px; 
    width: auto;
    filter: grayscale(100%) contrast(120%) opacity(75%); 
    transition: all 0.4s ease;
    mix-blend-mode: multiply; 
}

.tool-logo:hover {
    filter: grayscale(0%) contrast(100%) opacity(100%); 
    transform: translateY(-3px);
}

/* ==========================================================================
   MODALS & COOKIE BANNER
   ========================================================================== */
.modal {
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(26, 26, 26, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: var(--bg-white);
    width: 90%;
    max-width: 750px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 3.5rem;
    border-top: 4px solid var(--brand-green);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    z-index: 2001;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem; 
    right: 2rem;
    font-size: 2.5rem;
    line-height: 1;
    color: var(--charcoal-light);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--brand-green);
}

.portfolio-card {
    cursor: pointer;
    position: relative;
}

.portfolio-card::after {
    content: 'View Architecture Details →';
    display: block;
    margin: 2rem 2.5rem 2.5rem 2.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--brand-green);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s;
}

.portfolio-card:hover::after {
    color: var(--charcoal);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    max-width: 420px;
    background: var(--charcoal);
    color: var(--bg-white);
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border-left: 4px solid var(--brand-green);
    z-index: 9999;
    transform: translateY(150%);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.show {
    transform: translateY(0);
    opacity: 1;
}

.cookie-text { 
    font-size: 0.85rem; 
    line-height: 1.6; 
    margin-bottom: 1.5rem; 
    color: #A0AEC0; 
}

.cookie-text a { 
    color: var(--brand-green); 
    text-decoration: none; 
    font-weight: 600; 
}

.cookie-text a:hover {
    text-decoration: underline;
}

.cookie-buttons { display: flex; gap: 1rem; }

.cookie-btn { 
    padding: 0.6rem 1.2rem; 
    font-size: 0.8rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    cursor: pointer; 
    border: none; 
    transition: all 0.3s ease;
}

.btn-accept { background: var(--brand-green); color: var(--bg-white); }
.btn-accept:hover { background: var(--accent-green); }

.btn-decline { background: transparent; color: #E2E8F0; border: 1px solid #4A5568; }
.btn-decline:hover { background: rgba(255,255,255,0.05); border-color: #E2E8F0; }

/* ==========================================================================
   FOOTERS
   ========================================================================== */
.global-footer, .fat-footer {
    background-color: var(--bg-white);
    border-top: 4px solid var(--brand-green);
}

.global-footer {
    padding: 4rem 5% 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.fat-footer {
    padding: 5rem 5% 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    max-width: 1300px;
    margin: 0 auto 4rem auto;
}

.footer-col h4 {
    font-size: 1rem;
    color: var(--charcoal);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.8rem; }
.footer-col ul a {
    color: var(--charcoal-light);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}
.footer-col ul a:hover { color: var(--brand-green); }

.footer-logo img {
    height: 50px;
    margin-bottom: 2rem;
    filter: grayscale(100%) opacity(80%);
    transition: filter 0.3s ease;
}

.footer-logo img:hover { filter: grayscale(0%) opacity(100%); }

.footer-links {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: var(--charcoal-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links a:hover { color: var(--brand-green); }

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-icons a {
    color: var(--charcoal-light);
    transition: color 0.3s, transform 0.3s;
}

.social-icons a:hover {
    color: var(--brand-green);
    transform: translateY(-2px);
}

.disclaimer-text {
    max-width: 800px;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.disclaimer-text a { transition: color 0.3s; }
.disclaimer-text a:hover,
.disclaimer-text a:focus-visible { color: var(--brand-green) !important; }
.disclaimer-text.gsap-reveal { opacity: 1 !important; transform: none !important; }

/* ==========================================================================
   MOBILE RESPONSIVENESS (MEDIA QUERIES)
   ========================================================================== */

/* Mobile Devices (Max Width: 768px) */
@media (max-width: 768px) {
    /* 1. Prevent Horizontal Scrolling & Overflow */
    html, body { width: 100%; max-width: 100vw; overflow-x: hidden; }

    /* Hide Desktop-Specific Elements */
    .hero-image-container, .value-section::after { display: none !important; }

    /* 2. Touch-Optimized Navigation & Header */
    .navbar { position: sticky; min-height: 72px; padding: 1rem 5% !important; }
    .navbar .logo img { height: 35px; max-width: 70vw; }

    .menu-toggle {
        display: flex; align-items: center; justify-content: center;
        order: 3; width: 44px; height: 44px; margin-left: auto;
        padding: 10px; border: 0; background: transparent; cursor: pointer;
    }
    .menu-toggle .bar { width: 24px; height: 3px; }
    nav { order: 2; }

    /* Smooth Slide-Down Mobile Menu */
    nav ul {
        position: absolute; top: 100%; left: 0; display: flex; flex-direction: column;
        align-items: stretch; width: 100%; max-height: calc(100vh - 72px);
        overflow-y: auto; padding: 1rem 5% 1.5rem !important; gap: 0.35rem !important;
        background: var(--bg-white); border-top: 1px solid var(--border-color);
        box-shadow: 0 16px 28px rgba(26, 26, 26, 0.1); transform: translateY(-12px);
        opacity: 0; visibility: hidden; pointer-events: none;
        transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1), opacity 220ms ease, visibility 0s linear 280ms;
        z-index: 100;
    }
    
    nav ul.active {
        transform: translateY(0); opacity: 1; visibility: visible;
        pointer-events: auto; transition-delay: 0s;
    }

    /* Enforce Touch Targets on Links */
    nav ul > li > a, .nav-link.dropdown-toggle, .mega-footer-cta {
        display: flex; align-items: center; min-height: 44px; width: 100%; padding: 0.65rem 0.75rem;
    }
    nav ul > li > a.btn-primary { justify-content: center; width: 100%; margin-top: 0.5rem; }

    #mobile-menu.is-active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    #mobile-menu.is-active .bar:nth-child(2) { opacity: 0; }
    #mobile-menu.is-active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    /* Mobile Dropdown Resets */
    .dropdown-menu, .mega-menu {
        position: static; display: none; width: 100% !important; max-width: none;
        max-height: none; margin: 0.25rem 0 0.5rem; padding: 0.5rem !important;
        border: 0; border-left: 2px solid var(--brand-green); box-shadow: none;
        background: var(--bg-off-white); opacity: 1; visibility: visible;
        pointer-events: auto; transform: none !important;
    }
    .dropdown-menu.open, .nav-item:focus-within > .dropdown-menu { display: block !important; }
    .dropdown-menu a, .mega-service { min-height: 44px; margin: 0; padding: 0.7rem 0.75rem; }
    .nav-link.dropdown-toggle::after { width: 8px; height: 8px; margin-left: auto; margin-top: -4px; }
    .mega-menu-content { grid-template-columns: 1fr; }
    .mega-col { padding: 1rem 0.5rem; border-right: 0; border-bottom: 1px solid var(--border-color); }
    .mega-menu-footer { flex-direction: column; align-items: stretch; gap: 0.5rem; padding: 1rem; text-align: center; }

    /* 3. Typography Scaling */
    h1, .hero-text h1 { max-width: 100%; font-size: clamp(2rem, 8vw, 2.5rem) !important; line-height: 1.12 !important; text-wrap: balance; }
    h2, .value-section .section-intro h2 { font-size: clamp(1.65rem, 6vw, 2.1rem) !important; line-height: 1.18; text-wrap: balance; }
    h3 { line-height: 1.25; }
    body { font-size: 0.95rem; line-height: 1.6; }
    .section-intro p, .hero-text p, .assessment-preview-copy p { font-size: 1rem; }

    /* 4. Breathing Room & Padding Refinements */
    .hero { padding: 3rem 5% 3.5rem; gap: 2rem; }
    .section-container, .projects-section, .delivery-section, .profile-section, .tools-wall, .global-footer, .article-layout { padding-top: 2.75rem; padding-bottom: 2.75rem; }

    /* 5. Clean Grid Stacking */
    .split-section, .process-grid, .risk-grid, .dimension-grid, .grid-2, .assessment-preview, .value-grid, .projects-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .sticky-rail { position: relative; top: 0; margin-bottom: 0.5rem; }
    .project-card, .process-card, .architecture-details, .assessment-price, .modal-content { padding: 1.5rem; }
    .value-card { min-height: 0; padding: 1.35rem; }

    /* 6. Fix Horizontal Overflows */
    .tools-grid { gap: 1.5rem; }
    .tool-logo { max-width: 100%; height: 32px; object-fit: contain; }
    .marquee-container { max-width: 100%; overflow: hidden; }
    .marquee-track img { height: 30px; margin: 0 1.25rem; }

    .hero-buttons, .value-callout { align-items: stretch; flex-direction: column; width: 100%; }

    /* Button Touch Targets */
    .hero-buttons .btn-primary, .hero-buttons .btn-secondary, .value-callout .btn-primary, .value-callout .btn-secondary, .btn-accept, .btn-decline {
        display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; width: 100%; text-align: center;
    }

    .decision-flow { flex-direction: column; }
    .decision-flow > div { min-height: auto; }
    .decision-flow b { transform: rotate(0); }

    /* =======================================================
       7. MOBILE PROGRESSIVE DISCLOSURE (ACCORDIONS)
       Applies to Diagnosis Cards, Vertical Expertise & Footer
       ======================================================= */
    
    /* Diagnosis Cards ("What's Holding Your Operations Back?") & Vertical Expertise */
    .editorial-card p, .editorial-card ul, .editorial-card .btn-primary {
        display: none; /* Hidden by default on mobile */
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }
    
    .editorial-card.active p, .editorial-card.active ul, .editorial-card.active .btn-primary {
        display: block; /* Shown when tapped */
    }

    .editorial-card h3 {
        position: relative;
        padding-right: 2rem;
        cursor: pointer;
        font-size: 1.3rem !important; /* Slightly smaller for mobile */
        margin-bottom: 0;
    }

    .editorial-card h3::after {
        content: '+';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        color: var(--brand-green);
        font-weight: 300;
        font-size: 1.5rem;
        transition: transform 0.3s ease;
    }

    .editorial-card.active h3::after {
        content: '−';
    }

    /* Footer Accordion */
    .global-footer, .fat-footer { padding: 2.75rem 5% 1.5rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 0; }
    .footer-col:first-child { padding-bottom: 1.5rem; border-bottom: 1px solid rgba(224, 224, 224, 0.7); }
    .footer-col:not(:first-child) { padding: 0; border-bottom: 1px solid rgba(224, 224, 224, 0.7); }
    .footer-col:not(:first-child) h4 { margin: 0; padding: 1.25rem 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 0.95rem; }
    .footer-col:not(:first-child) h4::after { content: '+'; font-size: 1.5rem; font-weight: 300; color: var(--brand-green); transition: transform 0.3s ease; }
    .footer-col.active h4::after { transform: rotate(45deg); }
    .footer-col:not(:first-child) ul { display: none; padding-bottom: 1.25rem; gap: 0; }
    .footer-col.active ul { display: grid; }
    .footer-col ul a, .footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.85rem; }

    /* Bottom Legal Bar adjustments */
    .disclaimer-text { flex-direction: column; align-items: center; text-align: center !important; gap: 1rem; margin-top: 1rem; border-top: none; }
    .disclaimer-text div { justify-content: center; }

    .cookie-banner { right: 0; bottom: 0; left: 0; max-width: 100%; border-left: 0; border-top: 4px solid var(--brand-green); }
}

/* Small Mobile Devices (Max Width: 480px) */
@media (max-width: 480px) {
    .navbar { padding-inline: 4% !important; }
    .navbar .logo img { height: 31px; }
    nav ul { padding-inline: 4% !important; }
    
    h1, .hero-text h1 { font-size: clamp(1.8rem, 9vw, 2.15rem) !important; }
    h2, .value-section .section-intro h2 { font-size: clamp(1.5rem, 7.5vw, 1.8rem) !important; }
    
    .hero { padding: 2.5rem 4% 3rem; }
    .section-container, .projects-section, .delivery-section, .profile-section, .tools-wall, .global-footer, .article-layout { padding: 2.5rem 4%; }
    
    .project-card, .process-card, .architecture-details, .assessment-price, .modal-content, .value-card { padding: 1.25rem; }
    
    .mega-col { padding-inline: 0.25rem; }
    .service-name { font-size: 1rem; }
    .service-tech { font-size: 0.65rem; letter-spacing: 0.1em; }
    .stack-title { margin-bottom: 1.5rem; }
    
    .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tool-logo { max-width: 85%; height: 28px; }
    .value-callout { padding: 1.25rem; }
    .footer-logo img { max-width: min(180px, 80vw); }
}