/* Mosaic Quest website (Phase 7D). The game's Phase 7C palette: night violet, gold, candy green. */
:root {
  --night: #17144d;
  --violet: #30268f;
  --violet-light: #5f45dd;
  --card: rgba(48, 34, 150, 0.72);
  --card-stroke: rgba(255, 237, 122, 0.45);
  --gold: #ffcc21;
  --gold-light: #ffed7a;
  --green: #12ad29;
  --green-top: #6bed33;
  --text: #ffffff;
  --text-soft: #d6d1ff;
  --radius: 22px;
  --max: 1040px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(107, 92, 242, 0.45), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(255, 84, 178, 0.18), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, #2a1f86 55%, #4a28a0 100%);
  background-attachment: fixed;
}

a { color: var(--gold-light); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }

.skip { position: absolute; left: -999px; top: 0; padding: 10px 14px; background: var(--gold); color: #3a1f00; z-index: 10; }
.skip:focus { left: 12px; top: 12px; }

.wrap { width: min(100% - 40px, var(--max)); margin-inline: auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(23, 20, 77, 0.72); border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: 0.2px; }
.brand img { width: 36px; height: auto; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { color: var(--text-soft); text-decoration: none; font-weight: 700; padding: 8px 12px; border-radius: 999px; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--night); background: linear-gradient(180deg, var(--gold-light), var(--gold)); }

/* Hero */
.hero { padding: 64px 0 40px; text-align: center; }
.hero .star { width: min(220px, 52vw); height: auto; filter: drop-shadow(0 18px 40px rgba(255, 204, 33, 0.35)); animation: float 6s ease-in-out infinite; }
.hero .wordmark { width: min(520px, 86vw); height: auto; display: block; margin: 18px auto 0; }
.hero h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tagline { font-size: clamp(19px, 2.6vw, 24px); color: var(--text-soft); max-width: 620px; margin: 18px auto 0; }
.badge { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; padding: 12px 22px; border-radius: 999px; font-weight: 800;
  color: #fff; background: linear-gradient(180deg, var(--green-top), var(--green)); box-shadow: 0 5px 0 #086b29; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .hero .star { animation: none; } }

/* Sections and cards */
section { padding: 28px 0; }
h2 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.2; margin: 0 0 18px; font-weight: 900; }
h3 { font-size: 20px; margin: 0 0 8px; font-weight: 800; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--card); border: 1.5px solid var(--card-stroke); border-radius: var(--radius); padding: 22px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28); }
.card p { margin: 0; color: var(--text-soft); }
.icon { font-size: 30px; line-height: 1; margin-bottom: 10px; }

/* A small mosaic illustration drawn in CSS: no screenshots or fabricated store art. */
.mosaic { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; width: min(320px, 80vw); margin: 0 auto; padding: 14px;
  background: rgba(64, 59, 158, 0.9); border-radius: 20px; border: 2px solid rgba(225, 217, 255, 0.6); }
.mosaic span { aspect-ratio: 1; border-radius: 6px; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18), inset 0 3px 0 rgba(255, 255, 255, 0.35); }
.c1 { background: #21d1ff; } .c2 { background: #6ef033; } .c3 { background: #ffd11a; }
.c4 { background: #ff8a1f; } .c5 { background: #ff54b3; } .c6 { background: #b852ff; } .c0 { background: #211e5c; box-shadow: none !important; }

.split { display: grid; gap: 28px; align-items: center; grid-template-columns: 1.1fr 0.9fr; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* Documents */
.doc { background: rgba(23, 20, 77, 0.7); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: var(--radius); padding: clamp(20px, 4vw, 44px); margin: 32px 0; }
.doc h1 { font-size: clamp(30px, 4vw, 40px); line-height: 1.15; margin: 0 0 6px; }
.doc h2 { font-size: 23px; margin-top: 34px; }
.doc h3 { margin-top: 22px; }
.doc p, .doc li { color: #ece9ff; }
.doc .meta { color: var(--text-soft); margin: 0 0 22px; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.doc th { color: var(--gold-light); }
.doc .table-scroll { overflow-x: auto; }
.toc { columns: 2 220px; padding-left: 18px; }
.draft { background: #ffb933; color: #3a1f00; font-weight: 800; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; }

/* Footer */
.site-footer { margin-top: 40px; padding: 30px 0 46px; border-top: 1px solid rgba(255, 255, 255, 0.12); color: var(--text-soft); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 24px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* Narrow phones: one compact header row. */
@media (max-width: 520px) {
  .site-header .wrap { gap: 8px; min-height: 56px; }
  .brand { font-size: 0; gap: 0; }
  .brand img { width: 32px; }
  .nav { gap: 2px; flex-wrap: nowrap; }
  .nav a { padding: 6px 10px; font-size: 14px; }
  .doc { padding: 20px 16px; }
}
