/* 
   Bit Maker Automation - Notion-Inspired Design System
   Following guidelines from DESIGN.md
*/

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

:root {
    /* Colors - Notion Warm Neutrals */
    --bg-white: #ffffff;
    --bg-warm: #f6f5f4;
    --text-primary: rgba(0, 0, 0, 0.95);
    --text-secondary: #615d59;
    --text-muted: #a39e98;
    --accent-blue: #0075de;
    --accent-blue-dark: #005bab;
    --accent-red: #d90429;
    /* Bit Maker Brand Color kept as primary semantic accent */

    /* Borders & Shadows */
    --border-whisper: 1px solid #e1e1e1;
    /* Solid color for better reliability */
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-deep: rgba(0, 0, 0, 0.01) 0px 1px 3px, rgba(0, 0, 0, 0.02) 0px 3px 7px, rgba(0, 0, 0, 0.02) 0px 7px 15px, rgba(0, 0, 0, 0.04) 0px 14px 28px, rgba(0, 0, 0, 0.05) 0px 23px 52px;

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-pill: 9999px;

    /* Spacing */
    --space-unit: 8px;
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background-color: var(--bg-white);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

body {
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s ease;
}

/* Typography Overhaul */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    font-feature-settings: "lnum", "locl";
}

.display-hero {
    font-size: 64px;
    font-weight: 850;
    line-height: 1.25;
    letter-spacing: -2.5px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.display-hero span,
.hero-desc span {
    background: rgba(255, 255, 255, 0.6);
    padding: 6px 15px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    border-radius: var(--radius-sm);
    box-shadow: 4px 0 0 rgba(255, 255, 255, 0.4), -4px 0 0 rgba(255, 255, 255, 0.4);
    /* Extends the highlight slightly past the text */
}

.section-title {
    font-size: 48px;
    line-height: 1.0;
    letter-spacing: -1.5px;
    margin-bottom: 32px;
}

.card-title {
    font-size: 22px;
    line-height: 1.27;
    letter-spacing: -0.25px;
    margin-bottom: 12px;
}

p {
    font-size: 16px;
    color: var(--text-secondary);
}

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

/* Sections */
section {
    padding: 100px 0;
}

.bg-warm {
    background-color: var(--bg-warm);
}

/* Navigation */
.navbar {
    height: 72px;
    display: flex;
    align-items: center;
    background: var(--bg-white);
    border-bottom: var(--border-whisper);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.logo-img {
    height: 32px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-links a:hover {
    color: var(--accent-blue);
}

.nav-links a.btn-primary {
    color: white;
}

.nav-links a.btn-primary:hover {
    color: white;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
    border: 1px solid transparent;
}

.btn-primary:hover {
    background: var(--accent-blue-dark);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    border: 1px solid transparent;
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
}

.btn-pill {
    background: #f2f9ff;
    color: #097fe8;
    border-radius: var(--radius-pill);
    padding: 4px 12px;
    font-size: 12px;
}

/* Hero Section */
#home {
    padding: 120px 0;
    text-align: center;
    position: relative;
    background-color: var(--bg-white);
    overflow: hidden;
}

/* Background Image with Overlay */
#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background-image: url('https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?auto=format&fit=crop&q=80&w=1600'); */
    background-image: url('/assets/img/bglanding.webp');
    background-size: cover;
    background-position: bottom;
    opacity: 0.4;
    /* Very subtle as requested */
    z-index: 0;
}

.hero {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.hero-desc {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(240px, auto);
    gap: 24px;
}

.bento-card {
    background: var(--bg-white);
    border: var(--border-whisper);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bento-card:hover {
    box-shadow: var(--shadow-deep);
    transform: translateY(-2px);
}

.span-2-col {
    grid-column: span 2;
}

.span-3-col {
    grid-column: span 3;
}

.span-2-row {
    grid-row: span 2;
}

.service-icon {
    font-size: 32px;
    margin-bottom: 24px;
    color: var(--accent-blue);
}

/* Services Grid - Card with Background Image */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    position: relative;
    border-radius: var(--radius-lg);
    background: var(--bg-white);
    border: var(--border-whisper);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    box-shadow: var(--shadow-card);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-deep);
}

.service-card-bg {
    height: 200px;
    width: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
    flex-shrink: 0;
}

.service-card:hover .service-card-bg {
    transform: scale(1.08);
}

.service-card-overlay {
    display: none;
}

.service-card-content {
    position: relative;
    z-index: 1;
    padding: 24px;
    color: var(--text-primary);
    flex-grow: 1;
    background: var(--bg-white);
}

.service-card-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.service-card-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.service-card-icon {
    font-size: 22px;
    color: var(--bg-white);
    margin-top: -48px;
    margin-bottom: 16px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-blue);
    border-radius: var(--radius-md);
    border: 2px solid var(--bg-white);
    box-shadow: var(--shadow-card);
}

