/* ════════════════════════════════════════════════════════════
   kovalov.tattoo — brief / quiz form styles
   ════════════════════════════════════════════════════════════ */

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

.quiz-wrap {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 24px 32px;
}

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 32px;
  flex-shrink: 0;
}
.quiz-brand {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
  font-weight: 400;
}
.btn-back {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn-back svg { stroke: currentColor; }
.btn-back:active { color: var(--text); }
.btn-back.hidden { visibility: hidden; pointer-events: none; }

.quiz-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid var(--border-2);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-2);
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.2s, color 0.2s;
}
.quiz-close:active { border-color: var(--text-2); color: var(--text); }

.progress-wrap { flex-shrink: 0; margin-bottom: 32px; }
.progress-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.progress-label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); font-weight: 400; }
.progress-counter { font-size: 11px; letter-spacing: 0.1em; color: var(--text-2); font-weight: 300; }
.progress-track { height: 1px; background: var(--border-2); }
.progress-fill { height: 100%; background: var(--accent); transition: width 0.5s cubic-bezier(0.16,1,0.3,1); }

.step-container { flex: 1; position: relative; overflow: hidden; }
.step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateX(28px);
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.16,1,0.3,1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}
.step.active { opacity: 1; pointer-events: all; transform: translateX(0); }
.step.exit { opacity: 0; transform: translateX(-28px); }

.step-question {
  font-size: clamp(26px, 6.5vw, 36px);
  font-weight: 200;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 36px;
}

.text-step-input {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-2);
  color: var(--text);
  font-family: var(--font);
  font-size: 20px;
  font-weight: 200;
  padding: 12px 0;
  outline: none;
  resize: none;
  min-height: 56px;
  line-height: 1.5;
  transition: border-color 0.25s;
  -webkit-appearance: none;
}
.text-step-input::placeholder { color: var(--border-2); font-size: 17px; font-weight: 300; }
.text-step-input:focus { border-color: var(--accent); }

.text-hint { font-size: 12px; color: var(--text-2); margin-top: 12px; font-weight: 300; opacity: 0; transition: opacity 0.3s; }
.text-hint.show { opacity: 1; }

.btn-next {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 17px 24px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
  min-height: 56px;
  margin-top: auto;
}
.btn-next:disabled { background: var(--border-2); color: var(--text-2); cursor: not-allowed; }
.btn-next:not(:disabled):active { opacity: 0.85; }

.options { display: flex; flex-direction: column; gap: 10px; }
.option-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--border-2);
  background: none;
  color: var(--text);
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
  min-height: 64px;
}
.option-card:active { background: rgba(236,231,220,0.04); }
.option-card.selected { border-color: var(--text); background: rgba(236,231,220,0.05); }
.option-index { font-size: 11px; letter-spacing: 0.14em; color: var(--text-2); font-weight: 400; flex-shrink: 0; width: 18px; text-align: center; }
.option-card.selected .option-index { color: var(--accent); }
.option-vline { width: 1px; height: 30px; background: var(--border-2); flex-shrink: 0; }
.option-content { flex: 1; }
.option-title { font-size: 15px; font-weight: 300; line-height: 1.3; }
.option-sub { font-size: 12px; color: var(--text-2); font-weight: 300; margin-top: 3px; line-height: 1.3; }
.option-check {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border: 1px solid var(--border-2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}
.option-card.selected .option-check { border-color: var(--accent); background: var(--accent); }
.option-check svg { display: none; }
.option-card.selected .option-check svg { display: block; }

.quiz-select { position: relative; }
.quiz-select-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 60px; padding: 17px 20px;
  background: none; border: 1px solid var(--border-2);
  color: var(--text); font-family: var(--font);
  font-size: 16px; font-weight: 300;
  cursor: pointer; text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.2s;
}
.quiz-select.open .quiz-select-trigger { border-color: var(--text); }
.quiz-select-value.placeholder { color: var(--text-2); }
.quiz-select-chevron { stroke: var(--text-2); flex-shrink: 0; transition: transform 0.3s cubic-bezier(0.16,1,0.3,1); }
.quiz-select.open .quiz-select-chevron { transform: rotate(180deg); }
.quiz-select-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  background: var(--surface); border: 1px solid var(--border-2);
  max-height: 264px; overflow-y: auto;
  opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16,1,0.3,1), transform 0.22s cubic-bezier(0.16,1,0.3,1);
}
.quiz-select.open .quiz-select-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
.quiz-select-opt {
  display: block; width: 100%; text-align: left;
  padding: 14px 20px; background: none; border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text); font-family: var(--font);
  font-size: 15px; font-weight: 300;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, color 0.15s;
}
.quiz-select-opt:last-child { border-bottom: none; }
.quiz-select-opt:active,
.quiz-select-opt.selected { background: rgba(236,231,220,0.05); color: var(--accent); }
.quiz-other-wrap { display: none; margin-top: 16px; }
.quiz-other-wrap.show { display: block; }

.form-field { margin-bottom: 28px; }
.form-label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-2); font-weight: 400; display: block; margin-bottom: 12px; }
.form-input {
  width: 100%; background: none; border: none;
  border-bottom: 1px solid var(--border-2);
  color: var(--text); font-family: var(--font);
  font-size: 20px; font-weight: 200; padding: 10px 0; outline: none;
  transition: border-color 0.25s; -webkit-appearance: none;
}
.form-input::placeholder { color: var(--border-2); font-weight: 300; font-size: 17px; }
.form-input:focus { border-color: var(--accent); }

.submit-row { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 16px; }

/* Desktop QR cards */
.qr-cards {
  display: none;
  flex-direction: row;
  gap: 12px;
}
.qr-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px 16px 18px;
  background: none;
  border: 1px solid var(--border-2);
  color: var(--text);
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.qr-card:not([disabled]):hover { border-color: var(--text-2); }
.qr-card:not([disabled]):active { border-color: var(--text); }
.qr-card[disabled] { opacity: 0.25; cursor: not-allowed; }
.qr-img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #fff;
}
.qr-card-name {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-2);
  font-weight: 400;
}
.qr-caption {
  display: none;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-2);
  font-weight: 300;
  text-align: center;
}

.btn-messenger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 17px 24px;
  font-family: var(--font);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 400;
  border: none;
  cursor: pointer;
  min-height: 56px;
  transition: opacity 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn-messenger:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-messenger:not(:disabled):active { opacity: 0.85; }
.btn-tg { background: var(--text); color: var(--bg); }
.btn-wa { background: none; border: 1px solid var(--border-2); color: var(--text-2); }
.btn-wa:not(:disabled):hover { border-color: var(--text-2); color: var(--text); }

#screen-success {
  position: fixed; inset: 0;
  background: #0b0a08; /* solid — prevents quiz content showing through */
  z-index: 999;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 48px 32px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.45s ease;
}
#screen-success.visible { opacity: 1; pointer-events: all; }
.success-icon {
  width: 52px; height: 52px;
  border: 1px solid var(--border-2); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 28px;
}
.success-title { font-size: 32px; font-weight: 200; letter-spacing: -0.02em; margin-bottom: 16px; line-height: 1.1; }
.success-sub { font-size: 15px; color: var(--text-2); line-height: 1.7; max-width: 280px; }

@media (max-width: 600px) {
  .step { justify-content: flex-start; padding-bottom: 84px; }
  .btn-next { position: absolute; left: 0; right: 0; bottom: 0; margin-top: 0; }
}

@media (min-width: 768px) {
  .btn-messenger { display: none; }
  .qr-cards { display: flex; }
  .qr-caption { display: block; }
}
