/* ==========================================================================
   CSS Variables & Theme
   ========================================================================== */
:root {
    color-scheme: dark;
    /* Color Palette */
    --bg-dark: #0f1623;
    --bg-darker: #050a12;
    --bg-light: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --bg-card-light: #ffffff;

    --primary: #1A365D;
    /* Brand Navy */
    --primary-hover: #122847;
    --secondary: #F26E22;
    /* Brand Orange */
    --accent: #E05A18;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #1A365D;
    /* Navy for light section headers */
    --text-dark-muted: #475569;

    --border-color: rgba(255, 255, 255, 0.1);
    --border-light: rgba(0, 0, 0, 0.08);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, #2A4A7A 100%);
    --gradient-accent: linear-gradient(135deg, #F98F4F 0%, var(--secondary) 100%);
    --gradient-text: linear-gradient(to right, #F98F4F, var(--secondary));

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions & Shadows */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(67, 97, 238, 0.3);
    --acn-gradient: linear-gradient(to top, rgba(15, 22, 35, 0.95) 0%, transparent 100%);
    --shape-opacity: 0.4;
    --glow-1: rgba(26, 54, 93, 0.35);
    --glow-2: rgba(242, 110, 34, 0.12);
    --glow-3: rgba(224, 90, 24, 0.08);
    --gradient-text-end: #ffffff;
    --nav-bg: rgba(10, 15, 28, 0.85);
    --globe-opacity: 1;
}

[data-theme="light"] {
    color-scheme: light;
    --bg-dark: #f8fafc;
    --bg-darker: #f1f5f9;
    --bg-light: #0f1623;
    --bg-card: rgba(0, 0, 0, 0.03);
    --bg-card-hover: rgba(0, 0, 0, 0.08);
    --bg-card-light: #050a12;

    --text-main: #0f1623;
    --text-muted: #475569;
    --text-dark: #f8fafc;
    --text-dark-muted: #94a3b8;

    --border-color: rgba(0, 0, 0, 0.1);
    --border-light: rgba(0, 0, 0, 0.08);
    --acn-gradient: linear-gradient(to top, rgba(248, 250, 252, 0.95) 0%, transparent 100%);
    --shape-opacity: 0.12;
    --glow-1: rgba(26, 54, 93, 0.06);
    --glow-2: rgba(242, 110, 34, 0.1);
    --glow-3: rgba(224, 90, 24, 0.06);
    --gradient-text-end: #1A365D;
    --nav-bg: rgba(248, 250, 252, 0.92);
    --globe-opacity: 1;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    animation: pageLoad 0.6s ease-out;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Persistent animated background shapes across all dark sections */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 500px 500px at 85% 10%, var(--glow-1), transparent 70%),
        radial-gradient(ellipse 600px 600px at 10% 45%, var(--glow-2), transparent 70%);
    animation: bgShapeDrift 25s ease-in-out infinite alternate;
}

@keyframes bgShapeDrift {
    0%, 100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}

/* Ensure all content sits above the background layer */
body>* {
    position: relative;
    z-index: 1;
}

@keyframes pageLoad {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.dark-section {
    background-color: transparent;
}

.gray-section {
    background-color: transparent;
    color: var(--text-dark);
}

.gray-section .section-desc {
    color: var(--text-dark-muted);
}

/* ==========================================================================
   Buttons & Links
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    border: none;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

/* Shimmer sweep effect on all buttons */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

/* Button icon animation */
.btn i {
    transition: transform 0.3s ease;
}

.btn:hover i {
    transform: translateX(4px);
}

.btn-nav {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    animation: pulseGlow 2s ease-in-out infinite;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-nav:hover {
    padding: 0.5rem 1.8rem;
    letter-spacing: 0.5px;
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 10px 25px rgba(242, 110, 34, 0.6);
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(242, 110, 34, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(242, 110, 34, 0.6), 0 0 40px rgba(242, 110, 34, 0.2);
    }
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 4px 15px rgba(242, 110, 34, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(242, 110, 34, 0.5);
    transform: translateY(-3px) scale(1.02);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(242, 110, 34, 0.3);
}

.btn-secondary {
    background-color: var(--bg-card);
    color: var(--text-main);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-card-hover);
    transform: translateY(-3px) scale(1.02);
    border-color: var(--secondary);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(26, 54, 93, 0.3);
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: var(--transition);
    background-color: transparent;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    border-bottom: 1px solid transparent;
    pointer-events: auto !important;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.navbar.scrolled {
    background-color: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .navbar {
    background-color: transparent !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
}

[data-theme="light"] .navbar.scrolled {
    background-color: rgba(248, 250, 252, 1) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* ═══════════════════════════════════════════
   BRAND LOGO — Official SVG Component
   ═══════════════════════════════════════════ */

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    cursor: pointer;
    height: 44px;
    margin-left: 2rem;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

/* ── Icon ── */
.brand-logo__icon {
    display: inline-flex;
    align-items: center;
    height: 100%;
    flex-shrink: 0;
    z-index: 2;
}
.brand-logo__icon img {
    height: 100%;
    width: auto;
    display: block;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center center;
}

/* ── Text halves ── */
.brand-logo__text {
    display: inline-flex;
    align-items: center;
    height: 55%;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-width 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.35s ease,
                margin 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    margin: 0;
}
.brand-logo__text img {
    height: 100%;
    width: auto;
    display: block;
    min-width: max-content;
}

/* ═══ DESKTOP ═══ */
@media (min-width: 769px) {
    .brand-logo {
        flex: 0 0 50px;
        width: 50px;
        overflow: visible;
        justify-content: center;
    }
    .brand-logo:hover .brand-logo__text {
        max-width: 200px;
        opacity: 1;
    }
    .brand-logo:hover .brand-logo__text--left {
        margin-right: 5px;
    }
    .brand-logo:hover .brand-logo__text--right {
        margin-left: 5px;
    }
    .brand-logo:hover .brand-logo__icon img {
        transform: rotate(360deg);
    }
}

/* ═══ MOBILE ═══ */
@media (max-width: 768px) {
    .brand-logo {
        margin: 0;
        height: 38px;
        width: auto;
        flex: 0 0 auto;
    }
    .brand-logo__text {
        max-width: 200px;
        opacity: 1;
    }
    .brand-logo__text--left { margin-right: 4px; }
    .brand-logo__text--right { margin-left: 4px; }

    .brand-logo.is-collapsed .brand-logo__text {
        max-width: 0;
        opacity: 0;
        margin: 0;
    }
    .brand-logo.is-collapsed .brand-logo__icon img {
        transform: rotate(-360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .brand-logo__text { transition: opacity 0.15s ease !important; }
    .brand-logo__icon img { transition: none !important; }
}

/* Let's Talk button click-expand */
.btn-nav {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.btn-nav.expanded {
    transform: scale(1.1);
    padding: 0.8rem 3rem;
    letter-spacing: 2px;
    box-shadow: 0 0 30px rgba(242, 110, 34, 0.5), 0 0 60px rgba(242, 110, 34, 0.2);
}

@keyframes btnPulseGlow {
    0% {
        box-shadow: 0 0 20px rgba(242, 110, 34, 0.4);
    }

    50% {
        box-shadow: 0 0 40px rgba(242, 110, 34, 0.6), 0 0 80px rgba(242, 110, 34, 0.2);
    }

    100% {
        box-shadow: 0 0 20px rgba(242, 110, 34, 0.4);
    }
}

/* Removed slow spinning animation from .icon-swirl */
.icon-swirl {
    transition: transform 0.6s ease;
}

.nav-links {
    display: flex;
    gap: 1.75rem;
}

.nav-page-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    position: relative;
    opacity: 0.8;
    cursor: pointer;
}

/* Parent link styling — visually identical to nav links.
   Now rendered as an anchor so click navigates to the section overview. */
.nav-parent-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-body);
    cursor: pointer;
    touch-action: manipulation;
    text-decoration: none;
    display: inline-block;
}

.nav-page-link:hover {
    color: var(--secondary);
    opacity: 1;
}

.nav-page-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}

.nav-page-link:hover::after,
.nav-page-link.active::after {
    width: 100%;
}

.nav-page-link.active {
    color: var(--secondary);
    opacity: 1;
}

/* ==========================================================================
   Desktop Hover Dropdowns
   ========================================================================== */
.nav-item-wrapper {
    position: relative;
    padding: 1rem 0; /* Creates hover bridge */
    margin: -1rem 0;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 240px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    transition-delay: 0.2s; /* 200ms delay before closing */
    z-index: 150;
    display: flex;
    flex-direction: column;
}

[data-theme="light"] .nav-dropdown {
    background: rgba(248, 250, 252, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Hover activates dropdown */
.nav-item-wrapper:hover .nav-dropdown,
.nav-item-wrapper[aria-expanded="true"] .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    transition-delay: 0s; /* No delay when opening */
}

.nav-dropdown-col {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-dropdown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 1rem;
}

.nav-dropdown.multi-col {
    min-width: 750px;
}

.nav-dropdown-group-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding: 0 16px;
    opacity: 0.8;
}

.nav-dropdown-link {
    display: block;
    padding: 10px 16px;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    text-align: left;
    white-space: nowrap;
}

.nav-dropdown-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--secondary);
}

[data-theme="light"] .nav-dropdown-link:hover {
    background: rgba(0, 0, 0, 0.04);
}

.theme-toggle-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.theme-toggle-btn:hover {
    background-color: var(--bg-card-hover);
    color: var(--secondary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==========================================================================
   Unified Background for Hero and Services
   ========================================================================== */
.unified-bg-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: transparent;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 8rem;
    overflow: hidden;
}

.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: var(--shape-opacity);
    animation: float 20s infinite alternate;
}

.shape-1 {
    top: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary), transparent 70%);
    animation-delay: 0s;
    animation-duration: 25s;
}

.shape-2 {
    bottom: 20%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--secondary), transparent 70%);
    animation-delay: -5s;
    animation-duration: 30s;
}

