/* NIBIT Design System */
:root {
    /* Color Palette */
    --primary-color: #ECA400;
    /* Golden Yellow/Mustard */
    --primary-hover: #D69200;
    --secondary-color: #1A1A1A;
    /* Dark Charcoal */
    --accent-color: #00BCD4;
    /* Teal / Cyan */
    --text-color: #333333;
    --bg-light: #F9F9F9;
    --white: #FFFFFF;
    --border-color: #E0E0E0;

    /* Typography */
    --font-heading: 'Roboto', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --container-width: 1240px;
    /* Width increase for breathability */
    --header-height: 80px;
    --section-spacing: 120px;
    /* Increased from 80px */
    --spacing-sm: 20px;
    --spacing-md: 40px;
    --spacing-lg: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
    /* Preserve aspect ratio */
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    /* Slightly rounded for modern corporate feel */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.text-accent {
    color: var(--accent-color);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    color: #666;
}

/* Header */
header {
    height: var(--header-height);
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    color: var(--primary-color);
}

.logo img {
    max-height: 65px;
    /* Increased to fill header (80px height) */
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--secondary-color);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    margin-top: var(--header-height);
    padding: calc(var(--section-spacing) * 0.8) 0;
    min-height: 85vh;
    /* Slightly taller */
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 90% 10%, #fffcf5 0%, #ffffff 100%);
    /* Subtle warmth */
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    /* Increased gap */
    align-items: center;
}

.hero-text h1 {
    font-size: 4rem;
    /* Scaled up from 3.5rem */
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    color: #111;
}

.hero-text p {
    font-size: 1.25rem;
    /* Larger body */
    color: #555;
    margin-bottom: 2.5rem;
    max-width: 520px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* Floating Animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.hero-image {
    position: relative;
    border-radius: 20px;
    /* Softer corners */
    overflow: hidden;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.15);
    /* Deep elevator shadow */
    animation: float 6s ease-in-out infinite;
}

/* Trust Strip Refined */
.trust-strip {
    background-color: transparent;
    /* Removed grey box */
    padding: 60px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.trust-heading {
    text-align: center;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #999;
    margin-bottom: 30px;
    font-weight: 600;
}

.partners-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 80px;
    /* Generous spacing */
}

.partners-grid img {
    max-height: 45px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    /* Elegant default */
    opacity: 0.6;
    transition: all 0.4s ease;
}

.partners-grid img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* Features/Intro */
.intro {
    padding: var(--section-spacing) 0;
    text-align: center;
}

.intro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.intro-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, border-color 0.3s ease;
    border-top: 4px solid transparent;
    /* Top accent preparation */
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Service Card Accent & Hover */
.intro-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    opacity: 0.5;
    transition: opacity 0.3s;
}

.intro-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.intro-card:hover::before {
    opacity: 1;
}

.intro-card img {
    height: 80px;
    width: auto;
    margin: 0 auto 20px auto;
    /* Fix alignment */
    object-fit: contain;
    display: block;
}

.intro-card h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.25rem;
}

.intro-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* About Page */
.about-hero {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 100px 0;
    text-align: center;
    margin-top: var(--header-height);
    position: relative;
    z-index: 1;
}

