/* ==========================================================================
   WANTERLUDE — главная страница-хаб
   ========================================================================== */

body.hub {
  background:
    radial-gradient(1000px 640px at 12% -8%, rgba(140, 80, 255, 0.18), transparent 62%),
    radial-gradient(900px 560px at 96% 2%, rgba(0, 224, 198, 0.07), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(122, 59, 255, 0.10), transparent 65%),
    var(--bg);
}

.hub-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(7, 8, 13, 0.74);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.hub-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
}

.hub-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.hub-brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(169, 112, 255, 0.38);
  background: linear-gradient(145deg, rgba(169, 112, 255, 0.18), rgba(0, 224, 198, 0.06));
  color: #d7c4ff;
  box-shadow: 0 0 24px rgba(140, 80, 255, 0.18);
  flex: 0 0 auto;
}

.hub-brand__mark svg {
  width: 21px;
  height: 21px;
}

.hub-brand__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  line-height: 1.15;
  color: #f0ebff;
}

.hub-brand__text small {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--muted-2);
  text-transform: uppercase;
}

.hub-brand:hover .hub-brand__text {
  color: #fff;
}

.hub-nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.hub-nav__links a:hover {
  color: var(--text);
}

/* Hero */

.hub-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: clamp(34px, 5vw, 74px);
  padding: clamp(58px, 8vw, 104px) 0 clamp(54px, 7vw, 92px);
}

.hub-hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 21px;
}

.hub-hero h1 {
  font-size: clamp(40px, 5.6vw, 76px);
  max-width: 700px;
}

.hub-hero .lead {
  max-width: 530px;
}

.hub-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.hub-stats {
  display: flex;
  gap: 30px;
  margin: 8px 0 0;
  padding: 18px 0 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  max-width: 430px;
}

.hub-stats li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hub-stats b {
  font-size: 22px;
  font-weight: 850;
  color: #f2edff;
}

.hub-stats span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* Hero stack */

.hub-hero__art {
  position: relative;
  min-height: 460px;
  display: grid;
  place-items: center;
  perspective: 1200px;
}

.hero-stack {
  position: relative;
  width: min(100%, 480px);
  aspect-ratio: 1 / 0.82;
  z-index: 2;
}

.hero-stack__card {
  position: absolute;
  width: 76%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
  background: #0e111b;
}

.hero-stack__card--back {
  top: 8%;
  left: 2%;
  transform: rotate(-9deg) scale(0.92);
  opacity: 0.55;
  filter: saturate(0.8) brightness(0.7);
}

.hero-stack__card--mid {
  top: 14%;
  right: 1%;
  transform: rotate(7deg) scale(0.96);
  opacity: 0.78;
  filter: saturate(0.9) brightness(0.82);
}

.hero-stack__card--front {
  top: 25%;
  left: 12%;
  width: 80%;
  transform: rotate(-2.5deg);
  border-color: rgba(169, 112, 255, 0.55);
  box-shadow:
    0 0 34px rgba(140, 80, 255, 0.24),
    0 34px 70px rgba(0, 0, 0, 0.6);
}

.hub-hero__art:hover .hero-stack__card--front {
  transform: rotate(-1deg) translateY(-8px) scale(1.015);
}

.hero-stack__glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 80, 255, 0.28), rgba(140, 80, 255, 0) 68%);
  filter: blur(12px);
  z-index: 0;
}

.hero-stack__label {
  position: absolute;
  right: 4%;
  bottom: 2%;
  z-index: 3;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: var(--muted-2);
}

/* Projects */

.hub-projects {
  padding: clamp(40px, 6vw, 72px) 0 clamp(34px, 5vw, 56px);
}

.hub-projects__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.hub-projects__head h2 {
  margin-top: 8px;
}

.hub-projects__count {
  font-size: 12px;
  color: var(--muted-2);
  white-space: nowrap;
}

.hub-projects__count b {
  color: #e9e2ff;
  font-weight: 800;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 22, 36, 0.9), rgba(9, 11, 18, 0.92));
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.42),
    0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

.project-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.project-card__cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(80% 100% at 20% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    #0b0e17;
}

.project-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.project-card:hover .project-card__cover img {
  transform: scale(1.045);
}

.project-card__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 7, 12, 0.22) 0%, transparent 34%),
    linear-gradient(180deg, transparent 52%, rgba(9, 11, 18, 0.88) 100%);
  pointer-events: none;
}

.project-card__tag {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  background: rgba(7, 9, 15, 0.72);
  color: color-mix(in srgb, var(--accent) 80%, #fff);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.15em;
  line-height: 1;
  backdrop-filter: blur(6px);
}

.project-card__tag .dot {
  width: 5px;
  height: 5px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.project-card__index {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 8px;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.18);
}

.project-card__body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px 16px 16px;
  flex: 1;
}

.project-card__kicker {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-card__title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: #f4f1ff;
}

.project-card__description {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  flex: 1;
}

.project-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 76%, #fff);
}

.project-card__arrow {
  font-size: 17px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.project-card:hover .project-card__arrow {
  transform: translateX(4px);
}

.project-card.is-soon {
  opacity: 0.65;
  pointer-events: none;
}

/* Note */

.hub-note {
  padding: 12px 0 clamp(52px, 7vw, 84px);
}

.hub-note__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: rgba(11, 14, 23, 0.55);
}

.hub-note__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border: 1px solid rgba(169, 112, 255, 0.28);
  background: rgba(169, 112, 255, 0.08);
  color: #c9a7ff;
  font-size: 24px;
  font-weight: 300;
  flex: 0 0 auto;
}

.hub-note h2 {
  font-size: 17px;
  letter-spacing: -0.01em;
}

.hub-note p {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.hub-note__inner .btn {
  margin-left: auto;
  flex: 0 0 auto;
}

/* Адаптивность */

@media (max-width: 1020px) {
  .hub-hero {
    grid-template-columns: 1fr;
    padding-top: 44px;
  }

  .hub-hero__art {
    min-height: 390px;
    order: 2;
  }

  .hub-hero__copy {
    order: 1;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .hub-nav__inner {
    height: 64px;
  }

  .hub-nav__links {
    gap: 14px;
    font-size: 12px;
  }

  .hub-nav__links a:first-child {
    display: none;
  }

  .hub-hero h1 {
    font-size: clamp(36px, 11vw, 54px);
  }

  .hub-hero__actions .btn {
    flex: 1 1 100%;
  }

  .hub-stats {
    gap: 20px;
  }

  .hub-hero__art {
    min-height: 320px;
  }

  .hero-stack {
    width: 100%;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .hub-projects__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .hub-note__inner {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .hub-note__inner .btn {
    margin-left: 0;
    width: 100%;
  }
}
