/* =========================================
   Reset & Base Styles
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors */
    --primary-color: #004054;    /* Deep Teal */
    --primary-dark: #002a38;     /* Darker Teal */
    --secondary-color: #272727;  /* Rich Black */
    --accent-color: #C5A059;     /* Gold Accent */
    --accent-text: #8B7A3A;      /* Darker gold – passes WCAG AA on white */
    --cream-bg: #FEFFEF;         /* Brand Cream */
    
    /* Functional Colors */
    --text-primary: #1A1A1A;
    --text-secondary: #4A5568;
    --text-light: #718096;
    --border-color: #E2E8F0;
    --border-dark: rgba(0, 64, 84, 0.15);
    
    /* Spacing & Layout */
    --container-width: 1280px;
    --header-height: 100px;
    --section-spacing: 6rem;
}

html.smooth-scroll {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--text-secondary);
    background-color: #ffffff;
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   Typography
   ========================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; letter-spacing: -0.02em; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

.subtitle {
    display: block;
    font-family: 'Cinzel', serif;
    color: var(--accent-text);
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-weight: 600;
}

.highlight-text {
    font-style: italic;
    color: var(--secondary-color);
}

/* =========================================
   Layout Utilities
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

section {
    padding: var(--section-spacing) 0;
}

/* =========================================
   Components: Buttons
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

.full-width {
    width: 100%;
}

.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    margin-left: 10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================================
   Navigation
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LOGO FIX: Ensure visible size */
.nav-logo img {
    height: 150px; /* Explicit height */
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

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

.nav-actions {
    display: flex;
    align-items: center;
}

.nav-cta {
    padding: 10px 24px;
    font-size: 0.75rem;
}

/* Hide mobile CTA on desktop */
.mobile-cta {
    display: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    margin-left: 1.5rem;
}

.bar {
    width: 24px;
    height: 2px;
    background-color: var(--primary-color);
    transition: 0.3s;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    position: relative;
    min-height: 90vh; /* Not strictly 100vh to allow scroll affordance */
    display: flex;
    align-items: center;
    background-color: var(--cream-bg);
    padding-top: var(--header-height);
    overflow: hidden;
}

/* Subtle overlay pattern/gradient */
.hero-background-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: url('assets/images/preview16.webp') no-repeat center center;
    background-size: cover;
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
    opacity: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-content {
    max-width: 800px;
}

.hero-label {
    display: inline-block;
    padding: 0.5rem 0;
    border-bottom: 2px solid var(--accent-color);
    margin-bottom: 1.5rem;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 0.1em;
    font-size: 0.9rem;
}

.hero-title {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* =========================================
   About / Who We Are
   ========================================= */
.about {
    background: #ffffff;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: start;
    margin-top: 3rem;
}

.lead-text {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.values-list {
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.value-item-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.value-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--primary-color);
}

.value-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.about-stats-box {
    background: var(--cream-bg);
    padding: 3rem;
    border: 1px solid var(--border-dark);
}

.about-stats-box h3 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.stat-row:last-child { margin-bottom: 0; }

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* =========================================
   Services (Grid Layout)
   ========================================= */
.services {
    background: #fcfcfc;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--border-dark);
    border-left: 1px solid var(--border-dark);
}

.service-card {
    background: #ffffff;
    padding: 3rem;
    border-right: 1px solid var(--border-dark);
    border-bottom: 1px solid var(--border-dark);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.service-card:hover {
    background: var(--cream-bg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    transform: translateY(-5px);
    z-index: 2;
    border-color: transparent;
}

.service-number {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: rgba(0, 64, 84, 0.35); /* Increased contrast for better visibility */
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    min-height: 3rem; /* Align lines */
}

.service-card p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.service-list {
    list-style: none;
    padding: 0;
}

.service-list li {
    font-size: 0.9rem;
    padding: 0.5rem 0;
    border-top: 1px solid rgba(0,0,0,0.05);
    color: var(--primary-color);
    font-weight: 500;
}

.highlight-card {
    background: #FAFAFA; /* Subtle distinction for new services */
}

/* =========================================
   Industries (Icon Grid)
   ========================================= */
.industries {
    background: var(--primary-color);
    color: #ffffff;
}

.industries .section-header h2,
.industries .subtitle {
    color: #ffffff;
}

.industries-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1px;
    background: rgba(255,255,255,0.1); /* Divider lines */
    margin-top: 3rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.industry-item {
    background: var(--primary-color);
    padding: 2.5rem 1rem;
    text-align: center;
    transition: background 0.3s ease;
}

.industry-item:hover {
    background: var(--primary-dark);
}

.industry-item i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.industry-item h3 {
    color: #ffffff;
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

/* =========================================
   Why Choose Us & Case Study
   ========================================= */
.why-us {
    background: var(--cream-bg);
}

.why-us-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.why-list {
    list-style: none;
    margin-top: 2rem;
}

.why-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.why-list li i {
    color: var(--accent-color);
    margin-top: 5px;
}

.case-study-card {
    background: #ffffff;
    padding: 3rem;
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.case-study-card h3 {
    font-size: 1.25rem;
}

.cs-label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: block;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

/* =========================================
   Insights Section
   ========================================= */
.insights {
    background: #f9f9f9;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.insight-card {
    background: #ffffff;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.insight-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
    border-color: transparent;
}

.insight-category {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--accent-text);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.insight-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    line-height: 1.4;
}

.insight-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.read-more {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid var(--primary-color);
    padding-bottom: 2px;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

/* =========================================
   Contact Section
   ========================================= */
.contact {
    background: #ffffff;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-details-box {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.cd-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none; /* For links */
    color: inherit; /* Inherit text color */
    transition: transform 0.2s ease;
}

.cd-item:hover {
    transform: translateX(5px);
}

.cd-item i {
    width: 50px;
    height: 50px;
    background: var(--cream-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--primary-color);
}

.cd-item h4 {
    margin: 0;
    font-family: 'Lato', sans-serif;
    font-size: 1.1rem;
}

.cd-item p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.contact-form-container {
    background: #fafafa;
    padding: 3rem;
    border: 1px solid var(--border-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    background: #ffffff;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    transition: border 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* =========================================
   Footer
   ========================================= */
.footer {
    background: var(--primary-color);
    color: #ffffff;
    padding: 5rem 0 2rem;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 4rem;
    margin-bottom: 2rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo-img {
    height: 150px;
    width: auto;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 5rem;
}

.footer-col h3 {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

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

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: #ffffff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: rgba(255,255,255,0.6);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #ffffff;
}

/* =========================================
   Scroll Animations
   ========================================= */
.fade-in-target {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Responsive Styles
   ========================================= */
@media (max-width: 1024px) {
    .services-grid,
    .industries-grid,
    .insights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-grid,
    .why-us-content,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    /* Hide nav menu and CTA by default on mobile */
    .nav-menu {
        display: none;
    }

    /* Hide CTA button next to hamburger - it will appear inside menu */
    .nav-actions .nav-cta {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    /* Mobile Menu Overlay - shows when active */
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: #ffffff;
        padding: 2rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        align-items: stretch;
        gap: 0;
        z-index: 999;
    }

    .nav-menu.active .nav-link {
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
        font-size: 1rem;
    }

    .nav-menu.active .nav-link:last-child {
        border-bottom: none;
    }

    /* Mobile CTA button inside menu */
    .nav-menu.active .mobile-cta {
        display: block;
        margin-top: 1.5rem;
        text-align: center;
    }

    /* Hero section mobile */
    .hero {
        min-height: 80vh;
        background: linear-gradient(135deg, var(--cream-bg) 0%, #f5f5e8 100%);
    }

    .hero-container {
        text-align: center;
        padding: 0 1.5rem;
    }

    .hero-title {
        font-size: 2.2rem;
        line-height: 1.3;
    }

    .hero-label {
        margin: 0 auto 1.5rem;
        font-size: 0.875rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-background-overlay {
        display: none;
    }

    .hero-buttons {
        justify-content: center;
    }

    /* Contact form - stack fields on mobile */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-form-container {
        padding: 2rem 1.5rem;
    }

    .contact-wrapper {
        gap: 2rem;
    }

    /* Footer mobile fixes */
    .footer-top {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-brand {
        text-align: center;
        width: 100%;
        max-width: 100%;
    }

    .footer-logo-img {
        height: 150px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 1rem;
        display: block;
    }

    .footer-links {
        flex-direction: row;
        gap: 3rem;
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* Mobile font floors — nothing below 14px */
    .subtitle {
        font-size: 0.875rem;
    }

    .service-number {
        font-size: 1.5rem;
    }

    .service-list li {
        font-size: 0.875rem;
        padding: 0.6rem 0;
    }

    .cs-label {
        font-size: 0.875rem;
    }

    .insight-category {
        font-size: 0.875rem;
    }

    .cd-item p {
        font-size: 0.875rem;
    }

    .footer-bottom {
        font-size: 0.875rem;
    }

    .read-more {
        font-size: 0.875rem;
        padding: 0.5rem 0;
    }

    .link-arrow {
        font-size: 0.875rem;
        padding: 0.5rem 0;
    }

    /* Tap target sizes for mobile — min 48px touch areas */
    .footer-col ul li {
        margin-bottom: 0;
    }

    .footer-col ul li a {
        display: block;
        padding: 0.5rem 0;
        min-height: 44px;
        line-height: 2;
    }

    .social-links {
        gap: 0.5rem;
    }

    .social-links a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 48px;
        min-height: 48px;
        font-size: 1.4rem;
    }

    .nav-toggle {
        min-width: 48px;
        min-height: 48px;
        align-items: center;
        justify-content: center;
    }

    .btn {
        min-height: 48px;
        padding: 14px 24px;
    }

    /* Prevent horizontal overflow */
    .container {
        padding: 0 1rem;
        overflow-x: hidden;
    }

    /* Services, Industries, Insights - single column */
    .services-grid,
    .industries-grid,
    .insights-grid {
        grid-template-columns: 1fr;
    }

    /* Industries grid - 2 columns on mobile for better use of space */
    .industries-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .industry-item {
        padding: 1.5rem 1rem;
    }

    .industry-item h3 {
        font-size: 0.875rem;
    }

    /* Values section */
    .value-item-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Stats box */
    .about-stats-box {
        padding: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* Section spacing */
    section {
        padding: 4rem 0;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    /* Why Us section */
    .why-list li {
        font-size: 1rem;
    }

    .case-study-card {
        padding: 2rem;
    }

    /* Insight cards */
    .insight-card {
        padding: 1.5rem;
    }
}