.shape-3 {
    top: 40%;
    left: 40%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    opacity: 0.25;
    animation-delay: -10s;
    animation-duration: 20s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    25% {
        transform: translate(50px, -30px) rotate(15deg) scale(1.05);
    }

    50% {
        transform: translate(100px, 50px) rotate(30deg) scale(0.95);
    }

    75% {
        transform: translate(60px, 80px) rotate(40deg) scale(1.02);
    }

    100% {
        transform: translate(100px, 50px) rotate(45deg) scale(1);
    }
}

.hero-container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hero-content {
    max-width: 550px;
    text-align: left;
}

/* Interactive Globe */
.hero-globe-wrapper {
    position: relative;
    flex-shrink: 0;
}

#globe-canvas {
    display: block;
    cursor: grab;
    filter: drop-shadow(0 0 30px rgba(26, 54, 93, 0.4));
    transition: filter 0.5s ease;
}

[data-theme="light"] #globe-canvas {
    filter: drop-shadow(0 8px 40px rgba(26, 54, 93, 0.35)) drop-shadow(0 0 15px rgba(242, 110, 34, 0.2));
}

#globe-canvas:active {
    cursor: grabbing;
}

.globe-tooltip {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 20;
    transition: opacity 0.2s ease;
    min-width: 180px;
}

