/* Design Tokens */
:root {
    --bg-primary: #FAFAFA;
    --bg-card: #FFFFFF;
    --text-primary: #1A1A1A;
    --text-secondary: #4A4A4A;
    --accent: #1A3BF0;
    --border: #E5E5E5;
    --font-family: 'Inter', system-ui, sans-serif;
    --max-width: 1200px;
    --border-radius: 4px;
    --color-white: #FFFFFF;
    --accent-hover: #1530D0; /* Darker blue for hover states */
    --accent-glow: rgba(26, 59, 240, 0.15); /* The blue glow effect */
    --accent-overlay: rgba(26, 59, 240, 0.3); /* For image overlays */
    --border-default: #E5E5E5; /* For borders */
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-primary: #050A1F;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-primary: #FFFFFF;
    --text-secondary: #A0A5B8;
    --border: rgba(255, 255, 255, 0.1);
    --border-default: rgba(255, 255, 255, 0.1);
    --accent-glow: rgba(26, 59, 240, 0.4);
}

body.dark-mode {
    /* Deep Navy background color */
    background-color: #02040A;
    
    /* 92% opacity Dark Blue overlay on top of the image */
    background-image: 
        linear-gradient(rgba(2, 4, 10, 0.92), rgba(2, 4, 10, 0.92)), 
        url('images/bg-galaxy.avif');
        
    background-blend-mode: normal; /* Reset blend mode to simple stacking */
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: rgba(255, 255, 255, 0.85);
    background-image: url('images/bg-galaxy.avif');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: overlay;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* =========================================
   1. GLOBAL HEADER & NAV (Desktop Default)
   ========================================= */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-default);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0; /* Container handles padding */
}

/* Dark Mode Header */
body.dark-mode header {
    background-color: rgba(2, 4, 10, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px; /* Fixed height for stability */
}

nav {
    display: flex;
    align-items: center;
    position: relative;
}

/* LOGO */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 32px;
    width: auto;
    display: block;
}

/* Invert logo in dark mode */
body.dark-mode .logo img {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* NAV LINKS (Desktop) */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem; /* Clean spacing between links */
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover, 
.nav-links a.active {
    color: var(--accent);
}

/* THEME TOGGLE (Desktop) */
.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    color: var(--text-primary);
    margin-left: 1rem; /* Extra separation from links */
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

/* HAMBURGER (Hidden on Desktop) */
.menu-toggle {
    display: none;
    min-width: 44px;
    min-height: 44px; /* WCAG Requirement */
}

.theme-toggle .moon-icon {
    display: none;
}

body.dark-mode .theme-toggle .sun-icon {
    display: none;
}

body.dark-mode .theme-toggle .moon-icon {
    display: block;
}

/* =========================================
   ACCESSIBILITY (WCAG 2.2 AA Compliance)
   ========================================= */

/* Skip to Content Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent);
    color: white;
    padding: 8px;
    z-index: 9999;
    text-decoration: none;
    font-weight: 500;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* Focus Indicators (Precision Look) */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 2px;
}

/* Ensure focus works on dark mode too */
body.dark-mode :focus-visible {
    outline-color: #FFF;
}

/* Respect "Prefers Reduced Motion" */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .fade-in {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Screen Reader Only (Visually Hidden) */
.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;
}

/* Dark Mode Card Styles (Glassmorphism) */
body.dark-mode .service-card,
body.dark-mode .process-card,
body.dark-mode .stat-card,
body.dark-mode .contact-card,
body.dark-mode .service-detail-card,
body.dark-mode .footer {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-primary);
}

/* Dark Mode Text Colors */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode .hero-title,
body.dark-mode .page-title,
body.dark-mode .service-title,
body.dark-mode .process-title,
body.dark-mode .capabilities-title,
body.dark-mode .approach-title,
body.dark-mode .about-hero-title {
    color: #FFFFFF;
}

