/* --- TCQ Readiness Scorecard — brand-aligned with Blueprint --- */
:root {
    --py-dark: #12082d;
    --py-dark-soft: #1e0e47;
    --py-secondary: #5c2b8e;
    --py-deep: #3a1a67;
    --py-gold: #d3b56f;
    --py-cream: #fff9f2;
    --py-muted: #c7bad7;

    --bg-color: var(--py-dark);
    --text-color: #f8f4ee;
    --accent-color: var(--py-gold);
    --secondary-color: var(--py-secondary);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    background: linear-gradient(180deg, var(--py-dark) 0%, var(--py-dark-soft) 100%);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    padding: clamp(20px, 4vw, 40px) clamp(16px, 3vw, 24px);
}

/* --- Flow: one screen visible at a time --- */
.flow { max-width: 720px; margin: 0 auto; }

.screen {
    display: none;
    min-height: 60vh;
}

.screen.active {
    display: block;
    animation: screenIn 0.25s ease-out;
}

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

.screen-inner {
    padding: clamp(16px, 3vw, 24px) 0;
}

/* --- Intro screen --- */
.screen-intro-inner {
    text-align: center;
}

.screen-intro-inner .badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color), #ffd700);
    color: #000;
    padding: clamp(6px, 1.2vw, 10px) clamp(16px, 3vw, 24px);
    border-radius: 30px;
    font-size: clamp(0.65rem, 1.2vw, 0.75rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: clamp(12px, 2vw, 20px);
}

.screen-intro-inner h1 {
    font-family: var(--font-heading);
    font-size: clamp(22px, 4vw, 36px);
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: clamp(8px, 1.5vw, 12px);
}

.screen-intro-inner .tagline {
    color: var(--py-muted);
    font-size: clamp(14px, 2vw, 17px);
    margin-bottom: clamp(16px, 3vw, 24px);
}

.intro-body {
    color: var(--py-muted);
    font-size: clamp(14px, 2vw, 16px);
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto clamp(20px, 3vw, 28px);
}

.intro-legend {
    list-style: none;
    text-align: left;
    max-width: 360px;
    margin: 0 auto clamp(28px, 4vw, 36px);
    font-size: clamp(13px, 1.8vw, 14px);
    color: var(--py-muted);
}

.intro-legend li { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.intro-legend li:last-child { border-bottom: none; }
.intro-legend strong { color: var(--accent-color); margin-right: 6px; }

.btn-primary {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    font-weight: 700;
    padding: clamp(14px, 2.5vw, 18px) clamp(32px, 6vw, 48px);
    background: linear-gradient(135deg, var(--accent-color), #ffd700);
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.35);
}

.btn-primary:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

.btn-secondary {
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 1.6vw, 1rem);
    font-weight: 600;
    padding: clamp(12px, 2vw, 14px) clamp(24px, 4vw, 32px);
    background: transparent;
    color: var(--py-muted);
    border: 2px solid rgba(212, 175, 55, 0.5);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.btn-secondary:hover {
    border-color: var(--accent-color);
    color: var(--text-color);
}

/* --- Question screen (one per page) --- */
.question-screen {
    padding-top: clamp(24px, 4vw, 40px);
}

.progress {
    margin-bottom: clamp(20px, 3vw, 28px);
}

.progress-num,
#progress-text,
#progress-text-1 {
    display: block;
    font-size: 13px;
    color: var(--py-muted);
    margin-bottom: 8px;
}

