:root {
    /* Color Palette - Precise Hex Codes */
    --blueberry-skin: #2F3A55;
    --berry-bloom: #5C6B8A;
    --stem-grey: #6E6F73;
    --yogurt-tint: #E7E2DE;
    --plate-white: #F5F6F3;

    /* Semantic Mappings */
    --clr-primary: var(--blueberry-skin);
    --clr-secondary: var(--berry-bloom);
    --clr-bg-main: var(--plate-white);
    --clr-bg-alt: var(--yogurt-tint);
    --clr-text-main: var(--blueberry-skin);
    --clr-text-muted: var(--stem-grey);

    /* Typography */
    --ff-display: "Inter", system-ui, -apple-system, sans-serif;
    --ff-serif: "Playfair Display", serif;

    /* Premium Animation Curves */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out-expo: cubic-bezier(0.87, 0, 0.13, 1);
    --transition-slow: 0.8s var(--ease-out-expo);
    --transition-medium: 0.5s var(--ease-out-expo);
    --transition-fast: 0.3s var(--ease-out-expo);

    /* Shadows & Effects */
    --shadow-premium: 0 20px 50px rgba(47, 58, 85, 0.1);
    --shadow-soft: 0 10px 30px rgba(47, 58, 85, 0.05);
    --glass: blur(20px) saturate(180%);
}

/* Base resets and smooth behavior */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
    background-color: var(--clr-bg-main);
}

body {
    font-family: var(--ff-display);
    color: var(--clr-text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--clr-bg-main);
}

/* Typography Scale */
h1,
h2,
h3,
h4 {
    font-family: var(--ff-serif);
    line-height: 1.1;
    font-weight: 700;
}

.heading-xl {
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    letter-spacing: -0.04em;
}

.heading-lg {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
}

.heading-md {
    font-size: clamp(2rem, 3vw, 2.5rem);
}

.text-muted {
    color: var(--clr-text-muted);
}

.uppercase-tracking {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    font-weight: 800;
    font-family: var(--ff-display);
}

/* Layout Utilities */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 4rem;
}

.section-v-padding {
    padding: 160px 0;
}

/* Component: Header / Taskbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 2rem 0;
    transition: var(--transition-medium);
    border-bottom: 1px solid transparent;
}

header.scrolled {
    padding: 1.25rem 0;
    background: rgba(245, 246, 243, 0.85);
    /* Plate White with alpha */
    backdrop-filter: var(--glass);
    border-bottom: 1px solid rgba(47, 58, 85, 0.08);
}

.nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 3.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--clr-text-main);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: var(--transition-fast);
    position: relative;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--clr-secondary);
    transition: var(--transition-medium);
}

.nav-links a:hover {
    color: var(--clr-secondary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Buttons */
.btn-primary {
    padding: 1.1rem 2.5rem;
    background: var(--clr-primary);
    color: var(--plate-white);
    border: none;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition-medium);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: 1px solid transparent;
}

.btn-primary::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--clr-secondary);
    transition: var(--transition-medium);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.btn-primary:hover::before {
    width: 300%;
    height: 300%;
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(47, 58, 85, 0.2);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--clr-secondary);
    color: var(--clr-primary);
}

.btn-secondary:hover {
    background: var(--yogurt-tint);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
    overflow: hidden;
}

.hero-bg-detail {
    position: absolute;
    top: 50%;
    right: -10%;
    width: 40vw;
    height: 110%;
    background: var(--clr-bg-alt);
    transform: rotate(-12deg) translateY(-50%);
    z-index: -1;
    border-radius: 40px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 6rem;
    align-items: center;
}

.hero-content {
    animation: fadeReveal var(--transition-slow);
}

.hero-title em {
    font-weight: 400;
    color: var(--clr-secondary);
    font-style: italic;
}

.hero-image-wrap {
    position: relative;
    padding: 2rem;
}

.hero-image-wrap img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-premium);
    transition: transform var(--transition-slow);
}

.hero-image-wrap:hover img {
    transform: scale(1.02);
}

.hero-stats {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-premium);
    display: flex;
    gap: 2rem;
}

.stat-item h3 {
    font-family: var(--ff-display);
    color: var(--clr-secondary);
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.stat-item p {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--clr-text-muted);
    letter-spacing: 0.1em;
}

/* Section: Services */
.services {
    background: white;
}

.staggered-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 3rem;
    width: 100%;
}

