* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-gradient: linear-gradient(45deg, #f093fb 0%, #f5576c 100%);
    --text-light: #ffffff;
    --text-dark: #333333;
    --glass-bg: rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.18);
    --body-bg-start-color-hsl: 240, 30%, 5%;
    --body-bg-end-color-hsl: 233, 35%, 10%;
    --body-bg-gradient-angle: 135deg;
    --body-bg-scroll-effect: linear-gradient(
        var(--body-bg-gradient-angle),
        hsl(var(--body-bg-start-color-hsl)) 0%,
        hsl(var(--body-bg-end-color-hsl)) 100%
    );
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background: var(--body-bg-scroll-effect);
    overflow-x: hidden;
    transition: background 0.3s ease-out;
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    background: rgba(12, 12, 20, 0.5);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
    transition: all 0.35s cubic-bezier(0.215, 0.610, 0.355, 1.000);
}
nav.scrolled {
    padding: 15px 50px;
    background: rgba(8, 8, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}
.logo {
    font-size: 2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.02em;
    cursor: pointer;
}
.nav-links { display: flex; list-style: none; gap: 40px; }
.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    padding: 5px 0;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 0; height: 2px; background: var(--primary-gradient);
    transition: width 0.3s cubic-bezier(0.215, 0.610, 0.355, 1.000);
}
.nav-links a:hover { color: #f093fb; transform: translateY(-2px); }
.nav-links a:hover::after { width: 100%; }

.hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    text-align: center; position: relative; overflow: hidden; padding: 0 20px;
}
.hero-content {
    max-width: 900px; z-index: 10;
    animation: fadeInUp 1s ease-out 0.5s backwards;
}
.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem); color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem; font-weight: 300; letter-spacing: 0.1em;
    text-transform: uppercase; overflow: hidden; white-space: nowrap;
    width: 0; animation: typewriter 2.5s steps(40) 1s forwards; display: inline-block;
}
@keyframes typewriter { to { width: 100%; } }
.hero h1 {
    font-size: clamp(3rem, 7vw, 5.5rem); font-weight: 900; margin-bottom: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #667eea 50%, #764ba2 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    line-height: 1.1; letter-spacing: -0.02em;
}
.hero-description {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem); color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem; font-weight: 300; line-height: 1.65;
    max-width: 700px; margin-left: auto; margin-right: auto;
}
.cta-container { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.cta-button {
    padding: 18px 40px; background: var(--primary-gradient); color: white;
    text-decoration: none; border-radius: 50px; font-weight: 600; font-size: 1rem;
    transition: transform 0.3s cubic-bezier(0.215, 0.610, 0.355, 1.000), box-shadow 0.3s cubic-bezier(0.215, 0.610, 0.355, 1.000);
    position: relative; overflow: hidden; border: none; cursor: pointer;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.15);
}
.cta-button::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transition: left 0.6s cubic-bezier(0.215, 0.610, 0.355, 1.000);
}
.cta-button:hover::before { left: 100%; }
.cta-button:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 22px 40px rgba(102, 126, 234, 0.25);
}
.cta-secondary {
    background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.cta-secondary:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.3); }

/* Initial states for elements previously styled inline by JS */
.about-text,
.stats-container,
.contact-container, /* This is the bordered box for the form */
.contact-intro {   /* This is the paragraph above the contact form */
    opacity: 0;
    transform: translateY(30px);
    /* Default transition if JS doesn't override it.
       The JS currently *does* set a specific transition with delay for these,
       so this CSS transition might be overridden by the inline style from JS.
       It's good to have a fallback or define it consistently.
       If JS handles the transition (as it does now), this line can be omitted.
    */
    /* transition: opacity 0.7s ease-out, transform 0.7s ease-out; */
}

/* Visible states for these elements */
.about-text.visible,
.stats-container.visible,
.contact-container.visible,
.contact-intro.visible {
    opacity: 1;
    transform: translateY(0);
}