.progress-bar {
    display: block;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #ffd700);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.step-label {
    font-size: clamp(12px, 1.5vw, 13px);
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.question-statement {
    font-family: var(--font-heading);
    font-size: clamp(18px, 2.8vw, 24px);
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
    margin-bottom: clamp(24px, 4vw, 32px);
}

.question-screen .rating {
    margin-bottom: clamp(28px, 4vw, 36px);
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.nav-buttons .btn-prev:only-child,
.nav-buttons .btn-next:only-child { margin-left: auto; }

.hidden { display: none !important; }

/* --- Lead capture screen --- */
.lead-inner {
    max-width: 480px;
    margin: 0 auto;
}

.lead-inner h2 {
    font-family: var(--font-heading);
    font-size: clamp(20px, 3vw, 26px);
    color: var(--accent-color);
    margin-bottom: 12px;
    text-align: center;
}

.lead-intro {
    color: var(--py-muted);
    font-size: clamp(14px, 2vw, 16px);
    text-align: center;
    margin-bottom: clamp(24px, 4vw, 32px);
}

.lead-form .form-group {
    margin-bottom: 20px;
}

.lead-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.lead-form input[type="text"],
.lead-form input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    transition: border-color 0.2s;
}

.lead-form input::placeholder {
    color: var(--py-muted);
    opacity: 0.8;
}

.lead-form input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.lead-error {
    color: #e07c7c;
    font-size: 14px;
    margin-bottom: 16px;
}

.lead-form .nav-buttons {
    margin-top: 28px;
}

/* --- Instructions (legacy / shared) --- */
.instructions {
    max-width: 640px;
    margin: 0 auto clamp(36px, 6vw, 56px);
    padding: clamp(16px, 3vw, 24px);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.instructions h2 {
    font-family: var(--font-heading);
    font-size: clamp(18px, 2.5vw, 22px);
    margin-bottom: 8px;
    color: var(--accent-color);
}

.instructions p { margin-bottom: 12px; color: var(--py-muted); }

.scale-legend {
    list-style: none;
    font-size: clamp(13px, 1.8vw, 15px);
    color: var(--py-muted);
}

.scale-legend li {
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.scale-legend li:last-child { border-bottom: none; }

.scale-legend strong { color: var(--accent-color); margin-right: 6px; }

/* --- Form --- */
.scorecard-form {
    max-width: 720px;
    margin: 0 auto;
}

.step-block {
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 12px;
    padding: clamp(20px, 4vw, 28px);
    margin-bottom: clamp(24px, 4vw, 32px);
    background: rgba(0, 0, 0, 0.2);
}

.step-block legend {
    font-family: var(--font-heading);
    font-size: clamp(17px, 2.5vw, 20px);
    font-weight: 700;
    color: var(--accent-color);
    padding: 0 10px;
    margin-bottom: 6px;
}

.step-desc {
    font-size: clamp(12px, 1.5vw, 13px);
    color: var(--py-muted);
    margin-bottom: 20px;
    font-style: italic;
}

.question {
    margin-bottom: 24px;
}

.question:last-child { margin-bottom: 0; }

.question label {
    display: block;
    font-size: clamp(14px, 1.9vw, 16px);
    color: var(--text-color);
    margin-bottom: 10px;
    line-height: 1.45;
}

.rating {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.rating input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rating label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
}

.rating label:hover {
    border-color: var(--accent-color);
    background: rgba(212, 175, 55, 0.15);
}

.rating input[type="radio"]:checked + label,
.rating input[type="radio"]:focus-visible + label {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.35), rgba(212, 175, 55, 0.15));
    color: var(--accent-color);
}

.form-actions {
    text-align: center;
    margin-top: 40px;
}

.btn-submit {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    font-weight: 700;
    padding: clamp(14px, 2.5vw, 18px) clamp(32px, 6vw, 48px);
    background: linear-gradient(135deg, var(--accent-color), #ffd700);
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.35);
}

.btn-submit:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

/* --- Results screen --- */
.results-inner {
    max-width: 640px;
    margin: 0 auto;
    padding: clamp(24px, 4vw, 36px) 0;
}

.results-email-sent {
    text-align: center;
    font-size: clamp(14px, 2vw, 15px);
    color: var(--py-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

.results-email-sent.results-email-cta {
    font-size: clamp(15px, 2.2vw, 17px);
    color: var(--accent-color);
    font-weight: 600;
}

.results-email-hint {
    text-align: center;
    font-size: clamp(14px, 2vw, 16px);
    color: var(--py-muted);
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto;
}

.results-inner h2 {
    font-family: var(--font-heading);
    font-size: clamp(20px, 3vw, 26px);
    color: var(--accent-color);
    margin-bottom: 24px;
    text-align: center;
}

.results h2 {
    font-family: var(--font-heading);
    font-size: clamp(20px, 3vw, 26px);
    color: var(--accent-color);
    margin-bottom: 24px;
    text-align: center;
}

.overall-score-card {
    text-align: center;
    padding: 24px;
    background: rgba(212, 175, 55, 0.08);
    border-radius: 10px;
    margin-bottom: 28px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.score-label {
    display: block;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--py-muted);
    margin-bottom: 8px;
}

.score-value {
    font-family: var(--font-heading);
    font-size: clamp(36px, 6vw, 52px);
    font-weight: 700;
    color: var(--accent-color);
}

.score-max { color: var(--py-muted); font-size: 1.2em; }

.interpretation {
    margin-top: 12px;
    font-size: clamp(14px, 2vw, 16px);
    color: var(--text-color);
    line-height: 1.5;
}

.step-scores { margin-bottom: 28px; }

.step-scores h3,
.bottleneck-card h3 {
    font-family: var(--font-heading);
    font-size: clamp(16px, 2.2vw, 18px);
    color: var(--text-color);
    margin-bottom: 12px;
}

#step-scores-list {
    list-style: none;
}

#step-scores-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    font-size: 14px;
}

#step-scores-list li .step-name { color: var(--py-muted); }

#step-scores-list li .step-score { font-weight: 600; color: var(--accent-color); }

#step-scores-list li .step-band {
    font-size: 12px;
    color: var(--py-muted);
    margin-left: 8px;
}

.bottleneck-card {
    padding: 20px;
    background: rgba(92, 43, 142, 0.2);
    border: 1px solid rgba(92, 43, 142, 0.4);
    border-radius: 10px;
}

.bottleneck-card p {
    color: var(--py-muted);
    margin-bottom: 12px;
    font-size: 14px;
}

.bottleneck-value {
    font-family: var(--font-heading);
    font-size: clamp(18px, 2.5vw, 22px);
    font-weight: 700;
    color: var(--accent-color);
}

@media (max-width: 480px) {
    .rating label { min-width: 36px; height: 36px; font-size: 14px; }
}
