/* Design tokens from Figma «Актуальный дизайн» — primary #0804FF, canvas 3840×2160 */
:root {
  --blue: #0804ff;
  --blue-soft: rgba(8, 4, 255, 0.08);
  --bg: #f0f0f0;
  --ink: #000000;
  --white: #ffffff;
  --side: #000000;
  --font: "Golos Text", "Futura Cyrillic", "Trebuchet MS", sans-serif;
  --stage-w: 3840;
  --stage-h: 2160;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
}

body.body--quiz,
body.body--fallback {
  background: var(--blue);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---- Stage: scale Figma 16:9 canvas to viewport ---- */
.stage {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  overflow: hidden;
}

.stage--start,
.stage--result {
  background: var(--bg);
}

.stage--quiz {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(7.5rem, 15vw, 18rem);
  min-height: 100vh;
  background: var(--blue);
}

.stage--fallback {
  background: var(--blue);
  color: var(--white);
  min-height: 100vh;
  padding: clamp(1.5rem, 4vw, 4rem);
}

/* decorative rings */
.ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.stage--start .ring,
.stage--result .ring {
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  background: transparent;
  opacity: 0.7;
}

.ring--tl {
  width: min(56vw, 54rem);
  height: min(56vw, 54rem);
  top: -28%;
  left: -18%;
  border-color: rgba(255, 255, 255, 0.95);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 60%);
}

.ring--br {
  width: min(56vw, 54rem);
  height: min(56vw, 54rem);
  right: -20%;
  bottom: -30%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 60%);
}

.ring--quiz-tr {
  width: min(40vw, 34rem);
  height: min(40vw, 34rem);
  top: -10%;
  right: 8%;
  border-color: rgba(255, 255, 255, 0.35);
}

.ring--quiz-br {
  width: min(28vw, 22rem);
  height: min(28vw, 22rem);
  bottom: -8%;
  right: 18%;
  border-color: rgba(255, 255, 255, 0.3);
}

.ring--result {
  width: min(32vw, 28rem);
  height: min(32vw, 28rem);
  right: 4%;
  bottom: 6%;
  border-color: #fff;
  opacity: 0.85;
}

/* buttons — Figma «Начать»: 388×143, cornerRadius 45 */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  border-radius: 45px;
  padding: 0.85rem 2.4rem;
  font-size: clamp(1.25rem, 2.2vw, 2.2rem);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-pill:active {
  transform: scale(0.98);
}

.btn-pill--primary {
  background: var(--blue);
  color: var(--white);
  width: min(24.25rem, 72vw);   /* 388px */
  height: min(8.9375rem, 18vw); /* 143px */
  min-width: 0;
  padding: 0;
  border-radius: 45px;
  font-size: clamp(1.5rem, 3.2vw, 3.75rem); /* Stolzl 60 */
  line-height: 1;
}

.btn-pill--outline {
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
}

.btn-pill--white {
  background: var(--white);
  color: var(--blue);
}

/* ========== START (frame 37) ========== */
.stage__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1.25rem, 4vw, 3.5rem);
  position: relative;
  z-index: 2;
}

.logo-rso {
  width: clamp(9rem, 18vw, 16rem);
  height: auto;
}

.start-main {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(1rem, 4vh, 3rem) 1.25rem 3rem;
  max-width: 56rem;
  margin: 0 auto;
}

.start-title {
  margin: 0 0 clamp(1.5rem, 3vh, 2.5rem);
  font-size: clamp(1.55rem, 3.6vw, 3.4rem);
  font-weight: 700;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: -0.01em;
}

.start-title .accent {
  color: var(--blue);
}

.scale-list {
  list-style: none;
  margin: 0 0 clamp(1.75rem, 4vh, 3rem);
  padding: 0;
  text-align: left;
  display: grid;
  gap: 0.55rem;
  font-size: clamp(1rem, 1.8vw, 1.85rem);
  font-weight: 400;
}

.scale-list b {
  font-weight: 700;
}

/* ========== QUIZ (frame 49) ========== */
.quiz-main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 5rem);
  min-height: 100vh;
}

