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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Header Styles */
header {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #008B8B 0%, #4B0082 50%, #FF7F50 100%);
    color: white;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Mobile-First Responsive Grid System */
.stages-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Desktop Grid - Three Columns */
@media (min-width: 768px) {
    .stages-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    .container {
        padding: 0 2rem;
    }
    
    header h1 {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 1.4rem;
    }
}

/* Stage Containers */
.stage {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    border-top: 4px solid;
}

.stage:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Stage-Specific Color Theming */
.stage-1 {
    border-top-color: #008B8B;
    background: linear-gradient(to bottom, rgba(0, 139, 139, 0.02) 0%, white 100%);
}

.stage-2 {
    border-top-color: #4B0082;
    background: linear-gradient(to bottom, rgba(75, 0, 130, 0.02) 0%, white 100%);
}

.stage-3 {
    border-top-color: #FF7F50;
    background: linear-gradient(to bottom, rgba(255, 127, 80, 0.02) 0%, white 100%);
}

/* Stage Headers */
.stage-header {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid;
}

/* Stage-Specific Header Colors */
.stage-1 .stage-header {
    border-bottom-color: #008B8B;
    color: #008B8B;
}

.stage-2 .stage-header {
    border-bottom-color: #4B0082;
    color: #4B0082;
}

.stage-3 .stage-header {
    border-bottom-color: #FF7F50;
    color: #FF7F50;
}

/* Cards Container */
.cards-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* AI Tool Cards */
.tool-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #ced4da;
}

.tool-card:focus {
    outline: 2px solid #4B0082;
    outline-offset: 2px;
}

/* Card Header */
.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.card-icon {
    width: 48px;
    height: 48px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f8f9fa;
    flex-shrink: 0;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: #212529;
}

/* Card Content */
.card-description {
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.card-helper-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0;
}

.helper-label {
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #495057;
    font-size: 0.875rem;
}

.helper-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.helper-list li {
    position: relative;
    margin-bottom: 0.125rem;
    padding-left: 0.75rem;
    font-weight: 300;
}