.service-card {
    background: var(--plate-white);
    padding: 4rem 3rem;
    border-radius: 12px;
    border: 1px solid rgba(110, 111, 115, 0.05);
    transition: var(--transition-medium);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: 0.5s;
}

.service-card:hover::after {
    left: 100%;
}

.service-card:nth-child(even) {
    transform: translateY(40px);
}

.service-card:hover {
    background: white;
    transform: translateY(-10px);
    box-shadow: var(--shadow-premium);
    border-color: var(--clr-secondary);
}

.icon-box {
    width: 80px;
    height: 80px;
    background: var(--clr-bg-alt);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-secondary);
    transition: var(--transition-medium);
}

.service-card:hover .icon-box {
    background: var(--clr-primary);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-family: var(--ff-display);
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--clr-primary);
}

.service-card p {
    color: var(--clr-text-muted);
    font-size: 1rem;
    line-height: 1.8;
}

.card-footer {
    margin-top: auto;
    width: 40px;
    height: 4px;
    background: var(--clr-accent);
    transition: var(--transition-medium);
}

.service-card:hover .card-footer {
    width: 100%;
    background: var(--clr-secondary);
}

/* Section: Dark Data */
.dark-section {
    background: var(--clr-primary);
    /* Strict Blueberry Skin */
    color: var(--plate-white);
    position: relative;
    overflow: hidden;
}

.dark-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 8rem;
    align-items: center;
}

.data-p {
    opacity: 0.8;
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: var(--transition-slow);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeReveal {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer Premium */
footer {
    background: var(--plate-white);
    border-top: 1px solid var(--yogurt-tint);
    padding: 100px 0 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 80px;
}

.footer-logo {
    margin-bottom: 2rem;
}

.footer-links h4 {
    font-family: var(--ff-display);
    font-weight: 800;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 2.5rem;
    color: var(--clr-primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 1.25rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--clr-text-muted);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--clr-secondary);
    padding-left: 5px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 40px;
    border-top: 1px solid var(--yogurt-tint);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--clr-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Dashboard Aesthetic for Global Reach */
#reach {
    background: var(--clr-primary) !important;
    /* Strict Blueberry Skin */
    color: var(--plate-white);
    padding: 160px 0;
    position: relative;
    overflow: hidden;
}

#reach h2 {
    color: white !important;
}

/* Unified Merged Card */
.arsr-merged-stats {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4rem;
    border-radius: 20px;
    display: flex;
    gap: 5rem;
    align-items: center;
    transition: var(--transition-medium);
}

.arsr-merged-stats:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--clr-secondary);
    transform: translateY(-5px);
}

.arsr-merged-stats .stat p {
    color: white !important;
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
}

.map-glow {
    filter: drop-shadow(0 0 15px rgba(92, 107, 138, 0.4));
}