.quiz-main__decor {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.quiz-content {
  position: relative;
  z-index: 1;
  width: min(92%, 68rem);
  color: var(--white);
  text-align: center;
}

.quiz-prompt {
  margin: 0 0 1rem;
  font-size: clamp(1rem, 1.8vw, 1.9rem);
  font-weight: 400;
  opacity: 0.95;
}

.quiz-statement {
  margin: 0 0 clamp(1.75rem, 4vh, 3rem);
  font-size: clamp(1.45rem, 3.4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
}

.likert {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(0.55rem, 1.4vw, 1.25rem);
  max-width: 52rem;
  margin: 0 auto;
}

.likert__option {
  cursor: pointer;
}

.likert__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.likert__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1.13 / 1;
  border-radius: 1.4rem;
  border: 2px solid rgba(255, 255, 255, 0.95);
  color: var(--white);
  font-size: clamp(1.4rem, 2.8vw, 2.8rem);
  font-weight: 700;
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.likert__option.is-selected .likert__btn,
.likert__option:has(input:checked) .likert__btn {
  background: var(--white);
  color: var(--ink);
  transform: scale(1.02);
}

.likert-hints {
  display: flex;
  justify-content: space-between;
  max-width: 52rem;
  margin: 0.85rem auto 0;
  font-size: clamp(0.75rem, 1.2vw, 1.25rem);
  font-weight: 400;
  text-align: left;
  line-height: 1.2;
}

.likert-hints span:last-child {
  text-align: right;
}

.form-error {
  margin: 1rem 0 0;
  font-weight: 600;
  color: #fff;
}

.quiz-side {
  background: var(--side);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1.5rem, 4vh, 3.5rem) 0.75rem;
  min-height: 100vh;
}

.quiz-side__progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}

.quiz-side__label {
  font-size: clamp(1rem, 1.6vw, 1.8rem);
  font-weight: 400;
}

.quiz-side__value {
  font-size: clamp(1.4rem, 2.4vw, 2.6rem);
  font-weight: 300;
  white-space: nowrap;
}

.quiz-side__value b {
  font-weight: 700;
}

.quiz-side__next {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--white);
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(1.1rem, 1.8vw, 2rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem;
  transition: opacity 0.15s ease;
}

.quiz-side__next:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.quiz-side__arrow {
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1;
  font-weight: 300;
}

/* ========== RESULT (frames 1/2/…) ========== */
.stage--result {
  padding: clamp(1rem, 3vw, 2.5rem) clamp(1rem, 4vw, 3.5rem) 2rem;
  min-height: 100vh;
}

.result-photos {
  position: absolute;
  left: 0;
  top: 12%;
  width: min(28vw, 22rem);
  height: 76%;
  pointer-events: none;
  z-index: 0;
}

.result-photos__img {
  position: absolute;
  left: 0;
  width: 100%;
  height: 38%;
  object-fit: cover;
  border-radius: 0 40% 40% 0 / 0 30% 30% 0;
  mask-image: radial-gradient(ellipse 90% 80% at 30% 50%, #000 55%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 30% 50%, #000 55%, transparent 78%);
}

.result-photos__img--1 { top: 0; }
.result-photos__img--2 { top: 28%; }
.result-photos__img--3 { top: 56%; }

.result-eyebrow {
  position: relative;
  z-index: 1;
  margin: 0.25rem 0 1.25rem;
  text-align: center;
  font-size: clamp(1rem, 1.6vw, 1.7rem);
  font-weight: 400;
  color: #222;
}

.result-hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  margin: 0 0 1.5rem;
  margin-left: min(22vw, 18rem);
}

.result-hero__icon {
  width: clamp(3.5rem, 6vw, 6.5rem);
  height: auto;
  flex-shrink: 0;
}

.result-hero__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.6rem, 3.6vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
}

.result-hero__professions {
  margin: 0;
  color: var(--blue);
  font-size: clamp(0.9rem, 1.4vw, 1.45rem);
  font-weight: 500;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
}

.result-hero__professions .dot {
  opacity: 0.7;
}

.result-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
  margin-left: min(22vw, 18rem);
  align-items: start;
}

.result-cards {
  display: grid;
  gap: 1rem;
}

