/* school-quiz/assets/css/quiz.css */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
    --navy:   #0f1b2d;
    --green:  #22c55e;
    --amber:  #f59e0b;
    --purple: #7c3aed;
    --indigo: #4f46e5;
    --purple-light: #f5f3ff;
    --purple-soft:  #ede9fe;
    --text:   #1e293b;
    --muted:  #64748b;
    --white:  #ffffff;
    --bg:     #f8fafc;
    --border: #e2e8f0;
    --shadow: 0 10px 40px rgba(124,58,237,.12);
    --shadow-hover: 0 20px 50px rgba(124,58,237,.18);
    --radius-card: 1.75rem;
    --radius-btn:  1.25rem;
    --radius-input:1rem;
}

*, *::before, *::after { box-sizing: border-box; -webkit-font-smoothing: antialiased; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    background-image:
        radial-gradient(ellipse at 0% 0%,   rgba(124,58,237,.06) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(34,197,94,.04) 0%, transparent 50%);
    color: var(--text);
    margin: 0; padding: 0; min-height: 100vh;
}

h1,h2,h3,h4,.font-heading { font-family: 'Sora', sans-serif; color: var(--navy); letter-spacing: -.02em; }

/* ─── Layout ─────────────────────────────────────────────── */
.container { max-width: 860px; margin: 0 auto; padding: 3rem 1.25rem; }
.text-center { text-align: center; }

/* ─── Card ───────────────────────────────────────────────── */
.card {
    background: var(--white);
    border-radius: var(--radius-card);
    padding: 3.5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(124,58,237,.07);
    transition: box-shadow .3s ease;
}
.card:hover { box-shadow: var(--shadow-hover); }

/* ─── Logo ───────────────────────────────────────────────── */
.logo-container { text-align: center; margin-bottom: 2.5rem; }
.logo { height: 42px; }

/* ─── Trust bar ──────────────────────────────────────────── */
.trust-bar {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: .75rem 1.5rem; margin: 1.75rem 0 0;
}
.trust-bar span {
    display: flex; align-items: center; gap: .4rem;
    font-size: .82rem; font-weight: 600; color: var(--muted);
    background: var(--bg); border: 1px solid var(--border);
    padding: .35rem .9rem; border-radius: 999px;
}

/* ─── Form divider ───────────────────────────────────────── */
.form-divider {
    display: flex; align-items: center; gap: 1rem;
    margin: 2.5rem 0 2rem; color: var(--muted); font-size: .85rem; font-weight: 600;
}
.form-divider::before, .form-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ─── Form grid ──────────────────────────────────────────── */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1.75rem;
}
.form-col-2 { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; }

.form-label {
    display: flex; align-items: center; gap: .45rem;
    margin-bottom: .55rem; font-weight: 600; font-size: .88rem; color: var(--navy);
}
.icon-purple { color: var(--purple); font-size: .85em; }
.optional { color: var(--muted); font-weight: 400; font-size: .82em; }

.form-control {
    width: 100%; padding: .9rem 1.1rem;
    border-radius: var(--radius-input);
    background: var(--bg); border: 1.5px solid var(--border);
    color: var(--text); font-size: .95rem; font-family: 'DM Sans', sans-serif;
    transition: border-color .2s, box-shadow .2s;
    appearance: none; -webkit-appearance: none;
}
.form-control:focus {
    outline: none; border-color: var(--purple);
    box-shadow: 0 0 0 4px rgba(124,58,237,.1);
    background: var(--white);
}
select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }

/* ─── Submit area ────────────────────────────────────────── */
.form-submit-area { margin-top: 2rem; }

.btn-full { width: 100%; }
.btn-xl { padding: 1.1rem 2rem; font-size: 1.05rem; }

.privacy-note {
    text-align: center; margin-top: .9rem;
    font-size: .82rem; color: var(--muted);
    display: flex; align-items: center; justify-content: center; gap: .4rem;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .65rem;
    padding: .9rem 2rem; border-radius: var(--radius-btn);
    font-family: 'Sora', sans-serif; font-weight: 700; font-size: .95rem;
    cursor: pointer; transition: all .3s cubic-bezier(.34,1.56,.64,1);
    border: none; text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--purple), var(--indigo));
    color: var(--white); box-shadow: 0 8px 20px rgba(124,58,237,.3);
}
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 16px 30px rgba(124,58,237,.38); color: var(--white); }

.btn-secondary {
    background: var(--purple-light); color: var(--purple);
    border: 1.5px solid var(--purple-soft);
}
.btn-secondary:hover { background: var(--purple-soft); transform: translateY(-2px); }

.btn-green {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: var(--white); box-shadow: 0 8px 20px rgba(34,197,94,.3);
}
.btn-green:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(34,197,94,.4); color: var(--white); }

