@import url('../fonts/google-fonts.css');

:root {
    /* Color Palette */
    --bg-primary: #0a0a0b;
    --bg-secondary: #121214;
    --accent: #fa3d03;
    --accent-hover: #ff5e00;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(12px);

    /* Spacing & Borders */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 32px;
    --section-spacing: 120px;

    /* Shadows */
    --shadow-premium: 0 20px 40px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.brand-font {
    font-family: 'Outfit', sans-serif;
    line-height: 1.1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Layout Components --- */

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

.section {
    padding: var(--section-spacing) 0;
}

/* --- Navigation --- */

.navbar {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 1100px;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 12px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    top: 12px;
    padding: 8px 32px;
    background: rgba(10, 10, 11, 0.8);
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

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

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

.btn-contact {
    background: var(--accent);
    color: white;
    padding: 10px 24px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-contact:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(250, 61, 3, 0.2);
}

.lang-switch {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.lang-switch span {
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.lang-switch span.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.lang-switch span:hover:not(.active) {
    color: var(--accent);
}

/* --- Hero Section --- */

.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--bg-primary);
    overflow: hidden;
}

/* Bottom fade to prevent color block seams */
.hero-bg::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to bottom, transparent, var(--bg-primary));
    z-index: 2;
}

/* Noise Texture for atmosphere */
.hero-noise {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.05;
    mix-blend-mode: overlay;
    z-index: 1;
    pointer-events: none;
}

.hero-bg .blob {
    position: absolute;
    width: 1200px;
    height: 1200px;
    background: radial-gradient(circle, rgba(250, 61, 3, 0.08) 0%, transparent 70%);
    filter: blur(120px);
    border-radius: 50%;
    z-index: 0;
    will-change: transform;
}

.blob-1 {
    top: -10%;
    left: -10%;
    background: radial-gradient(circle, rgba(250, 61, 3, 0.16) 0%, transparent 70%) !important;
    animation: moveBlob1 5s infinite alternate ease-in-out;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    background: radial-gradient(circle, rgba(250, 100, 3, 0.12) 0%, transparent 70%) !important;
    animation: moveBlob2 8s infinite alternate ease-in-out;
}

.blob-3 {
    top: 15%;
    left: 15%;
    width: 1000px !important;
    height: 1000px !important;
    background: radial-gradient(circle, rgba(255, 80, 0, 0.1) 0%, transparent 70%) !important;
    animation: moveBlob3 6s infinite alternate ease-in-out;
}

.blob-4 {
    top: 30%;
    right: 5%;
    width: 800px !important;
    height: 800px !important;
    background: radial-gradient(circle, rgba(30, 58, 138, 0.12) 0%, transparent 70%) !important;
    animation: moveBlob1 9s infinite alternate-reverse ease-in-out;
}

.blob-5 {
    bottom: 10%;
    left: 30%;
    width: 1100px !important;
    height: 1100px !important;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%) !important;
    animation: moveBlob3 8s infinite alternate ease-in-out;
}

.blob-6 {
    top: -5%;
    right: 20%;
    width: 950px !important;
    height: 950px !important;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.08) 0%, transparent 70%) !important;
    animation: moveBlob2 10s infinite alternate ease-in-out;
}

.blob-7 {
    top: 5%;
    left: -5%;
    width: 850px !important;
    height: 850px !important;
    background: radial-gradient(circle, rgba(250, 190, 3, 0.08) 0%, transparent 70%) !important;
    animation: moveBlob1 12s infinite alternate-reverse ease-in-out;
}

.hero-content {
    max-width: 900px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero-tagline {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--accent);
    margin-bottom: 24px;
    font-weight: 600;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    margin-bottom: 32px;
    letter-spacing: -2px;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* --- Glass Cards --- */

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 40px;
    transition: all 0.4s ease;
}

.glass-card:hover {
    border-color: rgba(250, 61, 3, 0.3);
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.05);
}

/* --- Grid Systems --- */

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

/* --- Sections --- */

.section-tag {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: block;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 64px;
}

/* --- About Section Enhancement --- */
#about {
    position: relative;
    overflow: hidden;
}

#about::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('../images/background/about-bg.png') no-repeat center;
    background-size: cover;
    filter: blur(6px) brightness(0.4);
    opacity: 0.3;
    z-index: -1;
    transform: scale(1.1);
    /* Prevent blurred edges */
}

/* --- Staff Grid Enhancement --- */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
}

.staff-item {
    aspect-ratio: 1/1;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
}

.staff-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0.2);
    transition: all 0.5s ease;
}

.staff-item:hover {
    transform: scale(1.05);
    z-index: 2;
    filter: grayscale(0);
}

/* Interleaved Border Colors */
.staff-1 { border-color: var(--accent); }
.staff-2 { border-color: #1e3a8a; }
.staff-3 { border-color: #8b5cf6; }
.staff-4 { border-color: #14b8a6; }
.staff-5 { border-color: #fabe03; }
.staff-6 { border-color: #6366f1; }

.staff-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    padding: 16px 12px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.staff-item:hover .staff-overlay {
    transform: translateY(0);
}

.staff-name {
    font-size: 0.8rem;
    font-weight: 600;
}

.carousel-container {
    padding: 24px 0;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.carousel-track {
    display: flex;
    gap: 32px;
    transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    /* Allow manual grab/scroll if needed, but we handle via JS */
}

.product-item {
    flex: 0 0 calc(33.333% - 22px);
    /* Show 3 items by default */
    min-width: 320px;
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 16/10;
    background: var(--bg-secondary);
}

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

@media (max-width: 640px) {
    .product-item {
        flex: 0 0 100%;
    }
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.product-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.product-item:hover .product-img {
    transform: scale(1.05);
}

.product-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.product-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--glass-border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--accent);
    width: 24px;
    border-radius: 4px;
}

/* --- Services --- */

.service-card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 24px;
    display: block;
}

.service-card h4 {
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* --- Contact Form --- */

.contact-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

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

.input-group label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 16px;
    color: white;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* --- Footer --- */

.footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--glass-border);
    margin-top: 80px;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 64px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.footer-info p {
    color: var(--text-secondary);
    max-width: 300px;
}

.footer-links h5 {
    font-size: 1rem;
    margin-bottom: 24px;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links ul li a:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 32px;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* --- Animations --- */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes moveBlob1 {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    33% {
        transform: translate(400px, 200px) rotate(120deg) scale(1.2);
    }

    66% {
        transform: translate(-200px, 400px) rotate(240deg) scale(0.8);
    }

    100% {
        transform: translate(0, 0) rotate(360deg) scale(1);
    }
}

@keyframes moveBlob2 {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1.1);
    }

    33% {
        transform: translate(-400px, -200px) rotate(-120deg) scale(1);
    }

    66% {
        transform: translate(200px, -400px) rotate(-240deg) scale(1.3);
    }

    100% {
        transform: translate(0, 0) rotate(-360deg) scale(1.1);
    }
}

@keyframes moveBlob3 {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    33% {
        transform: translate(300px, -300px) rotate(90deg) scale(1.2);
    }

    66% {
        transform: translate(-300px, 300px) rotate(270deg) scale(0.9);
    }

    100% {
        transform: translate(0, 0) rotate(360deg) scale(1);
    }
}

/* --- Mobile --- */

@media (max-width: 768px) {
    .navbar {
        padding: 12px 20px;
    }

    .nav-links {
        display: none;
    }

    .hero-title {
        font-size: 3.5rem;
    }

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

    .contact-split {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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