/* The resource gallery uses the full viewport; storefront pages retain their shell. */
.resources-page .topbar {
  max-width: none;
  margin-left: 32px;
  margin-right: 32px;
}
.resources-page .workspace {
  display: block;
  width: auto;
  max-width: none;
  margin: 36px 32px 0;
}
.resources-page .breadcrumb {
  display: none;
}
.resources-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.resource-card {
  position: relative;
  display: block;
  isolation: isolate;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #efeee7;
  color: white;
}
.resource-card:hover,
.resource-card:focus-visible {
  color: #fff;
}
.resource-card > img,
.resource-teaser {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.resource-teaser {
  pointer-events: none;
}
.resource-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: clamp(22px, 3vw, 48px);
  background: linear-gradient(
    110deg,
    rgb(12 15 17 / 72%),
    rgb(12 15 17 / 42%) 60%,
    rgb(12 15 17 / 18%)
  );
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 220ms ease;
}
.resource-card-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 360px;
  transform: translateY(14px);
  transition: transform 220ms ease;
}
.resource-card-copy strong {
  font-size: clamp(24px, 2vw, 36px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.resource-card-copy > span {
  font-size: 16px;
  line-height: 1.7;
}
.resource-card-copy .resource-card-open {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-top: 4px;
  color: rgb(255 255 255 / 80%);
}
.resource-card:is(:hover, :focus-visible) .resource-card-overlay {
  opacity: 1;
}
.resource-card:is(:hover, :focus-visible) .resource-card-copy {
  transform: none;
}
.resource-card:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}
.resource-dialog-open {
  overflow: hidden;
}
dialog.resource-dialog {
  width: calc(100vw - 64px);
  max-width: none;
  max-height: calc(100dvh - 48px);
  padding: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 100px #0003;
  overscroll-behavior: contain;
}
.resource-dialog::backdrop {
  background: rgb(18 18 18 / 56%);
  backdrop-filter: blur(4px);
}
.resource-dialog-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 28px;
  background: rgb(255 255 255 / 96%);
  border-bottom: 1px solid var(--line);
}
.resource-close {
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.resource-dialog-heading {
  min-width: 0;
}
.resource-dialog-heading h2 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
}
.resource-dialog-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.resource-dialog-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}
.resource-dialog-actions .button {
  white-space: nowrap;
}
.resource-dialog-body {
  padding: 24px 28px 32px;
}
.resource-player {
  display: block;
  width: 100%;
  max-height: 70dvh;
  aspect-ratio: 3700 / 2160;
  border-radius: 10px;
  background: #efeee7;
}
.resource-static-preview {
  display: block;
  width: 100%;
  max-height: 66dvh;
  object-fit: contain;
  border-radius: 10px;
  background: #14171a;
}
.resource-access {
  max-width: 1000px;
  margin: 28px auto 0;
}
.resource-access > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
.resource-access h3 {
  font-size: 16px;
  margin: 0 0 10px;
}
@media (max-width: 900px) {
  .resource-dialog-header {
    flex-wrap: wrap;
  }
  .resource-dialog-actions {
    width: 100%;
    flex-wrap: wrap;
    margin-left: 0;
    padding-left: 0;
  }
}
@media (max-width: 800px) {
  .resources-page .topbar {
    margin-left: 12px;
    margin-right: 12px;
  }
  .resources-page .workspace {
    width: auto;
    margin: 26px 12px 0;
  }
  .resources-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  dialog.resource-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 12px;
  }
  .resource-dialog-header {
    padding: 18px 16px;
    gap: 12px;
  }
  .resource-dialog-heading {
    flex: 1;
  }
  .resource-dialog-actions .button {
    flex: 1 1 140px;
    justify-content: center;
    padding: 10px 12px;
    font-size: 13px;
  }
  .resource-dialog-body {
    padding: 16px;
  }
  .resource-access {
    margin-top: 22px;
  }
}
@media (hover: none) {
  .resource-card-overlay {
    opacity: 1;
    padding: 20px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: linear-gradient(0deg, rgb(12 15 17 / 80%), transparent 95%);
  }
  .resource-card-copy {
    transform: none;
    gap: 6px;
    max-width: 85%;
  }
  .resource-card-copy strong {
    font-size: 24px;
  }
  .resource-card-copy > span {
    font-size: 13px;
    line-height: 1.6;
  }
  .resource-card-copy .resource-card-open {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .resource-card-overlay,
  .resource-card-copy {
    transition: none;
    transform: none;
  }
}
