:root {
  color-scheme: dark;
  --bg: #0a0b10;
  --line: rgba(255, 255, 255, .1);
  --text: #f4f6fb;
  --accent: #7c5cff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
button { font: inherit; }
button, a { touch-action: manipulation; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

.hub-page {
  background: radial-gradient(circle at 20% 0, rgba(124, 92, 255, .18), transparent 30%),
              radial-gradient(circle at 85% 18%, rgba(85, 216, 255, .1), transparent 26%),
              #090a0f;
}

.hub-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(9, 10, 15, .82);
  backdrop-filter: blur(18px);
}

.suite-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 850;
  letter-spacing: -.04em;
}

.suite-brand span {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #d45cff);
  font-size: .66rem;
  letter-spacing: .02em;
}

.hub-count {
  color: #9298a9;
  font-size: .73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.hub-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }

.hub { max-width: 1500px; margin: auto; padding: 0 clamp(20px, 5vw, 72px) 80px; }
.hero { max-width: 920px; padding: clamp(70px, 11vw, 145px) 0 75px; }
.kicker { color: #9d8bff; font-size: .7rem; font-weight: 850; letter-spacing: .17em; }
.hero h1 { margin: 15px 0 24px; font-size: clamp(3.2rem, 7.7vw, 7.2rem); line-height: .87; letter-spacing: -.075em; }
.hero h1 em { color: transparent; background: linear-gradient(90deg, #a891ff, #55d8ff); background-clip: text; font-style: normal; }
.hero > p:not(.kicker) { max-width: 680px; color: #aeb3c2; font-size: 1.05rem; line-height: 1.7; }
.hero-actions { display: flex; gap: 10px; margin-top: 28px; }
.hero-actions a, .hero-actions button { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; background: #171924; color: #fff; font-weight: 750; text-decoration: none; cursor: pointer; }
.hero-actions a { border: 0; background: var(--accent); }

.search-control { display: flex; align-items: center; width: 40px; height: 42px; overflow: hidden; border: 1px solid transparent; border-radius: 12px; background: transparent; transition: width .24s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.search-control.is-open { width: clamp(240px, 28vw, 340px); border-color: rgba(157, 139, 255, .32); background: #12141d; box-shadow: 0 10px 32px rgba(0, 0, 0, .28); }
.search-toggle { position: relative; display: block; flex: 0 0 40px; width: 40px; height: 40px; border: 0; border-radius: 10px; padding: 0; background: transparent; color: #e9eaf0; cursor: pointer; transition: background .2s ease, color .2s ease; }
.search-toggle::before { position: absolute; top: 10px; left: 10px; width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 50%; content: ""; }
.search-toggle::after { position: absolute; top: 24px; left: 24px; width: 8px; height: 2px; border-radius: 2px; background: currentColor; content: ""; transform: rotate(45deg); transform-origin: left center; }
.search-toggle:hover,.search-toggle:focus-visible,.search-control.is-open .search-toggle { background: rgba(124, 92, 255, .12); color: #a891ff; outline: 0; }
.search-control.has-query .search-toggle { color: #55d8ff; }
.search-inline { min-width: 0; flex: 1; opacity: 0; transition: opacity .15s ease; }
.search-control.is-open .search-inline { opacity: 1; }
.widget-search { width: 100%; height: 40px; border: 0; padding: 0 8px; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: .86rem; }
.widget-search::placeholder { color: #777e90; }
.search-control:focus-within { border-color: rgba(168, 145, 255, .72); box-shadow: 0 0 0 3px rgba(124, 92, 255, .14); }
.search-close { flex: 0 0 0; width: 0; height: 34px; overflow: hidden; border: 0; border-radius: 8px; padding: 0; background: transparent; color: #aeb3c2; font-size: 1.25rem; line-height: 1; opacity: 0; pointer-events: none; cursor: pointer; transition: flex-basis .2s ease, width .2s ease, opacity .15s ease, background .2s ease, color .2s ease; }
.search-control.is-open .search-close { flex-basis: 34px; width: 34px; margin-right: 4px; opacity: 1; pointer-events: auto; }
.search-close:hover,.search-close:focus-visible { background: rgba(255, 255, 255, .07); color: #fff; outline: 0; }
.filters { display: flex; gap: 7px; overflow: auto; padding: 0 0 18px; scrollbar-width: none; }
.filters button { border: 1px solid var(--line); border-radius: 99px; padding: 8px 12px; background: transparent; color: #aeb2c1; font-size: .73rem; font-weight: 750; white-space: nowrap; cursor: pointer; }
.filters button.active { border-color: #f5f6fa; background: #f5f6fa; color: #12131a; }

.catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 18px;
  align-items: start;
}

.empty-state { grid-column: 1 / -1; padding: 64px 24px; border: 1px dashed var(--line); border-radius: 16px; text-align: center; }
.empty-state h2 { margin: 0 0 8px; font-size: 1.4rem; }
.empty-state p { margin: 0; color: #9298a9; }

.widget-card {
  animation: card-in .45s both;
  animation-delay: var(--delay);
  outline: 0;
  cursor: default;
}

.card-media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0c0d13;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.widget-card:hover .card-media,
.widget-card:focus-visible .card-media,
.widget-card:has(.card-actions a:focus-visible) .card-media {
  border-color: rgba(168, 145, 255, .56);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
  transform: translateY(-2px);
}

.card-thumbnail {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.widget-card h2 {
  margin: 14px 8px 0;
  text-align: center;
  font-size: 1.16rem;
  letter-spacing: -.035em;
}

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  background: linear-gradient(180deg, rgba(7, 8, 13, .14), rgba(7, 8, 13, .9) 58%, rgba(7, 8, 13, .98));
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}

.widget-card:hover .card-overlay,
.widget-card:focus-visible .card-overlay,
.widget-card:has(.card-actions a:focus-visible) .card-overlay {
  opacity: 1;
  visibility: visible;
}

@media (hover: none) {
  .widget-card:focus-within .card-media {
    border-color: rgba(168, 145, 255, .56);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
    transform: translateY(-2px);
  }

  .widget-card:focus-within .card-overlay {
    opacity: 1;
    visibility: visible;
  }
}

.card-meta { display: flex; justify-content: space-between; margin-bottom: 15px; color: #b7bdcb; font-size: .68rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.card-overlay p { margin: 0; color: #eef0f6; font-size: .9rem; line-height: 1.6; }
.card-actions { display: flex; gap: 8px; margin-top: 22px; }
.card-actions a { padding: 10px 13px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 9px; background: rgba(17, 18, 27, .76); color: #f1f2f7; font-size: .76rem; font-weight: 750; text-decoration: none; }
.card-actions a.primary { border-color: #eceef5; background: #eceef5; color: #14151b; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1000px) {
  .catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .hub-count { display: none; }
  .hub-actions { gap: 0; }
  .suite-brand { font-size: 0; }
  .search-control.is-open { width: min(62vw, 300px); }
  .hero-actions { flex-wrap: wrap; }
  .catalog { grid-template-columns: 1fr; }
}
