:root {
  color-scheme: dark;
  --page: #12091d;
  --surface: #1b0d2a;
  --surface-deep: #100818;
  --ink: #fff7e8;
  --muted: #d7c7d7;
  --paper: #f2dfbd;
  --paper-ink: #2a1631;
  --gold: #f6bd43;
  --gold-light: #ffd979;
  --crimson: #d33761;
  --cyan: #42c8ca;
  --violet: #7b48bd;
  --line: rgba(255, 255, 255, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 280px;
  font-family: "Cairo", "Noto Kufi Arabic", sans-serif;
  color: var(--ink);
  background: var(--page);
}

a {
  color: inherit;
  text-decoration: none;
}

.hero-site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--gold);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 4px 16px #10081840;
}

.site-nav a {
  min-height: 44px;
  padding-inline: 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  color: var(--paper-ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.site-nav a:hover {
  background: var(--gold-light);
}

.site-nav a:focus-visible {
  outline: 3px solid var(--paper-ink);
  outline-offset: -3px;
}

svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.hero {
  position: relative;
  min-height: min(720px, calc(100svh - 72px));
  isolation: isolate;
  overflow: hidden;
  background-color: #160b24;
  background-image: url("./assets/quiz-hero.webp");
  background-position: left center;
  background-repeat: no-repeat;
  background-size: auto 100%;
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(15, 7, 24, 0.06) 0%, rgba(15, 7, 24, 0.28) 43%, rgba(15, 7, 24, 0.9) 78%, rgba(15, 7, 24, 0.98) 100%),
    linear-gradient(180deg, rgba(15, 7, 24, 0.04), rgba(15, 7, 24, 0.3));
}

.hero-inner {
  width: min(1680px, calc(100% - 48px));
  min-height: inherit;
  margin: 0 auto;
  padding: 30px 0 36px;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.hero-copy {
  width: min(690px, 100%);
  align-self: center;
  padding: 28px 0 24px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 900;
}

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

h1 {
  max-width: 670px;
  margin: 0;
  font-family: "Noto Kufi Arabic", "Cairo", sans-serif;
  font-size: clamp(3.4rem, 4.5vw, 5.1rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.summary {
  max-width: 660px;
  margin: 20px 0 0;
  color: var(--ink);
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.85;
}

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

.action {
  min-height: 64px;
  padding: 8px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 2px solid transparent;
  border-radius: 7px;
  font-weight: 900;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.action:hover {
  transform: translateY(-2px);
}

.action:active {
  transform: translateY(0) scale(0.98);
}

.action-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(42, 22, 49, 0.12);
}

.action-copy {
  display: grid;
  gap: 2px;
  text-align: right;
}

.action-title {
  font-size: 1rem;
  line-height: 1.35;
}

.action-hint {
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.45;
  opacity: 0.76;
}

.primary-action {
  color: var(--paper-ink);
  background: var(--gold);
  box-shadow: 0 12px 28px rgba(246, 189, 67, 0.2);
}

.primary-action:hover {
  background: var(--gold-light);
}

.secondary-action {
  color: var(--paper-ink);
  background: var(--cyan);
  box-shadow: 0 12px 28px rgba(66, 200, 202, 0.2);
}

.secondary-action:hover {
  background: #77dadb;
}

.quick-guide {
  margin-top: 22px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(18, 9, 29, 0.9);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.3);
}

.quick-guide-heading {
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.quick-guide-kicker {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 900;
}

.quick-guide h2 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.4;
}

.quick-steps {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
}

.quick-step {
  position: relative;
  min-height: 88px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(42, 22, 49, 0.14);
  border-radius: 10px;
  color: var(--paper-ink);
  background: var(--paper);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.16);
}

.quick-step::before {
  position: absolute;
  top: -4px;
  right: 50%;
  width: 34px;
  height: 10px;
  content: "";
  background: rgba(246, 189, 67, 0.8);
  transform: translateX(50%) rotate(-3deg);
}

.quick-step:nth-child(2)::before {
  background: rgba(66, 200, 202, 0.76);
  transform: translateX(50%) rotate(3deg);
}

.quick-step:nth-child(3)::before {
  background: rgba(211, 55, 97, 0.76);
}

.guide-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(246, 189, 67, 0.75);
}

.quick-step:nth-child(2) .guide-icon {
  background: rgba(66, 200, 202, 0.68);
}

.quick-step:nth-child(3) .guide-icon {
  color: #fff;
  background: rgba(211, 55, 97, 0.82);
}

.guide-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 6px;
  align-items: baseline;
}

.guide-number {
  color: var(--crimson);
  font-size: 0.75rem;
  font-weight: 900;
}

.guide-copy strong {
  font-size: 0.9rem;
  line-height: 1.4;
}

