:root {
  --primary: #e6d7b8;
  --secondary: #d9c39a;
  --bg: #f4f2ed;
  --text: #191817;
  --muted: rgba(25, 24, 23, 0.64);
  --line: rgba(25, 24, 23, 0.12);
  --surface: rgba(255, 255, 255, 0.76);
  --field: rgba(255, 255, 255, 0.86);
  --shadow: 0 28px 80px rgba(56, 43, 26, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.template-boomk_premium {
  background:
    linear-gradient(120deg, rgba(230, 215, 184, 0.44) 0%, transparent 38%),
    linear-gradient(180deg, #fffdf8 0%, var(--bg) 56%, #ece5d6 100%);
}

body.template-editorial_dark {
  --text: #f8f1e6;
  --muted: rgba(248, 241, 230, 0.68);
  --line: rgba(230, 215, 184, 0.2);
  --surface: rgba(255, 255, 255, 0.07);
  --field: rgba(255, 255, 255, 0.1);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
  background:
    linear-gradient(135deg, #17110d 0%, #2a1d15 45%, #0f0d0b 100%);
}

body.template-minimal_light {
  --muted: rgba(28, 34, 32, 0.6);
  --line: rgba(28, 34, 32, 0.1);
  --surface: rgba(255, 255, 255, 0.92);
  --field: #ffffff;
  --shadow: 0 18px 48px rgba(32, 40, 37, 0.08);
  background:
    linear-gradient(90deg, rgba(127, 157, 142, 0.12) 0%, transparent 34%),
    #f7f8f5;
}

button,
input,
textarea,
select {
  font: inherit;
}

.form-shell {
  width: min(940px, calc(100% - 32px));
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0 auto;
  padding: 42px 0;
}

.intro-screen,
.question-screen,
.final-screen {
  display: none;
  width: 100%;
  animation: rise 260ms ease both;
}

.intro-screen.is-active,
.question-screen.is-active,
.final-screen.is-active {
  display: block;
}

.intro-screen,
.question-screen,
.final-screen {
  position: relative;
  max-width: 780px;
  padding: clamp(28px, 6vw, 58px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.template-boomk_premium .intro-screen,
.template-boomk_premium .question-screen,
.template-boomk_premium .final-screen {
  border-top: 4px solid var(--secondary);
}

.template-editorial_dark .intro-screen,
.template-editorial_dark .question-screen,
.template-editorial_dark .final-screen {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.045));
}

.template-minimal_light .intro-screen,
.template-minimal_light .question-screen,
.template-minimal_light .final-screen {
  border-left: 6px solid color-mix(in srgb, var(--primary), #7f9d8e 40%);
}

.intro-screen,
.final-screen {
  text-align: center;
}

.brand-logo {
  max-width: 150px;
  max-height: 78px;
  object-fit: contain;
  margin-bottom: 24px;
}

.kicker {
  margin: 0 0 14px;
  color: color-mix(in srgb, var(--text), var(--secondary) 48%);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.template-editorial_dark .kicker {
  color: var(--primary);
}

h1 {
  max-width: 760px;
  margin: 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.05rem, 7vw, 4.55rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.template-minimal_light h1,
.template-minimal_light .question-card h2 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 850;
  letter-spacing: 0;
}

p {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.6;
}

.primary-button,
.ghost-button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  color: #21180d;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 18px 32px rgba(94, 70, 29, 0.18);
  font-weight: 850;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.template-editorial_dark .primary-button {
  color: #15110c;
  box-shadow: 0 18px 42px rgba(230, 215, 184, 0.18);
}

.template-minimal_light .primary-button {
  box-shadow: 0 14px 26px rgba(70, 88, 78, 0.14);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.ghost-button {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  box-shadow: none;
}

.consent {
  width: min(620px, 100%);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 24px auto;
  color: var(--muted);
  text-align: left;
}

.question-screen {
  max-width: 820px;
}

.progress {
  height: 8px;
  margin-bottom: 42px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text), transparent 90%);
}

.progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  transition: width 220ms ease;
}

.question-card {
  display: grid;
  gap: 22px;
}

.question-card h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.85rem, 6vw, 3.65rem);
  line-height: 1.04;
}

.question-card > p {
  margin: -8px 0 0;
}

.answers {
  display: grid;
  gap: 12px;
}

.phone-grid {
  display: grid;
  grid-template-columns: minmax(120px, 0.92fr) minmax(76px, 0.48fr) minmax(160px, 1.4fr);
  gap: 10px;
}

.phone-country,
.phone-ddd,
.phone-number {
  min-width: 0;
}

.option-button,
.field,
textarea.field,
select.field {
  width: 100%;
  min-height: 60px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--field);
  outline: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.option-button {
  text-align: left;
  cursor: pointer;
  font-weight: 780;
}

.option-button:hover,
.option-button.is-selected,
.field:focus {
  border-color: color-mix(in srgb, var(--secondary), var(--text) 22%);
  background: color-mix(in srgb, var(--field), #ffffff 24%);
}

.option-button:hover {
  transform: translateY(-1px);
}

.option-button.is-selected {
  box-shadow: inset 0 0 0 2px var(--secondary);
}

.template-editorial_dark .option-button.is-selected {
  box-shadow: inset 0 0 0 2px var(--primary);
}

textarea.field {
  min-height: 150px;
  resize: vertical;
}

.help-text {
  color: var(--muted);
  font-size: 0.92rem;
}

.error-message {
  color: #b42323;
  font-weight: 760;
}

.template-editorial_dark .error-message {
  color: #ffb8b8;
}

.nav-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 34px;
}

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

@media (max-width: 640px) {
  .form-shell {
    width: min(100% - 24px, 480px);
    align-items: start;
    padding: 22px 0;
  }

  .intro-screen,
  .question-screen,
  .final-screen {
    padding: 28px 20px;
  }

  .nav-actions {
    position: sticky;
    bottom: 0;
    padding: 12px 0 0;
    background: linear-gradient(180deg, transparent, var(--bg) 28%);
  }

  .template-editorial_dark .nav-actions {
    background: linear-gradient(180deg, transparent, #17110d 28%);
  }

  .template-minimal_light .nav-actions {
    background: linear-gradient(180deg, transparent, #f7f8f5 28%);
  }

  .primary-button,
  .ghost-button {
    width: 100%;
    padding: 0 16px;
  }

  .phone-grid {
    grid-template-columns: 1fr 0.64fr;
  }

  .phone-number {
    grid-column: 1 / -1;
  }
}
