/* Jambvant Theme and Base Styles */

:root {
    --primary-purple: #FF8C00;
    --primary-purple-dark: #E07B00;
    --primary-purple-light: #FFB347;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --bg-light: #FFF5E1; /* cream background used across hero and panels for consistent pattern */
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --bronze: #8B5A3C;
    --silver: #A8A9A9;
    --gold: #FFD700;
    --platinum: #B997EC;
    --emerald: #50C878;
    --diamond: #1E90FF;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --card-bg: var(--bg-white);
}

/* Dark Theme */
[data-theme="dark"] {
    --primary-purple: #FFB347;
    --primary-purple-dark: #FF8C00;
    --primary-purple-light: #FFC875;
    --text-dark: #e8e8e8;
    --text-gray: #b0b0b0;
    --bg-light: #1e1e1e;
    --bg-white: #121212;
    --border-color: #333333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    /* card background should be slightly lighter than page background in dark mode */
    --card-bg: #1b1b1b;
}

[data-theme="dark"] body {
    background-color: var(--bg-white);
    color: var(--text-dark);
}

[data-theme="dark"] .hero {
    background: #1a1a1a;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 20px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.language-selector {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background-color: var(--bg-light);
    border: 1px solid var(--primary-purple);
    border-radius: 4px;
    color: var(--text-dark);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-btn:hover {
    background-color: rgba(255, 140, 0, 0.1);
}

.language-flag {
    font-size: 14px;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: var(--bg-white);
    border: 1px solid var(--primary-purple);
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    z-index: 3000; /* Ensure above header/modal */
    display: none;
}

.language-dropdown.active {
    display: block;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.language-option:hover {
    background-color: var(--bg-light);
}

.language-option.selected {
    background-color: rgba(255, 140, 0, 0.1);
    color: var(--primary-purple);
}

/* Theme Toggle */
.theme-toggle {
    padding: 4px 8px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
}

.theme-toggle:hover {
    background-color: rgba(255, 140, 0, 0.1);
    border-color: var(--primary-purple);
}

.theme-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(20deg);
}

.logo {
    font-size: 26.4px;
    font-weight: 700;
    color: var(--primary-purple);
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-purple);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: var(--primary-purple-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background-color: var(--primary-purple);
    color: var(--bg-white);
}

/* Hero Section */
.hero {
    margin-top: 80px;
    padding: 80px 0;
    background: var(--bg-light);
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 8px 20px;
    background-color: rgba(255, 140, 0, 0.1);
    color: var(--primary-purple);
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.hero .highlight {
    color: var(--primary-purple);
}

.hero p {
    font-size: 18px;
    color: var(--text-gray);
    max-width: 700px;
    margin: 24px auto 40px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Section */
.features {
    padding: 100px 0;
    background-color: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.section-header p {
    font-size: 18px;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-card {
    background-color: var(--bg-white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-icon-container {
    width: 64px;
    height: 64px;
    background-color: rgba(255, 140, 0, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon-container {
    transform: scale(1.05);
    background-color: rgba(255, 140, 0, 0.12);
}

.feature-icon-svg {
    width: 40px;
    height: 40px;
}

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

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

/* Recognition Section */
.recognition {
    padding: 100px 0;
    background: #FFF5E1;
}

/* Make Recognition headings/subtitle darker for better readability */
#recognition-title {
    color: var(--text-dark);
}

#recognition-desc {
    color: var(--text-dark);
}

/* Hide static leaderboard fallback when JS is enabled */
.js-enabled #leaderboard-fallback {
    display: none;
}

.recognition-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.recognition-logo svg {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 2px 4px rgba(107, 91, 255, 0.2));
    transition: transform 0.3s ease;
}

.recognition-logo svg:hover {
    transform: scale(1.05);
}

.recognition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.tier-card {
    background-color: var(--card-bg);
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.tier-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.tier-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.tier-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.tier-bronze .tier-icon {
    background: radial-gradient(circle at 30% 30%, #CD7F32, #8B5A3C);
}

.tier-silver .tier-icon {
    background: radial-gradient(circle at 30% 30%, #D3D3D3, #A8A9A9);
}

.tier-gold .tier-icon {
    background: radial-gradient(circle at 30% 30%, #FFD700, #FFC700);
}

.tier-platinum .tier-icon {
    background: radial-gradient(circle at 30% 30%, #E6CCFF, #B997EC);
}

.tier-emerald .tier-icon {
    background: radial-gradient(circle at 30% 30%, #7FD8BE, #50C878);
}

.tier-diamond .tier-icon {
    background: radial-gradient(circle at 30% 30%, #00BFFF, #1E90FF);
}

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

.tier-card p {
    font-size: 16px;
    color: var(--text-gray);
}

/* Security Section */
.security {
    padding: 100px 0;
    background-color: var(--bg-white);
}

.security-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.security-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.security-icon {
    font-size: 80px;
    margin-bottom: 24px;
}

.security h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.security p {
    font-size: 18px;
    color: var(--text-gray);
    line-height: 1.8;
}

/* Footer CTA */
.footer-cta {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
    text-align: center;
    color: var(--bg-white);
}

.footer-cta h2 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
}

.footer-cta p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
}

.footer-cta .btn {
    background-color: var(--bg-white);
    color: var(--primary-purple);
    font-size: 18px;
    padding: 16px 40px;
}

.footer-cta .btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-4px);
}

/* Leaderboard Styles */
.leaderboard-section {
    margin-top: 60px;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 32px;
}

.leaderboard-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.leaderboard-header p {
    font-size: 14px;
    color: var(--text-dark); /* darker subtitle text */
}

/* Force strong readable colors for headings on light cream sections regardless of theme */
#leaderboard-title,
#leaderboard-subtitle,
#recognition-title,
#recognition-desc {
    color: #1a1a1a !important;
}

.leaderboard-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 18px;
    overflow: hidden;
}

.leaderboard-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 22px;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 40px 1fr 100px 80px;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background-color: var(--bg-light);
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-20px);
}

.leaderboard-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.leaderboard-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.leaderboard-rank {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-purple);
    text-align: center;
}

.leaderboard-rank.top-3 {
    font-size: 15px;
}

.leaderboard-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

.leaderboard-name a {
    color: var(--primary-purple);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.leaderboard-name a:hover {
    color: var(--primary-purple-dark);
    text-decoration: underline;
}

.leaderboard-helps {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-gray);
    text-align: right;
}

.leaderboard-helps span {
    font-weight: 700;
    color: var(--text-dark);
}

.leaderboard-tier {
    display: flex;
    align-items: center;
    justify-content: center;
}

.leaderboard-tier-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.leaderboard-tier-badge.bronze {
    background: radial-gradient(circle at 30% 30%, #CD7F32, #8B5A3C);
}

.leaderboard-tier-badge.silver {
    background: radial-gradient(circle at 30% 30%, #D3D3D3, #A8A9A9);
}

.leaderboard-tier-badge.gold {
    background: radial-gradient(circle at 30% 30%, #FFD700, #FFC700);
}

.leaderboard-tier-badge.platinum {
    background: radial-gradient(circle at 30% 30%, #E6CCFF, #B997EC);
}

.leaderboard-tier-badge.emerald {
    background: radial-gradient(circle at 30% 30%, #7FD8BE, #50C878);
}

.leaderboard-tier-badge.diamond {
    background: radial-gradient(circle at 30% 30%, #00BFFF, #1E90FF);
}

/* Animation delays for staggered effect */
.feature-card:nth-child(1) { transition-delay: 0.1s; }
.feature-card:nth-child(2) { transition-delay: 0.2s; }
.feature-card:nth-child(3) { transition-delay: 0.3s; }

.tier-card:nth-child(1) { transition-delay: 0.1s; }
.tier-card:nth-child(2) { transition-delay: 0.2s; }
.tier-card:nth-child(3) { transition-delay: 0.3s; }
.tier-card:nth-child(4) { transition-delay: 0.4s; }
.tier-card:nth-child(5) { transition-delay: 0.5s; }
.tier-card:nth-child(6) { transition-delay: 0.6s; }

.leaderboard-item:nth-child(1) { transition-delay: 0.05s; }
.leaderboard-item:nth-child(2) { transition-delay: 0.1s; }
.leaderboard-item:nth-child(3) { transition-delay: 0.15s; }
.leaderboard-item:nth-child(4) { transition-delay: 0.2s; }
.leaderboard-item:nth-child(5) { transition-delay: 0.25s; }
.leaderboard-item:nth-child(6) { transition-delay: 0.3s; }
.leaderboard-item:nth-child(7) { transition-delay: 0.35s; }
.leaderboard-item:nth-child(8) { transition-delay: 0.4s; }
.leaderboard-item:nth-child(9) { transition-delay: 0.45s; }
.leaderboard-item:nth-child(10) { transition-delay: 0.5s; }

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .badge {
        font-size: 16px;
    }

    .section-header h2 {
        font-size: 32px;
    }

    .features {
        padding: 60px 0;
    }

    .recognition {
        padding: 60px 0;
    }

    .security {
        padding: 60px 0;
    }

    .footer-cta {
        padding: 60px 0;
    }

    .footer-cta h2 {
        font-size: 32px;
    }

    .footer-cta p {
        font-size: 16px;
    }

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

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

    .leaderboard-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .leaderboard-header h2 {
        font-size: 28px;
    }

    .leaderboard-card {
        padding: 20px;
    }

    .leaderboard-item {
        grid-template-columns: 40px 1fr 100px 60px;
        gap: 12px;
        padding: 12px;
    }

    .leaderboard-rank {
        font-size: 20px;
    }

    .leaderboard-rank.top-3 {
        font-size: 24px;
    }

    .leaderboard-name {
        font-size: 16px;
    }

    .leaderboard-helps {
        font-size: 14px;
    }

    .leaderboard-tier-badge {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 0;
    }

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

    .badge {
        font-size: 14px;
    }

    .logo {
        font-size: 20px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .leaderboard-section {
        margin-top: 40px;
    }

    .leaderboard-item {
        grid-template-columns: 35px 1fr 80px 50px;
        gap: 8px;
        padding: 10px;
    }

    .leaderboard-rank {
        font-size: 18px;
    }

    .leaderboard-rank.top-3 {
        font-size: 20px;
    }

    .leaderboard-name {
        font-size: 14px;
    }

    .leaderboard-helps {
        font-size: 12px;
    }

    .leaderboard-tier-badge {
        width: 36px;
        height: 36px;
    }
}

/* Help Intent list styling */
.help-intent-list {
    margin: 0;
    padding-left: 20px;
    list-style: disc;
}
.help-intent-list li {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.help-intent-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
}
.help-intent-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.help-intent-status {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 8px;
}
.help-intent-status.status-active {
    background: #eef2ff;
    color: #0b3bff;
}
.help-intent-status.status-resolved {
    background: #e6ffed;
    color: #0a7a3d;
}
.help-intent-status.status-cancelled {
    background: #fff1f0;
    color: #a40b0b;
}

/* Actions dropdown (summary) styling and accessibility focus */
.help-intent-actions summary {
    cursor: pointer;
    padding: 2px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    list-style: none; /* reset default triangle */
}
.help-intent-actions summary::-webkit-details-marker { display:none; }
.help-intent-actions summary:focus,
.help-intent-actions summary:focus-visible {
    outline: 3px solid rgba(255,140,0,0.18);
    outline-offset: 4px;
}
.help-intent-actions .help-intent-actions-body {
    margin-top: 6px;
}
.help-intent-action-btn {
    margin-right: 8px;
}


