/* Resources page — loaded only on /resources/. Anthracite thesis hero
   (workshops/learning photo, same pattern as about) + reusable snap
   rails (videos, books & articles, future categories). */
.res-hero {
  /* NOTE: photo layer removed — service/img/3.png never existed (404).
     Hero renders the anthracite gradient only, as it always has. To add a
     photo here, point a new url() layer at an existing file. */
  background:
    linear-gradient(
      color-mix(in srgb, var(--color-primary) 88%, transparent),
      color-mix(in srgb, var(--color-bg-darker) 92%, transparent)
    );
}

.res-cat { padding: var(--space-5) 0; }

.res-cat + .res-cat { padding-top: 0; }

.res-head { margin-bottom: var(--space-4); }

.res-head h2 { margin: 0; font-size: var(--text-h2); }

.rail-line {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.rail-wrap { flex: 1; min-width: 0; }

.rail-arrow {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: transparent;
  border: 2px solid var(--color-secondary);
  border-radius: var(--radius-pill);
  color: var(--color-secondary);
  cursor: pointer;
  transition: background 200ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms;
}

.rail-arrow:hover { background: var(--color-bg-teal); }

.rail-arrow:disabled { opacity: 0.3; cursor: default; }

@media (max-width: 767px) {
  .rail-arrow { display: none; }
}

.rail {
  display: flex;
  gap: var(--space-5);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: var(--space-2);
}

.rail::-webkit-scrollbar { display: none; }

.res-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
}

.rail--videos .res-card { width: min(340px, 80vw); }
.rail--books .res-card, .rail--reports .res-card { width: min(240px, 64vw); }

.res-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-teal);
  color: var(--color-primary);
}

.rail--videos .res-thumb { aspect-ratio: 16 / 9; }
.rail--books .res-thumb, .rail--reports .res-thumb { aspect-ratio: 3 / 4; }
.res-thumb--wide { aspect-ratio: 16 / 9; }

.res-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.res-thumb--video { background: var(--color-primary-dark); color: var(--tmj-off-white); border: 0; }

.rail--reports .res-thumb--doc {
  aspect-ratio: 3 / 4;
  background: var(--tmj-sand);
  color: var(--tmj-terracotta);
  font-weight: 700;
  font-size: var(--text-small);
  letter-spacing: 0.12em;
}

.res-card h3 {
  margin: var(--space-3) 0 var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-h3);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.res-card .meta {
  margin: 0;
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.res-kicker {
  display: block;
  margin: var(--space-3) 0 0;
  font-size: var(--text-caption);
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-secondary);
}

.res-desc {
  margin: var(--space-2) 0 0;
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  line-height: 1.55;
}

.res-cta {
  display: inline-block;
  margin-top: var(--space-3);
  font-size: var(--text-small);
  font-weight: 700;
  color: var(--color-secondary);
}

.res-cta .btn-arrow {
  display: inline-block;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.res-card:hover .res-cta .btn-arrow { transform: translateX(3px); }
.res-card:hover .res-cta { text-decoration: underline; text-underline-offset: 4px; }

.res-card { transition: transform 250ms cubic-bezier(0.22, 1, 0.36, 1); }
.res-card:hover { transform: translateY(-3px); }
.res-card:hover h3 { color: var(--color-primary); }

.res-foot { height: var(--space-6); }
