/* ==========================================
   GLOBAL STYLES — Cardinal Invest
   ========================================== */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#app {
    flex: 1;
    padding-top: var(--header-height);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-light);
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

@media (max-width: 480px) {

    .container,
    .container-narrow {
        padding: 0 var(--space-4);
    }
}

.container-narrow {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* ==========================================
   HEADER
   ========================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    z-index: var(--z-header);
    transition: box-shadow var(--transition-base);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    color: var(--text);
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover .logo-icon {
    transform: rotate(360deg);
}

.logo-text {
    font-size: var(--font-size-xl);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-link {
    position: relative;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: var(--space-2) 0;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: var(--radius-full);
    transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.mobile-menu-btn.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    background: var(--primary-dark);
    color: var(--text-inverse);
    padding: var(--space-16) 0 var(--space-8);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.5fr;
    gap: var(--space-12);
    margin-bottom: var(--space-12);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.footer-logo .logo-icon {
    color: var(--accent);
    font-size: var(--font-size-2xl);
}

.footer-logo .logo-text {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-inverse);
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.65);
    font-size: var(--font-size-sm);
    line-height: 1.7;
}

.footer-col h4 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-4);
    color: var(--accent-light);
}

.footer-col a {
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-col p {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-2);
    color: rgba(255, 255, 255, 0.75);
}

.footer-legal {
    font-size: var(--font-size-xs) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    line-height: 1.6;
}

.footer-bottom {
    padding-top: var(--space-8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.4);
}

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(24px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.animate-fade-in {
    animation: fadeIn var(--transition-base) both;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease both;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease both;
}

.animate-scale-in {
    animation: scaleIn var(--transition-base) both;
}

[data-delay="1"] {
    animation-delay: 100ms;
}

[data-delay="2"] {
    animation-delay: 200ms;
}

[data-delay="3"] {
    animation-delay: 300ms;
}

[data-delay="4"] {
    animation-delay: 400ms;
}

[data-delay="5"] {
    animation-delay: 500ms;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        gap: 0;
        padding: var(--space-4);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all var(--transition-base);
    }

    .nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-link {
        padding: var(--space-4);
        font-size: var(--font-size-base);
        width: 100%;
        text-align: center;
        border-radius: var(--radius-md);
    }

    .nav-link:hover {
        background: var(--bg);
    }

    .mobile-menu-btn {
        display: flex;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
}