/* 
 * TAS - Tifoseria Ayrton Senna
 * BRAND SYSTEM (Yellow Dominance)
 */

@font-face { font-family: 'Barlow'; src: url('../fonts/barlow/Barlow-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('../fonts/barlow/Barlow-Medium.ttf') format('truetype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('../fonts/barlow/Barlow-SemiBold.ttf') format('truetype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('../fonts/barlow/Barlow-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('../fonts/barlow/Barlow-ExtraBold.ttf') format('truetype'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('../fonts/barlow/Barlow-Black.ttf') format('truetype'); font-weight: 900; font-style: normal; font-display: swap; }

:root {
    --bg-main: #f4ecdf; /* Beige / Analog */
    --bg-off: #eae0cf; /* Beige Scuro */
    
    --text-main: #0f172a; /* Night Blue / Black */
    --text-muted: #475569;
    
    --brand-yellow: #f9c800; /* Brazil Yellow (DOMINANT) */
    --brand-green: #19d658; /* Brazil Green (DETAIL) */
    --brand-blue: #002776; /* Brazil Blue */
    --brand-night: #0f172a; /* Navy Dark */
    
    --font-heading: 'Barlow', sans-serif;
    --font-body: 'Barlow', sans-serif;
    
    --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 1. RESET & BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; }
body {
    font-family: var(--font-body) !important;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color var(--transition); }

h1, h2, h3, h4, h5, h6 { 
    font-family: var(--font-heading) !important; 
    font-weight: 900; 
    text-transform: uppercase; 
    line-height: 1.1; 
    margin-bottom: 1.5rem; 
    letter-spacing: -0.02em;
}
p { font-size: 1.15rem; margin-bottom: 1.5rem; font-weight: 500; color: var(--text-muted); }
.lead { font-size: 1.4rem; color: var(--brand-night); font-weight: 600; line-height: 1.6; }

.text-accent { color: var(--brand-yellow); }
.text-center { text-align: center; }

/* Dropcap for Magazine Style */
.dropcap::first-letter {
    font-family: var(--font-heading) !important;
    font-size: 5rem;
    font-weight: 900;
    color: var(--brand-yellow);
    float: left;
    margin-right: 15px;
    margin-top: -10px;
    line-height: 1;
    text-transform: uppercase;
}

/* 2. LAYOUT */
.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; position: relative; }
@media (min-width: 900px) { .section { padding: 8rem 0; } }

.section-dark { background-color: var(--brand-night); color: #FFF; }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark p { color: #FFF; }
.section-off { background-color: var(--bg-off); }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; gap: 4rem; } }

.grid-3 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }

.grid-4 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 600px) { .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 2rem; } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* Responsive Utility Classes */
.py-hero { padding: 9rem 0 4rem; text-align: center; }
@media (min-width: 900px) { .py-hero { padding: 12rem 0 6rem; } }

.py-section { padding: 4rem 0; }
@media (min-width: 900px) { .py-section { padding: 8rem 0; } }

.flex-col-mobile { display: flex; flex-direction: column; gap: 2rem; }
@media (min-width: 900px) { .flex-col-mobile { flex-direction: row; } }


/* 3. BUTTONS */
.btn {
    display: inline-flex; justify-content: center; align-items: center;
    padding: 16px 36px; font-family: var(--font-heading) !important; font-size: 1.1rem; font-weight: 900;
    text-transform: uppercase; letter-spacing: 0.1em;
    cursor: pointer; border: none; border-radius: 4px;
    transition: all var(--transition);
}
.btn-primary { background: var(--brand-yellow); color: var(--brand-night); border: 2px solid var(--brand-yellow); }
.btn-primary:hover { background: var(--brand-night); color: var(--brand-yellow); border-color: var(--brand-night); }

.btn-secondary { background: transparent; color: var(--brand-night); border: 2px solid var(--brand-night); }
.btn-secondary:hover { background: var(--brand-yellow); color: var(--brand-night); border-color: var(--brand-yellow); }

/* 4. HEADER & NAV (Glassmorphism & Large Logo) */
.site-header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    padding: 1.5rem 0; transition: padding var(--transition), background var(--transition);
    background: transparent;
}
.site-header.scrolled { 
    padding: 10px 0; 
    background: rgba(15, 23, 42, 0.98);
    border-bottom: 3px solid var(--brand-yellow);
}
@media (min-width: 993px) {
    .site-header.scrolled {
        backdrop-filter: blur(12px); 
        -webkit-backdrop-filter: blur(12px);
        background: rgba(15, 23, 42, 0.9);
    }
}

.header-container { display: flex; justify-content: space-between; align-items: center; }
.site-logo img { height: 120px; transition: height var(--transition), transform var(--transition); filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.5)); }
.site-header.scrolled .site-logo img { height: 75px; }
.site-logo:hover img { transform: scale(1.05); }

