/* =============================================================================
   Asset tiles - the SFM library's three clips (Particles, Scenebuilds, Animations), each 512 x 512 in a beveled
   bar, on the home page (ASSETS) and the Assets page (a slim intro with the SFM | Blender switch, the tabs Main /
   Particles / Scenebuilds / Animations, the tiles, the line that changes, then one tab's sections).
   Rest on a tile: it grows a little and plays; leave: it shrinks and plays back (shared/asset-tiles.js).
   Everything here is subtle. Loaded after ht.css and the quiet theme: /styles/asset-tiles.css?v=2
   ============================================================================= */

:root { --tile-blue: 150, 208, 255; --tile-ground: 214, 140, 98; }   /* the trail's blue, the island ground's orange */

/* ---- the tiles */
.asset-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); margin: 0; padding: 0;
  list-style: none; }
.asset-tile { position: relative; display: block; padding: 7px; border-radius: 18px; color: inherit; text-decoration: none;
  background: linear-gradient(180deg, #2b3037 0%, #191c21 46%, #0f1114 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -2px 0 rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .05),
              0 1px 2px rgba(0, 0, 0, .25), 0 14px 30px -16px rgba(0, 0, 0, .7);
  transform: scale(1); transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s ease; }
.asset-tile.is-hot { transform: scale(1.045); z-index: 2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 -2px 0 rgba(0, 0, 0, .55), 0 2px 4px rgba(0, 0, 0, .3),
              0 22px 40px -18px rgba(0, 0, 0, .8); }
.asset-tile:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.asset-tile::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: -1px; height: 2px; border-radius: 2px;
  pointer-events: none; opacity: 0; background: rgba(var(--tile-blue), .7);
  box-shadow: 0 0 10px 1px rgba(var(--tile-blue), .28); }
.asset-tile.is-pulse::after { animation: tile-pulse 1.1s ease-out 1; }
@keyframes tile-pulse { 0% { opacity: 0; transform: scaleX(.6); } 30% { opacity: .55; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(1); } }
.asset-tile-media { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 12px;
  background: #0f1114; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .65), inset 0 0 0 1px rgba(255, 255, 255, .06); }
.asset-tile-media video, .asset-tile-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.asset-tile-cap { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2);
  padding: 10px 8px 3px; color: #e9ecf0; font-weight: 700; letter-spacing: .01em; }
.asset-tile-cap small { color: #98a3ae; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; }
/* the caption scales with the tile (tiles are sized to the window now): "Scenebuilds 30+" stays inside a small tile */
.asset-tile { container-type: inline-size; }
@supports (container-type: inline-size) {
  .asset-tile-cap { font-size: clamp(.68rem, 6.6cqi, 1rem); white-space: nowrap; padding-left: 4px; padding-right: 4px; }
  .asset-tile-cap small { font-size: .78em; flex: 0 0 auto; }
}
.asset-tile.is-current { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -2px 0 rgba(0, 0, 0, .55),
  0 0 0 1.5px rgba(var(--tile-blue), .6), 0 14px 34px -16px rgba(var(--tile-blue), .35); }
.asset-tile.is-current.is-hot { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 -2px 0 rgba(0, 0, 0, .55),
  0 0 0 1.5px rgba(var(--tile-blue), .7), 0 22px 40px -18px rgba(var(--tile-blue), .4); }

/* ---- the Assets page: a slim intro, the switch on the right */
.section.assets-intro { padding-top: var(--s-4); padding-bottom: var(--s-3); }
.assets-intro-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-3) var(--s-5); }
.assets-title { margin: .25em 0 .2em; font-size: clamp(1.35rem, 1.05rem + 1vw, 1.85rem); line-height: 1.15; }
.assets-intro-line { margin: 0; color: var(--text-muted); max-width: 82ch; }

.assets-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--inset);
  border: 1px solid var(--outline); }
.assets-switch button { min-width: 6.5rem; padding: .5em 1.2em; border: 0; border-radius: 999px; background: transparent;
  color: var(--text-muted); font: inherit; font-weight: 750; letter-spacing: .06em; cursor: pointer;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease, color .2s ease; }
.assets-switch button[aria-pressed="true"] { background: var(--plate); color: var(--heading);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18), inset 0 0 0 1px var(--outline); }
.assets-switch button[data-view="sfm"]:hover { transform: scale(1.03); color: var(--heading);
  box-shadow: inset 0 0 0 1px rgba(var(--tile-ground), .55), 0 0 14px -2px rgba(var(--tile-ground), .35); }
