/* Hub-specific styles - shared/styles.css carries tokens + base + components. */

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ---------- Hero ---------- */

.hero { text-align: left; }

.hero-eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.hero h2 {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-desc {
  margin: 0;
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* ---------- Game cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 160ms ease, transform 120ms ease, border-color 160ms ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card:active { transform: translateY(0); }

.card-art {
  min-height: 144px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  color: #1a1817;
  position: relative;
}

/* Flat per-game colors (media house palette). Icon + title sit on the color
   in black; see media-brand/styleguide.html "Spelbrickor". The five parked
   games keep entries here for when they ship, though the hub does not render
   them yet. */
.card-art.sudoku     { background: #E7C25E; }
.card-art.ordet      { background: #E2897E; }
.card-art.fyror      { background: #C29DC6; }
.card-art.ordkunskap { background: #DDA08C; }
.card-art.krysset    { background: #C9B86A; }
.card-art.plats      { background: #A4C49A; }
.card-art.logik      { background: #9FB4D6; }
.card-art.spalten    { background: #ABA9DC; }
.card-art.flow       { background: #8FC9C2; }
.card-art.flaggan      { background: #D0685A; }
.card-art.flaggan-latt { background: #DD8C5C; }
.card-art.konturen   { background: #84BEB6; }

.card-art-mark {
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-art-mark > svg { display: block; }

/* Mini Spalten preview: circles per cell, spangram cells tinted yellow. */
.hub-icon-spalten {
  display: grid;
  grid-template-columns: repeat(var(--sp-cols), 1fr);
  grid-template-rows: repeat(var(--sp-rows), 1fr);
  width: 78px;
  height: 91px;
  gap: 2px;
}
.hub-icon-spalten-cell {
  background: #ffffff;
  border-radius: 999px;
  width: 100%;
  height: 100%;
  box-shadow: inset 0 0 0 1px rgba(26, 24, 23, 0.18);
}
.hub-icon-spalten-cell.span {
  background: #f0c75a;
  box-shadow: inset 0 0 0 1px rgba(74, 52, 22, 0.4);
}

/* Mini Flow preview: grid of endpoint dots. */
.hub-icon-flow {
  display: grid;
  gap: 1.5px;
  padding: 2px;
  width: 100px;
  height: 100px;
  background: #1a1817;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.hub-icon-flow-cell {
  background: #fbfaf7;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hub-icon-flow-cell .dot {
  width: 70%;
  height: 70%;
  border-radius: 999px;
}

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

.card-title {
  margin: 0;
  font-family: "Roboto Slab", "Rockwell", var(--font-serif);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #000;
}

.card-sub {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.4;
}

.card-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: auto;
}

.card-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--ink-faint);
  flex-shrink: 0;
}
.card-status.ongoing .dot { background: var(--warn); }
.card-status.done .dot { background: var(--positive); }
.card-status.scheduled .dot { background: var(--ink-faint); }

.card.scheduled { opacity: 0.7; }
.card.scheduled:hover { opacity: 1; }

.card-cta {
  margin-top: 4px;
  display: inline-flex;
  justify-content: center;
  padding: 11px 14px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 120ms ease;
  text-decoration: none;
}
.card-cta:hover { opacity: 0.92; }

/* State-coded CTAs so the action reads at a glance: Spela = primary ink pill
   (the base style), Fortsätt = amber, Visa resultat = quiet, Söndag = muted.
   Ink over green here because green clashes with the pastel card art. */
.card-cta.cta-ongoing   { background: var(--warn); color: #1a1817; }
.card-cta.cta-done      { background: transparent; color: var(--ink); border-color: var(--line); }
.card-cta.cta-scheduled { background: var(--surface-sunken); color: var(--ink-muted); border-color: var(--line); cursor: default; }

@media (max-width: 480px) {
  main { padding: 20px 14px 40px; gap: 22px; }
  .card-art { min-height: 124px; padding: 14px; gap: 10px; }
}

/* Home sections (Infografik, På gång) */
.home-section { margin-top: 36px; }
.home-section-title {
  font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-muted); font-weight: 700; margin: 0 0 14px;
}
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.info-card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: background 120ms ease;
}
.info-card:hover { background: var(--surface-sunken); }
/* Colored art block with an icon + title, mirroring the game cards. */
.info-art {
  min-height: 120px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; padding: 18px; color: #1a1817;
}
.info-art h3 { margin: 0; font-family: "Roboto Slab", "Rockwell", var(--font-serif); font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.info-art-icon { width: 44px; height: 44px; }
/* Map products show their og:image thumbnail as the art, dark title like every
   other card, sitting on a light paper fade at the bottom for legibility. */
.info-art--vk, .info-art--ukraina, .info-art--befolkning {
  background-size: cover; background-position: center;
  align-items: flex-start; justify-content: flex-end; text-align: left;
}
.info-art--vk .info-art-icon, .info-art--ukraina .info-art-icon, .info-art--befolkning .info-art-icon { display: none; }
.info-art--vk {
  background-image: linear-gradient(to top, rgba(251, 250, 247, 0.94) 0%, rgba(251, 250, 247, 0.5) 30%, rgba(251, 250, 247, 0) 60%), url(/shared/thumbs/valdskartan.png);
}
.info-art--ukraina {
  background-image: linear-gradient(to top, rgba(251, 250, 247, 0.94) 0%, rgba(251, 250, 247, 0.5) 30%, rgba(251, 250, 247, 0) 60%), url(/shared/thumbs/ukraina.png);
}
.info-art--opinion { background: #8a93c9; }
.info-art--el { background: #e3c44e; }
.info-art--rantor { background: #9bb08a; }
.info-art--befolkning {
  background-image: linear-gradient(to top, rgba(251, 250, 247, 0.94) 0%, rgba(251, 250, 247, 0.5) 30%, rgba(251, 250, 247, 0) 60%), url(/shared/thumbs/befolkning.png);
}
.info-art--fotboll { background: #7bbf8a; }
.info-art--allsvenskan { background: #7ea6c8; }
.info-art--pl { background: #8f86c4; }
.info-art--laliga { background: #d39a6f; }
.info-art--seriea { background: #6fb0a6; }
.info-art--bundesliga { background: #cf8585; }
.info-art--soon { background: var(--surface-sunken); color: var(--ink-muted); }
.info-sub { margin: 0; padding: 14px 16px; font-size: 13px; color: var(--ink-muted); line-height: 1.45; }
.info-card--soon { opacity: 0.75; }

/* Home landing */
.home { display: flex; flex-direction: column; gap: 8px; }
.home-hero { padding: 24px 0 8px; }
.home-hero h1 { font-size: clamp(32px, 7vw, 48px); margin: 0 0 8px; }
.home-hero p { margin: 0; font-size: 16px; color: var(--ink-muted); }
.home-entries { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 12px; }
.entry-card {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: background 120ms ease;
}
.entry-card:hover { background: var(--surface-hover); }
.entry-card h2 { margin: 0 0 6px; font-size: 20px; }
.entry-card p { margin: 0; font-size: 14px; color: var(--ink-muted); line-height: 1.45; }
.home-footer { max-width: 1100px; margin: 40px auto 0; padding: 18px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.home-footer a { color: var(--ink-muted); text-decoration: none; }
.home-footer a:hover { color: var(--ink); }
