/* Shakkikoulu.fi — Demo (demo.css) */

/* ── Osion asettelu ── */
.demo-section {
    padding: 5rem 0;
    background: var(--paper-warm, #f0ebe2);
    border-top: 1px solid var(--stone-light, #d6d3d1);
}
.demo-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.demo-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    margin-bottom: 0.5rem;
}
.demo-header p {
    color: var(--stone, #78716c);
    font-size: 1rem;
}

/* ── Layout: lauta + teksti ── */
.demo-layout {
    display: grid;
    grid-template-columns: minmax(280px, 400px) 1fr;
    gap: 3rem;
    align-items: start;
    max-width: 860px;
    margin: 0 auto;
}

/* ── Shakkilauta ── */
.demo-board {
    width: 100%;
    aspect-ratio: 1;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    border: 5px solid var(--board-frame, #3d3a37);
    border-radius: 3px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    overflow: hidden;
}
.demo-sq {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: default;
    transition: background 0.15s;
}
.demo-sq-l { background: var(--board-light, #ebecd0); }
.demo-sq-d { background: var(--board-dark, #779556); }

/* Mahdollinen siirto — korostus (käytetään vain siirron jälkeen) */
.demo-sq-hl.demo-sq-l { background: #f6f669; }
.demo-sq-hl.demo-sq-d { background: #baca2b; }

/* Piste: mahdollinen siirto (chess.com/lichess -tyyli) */
.demo-dot {
    width: 30%;
    height: 30%;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

/* Klikattava — hover näyttää ympyrän */
.demo-sq-click { cursor: pointer; }
.demo-sq-click:hover {
    box-shadow: inset 0 0 0 3px rgba(0,0,0,0.2);
}

/* Valittu nappula */
.demo-sq-selected.demo-sq-l { background: #f6f669; }
.demo-sq-selected.demo-sq-d { background: #baca2b; }

/* Edellinen sijainti (häivytetty) */
.demo-sq-last.demo-sq-l { background: #e8e4b0; }
.demo-sq-last.demo-sq-d { background: #8faa5a; }

/* Nappula */
.demo-pc {
    width: 80%;
    height: 80%;
    filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.15));
    pointer-events: none;
}

/* ── Tekstiosa ── */
.demo-badge {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink, #1c1917);
    margin-bottom: 0.75rem;
    font-family: 'Cormorant Garamond', serif;
}
.demo-step-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--ink, #1c1917);
}
.demo-step-text {
    color: #57534e;
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 1rem;
}
.demo-instruction {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink, #1c1917);
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(184,150,12,0.08);
    border-left: 3px solid var(--gold, #b8960c);
    border-radius: 0 4px 4px 0;
}

/* Siirtolaskuri */
.demo-move-counter {
    font-size: 0.85rem;
    color: var(--stone, #78716c);
    margin-top: 0.5rem;
}

/* ── Tähdet ── */
.demo-stars {
    color: var(--gold, #b8960c);
    font-size: 1.6rem;
    letter-spacing: 0.3rem;
    margin: 0.5rem 0;
}
.demo-stars-big {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

/* ── Palaute (taktiikka) ── */
.demo-feedback {
    min-height: 1.5rem;
    margin: 0.5rem 0;
    transition: opacity 0.3s;
    opacity: 0;
}
.demo-fb-show { opacity: 1; }
.demo-fb-ok {
    color: #16a34a;
    font-weight: 600;
    font-size: 1rem;
}
.demo-fb-wrong {
    color: #92400e;
    font-weight: 500;
    font-size: 0.9rem;
}

/* ── Napit ── */
.demo-next-btn {
    margin-top: 0.5rem;
    padding: 0.7rem 1.8rem;
    font-size: 0.9rem;
}
.demo-cta-btn {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.8rem 2.5rem;
    font-size: 1rem;
}

/* ── Mobiili ── */
@media (max-width: 700px) {
    .demo-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 400px;
    }
    .demo-step-title { font-size: 1.3rem; }
}