.globe-tooltip img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.4rem;
}

.globe-tooltip span {
    display: block;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    padding: 0.2rem 0;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(67, 97, 238, 0.1);
    border: 1px solid rgba(67, 97, 238, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        border-color: rgba(67, 97, 238, 0.3);
        box-shadow: none;
    }

    50% {
        border-color: rgba(242, 110, 34, 0.5);
        box-shadow: 0 0 15px rgba(242, 110, 34, 0.15);
    }
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.35rem);
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 0 3rem 0;
}

.hero-cta {
    display: flex;
    justify-content: flex-start;
    gap: 1.5rem;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section-header {
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.section-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
}

.text-center .section-desc {
    margin: 0 auto;
}

/* ==========================================================================
   Services Section — Accenture Style
   ========================================================================== */
.services-accenture {
    padding: 8rem 0;
    position: relative;
    z-index: 1;
}

.acn-services-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
}

.acn-header {
    margin-bottom: 4rem;
}

.acn-header h2 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.acn-header p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
}

.acn-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1200px) {
    .acn-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .acn-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    /* On mobile, carousel CSS from below handles .acn-row layout */
}

.acn-card {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: 4px; /* Slight rounding for elegant modern look */
    overflow: hidden;
    color: var(--text-main) !important;
    background: var(--bg-darker);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.acn-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: var(--bg-darker);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s ease;
}