.assets-switch button[data-view="blender"]:hover { transform: scale(1.03); color: var(--heading);
  box-shadow: inset 0 0 0 1px rgba(var(--tile-blue), .55), 0 0 14px -2px rgba(var(--tile-blue), .35); }
.assets-switch button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---- the tabs, the tiles under them, the line that changes */
.assets-pick { display: flex; flex-direction: column; align-items: center; padding-bottom: var(--s-4); }
.assets-pick .asset-tiles { width: 100%; max-width: 1020px; }
.assets-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 100%; margin: 0 0 var(--s-4);
  padding: 4px; border-radius: 14px; background: var(--plate); border: 1px solid var(--outline); }
.assets-bar a { padding: .45em 1.05em; border-radius: 10px; color: var(--text-muted); font-weight: 700; font-size: .95em;
  letter-spacing: .04em; text-transform: uppercase; text-decoration: none; transition: color .2s ease, background .2s ease; }
.assets-bar a:hover { color: var(--heading); background: var(--inset); }
.assets-bar a[aria-selected="true"] { color: var(--heading); background: var(--inset);
  box-shadow: inset 0 -2px 0 rgba(var(--tile-blue), .8); }
.assets-bar a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* the short line above the tiles, crossfaded on a change */
.assets-kicker { margin: 0 0 var(--s-4); min-height: 1.4em; text-align: center; color: var(--heading); font-weight: 750;
  font-size: clamp(1.05rem, .9rem + .6vw, 1.35rem); letter-spacing: -.01em;
  transition: opacity .18s ease, transform .18s ease; }
.assets-kicker.is-out { opacity: 0; transform: translateY(-5px); }

/* the tiles between two small arrows; the products float out under them (shared/asset-stage.js) */
.assets-pick { position: relative; }
.assets-carousel { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center;
  gap: var(--s-3); width: 100%; max-width: 1120px; }
.assets-carousel .asset-tiles { flex: 1 1 auto; min-width: 0; }
.assets-arrow { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0;
  border-radius: 50%; background: var(--inset); color: var(--text-muted); cursor: pointer;
  transition: color .2s ease, background .2s ease, transform .25s ease; }
.assets-arrow:hover { color: var(--heading); transform: scale(1.06); }
.assets-arrow:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* the title, tabs, tiles and stage fit one screen at 100% zoom (the user: "verify that at 100% chrome zoom the page
   loads without cutting out the elements"): the tiles and the stage share the height under the tabs (--fold) */
.assets-pick { --fold: calc(100vh - 372px); }
@supports (height: 100svh) { .assets-pick { --fold: calc(100svh - 372px); } }
.assets-pick .asset-tiles { max-width: min(1020px, max(420px, calc(var(--fold) * 1.62 - 79px))); }
/* a short window (a laptop): the intro, tabs and headline closer together */
@media (min-width: 761px) and (max-height: 780px) {
  .section.assets-intro { padding-top: var(--s-2); padding-bottom: var(--s-2); }
  .assets-title { margin: .1em 0 .1em; font-size: 1.3rem; }
  .assets-bar { margin-bottom: var(--s-2); }
  .assets-kicker { margin-bottom: var(--s-2); font-size: 1.05rem; }
  .assets-pick { --fold: calc(100vh - 322px); }
  @supports (height: 100svh) { .assets-pick { --fold: calc(100svh - 322px); } }
}
.assets-stage { position: relative; z-index: 2; width: 100%; height: clamp(150px, min(25vw, calc(var(--fold) * .45)), 340px); }
/* the faint arrows that page through the packs */
.assets-stage-arrow { position: absolute; top: 50%; z-index: 3; display: grid; place-items: center; width: 26px; height: 26px;
  margin-top: -13px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .05);
  color: rgba(220, 230, 240, .55); cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease; }
