/**
 * Webcomic Hub page template styles.
 * Adapted from the "WebcomicHub" design handoff to the theme's fonts
 * (Bebas Neue display / Space Mono body) and colour tokens (--hot-pink/--red).
 * Mobile-first; loaded only on the Webcomic Hub template.
 */

@keyframes kk-hub-slide { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
@keyframes kk-hub-pulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; } 50% { transform: translate(-50%, -50%) scale(1.06); opacity: 0.9; } }

.kk-hub {
  background: radial-gradient(120% 80% at 50% -10%, #1a0410 0%, var(--black) 55%);
  overflow-x: clip;
}

.kk-hub-eyebrow,
.kk-hub-tagline,
.kk-hub-muted,
.kk-hub-logline,
.kk-hub-card-logline,
.kk-hub-tag,
.kk-hub-read {
  font-family: 'Space Mono', monospace;
}

.kk-hub-title,
.kk-hub-featured-title,
.kk-hub-h2,
.kk-hub-card-title,
.kk-hub-closing-h,
.kk-hub-pill,
.kk-hub-btn,
.kk-hub-cover-num {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
}

.kk-acc { color: var(--hot-pink); }

/* ---- Shared layout wrappers ---- */
.kk-hub-hero,
.kk-hub-featured,
.kk-hub-series,
.kk-hub-closing > * {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- HERO ---- */
.kk-hub-hero {
  position: relative;
  z-index: 2;
  padding: clamp(40px, 8vw, 96px) clamp(20px, 5vw, 64px) clamp(20px, 4vw, 44px);
}

.kk-hub-eyebrow {
  font-size: 12px;
  letter-spacing: 0.4em;
  color: #7a7a7a;
  margin: 0 0 18px;
}

.kk-hub-title {
  margin: 0;
  line-height: 0.86;
  font-size: clamp(56px, 13vw, 184px);
  letter-spacing: 0.04em;
  color: #fff;
}

.kk-hub-tagline-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.kk-hub-bar {
  display: block;
  height: 3px;
  width: clamp(120px, 18vw, 260px);
  background: linear-gradient(90deg, var(--red), var(--hot-pink));
  background-size: 200% 100%;
  animation: kk-hub-slide 3.5s linear infinite;
}

.kk-hub-bar--sm {
  width: 64px;
  margin-top: 14px;
  animation: none;
}

.kk-hub-tagline {
  font-size: 12px;
  letter-spacing: 0.33em;
  color: #b8b8b8;
}

.kk-hub-intro {
  margin-top: 28px;
  max-width: 70ch;
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  line-height: 1.8;
  color: #b3b3b3;
}

.kk-hub-muted {
  font-size: 11px;
  letter-spacing: 0.25em;
  color: #7a7a7a;
}

/* ---- Section tag (pill) ---- */
.kk-hub-section-tag {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.kk-hub-pill {
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--black);
  background: linear-gradient(90deg, var(--red), var(--hot-pink));
  padding: 7px 14px 5px;
}

/* ---- FEATURED ---- */
.kk-hub-featured {
  position: relative;
  z-index: 2;
  padding: clamp(24px, 4vw, 40px) clamp(20px, 5vw, 64px) clamp(40px, 6vw, 72px);
}

.kk-hub-featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #141416, #0c0c0d);
  padding: clamp(16px, 2.5vw, 28px);
}

.kk-hub-featured-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(8px, 1.5vw, 20px) clamp(4px, 1vw, 16px);
}

.kk-hub-featured-title {
  margin: 0;
  line-height: 0.9;
  font-size: clamp(40px, 6.4vw, 86px);
  letter-spacing: 0.02em;
  color: #fff;
}

.kk-hub-logline {
  margin: 22px 0 0;
  max-width: 46ch;
  font-size: 14px;
  line-height: 1.75;
  color: #b3b3b3;
}

/* ---- Tags ---- */
.kk-hub-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

.kk-hub-tag {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: #dcdcdc;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 5px 10px;
}

.kk-hub-tag--sm { font-size: 9px; padding: 4px 8px; }

/* ---- Buttons ---- */
.kk-hub-cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.kk-hub-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  letter-spacing: 0.18em;
  text-decoration: none;
  transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.kk-hub-btn--solid {
  font-size: 15px;
  color: var(--black);
  background: linear-gradient(90deg, var(--red), var(--hot-pink));
  padding: 13px 30px 11px;
}

.kk-hub-btn--solid:hover { transform: translateY(-2px); filter: brightness(1.1); }

