/* =============================================
   TEST ANIMAL DE PODER / TÓTEM — styles.css
   Paleta: ocre, verde musgo, marrón oscuro, dorado cálido
   Estética: chamánica, ancestral, tierra
   ============================================= */

:root {
    --black:        #080704;
    --deep:         #0f0d08;
    --surface:      #161208;
    --surface-2:    #1e1810;
    --surface-3:    #271f12;
    --border:       rgba(255,255,255,.06);
    --border-ocre:  rgba(180,130,50,.3);

    --brown:        #3d2a0f;
    --brown-light:  #5c3f18;
    --ocre:         #b07830;
    --ocre-light:   #d09848;
    --gold:         #c9903a;
    --gold-light:   #e8b85a;
    --gold-pale:    #f5d898;
    --moss:         #4a6632;
    --moss-light:   #6a8f48;
    --moss-pale:    #9abf78;
    --sand:         #c8b078;
    --sand-dim:     #806840;

    --text:         #f0e8d8;
    --text-muted:   #806848;
    --text-dim:     #3a2a10;

    --radius:       16px;
    --radius-sm:    10px;
    --transition:   .25s ease;
}

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

body {
    background: var(--black);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse at 15% 30%, rgba(74,102,50,.12) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 70%, rgba(176,120,48,.1)  0%, transparent 55%);
}

/* ── Steps ── */
.step {
    display: none;
    min-height: 100vh;
    padding: 40px 20px 80px;
    animation: fadeUp .45s ease both;
}
.step.active { display: flex; flex-direction: column; }

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

.container { max-width: 720px; margin: 0 auto; width: 100%; }
.center-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
    gap: 24px;
}

/* ── Símbolo pata ── */
.intro-symbol, .result-symbol {
    font-size: 3.6rem;
    line-height: 1;
    display: block;
    animation: float-totem 4s ease-in-out infinite;
    filter: drop-shadow(0 0 18px rgba(201,144,58,.5));
}
@keyframes float-totem {
    0%, 100% { transform: translateY(0)    scale(1);    opacity: .85; }
    50%       { transform: translateY(-9px) scale(1.06); opacity: 1;   }
}

/* ── Títulos ── */
.hero-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 600;
    letter-spacing: .04em;
    background: linear-gradient(135deg, var(--gold-pale) 0%, var(--moss-pale) 50%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.15;
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--sand-dim);
    max-width: 480px;
    line-height: 1.7;
    font-style: italic;
}

/* ── Botón principal ── */
.btn-primary {
    background: linear-gradient(135deg, var(--brown-light) 0%, var(--ocre) 100%);
    color: var(--gold-pale);
    border: none;
    border-radius: var(--radius-sm);
    padding: 15px 40px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 24px rgba(176,120,48,.4);
    margin-top: 8px;
}
.btn-primary:hover {
    opacity: .9;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(176,120,48,.6);
}

/* ── Barra de progreso ── */
.progress-bar-wrap {
    width: 100%;
    height: 3px;
    background: var(--surface-2);
    border-radius: 2px;
    margin-bottom: 10px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--moss-light), var(--gold-light));
    border-radius: 2px;
    transition: width .5s cubic-bezier(.4,0,.2,1);
    width: 0%;
    box-shadow: 0 0 8px rgba(201,144,58,.5);
}

.progress-label {
    font-size: .78rem;
    color: var(--text-muted);
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 32px;
    text-align: right;
}

/* ── Pregunta ── */
.question-block { width: 100%; }

.question-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--surface-3);
    line-height: 1;
    margin-bottom: 8px;
    user-select: none;
}

.question-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 28px;
}

/* ── Opciones ── */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.opt-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    cursor: pointer;
    text-align: left;
    transition: background var(--transition), border-color var(--transition), transform var(--transition);
    width: 100%;
}
.opt-btn:hover {
    background: var(--surface-2);
    border-color: var(--border-ocre);
    transform: translateX(4px);
}
.opt-btn.selected {
    background: var(--surface-3);
    border-color: var(--ocre-light);
    box-shadow: 0 0 0 1px var(--ocre-light), 0 4px 16px rgba(176,120,48,.3);
    transform: translateX(6px);
}