/* Portfolio Cards */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.project-card {
    background: var(--bg-white);
    border: var(--border-whisper);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.project-img {
    height: 300px;
    background-size: cover;
    background-position: center;
    border-bottom: var(--border-whisper);
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

/* Products Section */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex !important;
    /* override injected inline block */
    flex-direction: column;
    height: 100%;
}

.product-content {
    flex-grow: 1;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-deep);
}

.product-card:hover .product-img {
    transform: scale(1.1) !important;
}

/* Featured Products Carousel */
.product-scroll {
    display: flex;
    gap: 32px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--text-muted) transparent;
    -webkit-overflow-scrolling: touch;
}

.product-scroll::-webkit-scrollbar {
    height: 6px;
}

.product-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.product-scroll::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 99px;
}

.product-scroll .product-scroll-item {
    flex: 0 0 calc((100% - 64px) / 3);
    scroll-snap-align: start;
}

.product-scroll.product-scroll-static {
    overflow-x: visible;
}

.product-scroll-nav {
    display: flex;
    gap: 12px;
}

.product-scroll-btn {
    width: 48px;
    height: 48px;
    border: 1px solid var(--border-whisper);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-card);
}

.product-scroll-btn:hover {
    background: var(--text-primary);
    color: #fff;
    border-color: var(--text-primary);
}

@media (max-width: 768px) {
    .product-scroll .product-scroll-item {
        flex: 0 0 calc(100% - 16px);
    }
}

/* Clients Section (Logo Ticker) */
.project-content {
    padding: 32px;
}

/* Contact Form & Map */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: stretch;
}

/* Contact Right Column */
.contact-right-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

.map-wrapper {
    flex: 1;
    min-height: 280px;
    border: var(--border-whisper);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    /* Increased contrast */
    background: #fff;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-family: inherit;
    transition: 0.2s ease;
}

.form-control:hover {
    border-color: rgba(0, 0, 0, 0.3);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(0, 117, 222, 0.1);
}



/* Building Photos Grid */
.building-photos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.building-photo-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 130px;
    box-shadow: var(--shadow-card);
    border: var(--border-whisper);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.building-photo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-deep);
}

.building-photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.building-photo-card:hover img {
    transform: scale(1.07);
}

.building-photo-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 100%);
    padding: 20px 12px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.building-photo-label i {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}


/* Footer */
footer {
    padding: 80px 0 40px;
    border-top: var(--border-whisper);
    background: var(--bg-white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

/* Animations */
.reveal {
    opacity: 1;
    /* Visible by default for reliability */
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Adjustments */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #about .container {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 24px;
    }

    .display-hero {
        font-size: 40px;
        letter-spacing: -1.2px;
    }

    .section-title {
        font-size: 32px;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .product-scroll .product-scroll-item {
        flex: 0 0 calc(100% - 16px);
    }

    .span-2-col,
    .span-3-col {
        grid-column: span 1;
    }

    .nav-links {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-grid .logo {
        display: inline-block;
    }

    .building-photos-grid {
        grid-template-columns: 1fr;
    }

    .building-photo-card {
        height: 160px;
    }
}

/* Logo Ticker */
.logo-ticker {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.logo-ticker-inner {
    display: flex;
    white-space: nowrap;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.client-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
    height: 40px;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Floating WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;

    /* Visible across all scroll positions */
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.whatsapp-float.shift-up {
    bottom: 110px;
}

.whatsapp-float.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.whatsapp-float:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    color: white;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 28px;
    }

    .whatsapp-float.shift-up {
        bottom: 80px;
    }
}

/* Back to Top Float */
.back-to-top-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: var(--text-secondary);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;

    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(20px) scale(0.8);
}

.back-to-top-float.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.back-to-top-float:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    color: white;
    background-color: var(--text-primary);
}

@media (max-width: 768px) {
    .back-to-top-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}