@import url('unified-theme.css');
/* ── Global reset ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100%; }
img, table, pre, iframe { max-width: 100%; }

/* ========================================
   LAYOUT COMPONENTS
   ======================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ========================================
   HEADER
   ======================================== */
/* header element base styles are now handled by .site-header
   scoped CSS inside views/partials/header.ejs — kept neutral here. */
header {
    display: block;
}

/* ── OLD HEADER STYLES (v57.4 and below) ────────────────────────────────
   Replaced in v57.5 by scoped .site-header CSS in views/partials/header.ejs.
   Kept as comment to preserve history; safely delete in a future cleanup.

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* 66px — exact match to logo-275x66.png display height, pixel-perfect full-bleed * /
    height: 66px;
}

/* ── Responsive header heights (matches ~4.17:1 logo at all breakpoints) ────── * /
@media (max-width: 1024px) {
    .header-content { height: 58px; }
}

@media (max-width: 768px) {
    .header-content {
        height: 53px;
        padding: 0 1.5rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        height: 48px;
        padding: 0 1rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   LOGO — logo-275x66.png  275×66 px display  (~4.17:1 ratio)
   File is 1650×396 (6× super-resolution) — 1:1 on 6× retina, Lanczos-sharp on all screens.
   Background: rgb(6,9,25) = #060919, pixel-perfect blend with --darker-bg.
   SVG app icon + IBIS wordmark + subtitle. BG locked, seamless header blend.
   ═══════════════════════════════════════════════════════════════════════ * /

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    /* Logo BG == header BG — full bleed, zero seam * /
    transition: transform var(--transition-fast), filter var(--transition-fast);
    height: 100%;
}

.logo-img {
    /* Display at logical 275×66 — file is 6× super-res (1650×396) for crisp rendering * /
    width: 275px;
    height: 66px;
    display: block;
    /* Let browser use its best-quality downscale from 6× source * /
    image-rendering: auto;
    object-fit: fill;
}

/* Hover — subtle lift + cyan glow * /
.logo:hover {
    transform: translateY(-1px);
}

.logo:hover .logo-img {
    filter: drop-shadow(0 3px 18px rgba(0, 217, 255, 0.35));
}

/* ── Responsive — ~4.17:1 ratio locked ──────────────────────────────────── * /
@media (max-width: 1024px) {
    .logo-img {
        width: 242px;   /* 242 × 58 ≈ 4.17:1 * /
        height: 58px;
    }
}

@media (max-width: 768px) {
    .logo-img {
        width: 220px;   /* 220 × 53 ≈ 4.17:1 * /
        height: 53px;
    }
}

@media (max-width: 480px) {
    .logo-img {
        width: 200px;   /* 200 × 48 ≈ 4.17:1 * /
        height: 48px;
    }
}
/* ═══════════════════════════════════════════════════════════════════════
   MOBILE MENU - Hamburger Navigation
   ═══════════════════════════════════════════════════════════════════════ * /

/* Hamburger Menu Button (Hidden on Desktop) * /
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger-line {
    width: 28px;
    height: 3px;
    background: var(--primary-cyan);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Mobile Menu Active State * /
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Navigation Styles * /
.main-nav ul {
    display: flex;
    gap: 1.75rem;
    list-style: none;
    align-items: center;
}

.main-nav a,
nav a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: color var(--transition-fast);
}

.main-nav a:hover,
nav a:hover {
    color: var(--primary-cyan);
}

.admin-link {
    color: var(--primary-cyan) !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE NAVIGATION - Mobile & Tablet
   ═══════════════════════════════════════════════════════════════════════ * /

/* Tablet & Mobile (1024px and below) * /
@media (max-width: 1024px) {
    /* Show hamburger menu * /
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hide navigation by default on mobile/tablet * /
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--darker-bg);
        border-left: 1px solid var(--border-color);
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    }
    
    /* Show navigation when menu is active * /
    .main-nav.active {
        right: 0;
    }
    
    /* Stack navigation vertically * /
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        padding: 80px 0 2rem 0;
    }
    
    .main-nav li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 217, 255, 0.1);
    }
    
    .main-nav a {
        display: block;
        padding: 1rem 2rem;
        font-size: 1.1rem;
        border-left: 3px solid transparent;
        transition: all 0.3s ease;
    }
    
    .main-nav a:hover {
        background: var(--overlay-medium);
        border-left-color: var(--primary-cyan);
    }
    
    .admin-link {
        background: var(--overlay-strong);
    }
    
    /* Overlay when menu is open * /
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 999;
        backdrop-filter: blur(3px);
    }
    
    body.menu-open {
        overflow: hidden;
    }
    
    /* Adjust header padding for mobile * /
    .header-content {
        padding: 0 1.5rem;
    }
}

/* Mobile Only (768px and below) * /
@media (max-width: 768px) {
    .main-nav {
        width: 100%;
        right: -100%;
    }
    
    .main-nav a {
        padding: 1.2rem 1.5rem;
        font-size: 1rem;
    }
    
    .header-content {
        padding: 0 1rem;
    }
}


── END OLD HEADER STYLES ─────────────────────────────────────────────── */

/* ========================================
   HERO SECTIONS
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--darker-bg) 0%, var(--card-bg) 100%);
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(var(--primary-cyan-rgb), 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(var(--primary-cyan-rgb), 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: var(--text-white);
}

.hero-text h1 span {
    color: var(--primary-cyan);
}

.hero-text p {
    font-size: 1.3rem;
    color: var(--text-gray);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

/* Hero Visual - AI Network */
.hero-visual {
    position: relative;
    height: 500px;
    background: linear-gradient(135deg, var(--overlay-light) 0%, rgba(var(--primary-cyan-rgb), 0.02) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.network-node {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--primary-cyan);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--primary-cyan);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
}

.network-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-cyan), transparent);
    opacity: 0.3;
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.6; }
}

/* ========================================
   STATS SECTION
   ======================================== */
.stats {
    padding: 5rem 2rem;
    background: var(--darker-bg);
}

.stats-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--overlay-medium), transparent);
    transition: left var(--transition-slow);
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 3rem;
    color: var(--primary-cyan);
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-cyan);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-gray);
    font-weight: 500;
}

/* ========================================
   SERVICES SECTION
   ======================================== */
.services {
    padding: 7rem 2rem;
    background: var(--dark-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-label {
    color: var(--primary-cyan);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.service-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-cyan) 0%, transparent 100%);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow-lg);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--overlay-medium);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.service-icon i {
    font-size: 2.5rem;
    color: var(--primary-cyan);
}

.service-card h3 {
    font-size: 1.7rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-white);
}

.service-card p {
    color: var(--text-gray);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: var(--darker-bg);
    /* border-top and padding are handled by .site-footer / .footer-main in footer.ejs */
}

footer p {
    color: var(--text-gray);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1400px) {
    nav ul {
        gap: 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 1200px) {
    .header-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
}