.opt-letter {
    width: 28px; height: 28px;
    border-radius: 6px;
    background: var(--surface-2);
    border: 1px solid var(--border-ocre);
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem;
    font-weight: 600;
    color: var(--gold-light);
    flex-shrink: 0;
    transition: background var(--transition), color var(--transition);
}
.opt-btn.selected .opt-letter {
    background: var(--ocre);
    color: var(--black);
    border-color: var(--ocre);
}

.opt-text {
    font-size: .95rem;
    color: var(--text);
    line-height: 1.4;
}

/* ── Loading tótem ── */
#step-loading {
    justify-content: center;
    align-items: center;
    gap: 28px;
}

.loading-totem {
    position: relative;
    width: 120px; height: 120px;
    display: flex; align-items: center; justify-content: center;
}

.totem-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid transparent;
    animation: spin-totem linear infinite;
}
.r1 {
    inset: 0;
    border-top-color: var(--gold-light);
    border-right-color: var(--gold-light);
    animation-duration: 3.2s;
    opacity: .7;
}
.r2 {
    inset: 14px;
    border-bottom-color: var(--moss-light);
    border-left-color: var(--moss-light);
    animation-duration: 2.4s;
    animation-direction: reverse;
    opacity: .6;
}
.r3 {
    inset: 28px;
    border-top-color: var(--sand);
    animation-duration: 1.8s;
    opacity: .35;
}
@keyframes spin-totem {
    to { transform: rotate(360deg); }
}

.totem-core {
    font-size: 2.2rem;
    animation: float-totem 2s ease-in-out infinite;
    z-index: 1;
    filter: drop-shadow(0 0 12px rgba(201,144,58,.7));
}

.loading-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--sand);
    text-align: center;
}
.loading-sub {
    font-size: .9rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
}

/* ── Resultado ── */
#step-result { justify-content: flex-start; }

.result-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    text-align: center;
}
.result-symbol { font-size: 2.4rem; }

.result-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 600;
    background: linear-gradient(135deg, var(--gold-pale) 0%, var(--moss-pale) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-card {
    background: var(--surface);
    border: 1px solid var(--border-ocre);
    border-radius: var(--radius);
    padding: 32px 36px;
    margin-bottom: 28px;
    box-shadow: 0 8px 40px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.03);
    position: relative;
    overflow: hidden;
}
.result-card::before {
    content: '🐾';
    position: absolute;
    top: -10px; right: 10px;
    font-size: 7rem;
    opacity: .04;
    pointer-events: none;
    user-select: none;
}

.result-text p {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text);
    margin-bottom: 18px;
}
.result-text p:last-child { margin-bottom: 0; }

/* ── Botones ── */
.result-actions { display: flex; justify-content: center; }

.btn-reset {
    background: transparent;
    color: var(--gold-light);
    border: 1px solid var(--ocre);
    border-radius: var(--radius-sm);
    padding: 12px 32px;
    font-family: 'Inter', sans-serif;
    font-size: .95rem;
    font-weight: 500;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.btn-reset:hover {
    background: var(--ocre);
    color: var(--black);
    border-color: var(--ocre);
}

/* ── Modal ── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.8);
    display: none; align-items: center; justify-content: center;
    z-index: 100;
    backdrop-filter: blur(6px);
    padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal-box {
    background: var(--surface-2);
    border: 1px solid var(--border-ocre);
    border-radius: var(--radius);
    padding: 40px 32px;
    max-width: 440px; width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.7);
    animation: fadeUp .3s ease;
}
.modal-icon  { font-size: 2.2rem; margin-bottom: 16px; }
.modal-msg   { color: var(--text); line-height: 1.6; margin-bottom: 20px; }

.btn-modal-close {
    background: var(--ocre);
    color: var(--black);
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 28px;
    font-family: 'Inter', sans-serif;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--transition);
    margin-top: 8px;
}
.btn-modal-close:hover { opacity: .85; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .result-card  { padding: 22px 18px; }
    .question-text { font-size: 1.3rem; }
    .opt-btn { padding: 12px 14px; }
}

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