/* ==========================================
   Vibha Technologies - CSS Stylesheet
   ========================================== */

/* --- CSS VARIABLES & TOKENS --- */
:root {
    /* Color Palette */
    --clr-primary: #1E293B;
    /* Slate 800 */
    --clr-primary-light: #334155;
    /* Slate 700 */
    --clr-accent: #D97706;
    /* Amber/Terracotta */
    --clr-accent-hover: #b45309;
    --clr-text: #475569;
    /* Slate 600 */
    --clr-text-light: #64748B;
    /* Slate 500 */
    --clr-heading: #0F172A;
    /* Slate 900 */
    --clr-bg: #FFFFFF;
    --clr-bg-alt: #F8FAFC;
    /* Slate 50 */
    --clr-border: #E2E8F0;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Utilities */
    --transition: all 0.3s ease-in-out;
    --radius: 8px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* --- RESET & BASIC STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--clr-text);
    background-color: var(--clr-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--clr-heading);
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
}

.bg-light {
    background-color: var(--clr-bg-alt);
}

.text-center {
    text-align: center;
}

.mb-5 {
    margin-bottom: 3rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.text-accent {
    color: var(--clr-accent);
}

/* --- TYPOGRAPHY UTILITIES --- */
.section-subtitle {
    color: var(--clr-accent);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.section-desc {
    font-size: 1.125rem;
    color: var(--clr-text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--clr-accent);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--clr-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: #fff;
}

.btn-secondary {
    background-color: var(--clr-primary);
    color: #fff;
}

.btn-secondary:hover {
    background-color: var(--clr-primary-light);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background-color: white;
    color: var(--clr-primary);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* --- NAVIGATION --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--clr-border);
    z-index: 1000;
    transition: var(--transition);
    padding: 1rem 0;
    overflow: hidden;
}

.navbar.scrolled {
    padding: 0.7rem 0;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

.nav-logo {
    height: 50px;
    object-fit: contain;
}

.logo-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    text-decoration: none;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--clr-primary);
    text-transform: uppercase;
    line-height: 1;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--clr-primary);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:not(.btn-primary)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--clr-accent);
    transition: var(--transition);
}

.nav-link:not(.btn-primary):hover::after,
.nav-link.active:not(.btn-primary)::after {
    width: 100%;
}

.nav-link:not(.btn-primary):hover,
.nav-link.active:not(.btn-primary) {
    color: var(--clr-accent);
}

.mobile-toggle {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--clr-primary);
    cursor: pointer;
}

/* --- HERO SECTION --- */
/* IMAGE INSTRUCTION: Swap the url() here to replace the Hero background */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-image: url('images/Hero.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: var(--clr-primary);
    /* Blend with header gradient if it doesn't stretch */
    color: white;
    padding-top: 80px;
    padding-bottom: 3rem;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Elegant dark gradient overlay */
    background: linear-gradient(to right, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.4));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-content .tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--clr-accent);
}

.hero h1 {
    font-size: 4rem;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    word-break: break-word;
}

.hero p {
    font-size: 1.25rem;
    color: #e2e8f0;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* --- ABOUT SECTION --- */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
}

.about-img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    object-fit: cover;
    object-position: bottom;
    /* Centers focus aggressively on the lower flooring to crop out the text header */
    width: 100%;
    height: 600px;
}

.about-badge {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background-color: var(--clr-primary);
    color: white;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    border: 4px solid white;
    min-width: 120px;
    max-width: 160px;
    z-index: 1;
}

.about-badge .badge-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--clr-accent);
    line-height: 1;
}

.about-badge .badge-text {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    margin-top: 0.25rem;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 500;
    color: var(--clr-heading);
}

.feature-item i {
    font-size: 1.5rem;
}

/* --- SERVICES SECTION --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--clr-bg);
    border-radius: var(--radius);
    border: 1px solid var(--clr-border);
    transition: var(--transition);
    text-align: left;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-card:hover .service-img img {
    transform: scale(1.05);
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    padding: 0 2rem;
}

.service-card p {
    padding: 0 2rem;
}

.service-list {
    margin-top: 1rem;
    border-top: 1px solid var(--clr-border);
    padding: 1rem 2rem 2.5rem 2rem;
    flex-grow: 1;
}

/* --- SECTORS SERVED / GRID CARDS SECTION --- */
.why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.why-card {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background-color: var(--clr-bg-alt);
    border-radius: var(--radius);
    border-left: 4px solid var(--clr-accent);
    transition: var(--transition);
}

.why-card:hover {
    background-color: #fff;
    box-shadow: var(--shadow-md);
}

.why-icon {
    font-size: 2.5rem;
    color: var(--clr-primary);
}

.why-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.why-card p {
    margin: 0;
    color: var(--clr-text-light);
}

.service-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--clr-text-light);
    font-size: 0.95rem;
}

.service-list li::before {
    content: '•';
    color: var(--clr-accent);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    line-height: inherit;
}



/* --- APP SPECIFIC UI (POST-IT NOTE) --- */
.post-it-note {
    background-color: #dcfce7;
    /* Light green post-it */
    color: #166534;
    padding: 1.5rem 2rem;
    position: relative;
    box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.08);
    /* Soft shadow */
    transform: rotate(-1deg);
    border-bottom-right-radius: 30px 4px;
    /* classic post it curl */
    max-width: 400px;
    border-left: 4px solid #86efac;
}

