/* ===================================================================
   HUMAN MAP – Assessment Styles
   === */
@import 'variables.css';
@import 'main.css';

/* ── Assessment layout ── */
.hm-assessment {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hm-assessment__main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--hm-space-8) var(--hm-space-6);
    padding-top: var(--hm-space-12);
}

/* ── Progress bar ── */
.hm-progress {
    position: sticky;
    top: 61px; /* below header */
    z-index: 100;
    background: var(--hm-bg);
    border-bottom: 1px solid var(--hm-border);
    padding: var(--hm-space-3) var(--hm-space-6);
}

.hm-progress__inner {
    max-width: var(--hm-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--hm-space-4);
}

.hm-progress__track {
    flex: 1;
    height: 3px;
    background: var(--hm-border-light);
    border-radius: var(--hm-radius-full);
    overflow: hidden;
}

.hm-progress__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--hm-gold-dark), var(--hm-gold-light));
    border-radius: var(--hm-radius-full);
    transition: width 0.5s var(--hm-ease);
}

.hm-progress__label {
    font-size: 0.75rem;
    color: var(--hm-text-dim);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.hm-progress__phase {
    font-size: 0.75rem;
    color: var(--hm-gold);
    font-weight: 500;
    white-space: nowrap;
}

/* ── Question container ── */
.hm-question-wrap {
    width: 100%;
    max-width: 680px;
    position: relative;
}

/* Question transitions */
.hm-question {
    width: 100%;
    animation: qIn 0.35s var(--hm-ease) both;
}
.hm-question.is-leaving {
    animation: qOut 0.25s var(--hm-ease) both;
    pointer-events: none;
}

@keyframes qIn {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: none; }
}
@keyframes qOut {
    from { opacity: 1; transform: none; }
    to   { opacity: 0; transform: translateX(-24px); }
}

/* ── Question card ── */
.hm-question__card {
    background: var(--hm-bg-card);
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius-xl);
    padding: var(--hm-space-8);
    margin-bottom: var(--hm-space-6);
}

.hm-question__top {
    display: flex;
    align-items: center;
    gap: var(--hm-space-3);
    margin-bottom: var(--hm-space-3);
}

.hm-question__back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    border: 1px solid var(--hm-border);
    background: transparent;
    color: var(--hm-text-dim);
    cursor: pointer;
    flex-shrink: 0;
    transition: color var(--hm-dur) var(--hm-ease), border-color var(--hm-dur) var(--hm-ease);
}
.hm-question__back:hover { color: var(--hm-gold); border-color: var(--hm-gold); }

.hm-question__num {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hm-gold);
}

.hm-question__text {
    font-family: var(--hm-font-display);
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    font-weight: 600;
    line-height: 1.45;
    color: var(--hm-white);
    margin-bottom: var(--hm-space-2);
}

.hm-question__hint {
    font-size: 0.8125rem;
    color: var(--hm-text-muted);
    line-height: 1.5;
    margin-bottom: var(--hm-space-6);
}

/* ── Likert 7 ── */
.hm-likert {
    display: flex;
    flex-direction: column;
    gap: var(--hm-space-4);
}

.hm-likert__anchors {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--hm-text-muted);
    padding: 0 var(--hm-space-2);
}

.hm-likert__dots {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--hm-space-2);
}

.hm-dot {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--hm-border-hover);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--hm-text-dim);
    cursor: pointer;
    transition: all 0.2s var(--hm-ease);
    flex-shrink: 0;
}
.hm-dot:hover {
    border-color: var(--hm-gold);
    color: var(--hm-gold);
    background: var(--hm-gold-glow);
    transform: scale(1.12);
}
.hm-dot.is-selected {
    border-color: var(--hm-gold);
    background: var(--hm-gold);
    color: #050505;
    transform: scale(1.15);
    box-shadow: 0 0 16px rgba(255, 212, 38,0.45);
}

/* ── Scenario cards ── */
.hm-cards--2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--hm-space-4);
}

.hm-cards--4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--hm-space-3);
}

.hm-cards--3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--hm-space-3);
}

@media (max-width: 600px) {
    .hm-cards--2 {
        grid-template-columns: 1fr;
    }
    .hm-cards--3 {
        grid-template-columns: 1fr;
    }
    .hm-cards--4 {
        grid-template-columns: 1fr;
    }
}

.hm-card-opt {
    background: var(--hm-bg-elevated);
    border: 1.5px solid var(--hm-border);
    border-radius: var(--hm-radius-lg);
    padding: var(--hm-space-6) var(--hm-space-6);
    cursor: pointer;
    transition: all 0.2s var(--hm-ease);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: var(--hm-space-3);
    min-height: 90px;
    word-break: break-word;
    overflow-wrap: break-word;
}
.hm-card-opt:hover {
    border-color: var(--hm-gold);
    background: var(--hm-bg-card);
    transform: translateY(-2px);
    box-shadow: var(--hm-shadow-gold);
}
.hm-card-opt.is-selected {
    border-color: var(--hm-gold);
    background: linear-gradient(135deg, var(--hm-bg-card), rgba(255, 212, 38,0.08));
    box-shadow: 0 0 0 1px var(--hm-gold), var(--hm-shadow-gold);
}
.hm-card-opt__label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--hm-white);
    line-height: 1.3;
}
.hm-card-opt__desc {
    font-size: 0.8125rem;
    color: var(--hm-text-dim);
    line-height: 1.55;
}

/* ── Phase interstitial ── */
.hm-interstitial {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: var(--hm-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: var(--hm-space-6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--hm-ease);
}
.hm-interstitial.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hm-interstitial__icon {
    font-size: 3.5rem;
    line-height: 1;
    animation: iconPulse 2s ease-in-out infinite;
}
@keyframes iconPulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50%       { transform: scale(1.08); opacity: 1; }
}

.hm-interstitial__phase {
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hm-gold);
    font-weight: 600;
}

.hm-interstitial__title {
    font-family: var(--hm-font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--hm-white);
    text-align: center;
}

.hm-interstitial__sub {
    font-size: 1rem;
    color: var(--hm-text-dim);
    text-align: center;
    max-width: 380px;
}

.hm-interstitial__progress {
    width: 200px;
    height: 2px;
    background: var(--hm-border);
    border-radius: 2px;
    overflow: hidden;
}
.hm-interstitial__progress-fill {
    height: 100%;
    background: var(--hm-gold);
    width: 0%;
    transition: width 1.8s linear;
}

/* ── Finish screen ── */
.hm-finish {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--hm-space-6);
    padding: var(--hm-space-12) var(--hm-space-6);
}
.hm-finish__icon { font-size: 4rem; }
.hm-finish__spin {
    width: 48px; height: 48px;
    border: 3px solid var(--hm-border);
    border-top-color: var(--hm-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 640px) {
    .hm-question__card { padding: var(--hm-space-6); }
    .hm-cards--2 { grid-template-columns: 1fr; }
    .hm-cards--4 { grid-template-columns: 1fr 1fr; }
    .hm-cards--3 { grid-template-columns: 1fr; }
    .hm-dot { width: 38px; height: 38px; }
    .hm-likert__dots { gap: var(--hm-space-1); }
}

@media (max-width: 400px) {
    .hm-dot { width: 34px; height: 34px; font-size: 0.75rem; }
}