.guide-copy small {
  grid-column: 1 / -1;
  margin-top: 3px;
  color: #624f64;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
}

.hero-note {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.hero-note span {
  padding: 0 8px;
  color: var(--crimson);
}

.start-section,
.gameplay-section,
.faq-section {
  width: 100%;
}

.start-section {
  padding: 76px max(24px, calc((100% - 1180px) / 2)) 84px;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 15%, rgba(123, 72, 189, 0.18), transparent 24rem),
    var(--surface);
}

.start-section-inner,
.gameplay-section-inner {
  width: min(1180px, 100%);
  margin-inline: auto;
}

.start-section-top {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: 40px;
}

.section-heading h2,
.gameplay-section h2,
.faq-heading h2 {
  margin: 0;
  font-size: 2.25rem;
  line-height: 1.4;
}

.section-heading > p:last-child,
.faq-heading > p:last-child {
  margin: 18px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.75;
}

.setup-storyboard,
.gameplay-visual {
  margin: 0;
}

.setup-storyboard {
  position: relative;
  padding: 8px;
  border: 1px solid rgba(246, 189, 67, 0.35);
  border-radius: 18px;
  background: rgba(12, 5, 19, 0.56);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.3);
  transform: rotate(-0.7deg);
}

.setup-storyboard::before {
  position: absolute;
  z-index: 1;
  top: -9px;
  right: 46%;
  width: 72px;
  height: 18px;
  content: "";
  background: rgba(246, 189, 67, 0.82);
  transform: rotate(2deg);
}

.setup-storyboard img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 11px;
}

.steps {
  margin: 46px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
}

.steps li {
  position: relative;
  min-height: 168px;
  padding: 24px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.steps li::before {
  position: absolute;
  top: -4px;
  right: 50%;
  width: 44px;
  height: 11px;
  content: "";
  background: rgba(246, 189, 67, 0.82);
  transform: translateX(50%) rotate(-3deg);
}

.steps li:nth-child(2)::before {
  background: rgba(66, 200, 202, 0.8);
  transform: translateX(50%) rotate(3deg);
}

.steps li:nth-child(3)::before {
  background: rgba(211, 55, 97, 0.82);
}

.step-number {
  color: var(--cyan);
  font-size: 1rem;
  font-weight: 900;
}

.steps h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.45;
}

.steps p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.gameplay-section {
  padding: 70px max(24px, calc((100% - 1180px) / 2));
  color: var(--paper-ink);
  background:
    radial-gradient(circle at 85% 30%, rgba(246, 189, 67, 0.18), transparent 20rem),
    var(--paper);
}

.gameplay-section-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.76fr);
  align-items: center;
  gap: 64px;
}

.gameplay-section .section-kicker {
  color: #a92d51;
}

.gameplay-copy > p:last-child {
  margin: 22px 0 0;
  font-size: 1.08rem;
  line-height: 1.9;
}

.gameplay-visual {
  width: min(100%, 440px);
  justify-self: center;
  padding: 24px;
  border: 2px solid rgba(42, 22, 49, 0.18);
  border-radius: 18px;
  background: #251135;
  box-shadow: 12px 14px 0 rgba(123, 72, 189, 0.22), 0 22px 45px rgba(42, 22, 49, 0.22);
  transform: rotate(1.2deg);
}

.question-card {
  padding: 18px;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  color: var(--ink);
  background: #341749;
}

.demo-kicker {
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 900;
}

.question-card strong {
  font-size: 1.18rem;
}

.question-card small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.6;
}

.answer-stack {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.answer-card {
  position: relative;
  min-height: 46px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: var(--paper-ink);
  background: #f8e9cc;
  font-weight: 900;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
}

.answer-card::before {
  position: absolute;
  right: 12px;
  width: 8px;
  height: 8px;
  content: "";
  border-radius: 50%;
  background: var(--crimson);
}

.answer-card.selected {
  background: #ead9ff;
  transform: translateX(-10px);
}

.answer-card.selected::before {
  background: var(--violet);
}

.answer-card.truth {
  color: #0b3d3f;
  background: #c8f0e9;
}

.answer-card.truth::before {
  background: var(--cyan);
}

.reveal-row {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--gold-light);
  font-size: 0.78rem;
  font-weight: 900;
}

.reveal-row i {
  width: 24px;
  height: 1px;
  display: block;
  background: rgba(255, 217, 121, 0.48);
}

.faq-section {
  padding: 76px max(24px, calc((100% - 1180px) / 2)) 84px;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 80%, rgba(211, 55, 97, 0.12), transparent 24rem),
    var(--surface-deep);
}

.faq-section-inner {
  width: min(940px, 100%);
  margin-inline: auto;
}