.post-it-note h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: #14532d;
    margin-bottom: 1rem;
}

.post-it-note ul li {
    margin-bottom: 0.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-it-note ul li i {
    color: #15803d;
}

/* --- GALLERY SECTION --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.2));
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-overlay span {
    transform: translateY(0);
}

/* --- BEFORE & AFTER PAIR --- */
.gallery-before-after {
    grid-column: 1 / -1;
    background-color: var(--clr-bg);
    border-radius: var(--radius);
    border: 1px solid var(--clr-border);
    padding: 2rem;
    text-align: center;
}

.ba-title {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--clr-primary);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ba-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.ba-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
}

.ba-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 3/2;
    transition: transform 0.6s ease;
}

.ba-item:hover img {
    transform: scale(1.05);
}

.ba-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: rgba(30, 41, 59, 0.85);
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.ba-label-after {
    background-color: var(--clr-accent);
}

/* --- CONTACT SECTION --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.info-block {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-icon {
    width: 50px;
    height: 50px;
    background-color: var(--clr-bg-alt);
    border: 1px solid var(--clr-border);
    color: var(--clr-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-text h5 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.info-text p,
.info-text a {
    color: var(--clr-text-light);
    margin: 0;
}

.info-text a:hover {
    color: var(--clr-accent);
}

.contact-form-wrapper {
    background-color: #fff;
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--clr-border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-family: var(--font-heading);
    color: var(--clr-heading);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--clr-text);
    transition: var(--transition);
    background-color: var(--clr-bg-alt);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--clr-accent);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

/* --- FOOTER --- */
.footer {
    background-color: var(--clr-primary);
    color: #cbd5e1;
    padding-top: 5rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-logo-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    margin-bottom: 1.5rem;
    width: fit-content;
}

.footer-logo {
    height: 60px;
    background-color: white;
    padding: 0.5rem;
    border-radius: var(--radius);
    object-fit: contain;
}

.footer-logo-text {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: #cbd5e1;
    text-transform: uppercase;
    line-height: 1;
}

.footer-brand p {
    color: #94a3b8;
    max-width: 400px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.social-links a:hover {
    background-color: var(--clr-accent);
    transform: translateY(-3px);
}

.footer h4 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links a:hover {
    color: var(--clr-accent);
    padding-left: 5px;
}

.footer-contact ul li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.footer-contact i {
    color: var(--clr-accent);
    font-size: 1.2rem;
    margin-top: 3px;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #64748b;
    font-size: 0.9rem;
}

/* --- ANIMATIONS & UTILITIES --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

.delay-5 {
    animation-delay: 1.0s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reveal on scroll classes */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: all 0.8s ease;
}

.reveal-up {
    transform: translateY(50px);
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

.reveal-active {
    opacity: 1;
    transform: translate(0, 0);
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3.5rem;
    }

    .about-container {
        gap: 2rem;
    }

    .footer-container {
        gap: 2rem;
    }
}

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-container {
        grid-template-columns: 1fr;
    }

    .about-image-wrapper {
        margin-bottom: 3rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    /* Fix horizontal overflow - prevent page from being wider than viewport */
    html,
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .navbar {
        overflow: visible;
        /* allow dropdown menu */
    }

    .container {
        padding: 0 1.25rem;
    }

    .mobile-toggle {
        display: block;
        flex-shrink: 0;
    }

    .nav-logo {
        height: 50px;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100vw;
        background-color: white;
        border-top: 1px solid var(--clr-border);
        box-shadow: var(--shadow-md);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
    }

    .nav-menu.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .nav-list {
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .nav-link.btn-primary {
        display: block;
        width: 100%;
        text-align: center;
    }

    /* Hero section mobile fixes */
    .hero {
        background-attachment: scroll;
        /* fixed causes issues on mobile browsers */
        align-items: flex-start;
        padding-top: 100px;
    }

    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .hero-content .tag {
        font-size: 0.75rem;
        padding: 0.3rem 0.75rem;
    }

    .hero p {
        font-size: 1rem;
    }

    /* Both hero paragraphs visible on mobile */
    .hero p:last-of-type {
        display: block;
        font-size: 0.9rem;
    }

    .section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Sectors - go single column on tablet */
    .why-grid {
        grid-template-columns: 1fr;
    }

    .why-card[style] {
        grid-column: auto !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-brand p {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 1.9rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* About badge - keep inside image bounds on mobile */
    .about-badge {
        bottom: 10px;
        left: 10px;
        padding: 0.75rem 1rem;
        min-width: 100px;
        max-width: 130px;
    }

    .about-badge .badge-number {
        font-size: 1.75rem;
    }

    .about-badge .badge-text {
        font-size: 0.7rem;
    }

    .about-image-wrapper {
        margin-bottom: 1rem;
        /* less gap since badge is now inside image */
    }

    /* Sectors single column */
    .why-grid {
        grid-template-columns: 1fr;
    }

    .why-card[style] {
        grid-column: auto !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .contact-form-wrapper {
        padding: 1.5rem;
    }
}