/* Global CSS for The Chamber - Unified Styling System */

/* ========== Reset & Base Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #212529;
    background: #f8f9fa;
}

/* ========== Typography System ========== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    margin-bottom: 1rem;
}

/* ========== Button System ========== */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.2);
    text-decoration: none;
    color: white;
}

.btn-chamber {
    background: var(--chamber-color);
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.btn-chamber:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.2);
    text-decoration: none;
    color: white;
}

/* ========== Chamber Color Variables ========== */
:root {
    --economics-color: #7A1C1E;
    --energy-color: #E1A500;
    --interaction-color: #6A1B9A;
    --life-color: #FF865B;
    --manufacturing-color: #37474F;
    --nature-color: #008771;
    --space-color: #0D1B2A;
    --transport-color: #1E88E5;
}

/* ========== Container System ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-sm {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

/* ========== Section Layouts ========== */
.section {
    padding: 4rem 0;
}

.section-sm {
    padding: 2rem 0;
}

/* ========== Card System ========== */
.card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

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

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

/* ========== Progress System ========== */
.progress-container {
    width: 100%;
    margin: 1rem 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-bar-container {
    width: 100%;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: white;
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.progress-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.question-counter {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
}

/* ========== Question Styles ========== */
.question-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.question-content {
    max-width: 800px;
    width: 100%;
    animation: fade-in-up 0.6s ease forwards;
}

.question-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 600;
    color: #212529;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.question-subtext {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.choices-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

.choice-btn {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
}

.choice-btn:hover {
    border-color: var(--chamber-color, #6c757d);
    background: rgba(255,255,255,0.9);
    transform: translateY(-2px);
}

.choice-btn:focus {
    outline: none;
    border-color: var(--chamber-color, #6c757d);
    box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.1);
}

.text-input {
    width: 100%;
    max-width: 1000px;
    min-height: 200px;
    padding: 2rem 3rem;
    margin: 0 auto;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #495057;
    resize: vertical;
    transition: border-color 0.3s ease;
    background: white;
    line-height: 1.6;
    box-sizing: border-box;
    display: block;
}

.text-input:focus {
    outline: none;
    border-color: var(--chamber-color, #6c757d);
    box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.1);
}

.text-input::placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* ========== Navigation System ========== */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

.nav-btn {
    background: transparent;
    border: 2px solid var(--chamber-color, #6c757d);
    color: var(--chamber-color, #6c757d);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.nav-btn:hover {
    background: var(--chamber-color, #6c757d);
    color: white;
    text-decoration: none;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== Whisper System ========== */
.whisper {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    color: #6c757d;
    font-style: italic;
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
    background: rgba(255,255,255,0.3);
    border-radius: 8px;
    animation: fade-in 1s ease 1s forwards;
    opacity: 0;
}

/* ========== Loading & Transition Effects ========== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

.fade-in {
    animation: fade-in 0.6s ease forwards;
}

.fade-out {
    animation: fade-out 0.3s ease forwards;
}

.slide-up {
    animation: slide-up 0.6s ease forwards;
}

/* ========== Animations ========== */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== Responsive Design ========== */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .question-container {
        padding: 1.5rem;
        margin: 1rem auto;
    }
    
    .question-title {
        font-size: 1.8rem;
    }
    
    .choice-btn {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    /* Mobile text input adjustments */
    .text-input {
        max-width: 100%;
        min-height: 180px;
        padding: 1.5rem 2rem;
        font-size: 1rem;
    }
    
    /* Progress bar mobile adjustments */
    .progress-container {
        margin: 1rem auto;
        padding: 0 1rem;
    }
    
    .progress-text, .question-counter {
        font-size: 0.8rem;
    }
    
    /* Chamber header mobile */
    .chamber-header {
        padding: 1.5rem 0;
    }
    
    .chamber-title {
        font-size: 2rem;
    }
    
    .chamber-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .question-container {
        padding: 1rem;
        margin: 0.5rem auto;
    }
    
    .question-title {
        font-size: 1.5rem;
    }
    
    .choice-btn {
        padding: 0.8rem;
        font-size: 0.85rem;
    }
    
    /* Small mobile text input */
    .text-input {
        min-height: 150px;
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Progress bar small mobile */
    .progress-container {
        padding: 0 0.5rem;
    }
    
    .progress-header {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 0.8rem;
        text-align: center;
    }
    
    .progress-text, .question-counter {
        font-size: 0.75rem;
    }
    
    /* Chamber header small mobile */
    .chamber-header {
        padding: 1rem 0;
    }
    
    .chamber-title {
        font-size: 1.8rem;
    }
    
    .chamber-subtitle {
        font-size: 0.9rem;
        padding: 0 1rem;
    }
    
    /* Navigation buttons mobile */
    .nav-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.8rem;
    }
}

/* ========== Accessibility ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .choice-btn {
        border-width: 3px;
    }
    
    .card {
        border: 2px solid #212529;
    }
}

/* Focus management for keyboard navigation */
*:focus {
    outline: 2px solid var(--chamber-color, #6c757d);
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--chamber-color, #6c757d);
    outline-offset: 2px;
}

/* ========== Utility Classes ========== */
.hidden { display: none !important; }
.visible { display: block !important; }
.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; 
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

.font-light { font-weight: 300; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }