@font-face {
  font-family: "Bricolage";
  src: url("/assets/fonts/bricolage-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --paper: #F4F3FB;
  --ink: #23204A;
  --muted: #5F5B84;
  --line: #D9D6EC;
  --card: #FFFFFF;
  --focus: #3D8BFF;
  --display: "Bricolage", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17152E;
    --ink: #EEEDF8;
    --muted: #A9A6C8;
    --line: #34315A;
    --card: #211F3E;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--card); padding: 8px 12px; z-index: 2; }

.top { max-width: 1080px; width: 100%; margin: 0 auto; padding: 22px 20px 0; }
.mark {
  font: 800 1.35rem/1 var(--display);
  letter-spacing: -0.03em;
  text-decoration: none;
}

/* ---------- home ---------- */
.hero { padding: clamp(40px, 9vw, 96px) 0 clamp(36px, 6vw, 64px); }
.hero.small { padding-bottom: 120px; }
.word {
  margin: 0;
  font: 800 clamp(4.2rem, 19vw, 12.5rem)/0.82 var(--display);
  letter-spacing: -0.055em;
}
.pieces {
  display: flex;
  gap: clamp(8px, 2vw, 18px);
  margin: clamp(18px, 3vw, 28px) 0 0;
  flex-wrap: wrap;
}
.piece {
  width: clamp(38px, 8vw, 68px);
  height: auto;
  fill: var(--c);
  animation: drop .7s cubic-bezier(.34, 1.56, .64, 1) both;
}
.piece:nth-child(1) { animation-delay: .05s; transform: rotate(-6deg); }
.piece:nth-child(2) { animation-delay: .12s; }
.piece:nth-child(3) { animation-delay: .19s; }
.piece:nth-child(4) { animation-delay: .26s; }
.piece:nth-child(5) { animation-delay: .33s; }
.piece:nth-child(6) { animation-delay: .40s; }
@keyframes drop {
  from { opacity: 0; transform: translateY(-40px) rotate(-20deg); }
  to   { opacity: 1; transform: none; }
}
.lede {
  max-width: 34ch;
  margin: 28px 0 0;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.45;
  color: var(--muted);
}

.work h2, .contact h2 {
  font: 700 1.6rem/1.2 var(--display);
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.tile a {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 16px;
  align-items: center;
  padding: 18px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 22px;
  text-decoration: none;
  transition: border-color .15s;
}
.tile a:hover { border-color: var(--c); }
.tile .shape {
  grid-row: span 2;
  width: 56px;
  fill: var(--c);
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
}
.tile a:hover .shape { transform: rotate(-10deg) scale(1.08); }
.tname { font: 700 1.3rem/1.15 var(--display); letter-spacing: -0.015em; align-self: end; }
.tmeta { font-size: .9rem; color: var(--muted); align-self: start; }

.contact { padding: clamp(48px, 8vw, 88px) 0; }
.contact p { margin: 0; font-size: 1.15rem; }

/* ---------- game page ---------- */
.game {
  margin-top: clamp(28px, 6vw, 56px);
  padding: clamp(28px, 6vw, 64px);
  border-radius: 32px;
  background: color-mix(in srgb, var(--c) 16%, var(--paper));
  position: relative;
  overflow: hidden;
}
.hero-shape {
  position: absolute;
  right: -40px;
  bottom: -50px;
  width: clamp(180px, 38vw, 380px);
  fill: var(--c);
  transform: rotate(-12deg);
}
.game h1 {
  position: relative;
  margin: 0;
  font: 800 clamp(3rem, 11vw, 7rem)/0.9 var(--display);
  letter-spacing: -0.045em;
  max-width: 8ch;
}
.tagline { position: relative; max-width: 30ch; font-size: 1.25rem; margin: 18px 0 0; }
.soon { position: relative; margin: 22px 0 0; font-weight: 600; }
.btn {
  position: relative;
  display: inline-block;
  margin-top: 24px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}
.sub { display: flex; gap: 24px; padding: 24px 4px 80px; font-weight: 600; }

/* ---------- documents ---------- */
.doc { max-width: 68ch; padding: clamp(28px, 6vw, 56px) 0 80px; }
.doc h1 {
  font: 800 clamp(2.3rem, 7vw, 3.6rem)/1 var(--display);
  letter-spacing: -0.04em;
  margin: 12px 0 8px;
}
.doc h1::after {
  content: "";
  display: block;
  width: 56px;
  height: 8px;
  margin-top: 18px;
  border-radius: 8px;
  background: var(--c);
}
.doc h2 { font: 700 1.25rem/1.3 var(--display); margin: 36px 0 6px; letter-spacing: -0.01em; }
.doc p, .doc ul { margin: 0 0 12px; }
.doc ul { padding-left: 1.2em; }
.stamp { color: var(--muted); font-size: .95rem; }
.back { color: var(--muted); text-decoration: none; font-weight: 600; }
.back:hover { color: var(--ink); }

mark.todo { background: #FFE14D; color: #23204A; padding: 0 4px; border-radius: 4px; }

/* ---------- footer ---------- */
.foot {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 36px;
  border-top: 1.5px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  color: var(--muted);
  font-size: .95rem;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
