/* OKD GAMES, dark blue and white theme */

:root {
  --bg:            #061323;
  --surface:       #0f2543;
  --surface-2:     rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.10);
  --line:          rgba(255, 255, 255, 0.11);
  --line-strong:   rgba(255, 255, 255, 0.34);
  --text:          #f2f7ff;
  --text-2:        #c3d5ee;
  --muted:         #8fa6c4;

  --tile:          #1e4478;
  --tile-hover:    #27578f;

  --shadow-md: 0 8px 22px rgba(0, 0, 0, .38);
  --shadow-lg: 0 18px 42px rgba(0, 0, 0, .55);

  --radius:     16px;
  --radius-sm:  10px;
  --topbar-h:   96px;
  --sidebar-w:  236px;
  --gutter:     28px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Deep blue glows, fixed to the viewport */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 620px at 10% -12%, #1b4c8f, transparent 62%),
    radial-gradient(780px 520px at 95% -4%, #143a75, transparent 58%),
    radial-gradient(820px 820px at 80% 110%, #102f5e, transparent 60%),
    linear-gradient(180deg, #08192e 0%, #050e1c 100%);
}

/* Grid and dot pattern, faded out towards the bottom */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    radial-gradient(rgba(255, 255, 255, .06) 1.2px, transparent 1.2px);
  background-size: 56px 56px, 56px 56px, 28px 28px;
  background-position: 0 0, 0 0, 14px 14px;
  mask-image: radial-gradient(125% 100% at 50% 0%, #000 18%, transparent 80%);
  -webkit-mask-image: radial-gradient(125% 100% at 50% 0%, #000 18%, transparent 80%);
}

svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

a { color: inherit; text-decoration: none; }

::selection { background: #fff; color: #06182f; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 20px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.32); background-clip: content-box; }


/* Buttons */
.btn {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s var(--ease), background-color .18s, border-color .18s, color .18s, box-shadow .18s;
}
.btn:active { transform: translateY(1px) scale(.985); }

.btn--ghost {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .38);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .75); }

.btn--solid {
  background: #fff;
  color: #0b2242;
  border: 1px solid #fff;
}
.btn--solid:hover { box-shadow: 0 0 0 4px rgba(255, 255, 255, .18); }

.btn--lg { padding: 13px 28px; font-size: 15px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  background: transparent;
  color: var(--text);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color .18s, border-color .18s;
}
.icon-btn:hover { background: var(--surface-hover); border-color: var(--line); }


/* Top bar */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  background: rgba(6, 19, 35, 0.78);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.topbar__burger { display: none; }

.brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  width: calc(var(--sidebar-w) - 20px);
}

/* Follows --topbar-h, minus a little breathing room */
.brand__logo {
  height: calc(var(--topbar-h) - 14px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  transition: opacity .2s;
}
.brand:hover .brand__logo { opacity: .8; }

/* Search */
.search {
  position: relative;
  flex: 1 1 auto;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}
.search__icon {
  position: absolute;
  left: 16px;
  color: var(--muted);
  pointer-events: none;
  transition: color .18s;
}
.search__input {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 46px;
  font: inherit;
  font-size: 14.5px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.search__input::placeholder { color: var(--muted); }
.search__input::-webkit-search-cancel-button { display: none; }
.search__input:focus {
  background: rgba(255, 255, 255, .09);
  border-color: rgba(255, 255, 255, .6);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .09);
}
.search:focus-within .search__icon { color: #fff; }

.search__clear {
  position: absolute;
  right: 8px;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  background: var(--surface-hover);
  color: var(--text-2);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: color .18s, background-color .18s;
}
.search__clear:hover { color: #0b2242; background: #fff; }
.search__clear svg { width: 15px; height: 15px; stroke-width: 2; }

/* Mirrors the brand width, centres the search */
.topbar__spacer {
  flex: 0 0 auto;
  width: calc(var(--sidebar-w) - 20px);
}


/* Sidebar */
.sidebar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  z-index: 40;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  overflow-y: auto;
  background: rgba(6, 19, 35, 0.6);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-right: 1px solid var(--line);
}

.sidebar__nav { display: flex; flex-direction: column; gap: 3px; }

.sidebar__label {
  margin: 18px 0 8px;
  padding-left: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}
.sidebar__label:first-child { margin-top: 2px; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  transition: background-color .2s, color .2s, transform .25s var(--ease);
}
.nav-item svg { flex: 0 0 20px; opacity: .75; transition: opacity .2s; }
.nav-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-item:hover { background: var(--surface-hover); color: #fff; transform: translateX(3px); }
.nav-item:hover svg { opacity: 1; }

.nav-item.is-active {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  font-weight: 600;
}
.nav-item.is-active svg { opacity: 1; }

/* Active marker bar */
.nav-item::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  width: 3px;
  height: 22px;
  background: #fff;
  border-radius: 0 3px 3px 0;
  transform: translate(-6px, -50%) scaleY(0);
  opacity: 0;
  transition: transform .3s var(--ease), opacity .3s;
}
.nav-item.is-active::before {
  transform: translate(0, -50%) scaleY(1);
  opacity: 1;
}

.sidebar__footer {
  margin-top: auto;
  padding: 16px 12px 4px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.sidebar__footer p { margin: 0; }
.sidebar__links a { transition: color .18s; }
.sidebar__links a:hover { color: #fff; }

/* Dim layer behind the drawer */
.scrim {
  position: fixed;
  inset: var(--topbar-h) 0 0 0;
  z-index: 39;
  background: rgba(3, 10, 20, 0.62);
  backdrop-filter: blur(2px);
}


/* Main layout */
.main {
  margin-left: var(--sidebar-w);
  padding: calc(var(--topbar-h) + var(--gutter)) var(--gutter) 0;
  max-width: 1600px;
}


/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
  padding: 56px 44px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 22px;
  /* Scrim over the text side, keeps white readable on the bright end */
  background:
    linear-gradient(100deg, rgba(4, 14, 28, .42) 0%, rgba(4, 14, 28, .12) 55%, transparent 75%),
    linear-gradient(125deg, #12386e 0%, #1c58a8 55%, #2f7ad2 100%);
  box-shadow: var(--shadow-lg);
}
/* Subtle diagonal texture */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255,255,255,.06) 0 1px,
    transparent 1px 14px
  );
  pointer-events: none;
}
/* Soft white glow in the corner */
.hero::after {
  content: "";
  position: absolute;
  top: -160px; right: -110px;
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(255,255,255,.24), transparent 65%);
  pointer-events: none;
}

.hero__inner { position: relative; z-index: 1; max-width: 620px; }

.hero__eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .78);
}
.hero__title {
  margin: 0;
  font-size: clamp(38px, 5.4vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.03;
}
.hero__text {
  margin: 16px 0 28px;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255, 255, 255, .93);
  max-width: 46ch;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }


