/* Easy Fun Games — shared styles for every page */

:root {
  --sky: #eef4ff;       /* page background */
  --ink: #1d2350;       /* text */
  --ink-soft: #4a5080;  /* secondary text */
  --berry: #e9446a;     /* tile 1 / links */
  --sun: #ffc23d;       /* tile 2 */
  --leaf: #2bb673;      /* tile 3 */
  --wave: #3b82f6;      /* tile 4 */
  --white: #ffffff;
  --radius-tile: 14px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--berry); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--wave);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3, .brand {
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.15;
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.25rem;
}

.brand-tile {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--berry);
  color: var(--white);
  box-shadow: 0 4px 0 #b52a4c;
  transform: rotate(-6deg);
}

.site-nav { display: flex; gap: 6px; }

.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.site-nav a:hover { background: var(--white); }
.site-nav a[aria-current="page"] { background: var(--ink); color: var(--white); }

/* ---------- Main ---------- */

main {
  flex: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

/* ---------- Home hero: letter tiles ---------- */

.hero { text-align: center; padding: 48px 0 24px; }

.tiles {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0 0 40px;
  font-size: clamp(2rem, 9vw, 4.5rem);
}

.tile-row { display: flex; gap: clamp(6px, 1.5vw, 14px); }

.tile {
  display: grid;
  place-items: center;
  width: 1.35em;
  height: 1.35em;
  border-radius: var(--radius-tile);
  color: var(--white);
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1;
  transform: rotate(var(--tilt, 0deg));
  animation: drop 0.55s cubic-bezier(.3, 1.6, .5, 1) both;
  animation-delay: var(--delay, 0s);
}

.tile.c1 { background: var(--berry); box-shadow: 0 6px 0 #b52a4c; }
.tile.c2 { background: var(--sun); color: var(--ink); box-shadow: 0 6px 0 #d19a1c; }
.tile.c3 { background: var(--leaf); box-shadow: 0 6px 0 #1d8a55; }
.tile.c4 { background: var(--wave); box-shadow: 0 6px 0 #2a5fc0; }

@keyframes drop {
  from { opacity: 0; transform: translateY(-40px) rotate(var(--tilt, 0deg)); }
  to   { opacity: 1; transform: translateY(0) rotate(var(--tilt, 0deg)); }
}

@media (prefers-reduced-motion: reduce) {
  .tile { animation: none; }
}

.lead {
  max-width: 34ch;
  margin: 0 auto 28px;
  font-size: 1.25rem;
  color: var(--ink-soft);
}

.button {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 5px 0 #0d1130;
  transition: transform .1s, box-shadow .1s;
}

.button:hover { color: var(--white); transform: translateY(-2px); box-shadow: 0 7px 0 #0d1130; }
.button:active { transform: translateY(3px); box-shadow: 0 2px 0 #0d1130; }

/* ---------- Inner pages ---------- */

.page-title { font-size: clamp(2rem, 6vw, 3rem); margin: 24px 0 8px; }

.page-intro { color: var(--ink-soft); font-size: 1.2rem; max-width: 60ch; margin: 0 0 32px; }

/* Games list */

.game-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr));
  gap: 16px;
}

.game {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 4px 0 #d6def5;
}

.game-icon {
  flex: none;
  width: 88px;
  height: 88px;
  border-radius: 22px;   /* same rounded-square shape as a phone launcher */
  box-shadow: 0 4px 10px rgba(29, 35, 80, 0.18);
}

.game-text h2 { font-size: 1.3rem; margin: 0 0 4px; }
.game-text p { margin: 0 0 10px; color: var(--ink-soft); line-height: 1.45; }

.game-status {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--sky);
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 700;
}

.game-status.live {
  background: var(--leaf);
  color: var(--white);
  text-decoration: none;
}

.game-status.live:hover { background: #1d8a55; color: var(--white); }

@media (max-width: 400px) {
  .game-list { grid-template-columns: 1fr; }
  .game { gap: 14px; padding: 14px; }
  .game-icon { width: 72px; height: 72px; border-radius: 18px; }
}

.prose { max-width: 68ch; }
.prose h2 { font-size: 1.4rem; margin: 36px 0 8px; }
.prose p, .prose li { color: var(--ink); }
.prose ul { padding-left: 1.2em; }
.updated { color: var(--ink-soft); }

/* ---------- Footer ---------- */

.site-footer {
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 16px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.site-footer a { color: var(--ink-soft); }
