@import url("https://fonts.googleapis.com/css2?family=Archivo+Black&family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --ink: #17132f;
  --ink-soft: #504b68;
  --paper: #f8f5ec;
  --card: #fffdf7;
  --lime: #dfff3f;
  --pink: #ff5d8f;
  --purple: #7257ff;
  --sky: #47d7ff;
  --green: #31c879;
  --red: #f14d61;
  --line: #d8d2c7;
  --shadow: 0 24px 70px rgba(23, 19, 47, 0.16);
  --display: "Archivo Black", Impact, sans-serif;
  --body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(71, 215, 255, 0.22), transparent 21rem),
    radial-gradient(circle at 92% 82%, rgba(255, 93, 143, 0.17), transparent 24rem),
    var(--paper);
  font-family: var(--body);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 8h2v2H8zm42 34h2v2h-2zM28 64h2v2h-2z' fill='%23725F56' fill-opacity='.25'/%3E%3C/svg%3E");
  content: "";
  pointer-events: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 4px solid var(--sky);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  transform: translateY(-150%);
  padding: 0.8rem 1rem;
  color: white;
  background: var(--ink);
  border-radius: 0.5rem;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 96px;
  border-bottom: 2px solid rgba(23, 19, 47, 0.14);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  font: 1.85rem/1 var(--display);
  letter-spacing: -0.12em;
}

.brand-mark i {
  width: 0.35rem;
  height: 1.8rem;
  margin: 0 0.05rem;
  transform: skewX(-20deg);
  background: var(--pink);
}

