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

:root {
    --color-primary: #1E293B; /* Deep Charcoal */
    --color-accent: #3B82F6; /* Steel Blue */
    --color-accent-hover: #2563EB; /* Darker Steel Blue for hover */
    --color-digital-green: #22C55E; /* Digital Green */
    --color-background: #0F172A; /* Even darker background */
    --color-text: #E2E8F0; /* Light Gray for body text */
    --color-text-muted: #94A3B8; /* Muted text */
    --color-white: #FFFFFF;
    --color-black: #000000;
    --color-light-gray: #CBD5E1; /* For secondary text, client logos */
    --color-border: #334155; /* Subtle border for cards */
    --color-error: #EF4444; /* Red for errors */

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    --padding-section: 6rem 0; /* Default padding for sections */
    --container-max-width: 1200px;
}

/* Base styles and resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-white);
    line-height: 1.2;
    margin-bottom: 0.8em;
}
h1 { font-size: 3.5rem; font-weight: 800; }
h2 { font-size: 2.5rem; font-weight: 700; }
h3 { font-size: 1.75rem; font-weight: 700; }
h4 { font-size: 1.25rem; font-weight: 600; }

p {
    margin-bottom: 1rem;
}

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

ul {
    list-style: none;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.section-heading {
    text-align: center;
    margin-bottom: 1rem;
}

.section-subheading {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 1.15rem;
    max-width: 700px;
    margin: 0 auto 3rem auto;
}

.bg-dark-variant {
    background-color: var(--color-primary);
}

.text-white { color: var(--color-white) !important; }
.text-white-muted { color: var(--color-text-muted) !important; }

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    white-space: nowrap; /* Prevent button text from wrapping */
}

.primary-cta {
    background-color: var(--color-accent);
    color: var(--color-white);
}
.primary-cta:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
}
.primary-cta:disabled {
    background-color: var(--color-text-muted);
    cursor: not-allowed;
}

.secondary-cta {
    background-color: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
}
.secondary-cta:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
    transform: translateY(-2px);
}

.primary-outline {
    background-color: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
    padding: 0.75rem 1.5rem; /* slightly smaller for nav */
    font-size: 0.9rem;
}
.primary-outline:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
}

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

nav.scrolled {
    background-color: rgba(15, 23, 42, 0.95); /* Slightly darker/more opaque */
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    backdrop-filter: blur(5px);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-white);
    text-decoration: none;
    letter-spacing: -0.05em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}
.nav-links a {
    color: var(--color-text-muted);
    font-weight: 500;
    position: relative;
}
.nav-links a:hover {
    color: var(--color-white);
}
.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}
.nav-links a:hover::after {
    width: 100%;
}

.hamburger-menu {
    display: none; /* Hidden by default, shown on mobile */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}
.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-white);
    margin-bottom: 5px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger-menu span:last-child {
    margin-bottom: 0;
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url('https://via.placeholder.com/1920x1080/1E293B/E2E8F0?text=Digital+Fortress+Background') center center/cover no-repeat;
    position: relative;
    overflow: hidden;
}

#hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    margin-top: -50px; /* Adjust for nav */
}

.hero-subheading {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    max-width: 800px;
    margin: 1.5rem auto 3rem auto;
    color: var(--color-text);
}

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

/* Stats Strip */
#stats {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 3rem 0;
    text-align: center;
    position: relative;
    z-index: 100;
}

#stats .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    gap: 2rem;
}

.stat-item {
    flex: 1 1 200px; /* Allow items to grow/shrink but prefer 200px base */
    min-width: 200px;
    padding: 1rem;
}
.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent); /* Highlight numbers */
    margin-bottom: 0.5rem;
}
.stat-label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
    color: var(--color-text);
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

/* Card base style */
.card-hover-shadow {
    background-color: var(--color-primary);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--color-border);
}
.card-hover-shadow:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}