.helper-list li::before {
    content: "•";
    color: #adb5bd;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Card States - Stage-specific clicked styles */
.stage-1 .tool-card.clicked {
    background: linear-gradient(135deg, rgba(0, 139, 139, 0.05) 0%, white 100%);
    border-color: #008B8B;
    border-width: 2px;
    box-shadow: 0 4px 16px rgba(0, 139, 139, 0.2);
}

.stage-1 .tool-card.clicked .card-icon {
    background: linear-gradient(135deg, #008B8B 0%, #20b2aa 100%);
    color: white;
}

.stage-2 .tool-card.clicked {
    background: linear-gradient(135deg, rgba(75, 0, 130, 0.05) 0%, white 100%);
    border-color: #4B0082;
    border-width: 2px;
    box-shadow: 0 4px 16px rgba(75, 0, 130, 0.2);
}

.stage-2 .tool-card.clicked .card-icon {
    background: linear-gradient(135deg, #4B0082 0%, #6a4c93 100%);
    color: white;
}

.stage-3 .tool-card.clicked {
    background: linear-gradient(135deg, rgba(255, 127, 80, 0.05) 0%, white 100%);
    border-color: #FF7F50;
    border-width: 2px;
    box-shadow: 0 4px 16px rgba(255, 127, 80, 0.2);
}

.stage-3 .tool-card.clicked .card-icon {
    background: linear-gradient(135deg, #FF7F50 0%, #ff6347 100%);
    color: white;
}

/* Accessibility and Focus */
.stage:focus-within {
    outline: 2px solid #4B0082;
    outline-offset: 2px;
}

/* Enhanced Accessibility */
.stage-header:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .stage {
        border-width: 2px;
        border-style: solid;
    }
    
    .stage-1 {
        border-color: #008B8B;
    }
    
    .stage-2 {
        border-color: #4B0082;
    }
    
    .stage-3 {
        border-color: #FF7F50;
    }
}

/* Screen reader support */
.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;
}

/* Keyboard navigation indicators */
.stage:focus,
.stage-header:focus {
    z-index: 1;
}

/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #4B0082;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Performance Optimization */
.stages-grid,
.stage {
    will-change: transform;
}

/* Optimize font loading */
body {
    font-display: swap;
}

/* Optimize animations */
.stage,
.stage-header {
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Critical CSS - Inline in production */
/* This CSS should be inlined in the HTML head for optimal TTFB */
/* File size optimized for <50KB gzipped target */

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1001;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-content h2 {
    margin: 0 0 1rem 0;
    color: #4B0082;
    font-size: 1.5rem;
}

.modal-content p {
    margin: 0 0 1.5rem 0;
    color: #495057;
    font-size: 1rem;
}

.modal-button {
    background: linear-gradient(135deg, #4B0082 0%, #6a4c93 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(75, 0, 130, 0.3);
}

.modal-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(75, 0, 130, 0.4);
}

.modal-button:focus {
    outline: 2px solid #4B0082;
    outline-offset: 2px;
}

.modal-button:active {
    transform: translateY(0);
}

/* CTA Section Styles */
.cta-section {
    margin: 3rem 0;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, white 100%);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-height: 15vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-content {
    max-width: 600px;
    width: 100%;
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    color: #4B0082;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.0rem;
    color: #495057;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.waitlist-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    position: relative;
}

.waitlist-form input[type="email"] {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.waitlist-form input[type="email"]:focus {
    outline: none;
    border-color: #4B0082;
    box-shadow: 0 0 0 3px rgba(75, 0, 130, 0.1);
}

.waitlist-form input[type="email"]:invalid {
    border-color: #dc3545;
}

.cta-button {
    background: linear-gradient(135deg, #FF7F50 0%, #ff6347 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 127, 80, 0.3);
}

.cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 127, 80, 0.4);
}

.cta-button:focus {
    outline: 2px solid #FF7F50;
    outline-offset: 2px;
}

.success-message {
    display: none;
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-weight: 500;
}

.success-message.show {
    display: block;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* Feedback Section Styles */
.feedback-section {
    margin: 2rem 0 0 0;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-top: 4px solid #4B0082;
}

.feedback-content {
    max-width: 800px;
    margin: 0 auto;
}

.feedback-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #4B0082;
    margin-bottom: 0.5rem;
    text-align: center;
}

.feedback-description {
    text-align: center;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Rating Buttons */
.rating-group {
    text-align: center;
    margin-bottom: 0.5rem;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.rating-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.rating-btn {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-btn:hover {
    border-color: #4B0082;
    background: rgba(75, 0, 130, 0.05);
}

.rating-btn.selected {
    background: #4B0082;
    border-color: #4B0082;
    color: white;
}

.rating-btn:focus {
    outline: 2px solid #4B0082;
    outline-offset: 2px;
}

/* Tools Checkboxes */
.tools-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.tools-category {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border-left: 3px solid;
}

.tools-category[data-stage="find-company"] {
    border-left-color: #008B8B;
}

.tools-category[data-stage="build-application"] {
    border-left-color: #4B0082;
}

.tools-category[data-stage="nail-interview"] {
    border-left-color: #FF7F50;
}

.category-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

.checkbox-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
    cursor: pointer;
    font-size: 0.9rem;
    color: #495057;
    padding: 0.25rem 0;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #ced4da;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background: white;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #4B0082;
    border-color: #4B0082;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Checkbox hover and focus states */
.checkbox-label:hover .checkmark {
    border-color: #4B0082;
    box-shadow: 0 0 0 1px rgba(75, 0, 130, 0.1);
}

.checkbox-label input[type="checkbox"]:focus + .checkmark {
    outline: 2px solid #4B0082;
    outline-offset: 1px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tools-category {
        border-width: 2px;
    }
    
    .checkbox-label {
        border: 1px solid transparent;
    }
    
    .checkbox-label:hover {
        border-color: currentColor;
    }
}

/* Comment Field */
.comment-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comment-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s ease;
}

.comment-group textarea:focus {
    outline: none;
    border-color: #4B0082;
    box-shadow: 0 0 0 3px rgba(75, 0, 130, 0.1);
}

.character-count {
    text-align: right;
    font-size: 0.875rem;
    color: #6c757d;
}

/* Submit Button */
.feedback-submit-btn {
    background: linear-gradient(135deg, #4B0082 0%, #6a4c93 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: center;
    max-width: 200px;
}

.feedback-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(75, 0, 130, 0.3);
}

.feedback-submit-btn:focus {
    outline: 2px solid #4B0082;
    outline-offset: 2px;
}

.feedback-submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.feedback-success {
    display: none;
    background: #d4edda;
    color: #155724;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    margin-top: 1rem;
}

.feedback-success.show {
    display: block;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .cta-section {
        padding: 2rem 1rem;
        min-height: auto;
    }
    
    .cta-title {
        font-size: 1.5rem;
    }
    
    .tools-group {
        gap: 0.5rem;
    }
    
    .checkbox-container {
        grid-template-columns: 1fr;
    }
    
    .rating-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .feedback-section {
        padding: 1.25rem 1rem;
    }
}

@media (min-width: 480px) and (max-width: 768px) {
    .checkbox-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .stage,
    .stages-grid,
    .modal,
    .modal-content,
    .modal-button {
        transition: none;
        will-change: auto;
    }
    
    .stage:hover,
    .modal-button:hover {
        transform: none;
    }
    
    .modal-overlay {
        backdrop-filter: none;
    }
} 