/* ============================================================
   XFINSIGHTS - MASTER STYLESHEET
   ============================================================
   Brand Colors:
   - Primary Blue: #0098ff (Trust)
   - Charcoal: #333333 (Stability)
   - Moto: "Explore your financial insights"
   ============================================================ */

/* ----- CSS RESET ----- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ----- CUSTOM PROPERTIES ----- */
:root {
    /* BRAND COLORS - EXACT MATCH */
    --primary-500: #0098ff;
    --primary-600: #0077cc;
    --primary-700: #005fa3;
    --primary-100: #e6f3ff;
    
    --charcoal-900: #333333;
    --charcoal-800: #404040;
    --charcoal-700: #4d4d4d;
    --charcoal-600: #666666;
    --charcoal-500: #808080;
    --charcoal-400: #999999;
    --charcoal-300: #b3b3b3;
    --charcoal-200: #cccccc;
    --charcoal-100: #f5f5f5;
    
    /* Neutral Colors */
    --white: #ffffff;
    --off-white: #f8fafc;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, sans-serif;
    --font-display: 'Clash Display', 'Inter', sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 2.5rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1);
    --shadow-2xl: 0 25px 50px rgba(0,0,0,0.15);
    
    /* 3D Shadows */
    --shadow-3d-sm: 0 4px 0 var(--charcoal-900);
    --shadow-3d-md: 0 6px 0 var(--charcoal-900);
    --shadow-3d-lg: 0 8px 0 var(--charcoal-900);
    --shadow-3d-primary: 0 4px 0 var(--primary-700);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Container */
    --container-width: 1280px;
    --container-padding: var(--space-lg);
    
    /* Z-index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal: 400;
    --z-popover: 500;
    --z-tooltip: 600;
}

/* ----- BASE STYLES ----- */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    color: var(--charcoal-800);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    position: relative;
    z-index: 1;
}

/* ----- TYPOGRAPHY ----- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--charcoal-900);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
    color: var(--charcoal-700);
    margin-bottom: var(--space-md);
}

/* ----- TEXT UTILITIES ----- */
.text-primary { color: var(--primary-500); }
.text-charcoal { color: var(--charcoal-900); }
.text-white { color: var(--white); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ----- SECTION STYLES ----- */
.section {
    padding: var(--space-4xl) 0;
    position: relative;
    overflow: hidden;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-2xl);
}

.section-subtitle {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-500);
    background: rgba(0, 152, 255, 0.1);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-sm);
}

.section-title {
    margin-bottom: var(--space-sm);
}

.section-description {
    font-size: 1.125rem;
    color: var(--charcoal-600);
}

/* ----- GRID SYSTEM ----- */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ----- FLEX UTILITIES ----- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* ----- BUTTONS ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-xl);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-full);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: var(--white);
    box-shadow: var(--shadow-3d-primary), var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-3d-primary), var(--shadow-xl);
}

.btn-outline {
    background: transparent;
    color: var(--charcoal-800);
    border: 2px solid var(--charcoal-300);
    box-shadow: none;
}

.btn-outline:hover {
    border-color: var(--primary-500);
    color: var(--primary-500);
    transform: translateY(-2px);
}

.btn-3d {
    box-shadow: var(--shadow-3d-sm);
    transform: translateY(-2px);
}

.btn-3d:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-3d-md);
}

.btn-lg {
    padding: var(--space-md) var(--space-2xl);
    font-size: 1.125rem;
}

.btn-sm {
    padding: var(--space-xs) var(--space-lg);
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-fixed);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

/* Logo and Moto */
.logo-moto-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logo-svg {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover .logo-svg {
    transform: scale(1.05);
}

.nav-moto {
    font-size: 0.9rem;
    color: var(--charcoal-600);
    font-style: italic;
    border-left: 2px solid var(--primary-500);
    padding-left: var(--space-md);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.navbar.scrolled .nav-moto {
    opacity: 0;
    visibility: hidden;
    width: 0;
    padding-left: 0;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    list-style: none;
}

.nav-link {
    color: var(--charcoal-700);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-500);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-500);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Booking Button */
.nav-cta {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: var(--white);
    padding: var(--space-sm) var(--space-xl);
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    box-shadow: var(--shadow-3d-primary), var(--shadow-md);
    transition: all 0.3s ease;
}

.nav-cta i {
    font-size: 1.125rem;
    transition: transform 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-3d-primary), var(--shadow-lg);
    color: var(--white);
}

.nav-cta:hover i {
    transform: translateX(4px);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    z-index: calc(var(--z-fixed) + 1);
}

