@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
    /* Background - lighter, more sophisticated */
    --bg: #0a0e1a;
    --surface: #11151f;
    --card-bg: rgba(20, 26, 38, 0.85);

    /* Accent - more vibrant blue for data focus */
    --accent: #4f9eff;
    --accent-hover: #6bb3ff;
    --accent-glow: rgba(79, 158, 255, 0.25);

    /* Semantic colors for data visualization */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;

    /* Typography */
    --fg: #f1f5f9;
    --fg-dim: #94a3b8;
    --fg-muted: #64748b;

    /* Borders and shadows */
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);

    /* Fonts */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg);
    background-image:
        radial-gradient(at 0% 0%, rgba(79, 158, 255, 0.04) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.04) 0px, transparent 50%);
    color: var(--fg);
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: #fff;
    letter-spacing: -0.03em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
    color: var(--accent-hover);
}

/* Header & Navigation */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}

nav,
.main-nav {
    display: flex;
    gap: 2rem;
}

nav a,
.main-nav a {
    font-weight: 500;
    color: var(--fg-dim);
    font-size: 0.95rem;
}

nav a:hover,
nav a.active,
.main-nav a:hover,
.main-nav a.active {
    color: #fff;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 6rem 2rem 4rem;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(79, 158, 255, 0.1);
    border: 1px solid rgba(79, 158, 255, 0.3);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.badge-icon {
    font-size: 1rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #fff;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent) 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--fg-dim);
    max-width: 700px;
    margin: 0 auto 3rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.hero-stats .stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fg-muted);
}

/* Audience Section */
.audience-section {
    padding: 4rem 2rem;
    margin: 3rem 0;
}

.audience-section h2 {
    text-align: center;
    font-size: 1.875rem;
    margin-bottom: 3rem;
}

.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.audience-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.audience-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 32px rgba(79, 158, 255, 0.15);
}

.audience-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.audience-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #fff;
}

.audience-card p {
    color: var(--fg-dim);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Cards & Boxes */
.box {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin: 2rem 0;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

.box-header {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.box-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

/* Market Grid */
.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.market-card {
    transition: transform 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    overflow: hidden;
    padding: 1.5rem;
}

.market-card-link {
    text-decoration: none;
    color: inherit;
}

.market-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 10px 40px -10px var(--accent-glow);
}

/* Badges */
.badge {
    background: var(--accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--fg-dim);
}

.data-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: rgba(79, 158, 255, 0.1);
    border: 1px solid rgba(79, 158, 255, 0.2);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    font-family: var(--font-mono);
}

/* Buttons */
.btn-primary {
    background: var(--accent);
    color: #fff;
    padding: 0.875rem 1.75rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 158, 255, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--fg);
    padding: 0.875rem 1.75rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-strong);
}

.btn-premium {
    background: linear-gradient(135deg, var(--accent) 0%, #2563eb 100%);
    color: #fff;
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    font-weight: 700;
    font-family: var(--font-heading);
    display: inline-block;
    box-shadow: 0 4px 20px 0 var(--accent-glow);
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.btn-premium:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

/* Breadcrumbs - SEO-friendly with schema.org */
.breadcrumb {
    font-size: 0.875rem;
    color: var(--fg-dim);
    margin-bottom: 2rem;
}

.breadcrumb ol {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: "/";
    margin-left: 0.5rem;
    color: var(--glass-border);
}

.breadcrumb li:last-child span {
    color: #fff;
    font-weight: 600;
}

.breadcrumb a {
    color: var(--fg-dim);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb-separator {
    color: var(--glass-border);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 2px solid var(--border-strong);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--fg-dim);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--fg);
}

tbody tr {
    transition: background 0.2s;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Meta Text */
.meta {
    color: var(--fg-dim);
    font-size: 0.9rem;
}

/* Market Analysis Specifics */
.snapshot-header {
    margin-bottom: 3rem;
}

.market-snapshot {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-val {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--accent);
    display: block;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.analysis-body h2 {
    font-size: 1.35rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: #fff;
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
}

.analysis-body h3 {
    font-size: 1.15rem;
    margin-top: 2rem;
    color: var(--accent);
}

.analysis-body p {
    color: var(--fg-dim);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.analysis-body ul {
    color: var(--fg-dim);
    line-height: 1.8;
    padding-left: 1.2rem;
}

.analysis-body ul li {
    margin-bottom: 0.5rem;
}

.analysis-body strong {
    color: #fff;
    font-weight: 600;
}

/* Signal Grid */
.signal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.signal-item {
    border-left: 4px solid var(--accent);
    position: relative;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.signal-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.signal-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.inactive-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.inactive-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--fg-dim);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
}

/* Risk Levels */
.risk-level-high {
    border-left-color: var(--danger);
}

.risk-level-medium {
    border-left-color: var(--warning);
}

.risk-level-low {
    border-left-color: var(--success);
}

/* Footer */
footer {
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--fg-dim);
    font-size: 0.85rem;
}

.footer-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.footer-links a {
    color: var(--fg-dim);
}

.footer-links a:hover {
    color: var(--accent);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 1rem;
        max-width: 100%;
    }

    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    nav,
    .main-nav {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .hero-section {
        padding: 3rem 1rem 2rem;
    }

    .box {
        padding: 1.5rem;
    }

    .box-content h1 {
        font-size: 1.8rem;
    }

    .signal-grid {
        grid-template-columns: 1fr;
    }

    .audience-grid {
        grid-template-columns: 1fr;
    }

    .market-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

    .report-header-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .methodology-grid {
        grid-template-columns: 1fr;
    }

    .methodology-grid > div:last-child {
        border-left: none;
        padding-left: 0;
        padding-top: 1.5rem;
        border-top: 1px solid var(--border);
    }
}

/* ========================================
   HAMBURGER MENU
   ======================================== */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--fg);
    position: relative;
    transition: background 0.3s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--fg);
    left: 0;
    transition: transform 0.3s;
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    top: 7px;
}

/* Анимация X при открытом меню */
.menu-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.menu-toggle[aria-expanded="true"] .hamburger::before {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle[aria-expanded="true"] .hamburger::after {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   REPORT PAGE STYLES
   ======================================== */
.report-header-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    color: var(--fg-dim);
    font-size: 0.9rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-value-large {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
}

.stat-value-large.accent {
    color: var(--accent);
}

.methodology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    font-size: 0.9rem;
    color: var(--fg-dim);
}

.json-container {
    position: relative;
    max-width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.json-block {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 400px;
    font-size: 0.7rem;
    white-space: pre;
    background: rgba(0, 0, 0, 0.4);
    padding: 1rem;
    margin: 0;
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
}

.breadcrumb-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--fg-dim);
}

.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ========================================
   MOBILE BREAKPOINT (480px)
   ======================================== */
@media (max-width: 480px) {
    .menu-toggle {
        display: block;
        z-index: 1001;
    }

    .main-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 75%;
        max-width: 280px;
        height: 100vh;
        background: var(--surface);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 1.5rem;
        z-index: 1000;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .main-nav.is-open {
        transform: translateX(0);
    }

    .main-nav a {
        font-size: 1.1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-value-large {
        font-size: 1.75rem;
    }

    .logo {
        font-size: 1rem;
    }
}