@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Montserrat:wght@600;700;800&display=swap');

:root {
    --color-primary: #1a1a1d; /* Dark Charcoal */
    --color-secondary-bg: #242426; /* Slightly lighter dark for cards/sections */
    --color-accent: #007bff; /* Electric Blue */
    --color-text: #e0e0e0; /* Light gray for readability on dark backgrounds */
    --color-text-light: #f5f5f5; /* Lighter text for headings */
    --color-text-muted: #999; /* Muted gray for secondary text */
    --color-bg: #0d0d0f; /* Even darker background for body */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Lato', sans-serif;

    --header-height: 4rem;
    --section-padding-large: 6rem;
    --section-padding-medium: 4rem;
    --section-padding-small: 2rem;
}

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

html {
    scroll-behavior: smooth;
}

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

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

a:hover, a:focus {
    color: #4dafff; /* Lighter blue on hover */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-text-light);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.2rem; }

p {
    margin-bottom: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.75rem;
    border-radius: 0.25rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.button-primary {
    background-color: var(--color-accent);
    color: var(--color-bg);
}

.button-primary:hover {
    background-color: #4dafff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

.button-secondary {
    background-color: transparent;
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
}

.button-secondary:hover {
    background-color: var(--color-accent);
    color: var(--color-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.section-padding {
    padding: var(--section-padding-large) 0;
}

.section-padding-small {
    padding: var(--section-padding-small) 0;
}

.section-dark {
    background-color: var(--color-secondary-bg);
}

.section-heading {
    text-align: center;
    margin-bottom: 3.5rem;
    font-size: 2.5rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
    background-color: rgba(13, 13, 15, 0.98); /* Slightly darker bg */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    padding: 0 1.5rem;
    max-width: 1400px; /* Slightly wider for nav */
    margin: 0 auto;
}

.nav-logo .logo-text {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-text-light);
    letter-spacing: -0.05em;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding: 0.25rem 0;
}

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

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

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001; /* Above nav links when open */
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--color-accent);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at top left, rgba(0, 123, 255, 0.1), transparent 50%),
                radial-gradient(circle at bottom right, rgba(0, 123, 255, 0.1), transparent 50%),
                url('https://images.unsplash.com/photo-1593538435165-728b7e7c9f6a?ixlib=rb-4.0.3&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1920&h=1080&fit=crop&bg=black') center/cover no-repeat;
    background-blend-mode: multiply;
    background-color: rgba(13, 13, 15, 0.7); /* Dark overlay */
    position: relative;
    padding-top: var(--header-height);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(13, 13, 15, 0.7) 0%, rgba(13, 13, 15, 0.9) 100%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: 3.8rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-subheading {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    color: var(--color-text);
    opacity: 0.9;
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Stats Strip */
.stats-strip {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    padding: var(--section-padding-medium) 0;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text);
    max-width: 250px;
}

/* About Section */
.about-content {
    font-size: 1.1rem;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.8;
}
.about-content p {
    margin-bottom: 1.5rem;
}

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

.service-card {
    background-color: var(--color-secondary-bg);
    padding: 2.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
}

.service-card h3 {
    color: var(--color-accent);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.service-card p {
    font-size: 1rem;
    color: var(--color-text);
}

/* Trusted By */
.trusted-by-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    padding: 1rem 0;
}

.trusted-by-strip span {
    color: var(--color-text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 1rem;
    white-space: nowrap;
}

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

.case-study-card {
    background-color: var(--color-secondary-bg);
    padding: 2.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.case-study-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
}

.case-study-tag {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-bg);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.case-study-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--color-text-light);
}

.case-study-card p {
    font-size: 1rem;
    color: var(--color-text);
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.case-study-card .read-more {
    color: var(--color-accent);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-top: auto;
}

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

.testimonial-card {
    background-color: var(--color-primary);
    padding: 2.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--color-accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
}

.testimonial-card blockquote {
    margin: 0;
    padding: 0;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--color-text);
    flex-grow: 1;
}

.testimonial-card blockquote p {
    margin-bottom: 1.5rem;
}

.testimonial-card cite {
    display: block;
    margin-top: 1.5rem;
    font-style: normal;
    font-weight: 600;
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* Team */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
}

.team-member-card {
    background-color: var(--color-secondary-bg);
    padding: 2rem;
    border-radius: 0.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
}

.member-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--color-accent);
    color: var(--color-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.team-member-card h3 {
    margin-bottom: 0.25rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.member-title {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.member-bio {
    font-size: 0.95rem;
    color: var(--color-text);
    flex-grow: 1;
}

/* Insights */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.insight-card {
    background-color: var(--color-primary);
    padding: 2.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.insight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
}

.insight-date {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.insight-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--color-text-light);
    flex-grow: 1;
}

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

.insight-card .read-more {
    color: var(--color-accent);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-top: auto;
}

/* Contact */
.contact-intro {
    font-size: 1.1rem;
    max-width: 800px;
    margin: -1.5rem auto 3.5rem auto;
    text-align: center;
    color: var(--color-text);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    align-items: start;
}

.contact-details {
    background-color: var(--color-secondary-bg);
    padding: 2.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.contact-details h3 {
    color: var(--color-accent);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.contact-details p {
    margin-bottom: 0.75rem;
    color: var(--color-text);
}
.contact-details p:last-of-type {
    margin-bottom: 0;
}

.contact-details a {
    word-break: break-all; /* For long email addresses */
}

.cta-message {
    margin-top: 2rem;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.contact-form-wrapper {
    background-color: var(--color-secondary-bg);
    padding: 2.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.contact-form-wrapper h3 {
    margin-bottom: 1.5rem;
    color: var(--color-text-light);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-text-light);
    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 #444;
    border-radius: 0.25rem;
    background-color: var(--color-primary);
    color: var(--color-text-light);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}

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

.contact-form .button-primary {
    width: auto;
    min-width: 150px;
}

.form-success {
    background-color: #28a745;
    color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
    background-color: var(--color-primary);
    padding: var(--section-padding-medium) 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem;
}

.footer-brand .logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text-light);
    letter-spacing: -0.05em;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    margin-bottom: 0.5rem;
}

.footer-brand a {
    color: var(--color-text-muted);
}
.footer-brand a:hover {
    color: var(--color-accent);
}

.footer-nav h4, .footer-contact h4 {
    color: var(--color-text-light);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-nav ul, .footer-contact ul {
    list-style: none;
    padding: 0;
}

.footer-nav li, .footer-contact li {
    margin-bottom: 0.5rem;
}

.footer-nav a, .footer-contact a {
    color: var(--color-text-muted);
    transition: color 0.2s ease;
}

.footer-nav a:hover, .footer-contact a:hover {
    color: var(--color-accent);
}

/* Client Portal Modal */
#portal-modal {
    display: none; /* Hidden by default */
    position: fixed;
    inset: 0; /* top, right, bottom, left to 0 */
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

#portal-modal.open {
    display: flex; /* Show when open */
}

.modal-box {
    background-color: var(--color-secondary-bg);
    padding: 3rem;
    border-radius: 0.75rem;
    position: relative;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    color: var(--color-text);
}

.modal-box h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-text-light);
    font-size: 2rem;
}

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

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

.modal-close-btn::before {
    content: '\00d7'; /* Unicode 'x' character */
}

#portal-form .button-primary {
    width: 100%;
    margin-top: 1.5rem;
}

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