.btn-wa {
    background: #25D366; color: var(--white);
    box-shadow: 0 8px 20px rgba(37,211,102,.3);
}
.btn-wa:hover { transform: translateY(-3px); background: #20b858; color: var(--white); }

/* ─── Progress ───────────────────────────────────────────── */
.progress-wrap { margin-bottom: 2.5rem; }
.progress-meta {
    display: flex; justify-content: space-between;
    font-size: .8rem; font-weight: 700; color: var(--muted);
    margin-bottom: .5rem;
}
.progress-container {
    background: var(--bg); border-radius: 999px; height: 9px;
    overflow: hidden; border: 1px solid var(--purple-soft);
}
.progress-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--purple), #a855f7);
    border-radius: 999px; transition: width .8s cubic-bezier(.65,0,.35,1);
}

/* ─── Hero copy ──────────────────────────────────────────── */
.hero-tag {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .5rem 1.1rem; background: var(--navy); color: var(--white);
    border-radius: .9rem; font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1.5rem;
}
.hero-title {
    font-family: 'Sora', sans-serif; font-size: 3rem; font-weight: 800;
    line-height: 1.15; margin: 0 0 1.25rem; color: var(--navy);
}
.hero-description {
    font-size: 1.1rem; color: var(--muted); line-height: 1.75;
    margin: 0 0 1.75rem; max-width: 560px; margin-left: auto; margin-right: auto;
}

/* ─── Step tag & intro copy ──────────────────────────────── */
.step-intro { margin-bottom: 2rem; }
.step-fun-copy {
    font-size: 1rem; color: var(--muted); margin-top: .5rem; font-style: italic;
}

/* ─── Option cards ───────────────────────────────────────── */
.option-group { display: flex; flex-direction: column; gap: .85rem; }

.option-card {
    background: var(--white); border: 1.5px solid var(--border);
    border-radius: 1.1rem; padding: 1.1rem 1.4rem;
    cursor: pointer; transition: all .25s ease;
    display: flex; align-items: center; gap: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.option-card:hover { border-color: var(--purple); background: var(--purple-light); transform: translateX(4px); }
.option-card.selected {
    border-color: var(--purple); background: var(--purple);
    color: var(--white); box-shadow: 0 8px 20px rgba(124,58,237,.22);
}
.option-card input[type="radio"],
.option-card input[type="checkbox"] {
    width: 1.25rem; height: 1.25rem; cursor: pointer; flex-shrink: 0;
    accent-color: var(--white);
}
.option-text { font-weight: 600; font-size: .97rem; }
.option-card.selected .option-text { color: var(--white); }

/* ─── Quiz step animation ────────────────────────────────── */
.quiz-step { display: none; }
.quiz-step.active { display: block; animation: slideIn .5s cubic-bezier(.16,1,.3,1); }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }

/* ─── Step nav buttons ───────────────────────────────────── */
.step-nav {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 2.5rem; gap: 1rem;
}
.step-nav-right { margin-left: auto; }

