/* =========================================
   1. RESET & VARIABLES
   ========================================= */
:root {
    /* Brand Colors */
    --brand-primary: #0ea5a4;
    /* Teal 500 */
    --brand-primary-dark: #0f766e;
    /* Teal 700 */
    --brand-secondary: #0b1c2d;
    /* Midnight blue */
    --brand-accent: #f4c430;
    /* Soft gold */

    /* Neutrals */
    --bg-body: #ffffff;
    --bg-light: #f6f9fc;
    --bg-dark: #0a0f14;
    --text-heading: #0b1c2d;
    --text-body: #5f6c7b;
    --border-color: #e5e9f0;

    /* Dimensions */
    --header-height: 90px;
    --container-max: 1280px;

    /* Shadows */
    --shadow-card: 0 12px 32px -12px rgba(11, 28, 45, 0.12);
    --shadow-hover: 0 24px 60px -12px rgba(14, 165, 164, 0.25);
    --shadow-float: 0 8px 20px rgba(244, 196, 48, 0.35);

    /* Typography */
    --font-display: 'Playfair Display', serif;
    --font-main: 'DM Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-body);
    line-height: 1.7;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    color: var(--text-heading);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* =========================================
   2. REUSABLE COMPONENTS
   ========================================= */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.section-spacing {
    padding: 120px 0;
    position: relative;
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-navy {
    background-color: var(--brand-secondary);
    color: white;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.85rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: white;
    box-shadow: var(--shadow-float);
    border: none;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: var(--brand-secondary);
    transition: 0.4s ease;
    z-index: -1;
}

.btn-primary:hover::after {
    width: 100%;
}

.btn-secondary {
    background-color: transparent;
    color: var(--brand-secondary);
    border: 2px solid var(--brand-secondary);
}

.btn-secondary:hover {
    background-color: var(--brand-secondary);
    color: white;
}

/* Typography Helpers */
.display-text {
    font-size: 4.5rem;
    letter-spacing: -2px;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 20px;
}

.highlight {
    color: var(--brand-primary);
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: rgba(255, 87, 34, 0.2);
    z-index: -1;
}

/* =========================================
   3. HEADER
   ========================================= */
.header-main {
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    z-index: 999;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
}

.header-main.sticky {
    height: 70px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.nav-wrapper {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--brand-secondary);
}

.brand-logo img {
    height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-heading);
    font-size: 1rem;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--brand-primary);
    opacity: 0;
    transition: 0.3s;
}

.nav-link:hover::before,
.nav-link.active::before {
    top: -15px;
    opacity: 1;
}

