/* === WebByVoice Wizard — Dark bg, light card, brand fonts === */

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

:root {
  /* Brand palette */
  --gold: #D4A440;
  --gold-light: #E8C06A;
  --gold-dark: #B8892E;
  --purple: #3B1F6E;
  --purple-light: #5A3D8E;
  --deep-dark: #1A1A2E;
  --charcoal: #2D2D2D;
  --off-white: #F8F6F3;
  --light-gray: #E8E5E0;
  --medium-gray: #9A9590;

  --gradient-brand: linear-gradient(135deg, #D4A440 0%, #3B1F6E 100%);
  --gradient-brand-hover: linear-gradient(135deg, #E8C06A 0%, #5A3D8E 100%);
  --gradient-progress: linear-gradient(90deg, #D4A440 0%, #E8C06A 50%, #5A3D8E 100%);

  /* Aliases for the card */
  --surface: #FFFFFF;
  --text: #1A1A2E;
  --text-muted: #6B6B7A;
  --border: #E8E5E0;
  --error: #C4475A;
  --error-bg: #FDF2F4;
  --success: #4CAF82;

  /* Typography */
  --font-heading: 'Inter', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-accent: 'Architects Daughter', cursive;

  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 8px 32px rgba(0,0,0,0.25);
  --transition: 0.2s ease;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--deep-dark);
  background-image:
    radial-gradient(ellipse at top left, rgba(212,164,64,0.12), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(59,31,110,0.35), transparent 50%);
  background-attachment: fixed;
  color: #E8E5E0;
  line-height: 1.6;
  min-height: 100dvh;
  padding: 32px 16px;
}

/* === CONTAINER === */
.wizard-container {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* === HEADER === */
.wizard-header {
  padding: 0 0 28px;
  text-align: center;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.logo img {
  height: 56px !important;
  width: auto !important;
  max-width: 260px;
  display: block;
  object-fit: contain;
}

.logo span { display: none; }

/* --- Language switcher --- */
.lang-switch {
  position: absolute;
  top: 12px;
  right: 16px;
  display: flex;
  gap: 2px;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
}
.lang-switch a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.lang-switch a:hover { color: var(--gold-light); }
.lang-switch a.is-active,
.lang-switch a[aria-current="page"] {
  color: var(--deep-dark);
  background: var(--gold-light);
}
.wizard-header { position: relative; }

.progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  max-width: 420px;
  margin: 0 auto;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-progress);
  border-radius: 3px;
  transition: width 0.4s ease;
  width: 0%;
  box-shadow: 0 0 16px rgba(212,164,64,0.5);
}

.step-counter {
  font-family: var(--font-accent);
  font-size: 1rem;
  color: var(--gold-light);
  margin-top: 12px;
  text-align: center;
}

/* === STEP CARD === */
.step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.step.active { display: block; }

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

.step-content {
  padding: 44px 36px;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* === TYPOGRAPHY === */
h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--deep-dark);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.step-question {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--deep-dark);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.step-description {
  font-family: var(--font-accent);
  color: var(--purple);
  font-size: 1.15rem;
  line-height: 1.5;
  margin-bottom: 28px;
}

.step-description.accent {
  color: var(--gold-dark);
  font-size: 1.2rem;
}

.step-description em {
  font-style: normal;
  color: var(--medium-gray);
  display: block;
  margin-top: 6px;
  font-size: 1rem;
}

.step-hint {
  font-family: var(--font-accent);
  color: var(--medium-gray);
  font-size: 1rem;
  text-align: center;
  margin-top: 20px;
}

/* === CHOICE CARDS === */
.choice-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.choice-cards.choice-cards-stack {
  display: flex;
  flex-direction: column;
}

.choice-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  color: var(--text);
  width: 100%;
}

.choice-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(212,164,64,0.2);
}

.choice-card.selected {
  border-color: var(--gold);
  background: #FFFBF0;
}

.choice-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-brand);
  color: white;
  border-radius: 50%;
  flex-shrink: 0;
}

.choice-text { display: flex; flex-direction: column; gap: 2px; }

.choice-text strong {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--deep-dark);
}

.choice-text span {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* === INPUTS === */
.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
  outline: none;
}

.input-group textarea { resize: vertical; font-family: var(--font-body); }

.input-group input:focus,
.input-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,164,64,0.15);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
  color: var(--medium-gray);
  font-family: var(--font-body);
}

.input-hint {
  display: block;
  font-family: var(--font-accent);
  font-size: 1rem;
  color: var(--purple);
  margin-top: 8px;
}

.input-error {
  display: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--error);
  margin-top: 6px;
}

.input-group.has-error .input-error { display: block; }
.input-group.has-error input,
.input-group.has-error textarea {
  border-color: var(--error);
  background: var(--error-bg);
}
.input-group.has-error .input-hint { display: none; }

