:root {
  --beige:      #F0EAD6;
  --tan:        #D2B48C;
  --tan-dk:     #b8956a;
  --rose:       #BC4749;
  --rose-dk:    #9b3a3c;
  --teal:       #70A3A7;
  --teal-dk:    #4e7d80;
  --teal-lt:    #e0edef;
  --charcoal:   #403B33;
  --charcoal-lt:#5a5449;
  --white:      #ffffff;
  /* category accent colours */
  --c-games:    #70A3A7;
  --c-books:    #BC4749;
  --c-workshop: #6366f1;
  --c-tools:    #d97706;
  --c-freebies: #16a34a;
}


/* ── LOGO ANIMATION ─────────────────────────── */
  @keyframes logo-shift {
  0%   { color: var(--tan); }
  33%  { color: var(--rose); }
  66%  { color: var(--teal); }
  100% { color: var(--tan); }
}

/* ── HERO ───────────────────────────────────── */
.hub-hero {
  background: linear-gradient(135deg, var(--charcoal) 0%, #2c2820 60%, #1e3a3b 100%);
  padding: 72px 24px 60px; text-align: center; position: relative; overflow: hidden;
}
.hub-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(112,163,167,.18) 0%, transparent 70%);
}
.hub-eyebrow {
  font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 16px; position: relative;
}
.hub-title {
  font-family: 'Fredoka', cursive; font-size: clamp(2.8rem, 7vw, 5rem); font-weight: 700;
  color: var(--white); line-height: 1.1; margin-bottom: 16px; position: relative;
}
.hub-title .accent { color: var(--teal); }
.hub-sub { font-size: 1.05rem; color: rgba(240,234,214,.7); max-width: 480px; margin: 0 auto 36px; line-height: 1.6; position: relative; }

/* search */
.search-wrap {
  position: relative; max-width: 520px; margin: 0 auto;
}
.search-wrap input {
  width: 100%; padding: 16px 52px 16px 20px;
  font-size: 1rem; font-family: 'Inter', sans-serif;
  border: 2px solid rgba(240,234,214,.15); border-radius: 16px;
  background: rgba(255,255,255,.08); color: var(--white);
  outline: none; transition: border-color .2s, background .2s;
}
.search-wrap input::placeholder { color: rgba(240,234,214,.4); }
.search-wrap input:focus { border-color: var(--teal); background: rgba(255,255,255,.12); }
.search-wrap .search-icon {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-size: 1.1rem; pointer-events: none; opacity: .6;
}