.floating-element {
    position: absolute; opacity: 0.12; font-size: clamp(1.5rem, 4vw, 2.5rem);
    animation: float 12s ease-in-out infinite alternate; pointer-events: none; color: #764ba2;
}
.floating-element:nth-child(1) { top: 15%; left: 8%; animation-delay: 0s; font-size: 2.5rem; }
.floating-element:nth-child(2) { top: 70%; right: 12%; animation-delay: -4s; font-size: 2rem; }
.floating-element:nth-child(3) { bottom: 10%; left: 25%; animation-delay: -8s; font-size: 3rem; }
.floating-element:nth-child(4) { top: 40%; left: 75%; animation-delay: -6s; font-size: 1.8rem; }
@keyframes float {
    0% { transform: translateY(0px) translateX(0px) rotate(0deg) scale(1); opacity: 0.12; }
    25% { transform: translateY(-25px) translateX(20px) rotate(45deg) scale(1.15); opacity: 0.08; }
    50% { transform: translateY(15px) translateX(-15px) rotate(90deg) scale(1); opacity: 0.15; }
    75% { transform: translateY(-20px) translateX(25px) rotate(135deg) scale(1.1); opacity: 0.07; }
    100% { transform: translateY(0px) translateX(0px) rotate(180deg) scale(1); opacity: 0.12; }
}

section { padding: 100px 50px; position: relative; overflow: hidden; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 15px; }
.section-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; text-align: center; margin-bottom: 4.5rem;
    background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    opacity: 0; transform: translateY(50px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.section-title.visible { opacity: 1; transform: translateY(0); }
.section-subtitle { 
    text-align: center;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: rgba(255, 255, 255, 0.8);
    max-width: 800px;
    margin: -3rem auto 4rem auto; 
    line-height: 1.7;
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.8s ease-out 0.2s, transform 0.8s ease-out 0.2s; 
}
.section-subtitle.visible { opacity: 1; transform: translateY(0); }


.services-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 40px; margin-top: 4rem;
}
.service-card {
    background: var(--glass-bg); backdrop-filter: blur(18px); border: 1px solid var(--glass-border);
    border-radius: 20px; padding: 40px 30px;
    transition: transform 0.4s cubic-bezier(0.215, 0.610, 0.355, 1.000), 
                box-shadow 0.4s cubic-bezier(0.215, 0.610, 0.355, 1.000),
                border-color 0.4s ease, opacity 0.5s ease-out; 
    position: relative; overflow: hidden; opacity: 0;
    transform: translateY(50px) perspective(1000px) rotateX(10deg) scale(0.95);
    cursor: pointer; will-change: transform, opacity, box-shadow, border-color;
}
.service-card.visible {
    opacity: 1;
    transform: translateY(0) perspective(1000px) rotateX(0deg) scale(1);
}
.service-card::before {
    content: ''; position: absolute; inset: -1px; border-radius: inherit;
    background: linear-gradient(135deg, transparent, var(--accent-gradient));
    opacity: 0; transition: opacity 0.4s ease; z-index: -1; filter: blur(15px);
}
.service-card:hover::before { opacity: 0.25; }
.service-card:hover {
    transform: translateY(-12px) scale(1.03) perspective(1000px) rotateX(2deg);
    border-color: rgba(240, 147, 251, 0.5);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}
.service-icon {
    width: 70px; height: 70px; background: var(--primary-gradient); border-radius: 16px;
    display: flex; align-items: center; justify-content: center; font-size: 1.8rem;
    margin-bottom: 1.8rem; position: relative;
    transition: transform 0.4s cubic-bezier(0.215, 0.610, 0.355, 1.000), box-shadow 0.4s cubic-bezier(0.215, 0.610, 0.355, 1.000);
    box-shadow: 0 8px 15px rgba(102, 126, 234, 0.2);
}
.service-card:hover .service-icon {
    transform: scale(1.15) rotateY(10deg);
    box-shadow: 0 14px 25px rgba(102, 126, 234, 0.35);
}
.service-card h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 1rem; color: var(--text-light); }
.service-card p { color: rgba(255, 255, 255, 0.85); line-height: 1.7; font-weight: 300; font-size: 0.95rem; }

