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

:root {
    /* Colors - Light theme */
    --background: hsl(210, 18%, 96%);
    --foreground: hsl(220, 14%, 12%);
    --card: hsl(0, 0%, 100%);
    --card-foreground: hsl(220, 14%, 12%);
    --primary: hsl(214, 88%, 44%);           /* brand blue */
    --primary-foreground: hsl(0, 0%, 100%);
    --primary-dark: hsl(220, 72%, 22%);      /* deep navy – header / footer */
    --primary-mid: hsl(214, 72%, 34%);       /* mid navy – section headers */
    --secondary: hsl(210, 14%, 94%);
    --secondary-foreground: hsl(220, 14%, 16%);
    --muted: hsl(210, 18%, 88%);
    --muted-foreground: hsl(220, 12%, 42%);
    --border: hsl(210, 18%, 82%);
    --input: hsl(210, 18%, 100%);
    --accent: hsl(200, 80%, 45%);            /* cyan-blue accent */
    --accent-orange: hsl(24, 90%, 52%);      /* warm orange – hover / highlights */
    --surface-tint: hsl(214, 60%, 97%);      /* very light blue tint for alternate sections */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    /* Make overall text weight lighter as requested */
    font-weight: 300;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background);
    z-index: 50;
    opacity: 1;
    transition: opacity 0.7s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    position: relative;
}

.spinner-icon {
    width: 3rem;
    height: 3rem;
    color: var(--primary);
    animation: spin 1s linear infinite;
}

.spinner-track {
    opacity: 0.25;
}

.spinner-fill {
    opacity: 0.75;
}

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

.loading-text {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Main Content */
.main-content {
    min-height: 100vh;
    opacity: 0;
    transition: opacity 0.7s ease;
}

.main-content.visible {
    opacity: 1;
}

/* Header */
.header {
    background: var(--primary-dark);
    color: hsl(0, 0%, 100%);
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 3px solid var(--primary);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(6px);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.logo:hover {
    /* hover animation removed: keep title/logo static on hover */
    transform: none;
}

.logo-image {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
    background: transparent; /* let the PNG show through without an opaque box */
    padding: 0; /* no white padding box */
    border-radius: 0.25rem;
    box-shadow: 0 4px 14px rgba(16, 24, 40, 0.04);
    border: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.logo:hover .logo-image {
    /* neutralize hover transform/scale and restore default subtle shadow */
    transform: none;
    box-shadow: 0 4px 14px rgba(16, 24, 40, 0.04);
}

/* Compact, generated mark for the logo (white-on-primary) */
/* If you still need an adaptive variant that forces a white-on-primary mark,
   keep the `.logo-image--adapt` class on the <img>. Otherwise the default
   `.logo-image` will show the PNG as-is without a background box. */
.logo-image--adapt {
    background: var(--primary);
    padding: 0.375rem;
    border-radius: 0.375rem;
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
    filter: brightness(0) invert(1) saturate(1.1) contrast(1);
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    background-color: var(--primary);
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon span {
    color: white;
    font-weight: 300;
    font-size: 1.125rem;
}

.logo-text {
    font-weight: 300;
    color: hsl(0, 0%, 100%);
    letter-spacing: 0.25px;
    font-family: 'Inter', sans-serif;
    font-size: 2.25rem;
}

@media (min-width: 768px) {
    .logo-image {
        width: 3rem;
        height: 3rem;
    }
}



.nav {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .nav {
        display: flex;
    }
}

.nav-link {
    color: hsl(210, 40%, 82%);
    text-decoration: none;
    transition: all 0.22s ease;
    font-weight: 300;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--accent-orange);
    transition: transform 0.22s ease;
}

.nav-link:hover {
    color: hsl(0, 0%, 100%);
    background: rgba(255,255,255,0.07);
}

.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Active nav link style when its section is in view */
.nav-link.active {
    color: hsl(0, 0%, 100%);
    background: rgba(255,255,255,0.08);
    font-weight: 600;
}

.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.hero {
    background-image: linear-gradient(180deg, rgba(12,30,60,0.54) 0%, rgba(16,44,88,0.42) 100%), url('images/titlebg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: hsl(0, 0%, 100%);
    padding: 4rem 0;
}

@media (min-width: 1024px) {
    .hero {
        padding: 8rem 0;
    }
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr 520px; /* left text + fixed-width form column */
    }
}

.hero-form {
    /* Make the form sit on the same background but with a semi-opaque card
       so inputs remain readable. Backdrop blur improves legibility over busy
       images on supported browsers. */
    /* slightly more transparent so the background image shows through more */
    background-color: rgba(255,255,255,0.22);
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(16,24,40,0.06);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    max-width: 100%;
}

.hero-form .quote-form-title {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.hero-form .quote-form-desc {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: #ffffff; /* make quote description white as requested */
}

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

@media (max-width: 1023px) {
    .hero-form .form-row {
        grid-template-columns: 1fr;
    }
}

.hero-title {
    font-size: 3.25rem;
    font-weight: 300; /* lighter weight as requested */
    line-height: 1.05;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .hero-title {
        font-size: 4.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 5.5rem;
    }
}

.hero-description {
    font-size: 1.125rem;
    opacity: 0.8;
    margin-bottom: 2rem;
    line-height: 1.75;
}

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

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
    }
}

.hero-image {
    background-color: rgba(29, 78, 216, 0.1);
    border-radius: 0.5rem;
    height: 24rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-icon {
    width: 12rem;
    height: 12rem;
    color: var(--primary);
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 300;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-outline {
    border: 2px solid rgba(255,255,255,0.75);
    color: hsl(0, 0%, 100%);
    background: rgba(255,255,255,0.06);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.14);
    border-color: hsl(0, 0%, 100%);
}

/* Form inputs - highlighted and accessible */
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], textarea, select, .input {
    background: var(--input);
    border: 1px solid color-mix(in srgb, var(--primary) 8%, var(--border) 92%);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(16,24,40,0.03) inset;
    transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.08s ease;
    width: 100%;
    color: var(--foreground);
}

input::placeholder, textarea::placeholder {
    color: var(--muted-foreground);
}

input:focus, textarea:focus, select:focus, .input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 14px 40px rgba(33,102,255,0.12);
    transform: translateY(-1px) scale(1.002);
}

/* Highlighted form controls used for important fields like project description & service type */
.highlighted {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border) 72%);
    box-shadow: 0 18px 50px rgba(33,102,255,0.08), 0 2px 6px rgba(16,24,40,0.04) inset;
    background: color-mix(in srgb, var(--card) 88%, var(--primary) 12%);
}

