/* DinDon Customs Quiz — стили в фирменном стиле dindon.kz
   Брендовые цвета: #EA124A / #d5033e
   Шрифт: Gilroy (с фолбэком на системные)
*/

/* Подключаем Gilroy с CDN сайта dindon.kz (тот же source).
   Если CDN недоступен — упадём на системные шрифты. */
@font-face { font-family:'Gilroy'; src:url('https://dindon.kz/project/templates/dindon.bi/_ares/fonts/Girloy/Gilroy-Regular.ttf') format('truetype'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'Gilroy'; src:url('https://dindon.kz/project/templates/dindon.bi/_ares/fonts/Girloy/Gilroy-Medium.ttf') format('truetype'); font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:'Gilroy'; src:url('https://dindon.kz/project/templates/dindon.bi/_ares/fonts/Girloy/Gilroy-Semibold.ttf') format('truetype'); font-weight:600; font-style:normal; font-display:swap; }
@font-face { font-family:'Gilroy'; src:url('https://dindon.kz/project/templates/dindon.bi/_ares/fonts/Girloy/Gilroy-Bold.ttf') format('truetype'); font-weight:700; font-style:normal; font-display:swap; }

:root {
    --pink:         #EA124A;
    --pink-hover:   #ce003a;
    --pink-active:  #a0002d;
    --pink-light:   #fbe6ec;
    --pink-lighter: #fff5f8;
    --black:        #121212;
    --gray-text:    #505050;
    --gray:         #969696;
    --gray-light:   #e9e9e9;
    --bg:           #ffffff;
    --bg-soft:      #f9f9f9;
    --green:        #3dc14f;
    --error:        #dc3545;
    --radius:       14px;
    --radius-sm:    10px;
    --shadow:       0 8px 30px rgba(18,18,18,.06);
    --shadow-hover: 0 12px 40px rgba(234,18,74,.18);
}

* { margin:0; padding:0; box-sizing:border-box; font-family:'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif; font-weight:400; }
html, body { height:100%; }
body {
    background: linear-gradient(180deg, #fff 0%, #fbe6ec1f 100%);
    color: var(--black);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: var(--pink); text-decoration: none; }
a:hover { color: var(--pink-hover); }

/* ----------- Хедер ----------- */
.header {
    padding: 18px 20px;
    background: #fff;
    border-bottom: 1px solid var(--gray-light);
    position: sticky; top:0; z-index: 10;
}
.header__inner {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.logo { display: inline-flex; align-items: center; }
.logo svg { display: block; height: 36px; width: auto; }
.header__back {
    color: var(--gray);
    font-size: 14px;
    font-weight: 500;
    transition: color .2s;
}
.header__back:hover { color: var(--pink); }

/* ----------- Основной контейнер ----------- */
.main {
    flex: 1;
    padding: 40px 20px 60px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 720px;
    padding: 48px 56px;
    border: 1px solid #f0f0f0;
}
@media (max-width: 640px) {
    .main { padding: 20px 14px 40px; }
    .card { padding: 32px 22px; border-radius: 12px; }
    .header { padding: 14px 16px; }
    .logo svg { height: 30px; }
}

/* ----------- Прогресс-бар ----------- */
.progress {
    display: flex;
    gap: 6px;
    margin-bottom: 28px;
}
.progress__bar {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--gray-light);
    transition: background .3s;
}
.progress__bar.active { background: var(--pink); }

/* ----------- Типографика ----------- */
.eyebrow {
    display: inline-block;
    background: var(--pink-light);
    color: var(--pink);
    font-weight: 600;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 100px;
    margin-bottom: 18px;
    letter-spacing: .2px;
}
h1 {
    font-size: 32px;
    line-height: 1.18;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}
h2 {
    font-size: 26px;
    line-height: 1.22;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}
.lead {
    font-size: 17px;
    color: var(--gray-text);
    line-height: 1.55;
    margin-bottom: 28px;
}
.muted { color: var(--gray); font-size: 13px; }
.fine-print {
    font-size: 12px;
    color: var(--gray);
    line-height: 1.5;
    margin-top: 18px;
}
@media (max-width: 640px) {
    h1 { font-size: 26px; }
    h2 { font-size: 22px; }
    .lead { font-size: 15px; margin-bottom: 22px; }
}

/* ----------- Кнопки ----------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 16px;
    padding: 16px 30px;
    border-radius: 100px;
    transition: background .2s, color .2s, transform .1s, box-shadow .2s;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}
.btn-primary {
    background: var(--pink);
    color: #fff;
}
.btn-primary:hover { background: var(--pink-hover); color:#fff; box-shadow: var(--shadow-hover); }
.btn-primary:active { background: var(--pink-active); transform: translateY(1px); }
.btn-primary:disabled { background: var(--gray-light); color: var(--gray); cursor: not-allowed; box-shadow: none; }

.btn-ghost {
    background: transparent;
    color: var(--gray-text);
    border: 1px solid var(--gray-light);
}
.btn-ghost:hover { color: var(--black); border-color: var(--black); }

.btn-block { width: 100%; }

.btn-row {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.btn-row .btn { flex: 1; min-width: 130px; }

/* ----------- Опции (radio / checkbox в виде карточек) ----------- */
.options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }

.option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border: 1.5px solid var(--gray-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color .2s, background .2s, transform .1s;
    user-select: none;
    background: #fff;
}
.option:hover { border-color: var(--pink); background: var(--pink-lighter); }
.option input { display: none; }
.option__indicator {
    flex-shrink: 0;
    width: 22px; height: 22px;
    border: 2px solid var(--gray-light);
    border-radius: 50%;
    position: relative;
    transition: border-color .2s, background .2s;
}
.option--checkbox .option__indicator { border-radius: 6px; }
.option__indicator::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    opacity: 0;
    transition: opacity .15s;
}
.option--radio .option__indicator::after {
    width: 10px; height: 10px;
    background: #fff;
    border-radius: 50%;
    top: 4px; left: 4px;
}
.option--checkbox .option__indicator::after {
    width: 14px; height: 14px;
    top: 2px; left: 2px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="white"><path d="M6.173 12.04L2.4 8.267l1.413-1.414 2.36 2.36 5.654-5.653 1.413 1.413z"/></svg>') center/14px no-repeat;
}
.option input:checked ~ .option__indicator { background: var(--pink); border-color: var(--pink); }
.option input:checked ~ .option__indicator::after { opacity: 1; }
.option:has(input:checked) { border-color: var(--pink); background: var(--pink-lighter); }
.option__label { font-size: 16px; font-weight: 500; color: var(--black); flex: 1; }

/* ----------- Поля ввода ----------- */
.field { margin-bottom: 16px; }
.field__label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-text);
    margin-bottom: 8px;
}
.input, .textarea {
    width: 100%;
    border: 1.5px solid var(--gray-light);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 16px;
    font-family: inherit;
    color: var(--black);
    background: #fff;
    transition: border-color .2s;
}
.input:focus, .textarea:focus { outline: none; border-color: var(--pink); }
.textarea { resize: vertical; min-height: 80px; }
.error-text { color: var(--error); font-size: 13px; margin-top: 6px; display: none; }
.error-text.show { display: block; }

