/* ===== Design System — Light Professional Theme ===== */
/* Inspired by Vercel/Stripe: clean, readable, professional */
/* Astigmatism-friendly: no pure white bg, no pure black text, soft contrast */
:root {
    /* Light mode — gentle on eyes */
    --bg-primary: #fafafa;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #efefef;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f8f8;
    --bg-elevated: #ffffff;
    --bg-subtle: #f0f0f0;
    --bg-nav: rgba(250, 250, 250, 0.85);

    --border-primary: rgba(0, 0, 0, 0.06);
    --border-secondary: rgba(0, 0, 0, 0.1);
    --border-accent: rgba(0, 0, 0, 0.14);

    /* Text — not pure black, softer on eyes */
    --text-primary: #171717;
    --text-secondary: #525252;
    --text-tertiary: #737373;
    --text-muted: #a3a3a3;

    /* Brand colors — slightly desaturated for light bg */
    --accent-blue: #2563eb;
    --accent-purple: #7c3aed;
    --accent-cyan: #0891b2;
    --accent-green: #059669;
    --accent-yellow: #d97706;
    --accent-red: #dc2626;
    --accent-gold: #d97706;
    --accent-silver: #6b7280;
    --accent-bronze: #b45309;

    --gradient-primary: linear-gradient(135deg, #2563eb, #7c3aed);
    --glow-blue: 0 4px 24px rgba(37, 99, 235, 0.08);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --nav-height: 60px;
    --ticker-height: 32px;
    --container-max: 1180px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-sans); background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }
.hide-mobile { display: inline; }

/* ===== Ticker ===== */
.ticker-bar {
    height: var(--ticker-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    overflow: hidden;
}
.ticker-content {
    display: flex; align-items: center; height: 100%; white-space: nowrap;
    animation: ticker-scroll 30s linear infinite; gap: 24px; padding: 0 16px;
}
.ticker-item { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); letter-spacing: 0.5px; text-transform: uppercase; flex-shrink: 0; }
.ticker-item strong { color: var(--text-tertiary); }
.ticker-divider { color: var(--border-secondary); font-size: 10px; flex-shrink: 0; }
.ticker-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.ticker-dot.live { background: var(--accent-green); box-shadow: 0 0 6px rgba(5, 150, 105, 0.5); animation: pulse-dot 2s ease-in-out infinite; }
@keyframes ticker-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ===== Nav ===== */
.nav {
    position: sticky; top: 0; z-index: 99; height: var(--nav-height);
    background: var(--bg-nav);
    backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-primary);
}
.nav-inner { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; height: 100%; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { display: flex; align-items: center; }
.logo-text { font-size: 17px; font-weight: 700; letter-spacing: -0.5px; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.nav-links { display: flex; gap: 32px; }
.nav-link { font-size: 14px; font-weight: 500; color: var(--text-tertiary); transition: color 0.2s; }
.nav-link:hover { color: var(--text-primary); }
.nav-link::after { content: ''; display: block; width: 0; height: 2px; background: var(--gradient-primary); transition: width 0.2s; margin-top: 2px; border-radius: 1px; }
.nav-link:hover::after { width: 100%; }
.nav-actions { display: flex; gap: 8px; }

.mobile-menu-btn { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.mobile-menu-btn span { display: block; width: 18px; height: 1.5px; background: var(--text-tertiary); }
.mobile-menu { display: none; position: fixed; top: calc(var(--nav-height) + var(--ticker-height)); left: 0; right: 0; background: var(--bg-card); border-bottom: 1px solid var(--border-primary); padding: 20px 24px; z-index: 98; flex-direction: column; gap: 8px; box-shadow: var(--shadow-lg); }
.mobile-menu.open { display: flex; }
.mobile-menu-link { font-size: 15px; color: var(--text-secondary); padding: 14px 0; border-bottom: 1px solid var(--border-primary); }
.mobile-menu-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--font-sans); font-size: 13px; font-weight: 500;
    padding: 8px 18px; border-radius: var(--radius-sm); border: none; cursor: pointer;
    transition: all 0.2s; white-space: nowrap;
}
.btn-primary { background: var(--text-primary); color: var(--bg-card); }
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border-secondary); }
.btn-outline:hover { color: var(--text-primary); border-color: var(--text-muted); box-shadow: var(--shadow-sm); }
.btn-ghost { background: transparent; color: var(--text-tertiary); }
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-secondary); }
.btn-lg { padding: 12px 28px; font-size: 14px; border-radius: var(--radius-md); }
.btn-sm { padding: 6px 14px; font-size: 12px; }

