/* Block Fantasies — shared styles */
:root {
  --bg: #0d0a14;
  --bg-2: #151022;
  --panel: #1a1329;
  --panel-edge: #2e2245;
  --text: #ece6f5;
  --muted: #a99cbf;
  --purple: #9b4dff;
  --purple-deep: #4b1a8c;
  --gold: #e6b54a;
  --gold-light: #ffe9a8;
  --radius: 14px;
  --max: 1080px;
  --serif: Georgia, "Times New Roman", "DejaVu Serif", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(155, 77, 255, .28), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 110%, rgba(230, 181, 74, .08), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

main { flex: 1; }

a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-light); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  font-family: var(--serif);
  line-height: 1.2;
  margin: 0 0 .5em;
  font-weight: 700;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  text-align: center;
  letter-spacing: .04em;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: block;
  text-align: center;
  font-size: .78rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #b78bff;
  margin-bottom: .6rem;
  font-weight: 600;
}

.ornament {
  display: block;
  width: 120px;
  height: 10px;
  margin: 0 auto 2.2rem;
  background:
    linear-gradient(90deg, transparent, var(--gold) 40%, var(--gold) 60%, transparent) center / 100% 1px no-repeat;
  position: relative;
}
.ornament::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 8px; height: 8px;
  background: var(--gold);
  transform: translate(-50%, -50%) rotate(45deg);
}

section { padding: 72px 0; }

/* ---------- Top bar ---------- */
.topbar { padding: 18px 0; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-family: var(--serif); font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; font-size: .95rem;
}
.brand img { width: 34px; height: 34px; }
.brand:hover { color: var(--gold-light); }
.topbar .contact { font-size: .9rem; color: var(--muted); text-decoration: none; }
.topbar .contact:hover { color: var(--gold-light); }

