.pb-home {
  width: 100%;
}

@keyframes pb-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pb-hero-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Hero (dark) + floating categories —— */
.pb-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: min(68vh, 520px);
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.25rem, 4vw, 2rem);
  color: #f6faf8;
  background:
    radial-gradient(900px 320px at 12% -10%, rgba(232, 93, 4, 0.28), transparent 58%),
    radial-gradient(700px 280px at 88% 0%, rgba(15, 107, 92, 0.42), transparent 52%),
    linear-gradient(145deg, #071612 0%, #0c2e28 45%, #0f3d35 100%);
}

.pb-hero__glow {
  position: absolute;
  inset: -20% 15% auto;
  height: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 178, 128, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.pb-hero__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(246, 250, 248, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 250, 248, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 90%);
}

.pb-hero__float {
  position: absolute;
  inset: 8% 4% 12%;
  z-index: 1;
  pointer-events: none;
}

.pb-float-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  max-width: 16rem;
  min-height: 2.75rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  border: 1px solid rgba(246, 250, 248, 0.22);
  background: rgba(246, 250, 248, 0.12);
  backdrop-filter: blur(8px);
  color: rgba(246, 250, 248, 0.95) !important;
  font-size: clamp(1.05rem, 2.3vw, 1.22rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-decoration: none !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: auto;
  will-change: transform;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pb-float-chip:hover {
  background: rgba(232, 93, 4, 0.88);
  border-color: transparent;
  color: #fff !important;
  z-index: 3;
}

.pb-hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--pb-max);
  width: 100%;
  margin: 0 auto;
  display: grid;
  gap: 0.7rem;
  justify-items: start;
  animation: pb-hero-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
  text-shadow: 0 1px 18px rgba(7, 22, 18, 0.55);
}

.pb-hero__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  font-size: clamp(1.85rem, 4.5vw, 2.65rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.pb-brand {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: inherit;
  font-weight: 800;
  letter-spacing: inherit;
  color: #ffb280;
}

.pb-hero__mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex: 0 0 auto;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.pb-hero__title {
  margin: 0;
  font-size: clamp(1.2rem, 2.8vw, 1.55rem);
  line-height: 1.3;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: #f6faf8;
}

.pb-hero__lead {
  margin: 0;
  max-width: 32rem;
  font-size: 0.98rem;
  line-height: 1.5;
  color: rgba(246, 250, 248, 0.78);
}

.pb-search--hero {
  width: min(100%, 32rem);
  margin-top: 0.35rem;
  max-width: 100%;
}

.pb-search--hero .pb-search__field {
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
  padding: 0.3rem;
  border-radius: 999px;
  border: 1px solid rgba(246, 250, 248, 0.22);
  background: rgba(246, 250, 248, 0.12);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  max-width: 100%;
  box-sizing: border-box;
}

.pb-search--hero .pb-search__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #f6faf8;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.pb-search--hero .pb-search__input:focus {
  box-shadow: none;
}

.pb-search--hero .pb-search__input::placeholder {
  color: rgba(246, 250, 248, 0.55);
}

.pb-search--hero .pb-search__submit {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  background: linear-gradient(135deg, var(--pb-ember), #ff8a3d);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.pb-search--hero .pb-search__submit:hover {
  filter: brightness(1.05);
}

/* —— Sections —— */
.pb-boards,
.pb-latest {
  max-width: var(--pb-max);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.25rem, 4vw, 2rem);
}

.pb-section__head {
  margin-bottom: 1.5rem;
}

.pb-section__head h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  letter-spacing: -0.03em;
  font-weight: 800;
}

.pb-section__head p {
  margin: 0;
  color: var(--pb-ink-soft);
}

.pb-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
}

.pb-board {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.2rem 1.25rem 1.15rem;
  border-radius: var(--pb-radius);
  background: #fff;
  border: 1px solid var(--pb-line);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(12, 26, 23, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  animation: pb-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.pb-board::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pb-mint), rgba(232, 93, 4, 0.65));
}

.pb-board:nth-child(1) { animation-delay: 0.05s; }
.pb-board:nth-child(2) { animation-delay: 0.1s; }
.pb-board:nth-child(3) { animation-delay: 0.15s; }
.pb-board:nth-child(4) { animation-delay: 0.2s; }
.pb-board:nth-child(5) { animation-delay: 0.25s; }
.pb-board:nth-child(6) { animation-delay: 0.3s; }

.pb-board:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 107, 92, 0.35);
  box-shadow: 0 12px 28px rgba(12, 26, 23, 0.08);
}

.pb-board__head {
  display: grid;
  gap: 0.25rem;
  padding-top: 0.15rem;
}

.pb-board__name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.pb-board__meta {
  font-size: 0.86rem;
  color: var(--pb-ink-soft);
}

.pb-board__posts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.pb-board__posts li {
  margin: 0;
}

.pb-board__posts a {
  display: block;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: rgba(15, 107, 92, 0.06);
  color: var(--pb-ink) !important;
  text-decoration: none !important;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  transition: background 0.15s ease, color 0.15s ease;
}

.pb-board__posts a:hover {
  background: rgba(232, 93, 4, 0.12);
  color: var(--pb-ember) !important;
}

.pb-board__more {
  margin: 0;
}

.pb-board__more summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--pb-mint-deep);
  list-style: none;
}

.pb-board__more summary::-webkit-details-marker {
  display: none;
}

.pb-board__more summary::after {
  content: " ▾";
}

.pb-board__more[open] summary::after {
  content: " ▴";
}

.pb-board__posts--rest {
  margin-top: 0.55rem;
}

@media (max-width: 640px) {
  .pb-hero {
    min-height: auto;
    padding: 2.25rem 1.1rem 2.5rem;
    align-items: flex-end;
  }

  .pb-hero__float {
    inset: 4% 1% 28%;
    opacity: 0.55;
  }

  .pb-float-chip {
    max-width: 9.5rem;
    min-height: 2.1rem;
    font-size: 0.82rem;
    padding: 0.4rem 0.85rem;
    pointer-events: none;
  }

  .pb-hero__inner {
    gap: 0.55rem;
    width: 100%;
  }

  .pb-hero__brand {
    font-size: clamp(1.55rem, 8vw, 2rem);
  }

  .pb-hero__mark {
    width: 30px;
    height: 30px;
  }

  .pb-hero__title {
    font-size: 1.12rem;
  }

  .pb-hero__lead {
    font-size: 0.92rem;
    max-width: 100%;
  }

  .pb-search--hero {
    width: 100%;
  }

  .pb-search--hero .pb-search__submit {
    padding: 0.55rem 0.85rem;
  }

  .pb-boards,
  .pb-latest {
    padding: 2rem 1.1rem 2.5rem;
  }

  .pb-board {
    padding: 1.05rem 1rem 1rem;
  }

  .pb-board__name {
    font-size: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pb-hero__inner,
  .pb-board {
    animation: none;
  }

  .pb-board:hover {
    transform: none;
  }

  .pb-float-chip {
    transition: none;
  }

  .pb-search--hero .pb-search__submit {
    transition: none;
  }
}
