/* 
 * ==================================================
 * HARMONIC BALANCE - STYLESHEET
 * Industrial-Modern Aesthetic / Dark Mode Focus
 * ================================================== 
 */

/* --- 1. CSS VARIABLES & TOKENS --- */
:root {
    /* Color Palette (Light Industrial / Navy Focus) */
    --bg-dark: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f1f5f9;
    --border-color: #e2e8f0;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    /* Harmonic Balance Navy Blue */
    --accent-blue: #1c4464; 
    --accent-cyan: #2a638f;
    --accent-glow: rgba(28, 68, 100, 0.15);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Transitions & UI */
    --t-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --t-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --border-radius: 12px;
    --shadow-subtle: 0 4px 24px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 32px var(--accent-glow);
}

/* --- 2. RESET & BASE --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--t-fast);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    font-weight: 700;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; letter-spacing: 0; }
h4 { font-size: 1.25rem; font-weight: 600; }

.text-center { text-align: center; }

/* Utilities */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}
@media (min-width: 768px) {
    .container { padding: 0 var(--spacing-md); }
}

.section-padding {
    padding: var(--spacing-lg) 0;
}
@media (min-width: 768px) {
    .section-padding { padding: var(--spacing-xl) 0; }
}

/* Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

/* Buttons & Links */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--t-fast);
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    color: #fff;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--border-color);
}
.btn-secondary:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background-color: rgba(6, 182, 212, 0.05);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}
.btn-outline:hover {
    border-color: var(--text-primary);
}

.w-full { width: 100%; }

.link-action {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    color: var(--accent-cyan);
}
.link-action .arrow {
    margin-left: 0.25rem;
    transition: transform var(--t-fast);
}
.link-action:hover .arrow {
    transform: translateX(4px);
}

/* --- 3. HEADER & NAVIGATION --- */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background-color var(--t-fast);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.header-logo-img {
    height: 40px;
    width: auto;
}

.main-nav {
    display: none;
    align-items: center;
    gap: 2rem;
}
.main-nav a:not(.btn) {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.main-nav a:not(.btn):hover {
    color: var(--accent-blue);
}
@media (min-width: 1024px) {
    .main-nav { display: flex !important; }
    .mobile-menu-btn { display: none !important; }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    background: transparent;
    border: none;
    width: 32px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}
.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: all var(--t-fast);
}

/* --- 4. HERO SECTION --- */
.hero-section {
    position: relative;
    padding-top: calc(80px + var(--spacing-xl));
    padding-bottom: var(--spacing-xl);
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-headline {
    margin-bottom: var(--spacing-sm);
    color: var(--accent-blue);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subheadline {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto var(--spacing-md);
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Ambient glow effects behind hero */
.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
}
.glow-1 {
    top: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: rgba(6, 182, 212, 0.15);
}
.glow-2 {
    bottom: -10%;
    left: -5%;
    width: 600px;
    height: 600px;
    background: rgba(59, 130, 246, 0.1);
}

/* --- 5. BUSINESS UNITS SECTION --- */
.section-header {
    margin-bottom: var(--spacing-lg);
}
.section-title {
    color: var(--accent-blue);
    margin-bottom: 0.5rem;
}
.section-desc {
    color: var(--accent-cyan);
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.875rem;
    font-weight: 600;
}

.units-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}
@media (min-width: 768px) {
    .units-grid { grid-template-columns: repeat(2, 1fr); gap: var(--spacing-md); }
}

.unit-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    transition: transform var(--t-smooth), box-shadow var(--t-smooth), border-color var(--t-fast);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.unit-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    opacity: 0;
    transition: opacity var(--t-fast);
}

.unit-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(6, 182, 212, 0.3);
}
.unit-card:hover::before {
    opacity: 1;
}

.unit-icon-wrapper {
    width: 64px;
    height: 64px;
    background: rgba(28, 68, 100, 0.05);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
    border: 1px solid rgba(28, 68, 100, 0.1);
}

.unit-logo-wrapper {
    margin-bottom: var(--spacing-sm);
}

.unit-logo-img {
    height: 36px;
    width: auto;
    max-width: 100%;
}

/* Simple CSS geometric shapes as placeholders for icons */
.placeholder-icon {
    display: block;
    width: 32px;
    height: 32px;
    background-color: var(--accent-cyan);
}
/* PartsRepo */
.placeholder-icon[data-icon="globe-nodes"] {
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--accent-cyan);
    position: relative;
}
/* Marketing */
.placeholder-icon[data-icon="signal-curve"] {
    background: linear-gradient(to top right, transparent 50%, var(--accent-cyan) 50%);
    border-radius: 4px;
}
/* Events */
.placeholder-icon[data-icon="hex-spotlight"] {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--accent-cyan);
}
/* Research */
.placeholder-icon[data-icon="data-compass"] {
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--accent-blue) 0%, transparent 50%);
}

.unit-title {
    margin-bottom: var(--spacing-xs);
    font-size: 1.75rem;
}
.unit-mission {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}
.unit-mission strong {
    color: var(--text-primary);
}

.unit-details {
    margin-bottom: 1.5rem;
}
.unit-details p {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}
.unit-details strong {
    color: var(--text-primary);
}

/* PartsRepo Sub-brands specific */
.sub-brands-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}
@media (min-width: 640px) {
    .sub-brands-grid { grid-template-columns: 1fr 1fr; }
}

.sub-brand {
    background: rgba(28, 68, 100, 0.05);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.sub-brand-logo {
    height: 48px;
    width: auto;
    max-width: 100%;
    margin-bottom: 0.5rem;
}
.sub-brand-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.unit-cta {
    margin-top: auto;
}

/* Overriding grid to make PartsRepo visually prominent */
@media (min-width: 1024px) {
    .unit-card:first-child {
        grid-column: 1 / -1; /* spans full width */
        flex-direction: row;
        gap: var(--spacing-md);
    }
    .unit-card:first-child .unit-content {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    .unit-card:first-child .sub-brands-grid {
        margin-top: auto;
    }
    .unit-card:first-child .unit-cta {
        margin-top: 1.5rem;
        max-width: 300px;
    }
}

/* --- 6. FOOTER --- */
.site-footer {
    background: var(--bg-surface-hover);
    border-top: 1px solid var(--border-color);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}
@media (min-width: 768px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-logo {
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}
.footer-slogan {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.footer-heading {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--accent-blue);
}
.footer-address {
    font-style: normal;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
}
.footer-bottom {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.8rem;
}
