/* ============================================
   OPTIMIZED CSS - JITTER-FREE VERSION
   ============================================ */

/* CSS Variables */
:root {
    --color-bg-primary: #ffffff; 
    --color-bg-secondary: #F9F9F7; 
    --color-bg-dark: #1E293B; 
    --color-bg-darker: #0F172A; 
    --color-text-primary: #0F172A; 
    --color-text-secondary: #475569; 
    --color-text-light: #F9F9F7; 
    --color-accent: #1E3A8A; 
    --border-radius: 4px;
    --transition: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html, body { 
    overflow-x: hidden; 
    width: 100%; 
    scroll-behavior: smooth; 
}

body { 
    font-family: 'Inter', sans-serif; 
    color: var(--color-text-primary); 
    background: var(--color-bg-primary); 
    line-height: 1.6; 
    padding-top: 70px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; } 

/* ============================================
   SCROLL PROGRESS BAR - OPTIMIZED
   ============================================ */

.scroll-progress { 
    position: fixed; 
    top: 0; 
    left: 0; 
    height: 3px; 
    background: var(--color-accent); 
    z-index: 1001; 
    width: 100%;
    transform-origin: left;
    transform: scaleX(0);
    will-change: transform;
    backface-visibility: hidden;
}

h1, h2, h3, h4 { font-family: 'Cinzel', serif; font-weight: 600; color: var(--color-bg-darker); }
h2 { font-size: 2.5rem; margin-bottom: 2rem; position: relative; display: inline-block; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
p { margin-bottom: 1rem; font-weight: 300; color: var(--color-text-secondary); }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; color: var(--color-text-secondary); }
blockquote { font-style: italic; border-left: 3px solid var(--color-accent); padding-left: 1.5rem; margin: 1.5rem 0; color: var(--color-text-secondary); font-size: 1.1rem; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section-padding { padding: 6rem 0; position: relative; overflow: hidden; }
.bg-light { background: var(--color-bg-secondary); border-top: 1px solid #F1F5F9; border-bottom: 1px solid #F1F5F9; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; position: relative; z-index: 2;}

/* Navigation */
nav { 
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    background: rgba(255, 255, 255, 0.98); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000; 
    padding: 1.25rem 0; 
    border-bottom: 1px solid #E2E8F0; 
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.02); 
    transition: var(--transition);
    will-change: padding, box-shadow;
    transform: translateZ(0);
    backface-visibility: hidden;
}

nav.nav-scrolled { padding: 0.5rem 0; box-shadow: 0 5px 20px rgba(15, 23, 42, 0.08); }
.nav-container { display: flex; justify-content: space-between; align-items: center; position: relative; }
.brand-logo { max-height: 45px; display: block; transition: var(--transition); z-index: 1001; position: relative; will-change: max-height;}
nav.nav-scrolled .brand-logo { max-height: 35px; } 

.nav-links { display: flex; gap: 2rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; align-items: center; font-weight: 500; }
.nav-links a:hover { color: var(--color-accent); }
.btn-login { border: 1px solid var(--color-accent); padding: 0.5rem 1.25rem; border-radius: 40px; color: #fff; background: var(--color-accent); will-change: background, color; transform: translateZ(0);}
.btn-login:hover { background: transparent; color: var(--color-accent); }

.menu-toggle { display: none; flex-direction: column; cursor: pointer; gap: 5px; z-index: 1001; }
.bar { width: 25px; height: 3px; background-color: var(--color-bg-darker); transition: all 0.3s ease; will-change: transform, opacity; transform: translateZ(0);}

/* Hero Section - OPTIMIZED */
#home { 
    min-height: calc(100vh - 80px); 
    background: linear-gradient(135deg, var(--color-bg-darker), var(--color-bg-dark)); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    color: #fff; 
    position: relative; 
    padding: 4rem 2rem;
    overflow: hidden;
}

#home::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(30, 58, 138, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(30, 58, 138, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(30, 58, 138, 0.06) 0%, transparent 50%);
    opacity: 0.6;
    animation: backgroundPulse 15s ease-in-out infinite;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

@keyframes backgroundPulse {
    0%, 100% { transform: translate(0, 0) scale(1) translateZ(0); }
    50% { transform: translate(-5%, -5%) scale(1.05) translateZ(0); }
}

.hero-content { position: relative; z-index: 2; width: 100%; transform: translateZ(0);}
.hero-content h1 { font-size: 4.5rem; margin-bottom: 1rem; color: #ffffff; letter-spacing: 2px; text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);}
.hero-content .tagline { font-size: 1.5rem; margin-bottom: 2rem; font-weight: 300; color: var(--color-bg-secondary); }
.hero-content .disclaimer { font-size: 0.85rem; color: rgba(255,255,255,0.6); letter-spacing: 1px; text-transform: uppercase; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 2rem; max-width: 600px; margin: 0 auto; }
.hero-content .disclaimer.delay-3 { font-size: 1.15rem; color: #ffffff; border-top: none; padding-top: 1rem; margin-bottom: 1rem;}

.scroll-indicator { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.6); cursor: pointer; animation: bounce 2s infinite ease-in-out; will-change: transform;}
.scroll-indicator svg { width: 35px; height: 35px; fill: currentColor; }
@keyframes bounce { 
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%) translateZ(0); } 
    40% { transform: translateY(-15px) translateX(-50%) translateZ(0); } 
    60% { transform: translateY(-7px) translateX(-50%) translateZ(0); } 
}

/* Team Cards */
.team-row-center { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; }
.team-row-center .team-card { flex: 0 1 250px; }
.team-card { text-align: center; transition: transform 0.4s ease; width: 100%; will-change: transform; transform: translateZ(0);}
.team-card:hover { transform: translateY(-5px) translateZ(0); }
.team-photo { display: block; background-color: #000000; width: 130px; height: 130px; min-width: 130px; min-height: 130px; border-radius: 50%; margin: 0 auto 1.5rem auto; box-shadow: 0 15px 25px rgba(15, 23, 42, 0.1); border: 3px solid #E2E8F0; }
.team-role { font-size: 0.85rem; color: var(--color-accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.5rem; font-weight: 600; }
.team-card h4 { font-family: 'Inter', sans-serif; font-size: 1.1rem; color: var(--color-text-primary); }
.team-card h3 { font-family: 'Cinzel', serif; font-size: 1.4rem; color: var(--color-bg-darker); }

/* Animations */
h2::after { content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); width: 0; height: 2px; background: var(--color-accent); transition: width 0.8s ease 0.3s; will-change: width;}
.reveal.active h2::after, h2.reveal.active::after { width: 60px; }
.text-left h2::after { left: 0; transform: none; }
.reveal { opacity: 0; transform: translateY(30px) translateZ(0); transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1); will-change: opacity, transform; backface-visibility: hidden;}
.reveal.slide-left { transform: translateX(-30px) translateZ(0); }
.reveal.slide-right { transform: translateX(30px) translateZ(0); }
.reveal.active { opacity: 1; transform: translateY(0) translateX(0) translateZ(0); }
.delay-1 { transition-delay: 0.1s; } .delay-2 { transition-delay: 0.2s; } .delay-3 { transition-delay: 0.3s; }

/* Footer */
footer { background: var(--color-bg-darker); color: var(--color-text-light); padding: 4rem 0 2rem; position: relative;}
footer p { color: #94A3B8; } 
.footer-logo { filter: invert(1); max-height: 40px; margin-bottom: 1.5rem; display: inline-block; }
.footer-bottom { text-align: center; font-size: 0.85rem; color: #64748B; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem;}
.footer-btn-login { border: 1px solid var(--color-text-light); padding: 0.5rem 1.25rem; border-radius: 40px; color: var(--color-bg-darker); background: var(--color-text-light); display: inline-block; text-align: center; font-weight: 600; transition: var(--transition); will-change: background, color; transform: translateZ(0);}
.footer-btn-login:hover { background: transparent; color: var(--color-text-light); }

.social-icons { display: flex; gap: 12px; margin-top: 2rem; flex-wrap: wrap;}
.social-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background-color: var(--color-bg-secondary); color: var(--color-bg-darker); border-radius: 50%; text-decoration: none; transition: 0.3s; will-change: background-color, transform; transform: translateZ(0);}
.social-icon:hover { background-color: var(--color-accent); color: #ffffff; transform: translateY(-3px) translateZ(0); }
.social-icon svg { width: 18px; height: 18px; fill: currentColor; }

/* Mobile Logic */
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .hero-content h1 { font-size: 3.5rem; } }
@media (max-width: 900px) {
    .grid-2 { grid-template-columns: 1fr; gap: 2rem; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .social-icons { justify-content: center; }
    .text-left h2::after { left: 50%; transform: translateX(-50%); }
    .text-left h2, .text-left { text-align: center; }
    .menu-toggle { display: flex; }
    .nav-links { position: absolute; top: 100%; left: 0; width: 100%; background: #ffffff; flex-direction: column; padding: 0; box-shadow: 0 10px 15px rgba(0,0,0,0.1); border-top: 1px solid #E2E8F0; max-height: 0; overflow: hidden; opacity: 0; transition: all 0.4s ease; will-change: max-height, opacity;}
    .nav-links.active { max-height: 400px; padding: 2rem 0; opacity: 1; }
    #mobile-menu.is-active .bar:nth-child(2) { opacity: 0; }
    #mobile-menu.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg) translateZ(0); }
    #mobile-menu.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg) translateZ(0); }
}
@media (max-width: 768px) {
    .container { padding: 0 1.5rem; } .section-padding { padding: 4rem 0; } .grid-4 { grid-template-columns: 1fr; } 
    #home { background-attachment: scroll !important; }
    .team-row-center { flex-direction: column; width: 100%; }
    .team-row-center .team-card { width: 100%; flex: none; }
    .hero-content h1 { font-size: 2.8rem; } .hero-content .tagline { font-size: 1.2rem; } h2 { font-size: 2rem; }
    .reveal.slide-left, .reveal.slide-right { transform: translateY(30px) translateZ(0); }
}
@media (max-width: 480px) {
    .hero-content h1 { font-size: 2.2rem; letter-spacing: 0; }
    .brand-logo { max-height: 35px; }
    .team-photo { width: 110px; height: 110px; min-width: 110px; min-height: 110px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}