@font-face {
  font-family: "Abar";
  src:
    url("./fonts/AbarFaNum-VF.woff2") format("woff2"),
    url("./fonts/AbarFaNum-VF.woff") format("woff"),
    url("./fonts/AbarFaNum-VF.ttf") format("truetype");
  font-display: swap;
  font-weight: 100 900;
  font-style: normal;
}

:root {
  color-scheme: light;
  --bg: #fbfbf8;
  --surface: #ffffff;
  --surface-2: #f2f4f1;
  --ink: #151515;
  --muted: #4f5652;
  --soft: #7a817d;
  --line: rgba(21, 21, 21, 0.12);
  --green: #16823a;
  --green-dark: #0d5f2a;
  --red: #c81e2b;
  --red-dark: #8f141d;
  --accent: #c81e2b;
  --accent-ink: #ffffff;
  --shadow: 0 24px 70px rgba(21, 21, 21, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 18%, rgba(22, 130, 58, 0.16), transparent 18rem),
    radial-gradient(circle at 86% 78%, rgba(200, 30, 43, 0.12), transparent 20rem),
    linear-gradient(135deg, #f8fbf7 0%, #ffffff 48%, #fff6f6 100%),
    var(--bg);
  color: var(--ink);
  font-family: "Abar", Tahoma, Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--green) 0 33.33%, #ffffff 33.33% 66.66%, var(--red) 66.66% 100%);
  box-shadow: 0 1px 0 rgba(21, 21, 21, 0.05);
  pointer-events: none;
}

button {
  font: inherit;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0;
}

.flow-steps {
  position: sticky;
  top: 8px;
  z-index: 20;
  width: min(320px, calc(100% - 28px));
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 10px auto -64px;
  padding: 7px 10px;
  border: 1px solid rgba(21, 21, 21, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 34px rgba(21, 21, 21, 0.08);
  backdrop-filter: blur(12px);
}

.flow-step {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(21, 21, 21, 0.12);
  border-radius: 50%;
  background: #ffffff;
  color: var(--muted);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.flow-step:hover {
  transform: translateY(-1px);
  border-color: rgba(200, 30, 43, 0.32);
}

.flow-step.is-active {
  border-color: var(--red);
  background: var(--red);
  color: #ffffff;
}

.flow-step.is-done {
  border-color: rgba(22, 130, 58, 0.45);
  color: var(--green-dark);
}

.intro,
.quiz,
.roles-screen,
.role-detail-screen,
.signup-screen,
.mission-login-screen,
.missions-screen,
.result {
  width: 100%;
}

.quiz,
.roles-screen,
.role-detail-screen,
.signup-screen,
.mission-login-screen,
.missions-screen,
.result {
  width: min(1040px, calc(100% - 28px));
  margin: 0 auto;
  padding: 78px 0 28px;
}

.intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  padding-bottom: 70px;
  background:
    linear-gradient(180deg, #eff9e9 0 38%, #ffffff 38% 100%);
}

.campaign-hero {
  position: relative;
  text-align: center;
}

.hero-title {
  display: block;
  width: 100%;
  min-height: 210px;
  height: clamp(240px, 23vw, 330px);
  object-fit: cover;
  object-position: top center;
  animation: rise-in 620ms ease both;
}

.hero-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: -53px auto 0;
}

.hero-cta {
  position: absolute;
  top: clamp(60px, 6.5vw, 94px);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding-inline: 20px;
  z-index: 2;
}

.button.hero-cta {
  margin: 0;
}

.hero-panel__image {
  display: block;
  width: 100vw;
  max-width: none;
  height: auto;
  margin: 0 auto;
  animation: fade-up 720ms ease 120ms both;
}

.question h2,
.result h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.45;
}

.campaign-steps {
  width: min(760px, calc(100% - 34px));
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  direction: rtl;
  align-items: end;
}

.campaign-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.campaign-step img {
  display: block;
  width: clamp(118px, 12vw, 152px);
  height: auto;
}

.campaign-step strong {
  color: var(--red);
  font-family: "Abar", Tahoma, Arial, sans-serif;
  font-size: clamp(17px, 1.75vw, 24px);
  font-weight: 850;
  line-height: 1.28;
  letter-spacing: 0;
}

.campaign-footer {
  width: 100%;
  margin: 48px auto 0;
  text-align: center;
}

.campaign-footer img {
  display: block;
  width: min(100%, 1440px);
  height: auto;
  margin: 0 auto;
}

.flow-header p,
.question p,
.result-card p,
.runtime {
  color: var(--muted);
  font-size: 17px;
  line-height: 2.05;
}

