/* The Hidden Authority Assessment - Bold Professional Design */

:root {
    /* Color Palette - Primary Pink with Tailwind-inspired Colors */
    --primary-pink: #ec4899;
    --primary-pink-dark: #be185d;
    --pink-500: #ec4899;
    --green-500: #10b981;
    
    /* Background Section Colors */
    --rose-50: #fdf2f8;
    --purple-50: #faf5ff;
    --indigo-50: #eef2ff;
    --pink-50: #fdf2f8;
    --emerald-50: #ecfdf5;
    --amber-50: #fffbeb;
    --violet-50: #f5f3ff;
    --gray-50: #f9fafb;
    
    /* Neutral Scale */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    
    /* Typography */
    --font-main: 'Inter', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    /* Shadows */
    --shadow-soft: 0 4px 20px rgba(236, 72, 153, 0.15);
    --shadow-card: 0 8px 32px rgba(236, 72, 153, 0.1);
    --shadow-hover: 0 12px 40px rgba(236, 72, 153, 0.2);
}

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

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--gray-900);
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--rose-50) 100%);
    min-height: 100vh;
    position: relative;
    font-weight: 400;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(236, 72, 153, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(190, 24, 93, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

/* Header Styling */
.form-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-xl) var(--spacing-lg);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.form-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 0%, 
        rgba(236, 72, 153, 0.05) 25%, 
        transparent 50%, 
        rgba(190, 24, 93, 0.05) 75%, 
        transparent 100%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.header-content {
    position: relative;
    z-index: 1;
}

.form-header h1 {
    font-size: clamp(2.25rem, 5vw, 3.75rem); /* 4xl hierarchy */
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.025em;
}

.subtitle {
    font-size: 1.25rem; /* xl */
    color: var(--gray-600);
    margin-bottom: var(--spacing-lg);
    font-weight: 600;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: -0.025em;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    margin-bottom: var(--spacing-sm);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-pink) 0%, var(--primary-pink-dark) 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 12.5%;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* Form Container */
.form-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    position: relative;
}

/* Form Sections */
.form-section {
    display: none;
    animation: fadeInSlide 0.5s ease-out;
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.form-section.active {
    display: block;
}

/* Section Background Colors */
.form-section[data-section="0"] { background: var(--rose-50); }
.form-section[data-section="1"] { background: var(--purple-50); }
.form-section[data-section="2"] { background: var(--indigo-50); }
.form-section[data-section="3"] { background: var(--pink-50); }
.form-section[data-section="4"] { background: var(--emerald-50); }
.form-section[data-section="5"] { background: var(--amber-50); }
.form-section[data-section="6"] { background: var(--violet-50); }
.form-section[data-section="7"] { background: var(--gray-50); }

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-pink-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
    box-shadow: var(--shadow-soft);
}

.section-icon i {
    font-size: 2rem;
    color: var(--white);
}

.section-header h2 {
    font-size: clamp(1.5rem, 4vw, 2rem); /* 2xl-3xl hierarchy */
    color: var(--gray-900);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.section-header p {
    font-size: 1.125rem; /* lg */
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 500;
}

/* Form Grid for Personal Info */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* Form Groups and Labels */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--gray-900);
    font-size: 1rem;
}

/* Input Styling */
input[type="text"],
input[type="email"],
input[type="url"],
textarea {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
    resize: vertical;
    font-weight: 400;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--pink-500);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.2);
    transform: translateY(-1px);
}

textarea {
    min-height: 120px;
    font-family: var(--font-main);
    line-height: 1.5;
}

/* Question Blocks */
.question-block {
    margin-bottom: var(--spacing-lg);
}

.starter-question {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-xl);
    border-left: 4px solid var(--primary-pink);
    box-shadow: var(--shadow-soft);
}

.starter-question label {
    font-size: 1.125rem; /* lg */
    font-weight: 700;
    color: var(--gray-900);
}

.starter-question textarea {
    margin-top: var(--spacing-sm);
    border: 2px solid var(--white);
    background: var(--white);
}

/* Follow-up Questions */
.follow-up-questions h3 {
    font-size: 1.25rem; /* xl */
    color: var(--gray-900);
    margin-bottom: var(--spacing-lg);
    font-weight: 700;
    text-align: center;
    position: relative;
}

.follow-up-questions h3::before,
.follow-up-questions h3::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-pink), var(--primary-pink-dark));
}

.follow-up-questions h3::before {
    left: -80px;
}

.follow-up-questions h3::after {
    right: -80px;
}

.optional {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--gray-500);
    font-style: italic;
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 2px solid var(--gray-200);
}

.nav-btn {
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    min-width: 140px;
    justify-content: center;
}

.prev-btn {
    background: var(--gray-200);
    color: var(--gray-600);
}

.prev-btn:not(:disabled):hover {
    background: var(--gray-500);
    color: var(--white);
    transform: translateY(-2px);
}

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

.next-btn,
.submit-btn {
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-pink-dark) 100%);
    color: var(--white);
    box-shadow: var(--shadow-soft);
    font-weight: 600;
}

.next-btn:hover,
.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-pink-dark) 100%);
    font-weight: 700;
    padding: var(--spacing-md) var(--spacing-xl);
}

/* Success Message */
.success-message {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    box-shadow: var(--shadow-card);
    border: 3px solid var(--green-500);
}

.success-content i {
    font-size: 4rem;
    color: var(--green-500);
    margin-bottom: var(--spacing-md);
}

.success-content h2 {
    font-size: 2rem; /* 2xl */
    color: var(--gray-900);
    margin-bottom: var(--spacing-md);
    font-weight: 700;
}

.success-content p {
    font-size: 1.125rem; /* lg */
    color: var(--gray-600);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
    font-weight: 500;
}

.success-note {
    font-style: normal;
    color: var(--primary-pink) !important;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-md);
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .form-container {
        padding: var(--spacing-lg);
    }
    
    .form-header {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    .section-icon {
        width: 60px;
        height: 60px;
    }
    
    .section-icon i {
        font-size: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .follow-up-questions h3::before,
    .follow-up-questions h3::after {
        display: none;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .nav-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .form-header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="url"],
    textarea {
        padding: var(--spacing-sm);
    }
    
    textarea {
        min-height: 100px;
    }
}

/* Loading Animation */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--light-gray);
    border-top-color: var(--accent-pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Form Validation Styles */
.form-group.error input,
.form-group.error textarea {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: var(--spacing-xs);
    display: none;
}

.form-group.error .error-message {
    display: block;
}

/* Accessibility Improvements */
.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;
}

/* Focus Management */
*:focus {
    outline: 2px solid var(--pink-500);
    outline-offset: 2px;
}

input:focus,
textarea:focus,
button:focus {
    outline: none;
}

/* Print Styles */
@media print {
    .form-navigation,
    .progress-container {
        display: none;
    }
    
    .form-section {
        display: block !important;
        page-break-inside: avoid;
    }
}