.nav-link:hover {
    color: var(--brand-primary);
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--brand-secondary);
    cursor: pointer;
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--header-height);
    background: linear-gradient(135deg, #fff 0%, #fef3ef 100%);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeUp 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background-color: rgba(255, 87, 34, 0.1);
    color: var(--brand-primary);
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.hero-visual {
    position: relative;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CSS-only Abstract Shapes Animation */
.shape-blob {
    position: absolute;
    background: linear-gradient(45deg, var(--brand-secondary), var(--brand-accent));
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    width: 400px;
    height: 400px;
    opacity: 0.1;
    animation: blobMorph 10s infinite alternate;
}

.shape-blob:nth-child(2) {
    background: linear-gradient(45deg, var(--brand-primary), #ff9100);
    width: 350px;
    height: 350px;
    left: 20%;
    top: 10%;
    opacity: 0.15;
    animation: blobMorph 8s infinite alternate-reverse;
}

.hero-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    position: relative;
    z-index: 3;
    max-width: 350px;
    border-left: 5px solid var(--brand-primary);
    animation: floatCard 6s ease-in-out infinite;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.stat-num {
    font-weight: 700;
    color: var(--text-heading);
}

.stat-trend {
    color: #4caf50;
    /* Green */
    font-size: 0.9rem;
}

/* =========================================
   5. SERVICES (Grid & Hover)
   ========================================= */
.service-section {
    background-color: var(--bg-body);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.service-item {
    background: white;
    border: 1px solid var(--border-color);
    padding: 50px 40px;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.service-item:hover {
    border-color: transparent;
    box-shadow: var(--shadow-hover);
    transform: translateY(-10px);
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0%;
    background-color: var(--brand-primary);
    transition: 0.5s ease;
}

.service-item:hover::before {
    height: 100%;
}

.s-icon {
    font-size: 2.5rem;
    color: var(--brand-primary);
    margin-bottom: 30px;
    display: inline-block;
    transition: 0.5s;
}

.service-item:hover .s-icon {
    transform: scale(1.1) rotate(-10deg);
}

.s-link {
    display: inline-block;
    margin-top: 25px;
    font-weight: 700;
    color: var(--brand-secondary);
    border-bottom: 2px solid rgba(26, 35, 126, 0.1);
}

/* =========================================
   6. BUDGET ALLOCATOR (Interactive)
   ========================================= */
.allocator-section {
    background-color: #0f172a;
    /* Dark Contrast for this section */
    color: white;
}

.allocator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.allocator-controls {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.control-group {
    margin-bottom: 30px;
}

.control-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-weight: 500;
    font-size: 1.1rem;
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--brand-primary);
    cursor: pointer;
    border: 3px solid #0f172a;
    transition: 0.2s;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Visualizer */
.visualizer-box {
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pie-chart {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: conic-gradient(var(--brand-primary) 0% 30%,
            var(--brand-accent) 30% 60%,
            #7c4dff 60% 100%);
    position: relative;
    margin-bottom: 30px;
    transition: background 0.5s ease;
    box-shadow: 0 0 50px rgba(0, 188, 212, 0.2);
}

.pie-chart::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 220px;
    background-color: #0f172a;
    border-radius: 50%;
}

.pie-stats {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.total-budget {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

.legend {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.legend-item span {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 8px;
}

/* =========================================
   7. INDUSTRY SLIDER
   ========================================= */
.industry-wrapper {
    overflow-x: auto;
    display: flex;
    gap: 20px;
    padding-bottom: 40px;
    scroll-snap-type: x mandatory;
}

.ind-card {
    min-width: 300px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    scroll-snap-align: start;
    border: 1px solid #eee;
}

.ind-card h4 {
    margin-bottom: 10px;
}

.ind-card ul li {
    font-size: 0.9rem;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    color: var(--text-body);
}

.ind-card ul li::before {
    content: '•';
    color: var(--brand-primary);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    line-height: 1;
}

/* =========================================
   8. TESTIMONIALS
   ========================================= */
.test-section {
    background-color: #f8f9fa;
    position: relative;
}

/* Decorative Background Text */
.bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15rem;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.03);
    z-index: 0;
    white-space: nowrap;
    font-family: var(--font-display);
}

.test-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    position: relative;
    z-index: 1;
}

.review-card {
    background: white;
    padding: 50px;
    border-radius: 0 30px 0 30px;
    box-shadow: var(--shadow-card);
}

.stars {
    color: #ffb400;
    margin-bottom: 20px;
}

/* =========================================
   9. FOOTER
   ========================================= */
.site-footer {
    background-color: #0b0f19;
    color: #90a4ae;
    padding: 80px 0 30px;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.f-title {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 25px;
    font-family: var(--font-main);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.f-links li {
    margin-bottom: 12px;
}

.f-links a:hover {
    color: var(--brand-primary);
    padding-left: 5px;
}

.f-contact p {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.f-icon {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-size: 0.8rem;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    font-size: 0.9rem;
}

/* =========================================
   10. PAGES: CONTACT & LEGAL
   ========================================= */
.page-hero {
    background: var(--brand-secondary);
    padding: 180px 0 100px;
    color: white;
    text-align: center;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.page-hero h1 {
    color: white;
    margin-bottom: 15px;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0;
    box-shadow: var(--shadow-card);
    margin-top: -80px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    z-index: 5;
}

.contact-sidebar {
    background: #f5f7fa;
    padding: 50px;
}

.contact-main {
    padding: 50px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.input-field {
    width: 100%;
    padding: 15px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 4px;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: 0.3s;
}

.input-field:focus {
    border-color: var(--brand-primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 87, 34, 0.1);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-heading);
}

.legal-text {
    max-width: 900px;
    margin: 60px auto;
    background: white;
    padding: 60px;
    box-shadow: var(--shadow-card);
}

.legal-text h2 {
    color: var(--brand-secondary);
    margin-top: 40px;
}

.legal-text p {
    margin-bottom: 20px;
    color: var(--text-body);
}

/* =========================================
   11. ANIMATIONS & MEDIA QUERIES
   ========================================= */
@keyframes blobMorph {
    0% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
        transform: rotate(0deg);
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 50% 40% 60%;
        transform: rotate(20deg);
    }
}

@keyframes floatCard {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 992px) {

    .hero-grid,
    .allocator-container,
    .test-grid,
    .footer-top {
        grid-template-columns: 1fr;
    }

    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-visual {
        display: none;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .display-text {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .service-grid {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 90px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }
}