/* ── FILTER BAR ─────────────────────────────── */
.filter-bar {
  position: sticky; top: 62px; z-index: 90;
  background: var(--white); border-bottom: 1px solid rgba(64,59,51,.1);
  box-shadow: 0 2px 12px rgba(64,59,51,.07);
}
.filter-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px; height: 54px;
  display: flex; align-items: center; gap: 6px;
}
.ftabs { display: flex; align-items: center; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.ftabs::-webkit-scrollbar { display: none; }
.ftab {
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 7px 14px; border-radius: 999px; font-size: .8rem; font-weight: 700;
  border: 1.5px solid transparent; background: none; cursor: pointer;
  color: var(--charcoal-lt); transition: all .15s;
}
.ftab:hover { background: var(--beige); color: var(--charcoal); }
.ftab.active { background: var(--charcoal); color: var(--white); border-color: var(--charcoal); }
.ftab-count { font-size: .68rem; opacity: .65; font-weight: 600; }
.ftab.active .ftab-count { opacity: .8; }
.filter-meta { margin-left: auto; font-size: .78rem; color: var(--charcoal-lt); white-space: nowrap; flex-shrink: 0; padding-left: 12px; }

/* sub-filter for workshop */
.sub-filter {
  max-width: 1200px; margin: 0 auto;
  padding: 8px 24px 10px;
  display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px solid rgba(64,59,51,.07);
}
.stag {
  padding: 4px 12px; border-radius: 999px; font-size: .72rem; font-weight: 700;
  border: 1.5px solid rgba(99,102,241,.3); background: none; cursor: pointer;
  color: var(--charcoal-lt); transition: all .15s;
}
.stag:hover { background: rgba(99,102,241,.08); color: #6366f1; border-color: #6366f1; }
.stag.active { background: #6366f1; color: var(--white); border-color: #6366f1; }

/* ── MAIN GRID AREA ─────────────────────────── */
.hub-main { max-width: 1200px; margin: 0 auto; padding: 40px 24px 80px; }

/* section header */
.sec-header {
  display: flex; align-items: center; gap: 14px;
  margin: 48px 0 20px; padding-bottom: 14px;
  border-bottom: 2px solid rgba(64,59,51,.1);
}
.sec-header:first-child { margin-top: 0; }
.sec-icon { font-size: 1.5rem; }
.sec-title { font-family: 'Fredoka', cursive; font-size: 1.5rem; font-weight: 700; }
.sec-count { font-size: .78rem; font-weight: 700; color: var(--charcoal-lt); background: var(--beige); border-radius: 999px; padding: 3px 10px; }
.sec-link { margin-left: auto; font-size: .78rem; font-weight: 700; color: var(--teal-dk); }
.sec-link:hover { text-decoration: underline; }

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

/* card */
.card {
  background: var(--white); border-radius: 16px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .18s;
  box-shadow: 0 2px 8px rgba(64,59,51,.07);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(64,59,51,.13); }
@media (prefers-reduced-motion: reduce) {
  .card, .ftab, .stag { transition: none !important; }
}
.card-top {
  height: 88px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; position: relative; overflow: hidden;
}
.card-top::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.1) 0%, transparent 60%);
}
.card-top img { position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0;opacity:.92; }
.card-icon { font-size: 2.2rem; position: relative; z-index: 1; }
.card-badge {
  font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  background: rgba(255,255,255,.2); color: var(--white); padding: 3px 8px;
  border-radius: 999px; position: relative; z-index: 1; backdrop-filter: blur(4px);
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: .92rem; font-weight: 800; color: var(--charcoal); margin-bottom: 6px; line-height: 1.3; }
.card-desc { font-size: .78rem; color: var(--charcoal-lt); line-height: 1.5; flex: 1; margin-bottom: 10px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.card-tags span {
  font-size: .62rem; font-weight: 700; color: var(--charcoal-lt);
  background: var(--beige); border-radius: 999px; padding: 2px 8px;
}
.card-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .78rem; font-weight: 800; padding: 8px 14px;
  border-radius: 10px; transition: all .15s; align-self: flex-start;
}

