:root {
  --blue-primary: #1a4fa0;
  --blue-dark:    #0d3880;
  --red-cta:      #e53935;
  --red-hover:    #c62828;
  --quiz-bg:      linear-gradient(135deg, #bfe8de 0%, #ddf3ee 25%, #eef9f6 55%, #f8fffe 100%);
  --progress-fill:  #1a4fa0;
  --progress-track: #c8daf0;
  --font: 'Segoe UI', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: var(--font); overflow: hidden; }

/* ════════════════════════════════
   SCREEN SYSTEM
════════════════════════════════ */
.screen {
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  overflow-y: auto;
  overflow-x: hidden;
  will-change: opacity;
}
.screen.active {
  opacity: 1;
  pointer-events: all;
}

/* ── CONTENT ANIMATIONS ── */
/* Every .stagger inside an .active screen plays itemEnter */
.screen.active .anim-content .stagger {
  animation: itemEnter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

/* Exit: whole content floats up */
.content-exit {
  animation: contentOut 0.2s ease forwards !important;
}
@keyframes contentOut {
  to { opacity: 0; transform: translateY(-16px); }
}

/* ════════════════════════════════
   SCREEN 1 — HERO
════════════════════════════════ */
#screen-hero {
  background: linear-gradient(135deg, #0d47a1 0%, #1565c0 50%, #1e88e5 100%);
  display: flex;
  align-items: stretch;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('assets/1bg.png') center right / cover no-repeat;
  z-index: 0;
}

.hero-logo {
  position: absolute;
  top: 32px;
  left: 7vw;
  height: 42px;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 80px 7vw 60px;
  max-width: 52%;
}

.hero-headline {
  font-size: clamp(26px, 3.8vw, 52px);
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero-subtitle {
  font-size: clamp(14px, 1.4vw, 19px);
  color: #cce3f8;
  line-height: 1.55;
  margin-bottom: 34px;
  max-width: 380px;
}
.btn-red {
  display: inline-block;
  background: var(--red-cta);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 34px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-red:hover {
  background: var(--red-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229,57,53,.4);
}

/* ════════════════════════════════
   SCREEN 2 — INFO
════════════════════════════════ */
#screen-info {
  background: linear-gradient(180deg, #b9dcf2 0%, #f4fbf8 100%);
  padding: 10px 0 40px;
}

.info-wrap {
  width: min(95vw, 1360px);
  margin: 0 auto;
  padding: 0 18px 30px;
}

.info-header {
  padding: 4px 0 12px;
}
.info-header img {
  height: 30px;
  display: block;
  margin-bottom: 10px;
}
.info-header .quiz-header-rule {
  background: var(--progress-track);
}
.info-progress {
  width: 25%;
}

.i-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
  align-items: center;
  padding: 26px 14px;
}
.i-section-reverse .i-text { order: 1; }
.i-section-reverse .i-img { order: 2; }

.i-img { text-align: center; }
.i-img img { width: min(100%, 245px); max-height: 215px; object-fit: contain; }

.i-text h3 {
  font-size: clamp(27px, 3vw, 40px);
  font-weight: 800;
  color: #0564b4;
  text-transform: uppercase;
  margin-bottom: 10px;
  line-height: 1.05;
}

.i-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
}
.i-label.red  { color: #eb2f6a; }
.i-label.blue { color: var(--blue-primary); }

.i-text ul {
  list-style: none;
  padding: 0;
}
.i-text ul li,
.i-steps li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  color: #1f1f1f;
  line-height: 1.55;
  margin-bottom: 3px;
}
.i-text ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: #1f1f1f;
  font-size: 12px;
  font-weight: 700;
}
.i-steps {
  list-style: none;
  padding: 0;
  counter-reset: steps;
}
.i-steps li {
  counter-increment: steps;
}
.i-steps li::before {
  content: counter(steps) '.';
  position: absolute;
  left: 0;
  color: #1f1f1f;
  font-weight: 700;
}

.i-workflow {
  align-items: end;
}

.i-divider {
  background: #e8f3fb;
  text-align: center;
  padding: 13px 16px;
  border-radius: 999px;
  font-size: 21px;
  font-weight: 700;
  color: #0564b4;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.i-final-box {
  margin-top: 18px;
  background: rgba(246, 247, 248, 0.95);
  border-radius: 4px;
  overflow: hidden;
}

.i-cta {
  padding: 8px 14px 16px;
  display: flex;
  justify-content: center;
}

.btn-navy {
  display: inline-block;
  background: var(--blue-dark);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 56px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  min-width: 180px;
}
.btn-navy.wide {
  background: #0564b4;
  border-radius: 999px;
  padding: 14px 80px;
  font-size: 14px;
  font-weight: 700;
  min-width: 100%;
  letter-spacing: .4px;
}
.btn-navy:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(13,56,128,.3);
}
.btn-navy:active { transform: translateY(0); }
.btn-navy:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: none;
}

