/* =========================================================
   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: #e0a93f;
  --bl-accent-deep: #8a5a00;
  --bl-accent-soft: rgba(224, 169, 63, .12);
  --bl-accent-line: rgba(212, 160, 23, .32);
  --bl-accent-glow: rgba(224, 169, 63, .16);
  --bl-accent-glow2: rgba(224, 169, 63, .24);
}

.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; }
}

/* ---------------------------------------------------------
   The Lab shell integration — full-bleed sections inside
   .lab-content--flush (no outer max-width from the shell).
   --------------------------------------------------------- */
.bl-page { background: #ffffff; }
.bl-page .bl-shelfhead { display: flex; align-items: center; gap: 12px; padding: 18px 30px; border-bottom: 1px solid #eef2f6; background: #fff; }

/* This surface is mounted inside the app shell, not a long public
   scroll-landing page — show content immediately like every other
   Lab surface. Kill the scroll-reveal opacity gate outright. */
.lab-content--flush .bl-reveal,
.lab-content--flush.js .bl-reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
/* =========================================================
   Reading Shelf — book spine text containment
   Fixes vertical title overflow on long book names.
   ========================================================= */

.bl-spine--book {
  position: relative !important;
  flex: 0 0 auto !important;
  width: 54px !important;
  min-width: 54px !important;
  padding: 12px 5px 10px !important;
  overflow: hidden !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.bl-spine--book span {
  display: block !important;
  writing-mode: vertical-rl !important;
  transform: rotate(180deg) !important;
  text-align: center !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-height: 100% !important;
}

/* Title line */
.bl-spine--book span:first-child {
  font-size: 12px !important;
  font-weight: 800 !important;
  max-height: calc(100% - 42px) !important;
}

/* Author line */
.bl-spine--book span:last-child {
  font-size: 9px !important;
  font-weight: 800 !important;
  letter-spacing: .05em !important;
  max-height: 38px !important;
  opacity: .72 !important;
}

/* Give the longer titles more room */
.bl-spine--book[href*="B0CLL19PHK"],
.bl-spine--book[href*="B0030V0PEW"] {
  width: 58px !important;
  min-width: 58px !important;
}

.bl-spine--book[href*="B0CLL19PHK"] {
  height: 206px !important;
}

.bl-spine--book[href*="B0030V0PEW"] {
  height: 188px !important;
}

/* Keep the shelf base aligned with the wider/taller book row */
.bl-spine--book + .bl-spine--book {
  margin-left: 0 !important;
}

@media (max-width: 720px) {
  .bl-spine--book {
    width: 48px !important;
    min-width: 48px !important;
  }

  .bl-spine--book span:first-child {
    font-size: 10.5px !important;
  }

  .bl-spine--book span:last-child {
    font-size: 8px !important;
  }

  .bl-spine--book[href*="B0CLL19PHK"] {
    height: 190px !important;
  }

  .bl-spine--book[href*="B0030V0PEW"] {
    height: 174px !important;
  }
}
