/* style.css */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap');

/* CSS Custom Properties */
:root {
    --color-primary: #1A2E44; /* Deep Navy Blue */
    --color-accent: #B0BEC5; /* Rich Silver-Grey for accents */
    --color-interactive-highlight: #00BCD4; /* Electric Teal for interactive elements */
    --color-text: #333333;
    --color-bg: #F8F9FA; /* Off-white/light grey */
    --color-light-grey: #E0E0E0;
    --color-dark-grey: #666666;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
}

/* Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: 0.8em;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.7rem; }

a {
    color: var(--color-interactive-highlight);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

p {
    margin-bottom: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

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

.section-heading {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-weight: 700;
}

.button {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.button-primary {
    background-color: var(--color-interactive-highlight);
    color: white;
    border-color: var(--color-interactive-highlight);
}

.button-primary:hover {
    background-color: #00A3B5; /* Slightly darker teal */
    border-color: #00A3B5;
}

.button-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.button-secondary:hover {
    background-color: var(--color-primary);
    color: white;
}

.button-nav {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-bg);
    padding: var(--spacing-sm) 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

nav.scrolled {
    background-color: #F0F2F4; /* Slightly darker background */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: var(--spacing-md);
}

.nav-links a {
    color: var(--color-dark-grey);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--color-interactive-highlight);
    bottom: -5px;
    left: 0;
    transition: width 0.3s ease;
}

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

.hamburger-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-primary);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* Hero Section */
#hero {
    background: linear-gradient(rgba(26, 46, 68, 0.8), rgba(26, 46, 68, 0.8)), url('https://source.unsplash.com/random/1920x1080/?finance,data,technology') no-repeat center center/cover; /* Placeholder background */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding-top: 100px; /* Offset for sticky nav */
}

#hero .container {
    padding: var(--spacing-lg) var(--spacing-sm);
    max-width: 900px;
}

#hero h1 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

#hero .hero-subheading {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

#hero .tagline {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    color: var(--color-interactive-highlight);
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.hero-ctas .button {
    min-width: 280px;
}

/* Full Viewport */
.full-viewport {
    min-height: 100vh;
}

/* Stats Strip */
#stats {
    background-color: var(--color-primary);
    color: white;
    padding: var(--spacing-md) 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    text-align: center;
}

.stat-item {
    padding: var(--spacing-sm);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--color-interactive-highlight);
}

.stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    line-height: 1.4;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.service-card {
    background-color: white;
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.service-card h3 {
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.service-card p {
    color: var(--color-dark-grey);
    flex-grow: 1;
}

/* Trusted By */
#clients {
    background-color: var(--color-light-grey);
    padding: var(--spacing-md) 0;
}

.clients-strip {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    font-size: 1.2rem;
    color: #999; /* Muted gray */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* Work (Case Studies) */
.case-studies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.case-study-card {
    background-color: white;
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.case-study-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.case-study-tag {
    display: inline-block;
    background-color: var(--color-interactive-highlight);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.case-study-card h3 {
    font-size: 1.4rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
}

.case-study-card p {
    font-size: 0.95rem;
    color: var(--color-dark-grey);
    flex-grow: 1;
    margin-bottom: var(--spacing-sm);
}

.case-study-card .read-more {
    color: var(--color-interactive-highlight);
    font-weight: 600;
    align-self: flex-start;
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.testimonial-card {
    background-color: white;
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--color-interactive-highlight); /* Accent color border */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-card blockquote {
    font-style: italic;
    font-size: 1.1rem;
    color: var(--color-dark-grey);
    margin-bottom: var(--spacing-sm);
    quotes: "“" "”" "‘" "’";
}

.testimonial-card blockquote::before {
    content: open-quote;
    font-size: 3em;
    line-height: 0.1em;
    margin-right: 0.1em;
    vertical-align: -0.4em;
    color: var(--color-accent);
}

.testimonial-author {
    font-weight: 600;
    color: var(--color-primary);
    text-align: right;
    font-size: 0.95rem;
}

/* Team */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-md);
    text-align: center;
}

.team-card {
    background-color: white;
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.team-avatar {
    width: 90px; /* Slightly larger for better visual */
    height: 90px;
    border-radius: 50%;
    background-color: var(--color-interactive-highlight); /* Use teal for consistency */
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
}

.team-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
}

.team-title {
    font-size: 0.9rem;
    color: var(--color-dark-grey);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

.team-bio {
    font-size: 0.9rem;
    color: var(--color-dark-grey);
    line-height: 1.5;
    flex-grow: 1;
}

/* About Section */
#about .about-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    color: var(--color-dark-grey);
}

/* Insights (Blog Teasers) */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.insight-card {
    background-color: white;
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.insight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.insight-date {
    display: block;
    font-size: 0.8rem;
    color: var(--color-dark-grey);
    margin-bottom: var(--spacing-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.insight-card h3 {
    font-size: 1.4rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.insight-card p {
    font-size: 0.95rem;
    color: var(--color-dark-grey);
    flex-grow: 1;
    margin-bottom: var(--spacing-sm);
}

.insight-card .read-more {
    color: var(--color-interactive-highlight);
    font-weight: 600;
    align-self: flex-start;
}

/* Contact */
#contact .contact-intro {
    max-width: 700px;
    margin: 0 auto var(--spacing-md) auto;
    text-align: center;
    font-size: 1.1rem;
    color: var(--color-dark-grey);
}

.contact-details {
    text-align: center;
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: var(--spacing-sm);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--color-light-grey);
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-interactive-highlight);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.2); /* Focus ring */
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .button-primary {
    width: 100%;
    margin-top: var(--spacing-sm);
}

.form-success {
    text-align: center;
    padding: var(--spacing-md);
    background-color: #e6ffed; /* Light green */
    color: #28a745; /* Darker green */
    border: 1px solid #28a745;
    border-radius: 8px;
    font-weight: 600;
}

/* Footer */
footer {
    background-color: var(--color-primary);
    color: white;
    padding: var(--spacing-lg) 0 var(--spacing-md) 0;
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
}

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

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

.footer-col ul li a {
    color: var(--color-light-grey);
}

.footer-col ul li a:hover {
    color: var(--color-interactive-highlight);
}

.footer-logo {
    color: white;
    margin-bottom: var(--spacing-sm);
}

.copyright {
    color: var(--color-light-grey);
}

/* Client Portal Modal */
#portal-modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.55);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#portal-modal.open {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background-color: white;
    padding: var(--spacing-lg);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    width: 90%;
    position: relative;
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#portal-modal.open .modal-box {
    transform: translateY(0);
    opacity: 1;
}

.modal-close-btn {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-dark-grey);
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem 0.5rem;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: var(--color-primary);
}

.modal-box h2 {
    color: var(--color-primary);
    text-align: center;
    margin-bottom: var(--spacing-md);
    font-size: 1.8rem;
}

#portal-form .button-primary {
    width: 100%;
    margin-top: var(--spacing-sm);
}

.login-error {
    color: red;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* Utility Class for Screen Readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: 0.1s; /* Subtle delay for staggered effect */
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* CRITICAL scroll-reveal exclusion: */
#portal-modal, #portal-modal * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important; /* Ensure no transition interferes */
}

/* Mobile Responsiveness */
@media (max-width: 960px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }

    .nav-links {
        gap: var(--spacing-sm);
    }

    #hero h1 {
        font-size: 2.8rem;
    }

    #hero .hero-subheading {
        font-size: 1.1rem;
    }

    #hero .tagline {
        font-size: 1.3rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .clients-strip {
        gap: var(--spacing-md);
        font-size: 1.1rem;
    }
}

@media (max-width: 600px) {
    nav {
        padding: var(--spacing-xs) 0;
    }
    .nav-content {
        flex-wrap: wrap;
    }
    .logo {
        flex-grow: 1;
        text-align: left;
        margin-left: var(--spacing-sm);
    }
    .hamburger-menu {
        display: block;
        order: 2;
        margin-right: var(--spacing-sm);
    }
    #portal-btn {
        display: none; /* Hide portal button in nav on mobile */
    }

    .nav-links {
        display: none; /* Hide by default on mobile */
        flex-direction: column;
        width: 100%;
        background-color: var(--color-bg);
        position: absolute;
        top: 60px; /* Adjust based on nav height */
        left: 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        padding: var(--spacing-sm) 0;
        border-top: 1px solid var(--color-light-grey);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }
    .nav-links li {
        text-align: center;
        padding: 0.8rem 0;
    }
    .nav-links a {
        font-size: 1.1rem;
        color: var(--color-primary);
        width: 100%;
        display: block;
    }
    .nav-links a::after {
        display: none; /* Hide underline on mobile menu */
    }

    nav.nav-open .nav-links {
        display: flex; /* Show when nav-open */
        max-height: 300px; /* Arbitrary large height to reveal content */
    }

    /* Hamburger animation */
    .hamburger-menu.open .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-menu.open .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.open .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    #hero {
        padding-top: 80px; /* More mobile-friendly top padding */
    }
    #hero h1 {
        font-size: 2.2rem;
    }
    #hero .hero-subheading,
    #hero .tagline {
        font-size: 1rem;
    }

    .hero-ctas {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .clients-strip {
        flex-direction: column;
        gap: var(--spacing-xs);
        font-size: 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-col {
        min-width: unset;
        width: 100%;
    }

    .footer-col ul {
        padding-left: 0;
    }
}