.main-nav { display: flex; gap: 2.5rem; align-items: center; }
.nav-link { 
    font-family: var(--font-heading) !important; font-weight: 800; font-size: 1.1rem; 
    text-transform: uppercase; letter-spacing: 0.05em; 
    color: #FFF; position: relative; padding: 0.5rem 0; 
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
.site-header.scrolled .nav-link { text-shadow: none; color: #FFF; }
.nav-link:hover, .nav-link.active { color: var(--brand-yellow); }

.hamburger { display: none; background: transparent; border: none; font-size: 2rem; color: #FFF; cursor: pointer; text-shadow: 0 2px 4px rgba(0,0,0,0.8); -webkit-appearance: none; appearance: none; padding: 5px; }

@media (max-width: 992px) {
    .site-logo img { height: 75px; }
    .site-header.scrolled .site-logo img { height: 60px; }
    
    .hamburger { display: flex; align-items: center; justify-content: center; position: relative; z-index: 9999; flex-shrink: 0; padding: 15px; margin-right: -10px; width: 50px; height: 50px; }
    .main-nav {
        position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
        background: rgba(15, 23, 42, 0.98); flex-direction: column; justify-content: center;
        transition: opacity 0.3s ease, visibility 0.3s ease; z-index: 999;
        opacity: 0; visibility: hidden; pointer-events: none;
    }
    .main-nav.open { opacity: 1; visibility: visible; pointer-events: auto; }
    .main-nav .nav-link { font-size: 2rem; margin-bottom: 1rem; text-shadow: none; }
    
    .order-mobile-first { order: -1 !important; }
    .order-mobile-last { order: 99 !important; }
}

/* 5. HERO SLIDER */
.hero-slider {
    position: relative; height: 100vh; width: 100%; overflow: hidden; background: var(--brand-night);
}
.hero-slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; transition: opacity 1s ease-in-out;
    display: flex; align-items: flex-end; padding-bottom: 8rem;
}
.hero-slide.active { opacity: 1; z-index: 2; }
.hero-slide-bg {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    z-index: 1;
}
.hero-overlay {
    position: absolute; inset: 0; 
    background: linear-gradient(0deg, rgba(15,23,42,0.95) 0%, rgba(15,23,42,0.2) 60%); 
    z-index: 2;
}
.hero-content {
    position: relative; z-index: 3; color: #FFF; width: 100%; text-align: left;
}
.hero-quote {
    font-size: clamp(2rem, 5vw, 4.5rem); 
    font-weight: 900; line-height: 1.1; 
    color: #FFF; margin-bottom: 1rem;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
    max-width: 1000px;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}
.slider-controls {
    position: absolute; bottom: 3rem; left: 50%; transform: translateX(-50%);
    z-index: 10; display: flex; gap: 1rem;
}
.slider-dot {
    width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,0.4);
    cursor: pointer; transition: background 0.3s;
}
.slider-dot.active { background: var(--brand-yellow); }

/* 6. CARDS */
.card { background: #FFF; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: transform var(--transition); display: flex; flex-direction: column; border-bottom: 4px solid var(--brand-yellow); }
.card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.1); }
.card-img-wrapper { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease; }
.card:hover .card-img { transform: scale(1.05); }
.card-body { padding: 2rem; flex-grow: 1; display: flex; flex-direction: column; }
.card-title { font-size: 1.6rem; color: var(--brand-night); margin-bottom: 0.5rem; }
.card-footer { margin-top: auto; padding-top: 1.5rem; border-top: 1px solid rgba(0,0,0,0.05); font-weight: 900; color: var(--brand-yellow); text-transform: uppercase; letter-spacing: 0.1em; }