.assets-stage-arrow:hover { background: rgba(var(--tile-blue), .16); color: #fff; transform: scale(1.08); }
.assets-stage-arrow:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.assets-stage-arrow[hidden] { display: none; }
.assets-stage-arrow.is-prev { left: 2px; }
.assets-stage-arrow.is-next { right: 2px; }
.assets-stage-list button:focus { position: static; }

/* the chosen card's showcase: the tier's offer, or the pack's video, badge, words and links */
.assets-show { width: 100%; max-width: 1020px; margin: var(--s-4) auto 0; }
.assets-show.is-entering { animation: assets-enter .45s cubic-bezier(.2, .8, .2, 1) both; }
.assets-show-card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s-5);
  align-items: center; padding: var(--s-4); border-radius: 18px; background: var(--plate);
  box-shadow: inset 0 0 0 1px var(--outline), 0 14px 34px -22px rgba(0, 0, 0, .7); }
.assets-show-card.is-tier { grid-template-columns: minmax(0, 1fr); text-align: left; }
.assets-show-card .screen-media { border-radius: 12px; overflow: hidden; }
.assets-show-icon { display: grid; place-items: center; background: #14171b; }
.assets-show-icon img { position: static !important; width: 30% !important; height: auto !important; object-fit: contain !important; }
.assets-show-text h3 { margin: .1em 0 .3em; }
.assets-show-text .tags { margin: 0 0 .5em; }
.assets-show-meta { margin: 0 0 .6em; color: var(--text-muted); font-size: var(--fs-xs); letter-spacing: .02em; }
.assets-show-price { margin: 0 0 .4em; }
.assets-show-price b { font-size: 1.6em; color: var(--heading); }
.assets-show-price span { color: var(--text-muted); }
.assets-show-save { margin: .2em 0 .9em; color: var(--text-muted); font-size: .85em; opacity: .8; }
/* the tier's offer (words only): the saving in blue, "unsubscribe at any time" */
.is-tier-offer .assets-show-save { margin-bottom: .3em; color: rgb(var(--tile-blue)); opacity: 1; font-weight: 700; }
.assets-show-cancel { margin: 0 0 .9em; color: var(--text-muted); font-size: .85em; }
@media (max-width: 760px) {
  .assets-show-card { grid-template-columns: minmax(0, 1fr); }
}
.assets-stage-canvas { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none; }   /* sized by the script: down to the stage */
.asset-tiles .asset-tile { z-index: 2; }

/* a section coming in after a change */
[data-assets-view] > section.is-entering { animation: assets-enter .5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes assets-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .assets-arrow { display: none; }
  .assets-stage { height: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  .assets-kicker { transition: none; }
  [data-assets-view] > section.is-entering { animation: none; }
}

[data-assets-view][hidden], [data-assets-view] > section[hidden] { display: none !important; }

/* a tab's banner: a thick wide picture (or loop), the title on it */
.assets-banner { position: relative; overflow: hidden; aspect-ratio: 8 / 3; margin: 0 0 var(--s-5); border-radius: 18px;
  background: #0f1114; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 18px 40px -24px rgba(0, 0, 0, .8); }
.assets-banner video, .assets-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.assets-banner::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(15, 17, 20, .88) 0%, rgba(15, 17, 20, .35) 34%, rgba(15, 17, 20, 0) 58%); }
.assets-banner-text { position: absolute; z-index: 2; left: clamp(16px, 3.5%, 40px); right: clamp(16px, 3.5%, 40px);
  top: clamp(12px, 4%, 30px); }
.assets-banner-text .eyebrow { margin-bottom: .35em; }
.assets-banner-text h2 { margin: 0; color: #eef1f4; font-size: clamp(1.3rem, .95rem + 1.4vw, 2.1rem); line-height: 1.1; }
.assets-banner-tier { margin: .35em 0 0; color: #a7b0ba; font-size: .95em; }
.assets-banner-tier a { font-weight: 700; }
@media (max-width: 600px) { .assets-banner { aspect-ratio: 16 / 10; } }

/* the library's cards on the Assets page (moved from the home page; home.css is not loaded there) */
.assets-cat .product { display: flex; flex-direction: column; }
.assets-cat .product-side { flex: 1 1 auto; display: flex; flex-direction: column; }
.assets-cat .product-head { display: flex; align-items: center; gap: var(--s-4); margin: 0 0 var(--s-3); }
.assets-cat .product-head img { width: 72px; height: 72px; flex: 0 0 auto; object-fit: contain; }
.assets-cat .product-head h3 { margin: 0 0 .15em; }
.assets-cat .product-count { margin: 0; }
.assets-cat .product .tags { margin: 0 0 var(--s-4); }
.assets-cat .product .check-list { margin-bottom: var(--s-4); }
.assets-cat .product-sub { margin: 0 0 var(--s-2); font-size: var(--fs-xs); font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-muted); }
.assets-cat .product-free { margin: 0 0 var(--s-4); font-size: .95em; color: var(--text-muted); }
.assets-cat .product-cta { margin: auto 0 0; padding-top: var(--s-3); border-top: 1px solid var(--line); }
@media (min-width: 900px) {
  .assets-cat .product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--s-6); }
}