/* ─── Results — score gauge ──────────────────────────────── */
.score-gauge-wrap { position: relative; width: 220px; height: 220px; margin: 0 auto 2rem; }
.score-gauge-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-bg { fill: none; stroke: var(--purple-soft); stroke-width: 14; }
.gauge-arc {
    fill: none; stroke: url(#gaugeGrad); stroke-width: 14;
    stroke-linecap: round;
    stroke-dasharray: 596; stroke-dashoffset: 596;
    transition: stroke-dashoffset 1.8s cubic-bezier(.16,1,.3,1);
}
.gauge-center {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.score-value { font-family: 'Sora',sans-serif; font-size: 3.5rem; font-weight: 800; color: var(--purple); line-height: 1; }
.score-label { font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; margin-top: .25rem; }

/* ─── Tier badge ─────────────────────────────────────────── */
.tier-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .6rem 1.5rem; border-radius: 999px;
    font-family: 'Sora',sans-serif; font-weight: 700; font-size: 1rem;
    margin: 1rem auto 1.5rem; background: var(--purple-light);
    color: var(--purple); border: 1.5px solid var(--purple-soft);
}

/* ─── Index grid ─────────────────────────────────────────── */
.index-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2rem; }
.index-item {
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 1.25rem; padding: 1.5rem 1rem; text-align: center;
    transition: all .3s ease;
}
.index-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); background: var(--white); border-color: var(--purple); }
.index-value { font-family:'Sora',sans-serif; font-size: 2rem; font-weight: 800; margin-bottom: .35rem; }
.index-name { font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* ─── Recommendations ────────────────────────────────────── */
.recommendations { margin-top: 3rem; }
.rec-card {
    background: var(--white); border: 1px solid var(--border);
    border-left: 5px solid var(--purple); border-radius: 1.25rem;
    padding: 2rem; margin-bottom: 1.25rem;
    display: flex; gap: 1.5rem; align-items: flex-start;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.rec-card.alert-urgent { border-left-color: #ef4444; }
.rec-card.alert-warn  { border-left-color: var(--amber); }
.rec-card.alert-good  { border-left-color: var(--green); }
.rec-icon {
    width: 52px; height: 52px; flex-shrink: 0;
    background: var(--purple-light); color: var(--purple);
    border-radius: 1rem; display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
}
.rec-card.alert-urgent .rec-icon { background: #fee2e2; color: #dc2626; }
.rec-card.alert-warn  .rec-icon { background: #fef3c7; color: #d97706; }
.rec-card.alert-good  .rec-icon { background: #dcfce7; color: #16a34a; }
.rec-card h3 { font-family:'Sora',sans-serif; font-size:1.05rem; margin:0 0 .5rem; }
.rec-card p  { color: var(--muted); font-size: .93rem; line-height: 1.65; margin: 0; }

/* ─── AI section ─────────────────────────────────────────── */
.ai-section {
    background: linear-gradient(135deg, var(--navy), #1a3050);
    border-radius: var(--radius-card); padding: 3rem; color: var(--white);
    margin-top: 3rem; position: relative; overflow: hidden;
}
.ai-section::before {
    content:''; position:absolute; top:-60px; right:-60px;
    width:260px; height:260px; border-radius:50%;
    background: rgba(124,58,237,.15);
}
.ai-section h2 { color: var(--white); font-size:1.6rem; margin-bottom:1rem; }
.ai-section p  { color: rgba(255,255,255,.75); line-height:1.7; margin-bottom:1.5rem; }
.ai-features { display:flex; flex-wrap:wrap; gap:.6rem; margin-bottom:2rem; }
.ai-feature {
    display:flex; align-items:center; gap:.4rem;
    background:rgba(255,255,255,.1); border-radius:999px;
    padding:.35rem .9rem; font-size:.82rem; font-weight:600;
}
.ai-feature i { color: var(--green); }

/* ─── Book CTA strip ─────────────────────────────────────── */
.book-strip {
    display:flex; align-items:center; gap:1.5rem;
    background:linear-gradient(135deg,#fffbeb,#fef3c7);
    border:1.5px solid var(--amber); border-radius:1.25rem;
    padding:1.75rem 2rem; margin-top:2rem;
}
.book-strip i.book-icon { font-size:2.5rem; color:var(--amber); flex-shrink:0; }
.book-strip h3 { font-family:'Sora',sans-serif; font-size:1.1rem; margin:0 0 .35rem; }
.book-strip p  { color:var(--muted); font-size:.88rem; margin:0; }

/* ─── Final CTA box ──────────────────────────────────────── */
.cta-box {
    background: linear-gradient(135deg, var(--navy), #1e3a5f);
    border-radius: var(--radius-card); padding: 4rem 3rem; text-align:center;
    color:var(--white); margin-top:3rem; position:relative; overflow:hidden;
}
.cta-box::after {
    content:''; position:absolute; bottom:-80px; left:-80px;
    width:300px; height:300px; border-radius:50%;
    background:rgba(34,197,94,.08);
}
.cta-box h2 { color:var(--white); font-size:2rem; margin-bottom:1rem; }
.cta-box p  { color:rgba(255,255,255,.75); max-width:520px; margin:0 auto 2rem; line-height:1.7; }
.cta-buttons { display:flex; flex-wrap:wrap; justify-content:center; gap:1rem; position:relative; z-index:1; }

/* ─── Footer ─────────────────────────────────────────────── */
.footer-links { text-align:center; margin-top:4rem; color:var(--muted); font-size:.88rem; font-weight:500; }
.footer-nav { margin-top:.75rem; display:flex; justify-content:center; gap:1.5rem; }
.footer-nav a { color:var(--purple); text-decoration:none; font-weight:600; }
.footer-nav a:hover { text-decoration:underline; }

/* ─── Results school heading ─────────────────────────────── */
.results-header { text-align:center; margin-bottom:2.5rem; }
.results-header h1 { font-size:2.25rem; line-height:1.2; }

/* ─── Radar chart wrap ───────────────────────────────────── */
.chart-wrap {
    background:var(--bg); border-radius:1.5rem;
    border:1px solid var(--border); padding:2rem; margin:2rem 0;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media(max-width:680px){
    .container { padding:1.5rem 1rem; }
    .card { padding:2rem 1.25rem; }
    .hero-title { font-size:2rem; }
    .form-grid-2 { grid-template-columns:1fr; }
    .form-col-2 { grid-column:auto; }
    .index-grid { grid-template-columns:1fr 1fr; }
    .rec-card { flex-direction:column; gap:1rem; }
    .book-strip { flex-direction:column; text-align:center; }
    .cta-box { padding:3rem 1.5rem; }
    .cta-box h2 { font-size:1.5rem; }
    .ai-section { padding:2rem 1.5rem; }
    .step-nav { flex-wrap:wrap; }
}
