/* ── Resources ──────────────────────────────────────────────
   The video shelf (views/resources.js) in the landing's design: .lp gives it
   the landing canvas, light/dark tokens and blue accent. Type-led: a Geist
   heading, topic chips, then one hairline-separated section per topic. Tiles
   are the cover and two lines of text, no card box; the cover is the only
   framed thing. On phones each tile becomes a compact row. */

.res-page { gap: clamp(22px, 3vw, 34px); padding-top: clamp(28px, 5vw, 64px); padding-bottom: clamp(40px, 6vw, 88px); }

.res-head { display: flex; flex-direction: column; gap: 14px; }
.res-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lp-accent-ink, var(--accent));
}
.res-title {
  font-family: var(--font-geist);
  font-size: clamp(34px, 4.8vw, 58px);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.res-note { font-size: clamp(15.5px, 1.3vw, 17px); color: var(--muted); line-height: 1.55; }

/* Topic chips. They scroll sideways on narrow screens rather than wrap. */
.res-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-inline: -4px;
  padding: 4px;
}
.res-chips::-webkit-scrollbar { display: none; }
.res-chip {
  flex: none;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.res-chip:hover { border-color: var(--line-hi); color: var(--text); }
.res-chip[aria-pressed="true"] { border-color: var(--lp-accent); background: var(--lp-accent); color: var(--lp-on-accent); }
.res-chip:focus-visible { outline: 2px solid var(--lp-accent); outline-offset: 2px; }

.res-shelf { display: flex; flex-direction: column; }

.res-section { display: flex; flex-direction: column; gap: 20px; padding: clamp(26px, 3.4vw, 40px) 0; border-top: 1px solid var(--line); }
.res-section:first-child { border-top: 0; padding-top: 6px; }
.res-section-head { display: flex; flex-direction: column; gap: 4px; }
.res-section-title { font-family: var(--font-geist); font-size: clamp(21px, 2vw, 25px); font-weight: 600; letter-spacing: -0.03em; }
.res-section-note { font-size: 14.5px; color: var(--muted); }

.res-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 22px; }
@media (max-width: 980px) { .res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.res-tile {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.res-tile:focus-visible { outline: none; }
.res-tile:focus-visible .res-cover { outline: 2px solid var(--lp-accent); outline-offset: 3px; }

.res-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: var(--lp-stage);
  box-shadow: 0 0 0 1px var(--line);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.res-cover-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.res-tile:hover .res-cover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--line-hi), 0 18px 40px -24px rgba(9, 9, 11, 0.4); }

.res-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--lp-accent);
  color: var(--lp-on-accent);
  box-shadow: 0 10px 28px -8px rgba(9, 9, 11, 0.45);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.res-play svg { width: 21px; height: 21px; margin-left: 3px; }
.res-tile:hover .res-play, .res-tile:focus-visible .res-play { opacity: 1; transform: none; }

.res-duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(9, 9, 11, 0.78);
  color: #fff;
  font: 500 11.5px/1.4 var(--font-mono);
}

.res-meta { display: flex; flex-direction: column; gap: 5px; padding-inline: 2px; }
.res-tile-title { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.35; }
.res-tile-sub { font-size: 14px; color: var(--muted); line-height: 1.5; }

/* Phones: compact rows, cover on the left. */
@media (max-width: 600px) {
  .res-page { gap: 18px; padding-top: 22px; }
  .res-head { gap: 10px; }
  .res-title { font-size: 31px; }
  .res-note { font-size: 14.5px; }
  .res-section { gap: 14px; padding: 24px 0; }
  .res-section-title { font-size: 19px; }
  .res-section-note { font-size: 13.5px; }
  .res-grid { grid-template-columns: 1fr; gap: 16px; }
  .res-tile { flex-direction: row; align-items: flex-start; gap: 13px; }
  .res-cover { flex: none; width: 138px; border-radius: 10px; }
  .res-tile:hover .res-cover { transform: none; }
  .res-play { display: none; }
  .res-duration { right: 5px; bottom: 5px; padding: 2px 5px; font-size: 10.5px; }
  .res-meta { gap: 3px; padding-top: 1px; }
  .res-tile-title { font-size: 14.5px; }
  .res-tile-sub {
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}
