/* 
   BeitBit - The Operating System for Modern Real Estate
   Premium Design System 
*/

@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&family=Cairo:wght@400;600;700;900&display=swap');
@import url('platform-visual.css');
@import url('hub-visual.css');
@import url('sections.css');
@import url('solutions.css');
@import url('footer.css');

/* --- 1. Variables & Theme --- */
:root {
    /* Brand Colors */
    --primary: #27AAE1;
    /* BeitBit Blue */
    --primary-dark: #1A8AB5;
    --secondary: #0F172A;
    /* Deep Navy/Black */
    --accent: #38BDF8;
    /* Cyan Accent */

    /* Neutral - Light Mode */
    --bg-page: #FFFFFF;
    --bg-surface: #F8FAFC;
    /* Slate 50 */
    --border-light: #E2E8F0;
    /* Slate 200 */

    --text-main: #0F172A;
    /* Slate 900 */
    --text-muted: #64748B;
    /* Slate 500 */

    /* Island / Inset Design Variables */
    --island-bg: #F8FAFC;
    --island-border: rgba(148, 163, 184, 0.4);
    /* Stronger border */
    --island-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);

    /* Glass Effect - More transparent for visible glass effect */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);

    /* Spacing */
    --container-width: 1280px;
    --header-height: 100px;
    --container-padding: 32px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --section-gap: 120px;
}

[data-theme="dark"] {
    /* Neutral - Dark Mode */
    --bg-page: #020617;
    /* Slate 950 */
    --bg-surface: #0F172A;
    /* Slate 900 */
    --border-light: #1E293B;
    /* Slate 800 */

    --text-main: #F8FAFC;
    /* Slate 50 */
    --text-muted: #94A3B8;
    /* Slate 400 */

    /* Island / Inset Design Variables - Dark */
    --island-bg: #0F172A;
    --island-border: rgba(255, 255, 255, 0.1);
    --island-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);

    /* Glass Effect - Dark */
    --glass-bg: rgba(2, 6, 23, 0.8);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* --- 2. Reset & Typography --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Instrument Sans', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

#bg-dots {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

[dir="rtl"] body {
    font-family: 'Cairo', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

ul {
    list-style: none;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

/* --- 3. Utilities --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

@media (max-width: 600px) {
    :root {
        --container-padding: 20px;
    }

    .container {
        padding: 0 var(--container-padding);
    }
}

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

/* Inset Island Container Utility */
/* Used for Contact, Solutions, Why Us to distinguish them */
.bg-surface {
    position: relative;
    max-width: 1360px;
    /* Wider than container but smaller than full width */
    margin: 40px auto;
    border-radius: 40px;
    background: var(--island-bg);
    border: 1px solid var(--island-border);
    box-shadow: var(--island-shadow);
    overflow: hidden;
    padding: 80px 0;
    /* Internal padding */
}

/* Override default section padding if it has bg-surface class */
.section.bg-surface {
    padding: 80px 0;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hidden {
    display: none !important;
}

/* --- 4. Components --- */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 10px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(39, 170, 225, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(39, 170, 225, 0.4);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--border-light);
    transform: translateY(-2px);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-main);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- 5. Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    height: 40px;
}

.nav-logo img {
    height: 100%;
    width: auto;
}

/* Logo Switching */
.logo-light {
    display: block;
}

.logo-dark {
    display: none;
}

[data-theme="dark"] .logo-light {
    display: none;
}

[data-theme="dark"] .logo-dark {
    display: block;
}

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

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding: 8px 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-light);
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--bg-surface);
    color: var(--primary);
    border-color: var(--border-light);
}

.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    color: var(--text-main);
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    transition: all 0.2s;
}

.mobile-menu-btn:active {
    background: var(--bg-surface);
    transform: scale(0.95);
}

/* --- Responsive Nav --- */
@media (max-width: 991px) {
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: 0;
        background: var(--bg-page);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 24px;
        overflow: hidden;
        transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        border-bottom: 0 solid var(--border-light);
    }

    .navbar.mobile-active .nav-links {
        height: calc(100vh - var(--header-height));
        padding-bottom: 80px;
        border-bottom-width: 1px;
    }

    .nav-link {
        font-size: 1.5rem;
        padding: 10px 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .bg-surface {
        margin: 20px 0;
        border-radius: 0;
        padding: 60px 0;
    }
}

@media (max-width: 600px) {
    .nav-actions {
        gap: 12px;
    }

    .icon-btn {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }

    .mobile-menu-btn {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
}

/* --- 6. Hero Section Layout --- */
.hero {
    position: relative;
    padding-top: var(--header-height);
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-bottom: 80px;
}

.hero-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.hero-text {
    z-index: 2;
    text-align: center;
    order: 2;
}

.hero-visual {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    order: 1;
    width: 100%;
    margin-top: 40px;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-desc {
    font-size: clamp(1rem, 3vw, 1.25rem);
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0 auto 40px;
    max-width: 700px;
}

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

@media (max-width: 600px) {
    .hero {
        padding-top: calc(var(--header-height) + 20px);
    }

    .hero-grid {
        gap: 40px;
    }

    .hero-visual {
        transform: scale(0.85);
        margin-top: 20px;
    }
}

.hero-visual {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

/* Hero Background Blob/Glow */
.hero-bg {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(39, 170, 225, 0.08) 0%, rgba(39, 170, 225, 0) 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

/* Responsive Hero */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-grid {
        gap: 40px;
        padding: 40px var(--container-padding);
    }

    .hero-desc {
        margin: 0 auto 32px;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
        line-height: 1.2;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }
}