/* =========================================
   GROWTH OS - Design System
   ========================================= */

/* CSS Variables / Design Tokens */
:root {
    /* Primary Colors */
    --yellow: #facc15;
    --yellow-light: #fef08a;
    --yellow-dark: #eab308;
    --pink: #ec4899;
    --pink-light: #f9a8d4;
    --blue: #3b82f6;
    --purple: #a855f7;
    --green: #22c55e;
    --green-light: #dcfce7;
    --red: #ef4444;
    --red-light: #fee2e2;
    --orange: #f97316;
    
    /* Backgrounds */
    --bg: #fefce8;
    --bg-white: #ffffff;
    --bg-dark: #1a1a1a;
    --bg-darker: #0f0f0f;
    
    /* Text */
    --text: #1a1a1a;
    --text-secondary: #525252;
    --text-muted: #737373;
    --text-light: #a3a3a3;
    --text-white: #ffffff;
    
    /* Borders */
    --border: #e5e7eb;
    --border-dark: #1a1a1a;
    
    /* Shadows */
    --shadow-sm: 3px 3px 0 var(--text);
    --shadow-md: 5px 5px 0 var(--text);
    --shadow-lg: 8px 8px 0 var(--text);
    --shadow-yellow: 4px 4px 0 var(--yellow);
    --shadow-pink: 4px 4px 0 var(--pink);
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 100px;
    
    /* Typography */
    --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Space Mono', monospace;
    
    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-collapsed: 72px;
    --header-height: 70px;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1rem; }

a {
    color: inherit;
    text-decoration: none;
}

.mono {
    font-family: var(--font-mono);
}

.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

/* =========================================
   COMPONENTS
   ========================================= */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 14px 28px;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 3px solid var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--text);
    color: var(--text-white);
    box-shadow: var(--shadow-yellow);
}

.btn-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--yellow);
}

.btn-secondary {
    background: var(--yellow);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--text);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--yellow-light);
}

.btn-pink {
    background: var(--pink);
    color: var(--text-white);
    box-shadow: var(--shadow-sm);
}

.btn-pink:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--text);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 18px 40px;
    font-size: 1.1rem;
}

/* Cards */
.card {
    background: var(--bg-white);
    border: 3px solid var(--text);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all 0.2s ease;
}

.card:hover {
    transform: translate(-3px, -3px);
    box-shadow: var(--shadow-md);
}

.card-flat {
    box-shadow: none;
}

.card-flat:hover {
    transform: none;
    box-shadow: none;
}

.card-yellow {
    background: var(--yellow);
}

.card-dark {
    background: var(--bg-dark);
    color: var(--text-white);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: 2px solid var(--text);
}

.badge-yellow {
    background: var(--yellow);
}

.badge-pink {
    background: var(--pink);
    color: var(--text-white);
}

.badge-green {
    background: var(--green);
    color: var(--text-white);
}

.badge-outline {
    background: transparent;
    border: 2px dashed var(--text);
}

/* Highlight Box */
.highlight {
    background: var(--yellow);
    padding: 0 12px;
    display: inline-block;
    border: 3px solid var(--text);
    box-shadow: var(--shadow-sm);
}

.highlight-pink {
    background: var(--pink);
    color: var(--text-white);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--border);
    border-radius: var(--radius-full);
    border: 2px solid var(--text);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--yellow);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.progress-fill-green {
    background: var(--green);
}

/* Input Fields */
.input {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--font-sans);
    font-size: 1rem;
    border: 3px solid var(--text);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    transition: all 0.2s ease;
}

.input:focus {
    outline: none;
    box-shadow: var(--shadow-yellow);
}

.input-group {
    display: flex;
    gap: 0;
}

.input-group .input {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    border-right: none;
}

.input-group .btn {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    cursor: pointer;
}

.checkbox {
    width: 24px;
    height: 24px;
    border: 3px solid var(--text);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox.checked {
    background: var(--green);
}

.checkbox.checked::after {
    content: '✓';
    color: white;
    font-weight: 700;
    font-size: 14px;
}

/* Accordion */
.accordion {
    border: 3px solid var(--text);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.accordion-item {
    border-bottom: 3px solid var(--text);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    width: 100%;
    padding: 20px 24px;
    background: var(--bg-white);
    border: none;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.accordion-header:hover {
    background: var(--yellow-light);
}

.accordion-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--bg);
}

.accordion-item.active .accordion-content {
    max-height: 500px;
}

.accordion-body {
    padding: 20px 24px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: var(--space-sm);
    border-bottom: 3px solid var(--text);
    padding-bottom: 0;
    margin-bottom: var(--space-xl);
}

.tab {
    padding: 12px 24px;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    background: transparent;
    border: 3px solid transparent;
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -3px;
}

.tab:hover {
    background: var(--yellow-light);
}

.tab.active {
    background: var(--yellow);
    border-color: var(--text);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--text);
    color: var(--text-white);
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* =========================================
   LAYOUT UTILITIES
   ========================================= */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-sm { max-width: 800px; }
.container-lg { max-width: 1400px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Spacing */
.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); }
.mt-2xl { margin-top: var(--space-2xl); }

.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); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.pt-xl { padding-top: var(--space-xl); }
.pt-2xl { padding-top: var(--space-2xl); }
.pt-3xl { padding-top: var(--space-3xl); }
.pt-4xl { padding-top: var(--space-4xl); }

.pb-xl { padding-bottom: var(--space-xl); }
.pb-2xl { padding-bottom: var(--space-2xl); }
.pb-3xl { padding-bottom: var(--space-3xl); }
.pb-4xl { padding-bottom: var(--space-4xl); }

.py-2xl { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
.py-3xl { padding-top: var(--space-3xl); padding-bottom: var(--space-3xl); }
.py-4xl { padding-top: var(--space-4xl); padding-bottom: var(--space-4xl); }

/* =========================================
   ANIMATIONS
   ========================================= */

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-30px) rotate(10deg); }
    66% { transform: translateY(20px) rotate(-10deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.animate-float { animation: float 20s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-fadeIn { animation: fadeIn 0.5s ease forwards; }
.animate-slideIn { animation: slideIn 0.3s ease forwards; }

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 1024px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 var(--space-md);
    }
    
    .btn {
        padding: 12px 20px;
    }
    
    .hide-mobile { display: none !important; }
}

@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab {
        flex: 1;
        text-align: center;
        font-size: 0.9rem;
        padding: 10px 16px;
    }
}
