/* =============================================
   АНКЕТА СНА — semitono.home  v2
   ============================================= */

/* --- Base --- */
.anketa-page {
    min-height: 100vh;
    background: #ffffff;
    font-family: 'Montserrat', sans-serif;
    color: #2c2c2c;
}

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

/* --- Header --- */
.anketa-header {
    text-align: center;
    margin-bottom: 40px;
}

.anketa-brand {
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 12px;
}

.anketa-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #2c2c2c;
    margin: 0 0 8px;
}

.anketa-subtitle {
    font-size: 15px;
    color: #777;
    margin: 0;
    font-weight: 600;
}

/* --- Progress --- */
.anketa-progress {
    margin-bottom: 36px;
}

.progress-steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    transition: background 0.4s ease, transform 0.3s ease;
}

.progress-dot.done {
    background: #8695b1;
    transform: scale(1.2);
}

.progress-dot.active {
    background: #2c2c2c;
    transform: scale(1.4);
}

.progress-bar {
    height: 2px;
    background: #e8e4e0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #8695b1, #B19D8D);
    border-radius: 2px;
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Steps --- */
.survey-step {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.survey-step.active {
    display: block;
}

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

.step-question {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 6px;
    line-height: 1.4;
}

.step-hint {
    font-size: 14px;
    color: #999;
    margin-bottom: 28px;
    font-weight: 600;
    font-style: italic;
}

/* --- Micro message --- */
.micro-msg {
    display: inline-block;
    font-size: 13px;
    color: #6a9a6a;
    margin-top: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    min-height: 20px;
    font-weight: 400;
}

.micro-msg.visible {
    opacity: 1;
}

/* --- Option Cards --- */
.option-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 8px;
}

.option-card {
    background: #fff;
    border: 1.5px solid #e5e0da;
    border-radius: 12px;
    padding: 20px 18px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    user-select: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.055);
}

.option-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 22px rgba(0,0,0,0.09);
    border-color: #c8c0b8;
}

.option-card.selected {
    border-color: #8695b1;
    background: #f0f4f8;
}

.option-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 14px;
    color: #6a9a6a;
    animation: checkPulse 0.3s ease;
}

@keyframes checkPulse {
    0%   { transform: scale(0.5); opacity: 0; }
    60%  { transform: scale(1.3); }
    100% { transform: scale(1); opacity: 1; }
}

.card-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
    color: #2c2c2c;
}

.card-desc {
    font-size: 13px;
    color: #888;
    line-height: 1.5;
    font-weight: 600;
}

/* --- Color Section (Step 6) --- */
.color-section {
    margin-bottom: 28px;
}

.color-section-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888;
    margin-bottom: 14px;
}

/* Сетка «Мы рекомендуем» — 3 колонки, пропорция 4:3 */
.color-grid--recommended {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.color-grid--recommended .color-swatch {
    aspect-ratio: 4 / 3;
}

/* Сетка «Все полутона» — 4 колонки, квадратные */
.color-grid--all {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.color-grid--all .color-swatch {
    aspect-ratio: 1;
}

.color-card {
    cursor: pointer;
    text-align: center;
    position: relative;
    transition: transform 0.2s ease;
}

.color-card:hover {
    transform: translateY(-4px);
}

.color-swatch {
    width: 100%;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.color-swatch::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    opacity: 0;
    background: rgba(255,255,255,0.35);
    transition: opacity 0.2s ease;
}

.color-card:hover .color-swatch::after {
    opacity: 1;
}

.color-card.selected .color-swatch {
    border-color: #2c2c2c;
    box-shadow: 0 0 0 3px rgba(44,44,44,0.15);
}

.color-card.selected::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    background: rgba(44,44,44,0.7);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 20px;
}

.color-label {
    font-size: 11px;
    color: #666;
    margin-top: 6px;
    line-height: 1.3;
    font-weight: 600;
}

/* Color Reveal Overlay */
.color-reveal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.color-reveal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.color-reveal-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: #2c2c2c;
    margin-bottom: 8px;
    text-align: center;
}

.color-reveal-label {
    font-size: 16px;
    color: rgba(44,44,44,0.65);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 400;
}

/* --- CF7 inside Anketa (Step 7) --- */
.anketa-cf7-wrap {
    margin-bottom: 8px;
}

.anketa-cf7-wrap .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.anketa-cf7-wrap .wpcf7-form-control-wrap {
    display: block;
}

