/**
 * KCSI Brand System - Global Stylesheet
 * Version: 1.0
 * 
 * Terminal-native but premium aesthetic for kubectl for humans
 * See STYLE_GUIDE.md for complete documentation
 */

/* ============================================================================
   FONTS
   ============================================================================ */

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

/* ============================================================================
   CSS VARIABLES - Brand System
   ============================================================================ */

:root {
    /* Primary Colors */
    --kcsi-primary: #4a5a9a;
    --kcsi-primary-dark: #3a4a7a;
    --kcsi-primary-light: #667eea;
    
    /* Surface & Background */
    --kcsi-bg-body: #f5f7fa;
    --kcsi-bg-surface: #ffffff;
    --kcsi-bg-elevated: #ffffff;
    --kcsi-bg-code: #2d2d2d;
    
    /* Text Colors */
    --kcsi-text-primary: #212529;
    --kcsi-text-secondary: #495057;
    --kcsi-text-muted: #6c757d;
    --kcsi-text-inverse: #ffffff;
    --kcsi-text-code: #50fa7b;
    
    /* Semantic Colors */
    --kcsi-success: #28a745;
    --kcsi-info: #17a2b8;
    --kcsi-warning: #ffc107;
    --kcsi-danger: #dc3545;
    
    /* Gradients */
    --kcsi-gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --kcsi-gradient-footer: linear-gradient(135deg, #a8b5d1 0%, #c3dfe0 50%, #b4d4d3 100%);
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    
    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-code: 'JetBrains Mono', 'Monaco', 'Courier New', monospace;
    
    /* Layout */
    --content-max-width: 1200px;
    --content-wide-width: 1400px;
    --content-narrow-width: 720px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================================================
   RESET & BASE STYLES
   ============================================================================ */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--kcsi-text-primary);
    background: var(--kcsi-bg-body);
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    color: var(--kcsi-text-primary);
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 1.875rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

p {
    margin-bottom: var(--space-sm);
}

small {
    font-size: 0.875rem;
    color: var(--kcsi-text-muted);
}

/* ============================================================================
   LINKS
   ============================================================================ */

a {
    color: var(--kcsi-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--kcsi-primary-light);
}

a:focus-visible {
    outline: 2px solid var(--kcsi-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--kcsi-primary);
    color: var(--kcsi-text-inverse);
}

.btn-primary:hover {
    background: var(--kcsi-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 90, 154, 0.3);
    color: var(--kcsi-text-inverse);
}

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

.btn-secondary:hover {
    background: var(--kcsi-primary);
    color: var(--kcsi-text-inverse);
}

.btn-support {
    background: #ffdd00;
    color: #000000;
    font-weight: 700;
}

.btn-support:hover {
    background: #ffee55;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 221, 0, 0.4);
}

/* ============================================================================
   CODE BLOCKS
   ============================================================================ */

code {
    font-family: var(--font-code);
    background: var(--kcsi-bg-code);
    color: var(--kcsi-text-code);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

pre {
    background: var(--kcsi-bg-code);
    padding: var(--space-md);
    border-radius: 8px;
    overflow-x: auto;
    margin: var(--space-sm) 0;
}

pre code {
    background: none;
    padding: 0;
    color: #f8f8f2;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ============================================================================
   CALLOUT BOXES
   ============================================================================ */

.callout {
    padding: var(--space-sm) var(--space-md);
    border-left: 4px solid;
    border-radius: 4px;
    margin: var(--space-sm) 0;
}

.callout-tip {
    background: #e8f5e9;
    border-color: var(--kcsi-success);
}

.callout-note {
    background: #e7f3ff;
    border-color: var(--kcsi-info);
}

.callout-warning {
    background: #fff8e1;
    border-color: var(--kcsi-warning);
}

.callout-danger {
    background: #ffebee;
    border-color: var(--kcsi-danger);
}

.callout-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* ============================================================================
   LAYOUT COMPONENTS
   ============================================================================ */

.container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-wide {
    max-width: var(--content-wide-width);
}

.container-narrow {
    max-width: var(--content-narrow-width);
}

.section {
    padding: var(--space-2xl) 0;
}

.card {
    background: var(--kcsi-bg-surface);
    border-radius: 12px;
    padding: var(--space-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* ============================================================================
   SUPPORT SECTION
   ============================================================================ */

.support-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 3px solid var(--kcsi-primary);
    padding: var(--space-xl) var(--space-md);
    margin-top: var(--space-3xl);
    text-align: center;
    border-radius: 8px;
}

.support-section h3 {
    color: var(--kcsi-primary);
    margin-bottom: var(--space-sm);
}

.support-section p {
    color: var(--kcsi-text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-md);
}

.support-links {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.support-note {
    font-size: 0.85rem;
    color: var(--kcsi-text-muted);
    font-style: italic;
    margin-top: 1rem;
}

.support-value {
    font-size: 0.9rem;
    color: var(--kcsi-text-secondary);
    font-weight: 500;
    margin-top: 0.5rem;
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--kcsi-text-muted);
}

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    :root {
        font-size: 14px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
    
    .support-links {
        flex-direction: column;
        align-items: center;
    }
    
    .container {
        padding: 0 var(--space-sm);
    }
}

@media (max-width: 480px) {
    .section {
        padding: var(--space-xl) 0;
    }
}

/* ============================================================================
   SUPPORT PAGE STYLES
   ============================================================================ */

.subtitle {
    font-size: 1.25rem;
    color: var(--kcsi-text-secondary);
    font-weight: 400;
    margin-top: -0.5rem;
}

.value-prop {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid var(--kcsi-primary);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.value-prop .lead {
    font-size: 1.15rem;
    line-height: 1.6;
    margin: 0;
}

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

.benefit-card {
    background: var(--kcsi-bg-surface);
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition-base);
}

.benefit-card:hover {
    border-color: var(--kcsi-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(74, 90, 154, 0.15);
}

.benefit-card h3 {
    color: var(--kcsi-primary);
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.benefit-card p {
    margin: 0;
    color: var(--kcsi-text-secondary);
}

/* SUPPORT TIERS */
.support-tiers {
    margin: 3rem 0;
}

.tier-card {
    background: var(--kcsi-bg-surface);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    transition: all var(--transition-base);
}

.tier-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.tier-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--kcsi-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.tier-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.tier-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.tier-price {
    color: var(--kcsi-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.tier-body p {
    color: var(--kcsi-text-secondary);
    margin-bottom: 1.5rem;
}

.tier-benefits {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.tier-benefits li {
    padding: 0.5rem 0;
    color: var(--kcsi-text-primary);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 1.5rem;
}

/* TIER VARIANTS */
.tier-coffee {
    border-color: #ffdd00;
}

.tier-coffee:hover {
    border-color: #ffee55;
}

.tier-sponsor {
    border-color: var(--kcsi-primary);
    border-width: 3px;
}

.tier-teams {
    border-color: var(--kcsi-primary-light);
}

/* TRANSPARENCY SECTION */
.transparency {
    margin: 3rem 0;
}

.transparency ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.transparency li {
    margin: 0.75rem 0;
}

/* SPONSORS SECTION */
.sponsors-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin: 3rem 0;
}

/* FAQ */
.faq {
    margin: 3rem 0;
}

.faq details {
    background: var(--kcsi-bg-surface);
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    transition: all var(--transition-fast);
}

.faq details:hover {
    border-color: var(--kcsi-primary);
}

.faq summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--kcsi-primary);
    list-style: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::before {
    content: "▶ ";
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform var(--transition-fast);
}

.faq details[open] summary::before {
    transform: rotate(90deg);
}

.faq summary:hover {
    color: var(--kcsi-primary-dark);
}

.faq p {
    margin: 1rem 0 0 0;
    padding-left: 1.5rem;
    color: var(--kcsi-text-secondary);
}

/* FINAL CTA */
.final-cta {
    background: linear-gradient(135deg, var(--kcsi-primary) 0%, var(--kcsi-primary-light) 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    margin: 3rem 0;
}

.final-cta h2 {
    color: white;
    margin-bottom: 1.5rem;
}

/* SUPPORT CTA BLOCK (reusable component) */
.support-cta-block {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 3px solid var(--kcsi-primary);
    padding: 2rem;
    margin: 3rem 0;
    text-align: center;
    border-radius: 8px;
}

.support-cta-block h3 {
    color: var(--kcsi-primary);
    margin: 0 0 1rem 0;
}

.support-cta-block p {
    margin: 0.5rem 0;
    color: var(--kcsi-text-secondary);
}

.support-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

/* AUDIENCE SECTION (homepage) */
.audience-section {
    margin: 3rem 0;
}

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

.audience-card {
    background: var(--kcsi-bg-surface);
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition-base);
}

.audience-card:hover {
    border-color: var(--kcsi-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(74, 90, 154, 0.15);
}

.audience-card h3 {
    color: var(--kcsi-primary);
    margin: 0 0 0.75rem 0;
}

.audience-card p {
    margin: 0;
    color: var(--kcsi-text-secondary);
}

/* SOCIAL PROOF */
.social-proof {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 8px;
    margin: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat strong {
    display: block;
    font-size: 2rem;
    color: var(--kcsi-primary);
    margin-bottom: 0.5rem;
}

.stat span {
    color: var(--kcsi-text-secondary);
    font-size: 0.9rem;
}

/* STICKY SUPPORT BANNER (optional) */
.support-banner {
    background: linear-gradient(90deg, #4a5a9a 0%, #667eea 100%);
    color: white;
    text-align: center;
    padding: 0.75rem;
    font-size: 0.9rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.support-banner a {
    color: #ffdd00;
    font-weight: 600;
    text-decoration: none;
}

.support-banner a:hover {
    text-decoration: underline;
}

/* NAVIGATION SUPPORT LINK */
.nav-support {
    color: #ffdd00 !important;
    font-weight: 600;
}

/* TEAMS PAGE STYLES */
.package-price {
    color: var(--kcsi-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0.5rem 0 1rem 0;
}

.team-contact {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    margin: 3rem 0;
}

.btn-lg {
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.hero-meta {
    margin-top: 1.5rem;
    color: var(--kcsi-text-secondary);
}

.back-link {
    display: inline-block;
    margin: 2rem 0;
    color: var(--kcsi-primary);
    font-weight: 600;
}

.back-link:hover {
    color: var(--kcsi-primary-dark);
}

/* RESPONSIVE ADJUSTMENTS FOR SUPPORT PAGE */
@media (max-width: 768px) {
    .benefit-grid,
    .audience-grid {
        grid-template-columns: 1fr;
    }
    
    .support-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tier-badge {
        right: 10px;
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ============================================================================
   KCSI UNIFIED UI COMPONENTS (Header, Footer, Nav)
   ============================================================================ */

/* HEADER */
.kcsi-header {
    background: var(--kcsi-bg-surface);
    border-bottom: 2px solid var(--kcsi-primary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.kcsi-header-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.kcsi-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
}

.kcsi-logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--kcsi-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.kcsi-logo:hover {
    color: var(--kcsi-primary-light);
}

.kcsi-tagline {
    font-size: 0.875rem;
    color: var(--kcsi-text-secondary);
    margin: 0;
    max-width: 500px;
}

/* NAVIGATION */
.kcsi-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.nav-item {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: var(--kcsi-text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
    font-size: 0.95rem;
}

.nav-item:hover {
    background: var(--kcsi-bg-body);
    color: var(--kcsi-primary);
}

.nav-active {
    background: var(--kcsi-primary);
    color: white;
}

.nav-active:hover {
    background: var(--kcsi-primary-dark);
    color: white;
}

.nav-highlight {
    background: #ffdd00;
    color: #000000;
    font-weight: 600;
}

.nav-highlight:hover {
    background: #ffee55;
    color: #000000;
}

.nav-cta {
    background: #ffdd00;
    color: #000000;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
}

.nav-cta:hover {
    background: #ffee55;
    color: #000000;
}

.nav-cta-primary {
    background: var(--kcsi-primary);
    color: white;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
}

.nav-cta-primary:hover {
    background: var(--kcsi-primary-light);
    color: white;
}

/* FOOTER */
.kcsi-footer {
    background: linear-gradient(135deg, #a8b5d1 0%, #c3dfe0 50%, #b4d4d3 100%);
    color: var(--kcsi-text-primary);
    padding: 3rem 2rem 2rem;
    margin-top: 4rem;
}

.kcsi-footer-content {
    max-width: var(--content-max-width);
    margin: 0 auto;
    text-align: center;
}

.kcsi-footer-brand {
    margin-bottom: 2rem;
}

.kcsi-footer-brand h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--kcsi-text-primary);
}

.kcsi-footer-brand p {
    opacity: 0.9;
    margin: 0;
}

.kcsi-footer-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.kcsi-footer-links a {
    color: var(--kcsi-text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.kcsi-footer-links svg {
    vertical-align: middle;
}

.kcsi-footer-author {
    margin-top: 1.5rem;
}

.kcsi-footer-author p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.kcsi-author-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.kcsi-author-links a {
    color: var(--kcsi-text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.kcsi-author-links a:hover {
    color: var(--kcsi-primary);
}

/* RESPONSIVE HEADER/FOOTER */
@media (max-width: 768px) {
    .kcsi-header-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .kcsi-nav {
        width: 100%;
        justify-content: flex-start;
    }
    
    .nav-item {
        font-size: 0.875rem;
        padding: 0.4rem 0.8rem;
    }
    
    .kcsi-tagline {
        font-size: 0.8rem;
    }
    
    .kcsi-footer-links,
    .kcsi-author-links {
        flex-direction: column;
        gap: 0.75rem;
    }
}