.highlighted:focus {
    border-color: var(--primary);
    box-shadow: 0 30px 80px rgba(33,102,255,0.12), 0 2px 8px rgba(16,24,40,0.04) inset;
}

input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 3px solid rgba(33,102,255,0.09);
    outline-offset: 2px;
}

.btn-full {
    width: 100%;
}

/* Services Section */
.services-section {
    padding: 5rem 0;
    background-color: var(--surface-tint);
    border-top: 4px solid var(--primary);
}

@media (min-width: 1024px) {
    .services-section {
        padding: 7rem 0;
    }
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 300;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3.5rem;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

@media (min-width: 1024px) {
    .section-title {
        font-size: 3rem;
    }
}

.section-description {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    max-width: 42rem;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    /* 3 columns on tablet/desktop to form a 3x3 with 9 items */
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 1200px) {
    .services-grid {
        gap: 1.5rem;
    }
}

.service-card {
    background-color: var(--card);
    border-radius: 0.5rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    transition: box-shadow 0.2s, border-left-color 0.2s, transform 0.18s;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.service-card:hover {
    box-shadow: 0 10px 28px -4px rgba(29, 78, 216, 0.14);
    border-left-color: var(--accent-orange);
    transform: translateY(-2px);
}

.service-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    color: var(--primary);
    display: block;
    object-fit: cover; /* images will crop to the box */
    border-radius: 0.5rem;
    box-shadow: 0 6px 18px rgba(2,6,23,0.06);
}

.service-title {
    font-size: 1.125rem;
    font-weight: 300;
    margin-bottom: 0.75rem;
    text-align: center;
}

.service-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    text-align: center;
}

.section-cta {
    margin-top: 4rem;
    text-align: center;
}