body.dark-mode p,
body.dark-mode .hero-subtitle,
body.dark-mode .page-intro,
body.dark-mode .service-description,
body.dark-mode .process-description,
body.dark-mode .lead-text,
body.dark-mode .expectation,
body.dark-mode .trust-text,
body.dark-mode .approach-text,
body.dark-mode .mission-statement,
body.dark-mode .capabilities-subtitle,
body.dark-mode .approach-hero-subtitle {
    color: #A0A5B8;
}

/* Ensure contact card button remains visible in dark mode */
body.dark-mode .contact-card .btn-primary {
    background-color: var(--accent);
    color: var(--color-white);
    border-color: var(--accent);
}

body.dark-mode .footer-logo {
    filter: brightness(0) invert(1); /* Turns all pixels purely White */
    opacity: 0.9;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent);
    width: 0%;
    z-index: 9999;
    box-shadow: 0 0 10px var(--accent);
    transition: width 0.1s linear;
}

/* Hero Section */
.hero {
    padding: 7.5rem 0;
    background: transparent;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.02) 100%);
    pointer-events: none;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
}

.hero-text {
    text-align: left;
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.1);
    object-fit: cover;
    filter: saturate(1.2) contrast(1.1);
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: left;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    text-align: left;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    border: 1px solid transparent;
    font-family: var(--font-family);
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--color-white);
    border-color: var(--accent);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

.btn-secondary:hover {
    background-color: var(--accent);
    color: var(--color-white);
}

/* Trust Section */
.trust {
    padding: 5rem 0;
    background-color: transparent;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.trust-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Services Section */
.services {
    padding: 4rem 0;
    background-color: transparent;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.service-card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 1.25rem var(--accent-glow);
    transform: translateY(-0.25rem);
}

.service-card:hover .service-title {
    color: var(--accent);
}

.service-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
    display: block;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Capabilities Section */
.capabilities {
    padding: 4rem 0;
    background-color: transparent;
    border-top: 1px solid var(--border);
}

.capabilities-header {
    text-align: center;
    margin-bottom: 2rem;
}

.capabilities-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.capabilities-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Approach Section */
.approach {
    padding: 6.25rem 0;
    background-color: transparent;
    border-top: 1px solid var(--border);
}

.approach-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.approach-title {
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.approach-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

/* Footer */
.footer {
    padding: 3rem 0;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: start;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
}

.footer-logo {
    display: block;
    height: 24px;
    width: auto;
    margin-bottom: 0.5rem;
    object-fit: contain;
}

.footer-tagline {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--accent);
}

.footer-contact {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
}

.footer-email {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-email:hover {
    color: var(--accent-hover);
}

.footer-text {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

/* Page Hero (for non-home pages) */
.page-hero {
    padding: 4rem 0 2rem;
    background-color: transparent;
    text-align: center;
}

.page-title {
    font-size: 2.625rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.page-intro {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Services Detail Page */
.services-detail {
    padding: 3.75rem 0;
    background-color: transparent;
}

.service-detail-card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    margin-bottom: 2rem;
    transition: border-color 0.2s ease;
}

.service-detail-card:hover {
    border-color: var(--accent);
}

.service-detail-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-detail-description {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

/* List styling for cards */
.service-card ul,
.card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-card li,
.card li {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.service-card li::before,
.card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(-45deg);
}

/* Legacy support for .service-list */
.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-list li {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.service-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(-45deg);
}

.services-closing {
    padding: 5rem 0;
    background-color: transparent;
    border-top: 1px solid var(--border);
}

.services-closing-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Approach Page Sections */
.approach-section {
    padding: 5rem 0;
    background-color: transparent;
    border-top: 1px solid var(--border);
}

.approach-section:first-of-type {
    border-top: none;
}

.approach-section:nth-child(even) {
    background-color: transparent;
}

.approach-section-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.approach-section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.approach-section-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.approach-section-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2.5rem;
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
}

.approach-section-grid .approach-section-title {
    margin-bottom: 0;
}

/* Approach Page - New Structure */
.approach-hero {
    padding: 6.25rem 0 3.75rem;
    background-color: transparent;
    text-align: center;
}

.approach-hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.approach-hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

.process-grid-section {
    padding: 3.75rem 0 6.25rem;
    background-color: transparent;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.process-card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.process-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 1.25rem var(--accent-glow);
    transform: translateY(-0.25rem);
}

.process-card:hover .process-title {
    color: var(--accent);
}

.process-number {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 4rem;
    font-weight: 700;
    color: var(--text-primary);
    opacity: 0.2;
    line-height: 1;
    pointer-events: none;
    font-family: var(--font-family);
}

.process-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    transition: color 0.2s ease;
    position: relative;
    z-index: 2;
}

.process-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.process-stat {
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
    color: var(--accent);
    margin-top: 1rem;
    position: relative;
    z-index: 2;
}

/* About Page */
.about-hero {
    position: relative;
    padding: 150px 0;
    background-image: url('images/hero-about.avif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
}

.about-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.5), var(--accent-overlay));
    z-index: 0;
}

.about-hero .container {
    position: relative;
    z-index: 1;
}

.about-hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-white);
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.about-stats {
    padding: 5rem 0;
    background-color: transparent;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 1.25rem var(--accent-glow);
    transform: translateY(-0.25rem);
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0;
    line-height: 1.2;
    word-wrap: normal;
    white-space: nowrap;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 0.5rem;
}