.brand-name {
  padding-left: 0.65rem;
  border-left: 2px solid currentColor;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.header-badge {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.9rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--lime);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quiz-app {
  min-height: calc(100vh - 176px);
  padding: 54px 0 70px;
}

.screen {
  animation: screen-in 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.start-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(390px, 0.96fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
  min-height: 600px;
}

.start-status {
  min-height: 1.5rem;
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1.1rem;
  color: var(--purple);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 26px;
  height: 4px;
  background: currentColor;
}

.eyebrow.centered {
  justify-content: center;
}

.start-copy h1 {
  max-width: 700px;
  margin: 0;
  font: clamp(3.4rem, 7vw, 6.7rem)/0.94 var(--display);
  letter-spacing: -0.07em;
  text-transform: uppercase;
}

.start-copy h1 em {
  display: inline-block;
  color: var(--purple);
  font-style: normal;
  transform: rotate(-1.5deg);
}

.intro {
  max-width: 620px;
  margin: 1.8rem 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.7;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 60px;
  border: 3px solid var(--ink);
  border-radius: 1rem;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.04em;
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.primary-button {
  padding: 0.9rem 1.5rem 0.9rem 1.8rem;
  color: var(--ink);
  background: var(--lime);
  box-shadow: 7px 7px 0 var(--ink);
  font-size: 1rem;
  text-transform: uppercase;
}

.primary-button svg,
.secondary-button svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.primary-button:hover,
.secondary-button:hover {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 var(--ink);
}

.quiz-facts {
  display: flex;
  gap: 1.8rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.quiz-facts li {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 0.55rem;
}

.quiz-facts strong {
  font: 1.8rem/1 var(--display);
}

.quiz-facts span {
  max-width: 75px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
}

.start-art {
  position: relative;
  min-height: 520px;
}

.number-card {
  position: absolute;
  display: grid;
  place-items: center;
  width: min(280px, 55%);
  aspect-ratio: 0.78;
  border: 5px solid var(--ink);
  border-radius: 2rem;
  box-shadow: 14px 14px 0 var(--ink);
  font: clamp(9rem, 18vw, 14rem)/1 var(--display);
}

.number-six {
  top: 30px;
  left: 12px;
  z-index: 2;
  transform: rotate(-8deg);
  color: var(--ink);
  background: var(--sky);
}

.number-seven {
  right: 15px;
  bottom: 18px;
  z-index: 3;
  transform: rotate(7deg);
  color: white;
  background: var(--purple);
}

.sticker {
  position: absolute;
  z-index: 5;
  display: grid;
  place-content: center;
  width: 108px;
  aspect-ratio: 1;
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 5px 5px 0 var(--ink);
  font: 1.2rem/0.95 var(--display);
  text-align: center;
}

.sticker small {
  font: 0.62rem/1 var(--body);
  font-weight: 900;
  letter-spacing: 0.13em;
}

.sticker-top {
  top: 3px;
  right: 12px;
  transform: rotate(10deg);
  background: var(--lime);
}

.sticker-bottom {
  bottom: 0;
  left: -10px;
  transform: rotate(-9deg);
  background: var(--pink);
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 900;
}

.sticker-bottom strong {
  font: 1rem var(--display);
}

.orbit {
  position: absolute;
  border: 3px dashed rgba(23, 19, 47, 0.35);
  border-radius: 50%;
}

.orbit-one {
  inset: 60px -20px 55px;
  transform: rotate(20deg);
}

.orbit-two {
  inset: 20px 45px;
  transform: rotate(-27deg);
}

.spark {
  position: absolute;
  z-index: 6;
  font-size: 2rem;
}

.spark-one {
  top: 30%;
  right: -3%;
  color: var(--pink);
}

.spark-two {
  top: 40%;
  left: -7%;
  color: var(--purple);
}

.spark-three {
  right: 20%;
  bottom: -5%;
  color: var(--sky);
}

.question-screen {
  width: min(930px, 100%);
  margin: 0 auto;
}

.quiz-topline {
  margin-bottom: 1.2rem;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progress-copy strong {
  color: var(--purple);
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: white;
}

.progress-track span {
  display: block;
  width: 10%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sky), var(--purple));
  transition: width 350ms ease;
}

.question-card {
  position: relative;
  min-height: 545px;
  padding: clamp(1.4rem, 4vw, 3rem);
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 2rem;
  background: var(--card);
  box-shadow: var(--shadow), 8px 8px 0 var(--ink);
}

.question-card::after {
  position: absolute;
  top: -48px;
  right: -48px;
  width: 140px;
  height: 140px;
  border: 22px solid var(--lime);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.question-copy {
  position: relative;
  z-index: 1;
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 1rem;
}

.category-pill,
.difficulty-pill {
  display: inline-flex;
  margin: 0;
  padding: 0.45rem 0.72rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.category-pill {
  background: var(--lime);
}

.difficulty-pill {
  background: #eeebff;
}

.difficulty-pill[data-level="7"],
.difficulty-pill[data-level="8"],
.difficulty-pill[data-level="9"],
.difficulty-pill[data-level="10"] {
  background: var(--pink);
  color: white;
}

.question-card h1 {
  max-width: 760px;
  margin: 0 0 1.7rem;
  font: clamp(1.75rem, 4vw, 3rem)/1.1 var(--display);
  letter-spacing: -0.04em;
}

.question-card h1:focus,
.result-screen h1:focus {
  outline: none;
}

.question-image-wrap {
  width: 100%;
  height: 180px;
  margin: -0.3rem 0 1.6rem;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 1.1rem;
  background: #eeebff;
}

.question-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.answers {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.answer-button {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.85rem;
  align-items: center;
  min-height: 78px;
  padding: 0.75rem 1rem;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 1rem;
  background: white;
  box-shadow: 3px 3px 0 rgba(23, 19, 47, 0.95);
  cursor: pointer;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.answer-button:hover:not(:disabled) {
  transform: translate(2px, 2px);
  background: #f4f1ff;
  box-shadow: 1px 1px 0 var(--ink);
}

.answer-letter {
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  border: 2px solid currentColor;
  border-radius: 0.65rem;
  font: 1rem var(--display);
}

.answer-button:disabled {
  cursor: default;
}

.answer-button.is-correct {
  color: #073e27;
  background: #a6f0c8;
}

.answer-button.is-wrong {
  color: #64111c;
  background: #ffb2bd;
}

.answer-status {
  min-height: 1.2rem;
  margin: 1rem 0 0;
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
}

.result-screen {
  position: relative;
  width: min(870px, 100%);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem);
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 2rem;
  background: var(--card);
  box-shadow: var(--shadow), 9px 9px 0 var(--ink);
  text-align: center;
}

.result-screen > *:not(.confetti) {
  position: relative;
  z-index: 2;
}

.result-screen h1 {
  margin: 0;
  font: clamp(2rem, 5vw, 3.7rem)/1 var(--display);
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.score-badge {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.45rem;
  width: min(330px, 80vw);
  margin: 1.2rem auto 1.4rem;
  padding: 0.4rem 1rem 1rem;
  color: var(--ink);
  border: 4px solid var(--ink);
  border-radius: 1.5rem;
  background: var(--lime);
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(-2deg);
}

.score-badge strong {
  font: clamp(5rem, 14vw, 8.3rem)/0.9 var(--display);
  letter-spacing: -0.08em;
}

.score-badge span {
  padding-bottom: 0.65rem;
  font-size: 1.2rem;
  font-weight: 900;
}

.result-screen h2 {
  margin: 0.6rem 0 0.5rem;
  font: clamp(1.35rem, 3vw, 2rem)/1.2 var(--display);
}

.result-message {
  max-width: 590px;
  margin: 0 auto;
  color: var(--ink-soft);
  line-height: 1.6;
}

.share-panel {
  max-width: 680px;
  margin: 2rem auto 1.6rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--line);
}

.share-panel > p:first-child {
  margin: 0 0 0.9rem;
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.share-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.share-link {
  display: grid;
  place-items: center;
  gap: 0.45rem;
  min-height: 86px;
  padding: 0.65rem 0.35rem;
  color: white;
  border: 2px solid var(--ink);
  border-radius: 0.85rem;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  font: 0.68rem var(--body);
  font-weight: 800;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.share-link:hover {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.share-link svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.share-link.instagram svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.share-link.instagram .filled {
  fill: currentColor;
  stroke: none;
}

.facebook {
  background: #1877f2;
}

.x {
  background: #111;
}

.whatsapp {
  background: #18b96b;
}

.instagram {
  background: linear-gradient(135deg, #6b4fd8 0%, #db3075 50%, #ff9b3f 100%);
}

.share-status {
  min-height: 1.1rem;
  margin: 0.7rem 0 0;
  color: var(--purple);
  font-size: 0.75rem;
  font-weight: 800;
}

.secondary-button {
  min-height: 50px;
  padding: 0.7rem 1.15rem;
  background: white;
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 0.8rem;
}

.secondary-button svg {
  width: 20px;
}

.confetti span {
  position: absolute;
  display: block;
  width: 18px;
  height: 45px;
  border: 2px solid var(--ink);
}

.confetti span:nth-child(1) {
  top: 8%;
  left: 8%;
  transform: rotate(25deg);
  background: var(--pink);
}

.confetti span:nth-child(2) {
  top: 20%;
  left: 16%;
  width: 32px;
  height: 32px;
  transform: rotate(-18deg);
  border-radius: 50%;
  background: var(--sky);
}

.confetti span:nth-child(3) {
  top: 6%;
  right: 12%;
  transform: rotate(50deg);
  background: var(--lime);
}

.confetti span:nth-child(4) {
  top: 26%;
  right: 7%;
  width: 26px;
  height: 26px;
  transform: rotate(20deg);
  background: var(--purple);
}

.confetti span:nth-child(5) {
  bottom: 17%;
  left: 6%;
  width: 28px;
  height: 28px;
  transform: rotate(45deg);
  background: var(--lime);
}

.confetti span:nth-child(6) {
  right: 5%;
  bottom: 12%;
  transform: rotate(-34deg);
  background: var(--pink);
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  border-top: 2px solid rgba(23, 19, 47, 0.14);
  color: var(--ink-soft);
  font-size: 0.75rem;
}

footer span {
  color: var(--ink);
  font-family: var(--display);
}

footer p {
  margin: 0;
}

.noscript-message {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 99;
  padding: 1rem;
  color: white;
  border-radius: 0.6rem;
  background: var(--ink);
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .start-screen {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .start-copy {
    display: grid;
    justify-items: center;
  }

  .start-art {
    width: min(500px, 100%);
    min-height: 480px;
    margin: 0 auto;
  }

  .quiz-facts {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 24px, 1180px);
  }

  .site-header {
    min-height: 76px;
  }

  .header-badge {
    padding: 0.48rem 0.65rem;
    font-size: 0.58rem;
  }

  .brand-mark {
    font-size: 1.55rem;
  }

  .brand-name {
    font-size: 0.7rem;
  }

  .quiz-app {
    min-height: calc(100vh - 140px);
    padding: 36px 0 54px;
  }

  .start-screen {
    min-height: auto;
  }

  .start-copy h1 {
    font-size: clamp(3rem, 15vw, 4.7rem);
  }

  .intro {
    margin: 1.3rem 0;
    font-size: 0.95rem;
  }

  .quiz-facts {
    gap: 0.9rem;
    margin-top: 2rem;
  }

  .quiz-facts li {
    display: block;
  }

  .quiz-facts span {
    display: block;
    margin-top: 0.25rem;
  }

  .start-art {
    min-height: 370px;
    overflow: hidden;
  }

  .number-card {
    width: 52%;
    border-width: 4px;
    border-radius: 1.5rem;
    box-shadow: 9px 9px 0 var(--ink);
    font-size: 8.5rem;
  }

  .sticker {
    width: 82px;
    font-size: 0.95rem;
  }

  .question-card,
  .result-screen {
    border-radius: 1.3rem;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .question-card {
    min-height: 580px;
    padding: 1.3rem;
  }

  .question-card h1 {
    margin-bottom: 1.25rem;
    font-size: 1.75rem;
  }

  .question-card::after {
    width: 100px;
    height: 100px;
    border-width: 15px;
  }

  .question-image-wrap {
    height: 150px;
  }

  .answers {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .answer-button {
    min-height: 64px;
    grid-template-columns: 36px 1fr;
    font-size: 0.9rem;
  }

  .answer-letter {
    width: 36px;
  }

  .result-screen {
    padding: 2rem 1rem;
  }

  .confetti span:nth-child(2),
  .confetti span:nth-child(4),
  .confetti span:nth-child(5) {
    display: none;
  }

  .share-links {
    grid-template-columns: repeat(2, 1fr);
  }

  .share-link {
    grid-template-columns: auto auto;
    min-height: 58px;
  }

  footer {
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