/* category colour schemes */
.ct-games  { background: linear-gradient(135deg, #70A3A7, #4e7d80); }
.ct-books  { background: linear-gradient(135deg, #BC4749, #9b3a3c); }
.ct-workshop { background: linear-gradient(135deg, #6366f1, #4338ca); }
.ct-tools  { background: linear-gradient(135deg, #d97706, #b45309); }
.ct-freebies { background: linear-gradient(135deg, #16a34a, #15803d); }

/* per-category link colours */
.lk-games  { background: rgba(112,163,167,.12); color: var(--teal-dk); }
.lk-games:hover  { background: var(--teal-dk); color: var(--white); }
.lk-books  { background: rgba(188,71,73,.1); color: var(--rose-dk); }
.lk-books:hover  { background: var(--rose-dk); color: var(--white); }
.lk-workshop { background: rgba(99,102,241,.1); color: #4f46e5; }
.lk-workshop:hover { background: #6366f1; color: var(--white); }
.lk-tools  { background: rgba(217,119,6,.1); color: #b45309; }
.lk-tools:hover  { background: #d97706; color: var(--white); }
.lk-freebies { background: rgba(22,163,74,.1); color: #15803d; }
.lk-freebies:hover { background: #16a34a; color: var(--white); }

/* NEW / COMING SOON badges on cards */
.pill-new { background: var(--rose) !important; color: var(--white) !important; }
.pill-soon { background: var(--tan-dk) !important; color: var(--white) !important; }
.pill-free { background: #16a34a !important; color: var(--white) !important; }

/* age badge */
.card-tags .age { background: rgba(188,71,73,.12); color: var(--rose-dk); }

/* empty state */
.empty-state {
  text-align: center; padding: 80px 24px;
  display: none;
}
.empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state p { font-size: 1.05rem; color: var(--charcoal-lt); margin-bottom: 20px; }
.empty-state button {
  padding: 10px 24px; border-radius: 12px; background: var(--charcoal);
  color: var(--white); font-weight: 700; font-size: .9rem; border: none; cursor: pointer;
}

/* ── RESPONSIVE ─────────────────────────────── */
@media(max-width: 640px) {
  .card-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hub-hero { padding: 48px 16px 40px; }
  .ftab { padding: 6px 10px; font-size: .74rem; }
}
@media(max-width: 400px) {
  .card-grid { grid-template-columns: 1fr; }
}


  :root {
  --beige:      #F0EAD6;
  --tan:        #D2B48C;
  --tan-dk:     #b8956a;
  --rose:       #BC4749;
  --rose-dk:    #9b3a3c;
  --teal:       #70A3A7;
  --teal-dk:    #4e7d80;
  --teal-lt:    #e0edef;
  --charcoal:   #403B33;
  --charcoal-lt:#5a5449;
  --white:      #ffffff;
  /* category accent colours */
  --c-games:    #70A3A7;
  --c-books:    #BC4749;
  --c-workshop: #6366f1;
  --c-tools:    #d97706;
  --c-freebies: #16a34a;
}


/* ── LOGO ANIMATION ─────────────────────────── */
  @keyframes logo-shift {
  0%   { color: var(--tan); }
  33%  { color: var(--rose); }
  66%  { color: var(--teal); }
  100% { color: var(--tan); }
}

/* ── HERO ───────────────────────────────────── */
.hub-hero {
  background: linear-gradient(135deg, var(--charcoal) 0%, #2c2820 60%, #1e3a3b 100%);
  padding: 72px 24px 60px; text-align: center; position: relative; overflow: hidden;
}
.hub-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(112,163,167,.18) 0%, transparent 70%);
}
.hub-eyebrow {
  font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 16px; position: relative;
}
.hub-title {
  font-family: 'Fredoka', cursive; font-size: clamp(2.8rem, 7vw, 5rem); font-weight: 700;
  color: var(--white); line-height: 1.1; margin-bottom: 16px; position: relative;
}
.hub-title .accent { color: var(--teal); }
.hub-sub { font-size: 1.05rem; color: rgba(240,234,214,.7); max-width: 480px; margin: 0 auto 36px; line-height: 1.6; position: relative; }

/* search */
.search-wrap {
  position: relative; max-width: 520px; margin: 0 auto;
}
.search-wrap input {
  width: 100%; padding: 16px 52px 16px 20px;
  font-size: 1rem; font-family: 'Inter', sans-serif;
  border: 2px solid rgba(240,234,214,.15); border-radius: 16px;
  background: rgba(255,255,255,.08); color: var(--white);
  outline: none; transition: border-color .2s, background .2s;
}
.search-wrap input::placeholder { color: rgba(240,234,214,.4); }
.search-wrap input:focus { border-color: var(--teal); background: rgba(255,255,255,.12); }
.search-wrap .search-icon {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-size: 1.1rem; pointer-events: none; opacity: .6;
}

/* ── FILTER BAR ─────────────────────────────── */
.filter-bar {
  position: sticky; top: 62px; z-index: 90;
  background: var(--white); border-bottom: 1px solid rgba(64,59,51,.1);
  box-shadow: 0 2px 12px rgba(64,59,51,.07);
}
.filter-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px; height: 54px;
  display: flex; align-items: center; gap: 6px;
}
.ftabs { display: flex; align-items: center; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.ftabs::-webkit-scrollbar { display: none; }
.ftab {
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 7px 14px; border-radius: 999px; font-size: .8rem; font-weight: 700;
  border: 1.5px solid transparent; background: none; cursor: pointer;
  color: var(--charcoal-lt); transition: all .15s;
}
.ftab:hover { background: var(--beige); color: var(--charcoal); }
.ftab.active { background: var(--charcoal); color: var(--white); border-color: var(--charcoal); }
.ftab-count { font-size: .68rem; opacity: .65; font-weight: 600; }
.ftab.active .ftab-count { opacity: .8; }
.filter-meta { margin-left: auto; font-size: .78rem; color: var(--charcoal-lt); white-space: nowrap; flex-shrink: 0; padding-left: 12px; }

/* sub-filter for workshop */
.sub-filter {
  max-width: 1200px; margin: 0 auto;
  padding: 8px 24px 10px;
  display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px solid rgba(64,59,51,.07);
}
.stag {
  padding: 4px 12px; border-radius: 999px; font-size: .72rem; font-weight: 700;
  border: 1.5px solid rgba(99,102,241,.3); background: none; cursor: pointer;
  color: var(--charcoal-lt); transition: all .15s;
}
.stag:hover { background: rgba(99,102,241,.08); color: #6366f1; border-color: #6366f1; }
.stag.active { background: #6366f1; color: var(--white); border-color: #6366f1; }

/* ── MAIN GRID AREA ─────────────────────────── */
.hub-main { max-width: 1200px; margin: 0 auto; padding: 40px 24px 80px; }

/* section header */
.sec-header {
  display: flex; align-items: center; gap: 14px;
  margin: 48px 0 20px; padding-bottom: 14px;
  border-bottom: 2px solid rgba(64,59,51,.1);
}
.sec-header:first-child { margin-top: 0; }
.sec-icon { font-size: 1.5rem; }
.sec-title { font-family: 'Fredoka', cursive; font-size: 1.5rem; font-weight: 700; }
.sec-count { font-size: .78rem; font-weight: 700; color: var(--charcoal-lt); background: var(--beige); border-radius: 999px; padding: 3px 10px; }
.sec-link { margin-left: auto; font-size: .78rem; font-weight: 700; color: var(--teal-dk); }
.sec-link:hover { text-decoration: underline; }

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

/* card */
.card {
  background: var(--white); border-radius: 16px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .18s;
  box-shadow: 0 2px 8px rgba(64,59,51,.07);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(64,59,51,.13); }
@media (prefers-reduced-motion: reduce) {
  .card, .ftab, .stag { transition: none !important; }
}
.card-top {
  height: 88px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; position: relative; overflow: hidden;
}
.card-top::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.1) 0%, transparent 60%);
}
.card-top img { position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0;opacity:.92; }
.card-icon { font-size: 2.2rem; position: relative; z-index: 1; }
.card-badge {
  font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  background: rgba(255,255,255,.2); color: var(--white); padding: 3px 8px;
  border-radius: 999px; position: relative; z-index: 1; backdrop-filter: blur(4px);
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: .92rem; font-weight: 800; color: var(--charcoal); margin-bottom: 6px; line-height: 1.3; }
.card-desc { font-size: .78rem; color: var(--charcoal-lt); line-height: 1.5; flex: 1; margin-bottom: 10px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.card-tags span {
  font-size: .62rem; font-weight: 700; color: var(--charcoal-lt);
  background: var(--beige); border-radius: 999px; padding: 2px 8px;
}
.card-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .78rem; font-weight: 800; padding: 8px 14px;
  border-radius: 10px; transition: all .15s; align-self: flex-start;
}

/* category colour schemes */
.ct-games  { background: linear-gradient(135deg, #70A3A7, #4e7d80); }
.ct-books  { background: linear-gradient(135deg, #BC4749, #9b3a3c); }
.ct-workshop { background: linear-gradient(135deg, #6366f1, #4338ca); }
.ct-tools  { background: linear-gradient(135deg, #d97706, #b45309); }
.ct-freebies { background: linear-gradient(135deg, #16a34a, #15803d); }

/* per-category link colours */
.lk-games  { background: rgba(112,163,167,.12); color: var(--teal-dk); }
.lk-games:hover  { background: var(--teal-dk); color: var(--white); }
.lk-books  { background: rgba(188,71,73,.1); color: var(--rose-dk); }
.lk-books:hover  { background: var(--rose-dk); color: var(--white); }
.lk-workshop { background: rgba(99,102,241,.1); color: #4f46e5; }
.lk-workshop:hover { background: #6366f1; color: var(--white); }
.lk-tools  { background: rgba(217,119,6,.1); color: #b45309; }
.lk-tools:hover  { background: #d97706; color: var(--white); }
.lk-freebies { background: rgba(22,163,74,.1); color: #15803d; }
.lk-freebies:hover { background: #16a34a; color: var(--white); }

/* NEW / COMING SOON badges on cards */
.pill-new { background: var(--rose) !important; color: var(--white) !important; }
.pill-soon { background: var(--tan-dk) !important; color: var(--white) !important; }
.pill-free { background: #16a34a !important; color: var(--white) !important; }

/* age badge */
.card-tags .age { background: rgba(188,71,73,.12); color: var(--rose-dk); }

/* empty state */
.empty-state {
  text-align: center; padding: 80px 24px;
  display: none;
}
.empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state p { font-size: 1.05rem; color: var(--charcoal-lt); margin-bottom: 20px; }
.empty-state button {
  padding: 10px 24px; border-radius: 12px; background: var(--charcoal);
  color: var(--white); font-weight: 700; font-size: .9rem; border: none; cursor: pointer;
}

/* ── RESPONSIVE ─────────────────────────────── */
@media(max-width: 640px) {
  .card-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hub-hero { padding: 48px 16px 40px; }
  .ftab { padding: 6px 10px; font-size: .74rem; }
}
@media(max-width: 400px) {
  .card-grid { grid-template-columns: 1fr; }
}