/* ===== Hero ===== */
.hero { position: relative; padding: 120px 0 80px; text-align: center; overflow: hidden; }
.hero-glow { position: absolute; top: -200px; left: 50%; transform: translateX(-50%); width: 800px; height: 600px; background: radial-gradient(ellipse, rgba(37, 99, 235, 0.04) 0%, rgba(124, 58, 237, 0.02) 40%, transparent 70%); pointer-events: none; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--accent-blue); background: rgba(37, 99, 235, 0.06); padding: 6px 16px; border-radius: 100px; margin-bottom: 32px; }
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-green); animation: pulse-dot 2s ease-in-out infinite; }
.hero-title { font-size: clamp(40px, 6vw, 72px); font-weight: 800; line-height: 1.05; letter-spacing: -3px; margin-bottom: 20px; color: var(--text-primary); }
.gradient-text { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-subtitle { font-size: clamp(15px, 2vw, 17px); color: var(--text-tertiary); line-height: 1.8; max-width: 560px; margin: 0 auto 36px; }

/* Hero Search */
.hero-search { max-width: 600px; margin: 0 auto 32px; width: 100%; }
.hero-search-box {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-card); border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md); padding: 8px 10px 8px 20px; box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}
.hero-search-box:focus-within { border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.hero-search-box svg { color: var(--text-muted); flex-shrink: 0; }
.hero-search-input { flex: 1; background: transparent; border: none; outline: none; font-family: var(--font-sans); font-size: 15px; color: var(--text-primary); min-width: 0; }
.hero-search-input::placeholder { color: var(--text-muted); }
.hero-search-tags { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.search-tag { font-size: 12px; color: var(--text-muted); }
.search-tag-link { font-size: 12px; color: var(--text-tertiary); background: var(--bg-secondary); padding: 3px 10px; border-radius: 100px; transition: all 0.2s; font-family: var(--font-mono); }
.search-tag-link:hover { color: var(--text-primary); background: var(--bg-tertiary); }

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 64px; }
.hero-stats { display: flex; justify-content: center; align-items: center; gap: 48px; }
.stat { text-align: center; }
.stat-value { display: block; font-size: 36px; font-weight: 800; font-family: var(--font-mono); letter-spacing: -2px; color: var(--text-primary); }
.stat-suffix { font-size: 36px; font-weight: 800; font-family: var(--font-mono); color: var(--text-primary); }
.stat-label { display: block; font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.stat-divider { width: 1px; height: 36px; background: var(--border-secondary); }

/* ===== Sections ===== */
.section { padding: 100px 0; }
.section-dark { background: var(--bg-secondary); }
.section-header { text-align: center; margin-bottom: 64px; }
.section-badge { display: inline-block; font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--accent-blue); text-transform: uppercase; letter-spacing: 3px; margin-bottom: 12px; }
.section-title { font-size: clamp(30px, 4vw, 46px); font-weight: 800; line-height: 1.1; letter-spacing: -1.5px; margin-bottom: 16px; }
.section-subtitle { font-size: 15px; color: var(--text-tertiary); max-width: 520px; margin: 0 auto; line-height: 1.8; }

/* ===== Steps ===== */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-card { background: var(--bg-card); padding: 40px 28px; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: all 0.3s; border: 1px solid var(--border-primary); }
.step-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.step-number { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 20px; }
.step-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-md); background: rgba(37, 99, 235, 0.06); color: var(--accent-blue); margin-bottom: 16px; }
.step-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step-desc { font-size: 14px; color: var(--text-tertiary); line-height: 1.7; }

