/*
 * Sales Comp Design — Compensation & Quota Design Intelligence
 * Modular card-based theme
 * Violet + indigo + light gray
 * Outfit headings + Inter body
 */

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

:root {
    --violet: #7C3AED;
    --violet-dark: #6D28D9;
    --violet-light: #8B5CF6;
    --violet-muted: rgba(124,58,237,0.08);
    --violet-glow: rgba(124,58,237,0.15);
    --indigo: #4F46E5;
    --indigo-dark: #4338CA;
    --indigo-light: #6366F1;
    --dark: #18181B;
    --dark-800: #27272A;
    --dark-700: #3F3F46;
    --gray-bg: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --text-primary: #18181B;
    --text-secondary: #3F3F46;
    --text-muted: #6B7280;
    --white: #FFFFFF;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --card-shadow-hover: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--gray-bg);
    -webkit-font-smoothing: antialiased;
}

/* === NAVIGATION === */

.mod-nav {
    background: var(--dark);
    border-bottom: 2px solid var(--violet);
    position: sticky;
    top: 0;
    z-index: 100;
}

.mod-nav .nav-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
}

.brand-icon {
    color: var(--violet-light);
    font-size: 1.25rem;
    line-height: 1;
}

.brand-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--white);
    letter-spacing: -0.01em;
}

.mod-nav .nav-links {
    display: flex;
    list-style: none;
    gap: 0;
    align-items: center;
}

.mod-nav .nav-links li a {
    display: block;
    padding: 0.85rem 1.15rem;
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 0.15s, border-color 0.15s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.mod-nav .nav-links li a:hover {
    color: var(--white);
    border-bottom-color: var(--violet-light);
}

.mod-nav .nav-links li.active a {
    color: var(--white);
    border-bottom-color: var(--violet);
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--gray-600);
    border-radius: 0.375rem;
    cursor: pointer;
    padding: 0.5rem;
    width: 2.25rem;
    height: 2.25rem;
    position: relative;
}

.nav-toggle span {
    display: block;
    width: 1rem;
    height: 2px;
    background: var(--gray-400);
    margin: 3px auto;
    transition: transform 0.2s;
}

/* === HERO === */

.mod-hero {
    background: var(--dark);
    padding: 3.5rem 1.5rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(124,58,237,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124,58,237,0.04) 1px, transparent 1px);
    background-size: 3rem 3rem;
    pointer-events: none;
}

.mod-hero .hero-inner {
    position: relative;
    z-index: 1;
    max-width: 48rem;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--violet-light);
    background: var(--violet-muted);
    border: 1px solid rgba(124,58,237,0.2);
    padding: 0.3rem 0.85rem;
    border-radius: 100px;
    margin-bottom: 1.25rem;
}

.mod-hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-accent {
    color: var(--violet-light);
}

.hero-deck {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--gray-400);
    max-width: 36rem;
    margin: 0 auto 2rem;
}

.hero-breadcrumb {
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.hero-breadcrumb a {
    color: var(--violet-light);
    text-decoration: none;
}

.hero-breadcrumb a:hover {
    text-decoration: underline;
}

.bc-sep {
    color: var(--gray-600);
    margin: 0 0.4rem;
}

.bc-current {
    color: var(--gray-400);
}

/* Hero metrics grid */
.hero-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 44rem;
    margin: 0 auto;
}

.metric-card {
    background: var(--dark-800);
    border: 1px solid var(--dark-700);
    border-radius: 0.75rem;
    padding: 1.25rem 0.75rem;
    text-align: center;
}

.metric-value {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--violet-light);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.metric-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.35rem;
}