/* ----------- Бренды — сетка ----------- */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.brand-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 14px 12px;
    border: 1.5px solid var(--gray-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
    transition: border-color .2s, background .2s, color .2s;
    user-select: none;
    min-height: 56px;
    background: #fff;
}
.brand-chip input { display: none; }
.brand-chip:hover { border-color: var(--pink); color: var(--pink); }
.brand-chip:has(input:checked) { border-color: var(--pink); background: var(--pink); color: #fff; }

/* ----------- Финальный экран (бонус) ----------- */
.reward {
    text-align: center;
    padding: 8px 0;
}
.reward__emoji {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 16px;
    display: inline-block;
}
.promo-box {
    background: linear-gradient(135deg, var(--pink) 0%, #ff3964 100%);
    border-radius: var(--radius);
    padding: 28px 22px;
    margin: 24px 0;
    color: #fff;
    text-align: center;
    box-shadow: 0 18px 50px rgba(234,18,74,.28);
    position: relative;
    overflow: hidden;
}
.promo-box::before {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,.18), transparent 60%);
    pointer-events: none;
}
.promo-box__label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: .85;
    margin-bottom: 8px;
}
.promo-box__code {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 14px;
    word-break: break-all;
}
.promo-box__copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.35);
    color: #fff;
    border-radius: 100px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background .2s;
}
.promo-box__copy:hover { background: rgba(255,255,255,.3); }
.promo-box__copy.copied { background: #fff; color: var(--pink); }

/* ----------- Шаги (показ / скрытие) ----------- */
.step { display: none; animation: fadeIn .35s ease-out; }
.step.active { display: block; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ----------- Лоадер на кнопке ----------- */
.btn .spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
    display: none;
}
.btn.loading .spinner { display: inline-block; }
.btn.loading .btn-text { opacity: .6; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ----------- Доп. ссылки (YouTube/Каталог) на финале ----------- */
.extra-links {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px dashed var(--gray-light);
}
.extra-links__title {
    text-align: center;
    color: var(--gray);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
    letter-spacing: .3px;
}
.btn-extra {
    background: #fff;
    color: var(--black);
    border: 1.5px solid var(--gray-light);
    font-weight: 600;
    padding: 14px 18px;
    transition: border-color .2s, color .2s, background .2s, transform .1s, box-shadow .2s;
}
.btn-extra:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(18,18,18,.06); }
.btn-extra--yt { color: #FF0000; }
.btn-extra--yt:hover { border-color: #FF0000; color: #FF0000; background: #fff7f7; }
.btn-extra--catalog { color: var(--pink); }
.btn-extra--catalog:hover { border-color: var(--pink); color: var(--pink); background: var(--pink-lighter); }
.btn-extra svg { flex-shrink: 0; }

/* ----------- Футер ----------- */
.footer {
    text-align: center;
    padding: 24px 20px;
    color: var(--gray);
    font-size: 13px;
    border-top: 1px solid var(--gray-light);
    background: #fff;
}
.footer a { color: var(--gray-text); font-weight: 500; }
.footer a:hover { color: var(--pink); }
