/* Fluqi Industrial System + Enhanced Animations */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-core: #050505;
    --bg-card: #0f0f0f;
    --bg-card-hover: #141414;
    --border: #222222;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --brand-red: #E63946;
    --glow-color: rgba(230, 57, 70, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-core);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Cinematic background layers */
.bg-spotlight {
    position: fixed;
    inset: 0;
    height: 100vh;
    background: radial-gradient(circle at 50% -20%, #1a1a1a 0%, transparent 55%);
    z-index: -3;
}

.bg-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.05;
    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");
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, black 30%, transparent 95%);
    -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 95%);
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

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

.label {
    color: var(--brand-red);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
    display: block;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border);
    background: rgba(5,5,5,0.8);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.brand img {
    height: 32px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: var(--brand-red);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

.mobile-menu {
    position: fixed;
    top: 73px;
    left: 0;
    right: 0;
    background: #050505;
    border-bottom: 1px solid var(--border);
    padding: 2rem;
    flex-direction: column;
    gap: 1.5rem;
    display: none;
    z-index: 99;
}

.mobile-menu a {
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid #222;
    padding-bottom: 1rem;
}

.mobile-menu.is-open {
    display: flex;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero */
.hero {
    padding: 8rem 0 5rem;
}

h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -2px;
    background: linear-gradient(to bottom right, #ffffff 20%, #888888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease-out forwards;
}

.hero-sub {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    font-weight: 300;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease-out 0.2s forwards;
}

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

.stat-bar {
    display: flex;
    gap: 4rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    opacity: 0;
    animation: fadeUp 0.8s ease-out 0.4s forwards;
}

.stat h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    font-weight: 700;
}

.stat p {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

/* App grid + cards */
.app-grid-section {
    padding: 4rem 0 6rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.card-wrapper {
    position: relative;
    background: var(--border);
    border-radius: 16px;
    padding: 1px;
    display: flex;
    overflow: hidden;
    transition: transform 0.4s ease;
}

.card {
    background: var(--bg-card);
    width: 100%;
    border-radius: 15px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 2;
    min-height: 320px;
}

.card-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.15), transparent 45%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s;
}

.grid:hover .card-wrapper::before {
    opacity: 1;
}

.card h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--text-main);
}

.card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
    display: inline-block;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-wrapper:hover .card-icon {
    transform: scale(1.2) rotate(-5deg);
}

.status-pill {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 0.75rem;
    padding: 6px 14px;
    border-radius: 100px;
    background: #0a0a0a;
    border: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.live {
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.2);
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.1);
}

.soon {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.2);
}

.arrow-btn {
    margin-top: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.arrow-btn span {
    transition: 0.3s;
}

.card-wrapper:hover .arrow-btn span {
    transform: translateX(6px);
    color: var(--brand-red);
}

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

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Team + footer */
.team-section {
    border-top: 1px solid var(--border);
    padding: 8rem 0;
    margin-top: 4rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 4rem;
    margin-top: 3rem;
}

.team-member h4 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.team-member .role {
    color: var(--brand-red);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.team-member p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
}

.footer-links a {
    margin-left: 2rem;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--text-main);
}

/* Tajer Electrical case studies */
.tajer-section {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 5rem 0;
}

.tajer-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.tajer-header h2 {
    font-size: 2.5rem;
    letter-spacing: -0.5px;
}

.tajer-intro {
    color: var(--text-muted);
    max-width: 720px;
    line-height: 1.7;
}

.tajer-carousel {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 2rem;
    padding: 2rem 3rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(20,20,20,0.95), rgba(10,10,10,0.95));
    overflow: hidden;
}

.tajer-track {
    position: relative;
    min-height: 320px;
}

.tajer-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tajer-slide.is-active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.tajer-client {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.tajer-slide h3 {
    font-size: 1.75rem;
    font-weight: 700;
}

.tajer-desc {
    color: var(--text-muted);
    line-height: 1.6;
}

.tajer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tajer-list li {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    color: var(--text-muted);
}

.tajer-list strong {
    color: var(--text-main);
}

.tajer-slide blockquote {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    border-left: 3px solid var(--brand-red);
    padding-left: 1rem;
    font-style: italic;
}

.tajer-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(5,5,5,0.6);
    color: var(--text-main);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.tajer-control:hover {
    background: var(--brand-red);
    transform: translateY(-50%) scale(1.05);
}

.tajer-control.prev {
    left: 1rem;
}

.tajer-control.next {
    right: 1rem;
}

.tajer-dots {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.tajer-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
    transition: background 0.2s;
}

.tajer-dots button.is-active {
    background: var(--brand-red);
}

/* Product page styles */
.product-header {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.back-link:hover {
    color: var(--brand-red);
}

.product-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.product-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.product-tagline {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 300;
    border-left: 3px solid var(--brand-red);
    padding-left: 1.5rem;
}

.cta-button {
    display: inline-block;
    background: var(--brand-red);
    color: #fff;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 6px;
    letter-spacing: 0.5px;
    transition: 0.2s;
}

.cta-button:hover {
    background: #ff4d5a;
    box-shadow: 0 0 20px rgba(230, 57, 70, 0.4);
}

.cta-button.disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.cta-button.disabled:hover {
    background: var(--border);
}

.features-section {
    padding: 6rem 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 8px;
    transition: 0.3s;
}

.feature-card:hover {
    border-color: var(--brand-red);
    transform: translateY(-5px);
}

/* Text/policy pages */
.text-page {
    padding: 4rem 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.text-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
}

.text-section h1,
.text-section h2 {
    font-size: 2rem;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
}

.text-section h1 {
    font-size: 2.5rem;
}

.text-section p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.text-section ul {
    margin-left: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.text-section li {
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 900px) {
    nav {
        padding: 1rem;
    }

    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    h1 {
        font-size: 3rem;
        letter-spacing: -1px;
    }

    .hero {
        padding: 6rem 0 3rem;
    }

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

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

    .card {
        min-height: 300px;
    }

    .stat-bar {
        flex-wrap: wrap;
        gap: 2rem;
        margin-top: 3rem;
    }

    .product-hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    footer {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-links a {
        margin: 0 1rem;
    }

    .tajer-carousel {
        padding: 2rem 1.5rem;
    }
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
    align-items: center;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    color: var(--text-main);
    border-color: var(--text-main);
}

.lang-btn.active {
    background: var(--text-main);
    color: var(--bg-core);
    border-color: var(--text-main);
}

/* RTL Support */
[dir="rtl"] .nav-links {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .lang-switcher {
    margin-left: 0;
    margin-right: 1rem;
}

[dir="rtl"] .arrow-btn span {
    transform: scaleX(-1);
    display: inline-block;
}

[dir="rtl"] .back-link {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 0.5rem;
}

/* Mobile Menu RTL */
[dir="rtl"] .mobile-menu {
    right: auto;
    left: 0;
    transform: translateX(-100%);
}

[dir="rtl"] .mobile-menu.is-open {
    transform: translateX(0);
}
