/* ==========================================================
   QUIZ SITE — CLEAN, GROUNDED, NO AI SLOP
   ========================================================== */

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

:root {
    --bg:       #101010;
    --bg-raise: #181818;
    --bg-card:  #161616;
    --border:   #252525;
    --border-h: #333;
    --text:     #e8e8e8;
    --text-2:   #999;
    --text-3:   #5e5e5e;
    --accent:   #8b5cf6;
    --accent-d: #7340e0;
    --accent-bg:#1a1528;
    --radius:   12px;
}

html { font-size: 16px; }

body {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* ── Layout ─────────────────────────────── */

.wrap {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.wrap--narrow { max-width: 640px; }

/* ── Top bar ────────────────────────────── */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    max-width: 880px;
    margin: 0 auto;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.brand-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-h);
}

.brand--sm .brand-img {
    width: 30px;
    height: 30px;
}

.brand-name {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.02em;
    color: var(--text);
}

.brand--sm .brand-name {
    font-size: 0.9rem;
}

.topbar-step {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-3);
    letter-spacing: 1px;
}

.back-link {
    background: none;
    border: none;
    color: var(--text-2);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.15s;
}

.back-link:hover { color: var(--text); }

/* ── Screens ────────────────────────────── */

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

.screen.active {
    display: block;
    animation: screenIn 0.35s ease;
}

@keyframes screenIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================
   LANDING
   ========================================================== */

.landing-head {
    padding-top: 80px;
    margin-bottom: 56px;
    max-width: 560px;
}

@media (max-width: 600px) {
    .landing-head { padding-top: 48px; margin-bottom: 40px; }
}

.eyebrow {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

.landing-head h1 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    color: #f5f5f5;
}

.lead {
    font-size: 1.05rem;
    color: var(--text-2);
    line-height: 1.7;
    max-width: 480px;
}

/* ── Path Cards ─────────────────────────── */

.path-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 56px;
}

@media (max-width: 640px) {
    .path-grid { grid-template-columns: 1fr; }
}

.path-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px 28px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    display: flex;
    flex-direction: column;
}

.path-card:hover {
    border-color: var(--border-h);
    background: var(--bg-raise);
}

.pc-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.pc-number {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-bg);
    border-radius: 8px;
    letter-spacing: 0.5px;
}

.pc-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-3);
    letter-spacing: 1.5px;
}

.path-card h2 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 12px;
    color: #f0f0f0;
}

.path-card p {
    font-size: 0.9rem;
    color: var(--text-2);
    line-height: 1.65;
    margin-bottom: 20px;
    flex-grow: 1;
}

.pc-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
}

.pc-tags li {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-3);
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    letter-spacing: 0.02em;
}

.pc-btn {
    width: 100%;
    padding: 14px 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pc-btn:hover { background: var(--accent-d); }

.pc-btn span {
    transition: transform 0.15s;
}

.path-card:hover .pc-btn span {
    transform: translateX(3px);
}

.skip-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-3);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s;
}

.skip-link:hover {
    color: var(--text-2);
}

/* ── Landing Footer ─────────────────────── */

.landing-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-3);
}

.dot { opacity: 0.4; }

/* ==========================================================
   QUIZ
   ========================================================== */

.quiz-header {
    padding-top: 32px;
    margin-bottom: 32px;
}

.quiz-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.45rem;
    font-weight: 400;
    margin-bottom: 8px;
    color: #f0f0f0;
}

.quiz-subtitle {
    font-size: 0.9rem;
    color: var(--text-2);
    line-height: 1.6;
}

/* ── Progress ───────────────────────────── */

.progress { margin-bottom: 40px; }

.progress-track {
    width: 100%;
    height: 3px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 20%;
    background: var(--accent);
    border-radius: 99px;
    transition: width 0.4s ease;
}

/* ── Question ───────────────────────────── */

.q-area {
    transition: opacity 0.25s, transform 0.25s;
}

.q-area.out-left  { opacity: 0; transform: translateX(-20px); }
.q-area.out-right { opacity: 0; transform: translateX(20px); }

.q-text {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 24px;
    color: #eee;
}

/* ── Answer List ────────────────────────── */

.a-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.a-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
}

.a-item:hover {
    border-color: var(--border-h);
    background: var(--bg-raise);
}

.a-item.selected {
    border-color: var(--accent);
    background: var(--accent-bg);
}

.a-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border-h);
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.15s;
}

.a-item.selected .a-radio {
    border-color: var(--accent);
}

.a-radio::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--accent);
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(.4,1.4,.6,1);
}

.a-item.selected .a-radio::after {
    transform: scale(1);
}

.a-label {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
}

/* ── Quiz Footer ────────────────────────── */

.quiz-footer {
    margin-top: 28px;
}

.btn-prev {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-2);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.btn-prev:hover:not(:disabled) {
    border-color: var(--border-h);
    color: var(--text);
}

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

/* ==========================================================
   RESULT
   ========================================================== */

.result-wrap {
    padding-top: 80px;
    text-align: center;
}

@media (max-width: 600px) {
    .result-wrap { padding-top: 48px; }
}

.r-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 28px;
}

.r-heading {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(1.4rem, 3.5vw, 1.9rem);
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 16px;
    color: #f0f0f0;
}

.r-body {
    font-size: 1rem;
    color: var(--text-2);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Recommendation Card ────────────────── */

.r-rec {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 32px;
    margin-bottom: 28px;
    text-align: center;
}

.r-rec-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 16px;
}

.r-rec-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 10px;
    color: #f0f0f0;
}

.r-rec-desc {
    font-size: 0.9rem;
    color: var(--text-2);
    line-height: 1.65;
    margin-bottom: 28px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 36px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}

.btn-cta:hover {
    background: var(--accent-d);
    transform: translateY(-1px);
}

.btn-retake {
    background: none;
    border: none;
    color: var(--text-3);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 8px 16px;
    transition: color 0.15s;
}

.btn-retake:hover { color: var(--text-2); }

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 600px) {
    .wrap { padding: 0 18px 60px; }
    .path-card { padding: 24px 20px 22px; }
    .path-card h2 { font-size: 1.2rem; }
    .r-rec { padding: 28px 20px; }
    .btn-cta { width: 100%; justify-content: center; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
