/* =========================================================
   Learning Rewired Lab — Beyond Learning Resources
   Page styles  (/resources-beyond-learning/)
   File: /assets/css/beyond-learning.css
   ========================================================= */

/* ---------------------------------------------------------
   SECTION ACCENT
   To re-theme the whole page, change these six values only.
   Default: indigo #6366f1  (R99 G102 B241)
   --------------------------------------------------------- */
:root {
  --bl-accent: #6366f1;
  --bl-accent-deep: rgb(71, 73, 174);
  --bl-accent-soft: rgba(99, 102, 241, .10);
  --bl-accent-line: rgba(99, 102, 241, .30);
  --bl-accent-glow: rgba(99, 102, 241, .16);
  --bl-accent-glow2: rgba(99, 102, 241, .22);
}

.bl-page * { box-sizing: border-box; }
html { scroll-behavior: smooth; }
.bl-page ::selection { background: var(--bl-accent-soft); }

/* ---------------------------------------------------------
   Motion
   --------------------------------------------------------- */
@keyframes bl-pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes bl-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.bl-float { animation: bl-float 8.5s ease-in-out infinite; }

/* Scroll reveal — JS-gated so content is always visible without JS */
.js .bl-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
}
.js .bl-reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .bl-reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .bl-float { animation: none; }
}

/* ---------------------------------------------------------
   Hover states
   --------------------------------------------------------- */
.h-warm:hover { background: var(--bl-accent-deep) !important; }
.h-ghost:hover { border-color: var(--bl-accent) !important; color: var(--bl-accent-deep) !important; }
.h-mint:hover { background: #f8fafc !important; }
.h-ink:hover { background: rgba(255, 255, 255, .13) !important; }
.h-card:hover { transform: translateY(-4px); box-shadow: 0 22px 46px rgba(15, 23, 42, .10) !important; border-color: var(--bl-accent-line) !important; }
.h-card:hover .h-card-cta { gap: 9px !important; }
.h-spine:hover { transform: translateY(-9px) !important; }
.h-link:hover { color: var(--bl-accent-deep) !important; }

.bl-email::placeholder { color: rgba(255, 255, 255, .45); }

/* ---------------------------------------------------------
   Filter chips
   --------------------------------------------------------- */
.bl-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -.01em;
  padding: 10px 16px;
  border-radius: 999px;
  transition: all .2s;
  color: #475569;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.bl-chip:hover { border-color: var(--bl-accent-line); color: #0f172a; }
.bl-chip .bl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bl-accent); display: inline-block; }
.bl-chip .bl-count { font-size: 11px; font-weight: 800; opacity: .55; }
.bl-chip.is-active { color: #fff; background: var(--bl-accent); border-color: transparent; box-shadow: 0 10px 22px var(--bl-accent-glow2); }
.bl-chip.is-active .bl-dot { background: #fff; }

/* Spines */
.bl-spine {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 5px 5px 3px 3px;
  cursor: default;
  transition: transform .25s cubic-bezier(.2, .7, .2, 1);
  background: linear-gradient(160deg, var(--bl-accent), var(--bl-accent-deep));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 10px 22px rgba(0, 0, 0, .34);
}
.bl-spine--book { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 14px 28px rgba(0, 0, 0, .46); }

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 980px) {
  [data-r="hero"], [data-r="why"], [data-r="hard"], [data-r="cta"] { grid-template-columns: 1fr !important; gap: 40px !important; }
  [data-r="h1"] { font-size: 50px !important; }
  [data-r="lib"] { grid-template-columns: 1fr 1fr !important; }
  [data-r="why"] { gap: 30px !important; }
}
@media (max-width: 600px) {
  [data-r="h1"] { font-size: 38px !important; }
  [data-r="sec-h"] { font-size: 30px !important; }
  [data-r="lib"] { grid-template-columns: 1fr !important; }
  [data-r="shelfrow"] { gap: 12px !important; }
  [data-r="why-card"] { padding: 0 0 0 24px !important; }
  [data-r="hard"] > div { padding: 28px 24px !important; }
  [data-r="cta"] { padding: 40px 28px !important; }
}
/* =========================================================
   Reading Shelf book spine fix
   Replaces fragile writing-mode labels with rotated labels
   ========================================================= */

.bl-reading-shelf {
  margin: 38px 0 0;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
  max-width: 780px;
}

.bl-reading-book {
  --book-h: 170px;

  position: relative;
  width: 66px;
  height: var(--book-h);
  flex: 0 0 auto;
  display: block;
  overflow: hidden;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
}

.bl-reading-book__title,
.bl-reading-book__author {
  position: absolute;
  left: 50%;
  display: block;
  text-align: center;
  white-space: nowrap;
  transform: translateX(-50%) rotate(-90deg);
  transform-origin: center center;
  pointer-events: none;
}

.bl-reading-book__title {
  top: calc(50% - 10px);
  width: calc(var(--book-h) - 54px);
  color: rgba(255, 255, 255, 0.96);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.02em;
}

.bl-reading-book__author {
  bottom: 34px;
  width: calc(var(--book-h) - 76px);
  color: rgba(255, 255, 255, 0.55);
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bl-reading-book--long {
  width: 72px;
}

.bl-reading-book--long .bl-reading-book__title {
  font-size: 11.5px;
  width: calc(var(--book-h) - 50px);
}

.bl-reading-book--long .bl-reading-book__author {
  font-size: 8.5px;
  width: calc(var(--book-h) - 82px);
}

.bl-reading-book--ghost {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
}

.bl-reading-shelf-base {
  height: 10px;
  margin-top: 0;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5);
  max-width: 780px;
}

@media (max-width: 760px) {
  .bl-reading-shelf {
    gap: 12px;
  }

  .bl-reading-book {
    width: 58px;
  }

  .bl-reading-book--long {
    width: 64px;
  }

  .bl-reading-book__title {
    font-size: 11.5px;
  }

  .bl-reading-book--long .bl-reading-book__title {
    font-size: 10.25px;
  }

  .bl-reading-book__author {
    font-size: 8px;
  }
}