/* Scroll Reveal Animations */
.reveal-item {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Critical scroll-reveal exclusion for modal */
#portal-modal,
#portal-modal * {
    opacity: 1 !important;
    transform: none !important;
}

/* Responsive Design */

/* Tablet (max-width: 960px) */
@media (max-width: 960px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2rem; }
    .hero-subheading { font-size: 1.15rem; }

    .main-nav .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--color-primary);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        padding: 1.5rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 999;
    }

    .main-nav.nav-open .nav-links {
        display: flex;
    }

    .nav-links li {
        margin: 0.5rem 0;
        text-align: center;
    }

    .nav-links a, #portal-btn {
        padding: 0.75rem 1.5rem;
        display: block;
        width: fit-content;
        margin: 0.5rem auto;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.is-active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .hamburger.is-active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.is-active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .hero-ctas {
        flex-direction: column;
        gap: 1rem;
    }

    .stats-grid, .services-grid, .case-studies-grid, .testimonials-grid, .team-grid, .insights-grid, .contact-grid, .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .footer-content {
        text-align: center;
    }
    .footer-nav ul, .footer-contact ul {
        width: fit-content;
        margin: 0 auto;
    }
}

/* Mobile (max-width: 600px) */
@media (max-width: 600px) {
    :root {
        --section-padding-large: 4rem;
        --section-padding-medium: 3rem;
        --section-padding-small: 1.5rem;
    }

    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.8rem; margin-bottom: 2.5rem; }
    h3 { font-size: 1.4rem; }
    .hero-subheading { font-size: 1rem; margin-bottom: 2rem;}

    .nav-logo .logo-text {
        font-size: 1.4rem;
    }

    .hero {
        min-height: 80vh;
        padding-top: var(--header-height);
    }
    .hero-ctas {
        flex-direction: column;
        gap: 0.8rem;
    }
    .button {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

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

    .trusted-by-strip {
        gap: 2rem 1.5rem;
    }
    .trusted-by-strip span {
        font-size: 0.85rem;
    }

    .service-card, .case-study-card, .testimonial-card, .team-member-card, .insight-card, .contact-details, .contact-form-wrapper {
        padding: 2rem 1.5rem;
    }

    .modal-box {
        padding: 2rem 1.5rem;
    }
    .modal-box h2 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .footer-brand p {
        text-align: center;
    }
}