.faq-heading {
  max-width: 720px;
}

.faq-list {
  margin-top: 36px;
  display: grid;
  gap: 12px;
}

.faq-item {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: var(--paper-ink);
  background: var(--paper);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.faq-item::before {
  position: absolute;
  top: -3px;
  right: 48px;
  width: 54px;
  height: 10px;
  content: "";
  background: rgba(246, 189, 67, 0.9);
  transform: rotate(-2deg);
}

.faq-item:nth-child(3n + 2)::before {
  background: rgba(66, 200, 202, 0.84);
  transform: rotate(2deg);
}

.faq-item:nth-child(3n)::before {
  background: rgba(211, 55, 97, 0.82);
}

.faq-item > summary {
  min-height: 68px;
  padding: 17px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  list-style: none;
  font-size: 1.06rem;
  font-weight: 900;
  line-height: 1.55;
}

.faq-item > summary::-webkit-details-marker {
  display: none;
}

.faq-item > summary:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: -5px;
}

.faq-toggle {
  position: relative;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: var(--gold);
}

.faq-toggle::before,
.faq-toggle::after {
  position: absolute;
  top: 15px;
  right: 9px;
  width: 14px;
  height: 2px;
  content: "";
  border-radius: 2px;
  background: var(--paper-ink);
}

.faq-toggle::after {
  transform: rotate(90deg);
  transition: transform 160ms ease;
}

.faq-item[open] .faq-toggle::after {
  transform: rotate(0deg);
}

.faq-answer {
  margin: 0 22px;
  padding: 0 0 20px;
  border-top: 1px dashed rgba(42, 22, 49, 0.24);
}

.faq-answer p {
  margin: 16px 0 0;
  color: #5e4b61;
  font-weight: 700;
  line-height: 1.85;
}

footer {
  width: min(1180px, calc(100% - 48px));
  min-height: 96px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--cyan);
  font-weight: 800;
}

.action:focus-visible,
footer a:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

@media (max-width: 760px) {
  .hero-site-header {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 12px;
  }

  .site-nav {
    justify-self: center;
  }

  .site-nav a {
    padding-inline: 10px;
  }

  footer {
    min-height: 88px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }

  .site-footer-links {
    gap: 14px;
  }
}

@media (max-width: 920px) and (min-width: 761px) {
  .hero-inner {
    width: min(100% - 36px, 1180px);
    padding-top: 22px;
  }

  .hero-copy {
    padding: 24px 0 20px;
  }

  h1 {
    font-size: 4.15rem;
  }

  .summary {
    margin-top: 16px;
    font-size: 1.08rem;
    line-height: 1.65;
  }

  .actions {
    margin-top: 22px;
  }

  .quick-guide {
    margin-top: 18px;
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: calc(100svh - 28px);
    background-position: left center;
    background-size: auto 100%;
  }

  .hero::before {
    background: rgba(15, 7, 24, 0.78);
  }

  .hero-inner,
  footer {
    width: min(100% - 32px, 1180px);
  }

  .hero-inner {
    padding: 20px 0 24px;
  }

  .hero-copy {
    padding: 40px 0 24px;
  }

  h1 {
    font-size: clamp(2.55rem, 12vw, 3.35rem);
    line-height: 1.25;
    white-space: normal;
  }

  .summary {
    margin-top: 16px;
    font-size: 1.02rem;
    line-height: 1.7;
  }

  .actions {
    display: grid;
    margin-top: 20px;
  }

  .action {
    width: 100%;
  }

  .secondary-action {
    order: -1;
  }

  .quick-guide-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 8px;
  }

  .quick-guide {
    margin-top: 16px;
    padding: 12px;
  }

  .quick-steps {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .quick-step {
    min-height: 80px;
  }

  .section-heading h2,
  .gameplay-section h2,
  .faq-heading h2 {
    font-size: 1.75rem;
  }

  .start-section {
    padding: 56px 16px 64px;
  }

  .start-section-top,
  .gameplay-section-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 30px;
  }

  .steps li {
    min-height: 0;
    padding: 20px;
  }

  .gameplay-section {
    padding: 52px 16px 62px;
  }

  .gameplay-visual {
    width: min(94%, 390px);
    padding: 18px;
  }

  .faq-section {
    padding: 56px 16px 64px;
  }

  .faq-list {
    margin-top: 28px;
  }

  .faq-item > summary {
    min-height: 64px;
    padding: 15px 16px;
    gap: 12px;
    font-size: 1rem;
  }

  .faq-answer {
    margin: 0 16px;
    padding-bottom: 18px;
  }

  footer {
    min-height: 88px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .action,
  .faq-toggle::after {
    transition: none;
  }
}
