/* ── Resources ──────────────────────────────────────────────
   The video shelf (views/resources.js): cinematic tiles that open the
   product movies. Tiles keep the site's ambient language: dark screen,
   grid wash, one brand hue per tile. */

.res { display: flex; flex-direction: column; gap: 30px; padding-top: 40px; }

.res-head { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.res-title { font-size: clamp(32px, 4.4vw, 44px); letter-spacing: -0.03em; }
.res-note { color: var(--muted); font-size: 15.5px; }

.res-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 980px) {
  .res-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; width: 100%; gap: 14px; }
}

.res-tile {
  --res: #2d7ff9;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.25s var(--ease);
}

.res-tile--blue  { --res: #2d7ff9; }
.res-tile--green { --res: #1fa463; }
.res-tile--flame { --res: #e8553e; }
.res-tile--gold  { --res: #f5b429; }

.res-tile:hover { border-color: var(--line-hi); transform: translateY(-2px); }
@supports (box-shadow: 0 0 0 color-mix(in srgb, red 50%, transparent)) {
  .res-tile:hover { box-shadow: 0 14px 44px color-mix(in srgb, var(--res) 16%, transparent); }
}

.res-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* The "video frame": always dark like a paused player, whatever the theme.
   Tiles with a pre-rendered cover set it as an inline background-image over
   this; the gradient screen is the fallback for cover-less tiles and while
   the image loads. */
.res-tile-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background-color: #0b0e13;
  background-image:
    radial-gradient(110% 150% at 12% 0%, color-mix(in srgb, var(--res) 22%, transparent), transparent 55%),
    radial-gradient(110% 150% at 88% 100%, rgba(245, 180, 41, 0.12), transparent 55%),
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: auto, auto, 40px 40px, 40px 40px;
  background-position: center;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
}

/* Covers replace all gradient layers via the inline style. */
.res-tile-screen[style] {
  background-size: cover;
  background-repeat: no-repeat;
}

/* The play button dims the cover slightly behind it so it always reads. */
.res-tile-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(38% 55% at 50% 50%, rgba(0, 0, 0, 0.28), transparent 70%);
  pointer-events: none;
}

.res-tile-num {
  position: absolute;
  top: 12px;
  left: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.65);
}

.res-tile-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #0d0d0d;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s var(--ease);
}

.res-tile:hover .res-tile-play { transform: scale(1.07); }
.res-tile-play svg { width: 22px; height: 22px; margin-left: 3px; }

.res-tile-duration {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font: 500 11.5px/1.4 var(--font-mono);
}

.res-tile-meta { display: flex; flex-direction: column; gap: 5px; padding: 16px 18px 18px; }
.res-tile-title { font-size: 16.5px; font-weight: 600; letter-spacing: -0.015em; }
.res-tile-sub { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