.acn-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

/* Bottom gradient overlay */
.acn-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: var(--acn-gradient);
    z-index: 1;
    transition: opacity 0.6s ease;
}

/* Front content (visible before hover) */
.acn-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    z-index: 2;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s ease;
}

.acn-card-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.acn-card h3 {
    font-size: clamp(1.2rem, 1.5vw, 1.7rem);
    line-height: 1.25;
    margin: 0;
    font-weight: 600;
    color: var(--text-main);
    min-height: 2.5em;
    display: flex;
    align-items: flex-end;
}

/* Hover panel (The Orange Screen) */
.acn-card-hover-panel {
    position: absolute;
    top: 0;
    left: 100%; /* Hidden to the right */
    width: 100%;
    height: 100%;
    /* Transparent orange overlay with blur effect */
    background-color: rgba(242, 110, 34, 0.60);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 3;
    padding: 2rem 1.5rem; overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.acn-hover-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.acn-card .acn-hover-title {
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--primary);
    min-height: 0;
    display: block;
}

.acn-hover-desc {
    font-size: 0.9rem;
    color: #ffffff;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-family: var(--font-body);
}

.acn-hover-arrow {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.acn-hover-arrow i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

/* Hover Interactions */
/* Image slides slightly left but stays visible behind the transparent panel */
.acn-card:hover .acn-card-img {
    transform: translateX(-15%);
}

/* Gradient fades out */
.acn-card:hover::after {
    opacity: 0;
}

/* Front content slides left and fades out */
.acn-card:hover .acn-card-content {
    transform: translateX(-50%);
    opacity: 0;
}

/* Panel slides in */
.acn-card:hover .acn-card-hover-panel {
    transform: translateX(-100%);
}

.acn-card:hover .acn-hover-arrow i {
    transform: translateX(5px);
}

/* ==========================================================================
   Services Carousel — Mobile Only (≤768px)  (Accenture-style horizontal slider)
   ========================================================================== */
@media (max-width: 768px) {
    .services-accenture {
        padding: 4rem 0 3rem;
        overflow: hidden;
    }

    .acn-services-container {
        padding: 0;
        max-width: 100%;
    }

    .acn-header {
        margin-bottom: 2rem;
        padding: 0 1.5rem;
    }

    .acn-header h2 {
        font-size: 1.8rem;
    }

    .acn-header p {
        font-size: 1rem;
    }

    /* Both rows become a single horizontal scroll strip */
    .acn-row {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 1rem;
        margin-bottom: 0;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;          /* Firefox */
        padding: 0 1.5rem 1.5rem;
    }

    .acn-row::-webkit-scrollbar {
        display: none;                  /* Chrome/Safari */
    }

    /* Hide the second row – JS will merge all cards into one strip */
    .acn-row + .acn-row {
        display: none;
    }

    /* Card sizing — large card, Accenture-style */
    .acn-card {
        flex: 0 0 75vw;
        max-width: 75vw;
        aspect-ratio: 3 / 4;
        border-radius: 6px;
        scroll-snap-align: start;
        background: var(--bg-darker);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
        overflow: hidden;
        position: relative;
        display: block;
        transition: transform 0.3s ease;
    }

    /* Image fills the bottom of the card */
    .acn-card-img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
        transition: none;
    }

    .acn-card-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0.85;
    }

    /* Gradient overlay restored */
    .acn-card::after {
        display: block;
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60%;
        background: var(--acn-gradient);
        z-index: 1;
    }

    /* Tag + Title positioned at bottom left */
    .acn-card-content {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 1.5rem;
        z-index: 2;
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
        transform: none !important;
        opacity: 1 !important;
    }

    /* Remove pseudo-elements from accordion version */
    .acn-card-content::before,
    .acn-card-content::after {
        display: none !important;
    }

    .acn-card-tag {
        display: inline-block;
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 2px;
        color: var(--secondary);
    }
    .acn-card h3 {
        font-size: 1.25rem;
        font-weight: 700;
        line-height: 1.3;
        color: var(--text-main);
        margin: 0;`r`n        min-height: 2.5em;`r`n        display: flex;`r`n        align-items: flex-end;`r`n    }

    /* Hover panel hidden on mobile carousel — no expand needed */
    .acn-card-hover-panel {
        display: none !important;
    }

    /* Disable desktop hover effects on mobile */
    .acn-card:hover .acn-card-img {
        transform: none;
    }

    .acn-card:hover::after {
        opacity: 1;
    }

    .acn-card:hover .acn-card-content {
        transform: none;
        opacity: 1;
    }
}