/* Service Cards */
.service-card {
    text-align: center;
}
.service-card i {
    font-size: 3rem; /* Placeholder for icon */
    color: var(--color-accent);
    margin-bottom: 1rem;
    display: inline-block;
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    background-color: rgba(59, 130, 246, 0.1); /* Light accent background for icons */
}
/* Placeholder CSS Icons - using specific unicode */
.service-card .icon-server::before { content: '🖴'; } /* Unicode for server */
.service-card .icon-shield-check::before { content: '🛡️'; } /* Unicode for shield */
.service-card .icon-cloud::before { content: '☁️'; } /* Unicode for cloud */


/* Clients Strip */
.clients-strip {
    padding: 3rem 0;
    background-color: var(--color-background);
}
.clients-strip .section-subheading {
    margin-bottom: 2rem;
    color: var(--color-text);
}
.client-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}
.client-logos span {
    font-family: var(--font-heading);
    color: var(--color-text-muted); /* Muted gray */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    font-size: 1.1rem;
    opacity: 0.7; /* Muted effect */
}

/* Case Study Cards */
.case-study-card {
    display: flex;
    flex-direction: column;
}
.case-study-tag {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-white);
    padding: 0.4rem 0.8rem;
    border-radius: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    align-self: flex-start; /* Align tag to start */
}
.case-study-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}
.case-study-card p {
    flex-grow: 1; /* Make paragraph grow to push read more down */
    color: var(--color-text);
}
.case-study-card .read-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--color-accent);
    font-weight: 600;
}

/* Testimonial Cards */
.testimonial-card {
    background-color: var(--color-background);
    padding: 2rem;
    border-left: 4px solid var(--color-accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.testimonial-card .quote {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    color: var(--color-text-muted);
}
.testimonial-card .author {
    font-weight: 600;
    color: var(--color-white);
    font-size: 0.95rem;
}
.testimonial-card .author span {
    color: var(--color-text-muted);
    font-weight: 400;
}

/* About Section */
.about-content {
    align-items: center;
    text-align: left;
}
.about-content p {
    color: var(--color-text);
    margin-bottom: 1rem;
    font-size: 1.05rem;
}
.about-image {
    text-align: center; /* Center the image */
}
.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Team Cards */
.team-card {
    text-align: center;
    background-color: var(--color-background);
}
.team-card .avatar {
    width: 64px;
    height: 64px;
    background-color: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-white);
    text-transform: uppercase;
}
.team-card .member-name {
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 0.25rem;
}
.team-card .member-title {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.team-card .member-bio {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Insights Cards (Blog Teasers) */
.insight-card {
    display: flex;
    flex-direction: column;
    text-align: left;
}
.insight-date {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}
.insight-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}
.insight-card p {
    font-size: 0.95rem;
    color: var(--color-text);
    flex-grow: 1;
}
.insight-card .read-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--color-accent);
    font-weight: 600;
}

/* Contact Section */
#contact .contact-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}
.contact-email-info {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--color-text);
}
.contact-email-info a {
    color: var(--color-accent);
    font-weight: 600;
}
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background-color: var(--color-background);
    padding: 2.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 1px solid var(--color-border);
}
.form-group {
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    font-weight: 500;
}
.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-border);
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 0.5rem;
    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 {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}
.form-group textarea {
    resize: vertical;
    min-height: 120px;
}
.contact-form button {
    align-self: flex-start;
    margin-top: 1rem;
}

/* Footer */
footer {
    background-color: var(--color-background);
    padding: 4rem 0 2rem 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
}
.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    text-align: left;
    margin-bottom: 3rem;
    gap: 2rem;
}
.footer-brand, .footer-nav, .footer-contact {
    flex: 1 1 250px;
}
.footer-brand .logo {
    display: block;
    margin-bottom: 1rem;
}
.footer-brand p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}
.footer-nav h4, .footer-contact h4 {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    color: var(--color-white);
}
.footer-nav ul li {
    margin-bottom: 0.75rem;
}
.footer-nav a, .footer-contact a {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    transition: color 0.2s ease;
}
.footer-nav a:hover, .footer-contact a:hover {
    color: var(--color-accent);
}
.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.footer-bottom p {
    margin: 0.5rem 0;
}

/* Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}
.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
/* CRITICAL scroll-reveal exclusion */
#portal-modal, #portal-modal * {
    opacity: 1 !important;
    transform: none !important;
}

/* Modal */
#portal-modal {
    display: none; /* Hidden by default */
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    cursor: pointer; /* Allows clicking backdrop to close */
}
#portal-modal.open {
    display: flex;
}

.modal-box {
    background-color: var(--color-background);
    padding: 2.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 450px;
    position: relative;
    border: 1px solid var(--color-border);
    cursor: default; /* Reset cursor for content inside */
}
.modal-box h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-white);
}
.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1; /* Prevent extra height */
    outline: none; /* Remove default focus ring */
}
.modal-close-btn:hover {
    color: var(--color-white);
}
.modal-close-btn::before {
    content: '×'; /* Times symbol for close */
}
.modal-close-btn:focus-visible {
    box-shadow: 0 0 0 2px var(--color-accent);
    border-radius: 4px;
}

#portal-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
#portal-form .form-group label {
    color: var(--color-text);
}
#portal-form button {
    width: 100%;
    margin-top: 1rem;
}

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

.form-success {
    color: var(--color-digital-green);
    font-size: 1.1rem;
    text-align: center;
    padding: 2rem;
    background-color: var(--color-primary);
    border-radius: 0.75rem;
    border: 1px solid var(--color-digital-green);
}

/* Responsive */
@media (max-width: 960px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

    .nav-links {
        gap: 1.5rem;
    }
    .hero-actions {
        flex-direction: column;
    }
    .hero-actions .button {
        width: 80%;
        max-width: 350px;
    }

    .grid-4 {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    .grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    .grid-2 {
        grid-template-columns: 1fr;
    }
    #about .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    #about .about-image {
        order: -1; /* Image above text on mobile */
        margin-bottom: 2rem;
    }
    .footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-brand, .footer-nav, .footer-contact {
        width: 100%;
        text-align: center;
    }
    .footer-nav ul {
        padding-left: 0;
    }
    .footer-bottom {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.3rem; }

    .section-padding {
        padding: 4rem 0;
    }
    .section-subheading {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .nav-links {
        display: none; /* Hidden by default on mobile */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-primary);
        padding: 1.5rem;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        transition: transform 0.3s ease-out, opacity 0.3s ease;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none; /* Disable interaction when hidden */
    }
    nav.nav-open .nav-links {
        display: flex;
        transform: translateY(0);
        opacity: 1;
        pointer-events: all; /* Enable interaction when open */
    }
    .nav-links a, .nav-links #portal-btn {
        width: 100%;
        text-align: center;
        padding: 0.8rem;
        border-radius: 0.5rem;
        margin-bottom: 0.5rem;
    }
    .nav-links a:last-of-type { margin-bottom: 0; }
    .nav-links a::after {
        display: none; /* Hide hover underline on mobile menu */
    }

    .hamburger-menu {
        display: block; /* Show hamburger */
    }
    nav.nav-open .hamburger-menu span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    nav.nav-open .hamburger-menu span:nth-child(2) {
        opacity: 0;
    }
    nav.nav-open .hamburger-menu span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    #stats .container {
        flex-direction: column;
        gap: 1.5rem;
    }
    .stat-item {
        min-width: unset;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 1.5rem;
    }
    .stat-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .client-logos {
        flex-direction: column;
        gap: 1.5rem;
    }
    .client-logos span {
        font-size: 0.9rem;
    }
    .contact-form {
        padding: 1.5rem;
    }
}