/* Unni Games hub — local-only, pastel, no external assets. */

:root {
  --cream: #fffaf6;
  --card: #fffdfa;
  --ink: #4c3d4a;
  --muted: #7d6b7a;
  --line: #eddfe9;
  --pink: #f6bcd2;
  --pink-soft: #ffe6ef;
  --lilac: #dbc9f3;
  --mint: #bfe6cd;
  --peach: #ffd7b5;
  --sky: #cfe7f5;
  --focus: #702355;
  --radius: 22px;
  --shadow: 0 12px 26px rgba(122, 88, 112, .11);
  --shadow-lift: 0 18px 34px rgba(122, 88, 112, .17);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  background:
    radial-gradient(circle at 12% 8%, #ffe8f1 0, transparent 32%),
    radial-gradient(circle at 88% 4%, #e9e2fb 0, transparent 30%),
    radial-gradient(circle at 50% 100%, #e2f3e6 0, transparent 38%),
    var(--cream);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(190, 150, 175, .16) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: .6;
}

main, .site-header, .site-footer { position: relative; z-index: 1; }

h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: .01em; }

p { margin: 0; }

.icon {
  display: block;
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 0 0 12px 12px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

a:focus {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .9);
  border-radius: 8px;
}
@supports selector(a:focus-visible) {
  a:focus { outline: none; box-shadow: none; }
  a:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, .95);
  }
}

/* Soft background decorations */
.sky-blob {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
}
.sky-blob--one {
  width: 260px; height: 260px;
  top: -90px; right: -60px;
  background: rgba(255, 255, 255, .55);
}
.sky-blob--two {
  width: 200px; height: 200px;
  top: 210px; left: -110px;
  background: rgba(249, 214, 230, .5);
}

.drift {
  position: absolute;
  z-index: 0;
  color: #fff;
  pointer-events: none;
  animation: floaty 9s ease-in-out infinite;
}
.drift .icon { width: 22px; height: 22px; }
.drift--one { top: 130px; right: 12%; }
.drift--two { top: 330px; left: 8%; animation-delay: -4s; }
.drift--two .icon { width: 15px; height: 15px; }

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: .75; }
  50% { transform: translateY(-14px) rotate(18deg); opacity: 1; }
}

/* Header */
.site-header { padding: 42px 20px 10px; }

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 26px 30px;
  border: 2px solid #fff;
  border-radius: 34px;
  background: linear-gradient(120deg, rgba(255, 255, 255, .92), rgba(255, 243, 248, .82));
  box-shadow: var(--shadow);
}

.brand-mark {
  flex: none;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff, #ffe9f1);
  border: 3px solid #fff;
  box-shadow: 0 6px 18px rgba(160, 115, 140, .18);
}
.brand-mark svg { width: 74px; height: 74px; }

.brand-copy { min-width: 0; flex: 1 1 auto; }

.eyebrow {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #b9809b;
  margin-bottom: 2px;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: #6b4760;
  text-shadow: 2px 3px 0 #ffe2ee;
}

.tagline {
  margin-top: 6px;
  color: var(--muted);
  max-width: 56ch;
}

.offline-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #e8f5ea;
  border: 2px solid #cfe7d5;
  color: #4f7d5f;
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Intro + how to play */
main { max-width: 1140px; margin: 0 auto; padding: 22px 20px 60px; }

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.intro-copy, .how-to {
  padding: 26px 28px;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: rgba(255, 253, 250, .86);
  box-shadow: var(--shadow);
}