.menu-toggle span {
    width: 28px;
    height: 2px;
    background: var(--charcoal-800);
    transition: all 0.3s ease;
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--space-4xl) 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--off-white), var(--white));
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg .gradient {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at 30% 30%, rgba(0, 152, 255, 0.03) 0%, transparent 50%);
    transform: translate(-50%, -50%);
    animation: rotateGradient 30s linear infinite;
}

@keyframes rotateGradient {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    background: rgba(0, 152, 255, 0.1);
    color: var(--primary-500);
    padding: var(--space-xs) var(--space-lg);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: var(--space-lg);
    backdrop-filter: blur(4px);
}

.hero-badge i {
    color: var(--primary-500);
}

.hero-title {
    margin-bottom: var(--space-lg);
    line-height: 1.1;
}

.hero-title .text-primary {
    display: block;
    margin-top: var(--space-xs);
}

.hero-description {
    font-size: 1.125rem;
    color: var(--charcoal-600);
    margin-bottom: var(--space-xl);
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: var(--space-2xl);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-500);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--charcoal-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================================
   3D CUBE
   ============================================================ */

.hero-visual {
    position: relative;
    perspective: 1000px;
}

.cube-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
    transform-style: preserve-3d;
    animation: rotateCube 20s infinite linear;
}

@keyframes rotateCube {
    from { transform: rotateX(0deg) rotateY(0deg); }
    to { transform: rotateX(360deg) rotateY(360deg); }
}

.cube-face {
    position: absolute;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(0, 152, 255, 0.05), rgba(255, 255, 255, 0.1));
    border: 2px solid rgba(0, 152, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary-500);
    box-shadow: 0 0 40px rgba(0, 152, 255, 0.1);
    transform-style: preserve-3d;
}

.cube-face.front { transform: translateZ(100px); }
.cube-face.back { transform: rotateY(180deg) translateZ(100px); }
.cube-face.right { transform: rotateY(90deg) translateZ(100px); }
.cube-face.left { transform: rotateY(-90deg) translateZ(100px); }
.cube-face.top { transform: rotateX(90deg) translateZ(100px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(100px); }

/* Floating Elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-el {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 500;
    color: var(--charcoal-800);
    border: 1px solid rgba(0, 152, 255, 0.1);
    animation: float 3s ease-in-out infinite;
    white-space: nowrap;
}

.floating-el i {
    color: var(--primary-500);
    font-size: 1.125rem;
}

.floating-el-1 {
    top: 10%;
    right: 0;
    animation-delay: 0s;
}

.floating-el-2 {
    bottom: 20%;
    left: 0;
    animation-delay: 0.5s;
}

.floating-el-3 {
    top: 40%;
    left: 20%;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ============================================================
   SERVICE CARDS - Bookkeeping Focused
   ============================================================ */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.service-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--charcoal-200);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 152, 255, 0.02), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
    border-color: transparent;
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    margin-bottom: var(--space-lg);
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-3d-sm);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(360deg);
}

.service-card h3 {
    margin-bottom: var(--space-sm);
    position: relative;
    z-index: 1;
}

.service-card p {
    color: var(--charcoal-600);
    margin-bottom: var(--space-lg);
    position: relative;
    z-index: 1;
}

.service-features {
    list-style: none;
    margin-bottom: var(--space-lg);
    position: relative;
    z-index: 1;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    color: var(--charcoal-700);
}

.service-features i {
    color: var(--primary-500);
    font-size: 1rem;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--primary-500);
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.3s ease;
    position: relative;
    z-index: 1;
}

.service-link:hover {
    gap: var(--space-md);
}

.service-number {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    font-size: 4rem;
    font-weight: 800;
    color: var(--charcoal-100);
    line-height: 1;
    z-index: 0;
    transition: all 0.3s ease;
}

.service-card:hover .service-number {
    color: var(--primary-500);
    opacity: 0.1;
    transform: scale(1.2);
}

/* Bookkeeping Focused Badge */
.bookkeeping-badge {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    background: var(--primary-500);
    color: var(--white);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

/* ============================================================
   TRUST BADGES
   ============================================================ */

.trust-badges {
    padding: var(--space-2xl) 0;
    background: var(--white);
    border-top: 1px solid var(--charcoal-100);
    border-bottom: 1px solid var(--charcoal-100);
}

.badges-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: var(--space-xl);
}

.badge-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.badge-item:hover {
    opacity: 1;
}

.badge-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-100);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-500);
    font-size: 1.25rem;
}

.badge-text {
    font-weight: 600;
    color: var(--charcoal-700);
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */

.testimonials {
    background: var(--off-white);
}

.testimonial-slider {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.testimonial-track {
    position: relative;
    min-height: 300px;
}

.testimonial-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
    transform: translateX(30px);
}

.testimonial-slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    position: relative;
}