/* Capabilities Section */
.capabilities-section {
    padding: 5rem 0;
    background-color: var(--card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

@media (min-width: 1024px) {
    .capabilities-section {
        padding: 7rem 0;
    }
}

.capabilities-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .capabilities-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.capabilities-image {
    background-color: rgba(29, 78, 216, 0.05);
    border-radius: 0.5rem;
    height: 24rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.capabilities-icon {
    width: 12rem;
    height: 12rem;
    color: var(--primary);
}

.capabilities-title {
    font-size: 2.25rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
    .capabilities-title {
        font-size: 3rem;
    }
}

.capabilities-description {
    color: var(--muted-foreground);
    margin-bottom: 2rem;
    line-height: 1.75;
}

.capabilities-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.capability-item {
    display: flex;
    gap: 0.75rem;
}

.capability-icon {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 9999px;
    background-color: rgba(29, 78, 216, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.capability-icon svg {
    width: 1rem;
    height: 1rem;
    color: var(--primary);
}

.capability-title {
    font-weight: 300;
    margin-bottom: 0.25rem;
}

.capability-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Quote Section */
.quote-section {
    padding: 5rem 0;
    background-color: var(--secondary);
    color: var(--secondary-foreground);
}

@media (min-width: 1024px) {
    .quote-section {
        padding: 7rem 0;
    }
}

.quote-container {
    max-width: 42rem;
}

.quote-title {
    font-size: 2.25rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 1rem;
}

@media (min-width: 1024px) {
    .quote-title {
        font-size: 3rem;
    }
}

.quote-description {
    font-size: 1.125rem;
    opacity: 0.8;
    text-align: center;
    margin-bottom: 3rem;
}

.quote-form {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* compact spacing for form rows */
    max-width: 100%;
}

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

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: 0.5rem;
    background-color: var(--input);
    border: 1px solid var(--border);
    color: var(--foreground);
    font-family: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.08s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 14px 40px rgba(33,102,255,0.08);
    transform: translateY(-1px) scale(1.001);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--muted-foreground);
}

.form-textarea {
    resize: none;
}

.form-note {
    font-size: 0.75rem;
    opacity: 0.6;
    text-align: center;
}

/* Portfolio Section */
.portfolio-section {
    padding: 5rem 0;
    background-color: var(--background);
    border-top: 4px solid var(--primary-mid);
}

@media (min-width: 1024px) {
    .portfolio-section {
        padding: 7rem 0;
    }
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.portfolio-item {
    cursor: pointer;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.portfolio-image {
    border-radius: 0.5rem;
    height: 12rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.portfolio-item:hover .portfolio-image {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.portfolio-image svg {
    width: 8rem;
    height: 8rem;
    color: #d1d5db;
}

.portfolio-title {
    font-size: 1.125rem;
    font-weight: 300;
    margin-top: 1rem;
}

.portfolio-category {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    text-transform: capitalize;
}

/* About Section */
.about-section {
    padding: 5rem 0;
    background-color: var(--card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

@media (min-width: 1024px) {
    .about-section {
        padding: 7rem 0;
    }
}

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

@media (min-width: 1024px) {
    .about-grid {
        /* Make the mosaic area take two parts and about text one part (approx 66% / 33%) */
        grid-template-columns: 2fr 1fr;
    }
}

.about-image {
    background-color: rgba(29, 78, 216, 0.05);
    border-radius: 0.5rem;
    /* reduced overall container height by 20% */
    min-height: 14.4rem; /* was 18rem */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.about-icon {
    width: 12rem;
    height: 12rem;
    color: var(--primary);
}

.about-logo-img {
    max-width: 18rem;
    max-height: 18rem;
    width: 100%;
    object-fit: contain;
}

.about-title {
    font-size: 2.25rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
    .about-title {
        font-size: 3rem;
    }
}

.about-text {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
    line-height: 1.75;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-mid) 100%);
    border-radius: 0.75rem;
    overflow: hidden;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.15rem;
    }
}

.stat-item {
    text-align: center;
    padding: 0.5rem 0.5rem;
    border-right: 1px solid rgba(255,255,255,0.08);
}

.stat-item:last-child {
    border-right: none;
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 400;
    color: hsl(0, 0%, 100%);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}
.stat-label {
    color: hsl(210, 40%, 75%);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

/* Contact Section */
.contact-section {
    padding: 5rem 0;
    background: linear-gradient(180deg, var(--surface-tint) 0%, hsl(214, 40%, 92%) 100%);
    color: var(--foreground);
    border-top: 4px solid var(--primary);
}

@media (min-width: 1024px) {
    .contact-section {
        padding: 7rem 0;
    }
}

.contact-title {
    font-size: 2.25rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 4rem;
}

@media (min-width: 1024px) {
    .contact-title {
        font-size: 3rem;
    }
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.contact-item {
    text-align: center;
}

.contact-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background-color: rgba(29, 78, 216, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.contact-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary);
}

.contact-subtitle {
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.contact-info {
    opacity: 0.8;
}

.contact-detail {
    opacity: 0.6;
    font-size: 0.875rem;
}

/* Footer */
.footer {
    background-color: var(--primary-dark);
    color: hsl(210, 40%, 82%);
    border-top: 3px solid var(--primary);
}

.footer-text,
.footer-copyright,
.footer-link,
.footer-heading {
    color: hsl(210, 40%, 82%);
}

.footer-link:hover,
.footer a.footer-link:hover,
.footer .social-link:hover {
    color: hsl(0, 0%, 100%);
    text-decoration: none;
}

.footer > .container {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo .logo-image {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255,255,255,0.95);
    border: 1px solid var(--border);
}

.footer-logo .logo-text {
    font-size: 1.25rem;
}

.footer-text {
    font-size: 0.875rem;
    opacity: 0.6;
}

/* Center the copyright/footer text so it appears centered on the page */
.footer .footer-text {
    text-align: center;
    margin-top: 0.75rem;
}

.footer a.footer-link, .footer .social-link {
    color: var(--primary);
}

.footer a.footer-link:hover, .footer .social-link:hover {
    text-decoration: underline;
}

.footer-heading {
    font-weight: 300;
    margin-bottom: 1rem;
}

.footer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link {
    font-size: 0.875rem;
    color: var(--secondary-foreground);
    opacity: 0.6;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
    }
}

.footer-copyright {
    font-size: 0.875rem;
    opacity: 0.6;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .footer-social {
        margin-top: 0;
    }
}

.social-link {
    color: var(--secondary-foreground);
    opacity: 0.6;
    text-decoration: none;
    transition: color 0.2s;
}

.social-link:hover {
    color: var(--primary);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Gradient backgrounds for portfolio items */
.gradient-purple-pink {
    background: linear-gradient(to bottom right, #fae8ff, #fce7f3);
}

.gradient-blue-cyan {
    background: linear-gradient(to bottom right, #dbeafe, #cffafe);
}

.gradient-green-emerald {
    background: linear-gradient(to bottom right, #dcfce7, #d1fae5);
}

.gradient-orange-red {
    background: linear-gradient(to bottom right, #fed7aa, #fecaca);
}

.gradient-yellow-amber {
    background: linear-gradient(to bottom right, #fef3c7, #fde68a);
}

.gradient-indigo-purple {
    background: linear-gradient(to bottom right, #e0e7ff, #f3e8ff);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Mosaic / Floor-plan styles */
.mosaic-section {
    padding: 3.25rem 0;
}
.mosaic-section .section-title {
    margin-bottom: 0.25rem;
}
.mosaic-container {
    margin-top: 1.25rem;
}
.mosaic-table {
    width: 100%;
    border-collapse: separate; /* keep gaps between cells to mimic floor-plan */
    /* border-spacing: 14px; */
    table-layout: fixed;
}
.mosaic-table td {
    /* Per-tile accent via --tile-accent (set inline on each <td>) for a light, formal palette */
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--tile-accent, var(--surface-tint)) 88%, var(--card) 12%),
        rgba(255,255,255,0.015)
    );
    border-radius: 10px;
    height: 86px; /* slightly reduced further (~10% down from 96px) */
    min-height: 58px; /* slightly reduced further (~10% down from 64px) */
    position: relative;
    vertical-align: top;
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), 0 6px 20px rgba(3,7,18,0.04);
    border: 1px solid color-mix(in srgb, var(--tile-accent, var(--surface-tint)) 14%, var(--border) 86%);
    color: var(--tile-text, var(--foreground));
    overflow: hidden;
}

/* Mosaic title inside embedded About column */
.mosaic-head {
    width: 100%;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center; /* center the mosaic title */
}
.mosaic-title {
    font-size: 2.25rem; /* match About title base size */
    font-weight: 300; /* match About title weight */
    color: var(--primary-mid);
    margin: 0 0 0.5rem 0;
    text-align: center;
}

/* Our Expertise section */
.expertise-section {
    padding: 3rem 0;
    background: linear-gradient(180deg, var(--surface-tint) 0%, rgba(255,255,255,0.6) 100%);
}
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}
.expertise-card {
    background: var(--card);
    border-radius: 0.75rem;
    padding: 1.1rem;
    box-shadow: 0 8px 30px rgba(2,6,23,0.04);
    border: 1px solid rgba(16,24,40,0.03);
}
.expertise-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-dark);
}
.expertise-card p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.98rem;
}

/* Trusted By logos */
.trusted-section {
    padding: 2rem 0 3rem 0;
}
.trusted-logos {
    /* horizontal marquee container */
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-top: 1rem;
    /* let content determine height (restore default sizing) */
    height: auto;
}
.trusted-track {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    /* ensure no wrapping and treat images as fixed-size items */
    white-space: nowrap;
    flex-wrap: nowrap;
    min-width: max-content;
    will-change: transform;
    /* slow, smooth left-to-right animation (moves content leftwards) */
    /* increased speed by 20% => duration reduced to 80% */
    animation: marquee-ltr 12s linear infinite;
}
.trusted-track img {
    flex: 0 0 auto;
    display: inline-block;
}

/* Specific marquee-logo sizing to prevent other global rules from enlarging images */
.trusted-track img.marquee-logo {
    /* restore original compact logo sizing */
    max-width: 120px !important;
    max-height: 48px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    opacity: 0.92;
    filter: grayscale(0.05) contrast(0.95);
}

/* Slight special-case to keep OLA small */
.trusted-track img.marquee-logo.ola-logo { max-width: 64px !important; max-height: 40px !important; }

/* Add subtle grey panel only for specific light logos so they remain visible */
.trusted-logos img.electricai,
.trusted-logos img.polarity,
.trusted-logos img.samarath {
    background: #2f2f2f;
    padding: 6px 8px;
    border-radius: 6px;
}

@media (max-width: 640px) {
    /* on small screens, reduce logo size and use a smaller gap */
    .trusted-track img { max-width: 90px; max-height: 40px; }
    /* mobile: reduce duration by 20% (50s -> 40s) */
    .trusted-track { animation-duration: 10s; gap: 1rem; }
}

/* Marquee animation moves the duplicated track from left to right continuously */
@keyframes marquee-ltr {
    /* move the full track left by 50% so the duplicated second half appears
       and the loop is seamless (0 -> -50%). */
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

/* Ensure the marquee stays vertically centered and doesn't let logos overlap */

.trusted-logos { display:block; }
.trusted-logos .trusted-track { align-items:center; height:100%; display:flex; }

/* Pause animation when user hovers for readability */
.trusted-logos:hover .trusted-track { animation-play-state: paused; }

/* Capability slideshow styles */
.capability-slideshow {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: 0 auto 1.5rem auto;
    overflow: hidden;
    border-radius: 0.75rem;
    background: var(--card);
    padding: 0.75rem;
}
.capability-slideshow .slides {
    /* slides act as a horizontal track */
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    height: 320px;
    transition: transform 600ms ease-in-out;
}
.capability-slideshow .slide {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.capability-slideshow img { max-width: 100%; max-height: 100%; display: block; object-fit: contain; }
.slideshow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(11,35,64,0.8);
    color: #fff;
    border: none;
    padding: 0.5rem 0.7rem;
    font-size: 1.4rem;
    border-radius: 6px;
    cursor: pointer;
    z-index: 5;
}
.slideshow-btn.prev { left: 8px; }
.slideshow-btn.next { right: 8px; }
.slideshow-btn:focus { outline: 2px solid var(--accent); }
.slideshow-indicators { display:flex; gap:0.5rem; justify-content:center; margin-top:0.6rem; }
.slideshow-indicators button { width:10px; height:10px; border-radius:50%; border:none; background:var(--muted); cursor:pointer; }
.slideshow-indicators button.active { background:var(--primary); }

@media (max-width: 640px) {
    .capability-slideshow .slides { height: 220px; }
    .capability-slideshow { padding: 0.5rem; }
}

@media (min-width: 1024px) {
    .mosaic-title {
        font-size: 3rem; /* match About title at large screens */
    }
}
.mosaic-table td:focus {
    outline: none;
}

/* inner decorative circuit-like traces (subtle) */
.mosaic-table td::after {
    /* tighten the inset so label text sits closer to tile edges; slightly reduce vertical inset */
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    top: 6px;
    bottom: 6px;
    border-radius: 6px;
    pointer-events: none;
    border: 1px dashed rgba(255,255,255,0.02);
    mix-blend-mode: overlay;
    opacity: 0.9;
}

/* subtle highlight on hover / focus */
.mosaic-table td:hover,
.mosaic-table td:focus {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(2,6,23,0.12), inset 0 -4px 18px rgba(0,0,0,0.04);
    border-color: rgba(99,102,241,0.16); /* a soft bluish rim */
}

.mosaic-table td:focus-visible {
    box-shadow: 0 22px 48px rgba(2,6,23,0.14), 0 0 0 4px rgba(99,102,241,0.06);
}

/* size helpers for interesting layout shapes */
.mosaic-table td.tile-large { height: 187px; } /* ~208 * 0.9 */
.mosaic-table td.tile-medium { height: 130px; } /* ~144 * 0.9 */
.mosaic-table td.tile-wide { height: 86px; } /* ~96 * 0.9 */

@media (max-width: 900px) {
    .mosaic-table {
        border-spacing: 8px;
    }
    .mosaic-table td {
        height: 65px; /* reduced further (~10% down from 72px) */
    }
}

/* labels inside tiles */
.mosaic-label {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: 100%;
    /* reduce vertical padding so text sits closer to top/bottom */
    padding: 0.08rem 0.35rem; /* top/bottom, left/right */
    color: var(--foreground, #e6eef8);
    font-weight: 400;
    line-height: 1.0;
    font-size: 0.95rem;
}

.mosaic-label small {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    line-height: 1;
}

/* Embedded mosaic for About section (keeps the table sized to the column) */
.about-image {
    display: flex;
    align-items: stretch; /* allow embedded mosaic to grow to fill the column */
    justify-content: center;
}
.embedded-mosaic {
    width: 100%;
    max-width: none; /* allow full column width */
}
.embedded-mosaic .mosaic-table {
    border-spacing: 8px;
}
.embedded-mosaic .mosaic-table td {
    /* match main mosaic cell height so embedded grid fits the column */
    height: 86px;
}

@media (max-width: 700px) {
    .embedded-mosaic { max-width: 100%; }
    .embedded-mosaic .mosaic-table td { height: 65px; }
}
.mosaic-label small {
    display: block;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.75);
    margin-top: 4px;
}

/* stacked items (right column visual stack) */
.mosaic-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    padding: 6px 6px;
    box-sizing: border-box;
}
.mosaic-stack-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.008));
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 0.85rem;
    color: var(--foreground, #eef7ff);
    border: 1px solid rgba(255,255,255,0.03);
    box-shadow: 0 6px 18px rgba(2,6,23,0.06);
    min-height: 85px;
}
.mosaic-stack-item:first-child { margin-top: 0; }
.mosaic-stack-item:hover,
.mosaic-stack-item:focus {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(2,6,23,0.12);
}

/* remove parent cell visuals so stacked items look like individual tiles */
.mosaic-parent {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 4px !important;
}
.mosaic-parent::after { display: none !important; }
.mosaic-parent:hover { transform: none !important; box-shadow: none !important; }

/* make stacked items span full width and look like separate tiles */
.mosaic-parent .mosaic-stack-item {
    width: 100%;
    display: block;
    margin-bottom: 6px;
}
.mosaic-parent .mosaic-stack-item:last-child { margin-bottom: 0; }

/* Trusted logos - specific override for OLA to display smaller */
.trusted-logos img.ola-logo {
    width: 64px;
    height: auto;
    max-width: none;
    max-height: none;
    display: inline-block;
    vertical-align: middle;
}

/* Our Expertise — colorful tiles */
.expertise-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.expertise-card {
    padding: 1.25rem;
    border-radius: 0.75rem;
    color: #fff;
    box-shadow: 0 10px 30px rgba(2,6,23,0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.expertise-card h3 {
    color: #fff;
    margin-bottom: 0.5rem;
}

.expertise-card p {
    color: rgba(255,255,255,0.92);
    line-height: 1.5;
}

/* Distinct gradients for each tile */
.expertise-grid .expertise-card:nth-child(1) {
    background-image: linear-gradient(135deg, #ff7a18 0%, #ff521b 100%); /* warm orange */
}

.expertise-grid .expertise-card:nth-child(2) {
    background-image: linear-gradient(135deg, #1e90ff 0%, #6a5acd 100%); /* blue / violet */
}

.expertise-card:hover,
.expertise-card:focus-within {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(2,6,23,0.12);
}