.anketa-cf7-wrap input[type="text"],
.anketa-cf7-wrap input[type="email"],
.anketa-cf7-wrap input[type="tel"],
.anketa-cf7-wrap textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e0dbd5;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    color: #2c2c2c;
    background: #fff;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    outline: none;
}

.anketa-cf7-wrap input[type="text"]:focus,
.anketa-cf7-wrap input[type="email"]:focus,
.anketa-cf7-wrap input[type="tel"]:focus,
.anketa-cf7-wrap textarea:focus {
    border-color: #8695b1;
}

.anketa-cf7-wrap textarea {
    min-height: 100px;
    resize: vertical;
}

.anketa-cf7-wrap .wpcf7-submit {
    display: inline-flex;
    align-items: center;
    padding: 13px 28px;
    background: #2c2c2c;
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 15px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.anketa-cf7-wrap .wpcf7-submit:hover {
    background: #444;
    transform: translateY(-1px);
}

.anketa-cf7-wrap .wpcf7-response-output {
    border: none !important;
    padding: 10px 0 0 !important;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    margin: 0 !important;
}

.anketa-cf7-wrap .wpcf7-not-valid-tip {
    font-size: 12px;
    color: #e87070;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
}

.cf7-not-configured {
    padding: 20px;
    background: #fff8e1;
    border-radius: 10px;
    border: 1.5px solid #ffe082;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    font-weight: 400;
}

.cf7-not-configured code {
    background: #f5f5f5;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 13px;
}

/* --- Contact Form — privacy note --- */
.privacy-note {
    font-size: 12px;
    color: #aaa;
    margin-top: 8px;
    line-height: 1.5;
    font-weight: 400;
}

/* --- Navigation --- */
.step-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 28px;
    gap: 12px;
}

.btn-next {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 13px 28px;
    background: #2c2c2c;
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 15px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.btn-next:hover {
    background: #444;
    transform: translateY(-1px);
}

.btn-next:disabled {
    background: #bbb;
    cursor: default;
    transform: none;
}

.btn-back {
    background: none;
    border: none;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    transition: color 0.2s ease;
}

.btn-back:hover {
    color: #555;
}

/* --- Reveal (Step 8) --- */
.reveal-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    text-align: center;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
    box-shadow: 0 8px 40px rgba(0,0,0,0.07);
}

.reveal-card.visible {
    opacity: 1;
    transform: scale(1);
}

.reveal-color-block {
    width: 120px;
    height: 120px;
    border-radius: 60px;
    margin: 0 auto 20px;
    transition: background 0.3s ease;
}

.reveal-tone-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.reveal-atmosphere {
    font-size: 16px;
    color: #777;
    font-style: italic;
    margin-bottom: 28px;
    font-weight: 400;
}

.reveal-summary {
    background: #f7f5f2;
    border-radius: 10px;
    padding: 18px 22px;
    text-align: left;
    margin-bottom: 24px;
}

.reveal-summary-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #aaa;
    margin-bottom: 10px;
    font-weight: 600;
}

.reveal-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 4px 0;
    border-bottom: 1px solid #eee;
    color: #555;
    font-weight: 400;
}

.reveal-summary-row:last-child {
    border-bottom: none;
}

.reveal-summary-row span:last-child {
    font-weight: 500;
    color: #2c2c2c;
}

.reveal-message {
    font-size: 15px;
    color: #777;
    margin-bottom: 24px;
    line-height: 1.6;
    font-weight: 400;
}

.reveal-cta {
    display: inline-block;
    padding: 13px 28px;
    border: 1.5px solid #2c2c2c;
    border-radius: 100px;
    color: #2c2c2c;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.reveal-cta:hover {
    background: #2c2c2c;
    color: #fff;
}

/* --- Mobile --- */
@media (max-width: 767px) {
    .anketa-wrap {
        padding: 28px 16px 60px;
    }

    .anketa-title {
        font-size: 22px;
    }

    .option-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .color-grid--recommended {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .color-grid--all {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .step-question {
        font-size: 19px;
    }

    .reveal-card {
        padding: 28px 20px;
    }

    .color-reveal-name {
        font-size: 28px;
    }
}

@media (max-width: 400px) {
    .color-grid--recommended,
    .color-grid--all {
        grid-template-columns: repeat(2, 1fr);
    }
}
