:root {
    --primary-navy: #1e3a72;
    --secondary-navy: #2a5298;
    --accent-gold: #c8a85a;
    --text-dark: #1d1d1f;
    --text-gray: #6e6e73;
    --bg-light: #f5f5f7;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #ffffff;
    overflow-x: hidden;
}

/* Navigation */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Border that animates from bottom */
header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled::after {
    transform: scaleX(1);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 48px;
    height: 90px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
}

.logo-img {
    height: 120px;
    width: auto;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

header:not(.scrolled) .logo-img {
    filter: brightness(0) invert(1);
    drop-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.logo-container:hover .logo-img {
    transform: scale(1.05) rotate(2deg);
}

.logo-container:hover .logo-img {
    transform: scale(1.05);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 32px;
    align-items: center;
}

nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

header:not(.scrolled) nav a {
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

header:not(.scrolled) .ticker-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

nav a:hover {
    color: var(--primary-navy);
    transform: translateY(-2px);
}

header:not(.scrolled) nav a:hover {
    color: var(--accent-gold);
    text-shadow: 0 2px 8px rgba(200, 168, 90, 0.5);
    transform: translateY(-2px);
}

nav a.active {
    color: var(--primary-navy);
    font-weight: 600;
}

header:not(.scrolled) nav a.active {
    color: white;
    font-weight: 600;
}

/* Active page indicator - underline */
nav a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gold);
    border-radius: 2px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

.ticker-badge {
    background: var(--primary-navy);
    color: white;
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Non-home pages - header always has white background */
body:has(.page-hero) header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}

body:has(.page-hero) header nav a {
    color: var(--text-dark);
    text-shadow: none;
}

body:has(.page-hero) header .logo-img {
    filter: none;
    drop-shadow: none;
}

body:has(.page-hero) header .ticker-badge {
    background: var(--primary-navy);
    color: white;
    border: none;
}

body:has(.page-hero) header nav a:hover {
    color: var(--primary-navy);
    text-shadow: none;
}

body:has(.page-hero) header nav a.active {
    color: var(--primary-navy);
    font-weight: 600;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a72 0%, #2a5298 50%, #3469af 100%);
    margin-top: 0;
    padding-top: 90px;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 1100px;
    padding: 0 48px;
    animation: fadeInUp 1.2s ease-out;
    margin-top: -45px;
}

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

.hero-logo {
    width: 240px;
    height: auto;
    margin-bottom: 20px;
    margin-top: 0;
    filter: brightness(0) invert(1);
    animation: fadeInScale 1.2s ease-out, subtlePulse 4s ease-in-out infinite;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes subtlePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.95;
    }
}

.hero h1 {
    font-size: 68px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 10px;
}

.hero .tagline {
    font-size: 30px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 8px;
    color: var(--accent-gold);
    letter-spacing: -0.5px;
}

.hero .subtitle {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 24px;
    opacity: 0.95;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
    animation: fadeInUp 0.8s ease-out backwards;
}

.hero-stat:nth-child(1) {
    animation-delay: 0.2s;
}

.hero-stat:nth-child(2) {
    animation-delay: 0.4s;
}

.hero-stat:nth-child(3) {
    animation-delay: 0.6s;
}

.hero-stat-value {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--accent-gold);
}

.hero-stat-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 28px;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    padding: 16px 40px;
    background: white;
    color: var(--primary-navy);
    text-decoration: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.cta-button-secondary {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.cta-button-secondary:hover {
    background: white;
    color: var(--primary-navy);
}

/* Page Hero (for non-home pages) */
.page-hero {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-navy) 100%);
    color: white;
    padding: 100px 48px 60px;
    margin-top: 90px;
    text-align: center;
    width: 100%;
    max-width: none;
}

.page-hero h1,
.page-hero p {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.page-hero h1 {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1.5px;
}

.page-hero p {
    font-size: 20px;
    opacity: 0.95;
    max-width: 800px;
}

/* Sections */
.section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 48px;
}

.section-alt {
    background: #f8f9fa;
    width: 100%;
    max-width: none;
    padding: 80px 48px;
}

.section-alt .section-header,
.section-alt .summary-grid,
.section-alt .country-stats {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.section-dark {
    background: var(--primary-navy);
    color: white;
    width: 100%;
    max-width: none;
    padding: 80px 48px;
}

.section-dark .section-header,
.section-dark .summary-grid {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.section-header {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 60px;
}

.section-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-gold);
    margin-bottom: 16px;
}

.section-dark .section-label {
    color: var(--accent-gold);
}

.section h2 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
    color: var(--text-dark);
}

.section-dark h2 {
    color: white;
}

.section-subtitle {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-gray);
}

.section-dark .section-subtitle {
    color: rgba(255,255,255,0.9);
}

/* Cards */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 60px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.summary-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.summary-grid-3 .summary-card {
    background: linear-gradient(135deg, var(--primary-navy), var(--secondary-navy));
    color: white;
    border-top: 4px solid var(--accent-gold);
}

.summary-grid-3 .summary-card h3 {
    color: white;
}