/* Hero page-type variants */
.landscape-hero { background: linear-gradient(135deg, var(--dark) 0%, var(--dark-800) 100%); }
.compare-hero { background: linear-gradient(135deg, var(--dark) 0%, #1e1b4b 100%); }
.comparison-hero { background: linear-gradient(135deg, var(--dark) 0%, #1e1b4b 100%); }
.glossary-index-hero { background: linear-gradient(135deg, var(--dark) 0%, var(--dark-800) 100%); }
.glossary-entry-hero { background: linear-gradient(135deg, var(--dark) 0%, #1e1b4b 100%); }
.about-hero { background: var(--dark); }

.landscape-hero h1,
.compare-hero h1,
.comparison-hero h1,
.glossary-index-hero h1,
.glossary-entry-hero h1,
.about-hero h1 {
    font-size: 2.25rem;
}

/* === CONTENT WRAP === */

.content-wrap {
    max-width: 48rem;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

/* === CARD CONTAINER (content article) === */

.content {
    background: var(--white);
    border-radius: 0.75rem;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--gray-200);
}

.content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    border: 1px solid var(--gray-200);
}

/* === TYPOGRAPHY === */

.content h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--violet-muted);
}

.content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.content h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.content p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.content strong {
    color: var(--text-primary);
    font-weight: 700;
}

.content a {
    color: var(--violet);
    text-decoration: underline;
    text-decoration-color: rgba(124,58,237,0.3);
    text-underline-offset: 2px;
    font-weight: 600;
    transition: color 0.15s;
}

.content a:hover {
    color: var(--indigo);
    text-decoration-color: var(--indigo);
}

.content hr {
    border: none;
    height: 2px;
    background: var(--gray-200);
    margin: 2.5rem 0;
    border-radius: 1px;
}

/* === LISTS === */

.content ul, .content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.25rem;
}

.content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.content li strong {
    color: var(--text-primary);
}

/* === TABLES === */

.content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    line-height: 1.5;
    overflow-x: auto;
    display: block;
    border-radius: 0.5rem;
}

.content thead th {
    background: var(--dark);
    color: var(--white);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    padding: 0.7rem 0.9rem;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.content thead th:first-child {
    border-top-left-radius: 0.5rem;
}

.content thead th:last-child {
    border-top-right-radius: 0.5rem;
}

.content tbody td {
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: top;
    background: var(--white);
}

.content tbody tr:hover td {
    background: var(--violet-muted);
}

.content tbody tr:last-child td {
    border-bottom: 2px solid var(--violet);
}

.content tbody td:first-child {
    font-weight: 700;
    color: var(--text-primary);
}

/* Harvey ball alignment */
.content td:not(:first-child),
.content th:not(:first-child) {
    text-align: center;
}

/* === HARVEY BALL SPRITE === */
/* SVG sprite strip: 5 balls at 24px cells = 120x24 */
/* Dark stroke (#18181B), violet fill (#7C3AED) */

.hb {
    display: inline-block;
    width: 22px;
    height: 22px;
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAxMjAgMjQiPjxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjEwIiBmaWxsPSIjRjNGNEY2Ii8+PGNpcmNsZSBjeD0iMTIiIGN5PSIxMiIgcj0iMTAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzE4MTgxQiIgc3Ryb2tlLXdpZHRoPSIyIi8+PGNpcmNsZSBjeD0iMzYiIGN5PSIxMiIgcj0iMTAiIGZpbGw9IiNGM0Y0RjYiLz48cGF0aCBkPSJNMzYsMTIgTDM2LDIgQTEwLDEwIDAgMCwxIDQ2LDEyIFoiIGZpbGw9IiM3QzNBRUQiLz48Y2lyY2xlIGN4PSIzNiIgY3k9IjEyIiByPSIxMCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTgxODFCIiBzdHJva2Utd2lkdGg9IjIiLz48Y2lyY2xlIGN4PSI2MCIgY3k9IjEyIiByPSIxMCIgZmlsbD0iI0YzRjRGNiIvPjxwYXRoIGQ9Ik02MCwxMiBMNjAsMiBBMTAsMTAgMCAwLDEgNjAsMjIgWiIgZmlsbD0iIzdDM0FFRCIvPjxjaXJjbGUgY3g9IjYwIiBjeT0iMTIiIHI9IjEwIiBmaWxsPSJub25lIiBzdHJva2U9IiMxODE4MUIiIHN0cm9rZS13aWR0aD0iMiIvPjxjaXJjbGUgY3g9Ijg0IiBjeT0iMTIiIHI9IjEwIiBmaWxsPSIjRjNGNEY2Ii8+PHBhdGggZD0iTTg0LDEyIEw4NCwyIEExMCwxMCAwIDEsMSA3NCwxMiBaIiBmaWxsPSIjN0MzQUVEIi8+PGNpcmNsZSBjeD0iODQiIGN5PSIxMiIgcj0iMTAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzE4MTgxQiIgc3Ryb2tlLXdpZHRoPSIyIi8+PGNpcmNsZSBjeD0iMTA4IiBjeT0iMTIiIHI9IjEwIiBmaWxsPSIjN0MzQUVEIi8+PGNpcmNsZSBjeD0iMTA4IiBjeT0iMTIiIHI9IjEwIiBmaWxsPSJub25lIiBzdHJva2U9IiMxODE4MUIiIHN0cm9rZS13aWR0aD0iMiIvPjwvc3ZnPg==");
    background-repeat: no-repeat;
    background-size: 110px 22px;
    vertical-align: middle;
    position: relative;
}

.hb-1 { background-position: 0 0; }
.hb-2 { background-position: -22px 0; }
.hb-3 { background-position: -44px 0; }
.hb-4 { background-position: -66px 0; }
.hb-5 { background-position: -88px 0; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* === BLOCKQUOTES === */

.content blockquote {
    border-left: 3px solid var(--violet);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--violet-muted);
    border-radius: 0 0.5rem 0.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

.content blockquote p:last-child {
    margin-bottom: 0;
}

.content blockquote strong {
    font-style: normal;
}

/* === CODE === */

.content code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.83em;
    background: var(--gray-100);
    padding: 0.15em 0.4em;
    border-radius: 0.25rem;
    color: var(--violet-dark);
    border: 1px solid var(--gray-200);
}

.content pre {
    background: var(--dark);
    color: #C9D1D9;
    padding: 1.25rem 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--dark-700);
}

.content pre code {
    background: none;
    padding: 0;
    color: inherit;
    border: none;
}

/* === GLOSSARY INDEX GRID === */

.glossary-index ul {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.glossary-index li {
    padding: 0;
    margin: 0;
}

.glossary-index li a {
    display: block;
    padding: 0.75rem 1rem;
    background: var(--gray-bg);
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--violet);
    font-weight: 600;
    transition: all 0.15s;
}

.glossary-index li a:hover {
    background: var(--violet-muted);
    border-color: var(--violet-light);
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-1px);
}