/* ===== Leaderboard Mini ===== */
.leaderboard-mini { background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; max-width: 900px; margin: 0 auto; box-shadow: var(--shadow-sm); border: 1px solid var(--border-primary); }
.leaderboard-header { display: grid; grid-template-columns: 60px 1fr 100px 110px 100px; padding: 14px 24px; background: var(--bg-secondary); border-bottom: 1px solid var(--border-primary); }
.lb-col { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); display: flex; align-items: center; }
.leaderboard-row { display: grid; grid-template-columns: 60px 1fr 100px 110px 100px; padding: 14px 24px; transition: background 0.15s; cursor: pointer; border-bottom: 1px solid var(--border-primary); }
.leaderboard-row:last-child { border-bottom: none; }
.leaderboard-row:hover { background: var(--bg-secondary); }
.leaderboard-row .lb-col { font-size: 13px; color: var(--text-secondary); letter-spacing: 0; text-transform: none; }
.lb-project { display: flex; flex-direction: column; gap: 2px; }
.project-name { font-weight: 600; color: var(--text-primary); font-family: var(--font-sans); }
.project-author { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
.lb-growth.up { color: var(--accent-green); font-weight: 500; }

.rank-badge { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; font-size: 12px; font-weight: 700; font-family: var(--font-mono); background: var(--bg-secondary); color: var(--text-tertiary); }
.rank-badge.rank-1 { background: #fef3c7; color: #92400e; }
.rank-badge.rank-2 { background: #f3f4f6; color: #374151; }
.rank-badge.rank-3 { background: #fed7aa; color: #9a3412; }

.score-pill { display: inline-flex; padding: 4px 10px; border-radius: 6px; font-size: 13px; font-weight: 600; font-family: var(--font-mono); }
.score-pill.high { background: #dcfce7; color: #166534; }
.score-pill.medium { background: #fef9c3; color: #854d0e; }
.leaderboard-cta { text-align: center; margin-top: 32px; }

/* ===== Score Card ===== */
.score-demo { max-width: 620px; margin: 0 auto; }
.score-card { background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--border-primary); }
.score-card-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 28px 28px 20px; }
.score-project-name { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.score-project-desc { font-size: 13px; color: var(--text-muted); }
.score-total { text-align: center; }
.score-total-value { display: block; font-size: 44px; font-weight: 800; font-family: var(--font-mono); background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1; }
.score-total-label { font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted); font-family: var(--font-mono); }
.score-dimensions { padding: 8px 28px 24px; display: flex; flex-direction: column; gap: 16px; }
.dimension-header { display: flex; justify-content: space-between; margin-bottom: 6px; }
.dimension-name { font-size: 13px; color: var(--text-tertiary); font-weight: 500; }
.dimension-value { font-size: 13px; font-family: var(--font-mono); font-weight: 600; color: var(--text-primary); }
.dimension-bar { width: 100%; height: 4px; background: var(--bg-secondary); border-radius: 100px; overflow: hidden; }
.dimension-fill { height: 100%; width: 0; border-radius: 100px; background: var(--color); transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1); }
.dimension-fill.animate { width: var(--fill); }
.score-card-footer { padding: 16px 28px; background: var(--bg-secondary); display: flex; gap: 8px; border-top: 1px solid var(--border-primary); }

/* ===== Report Preview ===== */
.report-preview { max-width: 900px; margin: 0 auto; }
.report-window { background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--border-primary); }
.report-toolbar { display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: var(--bg-secondary); border-bottom: 1px solid var(--border-primary); }
.report-dots { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.report-title-bar { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.report-content { display: grid; grid-template-columns: 240px 1fr; min-height: 380px; }
.report-toc { padding: 20px; background: var(--bg-secondary); border-right: 1px solid var(--border-primary); }
.toc-item { font-size: 12px; color: var(--text-muted); padding: 8px 12px; border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s; font-family: var(--font-mono); }
.toc-item:hover { color: var(--text-secondary); background: var(--bg-tertiary); }
.toc-item.active { color: var(--accent-blue); background: rgba(37, 99, 235, 0.06); }
.report-body { padding: 28px 32px; }
.report-heading { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--accent-blue); margin-bottom: 16px; }
.report-text { font-size: 14px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 24px; }
.report-highlight { background: rgba(37, 99, 235, 0.04); border: 1px solid rgba(37, 99, 235, 0.08); border-radius: var(--radius-md); padding: 18px 22px; display: flex; flex-direction: column; gap: 12px; }
.highlight-item { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.highlight-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.highlight-value { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.highlight-positive { color: var(--accent-green); }
.report-cta { text-align: center; margin-top: 32px; }

/* ===== Method Grid ===== */
.method-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.method-card { background: var(--bg-card); padding: 32px 24px; border-radius: var(--radius-lg); transition: all 0.3s; text-align: center; border: 1px solid var(--border-primary); box-shadow: var(--shadow-sm); }
.method-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.method-icon { font-size: 28px; margin-bottom: 14px; }
.method-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.method-desc { font-size: 13px; color: var(--text-tertiary); line-height: 1.6; }

/* ===== CTA ===== */
.cta-section { padding: 40px 0 100px; }
.cta-box { text-align: center; padding: 80px 40px; background: var(--text-primary); color: var(--bg-card); border-radius: var(--radius-xl); position: relative; overflow: hidden; }
.cta-box::before { content: ''; position: absolute; top: -100px; left: 50%; transform: translateX(-50%); width: 600px; height: 400px; background: radial-gradient(ellipse, rgba(255,255,255,0.05), transparent 70%); pointer-events: none; }
.cta-title { font-size: clamp(28px, 4vw, 42px); font-weight: 800; line-height: 1.1; letter-spacing: -1.5px; margin-bottom: 16px; position: relative; color: #fff; }
.cta-title .gradient-text { background: linear-gradient(135deg, #93c5fd, #c4b5fd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.cta-subtitle { font-size: 15px; color: rgba(255,255,255,0.6); margin-bottom: 32px; position: relative; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; }
.cta-actions .btn-primary { background: #fff; color: var(--text-primary); }
.cta-actions .btn-ghost { color: rgba(255,255,255,0.7); }
.cta-actions .btn-ghost:hover { color: #fff; background: rgba(255,255,255,0.1); }

/* ===== Footer ===== */
.footer { padding: 60px 0 32px; border-top: 1px solid var(--border-primary); }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; margin-bottom: 48px; }
.footer-tagline { font-size: 13px; color: var(--text-muted); margin-top: 12px; max-width: 260px; line-height: 1.6; }
.footer-links-grid { display: flex; gap: 64px; }
.footer-col h4 { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
.footer-col a { display: block; font-size: 13px; color: var(--text-muted); padding: 4px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--border-primary); font-size: 12px; color: var(--text-muted); }
.footer-version { font-family: var(--font-mono); font-size: 11px; }

/* ===== Animations ===== */
@keyframes fade-in-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: fade-in-up 0.5s ease-out forwards; opacity: 0; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .steps-grid { grid-template-columns: 1fr; }
    .method-grid { grid-template-columns: repeat(2, 1fr); }
    .report-content { grid-template-columns: 1fr; }
    .report-toc { display: flex; overflow-x: auto; gap: 4px; padding: 12px; border-right: none; border-bottom: 1px solid var(--border-primary); }
    .toc-item { white-space: nowrap; font-size: 11px; }
}
@media (max-width: 768px) {
    .hero { padding: 80px 0 60px; }
    .hero-title { letter-spacing: -1.5px; }
    .hide-mobile { display: none; }
    .nav-links, .nav-actions { display: none; }
    .mobile-menu-btn { display: flex; }
    .method-grid { grid-template-columns: 1fr; }
    .hero-stats { gap: 24px; }
    .stat-value, .stat-suffix { font-size: 28px; }
    .leaderboard-header, .leaderboard-row { grid-template-columns: 50px 1fr 80px 90px; }
    .lb-growth { display: none; }
    .score-card-header { flex-direction: column; gap: 16px; }
    .score-card-footer { flex-direction: column; }
    .footer-inner { flex-direction: column; }
    .footer-links-grid { gap: 32px; flex-wrap: wrap; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .cta-box { padding: 48px 24px; }
    .highlight-item { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
    .hero-stats { flex-direction: column; gap: 16px; }
    .stat-divider { width: 40px; height: 1px; }
}