.summary-grid-3 .summary-card p {
    color: rgba(255,255,255,0.9);
}

.summary-grid-3 .summary-card:hover {
    border-top-color: var(--accent-gold);
}

.summary-card {
    background: white;
    padding: 36px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
    border-top: 4px solid var(--accent-gold);
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.18);
    border-top-color: var(--primary-navy);
}

.summary-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.summary-card p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.card-link {
    color: var(--primary-navy);
    font-weight: 600;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
}

.card-link:hover {
    color: var(--secondary-navy);
}

/* Leadership */
.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 60px;
    margin-top: 60px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.leader-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
}

.leader-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.20);
}

.leader-header {
    background: linear-gradient(135deg, var(--primary-navy), var(--secondary-navy));
    padding: 40px 32px 32px;
    color: white;
    position: relative;
}

.leader-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 5px solid rgba(255,255,255,0.2);
    overflow: hidden;
    background: white;
}

.leader-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Zoom in on Andrés Barresi */
.leader-photo img[src="Andre_Barresi.png"] {
    transform: scale(1.2);
}

/* Zoom in on Federico Guerrero */
.leader-photo img[src="Federico_Guerrero.png"] {
    transform: scale(1.2);
}

.leader-name {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.leader-title {
    font-size: 17px;
    font-weight: 500;
    color: var(--accent-gold);
    margin-bottom: 20px;
    line-height: 1.4;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.leader-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.leader-tag {
    background: rgba(255,255,255,0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.leader-body {
    padding: 32px;
}

.leader-body p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-gray);
    margin-bottom: 20px;
}

/* Investment Themes */
.themes-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    margin-top: 60px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.theme-card {
    background: white;
    padding: 40px 32px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
    border-left: 4px solid var(--accent-gold);
}

.theme-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.16);
    border-left-color: var(--primary-navy);
}

.theme-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary-navy);
    margin-bottom: 16px;
    line-height: 1;
}

.theme-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary-navy);
}

.theme-card p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-gray);
}

/* IPO Details */
.ipo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin: 60px auto;
    max-width: 1200px;
}

.ipo-stat-card {
    background: linear-gradient(135deg, var(--primary-navy), var(--secondary-navy));
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.ipo-number {
    font-size: 52px;
    font-weight: 800;
    color: var(--accent-gold);
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.ipo-label {
    font-size: 16px;
    color: rgba(255,255,255,0.95);
    font-weight: 500;
}

.ipo-details-table {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    margin-top: 60px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.detail-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-gray);
}

.detail-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-navy);
    text-align: right;
}

/* Country Stats */
.country-stats {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 32px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.country-card {
    background: white;
    padding: 24px 28px;
    border-radius: 12px;
    border-left: 4px solid var(--accent-gold);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.country-card:hover {
    border-left-color: var(--primary-navy);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.country-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary-navy);
}

.country-info {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-gray);
}

.stat-highlight {
    font-weight: 600;
    color: var(--primary-navy);
}

/* Target Pipeline */
.pipeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.target-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
    border-top: 4px solid var(--accent-gold);
}

.target-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.16);
    border-top-color: var(--primary-navy);
}

.target-header {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-gold);
    margin-bottom: 16px;
}

.target-subsector {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-navy);
}

.target-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.info-label {
    font-size: 14px;
    color: var(--text-gray);
    font-weight: 500;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-navy);
}

/* Highlights */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* For pages with 4 highlight cards - use 2x2 grid */
.highlights-grid:has(.highlight-card:nth-child(4)) {
    grid-template-columns: repeat(2, 1fr);
}

.highlight-card {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-navy) 100%);
    padding: 48px 40px;
    border-radius: 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

.highlight-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.highlight-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--accent-gold);
    margin-bottom: 16px;
    line-height: 1;
}

.highlight-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: white;
}

.highlight-card p {
    font-size: 16px;
    line-height: 1.7;
    opacity: 0.95;
}

/* Footer */
footer {
    background: var(--primary-navy);
    color: white;
    padding: 80px 48px 40px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--accent-gold);
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.7;
    opacity: 0.8;
    margin-bottom: 24px;
}

.footer-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--accent-gold);
}

.footer-section a {
    display: block;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    opacity: 0.7;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .themes-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .hero h1 {
        font-size: 56px;
    }

    .section h2 {
        font-size: 44px;
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .summary-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .themes-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    nav {
        padding: 0 24px;
    }

    nav ul {
        gap: 20px;
    }

    nav a {
        font-size: 13px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero .tagline {
        font-size: 24px;
    }

    .hero .subtitle {
        font-size: 18px;
    }

    .hero-stats {
        gap: 30px;
    }

    .hero-stat-value {
        font-size: 36px;
    }

    .section {
        padding: 80px 24px;
    }

    .section h2 {
        font-size: 36px;
    }

    .section-subtitle {
        font-size: 18px;
    }

    .cta-group {
        flex-direction: column;
        align-items: center;
    }

    .summary-grid,
    .summary-grid-3,
    .leadership-grid,
    .themes-container,
    .ipo-grid,
    .pipeline-grid,
    .highlights-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}