.about-content {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 60px; align-items: flex-start; 
}
.about-text {
    font-size: clamp(1.05rem, 1.8vw, 1.15rem); 
    line-height: 1.85; color: rgba(255, 255, 255, 0.9); font-weight: 300;
}
.about-text h3 {
    font-size: clamp(1.8rem, 4vw, 2.2rem); font-weight: 700; margin-bottom: 1.5rem;
    background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.about-text p { margin-bottom: 1.5rem; }
.about-text p:last-child { margin-bottom: 0; }

.stats-container {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 30px; margin-top: 1rem; 
}
.stat-card {
    background: var(--glass-bg); backdrop-filter: blur(18px); border: 1px solid var(--glass-border);
    border-radius: 15px; padding: 30px 25px; text-align: center;
    transition: transform 0.3s cubic-bezier(0.215, 0.610, 0.355, 1.000), border-color 0.3s ease;
    cursor: default; will-change: transform, border-color;
}
.stat-card:hover { transform: translateY(-8px) scale(1.03); border-color: rgba(102, 126, 234, 0.4); }
.stat-number {
    font-size: clamp(2.5rem, 6vw, 3rem); font-weight: 900;
    background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    display: block; margin-bottom: 0.5rem;
}
.stat-label { color: rgba(255, 255, 255, 0.85); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; }

/* Team Section Styles */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
    margin-top: 1rem; 
}
.team-card {
    background: var(--glass-bg);
    backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.215, 0.610, 0.355, 1.000), 
                box-shadow 0.4s cubic-bezier(0.215, 0.610, 0.355, 1.000),
                border-color 0.4s ease, opacity 0.5s ease-out; /* Added opacity */
    opacity: 0; transform: translateY(50px) scale(0.95);
    will-change: transform, opacity, box-shadow, border-color;
}
.team-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.team-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}
.team-image-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--primary-gradient); 
    margin: 0 auto 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem; 
    color: white;
    overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.team-image-placeholder img { 
    width: 100%; height: 100%; object-fit: cover;
}
.team-card h3 { 
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}
.team-card .team-title { 
    font-size: 1rem;
    font-weight: 500;
    color: #f093fb; 
    margin-bottom: 1rem;
    display: block;
}
.team-card p { 
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-weight: 300;
}

.contact-container {
    max-width: 800px; margin: 0 auto; background: var(--glass-bg);
    backdrop-filter: blur(18px); border: 1px solid var(--glass-border);
    border-radius: 30px; padding: 50px 60px; 
    position: relative;
}
.contact-intro {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
}
.form-group { margin-bottom: 25px; }
.form-group label { display: block; margin-bottom: 10px; font-weight: 600; color: var(--text-light); font-size: 1.05rem; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 16px 20px; background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px;
    color: var(--text-light); font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.215, 0.610, 0.355, 1.000);
    backdrop-filter: blur(8px); cursor: text;
}
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover, 
.form-group input:-webkit-autofill:focus, 
.form-group input:-webkit-autofill:active  {
    -webkit-box-shadow: 0 0 0 30px hsl(var(--body-bg-start-color-hsl)) inset !important;
    -webkit-text-fill-color: var(--text-light) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: rgba(102, 126, 234, 0.6);
    background: rgba(255, 255, 255, 0.1); box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
}
.form-group textarea { height: 120px; resize: vertical; min-height: 80px; }

footer {
    background: transparent; padding: 80px 50px 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 50px;
}
.footer-content {
    max-width: 1400px; margin: 0 auto; display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px; margin-bottom: 40px; padding: 0 15px;
}
.footer-section h3 {
    font-size: 1.4rem; font-weight: 700; margin-bottom: 18px;
    background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.footer-section p, .footer-section a {
    color: rgba(255, 255, 255, 0.75); text-decoration: none;
    line-height: 1.7; transition: color 0.3s ease; font-size: 0.95rem;
}
.footer-section p > br { margin-bottom: 8px; display: block; content: ""; }
.footer-section a:hover { color: #f093fb; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 2.5rem;
    margin-top: 2.5rem; text-align: center; color: rgba(255, 255, 255, 0.7); font-size: 0.9rem;
}

@keyframes fadeInUp { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 992px) { .nav-links { gap: 25px; } }
@media (max-width: 768px) {
    nav { padding: 15px 20px; }
    .nav-container { flex-direction: column; gap: 15px; }
    .nav-links { display: none; /* Implement burger menu for mobile */ }
    section { padding: 70px 20px; }
    .hero h1 { font-size: clamp(2.5rem, 10vw, 3.5rem); }
    .hero-description { font-size: clamp(1rem, 4vw, 1.1rem); }
    .about-content { grid-template-columns: 1fr; gap: 40px; }
    .stats-container { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
    .services-grid, .team-grid { grid-template-columns: 1fr; }
    .contact-container { padding: 40px 25px; }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-section h3 { margin-top: 25px; }
    .footer-section:first-child h3 { margin-top: 0; }
}
html { scroll-behavior: smooth; }
::selection { background: rgba(102, 126, 234, 0.4); color: white; }