/* ==========================================================================
   Phase 1 Perf — Hide particles via CSS on mobile (belt-and-suspenders)
   ========================================================================== */
@media (max-width: 767px) {
    #hero-particles,
    #trust-particles {
        display: none !important;
    }
}

/* ==========================================================================
   Phase 2 Perf — Remove backdrop-filter on touch/mobile devices
   Targets touch screens reliably (better than width-only queries).
   Glassmorphism is preserved on desktop (hover: hover) devices.
   ========================================================================== */
@media (hover: none) and (pointer: coarse) {
    /* Navbar */
    .navbar,
    .navbar.scrolled {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background-color: var(--nav-bg) !important;
    }

    [data-theme="light"] .navbar {
        background-color: transparent !important;
    }

    [data-theme="light"] .navbar.scrolled {
        background-color: rgba(248, 250, 252, 1) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    /* Hero badge */
    .badge {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background-color: rgba(242, 110, 34, 0.12) !important;
    }

    /* Secondary button */
    .btn-secondary {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background-color: rgba(255, 255, 255, 0.06) !important;
    }

    /* Globe tooltip */
    .globe-tooltip {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background-color: rgba(255, 255, 255, 0.97) !important;
    }

    /* Service card hover panel */
    .acn-card-hover-panel {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background-color: rgba(242, 110, 34, 0.85) !important;
    }
}
.mobile-nav-wrapper { display: none; }

/* ==========================================================================
   iOS Safari Fixes — Task 2: z-index & pointer-events stacking
   ========================================================================== */

/* Background layers — never interactive */
#page-particles,
.starfield-canvas,
.page-hero-bg-shapes,
.hero-bg-shapes,
.hero-bg-overlay {
    pointer-events: none !important;
    -webkit-user-select: none;
    user-select: none;
}

/* All interactive children of nav must be tappable */
.navbar a,
.navbar button,
.navbar [role="button"] {
    pointer-events: auto;
    touch-action: manipulation;
    cursor: pointer;
}

/* Dropdown panels */
.nav-dropdown {
    z-index: 1050;
}

/* Mobile menu overlay */
.mobile-nav-wrapper.active {
    z-index: 1100;
}

/* ==========================================================================
   iOS Safari — Logo -webkit- prefixes (Task 3)
   ========================================================================== */
.brand-logo__text {
    -webkit-transition: max-width 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.35s ease,
                margin 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-logo__icon img {
    -webkit-transition: -webkit-transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-transform-origin: center center;
}

@media (max-width: 768px) {
    .brand-logo__text {
        max-width: 200px;
        opacity: 1;
    }
    .brand-logo.is-collapsed .brand-logo__text {
        max-width: 0;
        opacity: 0;
        margin: 0;
        -webkit-transition: max-width 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                    opacity 0.35s ease,
                    margin 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }
}