/* Section */
.section { margin-bottom: 52px; }

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section__title {
  position: relative;
  margin: 0;
  padding-left: 16px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section__title::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 20px;
  background: #fff;
  border-radius: 2px;
}
.section__count {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}


/* Grid and cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  grid-auto-rows: 1fr;
  gap: 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  isolation: isolate;
  transition: transform .28s var(--ease), box-shadow .28s, border-color .28s;
}

/* First tile is a 2x2 showcase */
.card--feature { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }

/* Reveal on scroll, JS adds .is-in */
.card--reveal {
  opacity: 0;
  transform: translateY(18px) scale(.97);
}
.card--reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .5s var(--ease), transform .55s var(--ease);
  transition-delay: var(--delay, 0ms);
}

.card:hover,
.card:focus-visible {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
  outline: none;
}

/* Flat blue placeholder. A real cover is set inline as background-image. */
.card__art {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background-color: var(--tile);
  background-size: cover;
  background-position: center;
  transition: background-color .3s;
}
.card:hover .card__art { background-color: var(--tile-hover); }

.card__body {
  flex: 0 0 auto;
  padding: 10px 12px 12px;
  background: var(--surface);
}
.card__title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card__meta {
  margin: 4px 0 0;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.card__meta svg { width: 13px; height: 13px; stroke-width: 2; }

.card--feature .card__body { padding: 18px 22px 22px; }
.card--feature .card__title { font-size: 24px; font-weight: 700; }
.card--feature .card__meta { font-size: 13px; margin-top: 6px; }

/* Play button, fades in on hover */
.card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(6, 19, 35, .42);
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.card:hover .card__play { opacity: 1; }
.card__play span {
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  background: #fff;
  border-radius: 50%;
  transform: scale(.72);
  transition: transform .32s var(--ease);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
}
.card:hover .card__play span { transform: scale(1); }
.card__play svg {
  width: 20px; height: 20px;
  margin-left: 3px;
  fill: #0b2242;
  stroke: none;
}
.card--feature .card__play span { width: 76px; height: 76px; }
.card--feature .card__play svg { width: 28px; height: 28px; }


/* Empty state */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 80px 20px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, .03);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.empty svg { width: 34px; height: 34px; margin-bottom: 8px; color: #fff; opacity: .6; }
.empty p { margin: 0; font-size: 17px; font-weight: 600; color: var(--text); }
.empty span { font-size: 14px; }


/* Footer */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 44px 20px 40px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.footer__logo { height: 46px; width: auto; opacity: .55; }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.footer__nav a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color .18s;
}
.footer__nav a:hover { color: #fff; }
.footer__copy { margin: 0; font-size: 12.5px; color: #7c93b2; }


/* Responsive */
@media (max-width: 1024px) {
  :root { --gutter: 20px; --topbar-h: 84px; }

  .topbar { gap: 12px; padding: 0 14px; }
  .topbar__burger { display: grid; }

  .brand { width: auto; }
  .topbar__spacer { display: none; } /* free up width for search */

  /* Off-canvas drawer */
  .sidebar {
    transform: translateX(-100%);
    transition: transform .3s var(--ease);
    background: rgba(6, 19, 35, .97);
  }
  .sidebar.is-open { transform: translateX(0); box-shadow: var(--shadow-lg); }

  .main { margin-left: 0; }

  .hero { padding: 44px 26px; }
}

@media (max-width: 720px) {
  :root { --topbar-h: 70px; }

  .brand__logo { height: 56px; }

  .search__input { height: 42px; font-size: 14px; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .card--feature .card__title { font-size: 19px; }
  .card--feature .card__body { padding: 14px 16px 16px; }
  .card--feature .card__play span { width: 60px; height: 60px; }

  .hero { padding: 36px 20px; border-radius: 18px; }
  .hero__cta .btn { flex: 1 1 auto; }
}

@media (max-width: 460px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .card--feature { grid-column: span 2; grid-row: span 1; aspect-ratio: 16 / 10; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
/* OKD GAMES, dark blue and white theme */

:root {
  --bg:            #061323;
  --surface:       #0f2543;
  --surface-2:     rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.10);
  --line:          rgba(255, 255, 255, 0.11);
  --line-strong:   rgba(255, 255, 255, 0.34);
  --text:          #f2f7ff;
  --text-2:        #c3d5ee;
  --muted:         #8fa6c4;

  --tile:          #1e4478;
  --tile-hover:    #27578f;

  --shadow-md: 0 8px 22px rgba(0, 0, 0, .38);
  --shadow-lg: 0 18px 42px rgba(0, 0, 0, .55);

  --radius:     16px;
  --radius-sm:  10px;
  --topbar-h:   96px;
  --sidebar-w:  236px;
  --gutter:     28px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Deep blue glows, fixed to the viewport */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 620px at 10% -12%, #1b4c8f, transparent 62%),
    radial-gradient(780px 520px at 95% -4%, #143a75, transparent 58%),
    radial-gradient(820px 820px at 80% 110%, #102f5e, transparent 60%),
    linear-gradient(180deg, #08192e 0%, #050e1c 100%);
}

/* Grid and dot pattern, faded out towards the bottom */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    radial-gradient(rgba(255, 255, 255, .06) 1.2px, transparent 1.2px);
  background-size: 56px 56px, 56px 56px, 28px 28px;
  background-position: 0 0, 0 0, 14px 14px;
  mask-image: radial-gradient(125% 100% at 50% 0%, #000 18%, transparent 80%);
  -webkit-mask-image: radial-gradient(125% 100% at 50% 0%, #000 18%, transparent 80%);
}

svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

a { color: inherit; text-decoration: none; }

::selection { background: #fff; color: #06182f; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 20px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.32); background-clip: content-box; }


/* Buttons */
.btn {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s var(--ease), background-color .18s, border-color .18s, color .18s, box-shadow .18s;
}
.btn:active { transform: translateY(1px) scale(.985); }

.btn--ghost {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .38);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .75); }

.btn--solid {
  background: #fff;
  color: #0b2242;
  border: 1px solid #fff;
}
.btn--solid:hover { box-shadow: 0 0 0 4px rgba(255, 255, 255, .18); }

.btn--lg { padding: 13px 28px; font-size: 15px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  background: transparent;
  color: var(--text);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color .18s, border-color .18s;
}
.icon-btn:hover { background: var(--surface-hover); border-color: var(--line); }


/* Top bar */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  background: rgba(6, 19, 35, 0.78);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.topbar__burger { display: none; }

.brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  width: calc(var(--sidebar-w) - 20px);
}

/* Follows --topbar-h, minus a little breathing room */
.brand__logo {
  height: calc(var(--topbar-h) - 14px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  transition: opacity .2s;
}
.brand:hover .brand__logo { opacity: .8; }

/* Search */
.search {
  position: relative;
  flex: 1 1 auto;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}
.search__icon {
  position: absolute;
  left: 16px;
  color: var(--muted);
  pointer-events: none;
  transition: color .18s;
}
.search__input {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 46px;
  font: inherit;
  font-size: 14.5px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.search__input::placeholder { color: var(--muted); }
.search__input::-webkit-search-cancel-button { display: none; }
.search__input:focus {
  background: rgba(255, 255, 255, .09);
  border-color: rgba(255, 255, 255, .6);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .09);
}
.search:focus-within .search__icon { color: #fff; }

.search__clear {
  position: absolute;
  right: 8px;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  background: var(--surface-hover);
  color: var(--text-2);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: color .18s, background-color .18s;
}
.search__clear:hover { color: #0b2242; background: #fff; }
.search__clear svg { width: 15px; height: 15px; stroke-width: 2; }

/* Mirrors the brand width, centres the search */
.topbar__spacer {
  flex: 0 0 auto;
  width: calc(var(--sidebar-w) - 20px);
}


/* Sidebar */
.sidebar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  z-index: 40;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  overflow-y: auto;
  background: rgba(6, 19, 35, 0.6);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-right: 1px solid var(--line);
}

.sidebar__nav { display: flex; flex-direction: column; gap: 3px; }

.sidebar__label {
  margin: 18px 0 8px;
  padding-left: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}
.sidebar__label:first-child { margin-top: 2px; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  transition: background-color .2s, color .2s, transform .25s var(--ease);
}
.nav-item svg { flex: 0 0 20px; opacity: .75; transition: opacity .2s; }
.nav-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-item:hover { background: var(--surface-hover); color: #fff; transform: translateX(3px); }
.nav-item:hover svg { opacity: 1; }

.nav-item.is-active {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  font-weight: 600;
}
.nav-item.is-active svg { opacity: 1; }

/* Active marker bar */
.nav-item::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  width: 3px;
  height: 22px;
  background: #fff;
  border-radius: 0 3px 3px 0;
  transform: translate(-6px, -50%) scaleY(0);
  opacity: 0;
  transition: transform .3s var(--ease), opacity .3s;
}
.nav-item.is-active::before {
  transform: translate(0, -50%) scaleY(1);
  opacity: 1;
}

.sidebar__footer {
  margin-top: auto;
  padding: 16px 12px 4px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.sidebar__footer p { margin: 0; }
.sidebar__links a { transition: color .18s; }
.sidebar__links a:hover { color: #fff; }

/* Dim layer behind the drawer */
.scrim {
  position: fixed;
  inset: var(--topbar-h) 0 0 0;
  z-index: 39;
  background: rgba(3, 10, 20, 0.62);
  backdrop-filter: blur(2px);
}


/* Main layout */
.main {
  margin-left: var(--sidebar-w);
  padding: calc(var(--topbar-h) + var(--gutter)) var(--gutter) 0;
  max-width: 1600px;
}


/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
  padding: 56px 44px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 22px;
  /* Scrim over the text side, keeps white readable on the bright end */
  background:
    linear-gradient(100deg, rgba(4, 14, 28, .42) 0%, rgba(4, 14, 28, .12) 55%, transparent 75%),
    linear-gradient(125deg, #12386e 0%, #1c58a8 55%, #2f7ad2 100%);
  box-shadow: var(--shadow-lg);
}
/* Subtle diagonal texture */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255,255,255,.06) 0 1px,
    transparent 1px 14px
  );
  pointer-events: none;
}
/* Soft white glow in the corner */
.hero::after {
  content: "";
  position: absolute;
  top: -160px; right: -110px;
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(255,255,255,.24), transparent 65%);
  pointer-events: none;
}

.hero__inner { position: relative; z-index: 1; max-width: 620px; }

.hero__eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .78);
}
.hero__title {
  margin: 0;
  font-size: clamp(38px, 5.4vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.03;
}
.hero__text {
  margin: 16px 0 28px;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255, 255, 255, .93);
  max-width: 46ch;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }


/* Section */
.section { margin-bottom: 52px; }

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section__title {
  position: relative;
  margin: 0;
  padding-left: 16px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section__title::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 20px;
  background: #fff;
  border-radius: 2px;
}
.section__count {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}


/* Grid and cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  grid-auto-rows: 1fr;
  gap: 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  isolation: isolate;
  transition: transform .28s var(--ease), box-shadow .28s, border-color .28s;
}

/* First tile is a 2x2 showcase */
.card--feature { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }

/* Reveal on scroll, JS adds .is-in */
.card--reveal {
  opacity: 0;
  transform: translateY(18px) scale(.97);
}
.card--reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .5s var(--ease), transform .55s var(--ease);
  transition-delay: var(--delay, 0ms);
}

.card:hover,
.card:focus-visible {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
  outline: none;
}

/* Flat blue placeholder. A real cover is set inline as background-image. */
.card__art {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background-color: var(--tile);
  background-size: cover;
  background-position: center;
  transition: background-color .3s;
}
.card:hover .card__art { background-color: var(--tile-hover); }

.card__body {
  flex: 0 0 auto;
  padding: 10px 12px 12px;
  background: var(--surface);
}
.card__title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card__meta {
  margin: 4px 0 0;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.card__meta svg { width: 13px; height: 13px; stroke-width: 2; }

.card--feature .card__body { padding: 18px 22px 22px; }
.card--feature .card__title { font-size: 24px; font-weight: 700; }
.card--feature .card__meta { font-size: 13px; margin-top: 6px; }

/* Play button, fades in on hover */
.card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(6, 19, 35, .42);
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.card:hover .card__play { opacity: 1; }
.card__play span {
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  background: #fff;
  border-radius: 50%;
  transform: scale(.72);
  transition: transform .32s var(--ease);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
}
.card:hover .card__play span { transform: scale(1); }
.card__play svg {
  width: 20px; height: 20px;
  margin-left: 3px;
  fill: #0b2242;
  stroke: none;
}
.card--feature .card__play span { width: 76px; height: 76px; }
.card--feature .card__play svg { width: 28px; height: 28px; }


/* Empty state */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 80px 20px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, .03);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.empty svg { width: 34px; height: 34px; margin-bottom: 8px; color: #fff; opacity: .6; }
.empty p { margin: 0; font-size: 17px; font-weight: 600; color: var(--text); }
.empty span { font-size: 14px; }


/* Footer */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 44px 20px 40px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.footer__logo { height: 46px; width: auto; opacity: .55; }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.footer__nav a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color .18s;
}
.footer__nav a:hover { color: #fff; }
.footer__copy { margin: 0; font-size: 12.5px; color: #7c93b2; }


/* Responsive */
@media (max-width: 1024px) {
  :root { --gutter: 20px; --topbar-h: 84px; }

  .topbar { gap: 12px; padding: 0 14px; }
  .topbar__burger { display: grid; }

  .brand { width: auto; }
  .topbar__spacer { display: none; } /* free up width for search */

  /* Off-canvas drawer */
  .sidebar {
    transform: translateX(-100%);
    transition: transform .3s var(--ease);
    background: rgba(6, 19, 35, .97);
  }
  .sidebar.is-open { transform: translateX(0); box-shadow: var(--shadow-lg); }

  .main { margin-left: 0; }

  .hero { padding: 44px 26px; }
}

@media (max-width: 720px) {
  :root { --topbar-h: 70px; }

  .brand__logo { height: 56px; }

  .search__input { height: 42px; font-size: 14px; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .card--feature .card__title { font-size: 19px; }
  .card--feature .card__body { padding: 14px 16px 16px; }
  .card--feature .card__play span { width: 60px; height: 60px; }

  .hero { padding: 36px 20px; border-radius: 18px; }
  .hero__cta .btn { flex: 1 1 auto; }
}

@media (max-width: 460px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .card--feature { grid-column: span 2; grid-row: span 1; aspect-ratio: 16 / 10; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