/* ---------- Hero ---------- */
.hero { padding: 36px 0 80px; text-align: center; position: relative; }
.hero::before {
  /* faint block grid backdrop */
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(155, 77, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155, 77, 255, .07) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero > .container { position: relative; }
.hero-logo {
  width: min(440px, 88%);
  height: auto;
  display: block;
  margin: 0 auto 8px;
  filter: drop-shadow(0 10px 40px rgba(155, 77, 255, .45));
}
.hero h1 {
  /* visually hidden: logo carries the name */
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.tagline {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3.2vw, 1.7rem);
  color: var(--text);
  margin: 10px auto 8px;
  max-width: 46ch;
  line-height: 1.35;
  text-wrap: balance;
}
.subline { color: var(--muted); margin: 0 auto 30px; max-width: 46ch; text-wrap: balance; }

.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.store {
  display: inline-flex; align-items: center; gap: 12px;
  min-width: 210px;
  padding: 11px 20px;
  border-radius: 12px;
  background: linear-gradient(180deg, #221934, #140f20);
  border: 1px solid var(--panel-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  color: var(--text);
  text-align: left;
  cursor: not-allowed;
  user-select: none;
}
.store svg { width: 26px; height: 26px; flex: none; }
.store small {
  display: block; font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold); font-weight: 700; line-height: 1.3;
}
.store strong { display: block; font-size: 1.12rem; line-height: 1.2; font-weight: 600; }

.meta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px;
  margin: 26px 0 0; padding: 0; list-style: none;
}
.meta li {
  font-size: .8rem; color: var(--muted);
  border: 1px solid var(--panel-edge); border-radius: 999px;
  padding: 3px 12px; background: rgba(26, 19, 41, .6);
}

/* ---------- How to play ---------- */
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin: 0; padding: 0; list-style: none;
}
.step {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  position: relative;
}
.step::before {
  content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.step .num {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; margin-bottom: 14px;
  border-radius: 8px;
  background: linear-gradient(180deg, #b678ff, var(--purple-deep));
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .3), 0 4px 18px rgba(155, 77, 255, .35);
  font-family: var(--serif); font-weight: 700; color: #fff;
}
.step h3 { font-size: 1.25rem; color: var(--gold-light); }
.step p { margin: 0; color: var(--muted); }

/* ---------- Gallery ---------- */
.gallery-intro { text-align: center; color: var(--muted); max-width: 52ch; margin: -1.2rem auto 2rem; }
.gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin: 0; padding: 0; list-style: none;
}
.tile {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  border: 1px solid var(--panel-edge);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 18px;
  background: var(--panel);
}
.tile::before {
  content: ""; position: absolute; inset: -20%;
  background:
    radial-gradient(circle at 30% 30%, var(--a, #9b4dff) 0, transparent 45%),
    radial-gradient(circle at 75% 65%, var(--b, #e6b54a) 0, transparent 40%),
    radial-gradient(circle at 40% 90%, var(--c, #4b1a8c) 0, transparent 50%);
  filter: blur(28px);
  opacity: .75;
}
.tile::after {
  /* block grid overlay */
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(13, 10, 20, .55) 2px, transparent 2px),
    linear-gradient(90deg, rgba(13, 10, 20, .55) 2px, transparent 2px);
  background-size: 28px 28px;
  box-shadow: inset 0 -90px 60px -30px rgba(13, 10, 20, .9);
}
.tile span {
  position: relative; z-index: 1;
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-light); font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px; text-align: center;
}
.tile span::before {
  content: ""; width: 8px; height: 8px; background: var(--gold);
  transform: rotate(45deg); flex: none;
}
.tile:nth-child(2) { --a: #c04dff; --b: #5b7bff; --c: #2a0f52; }
.tile:nth-child(3) { --a: #e6b54a; --b: #9b4dff; --c: #7a1f3d; }
.tile:nth-child(4) { --a: #3d5bd6; --b: #c04dff; --c: #1b0f3a; }
.tile:nth-child(5) { --a: #b8326a; --b: #e6b54a; --c: #4b1a8c; }
.tile:nth-child(6) { --a: #7b3fd6; --b: #3fb7c9; --c: #2a0f52; }

/* ---------- Support ---------- */
.support-card {
  max-width: 640px; margin: 0 auto; text-align: center;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--panel-edge);
  border-radius: calc(var(--radius) + 4px);
  padding: 40px 28px;
}
.support-card p { color: var(--muted); margin: 0 0 18px; }
.email-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, #b07d26);
  color: #1a1206; font-weight: 700; text-decoration: none;
  box-shadow: 0 6px 24px rgba(230, 181, 74, .25);
  overflow-wrap: anywhere;
}
.email-btn:hover { color: #1a1206; filter: brightness(1.06); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--panel-edge);
  padding: 28px 0 36px;
  font-size: .9rem; color: var(--muted);
  background: rgba(13, 10, 20, .6);
}
.site-footer .container {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
}
.site-footer nav ul {
  display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--gold-light); text-decoration: underline; }
.site-footer p { margin: 0; }
.site-footer .studio-logo {
  flex: 0 0 100%; height: 132px; object-fit: contain;
  margin: 4px 0 10px; opacity: .92;
}

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 60px 0 90px; }
.notfound .code {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(4.5rem, 18vw, 8rem); line-height: 1; margin: 0 0 8px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, #9a6a1c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 8px 30px rgba(155, 77, 255, .45));
}
.notfound h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
.notfound p { color: var(--muted); max-width: 40ch; margin: 0 auto 28px; }

/* ---------- Legal pages ---------- */
.legal { padding: 24px 0 72px; }
.legal article { max-width: 760px; margin: 0 auto; overflow-wrap: break-word; }
.legal h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  letter-spacing: .02em;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.legal h2 {
  text-align: left;
  font-size: clamp(1.3rem, 3.2vw, 1.6rem);
  letter-spacing: .01em;
  margin: 2.2em 0 .6em;
  padding-top: .9em;
  border-top: 1px solid var(--panel-edge);
  scroll-margin-top: 16px;
}
.legal h3 { font-size: 1.12rem; color: var(--gold-light); margin: 1.6em 0 .4em; }
.legal p, .legal ul, .legal ol { margin: 0 0 1em; }
.legal ul, .legal ol { padding-left: 1.4em; }
.legal li { margin-bottom: .45em; }
.legal li > ul, .legal li > ol { margin: .45em 0 0; }
.legal strong { color: #fff; }
.legal .dates { color: var(--muted); font-size: .92rem; margin-bottom: 1.6em; }
.legal .dates span { display: block; }
.legal .lead { font-size: 1.05rem; }
.legal .note {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--panel-edge);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 0 0 1.4em;
}
.legal .note p:last-child, .legal .note ul:last-child { margin-bottom: 0; }
.legal .caps { text-transform: uppercase; font-size: .92rem; letter-spacing: .01em; }
.legal nav.toc {
  background: rgba(26, 19, 41, .7);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  padding: 18px 22px 10px;
  margin: 0 0 1.8em;
}
.legal nav.toc h2 {
  border: 0; padding: 0; margin: 0 0 .5em;
  font-size: .8rem; font-family: var(--sans); letter-spacing: .25em; text-transform: uppercase;
  background: none; color: var(--purple); -webkit-text-fill-color: currentColor;
}
.legal nav.toc ol { columns: 2 240px; column-gap: 32px; margin: 0; }
.legal nav.toc li { break-inside: avoid; margin-bottom: .35em; }
.legal nav.toc a { text-decoration: none; }
.legal nav.toc a:hover { text-decoration: underline; }
.legal .table-wrap { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--panel-edge); border-radius: 10px; }
.legal table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--panel-edge); }
.legal th { background: var(--panel); color: var(--gold-light); font-weight: 600; }
.legal tr:last-child td { border-bottom: 0; }
.legal .steps-list li { margin-bottom: .7em; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  section { padding: 56px 0; }
  .steps { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tile { padding: 14px; }
  .tile span { font-size: .68rem; letter-spacing: .1em; }
  .site-footer .container { flex-direction: column; text-align: center; }
  .site-footer nav ul { justify-content: center; }
}

@media (max-width: 420px) {
  .topbar .contact { display: none; }
  .store { min-width: 0; width: 100%; max-width: 280px; }
}