.about-hero h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.mission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.mission-card {
    background: #fff;
    padding: 60px 40px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border-top: 4px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.mission-card:hover {
    transform: translateY(-5px);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

/* Values Focus Mode */
.values-grid:hover .value-card {
    opacity: 0.5;
    filter: blur(1px);
    /* Subtle blur for focus effect */
}

.values-grid .value-card:hover {
    opacity: 1;
    filter: blur(0);
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.value-card {
    text-align: center;
    padding: 40px 30px;
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: default;
}

.value-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Solutions Wide List */
.solutions-container {
    max-width: 900px;
    margin: 50px auto 0;
}

.solution-row {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    background: #fff;
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.solution-row:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    transform: translateX(10px);
}

.solution-icon-box {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: background 0.3s;
}

.solution-row:hover .solution-icon-box {
    background: var(--primary-color);
    color: #fff;
}

.solution-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #111;
    font-size: 1.3rem;
}

.solution-content p {
    color: #555;
    font-size: 1rem;
    margin: 0;
}

/* Tech Stack (Vertical Architecture) */
.tech-stack {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 800px;
    margin: 60px auto;
    position: relative;
}

/* Connecting Line */
.tech-stack::before {
    content: '';
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 50%;
    width: 2px;
    background: #f0f0f0;
    z-index: 0;
    transform: translateX(-50%);
}

.tech-group {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    z-index: 1;
    text-align: center;
    transition: transform 0.3s ease;
}

.tech-group:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.tech-group h3 {
    display: inline-block;
    background: #fff;
    /* Mask line behind text */
    padding: 0 20px;
    color: #999;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 25px;
    border-bottom: none;
}

/* Tech Icon Grid (already exists but ensuring centering) */
.tech-icon-grid {
    justify-content: center;
}

/* Portfolio Immersive Loop */
.case-study {
    margin-bottom: 120px;
    /* Increased Rhythm */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    /* More breathing room */
    align-items: center;
}

.case-study:nth-child(even) .case-content {
    order: 2;
}

.key-stat {
    display: inline-block;
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
    background: var(--bg-light);
    padding: 5px 15px;
    border-radius: 20px;
}

/* Tech Icons */
.tech-icon-grid {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.tech-icon-item {
    text-align: center;
    flex: 1;
    min-width: 80px;
}

.tech-icon-item i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.tech-icon-item span {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Portfolio Slots */
.case-logo-slot {
    width: 100%;
    height: 120px;
    /* Reduced height */
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Align logo to right/left depending on text */
}

.case-logo-slot img {
    max-height: 80px;
    max-width: 200px;
    object-fit: contain;
}

.case-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    margin-top: 50px;
}

/* Contact Modernization */
.contact-info-box {
    background: radial-gradient(circle at 50% -20%, #2a303c 0%, #111827 100%);
    /* Matches Footer */
    color: var(--white);
    padding: 50px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.contact-info-box h3 {
    color: var(--white);
    margin-bottom: 30px;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fdfdfd;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 5px 15px rgba(236, 164, 0, 0.1);
    border-left-width: 4px;
    /* Active feedback */
}

.form-group {
    margin-bottom: 20px;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-input {
    min-height: 150px;
    resize: vertical;
}

/* Page Specific Hero Backgrounds */
.about-hero {
    background-size: cover;
    background-position: center;
    position: relative;
    color: white;
    /* Ensure text is white against images */
}

/* Base style for overlay */
.about-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    /* Dark overlay for readability */
    z-index: 1;
}

.about-hero .container {
    position: relative;
    z-index: 2;
    /* Ensure text is above overlay */
}

.hero-about {
    background-image: url('images/hero-about.png');
}

.hero-solutions {
    background-image: url('images/hero-solutions.png');
}

.hero-tech {
    background-image: url('images/hero-tech.png');
}

.hero-portfolio {
    background-image: url('images/hero-portfolio.png');
}

.hero-contact {
    background-image: url('images/hero-contact.png');
}

/* Footer (Compact Landscape) */
/* Footer (Tech-Hub Style) */
footer {
    background: radial-gradient(circle at 50% -20%, #2a303c 0%, #111827 100%);
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #9CA3AF;
    padding: 60px 0 20px;
    margin-top: 60px;
}

/* Pattern Overlay */
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1;
    pointer-events: none;
}

/* Glow Divider */
footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.5;
    box-shadow: 0 0 15px var(--primary-color);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* Changed to start for better vertical alignment */
    gap: 40px;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.footer-col h4 {
    display: block;
    /* Show headers again per design audit */
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-col:first-child {
    flex: 1.5;
    max-width: 350px;
    font-size: 0.9rem;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    /* Vertical lists feel more organized for links */
    gap: 12px;
}

.footer-col ul li a,
.footer-col ul li {
    color: #9CA3AF;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Magnetic Link Hover */
.footer-col ul li a:hover {
    color: var(--primary-color);
    transform: translateX(8px);
    text-shadow: 0 0 8px rgba(255, 160, 0, 0.4);
}

.footer-col ul li a:hover::before {
    content: '›';
    position: absolute;
    left: -15px;
    color: var(--primary-color);
    animation: fadeIn 0.3s ease;
}

/* Social Icons */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
    background: var(--primary-color);
    color: #000;
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: #6B7280;
    position: relative;
    z-index: 2;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-5px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        /* Add JS toggle later */
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-content,
    .tech-stack,
    .contact-grid,
    .case-study,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    /* Stack footer on mobile */
    .footer-grid {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }

    .footer-col ul {
        flex-direction: column;
        /* Vertical lists on mobile */
        gap: 10px;
    }

    .footer-col:first-child {
        max-width: 100%;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .case-study:nth-child(even) .case-content {
        order: 0;
    }
}