/* ==========================================================================
   1. RESET & BASICS
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #111111;
    line-height: 1.5;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: opacity 0.2s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ==========================================================================
   2. HEADER
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #eee;
    z-index: 1000;
    height: 80px;
    display: flex; 
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo img { height: 45px; width: auto; display: block; }

.nav-links { display: flex; align-items: center; }
.nav-links a { font-size: 14px; font-weight: 500; color: #555555; margin-left: 30px; }
.nav-links a:hover { color: #009688; }

.nav-cta {
    background: #111111;
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 4px;
    transition: background 0.3s ease;
    margin-left: 30px;
}
.nav-cta:hover { background: #009688; }

/* ==========================================================================
   3. HERO SECTION
   ========================================================================== */
.hero { padding-top: 180px; padding-bottom: 100px; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.hero-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.hero-content { width: 48%; margin-bottom: 40px; }

/* Interactive Chart Container */
.hero-visual {
    width: 48%;
    height: 600px; 
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column; 
    overflow: hidden;
}

/* Tab Header */
.visual-header {
    width: 100%;
    height: 50px;
    padding: 0 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 24px;
    background: #fafafa;
    flex-shrink: 0;
}

/* Tab Buttons */
.tab-btn {
    background: none;
    border: none;
    padding: 0;
    height: 50px; 
    font-size: 0.85rem;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.tab-btn:hover { color: #333; }

.tab-btn.active {
    color: #009688;
}

/* The "Underline" for active tab */
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #009688;
}

/* Wrapper for Chart + Logo */
.chart-wrapper {
    flex-grow: 1; 
    width: 100%;
    position: relative; 
    padding: 30px; 
}

#chart-div {
    width: 100%;
    height: 100%;
    /* ADDED: Position and Z-Index to force it above the logo */
    position: relative;
    z-index: 10; 
}

.chart-center-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px; 
    height: auto;
    /* UPDATED: Lower z-index so it sits behind the chart */
    z-index: 1; 
    opacity: 0.9;
    pointer-events: none;
}

/* Toast Notification */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 12px 16px;
    position: absolute;
    z-index: 100;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
#toast.show { visibility: visible; opacity: 1; }

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
    color: #111111;
}

.text-highlight { color: #009688; }
.hero-sub { font-size: 1.2rem; color: #555555; margin-bottom: 32px; max-width: 95%; }

/* ==========================================================================
   4. METHODOLOGY
   ========================================================================== */
.methodology { background-color: #f9f9f9; padding: 100px 0; }
.section-header { margin-bottom: 60px; max-width: 700px; }
.section-header h2 { font-size: 2rem; margin-bottom: 16px; font-weight: 700; }
.section-header p { font-size: 1.1rem; color: #555555; }

.feature-grid { display: flex; flex-wrap: wrap; justify-content: space-between; }

.feature-card {
    width: 31%;
    margin-bottom: 30px;
    background: #ffffff;
    padding: 32px;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: transform 0.2s ease;
}
.feature-card:hover { transform: translateY(-5px); border-color: #009688; }
.feature-card h3 { margin: 16px 0 12px 0; font-size: 1.25rem; font-weight: 700; }
.feature-card p { font-size: 1rem; color: #555555; }

.icon {
    font-size: 24px;
    color: #009688;
    background: rgba(0, 150, 136, 0.1);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* ==========================================================================
   5. INSIGHTS / CASES
   ========================================================================== */
.cases { padding: 100px 0; }

.case-grid { 
    display: flex; 
    flex-wrap: wrap; 
}

.case-card {
    width: 31%; 
    margin-right: 3.5%; 
    margin-bottom: 30px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: transform 0.2s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.case-card:nth-child(3n) { margin-right: 0; }
.case-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05); }

.case-img {
    height: 220px;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.case-content { padding: 24px; flex-grow: 1; display: flex; flex-direction: column; }

.meta-row {
    display: flex;
    /* justify-content: space-between; Removed to reduce eye travel */
    justify-content: flex-start; /* Groups items on the left */
    gap: 12px; /* Adds space between badge and tag */
    align-items: center;
    margin-bottom: 12px;
}

.tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: #009688;
}

/* Taxonomy Badge Styles */
.taxonomy-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #f0f0f0;
    color: #666;
    font-weight: 600;
    cursor: help; /* Indicates interactivity */
    position: relative;
}
.taxonomy-badge.gen-z { background-color: #e0f2f1; color: #00695c; }
.taxonomy-badge.toy-block { background-color: #fff3e0; color: #e65100; }

/* Tooltip Styles */
.taxonomy-badge[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 110%; /* Shows above the badge */
    left: 0;
    background: #333;
    color: #fff;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.case-card h3 { font-size: 1.3rem; margin-bottom: 8px; font-weight: 700; }
.case-card p { font-size: 0.95rem; color: #555555; margin-bottom: 24px; }

.download-link {
    margin-top: auto; 
    font-size: 0.9rem;
    font-weight: 600;
    color: #009688;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.download-link:hover { color: #00695c; text-decoration: underline; }

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
footer { background: #111111; color: #ffffff; padding: 80px 0; text-align: center; }
.footer-logo { margin-bottom: 24px; opacity: 0.9; }
.footer-logo img { height: 40px; width: auto; margin: 0 auto; filter: brightness(0) invert(1); }
.footer-links a { color: #999999; margin: 0 15px; font-size: 0.9rem; }
.footer-links a:hover { color: #ffffff; }
.copyright { margin-top: 40px; font-size: 0.8rem; color: #555555; }

/* ==========================================================================
   7. RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .hero { padding-top: 120px; text-align: center; }
    .hero-grid { flex-direction: column; }
    .hero-content { width: 100%; }
    .hero-visual { width: 100%; height: 400px; }
    .feature-card, .case-card { width: 100%; margin-right: 0; }
    .nav-links { display: none; }
    h1 { font-size: 2.5rem; }
}