.kk-hub-btn--ghost {
  font-size: 12px;
  color: #fff;
  border: 1px solid var(--hot-pink);
  background: transparent;
  padding: 13px 26px;
}

.kk-hub-btn--ghost:hover { background: rgba(255, 0, 102, 0.14); }

/* ---- ALL SERIES ---- */
.kk-hub-series {
  position: relative;
  z-index: 2;
  padding: 0 clamp(20px, 5vw, 64px) clamp(56px, 8vw, 100px);
}

.kk-hub-series-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 34px;
}

.kk-hub-h2 {
  margin: 0;
  line-height: 0.9;
  font-size: clamp(40px, 7vw, 80px);
  letter-spacing: 0.02em;
  color: #fff;
}

.kk-hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 2.6vw, 34px);
}

.kk-hub-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #131315, #0c0c0d);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.28s ease, box-shadow 0.28s ease;
}

.kk-hub-card:hover {
  transform: translateY(-7px);
  border-color: var(--hot-pink);
  box-shadow: 0 26px 60px -28px rgba(255, 0, 102, 0.55);
}

.kk-hub-card-info { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 24px; }

.kk-hub-card-title {
  margin: 0;
  line-height: 0.92;
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: 0.01em;
  color: #fff;
}

.kk-hub-card-logline {
  margin: 14px 0 22px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #a6a6a6;
  flex: 1;
}

.kk-hub-read {
  align-self: flex-start;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.27em;
  color: var(--hot-pink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, letter-spacing 0.2s ease;
}

.kk-hub-read:hover { border-color: var(--hot-pink); letter-spacing: 0.34em; }

.kk-hub-empty { padding: 20px 0; }

/* ---- Cover cells (image or generated placeholder art) ---- */
.kk-hub-cover {
  position: relative;
  overflow: hidden;
  background: #101012;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.kk-hub-cover--featured { min-height: clamp(320px, 42vw, 560px); }
.kk-hub-cover--card { aspect-ratio: 4 / 5; border: none; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }

.kk-hub-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kk-hub-cover-art {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 70% 20%, rgba(255, 0, 102, 0.2), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.028) 0 16px, transparent 16px 32px);
}

.kk-hub-cover-art::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(58%, 300px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 0, 102, 0.35);
  box-shadow: 0 0 0 18px rgba(255, 0, 102, 0.06), 0 0 0 36px rgba(255, 0, 102, 0.04);
  animation: kk-hub-pulse 4.5s ease-in-out infinite;
}

.kk-hub-cover-num {
  position: absolute;
  bottom: -6%;
  right: 2%;
  font-size: clamp(120px, 22vw, 300px);
  line-height: 1;
  color: rgba(255, 255, 255, 0.05);
  letter-spacing: -0.03em;
  pointer-events: none;
}

.kk-hub-cover-tagtl,
.kk-hub-cover-tagbl {
  position: absolute;
  left: 14px;
  font-size: 10px;
  letter-spacing: 0.2em;
  font-family: 'Space Mono', monospace;
}

.kk-hub-cover-tagtl {
  top: 14px;
  color: #bdbdbd;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 4px 9px;
}

.kk-hub-cover-tagbl { bottom: 13px; color: #6b6b6b; }

/* ---- CLOSING BAND ---- */
.kk-hub-closing {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 8px;
}

.kk-hub-closing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px;
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 64px);
}

.kk-hub-closing-left { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); flex-wrap: wrap; }

.kk-hub-closing-h {
  margin: 0;
  font-size: clamp(30px, 4.6vw, 58px);
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: #fff;
}

.kk-hub-badge {
  display: inline-block;
  background: linear-gradient(90deg, var(--red), var(--hot-pink));
  color: var(--black);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  padding: 6px 12px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet: 2-column series grid */
@media (min-width: 600px) {
  .kk-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Desktop: density controls column count */
@media (min-width: 1000px) {
  .kk-hub[data-density="spacious"] .kk-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kk-hub[data-density="compact"] .kk-hub-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Featured stacks below tablet so the cover never gets crushed */
@media (max-width: 720px) {
  .kk-hub-featured-grid { grid-template-columns: 1fr; }
  .kk-hub-featured-info { justify-content: flex-start; padding-top: 4px; }
}

/* Phones: tighten + let buttons go full width for big tap targets */
@media (max-width: 480px) {
  .kk-hub-cta-row .kk-hub-btn { flex: 1 1 auto; justify-content: center; }
  .kk-hub-closing { gap: 22px; }
  .kk-hub-closing .kk-hub-btn--ghost { width: 100%; justify-content: center; }
}