.button {
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 13px 18px;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.button--primary {
  margin-top: 30px;
  background: var(--red);
  color: var(--accent-ink);
  box-shadow: 0 12px 28px rgba(200, 30, 43, 0.16);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button--primary:hover {
  background: var(--red-dark);
  box-shadow: 0 16px 34px rgba(200, 30, 43, 0.2);
  transform: translateY(-1px);
}

.button.hero-cta:hover {
  transform: translateX(-50%) translateY(-1px);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes slow-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

.button--ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.flow-header {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 24px;
}

.flow-header h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 58px);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0;
}

.flow-header p {
  margin: 8px 0 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 15px;
  font-weight: 900;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.role-card {
  display: grid;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(21, 21, 21, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 44px rgba(21, 21, 21, 0.07);
  animation: fade-up 520ms ease both;
}

.role-card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4.18;
  object-fit: cover;
  border-radius: 6px;
  background: var(--surface-2);
}

.role-card .button {
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding-block: 10px;
}

.role-source {
  display: none;
}

.role-detail-card {
  display: grid;
  grid-template-columns: minmax(220px, 330px) 1fr;
  gap: 22px;
  align-items: start;
  padding: 16px;
  border: 1px solid rgba(21, 21, 21, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(21, 21, 21, 0.07);
}

.role-detail-card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4.18;
  object-fit: cover;
  border-radius: 8px;
  background: var(--surface-2);
}

.role-detail-card__body {
  display: grid;
  gap: 18px;
}

.role-detail-card__body p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 2.15;
  white-space: pre-line;
}

.signup-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(21, 21, 21, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 44px rgba(21, 21, 21, 0.07);
}

.field {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.field input,
.field select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus,
.field select:focus {
  border-color: rgba(22, 130, 58, 0.55);
  box-shadow: 0 0 0 4px rgba(22, 130, 58, 0.1);
}

.signup-form__submit {
  grid-column: 1 / -1;
  justify-self: start;
  min-width: 180px;
}

.form-message {
  grid-column: 1 / -1;
  min-height: 28px;
  margin: 0;
  color: var(--red-dark);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.8;
}

.form-message.is-success {
  color: var(--green-dark);
}

.mission-login-form {
  max-width: 560px;
}

.mission-list {
  display: grid;
  gap: 12px;
}

.mission-empty {
  padding: 18px;
  border: 1px solid rgba(21, 21, 21, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(21, 21, 21, 0.06);
}

.mission-item {
  position: relative;
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid rgba(21, 21, 21, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(21, 21, 21, 0.06);
  cursor: pointer;
}

.mission-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mission-item__check {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  margin-top: 2px;
  border: 2px solid rgba(22, 130, 58, 0.5);
  border-radius: 7px;
  background: #ffffff;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.mission-item__check::before {
  content: "✓";
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 160ms ease, transform 160ms ease;
}

.mission-item.is-completed .mission-item__check {
  border-color: var(--green);
  background: var(--green);
  transform: rotate(-2deg);
}

.mission-item.is-completed .mission-item__check::before {
  opacity: 1;
  transform: scale(1);
}

.mission-item__content {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.mission-item__content::after {
  content: "";
  position: absolute;
  top: 52%;
  right: -2px;
  width: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(75, 78, 74, 0.74), rgba(75, 78, 74, 0.48), transparent);
  transform: rotate(-1.2deg);
  transition: width 220ms ease;
}

.mission-item.is-completed .mission-item__content::after {
  width: calc(100% + 4px);
}

.mission-item__content strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.9;
  transition: color 160ms ease, opacity 160ms ease;
}

.mission-item__content span {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.mission-item.is-completed .mission-item__content strong,
.mission-item.is-completed .mission-item__content span {
  color: var(--soft);
  opacity: 0.78;
}

.mission-empty h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.45;
}

.mission-empty p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.quiz__header {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ebe7;
}

.progress span {
  display: block;
  width: 33%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--red));
  transition: width 180ms ease;
}

.step-label {
  color: var(--soft);
  font-size: 13px;
  white-space: nowrap;
}

.question {
  margin-bottom: 24px;
}

.question p {
  margin: 14px 0 0;
}

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

.option {
  width: 100%;
  min-height: 98px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
  color: var(--ink);
  text-align: right;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(21, 21, 21, 0.045);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.option:hover {
  border-color: rgba(22, 130, 58, 0.36);
  box-shadow: 0 16px 34px rgba(21, 21, 21, 0.07);
}

.option:active {
  transform: translateY(1px);
}

.option__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid rgba(22, 130, 58, 0.18);
  font-size: 22px;
}

.option strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.option span:last-child {
  color: var(--muted);
  line-height: 1.8;
}

.result-card {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid rgba(200, 30, 43, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(22, 130, 58, 0.12), transparent 42%),
    linear-gradient(25deg, transparent 48%, rgba(200, 30, 43, 0.11)),
    var(--surface);
  box-shadow: 0 18px 44px rgba(21, 21, 21, 0.08);
}

.result-card__icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green), var(--red));
  color: var(--accent-ink);
  font-size: 32px;
}