.intro-copy h2 { font-size: 1.7rem; color: #7b5270; margin-bottom: 10px; }
.intro-copy h2 span { color: #eaa0ba; }
.intro-copy p + p { margin-top: 12px; }
.intro-copy p { color: var(--muted); }

.score {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: .84rem;
  font-weight: 700;
  color: var(--ink) !important;
}
.score-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.score-dot--live { background: #6fbf86; box-shadow: 0 0 0 4px #e3f4e8; }
.score-dot--soon { background: #c7a6d9; box-shadow: 0 0 0 4px #f2e9f7; margin-left: 8px; }
.score-sep { color: #cbb9c7; }

.page-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.page-nav a {
  padding: 7px 13px; border-radius: 999px; background: #fff; border: 2px solid var(--line);
  color: var(--ink); text-decoration: none; font-size: .85rem; font-weight: 700;
}
.page-nav a:hover { border-color: var(--pink); }

.about {
  display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 22px; align-items: center;
  margin: 18px 0 8px; padding: 24px 26px; border-radius: 24px;
  background: linear-gradient(150deg, #fffdfb, #f0eaff); border: 2px solid #fff; box-shadow: var(--shadow);
}
.about h2 { margin: 2px 0 10px; font-size: 1.7rem; }
.about p { line-height: 1.65; }
.about-note { color: var(--muted); }
.about-facts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.about-facts li { background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 14px 10px; text-align: center; }
.about-facts strong { display: block; font-size: 1.9rem; color: var(--focus); line-height: 1; }
.about-facts span { font-size: .78rem; color: var(--muted); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

.how-to {
  background: linear-gradient(150deg, #fff7fb, #f4effc);
  border-color: #efe1ef;
}
.how-to h3 {
  font-size: 1.05rem;
  color: #7b5270;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.how-to h3::before {
  content: "";
  width: 22px; height: 22px;
  border-radius: 7px;
  background: var(--pink);
  box-shadow: inset 0 -3px 0 rgba(255,255,255,.45);
}
.how-to-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.how-to-grid li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .84rem;
  color: var(--muted);
}
.how-to-grid li .icon { color: #a17294; margin-top: 2px; }
.how-to-grid strong { color: var(--ink); }
.how-to-wide { grid-column: 1 / -1; }

/* Engine families */
.family { margin-top: 56px; }

.family-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}
.family-icon {
  flex: none;
  width: 76px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 2px solid #fff;
  box-shadow: var(--shadow);
}
.family-icon svg { width: 68px; height: 48px; }
.family-icon--pink { background: #ffe8f1; }
.family-icon--lilac { background: #efe7fb; }
.family-icon--mint { background: #e6f5e9; }
.family-icon--peach { background: #fff0e0; }
.family-icon--sky { background: #e5f2fa; }

.family-step {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #b38ba7;
}
.family-head h2 { font-size: 1.8rem; color: #6b4760; }
.family-note { font-size: .9rem; color: var(--muted); margin-top: 2px; }

.family-count {
  margin-left: auto;
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--line);
  font-size: .78rem;
  font-weight: 700;
  color: #987d92;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 20px;
}

.game-card {
  --theme: #6fae83;
  --theme-soft: #e8f5ea;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.game-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lift);
}
.game-card.is-playable { border-color: #f0bfd4; }
.game-card.is-playable:hover { border-color: #eaa0bc; }
.game-card.is-planned { background: #fffdfb; }

.theme-pip { --theme: #5f9e73; --theme-soft: #e7f4ea; }
.theme-bramble { --theme: #8b6ba9; --theme-soft: #f0e8f8; }
.theme-sprout { --theme: #4e9a8a; --theme-soft: #e2f3ef; }

.card-art {
  height: 118px;
  display: grid;
  place-items: center;
  border-bottom: 2px solid var(--line);
}
.card-art svg { width: 156px; height: 100px; }
.art--match { background: linear-gradient(135deg, #ffe8f1, #f1e9fc); }
.art--nest { background: linear-gradient(135deg, #f1e8fb, #fff1e3); }
.art--farm { background: linear-gradient(135deg, #e5f4e7, #fff3dd); }
.art--hop { background: linear-gradient(135deg, #fff0de, #ffe8ef); }
.art--run { background: linear-gradient(135deg, #e6f2fb, #f4eafb); }

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 16px;
}

.badges { display: flex; flex-wrap: wrap; gap: 7px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
.badge .icon { width: 14px; height: 14px; }

.theme-badge { color: var(--theme); background: var(--theme-soft); }
.age {
  display: inline-block;
  margin-left: 2px;
  padding: 0 5px;
  border-radius: 6px;
  background: #fff;
  color: #8b627f;
  font-size: .66rem;
}
.status-playable { color: #4e855e; background: #e6f5e9; border: 1px solid #c9e6d1; }
.status-planned { color: #8d7a92; background: #f5eff6; border: 1px solid #e8dceb; }

h3 { font-size: 1.12rem; color: #5d4456; }
.concept { font-size: .87rem; color: var(--muted); flex: 1; }

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 2px dashed var(--line);
}

.play-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f7a9c2;
  color: #5c2f47;
  font-weight: 700;
  font-size: .84rem;
  text-decoration: none;
  box-shadow: 0 4px 0 #e58aa7;
  transition: transform .16s ease, box-shadow .16s ease;
}
.play-link:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #e58aa7; }
.play-link:active { transform: translateY(2px); box-shadow: 0 2px 0 #e58aa7; }
.play-link .icon { width: 16px; height: 16px; }

.coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9a879c;
  font-size: .82rem;
  font-weight: 700;
}
.coming-soon .icon { width: 16px; height: 16px; }

.repo-link {
  color: #8a6d99;
  font-size: .78rem;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.repo-link:hover { color: #6d4d80; }

.id-tag {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--theme-soft);
  color: var(--theme);
  font-size: .72rem;
  font-weight: 700;
}

/* Footer */
.site-footer {
  max-width: 1140px;
  margin: 0 auto;
  padding: 26px 20px 46px;
  text-align: center;
  color: var(--muted);
  font-size: .82rem;
  border-top: 2px dashed var(--line);
}
.site-footer p + p { margin-top: 4px; }

/* Responsive */
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; padding: 22px; }
  .offline-pill { margin-left: 116px; }
  .intro { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-header { padding: 20px 12px 6px; }
  .header-inner { gap: 14px; border-radius: 26px; }
  .brand-mark { width: 68px; height: 68px; }
  .brand-mark svg { width: 56px; height: 56px; }
  .offline-pill { margin-left: 0; width: 100%; justify-content: center; }
  main { padding: 16px 12px 40px; }
  .intro-copy, .how-to { padding: 20px; }
  .how-to-grid { grid-template-columns: 1fr; }
  .family { margin-top: 40px; }
  .family-head { flex-wrap: wrap; gap: 12px; }
  .family-icon { width: 62px; height: 52px; }
  .family-icon svg { width: 58px; height: 42px; }
  .family-head h2 { font-size: 1.5rem; }
  .family-count { margin-left: 70px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
  .card-art { height: 96px; }
  .card-art svg { width: 130px; height: 84px; }
  .card-body { padding: 15px 16px 14px; }
  .card-foot { flex-wrap: wrap; }
}

@media (max-width: 380px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* Accessibility preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media (forced-colors: active) {
  .game-card, .intro-copy, .how-to, .header-inner, .offline-pill, .badge,
  .play-link, .family-count, .family-icon, .card-art {
    border: 2px solid CanvasText;
  }
  a:focus, a:focus-visible { outline: 3px solid Highlight; }
}