/* Blender: what is coming */
.assets-soon { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.assets-soon .panel h3 { margin-top: 0; }

@media (max-width: 760px) {
  .asset-tiles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%; overflow-x: auto;
    scroll-snap-type: x mandatory; padding: 6px 2px var(--s-2); -webkit-overflow-scrolling: touch; }
  .asset-tile { scroll-snap-align: start; }
  .asset-tile.is-hot { transform: none; }
  .assets-soon { grid-template-columns: minmax(0, 1fr); }
  .assets-switch button { min-width: 0; }
  .assets-bar a { padding: .45em .7em; font-size: .85em; }
}
@media (prefers-reduced-motion: reduce) {
  .asset-tile, .assets-switch button { transition: none; }
  .asset-tile.is-hot, .assets-switch button:hover { transform: none; }
}

/* GET ALL <kind>: the tier under the pack cards - its clip, price, packs, how much less it is than every pack of it
   one by one, unsubscribe any time. It comes out once the carousel steps past the tier card (.is-away on the tier) */
.assets-getall { position: relative; z-index: 2; display: flex; align-items: center; gap: var(--s-3); width: 100%;
  max-width: 620px; max-height: 120px; overflow: hidden; margin: var(--s-3) auto 0; padding: 8px 14px 8px 8px;
  border-radius: 14px; color: inherit;
  text-decoration: none; background: var(--plate); box-shadow: inset 0 0 0 1px var(--outline), 0 10px 26px -18px rgba(0, 0, 0, .7);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease, opacity .3s ease .08s,
              max-height .4s cubic-bezier(.2, .8, .2, 1), margin .4s cubic-bezier(.2, .8, .2, 1),
              padding .4s cubic-bezier(.2, .8, .2, 1), visibility 0s 0s; }
.assets-getall.is-away { max-height: 0; margin-top: 0; padding-top: 0; padding-bottom: 0; opacity: 0;
  transform: translateY(-14px) scale(.96); visibility: hidden; pointer-events: none;
  transition: transform .3s ease, opacity .2s ease, max-height .35s ease .05s, margin .35s ease .05s,
              padding .35s ease .05s, visibility 0s .4s; }
.assets-getall:empty { display: none; }
.assets-getall:hover { transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(var(--tile-blue), .45), 0 0 18px -6px rgba(var(--tile-blue), .35), 0 12px 28px -18px rgba(0, 0, 0, .8); }
.assets-getall:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.assets-getall-icon { flex: 0 0 auto; width: 52px; height: 52px; overflow: hidden; border-radius: 10px; background: #0f1114;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.assets-getall-icon video { display: block; width: 100%; height: 100%; object-fit: cover; }
.assets-getall-text { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; gap: 2px; }
.assets-getall-text b { color: var(--heading); font-weight: 800; letter-spacing: .05em; }
.assets-getall-text span { overflow: hidden; color: var(--text-muted); font-size: var(--fs-xs); white-space: nowrap;
  text-overflow: ellipsis; }
.assets-getall-off { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; color: rgb(var(--tile-blue));
  font-weight: 800; font-size: 1.1em; line-height: 1.05; }
.assets-getall-off small { color: var(--text-muted); font-size: .62em; font-weight: 600; letter-spacing: .03em; opacity: .8; }
.assets-getall-go { flex: 0 0 auto; color: var(--text-muted); transition: transform .3s ease, color .2s ease; }
.assets-getall:hover .assets-getall-go { color: var(--heading); transform: translateX(2px); }
@media (max-width: 480px) {
  .assets-getall { gap: 10px; padding-right: 12px; }
  .assets-getall-icon { width: 44px; height: 44px; }
  .assets-getall-text b { font-size: .84em; letter-spacing: .02em; white-space: nowrap; }
  .assets-getall-go { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .assets-getall, .assets-getall-go { transition: none; }
}
