/* Pack landing pages (e.g. /topographic-landscape-material/).
   Loaded after style.css and reuses its tokens, .wrap, .label, .section-head, .grid/.card, .footer. */

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.muted { color: var(--muted); }

/* ---------- Hero ---------- */
.pack-hero {
  padding-top: calc(var(--bar-h) + clamp(4px, 2vw, 24px));
  padding-bottom: clamp(56px, 8vw, 96px);
}
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.crumbs a { transition: color .2s; }
.crumbs a:hover { color: var(--text); }

/* Two columns: title, intro + buttons left, image right */
.pack-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.pack-head-side { margin-top: 22px; }
.pack-head h1 {
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -.015em;
}
.pack-head .role { margin-top: 14px; line-height: 1.4; }
.lead { max-width: 56ch; color: #c9c8c2; font-size: 16px; opacity: .9; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  font: 500 14px/1.2 var(--sans);
  letter-spacing: .02em;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover, .btn:focus-visible { border-color: var(--muted); }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn-primary { border-color: var(--accent); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--accent); border-color: var(--accent); color: var(--bg); }

.pack-hero-media img {
  width: 100%; height: auto;
  border-radius: 4px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

/* Strip under the image: facts left, tags right */
.pack-meta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 18px 40px;
  margin-top: clamp(32px, 4vw, 48px); padding: 18px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.facts { display: flex; flex-wrap: wrap; gap: 14px 40px; font-size: 14px; }
.facts .label { margin-bottom: 6px; font-size: 11px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font: 400 12px/1.4 var(--mono);
  color: #c9c8c2;
}

/* ---------- Sections ---------- */
.pack-section { padding-bottom: clamp(64px, 9vw, 120px); }

.prose { max-width: 68ch; color: #c9c8c2; font-size: 16px; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 1em; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: .35em; }
.prose a:not(.btn) { color: var(--text); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; transition: color .2s; }
.prose a:not(.btn):hover { color: var(--accent); }
.prose .ext { text-decoration: none; }

/* ---------- Video (click-to-play YouTube) ---------- */
.video-block {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
}
.yt, .yt-frame {
  position: relative; display: block;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface) var(--img) center / cover no-repeat;
}
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt::before {           /* slight darkening so the play button reads on any thumbnail */
  content: ""; position: absolute; inset: 0;
  background: rgba(8, 13, 18, .25);
  transition: background .3s;
}
.yt:hover::before, .yt:focus-visible::before { background: rgba(8, 13, 18, 0); }
.yt-play {
  position: absolute; left: 50%; top: 50%;
  width: 72px; height: 72px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(236, 235, 230, .7);
  background: rgba(8, 13, 18, .55);
  backdrop-filter: blur(4px);
  transition: background .2s, border-color .2s, transform .2s;
}
.yt-play::after {
  content: ""; position: absolute; left: 53%; top: 50%;
  transform: translate(-50%, -50%);
  border-style: solid; border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent var(--text);
}
.yt:hover .yt-play, .yt:focus-visible .yt-play { background: var(--accent); border-color: var(--accent); transform: translate(-50%, -50%) scale(1.06); }

.video-side h3 { font-size: 19px; font-weight: 500; line-height: 1.3; }
.video-side .muted { font-size: 14px; margin-top: 6px; }

/* Side column with chapters: as tall as the video next to it, chapter list scrolls inside.
   contain: size stops the column from adding its own height to the row, so the video sets it. */
.video-block:has(.has-chapters) { align-items: stretch; }
.video-side.has-chapters { contain: size; display: flex; flex-direction: column; }
.chapters {
  list-style: none; margin-top: 18px; border-top: 1px solid var(--line);
  flex: 1; min-height: 0; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.chapters a {
  display: flex; gap: 14px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: #c9c8c2;
  transition: color .2s;
}
.chapters time { font: 400 12px/1.9 var(--mono); color: var(--muted); min-width: 4.5ch; }
.chapters a:hover, .chapters a:hover time { color: var(--accent); }

/* Several smaller videos in a grid (title + length under each) */
.video-grid {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 36px 28px;
}
.video-grid h3 { font-size: 16px; font-weight: 500; line-height: 1.3; margin-top: 14px; }
.video-grid .muted { font-size: 13px; margin-top: 4px; }
.video-grid .yt-play { width: 56px; height: 56px; }
.video-grid .yt-play::after { border-width: 9px 0 9px 14px; }

/* ---------- Features ---------- */
.features {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 36px 28px;
}
.features li { padding-top: 18px; border-top: 1px solid var(--accent); }
.features h3 { font-size: 17px; font-weight: 500; margin-bottom: 8px; }
.features p { font-size: 15px; color: #c9c8c2; opacity: .85; }

/* ---------- Bundle panel ---------- */
.bundle {
  display: grid; grid-template-columns: 240px minmax(0, 1fr) auto;
  align-items: center; gap: 24px 32px;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--surface);
}
.bundle-thumb img { width: 100%; height: auto; border-radius: 4px; transition: opacity .2s; }
.bundle-thumb:hover img { opacity: .85; }
.bundle h3 { font-size: 19px; font-weight: 500; }
.bundle .muted { font-size: 14px; margin-top: 4px; }
.bundle .tags { margin-top: 16px; }
.bundle .tags li { background: var(--bg); }
.tags li.is-current { border-color: var(--accent); color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .pack-head, .video-block { grid-template-columns: 1fr; }
  .features, .video-grid { grid-template-columns: repeat(2, 1fr); }
  .bundle { grid-template-columns: 200px minmax(0, 1fr); }
  .bundle > .btn { grid-column: 2; justify-self: start; }
  /* Stacked under the video: normal height, chapter list capped and scrolling */
  .video-side.has-chapters { contain: none; }
  .chapters { flex: none; max-height: 300px; }
}
@media (max-width: 560px) {
  .features, .video-grid, .bundle { grid-template-columns: 1fr; }
  .bundle > .btn { grid-column: auto; justify-self: stretch; justify-content: center; }
  .cta .btn { flex: 1 1 100%; justify-content: center; }
}
