/* Basketball journey rail.
   Poster cards follow the cristianoronaldo.com/#cr7 panels: the photo fills
   the card, a bottom gradient holds the type, and a desktop hover brings the
   photo out of grayscale. Type is Barlow Condensed (OFL), the free condensed
   cut of the site's Barlow, in place of that site's licensed Proxima Nova.
   Color stays Shawnee Mission West: black, gold #F5C400, white, paper. */

.bj-timeline {
  background: var(--paper, #F7F3EA);
  color: #000;
  padding: 12px 0 28px;
}

.bj-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px 12px;
}

.bj-hint {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4C4C4C;
}

.bj-arrows { display: none; gap: 8px; }

.bj-arrow {
  width: 44px;
  height: 44px;
  border: 2px solid #000;
  background: #000;
  color: #F5C400;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.bj-arrow:hover { background: #F5C400; color: #000; }
.bj-arrow:focus-visible,
.bj-rail:focus-visible,
.bj-card:focus-visible { outline: 3px solid #F5C400; outline-offset: 3px; }
.bj-arrow:disabled { opacity: 0.35; cursor: default; }

.bj-rail {
  container: journey / inline-size;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0 16px 8px;
  -webkit-overflow-scrolling: touch;
}

.bj-track {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 12px;
  width: max-content;
  padding-bottom: 42px;
}

.bj-track::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  height: 3px;
  background: #F5C400;
  z-index: 0;
}

.bj-mark {
  flex: 0 0 auto;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 42px;
  padding: 12px 8px;
  background: #000;
  color: #F5C400;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
  scroll-snap-align: start;
}

.bj-item {
  container: card / inline-size;
  position: relative;
  flex: 0 0 calc((100cqi - 36px) / 4);
  width: calc((100cqi - 36px) / 4);
  scroll-snap-align: start;
  min-width: 220px;
}

.bj-timeline a.bj-card,
.bj-timeline a.bj-card:hover,
.bj-timeline a.bj-card:focus {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  min-height: 560px;
  overflow: hidden;
  background: #000;
  color: #fff;
  text-decoration: none;
  border: 0;
}

.bj-card::after {
  content: "";
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: #F5C400;
  pointer-events: none;
}

.bj-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #000;
  overflow: hidden;
}

.bj-photo img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.bj-placeholder {
  height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 72px 18px 0 0;
  background:
    radial-gradient(90% 55% at 70% 18%, rgba(245, 196, 0, 0.2), transparent 58%),
    #0a0a0a;
  color: rgba(245, 196, 0, 0.34);
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 300;
  font-size: clamp(88px, 42cqi, 150px);
  letter-spacing: 0.02em;
  line-height: 0.8;
}

.bj-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 24%),
    linear-gradient(to top, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.88) 36%, rgba(0, 0, 0, 0.35) 58%, rgba(0, 0, 0, 0) 76%);
}

.bj-year,
.bj-body,
.bj-num {
  position: relative;
  z-index: 2;
}

.bj-year {
  position: absolute;
  left: 18px;
  margin: 0;
}

.bj-year {
  top: 16px;
  right: 18px;
  color: #fff;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bj-year::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 2px;
  margin-right: 8px;
  background: #F5C400;
  vertical-align: middle;
}

.bj-num {
  margin: 0 0 2px;
  color: #F5C400;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 300;
  font-size: clamp(52px, 18cqi, 80px);
  line-height: 0.8;
  letter-spacing: 0.01em;
}

.bj-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 18px 18px;
}

.bj-tag,
.bj-season,
.bj-team,
.bj-record,
.bj-honor {
  margin: 0;
}

.bj-tag {
  align-self: flex-start;
  color: #F5C400;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.bj-team {
  color: #fff;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 12cqi, 42px);
  letter-spacing: 0.04em;
  line-height: 0.9;
  text-transform: uppercase;
}

.bj-season {
  color: rgba(255, 255, 255, 0.78);
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 300;
  font-size: 16px;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.bj-record,
.bj-honor {
  color: rgba(255, 255, 255, 0.9);
  font-family: "Barlow", "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
}

.bj-honor { font-weight: 600; color: #fff; }

.bj-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(245, 196, 0, 0.75);
}

.bj-stats span { display: flex; flex-direction: column; min-width: 0; }

.bj-stats b {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
}

.bj-stats em {
  font-style: normal;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #F5C400;
}

.bj-dot {
  position: absolute;
  left: 50%;
  bottom: -30px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%);
  background: #000;
  border: 2px solid #F5C400;
  border-radius: 50%;
  z-index: 1;
}

@container journey (max-width: 760px) {
  .bj-item {
    flex-basis: 84cqi;
    width: 84cqi;
    min-width: 0;
  }
  .bj-timeline a.bj-card,
  .bj-timeline a.bj-card:hover,
  .bj-timeline a.bj-card:focus { min-height: 540px; }
}

@container journey (min-width: 761px) and (max-width: 1099px) {
  .bj-item {
    flex-basis: calc((100cqi - 12px) / 2.2);
    width: calc((100cqi - 12px) / 2.2);
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .bj-photo img {
    filter: grayscale(0.72);
    transform: scale(1);
    transition: filter 0.5s ease, transform 0.6s ease;
  }
  .bj-card:hover .bj-photo img,
  .bj-card:focus-visible .bj-photo img {
    filter: grayscale(0);
    transform: scale(1.06);
  }
  .bj-card::after { transition: height 0.25s ease; }
  .bj-card:hover::after,
  .bj-card:focus-visible::after { height: 6px; }
}

@media (max-width: 799px) {
  .bj-item {
    flex-basis: 84cqi;
    width: 84cqi;
    min-width: 0;
  }
  .bj-timeline a.bj-card,
  .bj-timeline a.bj-card:hover,
  .bj-timeline a.bj-card:focus { min-height: 540px; }
  .bj-hint { display: none; }
  .bj-num { font-size: 72px; }
  .bj-team { font-size: 36px; }
}

@media (min-width: 800px) {
  .bj-arrows { display: flex; }
  .bj-toolbar,
  .bj-rail { padding-left: 40px; padding-right: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .bj-rail { scroll-behavior: auto; }
  .bj-photo img,
  .bj-card,
  .bj-card::after {
    transition: none;
    animation: none;
  }
  .bj-photo img { transform: none; filter: none; }
  .bj-card:hover .bj-photo img,
  .bj-card:focus-visible .bj-photo img { transform: none; filter: none; }
}