.result-card p {
  margin: 12px 0 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.actions .button {
  margin-top: 0;
}

.runtime {
  margin: 18px 0 0;
  color: var(--soft);
  font-size: 13px;
}

.is-hidden {
  display: none;
}

@media (max-width: 560px) {
  .app-shell {
    width: 100%;
    padding-top: 0;
  }

  .intro {
    padding-bottom: 42px;
    background:
      linear-gradient(180deg, #eff9e9 0 34%, #ffffff 34% 100%);
  }

  .hero-title {
    min-height: 154px;
    height: 160px;
    object-position: top center;
  }

  .hero-panel {
    margin-top: -18px;
    overflow: hidden;
  }

  .hero-cta {
    top: clamp(28px, 8vw, 40px);
    width: auto;
    min-width: 108px;
    max-width: calc(100% - 48px);
    min-height: 32px;
    padding: 6px 11px;
    font-size: 12px;
    border-radius: 8px;
    white-space: nowrap;
    gap: 6px;
    box-shadow: 0 9px 20px rgba(200, 30, 43, 0.18);
  }

  .hero-panel__image {
    width: 138%;
    margin-inline: -19%;
    max-width: none;
  }

  .campaign-footer {
    margin-top: 30px;
  }

  .roles-screen,
  .role-detail-screen,
  .signup-screen,
  .mission-login-screen,
  .missions-screen,
  .result {
    width: min(100% - 22px, 440px);
    padding: 72px 0 26px;
  }

  .flow-steps {
    top: 5px;
    width: min(190px, calc(100% - 24px));
    height: 34px;
    gap: 8px;
    margin-top: 6px;
    margin-bottom: -42px;
    padding: 4px 7px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 22px rgba(21, 21, 21, 0.06);
  }

  .flow-step {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .flow-header {
    grid-template-columns: 38px 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }

  .flow-header h1 {
    font-size: 28px;
    line-height: 1.25;
  }

  .flow-header p,
  .question p,
  .result-card p {
    font-size: 14px;
    line-height: 1.8;
  }

  .eyebrow {
    margin-bottom: 4px;
    font-size: 13px;
  }

  .icon-button {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    font-size: 26px;
  }

  .campaign-steps {
    width: min(100% - 28px, 420px);
    gap: 8px;
    margin-top: 18px;
  }

  .campaign-step img {
    width: clamp(70px, 23vw, 94px);
  }

  .campaign-step strong {
    font-size: 12px;
    line-height: 1.3;
  }

  .quiz__header {
    grid-template-columns: 42px 1fr;
  }

  .role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .role-card {
    gap: 8px;
    padding: 7px;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(21, 21, 21, 0.065);
  }

  .role-card img {
    border-radius: 6px;
  }

  .role-card .button {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 14px;
  }

  .role-detail-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 10px;
  }

  .role-detail-card img {
    width: min(100%, 260px);
    margin: 0 auto;
  }

  .role-detail-card__body {
    gap: 14px;
  }

  .role-detail-card__body p {
    font-size: 15px;
    line-height: 2;
  }

  .signup-form {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
    border-radius: 8px;
  }

  .field {
    gap: 6px;
    font-size: 14px;
  }

  .field input,
  .field select {
    min-height: 46px;
    padding: 9px 11px;
  }

  .signup-form__submit {
    justify-self: stretch;
  }

  .mission-empty {
    padding: 14px;
  }

  .mission-empty h2 {
    font-size: 18px;
  }

  .mission-item {
    grid-template-columns: auto 1fr;
    gap: 10px;
    padding: 13px;
  }

  .mission-item__check {
    width: 24px;
    height: 24px;
  }

  .mission-item__content strong {
    font-size: 14px;
    line-height: 1.8;
  }

  .step-label {
    grid-column: 1 / -1;
  }

  .actions,
  .button {
    width: 100%;
  }

  .button.hero-cta {
    width: auto;
    margin: 0;
  }
}

@media (max-width: 360px) {
  .hero-title {
    height: 146px;
    min-height: 146px;
  }

  .hero-panel {
    margin-top: -15px;
  }

  .hero-panel__image {
    width: 144%;
    margin-inline: -22%;
  }

  .hero-cta {
    top: 28px;
    min-width: 104px;
    min-height: 31px;
    font-size: 12px;
  }

  .campaign-step strong,
  .role-card .button,
  .field {
    font-size: 13px;
  }

  .role-grid {
    gap: 8px;
  }
}
