:root {
  --burnt-orange: #c65a1e;
  --burnt-orange-dark: #9f4314;
  --burnt-orange-soft: #fff0e7;
  --navy: #0d2747;
  --navy-deep: #07182d;
  --navy-soft: #183b63;
  --white: #ffffff;
  --ink: #142033;
  --muted: #5e6b7a;
  --line: #d7e0eb;
  --shadow: 0 24px 70px rgba(2, 13, 30, 0.26);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(145deg, var(--navy-deep), var(--navy));
  overflow-x: hidden;
}

button,
a {
  font: inherit;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 100vh;
}

.animated-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 120px),
    linear-gradient(25deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 110px);
}

.animated-backdrop::before {
  position: absolute;
  inset: -30%;
  content: "";
  background:
    conic-gradient(
      from 90deg at 35% 45%,
      transparent,
      rgba(198, 90, 30, 0.2),
      transparent,
      rgba(255, 255, 255, 0.08),
      transparent
    );
  filter: blur(36px);
  opacity: 0.72;
  animation: slowTurn 22s linear infinite;
}

.motion-line,
.motion-ring {
  position: absolute;
  display: block;
  opacity: 0.62;
}

.motion-line {
  width: 46vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(198, 90, 30, 0.75), transparent);
  transform-origin: center;
  animation: driftLine 10s ease-in-out infinite alternate;
}

.motion-line--one {
  top: 22%;
  left: -12%;
  transform: rotate(-18deg);
}

.motion-line--two {
  right: -12%;
  bottom: 28%;
  animation-delay: -3s;
  transform: rotate(16deg);
}

.motion-line--three {
  width: 30vw;
  right: 18%;
  top: 12%;
  animation-delay: -6s;
  transform: rotate(-8deg);
}

.motion-ring {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  animation: breatheRing 8s ease-in-out infinite;
}

.motion-ring--one {
  width: 44rem;
  height: 44rem;
  right: -18rem;
  top: -16rem;
}

.motion-ring--two {
  width: 34rem;
  height: 34rem;
  left: -14rem;
  bottom: -16rem;
  border-color: rgba(198, 90, 30, 0.2);
  animation-delay: -4s;
}

.view {
  min-height: 100vh;
  display: none;
}

.view.is-active {
  display: grid;
  animation: viewIn 420ms ease both;
}

.hero {
  align-items: center;
  padding: 56px 0;
  color: var(--white);
}

.hero__content {
  width: min(1010px, 100%);
  margin: 0 auto;
  text-align: left;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--burnt-orange-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-kicker {
  color: var(--burnt-orange);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 1060px;
  color: var(--white);
  font-size: clamp(2.8rem, 7.4vw, 6.55rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.subtitle {
  max-width: 780px;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.6;
}

.hero__actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

.microcopy {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  border-radius: 18px;
  padding: 0 24px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button:focus-visible {
  outline: 3px solid rgba(198, 90, 30, 0.36);
  outline-offset: 3px;
}

.button--primary {
  color: var(--white);
  background: var(--burnt-orange);
  box-shadow: 0 14px 34px rgba(198, 90, 30, 0.34);
}

.button--primary:hover,
.button--primary:focus-visible {
  background: var(--burnt-orange-dark);
}

.button--secondary {
  color: var(--navy);
  background: var(--white);
  border-color: var(--line);
}

.button--secondary:hover,
.button--secondary:focus-visible {
  border-color: var(--navy);
}

.quiz-panel {
  align-items: center;
  padding: 42px 0;
}

.quiz-card {
  width: min(900px, 100%);
  min-height: 640px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.question-screen,
.result-screen {
  padding: clamp(28px, 5vw, 58px);
  animation: riseIn 260ms ease both;
}

.quiz-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.icon-button {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 800;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--burnt-orange);
  background: var(--burnt-orange-soft);
  transform: translateY(-2px);
  outline: none;
}

.question-copy h2,
.quiz-header h2,
.result-screen h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.result-message,
.result-detail p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.is-hidden {
  display: none;
}

.progress-block {
  margin-bottom: 30px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 800;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf4;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--burnt-orange), #e27a37);
  transition: width 260ms ease;
}

.question-copy {
  margin-bottom: 28px;
}

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

.answer-button {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  border: 2px solid var(--line);
  border-radius: 20px;
  padding: 19px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.answer-button:hover,
.answer-button:focus-visible {
  border-color: var(--burnt-orange);
  background: var(--burnt-orange-soft);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(13, 39, 71, 0.1);
  outline: none;
}

.answer-letter {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(145deg, var(--navy), var(--navy-soft));
  font-weight: 800;
}

.answer-text {
  font-weight: 700;
  line-height: 1.45;
}

.quiz-nav {
  margin-top: 26px;
}

#back-button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.result-screen {
  border-top: 10px solid var(--burnt-orange);
}

.result-message {
  margin: 20px 0 24px;
}

.result-detail {
  margin-top: 18px;
  border-left: 5px solid var(--burnt-orange);
  border-radius: 14px;
  padding: 18px 20px;
  background: #f8fafc;
}

.result-detail h3 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 1rem;
}

.result-detail p {
  margin: 0;
}

.encouragement {
  margin: 24px 0 0;
  color: var(--navy);
  font-size: 1.12rem;
  font-weight: 800;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slowTurn {
  to {
    transform: rotate(360deg);
  }
}

@keyframes driftLine {
  from {
    translate: -18px 0;
    opacity: 0.28;
  }

  to {
    translate: 22px 18px;
    opacity: 0.72;
  }
}

@keyframes breatheRing {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.32;
  }

  50% {
    transform: scale(1.08);
    opacity: 0.68;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 22px, 1180px);
  }

  .hero {
    min-height: auto;
    padding: 28px 0;
  }

  .hero__actions,
  .result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    text-align: center;
  }

  .quiz-card {
    min-height: auto;
    border-radius: 24px;
  }

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

  .quiz-header {
    gap: 14px;
    margin-bottom: 26px;
  }

  .icon-button {
    width: 42px;
    height: 42px;
  }

  .answer-button {
    border-radius: 16px;
    padding: 16px;
  }
}

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