/* ════════════════════════════════
   QUIZ HEADER (screens 3–7)
════════════════════════════════ */
.quiz-header {
  padding: 18px 6vw 0;
}
.quiz-header img {
  height: 34px;
  display: block;
  margin-bottom: 14px;
}
.quiz-header-rule {
  height: 2px;
  background: var(--progress-track);
  border: none;
  margin: 0;
}
.progress-bar {
  height: 2px;
  background: var(--progress-fill);
  width: 0%;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  top: -2px;
}

/* ════════════════════════════════
   QUIZ SCREENS (3–6)
════════════════════════════════ */
.quiz-screen { background: var(--quiz-bg); }

.quiz-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 40px 20px;
}

.quiz-question {
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 800;
  color: var(--blue-dark);
  text-align: center;
  margin-bottom: 38px;
  line-height: 1.2;
  max-width: 500px;
}

/* Custom radio */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 44px;
  width: 100%;
  max-width: 340px;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 13px;
  cursor: pointer;
  font-size: 15px;
  color: #2a2a2a;
  user-select: none;
}
.radio-label input[type="radio"] { display: none; }
.radio-circle {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--blue-primary);
  flex-shrink: 0;
  background: #fff;
  position: relative;
  transition: border-color 0.2s;
}
.radio-circle::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--blue-primary);
  transform: scale(0);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.radio-label input[type="radio"]:checked + .radio-circle::after {
  transform: scale(1);
}

/* ════════════════════════════════
   CONTACTS
════════════════════════════════ */
.contacts-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 340px;
  margin-bottom: 16px;
}
.contacts-form input {
  width: 100%;
  padding: 13px 20px;
  border: 1.5px solid #bdd2ec;
  border-radius: 50px;
  font-size: 14px;
  color: #333;
  background: rgba(255,255,255,.85);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.contacts-form input:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px rgba(26,79,160,.12);
}
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 11px;
  color: #888;
  line-height: 1.5;
  max-width: 340px;
  margin-bottom: 32px;
  cursor: pointer;
}
.consent-row input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--blue-primary);
}

/* ════════════════════════════════
   BONUS SCREEN
════════════════════════════════ */
.bonus-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 40px 20px;
  text-align: center;
}
.bonus-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  color: var(--blue-dark);
  line-height: 1.15;
  margin-bottom: 28px;
}
.bonus-emoji {
  font-size: 72px;
  margin-bottom: 24px;
}
.bonus-desc {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--blue-dark);
  max-width: 400px;
  line-height: 1.65;
  margin-bottom: 40px;
}

/* ════════════════════════════════
   SCROLLBAR
════════════════════════════════ */
#screen-info::-webkit-scrollbar { width: 5px; }
#screen-info::-webkit-scrollbar-thumb { background: #c5d8f0; border-radius: 3px; }

/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */
@media (max-width: 760px) {
  .hero-content { max-width: 100%; }
  .hero-bg { opacity: .35; }

  .info-wrap {
    width: min(98vw, 640px);
    padding: 0 10px 20px;
  }

  .info-header {
    padding-bottom: 12px;
  }

  .info-header img {
    height: 28px;
  }

  .i-section {
    grid-template-columns: 1fr 1fr;
    text-align: left;
    gap: 14px;
    padding: 18px 6px;
  }

  .i-section .i-img {
    order: 1;
  }
  .i-section .i-text {
    order: 2;
  }
  .i-section-reverse .i-text {
    order: 1;
  }
  .i-section-reverse .i-img {
    order: 2;
  }

  .i-text h3 {
    font-size: clamp(29px, 8vw, 48px);
  }

  .i-label {
    font-size: 12px;
  }

  .i-divider {
    padding: 10px 12px;
    font-size: 20px;
    line-height: 1.15;
  }

  .i-cta {
    padding: 10px 10px 14px;
  }

  .btn-navy.wide {
    padding: 12px 20px;
  }
}
