/* ============================================
   CONSTRUMIND - Landing Page Styles
   BIM Consulting · AEC Industry
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    /* Background & Base */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #e5e5ea;

    /* System Colors */
    --color-plumbing: #0082c8;
    --color-plumbing-dark: #005a8f;
    --color-plumbing-glow: rgba(0, 130, 200, 0.15);

    --color-fire: #e64a19;
    --color-fire-dark: #b33900;
    --color-fire-glow: rgba(230, 74, 25, 0.15);

    --color-hvac: #008c3a;
    --color-hvac-dark: #006028;
    --color-hvac-glow: rgba(0, 140, 58, 0.15);

    --color-arch: #5e35b1;
    --color-arch-dark: #4527a0;
    --color-arch-glow: rgba(94, 53, 177, 0.15);

    --color-structural: #f57f17;
    --color-structural-dark: #e65100;

    /* Text */
    --text-primary: #1d1d1f;
    --text-secondary: #515154;
    --text-muted: #86868b;

    /* UI */
    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-glow: rgba(0, 112, 201, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;
    --space-2xl: 64px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* --- Background Grid --- */
.bg-grid {
    position: fixed;
    inset: 0;
    /* Grid removed for pure white background */
    background-image: none;
    z-index: 0;
    animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* --- Particles Canvas --- */
#particles-canvas {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* --- Scan Line --- */
.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        rgba(96, 165, 250, 0.4),
        rgba(37, 99, 235, 0.4),
        transparent
    );
    z-index: 2;
    animation: scanDown 6s linear infinite;
    opacity: 0.6;
}

@keyframes scanDown {
    0% { top: -2px; }
    100% { top: 100vh; }
}

/* --- Security Badge --- */
.security-badge {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 8px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-hvac);
    z-index: 100;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.security-badge.visible {
    opacity: 1;
    transform: translateY(0);
}

.security-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-hvac);
    animation: secPulse 2s ease-in-out infinite;
}

@keyframes secPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--color-hvac); }
    50% { opacity: 0.4; box-shadow: 0 0 8px var(--color-hvac); }
}

/* --- Main Container --- */
.main-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: var(--space-xl) var(--space-lg);
}

/* --- Header / Logo --- */
.header {
    text-align: center;
    margin-bottom: 80px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}

.logo-icon {
    animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.logo-text {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.logo-subtitle {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* --- Video Section --- */
.video-section {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1000px;
    margin: var(--space-lg) auto var(--space-xl);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.bim-video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* --- Hero Section & Cards --- */
.hero-section {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto var(--space-xl);
    display: grid;
    grid-template-columns: 240px 1fr 240px;
    grid-template-rows: auto auto;
    gap: var(--space-lg);
    align-items: center;
}

.video-wrapper {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 100%;
    max-width: 900px;
    justify-self: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 10;
}

.bim-video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Corner Cards (Desktop Grid) */
.corner-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: var(--space-md);
    width: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    z-index: 20;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.corner-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.card-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--space-md);
    letter-spacing: 0.05em;
}

/* Positioning via Grid */
.card-tl { grid-column: 1; grid-row: 1; align-self: start; }
.card-bl { grid-column: 1; grid-row: 2; align-self: end; }
.card-tr { grid-column: 3; grid-row: 1; align-self: start; }
.card-br { grid-column: 3; grid-row: 2; align-self: end; }

/* Real-Time Data */
.rtd-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}
.rtd-icon {
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
}
.rtd-icon svg { width: 24px; height: 24px; }

/* Automation */
.auto-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.auto-icon {
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 12px;
    width: 100%;
    display: flex;
    justify-content: center;
    color: var(--text-secondary);
}
.auto-icon svg { width: 20px; height: 20px; }
.auto-arrow {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* AI Analytics */
.ai-brain-svg {
    width: 100%;
    height: 100px;
    display: flex;
    justify-content: center;
    color: var(--text-secondary);
}
.ai-brain-svg svg { width: 80px; height: 80px; }

/* Facility Management */
.fm-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.fm-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.fm-stat-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.fm-stat-row svg { width: 14px; height: 14px; color: var(--text-secondary); }
.fm-bar {
    height: 4px;
    background: var(--border-subtle);
    border-radius: 2px;
    flex: 1;
    position: relative;
}
.fm-bar::after {
    content: '';
    position: absolute;
    left: 0; top: 0; height: 100%;
    background: var(--text-secondary);
    border-radius: 2px;
    width: 60%;
}
.fm-stat-row:nth-child(2) .fm-bar::after { width: 80%; }
.fm-stat-row:nth-child(3) .fm-bar::after { width: 45%; }

/* Bottom Flow */
.bottom-flow {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    width: 100%;
}
.flow-icon {
    width: 48px;
    height: 48px;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--text-secondary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.flow-icon svg { width: 20px; height: 20px; }
.flow-line {
    height: 2px;
    width: 40px;
    background: repeating-linear-gradient(90deg, var(--text-muted) 0, var(--text-muted) 4px, transparent 4px, transparent 8px);
    opacity: 0.5;
}

/* --- Responsive --- */
@media (max-width: 1100px) {
    .hero-section {
        grid-template-columns: 200px 1fr 200px;
        gap: var(--space-md);
    }
    .corner-card { padding: var(--space-sm); }
}

@media (max-width: 860px) {
    /* Stack layout for tablets/mobile */
    .hero-section {
        display: flex;
        flex-direction: column;
        gap: var(--space-lg);
        align-items: center;
    }
    .video-wrapper {
        order: 1; /* Video on top */
        margin-bottom: var(--space-md);
    }
    .corner-card {
        display: none;
    }
    .bottom-flow {
        order: 3;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .logo-text { font-size: 1.8rem; }
    .tagline-text { font-size: 1.4rem; }
    .flow-line { width: 20px; }
}
/* --- Footer --- */
.footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
}

.footer-line {
    width: 40px;
    height: 1px;
    margin: 0 auto var(--space-md);
    background: linear-gradient(90deg, transparent, var(--text-muted), transparent);
}

.powered-by {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.12em;
    margin-bottom: var(--space-sm);
}

.jlt-brand {
    font-weight: 700;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.2em;
}

.footer-copy {
    font-size: 0.65rem;
    color: var(--text-muted);
    opacity: 0.5;
}

/* --- Tagline --- */
.tagline-container {
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tagline-line {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3b82f6, transparent);
    margin: var(--space-md) auto;
}

.tagline-text {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
}

.tagline-word {
    display: inline-block;
}

.tagline-word.accent {
    color: #3b82f6; /* color-brand equivalent */
}

.tagline-sub {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.construction-banner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    padding: var(--space-sm) var(--space-md);
    background-color: #f5f5f7; /* Gris tenue / apple style */
    border-radius: 8px;
    color: var(--text-secondary);
}

.spinner-svg {
    animation: spin 1s steps(8) infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.construction-title {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-primary);
}