.date-badge { position: absolute; top: 1rem; left: 1rem; background: var(--brand-yellow); color: var(--brand-night); padding: 10px 15px; text-align: center; border-radius: 4px; font-family: var(--font-heading) !important; font-weight: 900; z-index: 2; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.date-badge .day { display: block; font-size: 1.6rem; line-height: 1; }
.date-badge .month { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

/* 7. GALLERY MASONRY */
.masonry-grid { column-count: 1; column-gap: 1.5rem; width: 100%; }
@media (min-width: 600px) { .masonry-grid { column-count: 2; } }
@media (min-width: 900px) { .masonry-grid { column-count: 3; } }
@media (min-width: 1400px) { .masonry-grid { column-count: 4; } }
.masonry-item { break-inside: avoid; margin-bottom: 1.5rem; position: relative; overflow: hidden; cursor: zoom-in; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.masonry-item img { display: block; width: 100%; height: auto; transition: transform 0.8s ease; }
.masonry-item:hover img { transform: scale(1.03); }

/* 8. LIGHTBOX */
.lightbox { 
    position: fixed; inset: 0; width: 100vw; height: 100vh; 
    background: rgba(15,23,42,0.95); z-index: 100000; 
    display: flex; justify-content: center; align-items: center; 
    padding: 2rem; opacity: 0; pointer-events: none; visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease; 
    backdrop-filter: blur(10px);
}
.lightbox.active { opacity: 1; pointer-events: all; visibility: visible; }
.lightbox-img { max-width: 90vw; max-height: 90vh; object-fit: contain; box-shadow: 0 20px 50px rgba(0,0,0,0.5); border: 4px solid var(--brand-yellow); }
.lightbox-close { position: absolute; top: 1.5rem; right: 2rem; color: #FFF; font-size: 3rem; cursor: pointer; transition: color var(--transition); font-weight: 700; }
.lightbox-close:hover { color: var(--brand-yellow); }

/* 9. FORMS */
.form-group { margin-bottom: 1.5rem; text-align: left; }
.form-label { display: block; font-family:var(--font-heading) !important; font-weight: 800; text-transform: uppercase; margin-bottom: 0.5rem; color: var(--brand-night); font-size: 0.95rem; }
.form-control { 
    width: 100%; padding: 16px; border: 2px solid rgba(0,0,0,0.1); 
    background: #FFF; font-family: var(--font-body) !important; font-size: 1.1rem; color: var(--text-main);
    border-radius: 4px; transition: border-color var(--transition); 
}
.form-control:focus { outline: none; border-color: var(--brand-night); border-bottom-color: var(--brand-yellow); }

/* 10. FOOTER FIX */
.site-footer { background: var(--brand-night); color: rgba(255,255,255,0.7); padding: 5rem 0 2rem; border-top: 5px solid var(--brand-yellow); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; margin-bottom: 3rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-logo { max-width: 280px; height: auto; margin-bottom: 1.5rem; filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.5)); }
.site-footer h4 { color: var(--brand-yellow); font-size: 1.2rem; margin-bottom: 1.5rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.8rem; }
.footer-links a { color: rgba(255,255,255,0.8); font-weight: 600; }
.footer-links a:hover { color: var(--brand-yellow); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; font-size: 0.9rem; }

/* 11. COOKIE BANNER (WALL) */
.cookie-banner {
    position: fixed; inset: 0; display: none; justify-content: center; align-items: center;
    background: rgba(15, 23, 42, 0.95); z-index: 999999; backdrop-filter: blur(10px);
    opacity: 0; transition: opacity 0.5s ease;
}
.cookie-banner.show { display: flex; opacity: 1; }
.cookie-banner-content {
    background: #fff; color: var(--text-main); padding: 3rem; max-width: 500px; width: 90%;
    border-radius: 12px; border-bottom: 5px solid var(--brand-yellow); text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3); transform: translateY(20px); transition: transform 0.5s ease;
}
.cookie-banner.show .cookie-banner-content { transform: translateY(0); }

/* 12. ANIMATIONS */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* 13. BENTO GRID (UI/UX Pro Max) */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: minmax(300px, auto);
    }
}
.bento-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}
.bento-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
.bento-item.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
}
@media (min-width: 900px) {
    .bento-item.featured {
        grid-template-columns: 3fr 2fr;
    }
}
.bento-img-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.bento-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.bento-item:hover .bento-img {
    transform: scale(1.05);
}
.bento-content {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--brand-night);
    color: #fff;
}
.bento-item.featured .bento-content {
    border-left: 5px solid var(--brand-yellow);
}
.bento-item:not(.featured) .bento-content {
    background: #fff;
    color: var(--brand-night);
    padding: 2rem;
    border-top: 4px solid var(--brand-yellow);
    flex: 1;
}
.bento-date {
    display: inline-block;
    padding: 8px 16px;
    background: var(--brand-yellow);
    color: var(--brand-night);
    font-family: var(--font-heading) !important;
    font-weight: 900;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    align-self: flex-start;
}

/* 14. MODERN STATS DASHBOARD */
.stats-wrapper {
    background: var(--brand-night);
    padding: 2px;
    border-radius: 18px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, rgba(249, 200, 0, 0.4), var(--brand-night) 30%);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    overflow: hidden;
}
@media (min-width: 900px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-box {
    background: var(--brand-night);
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background 0.5s ease;
}
.stat-box:hover {
    background: var(--brand-yellow);
}
.stat-box:hover .stat-number, .stat-box:hover .stat-label {
    color: var(--brand-night);
    transform: scale(1.05);
}
.stat-number {
    font-size: clamp(3.5rem, 5vw, 5.5rem);
    font-family: var(--font-heading) !important;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.05em;
    color: #fff;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.stat-box:hover .stat-number {
    text-shadow: none;
}
.stat-label {
    font-family: var(--font-heading) !important;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--brand-yellow);
    letter-spacing: 0.15em;
    font-size: 1rem;
    text-align: center;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s;
}
