@font-face {
    font-family: 'Aeroportal';
    src: url('../fonts/Aeroportal.woff2') format('woff2'),
        url('../fonts/Aeroportal.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aeroportal';
    src: url('../fonts/Aeroportal-Bold.woff2') format('woff2'),
        url('../fonts/Aeroportal-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #00B492;
    --primary-color-dark: #008e73;
    --primary-color-light: #33c3a7;
    --secondary-color: #232323;
    --background-color: #f9fbfb;
    --surface-color: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Aeroportal', system-ui, -apple-system, sans-serif;
    background-color: var(--background-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* HERO SECTION */
.hero {
    position: relative;
    color: white;
    padding: 40px 0 120px;
    text-align: center;
    z-index: 1;
}

.hero-bg-shadow {
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e0e0e0;
    transform: skewY(-2.5deg);
    transform-origin: bottom left;
    z-index: -2;
}

.hero-bg {
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    bottom: 15px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%);
    transform: skewY(-2.5deg);
    transform-origin: bottom left;
    z-index: -1;
    overflow: hidden;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    transform: skewY(2.5deg);
    /* unskew the background pattern */
    pointer-events: none;
}

.hero-top-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    animation: fadeUp 0.8s ease-out forwards;
}

.hero-top-logo img {
    height: 90px;
    width: auto;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: bold;
    margin-bottom: 24px;
    line-height: 1.1;
    letter-spacing: -1px;
    animation: fadeUp 0.8s ease-out forwards;
}

.hero .subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: #e0e0e0;
    max-width: 800px;
    margin: 0 auto;
    font-weight: normal;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 0.2s forwards;
}

/* PRODUCTS GRID */
.products-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    padding: 80px 0;
}

.products-grid::before {
    content: '';
    position: absolute;
    bottom: -40px;
    right: calc(50% - 50vw - 40px);
    width: 800px;
    height: 800px;
    background-image: url('../imgs/investing-time-brain@3x.png');
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;
    z-index: -1;
    pointer-events: none;
}

.product-card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    animation: fadeUp 0.8s ease-out backwards;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.product-card:nth-child(1) {
    animation-delay: 0.1s;
}

.product-card:nth-child(2) {
    animation-delay: 0.2s;
}

.product-card:nth-child(3) {
    animation-delay: 0.3s;
}

.product-card:nth-child(4) {
    animation-delay: 0.4s;
}

.product-card:nth-child(5) {
    animation-delay: 0.5s;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(20, 174, 128, 0.15);
    border-color: rgba(20, 174, 128, 0.3);
}

.product-image-wrapper {
    background: #eceff1;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #e0e4e6;
}

.product-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    mix-blend-mode: darken;
}

.product-card:hover .product-img {
    transform: scale(1.08);
}

/* 5 Items Grid Layout */
@media (min-width: 1060px) {
    .products-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .product-card:nth-child(1) {
        grid-column: 1 / 3;
    }

    .product-card:nth-child(2) {
        grid-column: 3 / 5;
    }

    .product-card:nth-child(3) {
        grid-column: 5 / 7;
    }

    .product-card:nth-child(4) {
        grid-column: 2 / 4;
    }

    .product-card:nth-child(5) {
        grid-column: 4 / 6;
    }
}

.product-info {
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-grow: 1;
}

.product-logo {
    height: 60px;
    width: auto;
    max-width: 80%;
    object-fit: contain;
    margin-bottom: 16px;
    transition: var(--transition);
}

.product-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: auto;
    margin-bottom: 24px;
}

.product-card:hover .product-logo {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.08));
}

.card-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.05rem;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(10px);
}

.action-icon {
    transition: transform 0.3s ease;
}

.product-card:hover .card-action {
    opacity: 1;
    transform: translateY(0);
}

.product-card:hover .action-icon {
    transform: translateX(5px);
}

/* INNER PAGES & BUTTONS */
.hero-small {
    padding: 20px 0 80px;
}

.hero-small h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 10px;
}

.hero-small .hero-top-logo {
    margin-bottom: 20px;
}

.page-content {
    position: relative;
    z-index: 1;
    padding: 60px 24px 100px;
    animation: fadeUp 0.6s ease-out backwards;
}

.page-content::before {
    content: '';
    position: absolute;
    bottom: -40px;
    right: calc(50% - 50vw - 40px);
    width: 800px;
    height: 800px;
    background-image: url('../imgs/investing-time-brain@3x.png');
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;
    z-index: -1;
    pointer-events: none;
}

.back-link-wrapper {
    margin-bottom: 40px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary-color);
    transform: translateX(-5px);
}

.product-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    align-items: center;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 60px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.03);
}

.product-detail-image {
    flex: 1;
    min-width: 300px;
    background: #eceff1;
    border-radius: var(--border-radius);
    padding: 40px;
    display: flex;
    justify-content: center;
}

.product-detail-image img {
    max-width: 100%;
    mix-blend-mode: darken;
    animation: fadeUp 0.8s ease-out backwards;
}

.product-detail-info {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.detail-logo {
    height: 80px;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 24px;
}

.product-detail-info p {
    font-size: 1.15rem;
    color: var(--text-main);
    margin-bottom: 40px;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    font-size: 1.1rem;
    font-family: inherit;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 10px 20px rgba(20, 174, 128, 0.2);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-color-dark);
    border-color: var(--primary-color-dark);
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(20, 174, 128, 0.3);
    color: white;
}

@media (max-width: 768px) {
    .product-detail {
        padding: 40px 20px;
        gap: 40px;
    }
}

/* FOOTER */
.site-footer {
    background: var(--secondary-color);
    color: white;
    padding: 60px 0;
    position: relative;
    z-index: 10;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, #234197, #c40070);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.footer-logos {
    display: flex;
    gap: 32px;
    align-items: center;
}

.footer-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    opacity: 0.9;
    transition: var(--transition);
}

.footer-logo:hover {
    opacity: 1;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-info {
    width: 100%;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #aaaaaa;
    font-size: 0.85rem;
}

/* ANIMATIONS */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero {
        padding: 60px 0 40px;
    }

    .products-grid {
        padding: 40px 0;
        gap: 24px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-logos {
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-links {
        justify-content: center;
    }
}

/* MODAL POPUP */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(35, 35, 35, 0.85); /* secondary color with opacity */
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-content {
    background: var(--surface-color);
    padding: 50px;
    border-radius: 20px;
    max-width: 650px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    transform: translateY(0) scale(1);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-overlay.hidden .modal-content {
    transform: translateY(30px) scale(0.95);
}

.modal-title {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 24px;
}

.modal-text {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 40px;
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: rgba(20, 174, 128, 0.05); /* very light primary hue */
    transform: translateY(-3px);
}