/* === BRAND KIT CARDS === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 12px 0 28px;
}

@media (min-width: 520px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.brand-card {
  padding: 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  text-align: center;
}

.brand-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.brand-card.selected {
  border-color: var(--gold);
  background: #FFFBF0;
}

.brand-card-label {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--deep-dark);
  margin-top: 10px;
}

/* Palette swatches */
.palette-preview { display: flex; gap: 4px; justify-content: center; }
.palette-preview span {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.06);
}

/* Font preview */
.font-preview { display: flex; flex-direction: column; gap: 4px; min-height: 50px; justify-content: center; }
.font-preview .font-heading { font-size: 1rem; color: var(--deep-dark); }
.font-preview .font-body { font-size: 0.8rem; color: var(--text-muted); }

/* Layout preview */
.layout-preview {
  display: flex;
  flex-direction: column;
  gap: 3px;
  height: 60px;
  padding: 3px;
  background: var(--off-white);
  border-radius: 4px;
}
.lp { background: #CFCBC4; border-radius: 2px; }
.lp-hero { flex: 1.5; background: var(--gold-light); }
.lp-row { display: flex; gap: 3px; flex: 1; }
.lp-col { flex: 1; background: #CFCBC4; border-radius: 2px; }
.lp-wide { flex: 0.5; }

/* === BUTTONS === */
.step-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.btn-back {
  padding: 14px 20px;
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-back:hover { color: var(--deep-dark); }

.btn-next,
.btn-submit {
  padding: 14px 28px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--deep-dark);
  background: var(--gold);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  margin-left: auto;
}

.btn-next:hover {
  background: var(--gold-light);
  box-shadow: 0 4px 14px rgba(212,164,64,0.3);
}

.btn-next:disabled,
.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-submit {
  color: #fff;
  background: var(--gradient-brand);
  padding: 16px 36px;
  font-size: 1.1rem;
  width: 100%;
  margin-left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit:hover {
  background: var(--gradient-brand-hover);
  box-shadow: 0 8px 24px rgba(212,164,64,0.35);
}

.btn-submit .btn-loading { display: none; align-items: center; gap: 8px; }
.btn-submit.loading .btn-text { display: none; }
.btn-submit.loading .btn-loading { display: flex; }

.spinner { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* === GDPR === */
.gdpr-inline {
  font-family: var(--font-accent);
  font-size: 1rem;
  color: var(--medium-gray);
  margin: 16px 0 24px;
  text-align: center;
}

.gdpr-inline a {
  color: var(--purple);
  text-decoration: underline;
}

/* === THANK YOU === */
.thank-you-content { text-align: center; padding: 48px 28px; }

.success-icon { margin: 0 auto 20px; display: inline-block; }

.thank-you-content h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--deep-dark);
  margin-bottom: 8px;
}

.telegram-cta {
  margin-top: 32px;
  padding: 24px;
  background: var(--off-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.telegram-cta p { color: var(--charcoal); margin-bottom: 16px; }

.telegram-qr {
  display: inline-block;
  padding: 12px;
  background: #fff;
  border-radius: var(--radius);
  margin: 12px 0;
}

.btn-telegram {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--gradient-brand);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition);
  margin-top: 12px;
}

.btn-telegram:hover { background: var(--gradient-brand-hover); }

/* === SHAKE animation for validation === */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* === MOBILE === */
@media (max-width: 640px) {
  body { padding: 20px 12px; }
  .step-content { padding: 28px 20px; border-radius: 16px; }
  h1 { font-size: 1.65rem; }
  .step-question { font-size: 1.25rem; }
  .logo img { height: 44px !important; }
  .choice-card { padding: 16px; }
  .btn-submit { font-size: 1rem; }
}

/* === Cyrillic font fallback (ADR-0006, kit-final.html § RU) ===
   RU: Heading = Raleway 800, Body = Raleway, Friendly accent = Neucha.
   POZOR: H1 v RU je Raleway (ne Neucha) — Neucha je jen pro akcenty
   (step-description, em). Inter má cyrilici nativně, zůstává na tlačítkách. */
html[lang="ru"] body { font-family: 'Raleway', system-ui, sans-serif; }
html[lang="ru"] h1 {
  font-family: 'Raleway', sans-serif;
  font-weight: 800;
  font-size: 2.1rem;
}
html[lang="ru"] .step-description.accent,
html[lang="ru"] .step-description em { font-family: 'Neucha', cursive; }
html[lang="ru"] .step-description.accent { font-size: 1.15rem; }
html[lang="ru"] .step-question,
html[lang="ru"] .btn-back,
html[lang="ru"] .btn-next,
html[lang="ru"] .btn-submit,
html[lang="ru"] .choice-card strong { font-family: 'Inter', sans-serif; }
