/* ============================================
   UTILITY SITE: Why Am I Stuck?
   Your Clarity Reset - Minimalist, Calm Design
   ============================================ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Color Palette */
:root {
    --bg-primary: #f5f5f2;
    --bg-card: #ffffff;
    --text-primary: #2c2c2a;
    --text-secondary: #666663;
    --accent-primary: #6b9d8e;
    --accent-secondary: #7a9fc1;
    --border-light: #e8e8e5;
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.08);
    --spacing-unit: 1rem;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
}

/* Container */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    text-align: center;
    padding: 3rem 0 2rem 0;
    animation: fadeIn 0.6s ease-out;
}

.hero-content {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 3rem 2rem;
    box-shadow: var(--shadow-soft);
}

.hero h1 {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero-subheadline {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
    min-width: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: var(--accent-primary);
    color: white;
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover:not(:disabled) {
    background-color: #5a8a7a;
    box-shadow: var(--shadow-medium);
}

.btn-primary:disabled {
    background-color: #d0d0cc;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    background-color: white;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.btn-secondary:hover {
    background-color: var(--accent-primary);
    color: white;
}

.btn-back {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-back:hover {
    color: var(--text-primary);
}

.btn-back:disabled {
    color: #d0d0cc;
    cursor: not-allowed;
}

/* ============================================
   QUIZ SECTION
   ============================================ */

.quiz {
    flex: 1;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.4s ease-out;
}

.quiz.hidden {
    display: none;
}

.quiz-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.progress-bar {
    flex: 1;
    height: 3px;
    background-color: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--accent-secondary);
    transition: width 0.4s ease;
}

.question-counter {
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: nowrap;
    min-width: 50px;
    text-align: right;
}

.question-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-soft);
    flex: 1;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s ease-out;
}

.question-card h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 2rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    flex: 1;
}

.option {
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-align: left;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.option:hover {
    border-color: var(--accent-primary);
    background-color: white;
}

.option.selected {
    border-color: var(--accent-primary);
    background-color: var(--accent-primary);
    color: white;
    font-weight: 500;
}

.quiz-button-group {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: auto;
}

#backBtn {
    flex: 0;
}

#nextBtn {
    flex: 1;
}

/* ============================================
   RESULT SECTION
   ============================================ */

.result {
    animation: fadeIn 0.5s ease-out;
}

.result.hidden {
    display: none;
}

.result-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-soft);
}

.result-card h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--accent-primary);
    line-height: 1.3;
}

.result-section {
    margin-bottom: 2rem;
}

.result-section h3 {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.result-section p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.result-truth {
    font-style: italic;
    color: var(--accent-secondary);
    font-weight: 500;
    padding: 0.75rem 0;
}

.result-card #restartBtn {
    margin-top: 1.5rem;
    width: 100%;
}

/* ============================================
   EMAIL CAPTURE SECTION
   ============================================ */

.email-capture {
    margin-top: 2rem;
    animation: fadeIn 0.5s ease-out;
}

.email-capture.hidden {
    display: none;
}

.email-container {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    border-top: 3px solid var(--accent-secondary);
}

.email-container h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.email-container > p:first-of-type + p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.email-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

#emailInput {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
    min-height: 48px;
}

#emailInput:focus {
    outline: none;
    border-color: var(--accent-primary);
    background-color: white;
}

#emailInput::placeholder {
    color: #999996;
}

.email-form button {
    white-space: nowrap;
}

.email-privacy {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

.email-privacy a {
    color: var(--accent-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-primary);
}

.email-privacy a:hover {
    color: var(--accent-secondary);
    border-bottom-color: var(--accent-secondary);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.disclaimer {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-style: italic;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-secondary);
}

.footer-brand {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   UTILITIES & ANIMATIONS
   ============================================ */

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 480px) {
    .container {
        padding: 1.5rem 1rem;
    }

    .hero-content {
        padding: 2rem 1.5rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .question-card {
        padding: 1.75rem 1.5rem;
    }

    .question-card h2 {
        font-size: 1.15rem;
        margin-bottom: 1.5rem;
    }

    .option {
        padding: 0.875rem 1rem;
    }

    .result-card {
        padding: 1.75rem 1.5rem;
    }

    .result-card h2 {
        font-size: 1.5rem;
    }

    .email-form {
        flex-direction: column;
    }

    .email-form button {
        width: 100%;
    }

    .footer-links {
        gap: 1rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states for keyboard navigation */
button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 3px solid var(--accent-secondary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    .option {
        border-width: 3px;
    }

    .result-card h2 {
        font-weight: 700;
    }
}