.info-card {
  background: var(--white);
  border-radius: 1.25rem;
  padding: clamp(1rem, 2vw, 1.6rem) clamp(1rem, 2vw, 1.75rem);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.info-card__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1rem, 1.5vw, 1.45rem);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.info-card__icon {
  width: 1.6rem;
  height: 1.6rem;
}

.info-card p {
  margin: 0;
  font-size: clamp(0.9rem, 1.2vw, 1.2rem);
  line-height: 1.45;
  color: #111;
}

.strengths-panel__title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.1rem, 1.6vw, 1.55rem);
  font-weight: 700;
}

.strengths-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.strengths-panel__list li {
  background: var(--blue);
  color: var(--white);
  border-radius: 1.15rem;
  padding: 0.85rem 1.15rem;
  font-size: clamp(0.9rem, 1.2vw, 1.2rem);
  font-weight: 600;
  width: fit-content;
  max-width: 100%;
}

.result-again {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin: 1.5rem 0 0 min(22vw, 18rem);
  font-size: 1rem;
  padding: 0.65rem 1.5rem;
}

/* ========== FALLBACK (frame 44) ========== */
.stage--fallback {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  grid-template-rows: auto 1fr auto;
  gap: 1rem 2rem;
  align-content: center;
}

.fallback-deco {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  pointer-events: none;
}

.fallback-deco img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fallback-lead {
  position: relative;
  z-index: 1;
  grid-column: 1;
  margin: 0;
  font-size: clamp(1.8rem, 4.2vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.fallback-blob {
  position: relative;
  z-index: 1;
  grid-column: 1;
  background: var(--white);
  color: var(--blue);
  border-radius: 45% 50% 48% 52% / 55% 48% 52% 45%;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem);
  max-width: 34rem;
  margin-top: -0.5rem;
}

.fallback-blob__but {
  margin: 0;
  font-size: clamp(3rem, 8vw, 8rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.fallback-blob__line {
  margin: 0.5rem 0 0.75rem;
  font-size: clamp(1.1rem, 2vw, 2.1rem);
  font-weight: 600;
  line-height: 1.15;
  text-transform: uppercase;
}

.fallback-blob__body {
  margin: 0;
  color: var(--ink);
  font-size: clamp(0.9rem, 1.3vw, 1.35rem);
  font-weight: 400;
  line-height: 1.35;
}

.fallback-right {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  padding-left: 1rem;
}

.fallback-right__title {
  margin: 0 0 1rem;
  font-size: clamp(1.4rem, 2.8vw, 2.8rem);
  font-weight: 400;
  line-height: 1.15;
}

.fallback-right__title b {
  font-weight: 800;
}

.fallback-right__cta {
  margin: 0;
  font-size: clamp(0.95rem, 1.4vw, 1.45rem);
  font-weight: 400;
  max-width: 18rem;
  line-height: 1.35;
}

.fallback-again {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 1rem;
  font-size: 1rem;
}

/* ========== Mobile adaptations ========== */
@media (max-width: 900px) {
  .stage--quiz {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }

  .quiz-main {
    min-height: auto;
    padding: 2rem 1.25rem 1.5rem;
  }

  .quiz-side {
    min-height: auto;
    flex-direction: row;
    justify-content: space-between;
    padding: 1rem 1.25rem;
  }

  .quiz-side__next {
    flex-direction: row;
    gap: 0.5rem;
  }

  .quiz-side__arrow {
    font-size: 1.6rem;
  }

  .result-photos {
    display: none;
  }

  .result-hero,
  .result-body,
  .result-again {
    margin-left: 0;
  }

  .result-body {
    grid-template-columns: 1fr;
  }

  .result-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .stage--fallback {
    grid-template-columns: 1fr;
  }

  .fallback-right {
    grid-column: 1;
    grid-row: auto;
    padding-left: 0;
  }

  .fallback-blob {
    border-radius: 2rem;
    max-width: none;
  }
}

@media (max-width: 520px) {
  .likert__btn {
    border-radius: 1rem;
  }

  .start-main {
    align-items: stretch;
  }

  .scale-list {
    text-align: left;
  }
}