.about-mission {
    padding: 5rem 0;
    background-color: transparent;
    border-top: 1px solid var(--border);
}

.mission-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.mission-statement {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
}

/* Contact Page Specific Styles */
.contact-hero {
    padding: 5rem 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    background-color: transparent;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-text h1 {
    margin-bottom: 1.5rem;
    font-size: 2.625rem;
    font-weight: 700;
    color: var(--text-primary);
}

.lead-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0;
}

.contact-card {
    margin-top: 2rem;
    padding: 3rem;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1.5rem;
    max-width: 450px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.contact-card .expectation {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.contact-card .btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-width: 260px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Success state for copy button */
.btn-success {
    background-color: #10B981;
    border-color: #10B981;
    color: white;
}

.contact-image-container img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, 0.05);
    display: block;
}

.contact-email-section {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 2.5rem 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
}

.contact-email-label {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.contact-email {
    display: inline-block;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-email:hover {
    color: var(--accent-hover);
}

.contact-expectation {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    text-align: center;
}

.contact-form {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 2.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-family: var(--font-family);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-textarea {
    resize: vertical;
    min-height: 7.5rem;
}

/* Fade-in Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }

    /* 1. Reset the Nav Container */
    nav {
        /* Ensure the nav bar itself stays horizontal for Logo + Toggle */
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative; /* Anchor point */
    }

    /* 2. The Mobile Menu (The Fix) */
    .nav-links {
        /* Break out of the flex flow completely */
        position: fixed; 
        top: 70px; /* Match header height */
        left: 0;
        width: 100vw; /* Force full viewport width */
        height: auto;
        
        /* Appearance */
        background-color: var(--bg-primary); /* Solid Background (White/Navy) */
        border-bottom: 1px solid var(--border-default);
        padding: 0;
        
        /* Layout */
        display: none; /* Hidden by default */
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        
        /* Layering */
        z-index: 999;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }

    /* 3. Open State */
    .nav-open .nav-links {
        display: flex; /* Show it */
    }

    /* 4. Link Styling */
    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 1.5rem 0;
        border-bottom: 1px solid rgba(128, 128, 128, 0.1);
        font-size: 1.1rem;
        display: block; /* Ensure it fills the width */
        margin: 0; /* Remove any desktop margins */
    }

    /* 5. Theme Toggle inside Mobile Menu */
    .theme-toggle {
        margin: 1.5rem auto !important; /* Center it */
        width: 100%;
        justify-content: center;
    }

    /* 6. Hamburger Icon Visibility */
    .menu-toggle {
        display: flex;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1000;
        min-width: 44px;
        min-height: 44px; /* WCAG Requirement */
        align-items: center;
        justify-content: center;
    }
    
    .menu-toggle .bar {
        display: block;
        width: 24px;
        height: 2px;
        background-color: var(--text-primary);
        margin: 6px 0;
        transition: 0.3s;
    }
    
    /* Animate Hamburger to X */
    .nav-open .menu-toggle .top-bar { 
        transform: rotate(45deg) translate(5px, 6px); 
    }
    
    .nav-open .menu-toggle .bottom-bar { 
        transform: rotate(-45deg) translate(5px, -6px); 
    }
    
    .nav-open .menu-toggle .bar { 
        background-color: var(--accent); 
    }

    .hero {
        padding: 5rem 0;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-text {
        text-align: center;
    }

    .hero-title {
        font-size: 2.25rem;
        text-align: center;
    }

    .hero-subtitle {
        font-size: 1.125rem;
        text-align: center;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .trust {
        padding: 3.75rem 0;
    }

    .trust-text {
        font-size: 1rem;
    }

    .services {
        padding: 2.5rem 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 2rem;
    }

    .capabilities {
        padding: 2.5rem 0;
    }

    .capabilities-header {
        margin-bottom: 1.5rem;
    }

    .capabilities-title {
        font-size: 1.75rem;
    }

    .capabilities-subtitle {
        font-size: 1rem;
    }

    .capabilities-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .approach {
        padding: 3.75rem 0;
    }

    .approach-title {
        font-size: 1.75rem;
    }

    .approach-text {
        font-size: 1rem;
    }

    .page-hero {
        padding: 2.5rem 0 1.5rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-intro {
        font-size: 1rem;
    }

    .service-detail-card {
        padding: 2rem;
        margin-bottom: 1.5rem;
    }

    .service-detail-title {
        font-size: 1.5rem;
    }

    .services-closing {
        padding: 3.75rem 0;
    }

    .approach-section {
        padding: 3.75rem 0;
    }

    .approach-section-title {
        font-size: 1.625rem;
    }

    .approach-section-text {
        font-size: 1rem;
    }

    .approach-section-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .approach-hero {
        padding: 5rem 0 2.5rem;
    }

    .approach-hero-title {
        font-size: 2.25rem;
    }

    .approach-hero-subtitle {
        font-size: 1.125rem;
    }

    .process-grid-section {
        padding: 2.5rem 0 3.75rem;
    }

    .process-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .process-card {
        padding: 2rem;
    }

    .process-number {
        top: auto;       /* Unset the top position */
        bottom: 1rem;    /* Move to bottom */
        right: 1rem;     /* Keep on right */
        font-size: 3rem; /* Shrink slightly from 4rem */
        opacity: 0.15;   /* Fade it out a bit more so text is readable if it overlaps description */
    }

    .about-hero {
        padding: 6.25rem 0;
    }

    .about-hero-title {
        font-size: 2.25rem;
    }

    .about-stats {
        padding: 3.75rem 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stat-card {
        padding: 2rem;
    }

    .stat-number {
        font-size: 1.5rem;
        white-space: normal;
    }

    .about-mission {
        padding: 3.75rem 0;
    }

    .mission-statement {
        font-size: 1.25rem;
    }

    .contact-hero {
        padding: 2.5rem 0;
        min-height: auto;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-text h1 {
        font-size: 2rem;
        text-align: center;
    }

    .lead-text {
        text-align: center;
    }

    .contact-card {
        text-align: center;
        width: 100%;
        max-width: 100%;
        align-items: center;
        padding: 2.5rem;
    }

    .contact-form {
        padding: 2rem;
    }


    .footer {
        padding: 2rem 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-column {
        text-align: center;
        align-items: center;
    }

    .footer-logo {
        margin-left: auto;
        margin-right: auto;
    }

    .footer-links {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .service-title {
        font-size: 1.25rem;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .service-detail-card {
        padding: 1.5rem;
    }

    .service-detail-title {
        font-size: 1.375rem;
    }

    .approach-section-title {
        font-size: 1.5rem;
    }

    .contact-email-section {
        padding: 2rem 1.25rem;
    }

    .contact-email {
        font-size: 1.125rem;
    }

    .contact-form {
        padding: 1.5rem;
    }
}