/* === GLOSSARY ENTRY === */

.glossary-entry h2 {
    border-bottom-color: var(--violet-muted);
}

.glossary-entry h2:first-of-type {
    margin-top: 0;
}

/* === COMPARISON DETAIL CARDS === */

.comparison-detail h3 {
    background: var(--gray-bg);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border-left: 3px solid var(--violet);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

/* === FOOTER === */

.mod-footer {
    background: var(--dark);
    color: var(--gray-500);
    padding: 2.5rem 1.5rem;
    text-align: center;
    border-top: 2px solid var(--violet);
}

.footer-inner {
    max-width: 48rem;
    margin: 0 auto;
}

.footer-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.footer-brand .brand-icon {
    color: var(--violet-light);
    font-size: 1rem;
}

.footer-disclosure {
    font-size: 0.78rem;
    margin-bottom: 0.25rem;
}

.footer-edition {
    font-size: 0.72rem;
    color: var(--gray-600);
}

/* === GEOMETRIC DIVIDER UTILITY === */

.content h2::before {
    content: '';
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    background: var(--violet);
    border-radius: 1px;
    margin-right: 0.6rem;
    vertical-align: middle;
    transform: rotate(45deg);
}

/* === RESPONSIVE === */

@media (max-width: 768px) {
    html { font-size: 15px; }

    .nav-toggle { display: block; }

    .mod-nav .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        padding-bottom: 0.5rem;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--dark);
        border-bottom: 2px solid var(--violet);
    }

    .mod-nav .nav-links.open { display: flex; }

    .mod-nav .nav-inner {
        flex-wrap: wrap;
    }

    .mod-nav .nav-links li a {
        text-align: center;
        padding: 0.6rem 1rem;
        border-bottom: none;
    }

    .mod-hero { padding: 2.5rem 1rem 2rem; }
    .mod-hero h1 { font-size: 2rem; }

    .hero-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .content-wrap { padding: 1.5rem 1rem 3rem; }
    .content { padding: 1.75rem 1.25rem; }

    .landscape-hero h1,
    .compare-hero h1,
    .comparison-hero h1,
    .glossary-index-hero h1,
    .glossary-entry-hero h1,
    .about-hero h1 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .mod-hero h1 { font-size: 1.6rem; }
    .hero-deck { font-size: 0.95rem; }
    .content h1 { font-size: 1.5rem; }
    .content h2 { font-size: 1.15rem; }
    .content { padding: 1.5rem 1rem; }

    .hero-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .metric-value { font-size: 1.35rem; }
}