/* Map Dots (Pulsing Hotspots) */
.map-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--clr-secondary);
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(92, 107, 138, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(92, 107, 138, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(92, 107, 138, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(92, 107, 138, 0);
    }
}

/* ===========================
   SITE-WIDE ICON ANIMATIONS
   =========================== */

/* Floating animation for sector/why section icons */
@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Spin-in animation for approach step numbers */
@keyframes iconSpin {
    from { transform: rotate(-10deg) scale(0.9); opacity: 0.6; }
    to   { transform: rotate(0deg) scale(1);   opacity: 1;   }
}

/* Shimmer glow for icons on dark backgrounds */
@keyframes iconGlow {
    0%, 100% { filter: drop-shadow(0 0 0px rgba(92,107,138,0)); }
    50%       { filter: drop-shadow(0 0 8px rgba(92,107,138,0.7)); }
}

/* Bounce-in keyframe used on card icon-boxes */
@keyframes iconBounce {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.2) rotate(-5deg); }
    60%  { transform: scale(0.95) rotate(3deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* --- Service card icon-box animation on hover --- */
.service-card:hover .icon-box {
    background: var(--clr-primary);
    color: white;
    animation: iconBounce 0.55s var(--ease-out-expo) forwards;
}

/* --- Sector expertise icons: float continuously when in view --- */
.reveal.active .material-symbols-outlined[style*="color: var(--clr-primary)"] {
    animation: iconFloat 3s ease-in-out infinite;
}

/* --- Dark section (Why ARSR / India Complexity) icons: glow pulse --- */
.dark-section .material-symbols-outlined,
[class*="dark-section"] .material-symbols-outlined {
    animation: iconGlow 2.5s ease-in-out infinite;
    transition: transform var(--transition-medium);
}

.dark-section .material-symbols-outlined:hover,
[class*="dark-section"] .material-symbols-outlined:hover {
    transform: scale(1.2) rotate(8deg);
}

/* --- Approach step numbers: animate on reveal --- */
.reveal.active [style*="font-family: var(--ff-serif)"] {
    animation: iconSpin 0.6s var(--ease-out-expo) both;
}

/* --- Nav icon (arrow_forward in CTA buttons): slide right on hover --- */
.btn-primary .material-symbols-outlined {
    display: inline-block;
    transition: transform var(--transition-fast);
}

.btn-primary:hover .material-symbols-outlined {
    transform: translateX(6px);
}

/* --- Node card icons on quote page: bounce on hover --- */
.node-icon {
    transition: transform var(--transition-medium);
    display: inline-block;
}

.node-card:hover .node-icon {
    animation: iconBounce 0.5s var(--ease-out-expo) forwards;
}

/* --- Footer links: icon-adjacent pulse on hover (subtle underline reveal) --- */
.footer-links a {
    text-decoration: none;
    color: var(--clr-text-muted);
    font-size: 0.9rem;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-links a::before {
    content: "›";
    opacity: 0;
    transform: translateX(-4px);
    transition: var(--transition-fast);
    color: var(--clr-secondary);
    font-weight: 700;
}

.footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* ===========================
   HAMBURGER NAV (mobile)
   =========================== */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1100;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--clr-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* Mobile nav slide-in panel */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    background: var(--plate-white);
    z-index: 1050;
    padding: 5rem 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(47,58,85,0.15);
    transition: right 0.4s var(--ease-out-expo);
}

.mobile-nav.open { right: 0; }

.mobile-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.mobile-nav ul a {
    text-decoration: none;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--clr-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color var(--transition-fast);
}

.mobile-nav ul a:hover { color: var(--clr-secondary); }

.mobile-nav-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--clr-primary);
    font-size: 1.5rem;
}

.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(47,58,85,0.4);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-nav-backdrop.open {
    opacity: 1;
    pointer-events: all;
}

/* ===========================
   TABLET (≤1024px)
   =========================== */
@media (max-width: 1024px) {
    .container { padding: 0 2.5rem; }
    .section-v-padding { padding: 100px 0; }

    .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
    .hero-image-wrap { display: none; }

    .dark-grid { grid-template-columns: 1fr; gap: 3rem; }

    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

/* ===========================
   PHONE (≤768px)
   =========================== */
@media (max-width: 768px) {

    /* Typography scale-down */
    .heading-xl { font-size: clamp(2.2rem, 8vw, 3.5rem); }
    .heading-lg { font-size: clamp(1.8rem, 6vw, 2.5rem); }
    .heading-md { font-size: clamp(1.4rem, 5vw, 2rem); }

    /* Container + section */
    .container { padding: 0 1.25rem; }
    .section-v-padding { padding: 80px 0; }

    /* Header */
    .nav-links, .nav-cta { display: none; }
    .hamburger { display: flex; }

    /* Hero */
    .hero { padding-top: 80px; min-height: auto; }
    .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
    .hero-image-wrap { display: none; }
    .hero-btns { flex-direction: column; gap: 1rem; }
    .hero-btns .btn-primary { width: 100%; justify-content: center; }
    .hero-stats { position: static; margin-top: 2rem; padding: 1.5rem; gap: 1.5rem; }

    /* Services */
    .staggered-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    .service-card:nth-child(even) { transform: translateY(0); }

    /* Reach section */
    #reach > .container,
    [id="reach"] > .container {
        grid-template-columns: 1fr !important;
    }
    .reach-map { display: none; }
    .arsr-merged-stats {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem;
    }
    .arsr-merged-stats > div[style*="width: 1px"] { display: none; }

    /* Dark section */
    .dark-grid { grid-template-columns: 1fr !important; gap: 2.5rem; }
    .dark-grid > div:last-child { grid-template-columns: 1fr !important; }

    /* Approach steps */
    .grid[style*="repeat(auto-fit"] {
        grid-template-columns: 1fr !important;
    }

    /* Sector grid */
    [style*="grid-template-columns: repeat(auto-fit, minmax(200px"] {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Why ARSR grid */
    [style*="grid-template-columns: repeat(auto-fit, minmax(250px"] {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .footer-bottom div { justify-content: center; }
}