.testimonial-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--charcoal-200);
    position: relative;
}

.testimonial-quote {
    font-size: 4rem;
    color: var(--primary-500);
    opacity: 0.2;
    position: absolute;
    top: var(--space-lg);
    left: var(--space-lg);
}

.testimonial-text {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--charcoal-700);
    margin-bottom: var(--space-xl);
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.author-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 1.5rem;
}

.author-info h4 {
    margin-bottom: var(--space-xs);
}

.author-info p {
    color: var(--charcoal-500);
    margin: 0;
}

.testimonial-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

.testimonial-btn {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: var(--white);
    border: 1px solid var(--charcoal-200);
    color: var(--charcoal-600);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.testimonial-btn:hover {
    background: var(--primary-500);
    color: var(--white);
    border-color: var(--primary-500);
}

.testimonial-dots {
    display: flex;
    gap: var(--space-xs);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: var(--charcoal-300);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--primary-500);
    width: 30px;
}

/* ============================================================
   CTA SECTION
   ============================================================ */

.cta-section {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: var(--white);
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    color: var(--white);
    margin-bottom: var(--space-md);
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: var(--space-xl);
}

.cta-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn-primary {
    background: var(--white);
    color: var(--primary-500);
    box-shadow: var(--shadow-3d-sm), var(--shadow-lg);
}

.cta-buttons .btn-primary:hover {
    background: var(--white);
    color: var(--primary-600);
}

.cta-buttons .btn-outline {
    border-color: var(--white);
    color: var(--white);
}

.cta-buttons .btn-outline:hover {
    background: var(--white);
    color: var(--primary-500);
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
    background: var(--charcoal-900);
    color: var(--white);
    padding: var(--space-3xl) 0 var(--space-xl);
    position: relative;
    overflow: hidden;
}

.footer-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.footer-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.1;
    animation: floatSphere 20s ease-in-out infinite;
}

.sphere-1 {
    top: -200px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: var(--primary-500);
    animation-delay: 0s;
}

.sphere-2 {
    bottom: -200px;
    left: -100px;
    width: 500px;
    height: 500px;
    background: var(--primary-500);
    animation-delay: -5s;
}

@keyframes floatSphere {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -50px) scale(1.1); }
    50% { transform: translate(0, -100px) scale(1); }
    75% { transform: translate(-50px, -50px) scale(0.9); }
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
    position: relative;
    z-index: 1;
}

.footer-logo-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.footer-logo {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-moto {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    border-left: 2px solid var(--primary-500);
    padding-left: var(--space-md);
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: var(--space-lg);
    max-width: 350px;
}

.footer-social {
    display: flex;
    gap: var(--space-sm);
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-500);
    transform: translateY(-4px);
}

.footer-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: var(--space-lg);
    position: relative;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-500);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

.footer-links a:hover {
    color: var(--white);
    transform: translateX(4px);
}

.footer-links i {
    font-size: 0.75rem;
    color: var(--primary-500);
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact-item i {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-500);
}

.footer-newsletter {
    margin-top: var(--space-lg);
}

.footer-newsletter p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-sm);
}

.newsletter-form {
    display: flex;
    gap: var(--space-xs);
}

.newsletter-form input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-form button {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-full);
    background: var(--primary-500);
    color: var(--white);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background: var(--primary-600);
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--primary-500);
}

/* ============================================================
   SCROLL TO TOP
   ============================================================ */

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-3d-sm), var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: var(--z-tooltip);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-3d-md), var(--shadow-xl);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.scale-in {
    animation: scaleIn 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

@media (max-width: 1200px) {
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .cube-wrapper {
        width: 300px;
        height: 300px;
    }
    
    .cube-face {
        width: 150px;
        height: 150px;
    }
    
    .cube-face.front { transform: translateZ(75px); }
    .cube-face.back { transform: rotateY(180deg) translateZ(75px); }
    .cube-face.right { transform: rotateY(90deg) translateZ(75px); }
    .cube-face.left { transform: rotateY(-90deg) translateZ(75px); }
    .cube-face.top { transform: rotateX(90deg) translateZ(75px); }
    .cube-face.bottom { transform: rotateX(-90deg) translateZ(75px); }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: var(--space-3xl) var(--space-xl);
        transition: right 0.3s ease;
        box-shadow: var(--shadow-2xl);
        z-index: calc(var(--z-fixed) - 1);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-logo-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-moto {
        border-left: none;
        padding-left: 0;
        border-top: 2px solid var(--primary-500);
        padding-top: var(--space-sm);
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .floating-el {
        display: none;
    }
    
    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
    }
    
    .stat-item {
        align-items: center;
    }
}

/* ----- REDUCED MOTION ----- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}