:root {
  color-scheme: dark;
  --ink: #fff8f1;
  --muted: #cbbfd3;
  --night: #171022;
  --night-soft: #241831;
  --line: rgba(255, 248, 241, 0.16);
  --peach: #ff9d72;
  --pink: #f178c9;
  --violet: #a77af5;
  --yellow: #ffe085;
  --radius-lg: 2rem;
  --radius-md: 1.15rem;
  --shadow: 0 28px 80px rgba(4, 0, 10, 0.38);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--night);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 6%, rgba(167, 122, 245, 0.2), transparent 33rem),
    linear-gradient(145deg, #1c1229 0%, #100c18 72%);
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.14;
  pointer-events: none;
}

.ambient-one {
  top: -8rem;
  right: -8rem;
  background: var(--pink);
}

.ambient-two {
  bottom: -10rem;
  left: -7rem;
  background: var(--peach);
}

.site-header,
.site-footer {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header {
  min-height: 5.2rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-decoration: none;
}

.brand b {
  color: var(--peach);
}

.brand-mark {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border: 1px solid rgba(255, 248, 241, 0.36);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 0.72rem;
  font-style: italic;
  letter-spacing: 0;
}

.edition,
.site-footer {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.app-shell {
  width: min(1120px, calc(100% - 2rem));
  min-height: calc(100vh - 9rem);
  margin-inline: auto;
}

.screen {
  animation: screen-in 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.screen[hidden] {
  display: none !important;
}

.landing-screen {
  min-height: calc(100vh - 11rem);
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: clamp(3rem, 8vw, 8rem);
  padding: 4.5rem 1.5rem;
}

.eyebrow {
  margin: 0 0 1.1rem;
  color: var(--peach);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2,
p {
  text-wrap: pretty;
}

h1,
.result-copy h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 12ch;
  font-size: clamp(3.4rem, 8.5vw, 7.2rem);
  line-height: 0.89;
}

h1 em {
  color: var(--peach);
  font-weight: 400;
}

.intro {
  max-width: 34rem;
  margin: 2rem 0 2.2rem;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.7;
}

.primary-button,
.secondary-button {
  min-height: 3.75rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
  min-width: min(100%, 17rem);
  padding: 0.85rem 1rem 0.85rem 1.5rem;
  color: #211329;
  background: linear-gradient(120deg, var(--peach), #ffc884);
  box-shadow: 0 15px 42px rgba(255, 157, 114, 0.25);
}

.primary-button span,
.secondary-button span {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border-radius: 50%;
  background: rgba(23, 16, 34, 0.14);
  font-size: 1.15rem;
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.time-note {
  margin: 0.9rem 0 0;
  color: #9f92aa;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-orbit {
  position: relative;
  justify-self: center;
  width: min(34vw, 27rem);
  aspect-ratio: 1;
}

.orbit-ring {
  position: absolute;
  border: 1px solid rgba(255, 248, 241, 0.21);
  border-radius: 50%;
}

.orbit-ring-one {
  inset: 0;
  animation: spin 30s linear infinite;
}

.orbit-ring-one::before,
.orbit-ring-two::before {
  content: "";
  position: absolute;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 24px var(--yellow);
}

.orbit-ring-one::before {
  top: 12%;
  left: 13%;
}

.orbit-ring-two {
  inset: 12%;
  border-color: rgba(241, 120, 201, 0.35);
  animation: spin 20s linear infinite reverse;
}

.orbit-ring-two::before {
  right: 4%;
  bottom: 27%;
  background: var(--pink);
  box-shadow: 0 0 24px var(--pink);
}

.orbit-core {
  position: absolute;
  inset: 26%;
  display: grid;
  place-content: center;
  gap: 0.35rem;
  border: 1px solid rgba(255, 248, 241, 0.34);
  border-radius: 50%;
  text-align: center;
  background: radial-gradient(circle at 36% 30%, #4b3062, #21152e 68%);
  box-shadow: var(--shadow), inset 0 0 38px rgba(241, 120, 201, 0.14);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.orbit-core strong {
  color: var(--peach);
  font-size: 1.2rem;
}

.orbit-label {
  position: absolute;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(23, 16, 34, 0.75);
  backdrop-filter: blur(10px);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.label-one { top: 7%; right: 0; }
.label-two { bottom: 8%; left: 0; }
.label-three { right: -8%; bottom: 26%; }

.quiz-screen {
  width: min(780px, 100%);
  min-height: calc(100vh - 11rem);
  margin-inline: auto;
  padding: 2.4rem 0 4rem;
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.progress-header p span:first-child {
  color: var(--ink);
}

.text-button {
  min-width: 3rem;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.88rem;
  text-decoration: underline;
  text-underline-offset: 0.25rem;
}

.progress-track {
  height: 3px;
  margin-top: 0.85rem;
  overflow: hidden;
  background: var(--line);
}

.progress-track span {
  display: block;
  width: 16.667%;
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--peach));
  transition: width 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.question-panel {
  padding: clamp(3rem, 9vh, 6rem) 0 2rem;
}

.question-panel h2 {
  max-width: 19ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.question-hint {
  margin: 1rem 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.answer-card {
  -webkit-tap-highlight-color: transparent;
  position: relative;
  min-height: 6.2rem;
  padding: 1.15rem 3.2rem 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.45;
  transition: border-color 170ms ease, background 170ms ease, transform 170ms ease;
}

.answer-card::after {
  content: attr(data-letter);
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

@media (hover: hover) and (pointer: fine) {
  .answer-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 157, 114, 0.52);
    background: rgba(255, 157, 114, 0.07);
  }
}

.answer-card.is-selected {
  border-color: var(--peach);
  background: rgba(255, 157, 114, 0.14);
  box-shadow: 0 0 0 1px var(--peach), 0 12px 32px rgba(241, 120, 201, 0.09);
}

.answer-card.is-selected::after {
  color: var(--night);
  border-color: var(--peach);
  background: var(--peach);
}

.calculating-screen {
  min-height: calc(100vh - 11rem);
  display: grid;
  place-content: center;
  text-align: center;
}

.calculating-screen h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 400;
}

.scanner {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.scanner span {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--peach);
  animation: pulse 900ms ease-in-out infinite alternate;
}

.scanner span:nth-child(2) { animation-delay: 180ms; background: var(--pink); }
.scanner span:nth-child(3) { animation-delay: 360ms; background: var(--violet); }

.result-screen {
  min-height: calc(100vh - 11rem);
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(310px, 0.7fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 6rem);
  padding: 3rem 1.5rem 4.5rem;
}

.result-copy {
  min-width: 0;
  container-type: inline-size;
}

.result-copy h2 {
  max-width: 100%;
  font-size: clamp(2rem, 14cqw, 7rem);
  overflow-wrap: anywhere;
  line-height: 0.88;
  text-transform: uppercase;
}

.result-summary {
  max-width: 35rem;
  margin: 1.6rem 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.65;
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.3rem;
}

.result-tags span {
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(255, 248, 241, 0.2);
  border-radius: 999px;
  color: #e5dce8;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.secondary-button {
  min-width: min(100%, 14.5rem);
  padding: 0.75rem 0.75rem 0.75rem 1.3rem;
  border: 1px solid rgba(255, 248, 241, 0.32);
  background: rgba(255, 255, 255, 0.04);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.secondary-button span {
  background: rgba(255, 255, 255, 0.1);
}

.result-artwork {
  position: relative;
  width: min(100%, 25rem);
  margin: 0;
  justify-self: end;
}

.result-artwork::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8% -10% 3%;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--pink), var(--peach));
  filter: blur(60px);
  opacity: 0.27;
}

.result-artwork img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 941 / 1672;
  object-fit: contain;
  margin-inline: auto;
  border: 1px solid rgba(255, 248, 241, 0.34);
  border-radius: 1.4rem;
  box-shadow: var(--shadow);
}

.result-artwork figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.8rem;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.site-footer {
  min-height: 3.8rem;
  border-top: 1px solid var(--line);
}

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

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

@keyframes pulse {
  from { transform: translateY(0); opacity: 0.4; }
  to { transform: translateY(-0.6rem); opacity: 1; }
}

@media (max-width: 760px) {
  .site-header,
  .site-footer,
  .app-shell {
    width: min(100% - 1.25rem, 1120px);
  }

  .site-header {
    min-height: 4.5rem;
  }

  .edition {
    display: none;
  }

  .landing-screen {
    min-height: calc(100svh - 8.3rem);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 2rem;
    padding: 2.8rem 0.45rem 3.4rem;
  }

  h1 {
    font-size: clamp(3.35rem, 16vw, 5.7rem);
  }

  .intro {
    margin: 1.4rem 0 1.7rem;
    line-height: 1.55;
  }

  .primary-button {
    width: 100%;
  }

  .landing-orbit {
    position: absolute;
    z-index: -1;
    top: 6.5rem;
    right: -7rem;
    width: 18rem;
    opacity: 0.34;
  }

  .orbit-label {
    display: none;
  }

  .quiz-screen {
    min-height: calc(100svh - 8.3rem);
    padding: 1.15rem 0.35rem 2.5rem;
  }

  .question-panel {
    padding-top: clamp(2.6rem, 7vh, 4rem);
  }

  .question-panel h2 {
    font-size: clamp(2.25rem, 10vw, 3.25rem);
  }

  .answers {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .answer-card {
    min-height: 4.6rem;
    padding-block: 0.95rem;
  }

  .calculating-screen {
    min-height: calc(100svh - 8.3rem);
  }

  .result-screen {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 2.2rem;
    padding: 3rem 0.35rem 4rem;
  }

  .result-copy h2 {
    font-size: clamp(4rem, 21vw, 6.4rem);
  }

  .result-artwork {
    width: min(100%, 27rem);
    justify-self: center;
    grid-row: 2;
  }

  .result-copy {
    grid-row: 1;
  }

  .result-tags {
    margin-bottom: 0;
  }

  .result-screen > #retake-button {
    grid-row: 3;
  }

  .result-artwork::before {
    inset-inline: 0;
  }

  .result-artwork figcaption {
    flex-direction: column;
    gap: 0.3rem;
  }

  .secondary-button {
    width: 100%;
  }
}

@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;
  }
}
